]> git.proxmox.com Git - pmg-gui.git/blame - js/MailProxyPorts.js
cleanup, add MailProxyPorts
[pmg-gui.git] / js / MailProxyPorts.js
CommitLineData
7bf889cb
DM
1Ext.define('PMG.MailProxyPorts', {
2 extend: 'Proxmox.grid.ObjectGrid',
3 alias: ['widget.pmgMailProxyPorts'],
4
5 initComponent : function() {
6 var me = this;
7
8 var rows = {
9 ext_port: {
10 required: true,
11 defaultValue: 26,
12 header: gettext('External SMTP Port'),
13 editor: {
14 xtype: 'proxmoxWindowEdit',
15 subject: gettext('External SMTP Port'),
16 items: {
17 xtype: 'proxmoxintegerfield',
18 name: 'ext_port',
19 minValue: 1,
20 maxValue: 65535,
21 deleteEmpty: true,
22 value: 26,
23 labelWidth: 150,
24 fieldLabel: gettext('External SMTP Port')
25 }
26 }
27 },
28 int_port: {
29 required: true,
30 defaultValue: 25,
31 header: gettext('Internal SMTP Port'),
32 editor: {
33 xtype: 'proxmoxWindowEdit',
34 subject: gettext('Internal SMTP Port'),
35 items: {
36 xtype: 'proxmoxintegerfield',
37 name: 'int_port',
38 minValue: 1,
39 maxValue: 65535,
40 deleteEmpty: true,
41 value: 25,
42 labelWidth: 150,
43 fieldLabel: gettext('Internal SMTP Port')
44 }
45 }
46 }
47 };
48
49 var baseurl = '/config/mail';
50
51 Ext.apply(me, {
52 url: '/api2/json' + baseurl,
53 editorConfig: {
54 url: '/api2/extjs' + baseurl,
55 },
56 interval: 5000,
57 cwidth1: 200,
58 rows: rows,
59 listeners: {
60 itemdblclick: me.run_editor
61 }
62 });
63
64 me.callParent();
65
66 me.on('activate', me.rstore.startUpdate);
67 me.on('destroy', me.rstore.stopUpdate);
68 }
69});