* promptLeave

This commit is contained in:
Seth Call 2014-02-25 02:20:17 +00:00
parent 25b9d8e420
commit e3c4b09c3f
2 changed files with 13 additions and 1 deletions

View File

@ -232,6 +232,7 @@
}
}
else {
logger.error("Unexpected ajax error: " + textStatus + ", msg:" + errorMessage);
app.notify({title: textStatus, text: errorMessage, detail: jqXHR.responseText});
}
}

View File

@ -432,6 +432,7 @@
});
}
// not leave session but leave screen
function beforeLeave(data) {
if(promptLeave) {
var leaveSessionWarningDialog = new context.JK.LeaveSessionWarningDialog(context.JK.app,
@ -1209,6 +1210,15 @@
}
}
function sessionLeave(evt) {
evt.preventDefault();
promptLeave = false;
context.window.location = '/client#/home';
return false;
}
function sessionResync(evt) {
evt.preventDefault();
var response = context.jamClient.SessionAudioResync();
@ -1388,7 +1398,8 @@
}
function events() {
$('#session-resync').on('click', sessionResync);
$('#session-leave').on('click', sessionLeave);
$('#session-resync').on('click', sessionResync);
$('#session-contents').on("click", '[action="delete"]', deleteSession);
$('#tracks').on('click', 'div[control="mute"]', toggleMute);
$('#recording-start-stop').on('click', startStopRecording);