Browse Source

Fixes issue #70 - Invite others reports null when pressed too early.

master
yanas 11 years ago
parent
commit
4d0c74879a
1 changed files with 16 additions and 12 deletions
  1. 16
    12
      app.js

+ 16
- 12
app.js View File

@@ -1213,7 +1213,6 @@ function buttonClick(id, classname) {
1213 1213
  * @param messageString the text of the message
1214 1214
  */
1215 1215
 function openMessageDialog(titleString, messageString) {
1216
-    console.log("OPEN MESSAGE DIALOG");
1217 1216
     $.prompt(messageString,
1218 1217
         {
1219 1218
             title: titleString,
@@ -1288,17 +1287,22 @@ function openLockDialog() {
1288 1287
  * Opens the invite link dialog.
1289 1288
  */
1290 1289
 function openLinkDialog() {
1291
-    $.prompt('<input id="inviteLinkRef" type="text" value="' +
1292
-        encodeURI(roomUrl) + '" onclick="this.select();" readonly>',
1293
-        {
1294
-            title: "Share this link with everyone you want to invite",
1295
-            persistent: false,
1296
-            buttons: { "Cancel": false},
1297
-            loaded: function (event) {
1298
-                document.getElementById('inviteLinkRef').select();
1299
-            }
1300
-        }
1301
-    );
1290
+    if (roomUrl == null)
1291
+        openMessageDialog(  "Invite others",
1292
+                            "Your conference is currently being created."
1293
+                            + " Please try again in a few seconds.");
1294
+    else
1295
+        $.prompt('<input id="inviteLinkRef" type="text" value="' +
1296
+                encodeURI(roomUrl) + '" onclick="this.select();" readonly>',
1297
+                {
1298
+                    title: "Share this link with everyone you want to invite",
1299
+                    persistent: false,
1300
+                    buttons: { "Cancel": false},
1301
+                    loaded: function (event) {
1302
+                        document.getElementById('inviteLinkRef').select();
1303
+                    }
1304
+                }
1305
+            );
1302 1306
 }
1303 1307
 
1304 1308
 /**

Loading…
Cancel
Save