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

* filters: remove duplicate code, overall cleanup

* check if some tres exist before trying to reload them
This commit is contained in:
Andrew Dolgov
2021-02-12 14:31:36 +03:00
parent 699186f430
commit 8f8675a26a
7 changed files with 256 additions and 441 deletions

View File

@@ -297,7 +297,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", query, () => {
dialog.hide();
dijit.byId("feedTree").reload();
const tree = dijit.byId("feedTree");
if (tree) tree.reload();
});
}
},
@@ -351,7 +354,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", this.attr('value'), () => {
Notify.close();
dijit.byId("feedTree").reload();
const tree = dijit.byId("feedTree");
if (tree) tree.reload();
dialog.hide();
});
}
@@ -387,7 +393,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", query, () => {
Notify.close();
dijit.byId("feedTree").reload();
const tree = dijit.byId("feedTree");
if (tree) tree.reload();
dialog.hide();
});
}