1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 19:35:55 +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

@@ -96,7 +96,8 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
};
xhrPost("backend.php", query, () => {
dijit.byId("filterTree").reload(); // maybe there's labels in there
const tree = dijit.byId("filterTree");
if (tree) tree.reload(); // maybe there's labels in there
});
},
@@ -111,7 +112,8 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
this.hide();
xhrPost("backend.php", this.attr('value'), () => {
dijit.byId("filterTree").reload(); // maybe there's labels in there
const tree = dijit.byId("filterTree");
if (tree) tree.reload(); // maybe there's labels in there
});
}
},