mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-09 17:18:33 +00:00
allow pressing enter in ObjectGrids to edit a field
for this we need to overwrite the 'run_editor' function of the ObjectGrid if we use a custom one Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5d3089cd94
commit
9307eda498
@ -224,6 +224,14 @@ Ext.define('Proxmox.grid.ObjectGrid', {
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
listeners: {
|
||||||
|
itemkeyup: function(view, record, item, index, e) {
|
||||||
|
if (e.getKey() === e.ENTER) {
|
||||||
|
this.run_editor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ Ext.define('Proxmox.node.DNSView', {
|
|||||||
url: "/api2/json/nodes/" + me.nodename + "/dns",
|
url: "/api2/json/nodes/" + me.nodename + "/dns",
|
||||||
cwidth1: 130,
|
cwidth1: 130,
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
|
run_editor: run_editor,
|
||||||
rows: {
|
rows: {
|
||||||
search: { header: 'Search domain', required: true },
|
search: { header: 'Search domain', required: true },
|
||||||
dns1: { header: gettext('DNS server') + " 1", required: true },
|
dns1: { header: gettext('DNS server') + " 1", required: true },
|
||||||
|
@ -26,6 +26,7 @@ Ext.define('Proxmox.node.TimeView', {
|
|||||||
url: "/api2/json/nodes/" + me.nodename + "/time",
|
url: "/api2/json/nodes/" + me.nodename + "/time",
|
||||||
cwidth1: 150,
|
cwidth1: 150,
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
|
run_editor: run_editor,
|
||||||
rows: {
|
rows: {
|
||||||
timezone: {
|
timezone: {
|
||||||
header: gettext('Time zone'),
|
header: gettext('Time zone'),
|
||||||
|
Loading…
Reference in New Issue
Block a user