]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: nav tree: make datastore-add button less special cased
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 12:10:57 +0000 (14:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 13:55:58 +0000 (15:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/NavigationTree.js

index 98c3a847806999b1e5941ccb404f777200d483fb..0b179d9d871e3992360372633dc19523a2232c6a 100644 (file)
@@ -101,6 +101,7 @@ Ext.define('PBS.store.NavigationStore', {
                        iconCls: 'fa fa-plus-circle',
                        leaf: true,
                        id: 'addbutton',
+                       virtualEntry: true,
                    },
                ],
            },
@@ -230,7 +231,7 @@ Ext.define('PBS.view.main.NavigationTree', {
            // remove entries which are not existing anymore
            let toRemove = [];
            list.eachChild(child => {
-               if (!existingChildren[child.data.text] && child.data.id !== 'addbutton') {
+               if (!existingChildren[child.data.text] && !child.data.virtualEntry) {
                    toRemove.push(child);
                }
            });