refresh session status on meeting actions

This commit is contained in:
Zachary Chai
2016-11-07 12:12:39 -05:00
parent 58d5e7e6c5
commit bee0b88d97
10 changed files with 59 additions and 9 deletions

View File

@ -1,5 +1,11 @@
(function() {
var sessionStatusRefresh = function(url) {
$.get(url + "/session_status_refresh", function(html) {
$(".join-form-wrapper").html(html);
});
}
var initRooms = function() {
App.messages = App.cable.subscriptions.create({
channel: 'MeetingUpdatesChannel',
@ -12,11 +18,12 @@
Meeting.getInstance().setModJoined(true);
if (Meeting.getInstance().getWaitingForMod()) {
loopJoin();
} else {
sessionStatusRefresh($('.meeting-url').val());
}
}
else if (data.action === 'meeting_ended') {
}
} else if (data.action === 'meeting_ended') {
sessionStatusRefresh($('.meeting-url').val());
}
}
});