diff --git a/app/assets/javascripts/channels/meeting_updates.js b/app/assets/javascripts/channels/meeting_updates.js index f455fcc0..db39b476 100644 --- a/app/assets/javascripts/channels/meeting_updates.js +++ b/app/assets/javascripts/channels/meeting_updates.js @@ -2,7 +2,8 @@ var sessionStatusRefresh = function(url) { $.get(url + "/session_status_refresh", function(html) { - $(".join-form-wrapper").html(html); + $(".center-panel-wrapper").html(html); + displayMeetingURL(); }); } @@ -20,10 +21,12 @@ loopJoin(); } else { sessionStatusRefresh($('.meeting-url').val()); + showAlert($('.meeting-started-alert').html(), 4000); } } } else if (data.action === 'meeting_ended') { sessionStatusRefresh($('.meeting-url').val()); + showAlert($('.meeting-ended-alert').html(), 4000); } } }); diff --git a/app/assets/javascripts/channels/recording_update.js b/app/assets/javascripts/channels/recording_update.js index 4d3c7730..5650f310 100644 --- a/app/assets/javascripts/channels/recording_update.js +++ b/app/assets/javascripts/channels/recording_update.js @@ -15,11 +15,11 @@ table.row("#"+data.record_id).data(rowData).draw(); var publish = (data.published) ? 'publish' : 'unpublish'; - showAlert($('.'+publish+'-alert').html(), 4000); + showAlert($('.recording-'+publish+'-alert').html(), 4000); } else if (data.action === 'delete') { row.remove().draw(); - showAlert($('.delete-alert').html(), 4000); + showAlert($('.recording-delete-alert').html(), 4000); } } }); diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js index 5b778a7e..a3e27d8e 100644 --- a/app/assets/javascripts/landing.js +++ b/app/assets/javascripts/landing.js @@ -15,7 +15,7 @@ var init = function() { - $('.center-panel').on ('click', '.meeting-join', function (event) { + $('.center-panel-wrapper').on ('click', '.meeting-join', function (event) { var url = $('.meeting-url').val(); var name = $('.meeting-user-name').val(); Meeting.getInstance().setURL(url); @@ -34,7 +34,7 @@ }); }); - $('.center-panel').on ('click', '.meeting-end', function (event) { + $('.center-panel-wrapper').on ('click', '.meeting-end', function (event) { var jqxhr = Meeting.getInstance().endMeeting(); var btn = $(this); btn.prop("disabled", true); @@ -46,7 +46,7 @@ }); }); - $('.center-panel').on ('click', '.meeting-url-copy', function (event) { + $('.center-panel-wrapper').on ('click', '.meeting-url-copy', function (event) { meetingURL = $('.meeting-url'); meetingURL.select(); document.execCommand("copy"); @@ -94,12 +94,7 @@ }; var initRooms = function() { - meetingURL = $('.meeting-url'); - var link = window.location.protocol + - '//' + - window.location.hostname + - meetingURL.data('path'); - meetingURL.val(link); + displayMeetingURL(); // initialize recordings datatable recordingsTable = $('#recordings').dataTable({ diff --git a/app/assets/javascripts/shared.js b/app/assets/javascripts/shared.js index 28aa8511..3140b55f 100644 --- a/app/assets/javascripts/shared.js +++ b/app/assets/javascripts/shared.js @@ -91,3 +91,12 @@ var showAlert = function(html, timeout_delay) { }, timeout_delay); } } + +var displayMeetingURL = function() { + meetingURL = $('.meeting-url'); + var link = window.location.protocol + + '//' + + window.location.hostname + + meetingURL.data('path'); + meetingURL.val(link); +} diff --git a/app/views/landing/_rooms_center_panel.html.erb b/app/views/landing/_rooms_center_panel.html.erb new file mode 100644 index 00000000..f805d6b3 --- /dev/null +++ b/app/views/landing/_rooms_center_panel.html.erb @@ -0,0 +1,24 @@ +<% content_for :title do %> +