VRFS-2359 warn user when starting a TBD session
This commit is contained in:
parent
aa1706f8ac
commit
9eb6870502
|
|
@ -593,7 +593,7 @@
|
|||
function startSessionClicked() {
|
||||
var $btn = $(this);
|
||||
if($btn.is('.disabled')) { return false; }
|
||||
$btn.addClass('disabled')
|
||||
$btn.addClass('disabled');
|
||||
|
||||
if(willOptionStartSession()) {
|
||||
|
||||
|
|
@ -722,8 +722,22 @@
|
|||
};
|
||||
|
||||
if (createSessionSettings.createType == '<%= MusicSession::CREATE_TYPE_START_SCHEDULED%>') {
|
||||
joinSession(createSessionSettings.selectedSessionId);
|
||||
$('#create-session-buttons .btn-next').off('click');
|
||||
|
||||
// warn user if it's a TBD session
|
||||
if (data.scheduled_start_date === "") {
|
||||
sessionUtils.tbdScheduledSessionWarning(
|
||||
function(evt) {
|
||||
context.JK.app.layout.closeDialog('alert');
|
||||
joinSession(createSessionSettings.selectedSessionId);
|
||||
$('#create-session-buttons .btn-next').off('click');
|
||||
});
|
||||
var $btnNext = $screen.find('.btn-next');
|
||||
$btnNext.removeClass('disabled');
|
||||
}
|
||||
else {
|
||||
joinSession(createSessionSettings.selectedSessionId);
|
||||
$('#create-session-buttons .btn-next').off('click');
|
||||
}
|
||||
}
|
||||
else {
|
||||
rest.createScheduledSession(data)
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@
|
|||
"This session is over or is no longer public and cannot be joined. Please click Refresh to update the session list.",
|
||||
null,
|
||||
function(evt) {
|
||||
context.JK.app.layout.closeDialog('alert');
|
||||
context.JK.app.layout.closeDialog('alert');
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -196,6 +196,17 @@
|
|||
context.JK.app.layout.showDialog('alert');
|
||||
}
|
||||
|
||||
sessionUtils.tbdScheduledSessionWarning = function(callback) {
|
||||
var alertDialog = new context.JK.AlertDialog(context.JK.app, "OK",
|
||||
"If you start this session now, the scheduled start time will be set to the current date and time.",
|
||||
null,
|
||||
callback
|
||||
);
|
||||
|
||||
alertDialog.initialize();
|
||||
context.JK.app.layout.showDialog('alert');
|
||||
}
|
||||
|
||||
function openJoinSessionTerms(sessionId) {
|
||||
var termsDialog = new context.JK.TermsDialog(context.JK.app, sessionId, onJoinSessionTermsAccepted);
|
||||
termsDialog.initialize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue