dialog handling tweaks
This commit is contained in:
parent
154d2ac4fe
commit
c0f215b0e2
1 changed files with 6 additions and 8 deletions
14
functions.js
14
functions.js
|
@ -394,10 +394,8 @@ function closeInfoBox(cleanup) {
|
||||||
|
|
||||||
var dialog = dialogs.pop();
|
var dialog = dialogs.pop();
|
||||||
|
|
||||||
if (dialog) {
|
if (dialog)
|
||||||
dialog.attr('content', '');
|
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//exception_error("closeInfoBox", e);
|
//exception_error("closeInfoBox", e);
|
||||||
|
@ -410,8 +408,10 @@ function displayDlg(id, param, callback) {
|
||||||
|
|
||||||
notify_progress("Loading, please wait...", true);
|
notify_progress("Loading, please wait...", true);
|
||||||
|
|
||||||
while (dialogs.length > 0)
|
if (dijit.byId("infoBox")) {
|
||||||
closeInfoBox();
|
dialogs.pop();
|
||||||
|
dijit.byId("infoBox").destroy();
|
||||||
|
}
|
||||||
|
|
||||||
var query = "?op=dlg&id=" +
|
var query = "?op=dlg&id=" +
|
||||||
param_escape(id) + "¶m=" + param_escape(param);
|
param_escape(id) + "¶m=" + param_escape(param);
|
||||||
|
@ -467,20 +467,18 @@ function infobox_callback2(transport) {
|
||||||
|
|
||||||
var dialog = new dijit.Dialog({
|
var dialog = new dijit.Dialog({
|
||||||
title: title,
|
title: title,
|
||||||
|
id: 'infoBox',
|
||||||
style: "width: 600px",
|
style: "width: 600px",
|
||||||
onCancel: function() {
|
onCancel: function() {
|
||||||
dialogs.remove(this);
|
dialogs.remove(this);
|
||||||
this.attr('content', '');
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
onExecute: function() {
|
onExecute: function() {
|
||||||
dialogs.remove(this);
|
dialogs.remove(this);
|
||||||
this.attr('content', '');
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
dialogs.remove(this);
|
dialogs.remove(this);
|
||||||
this.attr('content', '');
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
content: content});
|
content: content});
|
||||||
|
|
Loading…
Reference in a new issue