From d7cd9eb8bb932aff9c2d16138411227ecf98f7c6 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Tue, 24 Jan 2017 16:13:12 -0500 Subject: [PATCH] update javascript and neaten up layout --- app/assets/javascripts/landing.js | 21 +++++++++++---------- app/assets/stylesheets/shared.scss | 22 ++++++++++++++++++++++ app/views/landing/index.html.erb | 9 +++++---- app/views/shared/_meeting_url.html.erb | 5 ----- config/locales/en-us.yml | 4 ++-- 5 files changed, 40 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js index 385fa99e..5c9156f1 100644 --- a/app/assets/javascripts/landing.js +++ b/app/assets/javascripts/landing.js @@ -134,6 +134,14 @@ } }); + $('.center-panel-wrapper').on('keyup', '.meeting-name', function (event, msg) { + var newId = $(this).val(); + Meeting.getInstance().setMeetingId(newId); + $(".page-wrapper.meetings").data('id', newId); + $('.meeting-url').val(Meeting.getInstance().getURL()); + $('.join-meeting-title').html(I18n.join_title.replace(/%{id}/, newId)); + }) + // enable tooltips var options = { selector: '.has-tooltip', @@ -148,7 +156,9 @@ $(document).tooltip(options); // focus name input or join button - if ($('.meeting-user-name').is(':visible')) { + if ($('.meeting-name').is(':visible')) { + $('.meeting-name').focus(); + } else if ($('.meeting-user-name').is(':visible')) { $('.meeting-user-name').focus(); } else { $('.meeting-join').focus(); @@ -156,15 +166,6 @@ }; var initIndex = function() { - $('.generate-link').click (function (e) { - e.preventDefault(); - var newId = Math.trunc(Math.random() * 1000000000); - Meeting.getInstance().setMeetingId(newId); - $(".page-wrapper.meetings").data('id', newId); - $('.meeting-url').val(Meeting.getInstance().getURL()); - }); - - $('.generate-link').click(); $('ul.previously-joined').empty(); var joinedMeetings = localStorage.getItem('joinedMeetings'); diff --git a/app/assets/stylesheets/shared.scss b/app/assets/stylesheets/shared.scss index 62b47c8f..d0a2e32f 100644 --- a/app/assets/stylesheets/shared.scss +++ b/app/assets/stylesheets/shared.scss @@ -26,6 +26,10 @@ html, body { background: #ffffff; } +.container-fluid { + height: 100%; +} + .background { height: 350px; width: 100%; @@ -68,11 +72,16 @@ body[data-controller=landing][data-action=rooms].app-background { .center-block { float: none; } +.center-panel-wrapper { + height: 100%; +} .center-panel { + height: 100%; .center-panel-size { max-width: 1200px } .center-panel-content-size { + height: 100%; max-width: 1100px; } @@ -157,3 +166,16 @@ a.signin-link { color: #444; } } + +.verticle-line { + // parent must be position relative to work + width: 1px; + background-color: lightgray; + height: 100%; + position: absolute; + left: 50%; +} + +.invite-join-wrapper { + position: relative; +} diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb index 7cba2273..3bd3f593 100644 --- a/app/views/landing/index.html.erb +++ b/app/views/landing/index.html.erb @@ -36,20 +36,21 @@ with BigBlueButton; if not, see . -
+
-
+

<%= t('invite') %>

<%= t('invite_description') %>
<%= render 'shared/meeting_url', hidden: false %>
+
-
-

<%= t('join_session_id', id: '') %>

+
+

<%= t('join') %>

<%= render 'shared/join_form' %> diff --git a/app/views/shared/_meeting_url.html.erb b/app/views/shared/_meeting_url.html.erb index 38197633..e3c08e3f 100644 --- a/app/views/shared/_meeting_url.html.erb +++ b/app/views/shared/_meeting_url.html.erb @@ -17,11 +17,6 @@ with BigBlueButton; if not, see .
- <% if params[:action] == 'index' %> - - <% end %>
diff --git a/config/locales/en-us.yml b/config/locales/en-us.yml index 7cdea712..f63662a4 100644 --- a/config/locales/en-us.yml +++ b/config/locales/en-us.yml @@ -43,6 +43,7 @@ en-US: client: are_you_sure: Are you sure? delete_recording: Delete recording + join_title: Join "%{id}" meeting_ended: Meeting was ended meeting_started: Meeting was started no_recordings: No Recordings @@ -72,7 +73,7 @@ en-US: invite_description: (share this link below to invite others to this meeting) join: Join join_session: Join the current meeting - join_session_id: Join "%{id}" + join_session_id: Join %{id} join_session_user: Join %{name} meeting logged_in_description_html: You are logged in as %{link} login: login @@ -109,7 +110,6 @@ en-US: unlisted: Unlisted unpublished: Unpublished url_copy_explanation: Copy this URL to invite others to the meeting - url_refresh_hint: Generate a new meeting URL video: Video views: Views wait_for_mod_msg: Looks like you're the first one here...