var notify_silent = false;
var last_progress_point = 0;
var sanity_check_done = false;
-var dialogs = [];
/* add method to remove element from array */
try {
enableHotkeys();
- var dialog = dialogs.pop();
+ dialog = dijit.byId("infoBox");
- if (dialog)
- dialog.hide();
+ if (dialog) dialog.hide();
} catch (e) {
//exception_error("closeInfoBox", e);
function infobox_callback2(transport) {
try {
+ var dialog = false;
+
if (dijit.byId("infoBox")) {
- dialogs.pop();
- dijit.byId("infoBox").destroy();
+ dialog = dijit.byId("infoBox");
}
//console.log("infobox_callback2");
content = transport.responseText;
}
- var dialog = new dijit.Dialog({
- title: title,
- id: 'infoBox',
- style: "width: 600px",
- onCancel: function() {
- dialogs.remove(this);
- return true;
- },
- onExecute: function() {
- dialogs.remove(this);
- return true;
- },
- onClose: function() {
- dialogs.remove(this);
- return true;
- },
- content: content});
+ if (!dialog) {
+ dialog = new dijit.Dialog({
+ title: title,
+ id: 'infoBox',
+ style: "width: 600px",
+ onCancel: function() {
+ return true;
+ },
+ onExecute: function() {
+ return true;
+ },
+ onClose: function() {
+ return true;
+ },
+ content: content});
+ } else {
+ dialog.attr('title', title);
+ dialog.attr('content', content);
+ }
dialog.show();
- dialogs.push(dialog);
-
notify("");
} catch (e) {
exception_error("infobox_callback2", e);
closeInfoBox();
}
- if (dialogs.length > 0 || !hotkeys_enabled) {
+ var dialog = dijit.byId("infoBox");
+ var dialog_visible = false;
+
+ if (dialog)
+ dialog_visible = Element.visible(dialog.domNode);
+
+ if (dialog_visible || !hotkeys_enabled) {
console.log("hotkeys disabled");
return;
}
closeInfoBox();
}
- if (dialogs.length > 0 || !hotkeys_enabled) {
+ var dialog = dijit.byId("infoBox");
+ var dialog_visible = false;
+
+ if (dialog)
+ dialog_visible = Element.visible(dialog.domNode);
+
+ if (dialog_visible || !hotkeys_enabled) {
console.log("hotkeys disabled");
return;
}