]>
Commit | Line | Data |
---|---|---|
7bf889cb DM |
1 | Ext.define('PMG.MailProxyPorts', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pmgMailProxyPorts'], | |
4 | ||
98d2cb7f DM |
5 | url: '/api2/json/config/mail', |
6 | ||
5e453db7 DM |
7 | monStoreErrors: true, |
8 | ||
98d2cb7f | 9 | editorConfig: { |
573a6e8b SI |
10 | url: '/api2/extjs/config/mail', |
11 | onlineHelp: 'pmgconfig_mailproxy_ports' | |
98d2cb7f DM |
12 | }, |
13 | ||
14 | interval: 5000, | |
15 | ||
16 | cwidth1: 200, | |
17 | ||
18 | controller: { | |
19 | ||
20 | xclass: 'Ext.app.ViewController', | |
21 | ||
22 | onEdit: function() { | |
23 | this.getView().run_editor(); | |
24 | } | |
25 | }, | |
26 | ||
27 | listeners: { | |
771bd0b9 | 28 | itemdblclick: 'onEdit' |
98d2cb7f DM |
29 | }, |
30 | ||
31 | tbar: [ | |
32 | { | |
33 | text: gettext('Edit'), | |
34 | xtype: 'proxmoxButton', | |
35 | disabled: true, | |
36 | handler: 'onEdit' | |
37 | } | |
38 | ], | |
39 | ||
7bf889cb DM |
40 | initComponent : function() { |
41 | var me = this; | |
42 | ||
4fad6a19 | 43 | me.add_integer_row('ext_port', gettext('External SMTP Port'), |
957ba04a | 44 | { defaultValue: 25, deleteEmpty: true, |
4fad6a19 DM |
45 | minValue: 1, maxValue: 65535 }); |
46 | ||
47 | me.add_integer_row('int_port', gettext('Internal SMTP Port'), | |
957ba04a | 48 | { defaultValue: 26, deleteEmpty: true, |
4fad6a19 | 49 | minValue: 1, maxValue: 65535 }); |
7bf889cb | 50 | |
7bf889cb DM |
51 | me.callParent(); |
52 | ||
00564597 | 53 | me.on('activate', me.rstore.startUpdate); |
7bf889cb | 54 | me.on('destroy', me.rstore.stopUpdate); |
00564597 | 55 | me.on('deactivate', me.rstore.stopUpdate); |
7bf889cb DM |
56 | } |
57 | }); |