ui: file browser: expand child node if only one archive present
Get the first visible node through the Ext.data.NodeInterface defined "firstChild" element and expand that if there's only one archive present. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2f050cf2ed
commit
4bd789b0fa
@ -142,8 +142,13 @@ Ext.define("PBS.window.FileBrowser", {
|
|||||||
'backup-type': view['backup-type'],
|
'backup-type': view['backup-type'],
|
||||||
'backup-time': view['backup-time'],
|
'backup-time': view['backup-time'],
|
||||||
});
|
});
|
||||||
store.load();
|
store.load(() => {
|
||||||
store.getRoot().expand();
|
let root = store.getRoot();
|
||||||
|
root.expand(); // always expand invisible root node
|
||||||
|
if (root.childNodes.length === 1) {
|
||||||
|
root.firstChild.expand();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
control: {
|
control: {
|
||||||
|
Loading…
Reference in New Issue
Block a user