From 540ab7d369408d14c551eaad129f045216982ab4 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Thu, 26 Jan 2017 09:34:05 -0500 Subject: [PATCH] URI encode meeting name and only show invite/join when a name is entered --- app/assets/javascripts/landing.js | 7 ++++++- app/assets/javascripts/meeting.coffee | 2 +- app/views/landing/index.html.erb | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js index 5c9156f1..eb38db9d 100644 --- a/app/assets/javascripts/landing.js +++ b/app/assets/javascripts/landing.js @@ -140,7 +140,12 @@ $(".page-wrapper.meetings").data('id', newId); $('.meeting-url').val(Meeting.getInstance().getURL()); $('.join-meeting-title').html(I18n.join_title.replace(/%{id}/, newId)); - }) + if (newId === '') { + $('.invite-join-wrapper').addClass('hidden'); + } else { + $('.invite-join-wrapper').removeClass('hidden'); + } + }); // enable tooltips var options = { diff --git a/app/assets/javascripts/meeting.coffee b/app/assets/javascripts/meeting.coffee index 9b13a1a4..b0a6e193 100644 --- a/app/assets/javascripts/meeting.coffee +++ b/app/assets/javascripts/meeting.coffee @@ -36,7 +36,7 @@ class @Meeting _meetingInstance = null @buildMeetingURL: (id, type) -> - return @buildFullDomainURL() + '/' + type + '/' + id + return @buildFullDomainURL() + '/' + type + '/' + encodeURIComponent(id) @buildFullDomainURL: -> url = location.protocol + '//' + location.hostname diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb index 3bd3f593..c61793f0 100644 --- a/app/views/landing/index.html.erb +++ b/app/views/landing/index.html.erb @@ -36,7 +36,7 @@ with BigBlueButton; if not, see . -
+