1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:15:56 +00:00

rework net-alert to use iconfont, move it to toolbar start

This commit is contained in:
Andrew Dolgov
2018-12-06 12:30:11 +03:00
parent f89ecda9b8
commit 0ea0b606be
7 changed files with 24 additions and 19 deletions

View File

@@ -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);
}