StdRemoveButton: enable by default if no selection model

As in that case we normally want it to be enabled from the start, as
no selection model is there and so we cannot wait until one item is
selected until we enable it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-04-18 19:26:18 +02:00
parent 842203fd0a
commit 8886099fa5

View File

@ -155,5 +155,16 @@ Ext.define('Proxmox.button.StdRemoveButton', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
},
initComponent: function() {
let me = this;
// enable by default if no seleModel is there and disabled not set
if (me.initialConfig.disabled === undefined
&& (me.selModel === null || me.selModel === false)) {
me.disabled = false;
}
me.callParent();
},
});