diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js index 01edbc9d..8c81fd21 100644 --- a/app/assets/javascripts/landing.js +++ b/app/assets/javascripts/landing.js @@ -15,7 +15,7 @@ var init = function() { Meeting.clear(); - // setup click handlers + // setup event handlers $('.center-panel-wrapper').on ('click', '.meeting-join', function (event) { var name = $('.meeting-user-name').val(); Meeting.getInstance().setName(name); @@ -54,11 +54,57 @@ $('.center-panel-wrapper').on ('click', '.meeting-url-copy', function (event) { meetingURLInput = $('.meeting-url'); + + // copy URL meetingURLInput.select(); - document.execCommand("copy"); - meetingURLInput.blur(); + try { + var success = document.execCommand("copy"); + if (success) { + meetingURLInput.blur(); + $(this).trigger('hint', [$(this).data('copied-hint')]); + } else { + $(this).trigger('hint', [$(this).data('copy-error')]); + } + } catch (err) { + $(this).trigger('hint', [$(this).data('copy-error')]); + } }); + $('.center-panel-wrapper').on('hint', '.meeting-url-copy', function (event, msg) { + $(this).focus(); + $(this).attr('title', msg) + .tooltip('fixTitle') + .tooltip('show') + .attr('title', $(this).data('copy-hint')) + .tooltip('fixTitle'); + }); + + $('.center-panel-wrapper').on('mouseleave', '.meeting-url-copy', function (event, msg) { + $(this).blur(); + }); + + $('.center-panel-wrapper').on('focus', '.meeting-url', function (event, msg) { + $(this).select(); + }); + + // only allow ctrl commands + $('.center-panel-wrapper').on('keydown', '.meeting-url', function (event, msg) { + if(!event.ctrlKey) { + event.preventDefault(); + } + }); + + // enable tooltips + var options = { + selector: '.has-tooltip' + }; + $(document).tooltip(options) + var options = { + selector: '.bottom-tooltip', + placement: 'bottom' + }; + $(document).tooltip(options); + // enable popovers var options = { selector: '.has-popover', @@ -73,7 +119,7 @@ }; $('#recordings').popover(options); - // focus user + // focus name input or join button if ($('.meeting-user-name').is(':visible')) { $('.meeting-user-name').focus(); } else { diff --git a/app/assets/javascripts/recordings.coffee b/app/assets/javascripts/recordings.coffee index 2dfc6e65..38426681 100644 --- a/app/assets/javascripts/recordings.coffee +++ b/app/assets/javascripts/recordings.coffee @@ -60,13 +60,16 @@ class @Recordings if type == 'display' roomName = Meeting.getInstance().getId() published = row.published - eye = getPublishClass(published) - return ' ' + - '' + - '' + - '' + icon = getPublishClass(published) + publishText = if published then 'publish' else 'unpublish' + recordingActions = $('.hidden-elements').find('.recording-actions') + recordingActions.find('.recording-update > i') + .removeClass() + .addClass('fa '+icon) + recordingActions.find('.recording-update') + .attr('data-published', published) + .attr('title', I18n[publishText+'_recording']) + return recordingActions.html() return data } ] diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss index f53a86ef..4fbbd5b1 100644 --- a/app/assets/stylesheets/landing.scss +++ b/app/assets/stylesheets/landing.scss @@ -2,11 +2,20 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ -.join-form { - width: 100%; +.center-panel-wrapper { + .join-form { + width: 100%; + } + + .meeting-url-wrapper { + .meeting-url { + cursor: default; + } + } } .rooms { + .table-wrapper { padding: 40px 50px 10px 50px; @@ -18,4 +27,5 @@ } } } + } diff --git a/app/views/landing/rooms.html.erb b/app/views/landing/rooms.html.erb index 52670083..4effe1a6 100644 --- a/app/views/landing/rooms.html.erb +++ b/app/views/landing/rooms.html.erb @@ -45,4 +45,13 @@ +
+ + + + +
diff --git a/app/views/shared/_meeting_url.html.erb b/app/views/shared/_meeting_url.html.erb index 2a2c44cf..ff15f091 100644 --- a/app/views/shared/_meeting_url.html.erb +++ b/app/views/shared/_meeting_url.html.erb @@ -1,13 +1,15 @@ diff --git a/config/locales/en-us.yml b/config/locales/en-us.yml index 22f0e044..cab1ce4d 100644 --- a/config/locales/en-us.yml +++ b/config/locales/en-us.yml @@ -26,9 +26,13 @@ en-US: are_you_sure: Are you sure? meeting_ended: Meeting was ended meeting_started: Meeting was started + publish_recording: Publish recording recording_deleted: Recording was deleted recording_published: Recording was published recording_unpublished: Recording was unpublished + unpublish_recording: Unpublish recording + copied: Copied + copy_error: Use Ctrl-c to copy date_recorded: Date Recorded duration: Duration end: End @@ -48,6 +52,7 @@ en-US: powered_bigbluebutton: Powered by BigBlueButton presentation: Presentation refresh_html: Click refresh to generate a new meeting URL + delete_recording: Delete recording session_url_explanation: The session will be taking place using the following URL start: Start start_new_session: Start a new session