diff options
author | Andrew Dolgov <[email protected]> | 2010-11-16 16:23:47 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-16 16:27:04 +0300 |
commit | c0f215b0e2e927a024063eca79985fddf9f2b76e (patch) | |
tree | b30c0627f34232fea558ac4b7cca89afc5d2e547 | |
parent | 154d2ac4fe95614a35921a3e0506c6ed60fc7e69 (diff) |
dialog handling tweaks
-rw-r--r-- | functions.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/functions.js b/functions.js index 40779a06e..4a6d09d4d 100644 --- a/functions.js +++ b/functions.js @@ -394,10 +394,8 @@ function closeInfoBox(cleanup) { var dialog = dialogs.pop(); - if (dialog) { - dialog.attr('content', ''); + if (dialog) dialog.hide(); - } } catch (e) { //exception_error("closeInfoBox", e); @@ -410,8 +408,10 @@ function displayDlg(id, param, callback) { notify_progress("Loading, please wait...", true); - while (dialogs.length > 0) - closeInfoBox(); + if (dijit.byId("infoBox")) { + dialogs.pop(); + dijit.byId("infoBox").destroy(); + } var query = "?op=dlg&id=" + param_escape(id) + "¶m=" + param_escape(param); @@ -467,20 +467,18 @@ function infobox_callback2(transport) { var dialog = new dijit.Dialog({ title: title, + id: 'infoBox', style: "width: 600px", onCancel: function() { dialogs.remove(this); - this.attr('content', ''); return true; }, onExecute: function() { dialogs.remove(this); - this.attr('content', ''); return true; }, onClose: function() { dialogs.remove(this); - this.attr('content', ''); return true; }, content: content}); |