ui: nav tree: make datastore-add button less special cased

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-04-12 14:10:57 +02:00
parent 94b7f56e65
commit bc42bb3c6e

View 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);
}
});