summaryrefslogtreecommitdiff
path: root/js/AppBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/AppBase.js')
-rw-r--r--js/AppBase.js25
1 files changed, 9 insertions, 16 deletions
diff --git a/js/AppBase.js b/js/AppBase.js
index 9ab2f507e..9c05179c1 100644
--- a/js/AppBase.js
+++ b/js/AppBase.js
@@ -184,10 +184,7 @@ define(["dojo/_base/declare"], function (declare) {
},
handleRpcJson: function(transport) {
- const netalert_dijit = dijit.byId("net-alert");
- let netalert = false;
-
- if (netalert_dijit) netalert = netalert_dijit.domNode;
+ const netalert = $$("#toolbar .net-alert")[0];
try {
const reply = JSON.parse(transport.responseText);
@@ -239,17 +236,15 @@ define(["dojo/_base/declare"], function (declare) {
return reply;
} else {
- if (netalert)
- netalert.show();
- else
- Notify.error("Communication problem with server.");
+ if (netalert) netalert.show();
+
+ Notify.error("Communication problem with server.");
}
} catch (e) {
- if (netalert)
- netalert.show();
- else
- Notify.error("Communication problem with server.");
+ if (netalert) netalert.show();
+
+ Notify.error("Communication problem with server.");
console.error(e);
}
@@ -269,12 +264,10 @@ define(["dojo/_base/declare"], function (declare) {
}
if (k == "update_result") {
- const updatesIcon = dijit.byId("updatesIcon").domNode;
-
if (v) {
- Element.show(updatesIcon);
+ Element.show("updates-available");
} else {
- Element.hide(updatesIcon);
+ Element.hide("updates-available");
}
}