mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-05 14:41:34 +00:00
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:
parent
842203fd0a
commit
8886099fa5
@ -155,5 +155,16 @@ Ext.define('Proxmox.button.StdRemoveButton', {
|
|||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
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();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user