fix edit button for some panels
when using the 'run_editor' function provided by the ObjectGrid, we have to make sure the function runs in the context of the grid, not in that of the button, else we cannot access the selectionModel/rows/etc. of the grid this happened with the switch to the widget toolkit Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b6450910ce
commit
8cd96756d3
@ -116,7 +116,7 @@ Ext.define('PVE.FirewallOptions', {
|
||||
var edit_btn = new Ext.Button({
|
||||
text: gettext('Edit'),
|
||||
disabled: true,
|
||||
handler: me.run_editor
|
||||
handler: function() { me.run_editor(); }
|
||||
});
|
||||
|
||||
var set_button_status = function() {
|
||||
|
@ -149,7 +149,7 @@ Ext.define('PVE.lxc.Options', {
|
||||
var rowdef = rows[rec.data.key];
|
||||
return !!rowdef.editor;
|
||||
},
|
||||
handler: me.run_editor
|
||||
handler: function() { me.run_editor(); }
|
||||
});
|
||||
|
||||
Ext.apply(me, {
|
||||
|
@ -154,7 +154,7 @@ Ext.define('PVE.lxc.RessourceView', {
|
||||
var rowdef = rows[rec.data.key];
|
||||
return !!rowdef.editor;
|
||||
},
|
||||
handler: me.run_editor
|
||||
handler: function() { me.run_editor(); }
|
||||
});
|
||||
|
||||
var resize_btn = new Proxmox.button.Button({
|
||||
|
@ -304,7 +304,7 @@ Ext.define('PVE.qemu.Options', {
|
||||
var edit_btn = new Ext.Button({
|
||||
text: gettext('Edit'),
|
||||
disabled: true,
|
||||
handler: me.run_editor
|
||||
handler: function() { me.run_editor(); }
|
||||
});
|
||||
|
||||
var revert_btn = new Proxmox.button.Button({
|
||||
|
Loading…
x
Reference in New Issue
Block a user