From a08a4a4e69c7f97519b4a8f0cbaea2cbc7040fd8 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 20 Mar 2009 09:22:57 +0000 Subject: [PATCH] implement updating the filters --- deluge/ui/web/js/deluge-bars.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/deluge/ui/web/js/deluge-bars.js b/deluge/ui/web/js/deluge-bars.js index 2573883a8..5393cd676 100644 --- a/deluge/ui/web/js/deluge-bars.js +++ b/deluge/ui/web/js/deluge-bars.js @@ -357,11 +357,18 @@ Deluge.SideBar = { update: function(filters) { $each(filters, function(states, filter) { if (this.panels.has(filter)) { - + this.updateFilter(filter, states); } else { this.createFilter(filter, states); } }, this); + + // Perform a cleanup of fitlers that aren't enabled + $each(this.panels.getKeys(), function(filter) { + if (!fitlers.has(filter)) { + // We need to remove the panel + } + }); }, createFilter: function(filter, states) { @@ -405,7 +412,7 @@ Deluge.SideBar = { }, updateFilter: function(filter, states) { - + this.panels[filter].store.loadData(states); } };