filter-tree: move external dojo/method to PrefFilterTree class
This commit is contained in:
parent
082b3386e9
commit
6436dd16f9
|
@ -703,14 +703,6 @@ class Pref_Filters extends Handler_Protected {
|
||||||
</div>
|
</div>
|
||||||
<div dojoType="fox.PrefFilterTree" id="filterTree" dndController="dijit.tree.dndSource"
|
<div dojoType="fox.PrefFilterTree" id="filterTree" dndController="dijit.tree.dndSource"
|
||||||
betweenThreshold="5" model="filterModel" openOnClick="true">
|
betweenThreshold="5" model="filterModel" openOnClick="true">
|
||||||
<script type="dojo/method" event="onClick" args="item">
|
|
||||||
var id = String(item.id);
|
|
||||||
var bare_id = id.substr(id.indexOf(':')+1);
|
|
||||||
|
|
||||||
if (id.match('FILTER:')) {
|
|
||||||
Filters.edit(bare_id);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefFilters") ?>
|
<?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefFilters") ?>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable prefer-rest-params */
|
/* 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) {
|
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(
|
dijit.byId('filterTree').hideOrShowFilterRules(
|
||||||
parseInt(localStorage.getItem("ttrss:hide-filter-rules"))
|
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) {
|
_createTreeNode: function(args) {
|
||||||
const tnode = this.inherited(arguments);
|
const tnode = this.inherited(arguments);
|
||||||
|
|
Loading…
Reference in New Issue