mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
[WebUI] Sidebar: fix error for lazy init
When sidebar is hidden at WebUI startup, header isn't created yet. Signed-off-by: Xuefer H <xuefer@gmail.com> Closes: https://github.com/deluge-torrent/deluge/pull/419
This commit is contained in:
parent
d2a56ce15e
commit
a83ac65ab6
1 changed files with 10 additions and 8 deletions
|
@ -60,14 +60,16 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
|
||||||
this.doLayout();
|
this.doLayout();
|
||||||
this.panels[filter] = panel;
|
this.panels[filter] = panel;
|
||||||
|
|
||||||
panel.header.on('click', function (header) {
|
if (panel.header) {
|
||||||
if (!deluge.config.sidebar_multiple_filters) {
|
panel.header.on('click', function (header) {
|
||||||
deluge.ui.update();
|
if (!deluge.config.sidebar_multiple_filters) {
|
||||||
}
|
deluge.ui.update();
|
||||||
if (!panel.list.getSelectionCount()) {
|
}
|
||||||
panel.list.select(0);
|
if (!panel.list.getSelectionCount()) {
|
||||||
}
|
panel.list.select(0);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
this.fireEvent('filtercreate', this, panel);
|
this.fireEvent('filtercreate', this, panel);
|
||||||
|
|
||||||
panel.updateStates(states);
|
panel.updateStates(states);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue