]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - grid/ObjectGrid.js
window/Edit: accept bodyPadding from config
[proxmox-widget-toolkit.git] / grid / ObjectGrid.js
index 68937ceab58b495d138d203b26c1ed931a1f5421..fd44821d006f38b1efbe6dc1d3d288d6ada77357 100644 (file)
@@ -38,6 +38,7 @@ Ext.define('Proxmox.grid.ObjectGrid', {
            editor: {
                xtype: 'proxmoxWindowEdit',
                subject: text,
+               onlineHelp: opts.onlineHelp,
                fieldDefaults: {
                    labelWidth: opts.labelWidth || 100
                },
@@ -70,6 +71,7 @@ Ext.define('Proxmox.grid.ObjectGrid', {
            editor: {
                xtype: 'proxmoxWindowEdit',
                subject: text,
+               onlineHelp: opts.onlineHelp,
                fieldDefaults: {
                    labelWidth: opts.labelWidth || 100
                },
@@ -101,6 +103,7 @@ Ext.define('Proxmox.grid.ObjectGrid', {
            editor: {
                xtype: 'proxmoxWindowEdit',
                subject: text,
+               onlineHelp: opts.onlineHelp,
                fieldDefaults: {
                    labelWidth: opts.labelWidth || 100
                },
@@ -133,6 +136,7 @@ Ext.define('Proxmox.grid.ObjectGrid', {
            editor: {
                xtype: 'proxmoxWindowEdit',
                subject: text,
+               onlineHelp: opts.onlineHelp,
                fieldDefaults: {
                    labelWidth: opts.labelWidth || 100
                },
@@ -225,10 +229,17 @@ Ext.define('Proxmox.grid.ObjectGrid', {
     },
 
     listeners: {
-       itemkeyup: function(view, record, item, index, e) {
+       itemkeydown: function(view, record, item, index, e) {
            if (e.getKey() === e.ENTER) {
+               this.pressedIndex = index;
+           }
+       },
+       itemkeyup: function(view, record, item, index, e) {
+           if (e.getKey() === e.ENTER && index == this.pressedIndex) {
                this.run_editor();
            }
+
+           this.pressedIndex = undefined;
        }
     },