Module: deluge
Branch: master
Commit: 3b1d038d2d0db94c976691ee34d1f6e816f7f516

Author: Damien Churchill <[email protected]>
Date:   Mon Apr 26 01:33:15 2010 +0100

add missing getFilter function and improve hasFilter

---

 deluge/ui/web/js/deluge-all/Sidebar.js |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/Sidebar.js 
b/deluge/ui/web/js/deluge-all/Sidebar.js
index 53b4cc9..e194a3d 100644
--- a/deluge/ui/web/js/deluge-all/Sidebar.js
+++ b/deluge/ui/web/js/deluge-all/Sidebar.js
@@ -87,6 +87,10 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
                this.fireEvent('afterfiltercreate', this, panel);
        },
 
+       getFilter: function(filter) {
+               return this.panels[filter];
+       },
+
        getFilterStates: function() {
                var states = {}
 
@@ -101,14 +105,7 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
        },
 
        hasFilter: function(filter) {
-               var has = false;
-               this.items.each(function(panel) {
-                       if (panel.filterType == filter) {
-                               has = true;
-                               return false;
-                       }
-               });
-               return has;
+               return (this.panels[filter]) ? true : false;
        },
 
        // private

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to