add "authentication required" dialog

This commit is contained in:
isymchych 2015-12-15 18:29:37 +02:00
parent ec2be349df
commit 28e5bf4bec
1 changed files with 31 additions and 0 deletions

View File

@ -136,6 +136,37 @@ var LoginDialog = {
}
return dialog;
},
showAuthRequiredDialog: function (roomName, onAuthNow) {
var title = APP.translation.generateTranslationHTML(
"dialog.WaitingForHost"
);
var msg = APP.translation.generateTranslationHTML(
"dialog.WaitForHostMsg", {room: roomName}
);
var buttonTxt = APP.translation.generateTranslationHTML(
"dialog.IamHost"
);
var buttons = [{title: buttonTxt, value: "authNow"}];
return APP.UI.messageHandler.openDialog(
title,
msg,
true,
buttons,
function (onSubmitEvent, submitValue) {
// Do not close the dialog yet
onSubmitEvent.preventDefault();
// Open login popup
if (submitValue === 'authNow') {
onAuthNow();
}
}
);
}
};