summaryrefslogtreecommitdiff
path: root/js/AppBase.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-06 12:30:11 +0300
committerAndrew Dolgov <[email protected]>2018-12-06 12:30:11 +0300
commit0ea0b606be508cce11a7e776f4491db9332ae5c6 (patch)
tree30643331fa4cafa33ec3d4dd370cbc5be0a29719 /js/AppBase.js
parentf89ecda9b8509ef01787efa5d91fd49e49813d6d (diff)
rework net-alert to use iconfont, move it to toolbar start
Diffstat (limited to 'js/AppBase.js')
-rw-r--r--js/AppBase.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/js/AppBase.js b/js/AppBase.js
index 9ab2f507e..faad40348 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);
}