]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - node/TimeEdit.js
add TimeView, TimeEdit and TaskViewer
[proxmox-widget-toolkit.git] / node / TimeEdit.js
1 Ext.define('Proxmox.node.TimeEdit', {
2 extend: 'Proxmox.window.Edit',
3 alias: ['widget.proxmoxNodeTimeEdit'],
4
5 initComponent : function() {
6 var me = this;
7
8 if (!me.nodename) {
9 throw "no node name specified";
10 }
11
12 Ext.applyIf(me, {
13 subject: gettext('Time zone'),
14 url: "/api2/extjs/nodes/" + me.nodename + "/time",
15 fieldDefaults: {
16 labelWidth: 70
17 },
18 width: 400,
19 items: {
20 xtype: 'combo',
21 fieldLabel: gettext('Time zone'),
22 name: 'timezone',
23 queryMode: 'local',
24 store: Ext.create('Proxmox.data.TimezoneStore'),
25 valueField: 'zone',
26 displayField: 'zone',
27 triggerAction: 'all',
28 forceSelection: true,
29 editable: false,
30 allowBlank: false
31 }
32 });
33
34 me.callParent();
35
36 me.load();
37 }
38 });