From 0ea0b606be508cce11a7e776f4491db9332ae5c6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 6 Dec 2018 12:30:11 +0300 Subject: rework net-alert to use iconfont, move it to toolbar start --- js/AppBase.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'js/AppBase.js') 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); } -- cgit v1.2.3-54-g00ecf