diff options
author | Andrew Dolgov <[email protected]> | 2022-06-06 09:29:16 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-06-06 09:29:16 +0300 |
commit | 6436dd16f94415dc120e2d563c0f480f1f002183 (patch) | |
tree | aadda11928131bb30e98d3f0be913dda499ed371 /js/PrefFilterTree.js | |
parent | 082b3386e9a1b3534e29c3fb5b28958582ed3703 (diff) |
filter-tree: move external dojo/method to PrefFilterTree class
Diffstat (limited to 'js/PrefFilterTree.js')
-rw-r--r-- | js/PrefFilterTree.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js index d4496b647..149261abd 100644 --- a/js/PrefFilterTree.js +++ b/js/PrefFilterTree.js @@ -1,5 +1,5 @@ /* eslint-disable prefer-rest-params */ -/* global __, define, lib, dijit, dojo, xhr, App, Notify */ +/* global __, define, lib, dijit, dojo, xhr, App, Notify, Filters */ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], function (declare, domConstruct) { @@ -10,6 +10,15 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio dijit.byId('filterTree').hideOrShowFilterRules( parseInt(localStorage.getItem("ttrss:hide-filter-rules")) ); + + dojo.connect(this, 'onClick', (item) => { + const id = String(item.id); + const bare_id = id.substr(id.indexOf(':')+1); + + if (id.match('FILTER:')) { + Filters.edit(bare_id); + } + }); }, _createTreeNode: function(args) { const tnode = this.inherited(arguments); |