]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
fix edit button for some panels
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 7 Feb 2018 09:11:22 +0000 (10:11 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Wed, 7 Feb 2018 09:39:57 +0000 (10:39 +0100)
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>
www/manager6/grid/FirewallOptions.js
www/manager6/lxc/Options.js
www/manager6/lxc/Resources.js
www/manager6/qemu/Options.js

index 87f6790c566dacdb1bdbe912290f32796f7eefdb..819ebb8d480f2cefb7e6e3acc05a3771d60b7fb8 100644 (file)
@@ -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() {
index 0633f9f1241693365307b9818662dcdbc4c1f020..3a9959fed2b45a65bd6b838a33d62a285f4f9d99 100644 (file)
@@ -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, {
index 58482779c00f81e0d46835e5918cefd9be216803..d2835a27ed00d9ba48f9b39b773052b1320f89b2 100644 (file)
@@ -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({
index 5b8b5dc44cf28856719429f9bdea420d20d8849e..6f0b25110ea6953f0c2dab60b42abf36f483ae75 100644 (file)
@@ -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({