]>
Commit | Line | Data |
---|---|---|
ff735274 | 1 | /*global Proxmox*/ |
34c3efce DM |
2 | Ext.define('PMG.MailProxyRelaying', { |
3 | extend: 'Proxmox.grid.ObjectGrid', | |
4 | alias: ['widget.pmgMailProxyRelaying'], | |
5 | ||
5e453db7 DM |
6 | monStoreErrors: true, |
7 | ||
34c3efce DM |
8 | initComponent : function() { |
9 | var me = this; | |
10 | ||
5e72b93c | 11 | me.add_text_row('relay', gettext('Default Relay'), |
6ccd0a47 | 12 | { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText }); |
dae26b95 DM |
13 | |
14 | me.add_integer_row('relayport', gettext('SMTP Port'), | |
15 | { defaultValue: 25, deleteEmpty: true, | |
16 | minValue: 1, maxValue: 65535 }); | |
34c3efce | 17 | |
5e72b93c | 18 | me.add_boolean_row('relaynomx', gettext('Disable MX lookup')); |
dae26b95 | 19 | |
5e72b93c | 20 | me.add_text_row('smarthost', gettext('Smarthost'), |
6ccd0a47 | 21 | { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText }); |
34c3efce DM |
22 | |
23 | var baseurl = '/config/mail'; | |
24 | ||
d80ddaf7 DM |
25 | me.selModel = Ext.create('Ext.selection.RowModel', {}); |
26 | ||
34c3efce | 27 | Ext.apply(me, { |
d80ddaf7 DM |
28 | tbar: [{ |
29 | text: gettext('Edit'), | |
30 | xtype: 'proxmoxButton', | |
31 | disabled: true, | |
131ba4f6 | 32 | handler: function() { me.run_editor(); }, |
d80ddaf7 DM |
33 | selModel: me.selModel |
34 | }], | |
7bf889cb DM |
35 | url: '/api2/json' + baseurl, |
36 | editorConfig: { | |
771bd0b9 | 37 | url: '/api2/extjs' + baseurl |
7bf889cb | 38 | }, |
34c3efce | 39 | interval: 5000, |
7c876e16 | 40 | cwidth1: 200, |
34c3efce | 41 | listeners: { |
7bf889cb | 42 | itemdblclick: me.run_editor |
34c3efce DM |
43 | } |
44 | }); | |
45 | ||
46 | me.callParent(); | |
47 | ||
48 | me.on('activate', me.rstore.startUpdate); | |
49 | me.on('destroy', me.rstore.stopUpdate); | |
00564597 | 50 | me.on('deactivate', me.rstore.stopUpdate); |
34c3efce DM |
51 | } |
52 | }); |