prefs: move external filter tree onload method (which checks for inactive feeds, etc.) to FilterTree class
This commit is contained in:
parent
fc84712135
commit
dd983e5de1
|
@ -983,10 +983,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
dijit.byId('feedTree').editCategory(bare_id, item);
|
dijit.byId('feedTree').editCategory(bare_id, item);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="dojo/method" event="onLoad" args="item">
|
|
||||||
dijit.byId('feedTree').checkInactiveFeeds();
|
|
||||||
dijit.byId('feedTree').checkErrorFeeds();
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,16 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
||||||
function (declare, domConstruct, checkBoxTree, array, cookie) {
|
function (declare, domConstruct, checkBoxTree, array, cookie) {
|
||||||
|
|
||||||
return declare("fox.PrefFeedTree", lib.CheckBoxTree, {
|
return declare("fox.PrefFeedTree", lib.CheckBoxTree, {
|
||||||
|
postCreate: function() {
|
||||||
|
this.inherited(arguments);
|
||||||
|
|
||||||
|
const tmph = dojo.connect(this, 'onLoad', () => {
|
||||||
|
dojo.disconnect(tmph);
|
||||||
|
|
||||||
|
this.checkInactiveFeeds();
|
||||||
|
this.checkErrorFeeds();
|
||||||
|
});
|
||||||
|
},
|
||||||
// save state in localStorage instead of cookies
|
// save state in localStorage instead of cookies
|
||||||
// reference: https://stackoverflow.com/a/27968996
|
// reference: https://stackoverflow.com/a/27968996
|
||||||
_saveExpandedNodes: function(){
|
_saveExpandedNodes: function(){
|
||||||
|
|
Loading…
Reference in New Issue