mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
fix clearing panels on a log out
This commit is contained in:
parent
d5b7616f98
commit
504f2470ba
2 changed files with 11 additions and 12 deletions
|
@ -45,7 +45,6 @@ Deluge.ToolBar = {
|
||||||
|
|
||||||
onLogin: function() {
|
onLogin: function() {
|
||||||
this.Bar.items.get('logout').enable();
|
this.Bar.items.get('logout').enable();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLogout: function() {
|
onLogout: function() {
|
||||||
|
@ -334,12 +333,15 @@ Deluge.SideBar = {
|
||||||
|
|
||||||
onRender: function(bar) {
|
onRender: function(bar) {
|
||||||
this.Bar = bar;
|
this.Bar = bar;
|
||||||
Deluge.Events.on("disconnect", this.onDisconnect);
|
Deluge.Events.on("disconnect", this.onDisconnect.bindWithEvent(this));
|
||||||
this.selected = null;
|
this.selected = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDisconnect: function() {
|
onDisconnect: function() {
|
||||||
|
this.Bar.items.each(function(panel) {
|
||||||
|
panel.destroy();
|
||||||
|
});
|
||||||
|
this.panels.empty();
|
||||||
},
|
},
|
||||||
|
|
||||||
renderer: function(value, p, r) {
|
renderer: function(value, p, r) {
|
||||||
|
|
|
@ -27,6 +27,11 @@ Deluge.Connections = {
|
||||||
},
|
},
|
||||||
|
|
||||||
loginShow: function() {
|
loginShow: function() {
|
||||||
|
Deluge.Events.on('logout', function(e) {
|
||||||
|
Deluge.Connections.disconnect();
|
||||||
|
Deluge.Connections.Window.hide();
|
||||||
|
});
|
||||||
|
|
||||||
Deluge.Client.web.connected({
|
Deluge.Client.web.connected({
|
||||||
onSuccess: function(connected) {
|
onSuccess: function(connected) {
|
||||||
if (connected) {
|
if (connected) {
|
||||||
|
@ -69,13 +74,6 @@ Deluge.Connections = {
|
||||||
selection.selectRow(Deluge.Connections.selectedRow);
|
selection.selectRow(Deluge.Connections.selectedRow);
|
||||||
},
|
},
|
||||||
|
|
||||||
onRender: function() {
|
|
||||||
Deluge.Events.on('logout', function(e) {
|
|
||||||
Deluge.Connections.disconnect();
|
|
||||||
Deluge.Connections.Window.hide();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onSelect: function(selModel, rowIndex, record) {
|
onSelect: function(selModel, rowIndex, record) {
|
||||||
Deluge.Connections.selectedRow = rowIndex;
|
Deluge.Connections.selectedRow = rowIndex;
|
||||||
},
|
},
|
||||||
|
@ -186,7 +184,6 @@ Deluge.Connections.Window = new Ext.Window({
|
||||||
}],
|
}],
|
||||||
listeners: {
|
listeners: {
|
||||||
'hide': Deluge.Connections.onClose,
|
'hide': Deluge.Connections.onClose,
|
||||||
'show': Deluge.Connections.onShow,
|
'show': Deluge.Connections.onShow
|
||||||
'render': Deluge.Connections.onRender
|
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue