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>
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() {
var rowdef = rows[rec.data.key];
return !!rowdef.editor;
},
- handler: me.run_editor
+ handler: function() { me.run_editor(); }
});
Ext.apply(me, {
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({
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({