Author: damoxc
Revision: 4908
Log:
fix clearing the sidebar so filters can be re-added after a reconnect
Diff:
Modified: trunk/deluge/ui/web/js/deluge-bars.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-bars.js 2009-03-21 11:21:05 UTC (rev
4907)
+++ trunk/deluge/ui/web/js/deluge-bars.js 2009-03-21 11:49:43 UTC (rev
4908)
@@ -338,10 +338,11 @@
},
onDisconnect: function() {
- this.Bar.items.each(function(panel) {
- panel.destroy();
- });
+ this.panels.getKeys().each(function(el) {
+ this.Bar.remove(el + '-panel');
+ }, this);
this.panels.empty();
+ this.selected = null;
},
renderer: function(value, p, r) {
@@ -411,6 +412,7 @@
});
var panel = new Ext.grid.GridPanel({
+ id: filter + '-panel',
store: store,
title: title,
cls: 'x-deluge-filters',
@@ -432,7 +434,9 @@
});
store.loadData(states);
this.Bar.add(panel);
+
this.Bar.doLayout();
+ this.panels[filter] = panel;
if (!this.selected) {
panel.getSelectionModel().selectFirstRow();
@@ -442,8 +446,6 @@
panel: panel
}
}
-
- this.panels[filter] = panel;
},
onSelect: function(selModel, rowIndex, record) {
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---