add missing getFilter function and improve hasFilter

This commit is contained in:
Damien Churchill 2010-04-26 01:33:15 +01:00
parent a47f9bc8dd
commit 3b1d038d2d
1 changed files with 5 additions and 8 deletions

View File

@ -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