|
@@ -1,3 +1,5 @@
|
|
1
|
+/* global $, APP */
|
|
2
|
+
|
1
|
3
|
/* Initial "authentication required" dialog */
|
2
|
4
|
var authDialog = null;
|
3
|
5
|
/* Loop retry ID that wits for other user to create the room */
|
|
@@ -8,7 +10,7 @@ var Authentication = {
|
8
|
10
|
openAuthenticationDialog: function (roomName, intervalCallback, callback) {
|
9
|
11
|
// This is the loop that will wait for the room to be created by
|
10
|
12
|
// someone else. 'auth_required.moderator' will bring us back here.
|
11
|
|
- authRetryId = window.setTimeout(intervalCallback , 5000);
|
|
13
|
+ authRetryId = window.setTimeout(intervalCallback, 5000);
|
12
|
14
|
// Show prompt only if it's not open
|
13
|
15
|
if (authDialog !== null) {
|
14
|
16
|
return;
|
|
@@ -19,10 +21,11 @@ var Authentication = {
|
19
|
21
|
var title = APP.translation.generateTranslatonHTML("dialog.Stop");
|
20
|
22
|
var msg = APP.translation.generateTranslatonHTML("dialog.AuthMsg",
|
21
|
23
|
{room: room});
|
22
|
|
- var button = APP.translation.generateTranslatonHTML(
|
23
|
|
- "dialog.Authenticate");
|
24
|
|
- var buttons = {};
|
25
|
|
- buttons.authenticate = {title: button, value: "authNow"};
|
|
24
|
+
|
|
25
|
+ var buttonTxt
|
|
26
|
+ = APP.translation.generateTranslatonHTML("dialog.Authenticate");
|
|
27
|
+ var buttons = [];
|
|
28
|
+ buttons.push({title: buttonTxt, value: "authNow"});
|
26
|
29
|
|
27
|
30
|
authDialog = APP.UI.messageHandler.openDialog(
|
28
|
31
|
title,
|
|
@@ -41,7 +44,7 @@ var Authentication = {
|
41
|
44
|
}
|
42
|
45
|
);
|
43
|
46
|
},
|
44
|
|
- closeAuthenticationWindow:function () {
|
|
47
|
+ closeAuthenticationWindow: function () {
|
45
|
48
|
if (authenticationWindow) {
|
46
|
49
|
authenticationWindow.close();
|
47
|
50
|
authenticationWindow = null;
|