mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-09 17:18:33 +00:00
button/Button.js: do not sreach for selection model if selModel === null
For Buttons which needs to trigger when nothing is selected.
This commit is contained in:
parent
7d9225e651
commit
6a42adffda
@ -63,18 +63,20 @@ Ext.define('Proxmox.button.Button', {
|
||||
|
||||
me.callParent();
|
||||
|
||||
if (!me.selModel) {
|
||||
if (!me.selModel && me.selModel !== null) {
|
||||
var grid = me.up('grid');
|
||||
if (grid && grid.selModel) {
|
||||
me.selModel = grid.selModel;
|
||||
if (me.waitMsgTarget === true) {
|
||||
me.waitMsgTarget = grid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (me.waitMsgTarget === true) {
|
||||
throw "unable to find waitMsgTarget"; // no grid found
|
||||
var grid = me.up('grid');
|
||||
if (grid) {
|
||||
me.waitMsgTarget = grid;
|
||||
} else {
|
||||
throw "unable to find waitMsgTarget";
|
||||
}
|
||||
}
|
||||
|
||||
if (me.selModel) {
|
||||
|
Loading…
Reference in New Issue
Block a user