add missing getFilter function and improve hasFilter
This commit is contained in:
parent
a47f9bc8dd
commit
3b1d038d2d
|
@ -87,6 +87,10 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
|
||||||
this.fireEvent('afterfiltercreate', this, panel);
|
this.fireEvent('afterfiltercreate', this, panel);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getFilter: function(filter) {
|
||||||
|
return this.panels[filter];
|
||||||
|
},
|
||||||
|
|
||||||
getFilterStates: function() {
|
getFilterStates: function() {
|
||||||
var states = {}
|
var states = {}
|
||||||
|
|
||||||
|
@ -101,14 +105,7 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
|
||||||
},
|
},
|
||||||
|
|
||||||
hasFilter: function(filter) {
|
hasFilter: function(filter) {
|
||||||
var has = false;
|
return (this.panels[filter]) ? true : false;
|
||||||
this.items.each(function(panel) {
|
|
||||||
if (panel.filterType == filter) {
|
|
||||||
has = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return has;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// private
|
// private
|
||||||
|
|
Loading…
Reference in New Issue