mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-09 21:13:08 +00:00
TimeEdit: use schematic declaration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
5106364829
commit
bf49d2da0f
@ -2,37 +2,36 @@ Ext.define('Proxmox.node.TimeEdit', {
|
|||||||
extend: 'Proxmox.window.Edit',
|
extend: 'Proxmox.window.Edit',
|
||||||
alias: ['widget.proxmoxNodeTimeEdit'],
|
alias: ['widget.proxmoxNodeTimeEdit'],
|
||||||
|
|
||||||
|
subject: gettext('Time zone'),
|
||||||
|
|
||||||
|
width: 400,
|
||||||
|
|
||||||
|
autoLoad: true,
|
||||||
|
|
||||||
|
fieldDefaults: {
|
||||||
|
labelWidth: 70
|
||||||
|
},
|
||||||
|
|
||||||
|
items: {
|
||||||
|
xtype: 'combo',
|
||||||
|
fieldLabel: gettext('Time zone'),
|
||||||
|
name: 'timezone',
|
||||||
|
queryMode: 'local',
|
||||||
|
store: Ext.create('Proxmox.data.TimezoneStore'),
|
||||||
|
displayField: 'zone',
|
||||||
|
forceSelection: true,
|
||||||
|
editable: false,
|
||||||
|
allowBlank: false
|
||||||
|
},
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
if (!me.nodename) {
|
if (!me.nodename) {
|
||||||
throw "no node name specified";
|
throw "no node name specified";
|
||||||
}
|
}
|
||||||
|
me.url = "/api2/extjs/nodes/" + me.nodename + "/time";
|
||||||
Ext.applyIf(me, {
|
|
||||||
subject: gettext('Time zone'),
|
|
||||||
url: "/api2/extjs/nodes/" + me.nodename + "/time",
|
|
||||||
fieldDefaults: {
|
|
||||||
labelWidth: 70
|
|
||||||
},
|
|
||||||
width: 400,
|
|
||||||
items: {
|
|
||||||
xtype: 'combo',
|
|
||||||
fieldLabel: gettext('Time zone'),
|
|
||||||
name: 'timezone',
|
|
||||||
queryMode: 'local',
|
|
||||||
store: Ext.create('Proxmox.data.TimezoneStore'),
|
|
||||||
valueField: 'zone',
|
|
||||||
displayField: 'zone',
|
|
||||||
triggerAction: 'all',
|
|
||||||
forceSelection: true,
|
|
||||||
editable: false,
|
|
||||||
allowBlank: false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
|
||||||
me.load();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user