瀏覽代碼

Updates jquery-impromptu in order to fix issues with modal dialogs.

j8
paweldomas 10 年之前
父節點
當前提交
c296940fd4

+ 1
- 1
index.html 查看文件

@@ -41,7 +41,7 @@
41 41
         Link used for inline installation of chrome desktop streaming extension,
42 42
         is updated automatically from the code with the value defined in config.js -->
43 43
     <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk">
44
-    <script src="libs/jquery-impromptu.js"></script>
44
+    <script src="libs/jquery-impromptu.js?v=2"></script>
45 45
     <script src="libs/jquery.autosize.js"></script>
46 46
   </head>
47 47
   <body>

+ 722
- 525
libs/jquery-impromptu.js
文件差異過大導致無法顯示
查看文件


+ 9
- 6
modules/UI/authentication/Authentication.js 查看文件

@@ -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;

+ 9
- 5
modules/UI/prezi/Prezi.js 查看文件

@@ -66,11 +66,15 @@ var Prezi = {
66 66
                 "dialog.Share");
67 67
             var backButton = APP.translation.generateTranslatonHTML(
68 68
                 "dialog.Back");
69
-            var buttons = {};
70
-            var buttons1 = {};
71
-            buttons1.button1 = buttons.button1 = {title: cancelButton, value: false};
72
-            buttons.button2 = {title: shareButton, value: true};
73
-            buttons1.button2 = {title: backButton, value: true};
69
+            var buttons = [];
70
+            var buttons1 = [];
71
+            // Cancel button to both states
72
+            buttons.push({title: cancelButton, value: false});
73
+            buttons1.push({title: cancelButton, value: false});
74
+            // Share button
75
+            buttons.push({title: shareButton, value: true});
76
+            // Back button
77
+            buttons1.push({title: backButton, value: true});
74 78
             var linkError = APP.translation.generateTranslatonHTML(
75 79
                 "dialog.preziLinkError");
76 80
             var defaultUrl = APP.translation.translateString("defaultPreziLink",

+ 2
- 2
modules/UI/toolbars/Toolbar.js 查看文件

@@ -104,8 +104,8 @@ function hangup() {
104 104
         "dialog.hungUp");
105 105
     var button = APP.translation.generateTranslatonHTML(
106 106
         "dialog.joinAgain");
107
-    var buttons = {};
108
-    buttons.joinAgain = {title: button, value: true};
107
+    var buttons = [];
108
+    buttons.push({title: button, value: true});
109 109
 
110 110
     UI.messageHandler.openDialog(
111 111
         title,

+ 11
- 7
modules/UI/util/MessageHandler.js 查看文件

@@ -1,4 +1,4 @@
1
-/* global $, jQuery */
1
+/* global $, APP, jQuery, toastr */
2 2
 var messageHandler = (function(my) {
3 3
 
4 4
     /**
@@ -37,17 +37,21 @@ var messageHandler = (function(my) {
37 37
         persistent, leftButtonKey, submitFunction, loadedFunction,
38 38
         closeFunction)
39 39
     {
40
+        var buttons = [];
41
+
40 42
         var leftButton = APP.translation.generateTranslatonHTML(leftButtonKey);
41
-        var buttons = {};
42
-        buttons.button1 = {title: leftButton, value: true};
43
-        var cancelButton = APP.translation.generateTranslatonHTML("dialog.Cancel");
44
-        buttons.button2 = {title: cancelButton, value: false};
43
+        buttons.push({ title: leftButton, value: true});
44
+
45
+        var cancelButton
46
+            = APP.translation.generateTranslatonHTML("dialog.Cancel");
47
+        buttons.push({title: cancelButton, value: false});
48
+
45 49
         var message = msgString, title = titleString;
46
-        if(titleKey)
50
+        if (titleKey)
47 51
         {
48 52
             title = APP.translation.generateTranslatonHTML(titleKey);
49 53
         }
50
-        if(msgKey) {
54
+        if (msgKey) {
51 55
             message = APP.translation.generateTranslatonHTML(msgKey);
52 56
         }
53 57
         $.prompt(message, {

Loading…
取消
儲存