From 4d0c74879a151fbeb0c301d7a7656757e398652d Mon Sep 17 00:00:00 2001 From: yanas Date: Wed, 21 May 2014 15:12:51 +0200 Subject: [PATCH] Fixes issue #70 - Invite others reports null when pressed too early. --- app.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index 9c8f0060c..a6ad8bd41 100644 --- a/app.js +++ b/app.js @@ -1213,7 +1213,6 @@ function buttonClick(id, classname) { * @param messageString the text of the message */ function openMessageDialog(titleString, messageString) { - console.log("OPEN MESSAGE DIALOG"); $.prompt(messageString, { title: titleString, @@ -1288,17 +1287,22 @@ function openLockDialog() { * Opens the invite link dialog. */ function openLinkDialog() { - $.prompt('', - { - title: "Share this link with everyone you want to invite", - persistent: false, - buttons: { "Cancel": false}, - loaded: function (event) { - document.getElementById('inviteLinkRef').select(); - } - } - ); + if (roomUrl == null) + openMessageDialog( "Invite others", + "Your conference is currently being created." + + " Please try again in a few seconds."); + else + $.prompt('', + { + title: "Share this link with everyone you want to invite", + persistent: false, + buttons: { "Cancel": false}, + loaded: function (event) { + document.getElementById('inviteLinkRef').select(); + } + } + ); } /**