implement wait for moderator

This commit is contained in:
Josh
2018-05-08 10:41:03 -04:00
parent 4037b6304e
commit e6d01ef1b9
10 changed files with 78 additions and 5 deletions

View File

@ -0,0 +1,29 @@
$(document).on("turbolinks:load", function() {
var action = $("body").data('action');
var controller = $("body").data('controller');
// If the user is on the waiting screen.
if (controller == 'meetings' && action == 'wait') {
setTimeout(refresh, 10000);
}
});
// Send a request to the meeting wait endpoint.
// This checks if the meeting is running on the
// server and will auto join the user if it is.
var refresh = function() {
$.ajax({
url: window.location.pathname,
type: 'POST',
data: {
unauthenticated_join_name: $('#unauthenticated_join_name_').val()
},
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
setTimeout(refresh, 10000);
}

View File

@ -0,0 +1,3 @@
// Place all the styles related to the Users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/