]>
git.proxmox.com Git - pmg-gui.git/blob - js/MailProxyRelaying.js
1 Ext
.define('PMG.MailProxyRelaying', {
2 extend
: 'Proxmox.grid.ObjectGrid',
3 alias
: ['widget.pmgMailProxyRelaying'],
5 initComponent : function() {
11 defaultValue
: Proxmox
.Utils
.noneText
,
12 header
: gettext('Default Relay'),
14 xtype
: 'proxmoxWindowEdit',
15 subject
: gettext('Default Relay'),
17 xtype
: 'proxmoxtextfield',
20 fieldLabel
: gettext('Default Relay')
27 header
: gettext('SMTP port'),
29 xtype
: 'proxmoxWindowEdit',
30 subject
: gettext('SMTP port'),
32 xtype
: 'proxmoxintegerfield',
38 fieldLabel
: gettext('SMTP port')
45 header
: gettext('Disable MX lookup'),
46 renderer
: Proxmox
.Utils
.format_boolean
,
48 xtype
: 'proxmoxWindowEdit',
49 subject
: gettext('Disable MX lookup'),
51 xtype
: 'proxmoxcheckbox',
55 deleteDefaultValue
: true,
56 fieldLabel
: gettext('Disable MX lookup')
62 defaultValue
: Proxmox
.Utils
.noneText
,
63 header
: gettext('Smarthost'),
65 xtype
: 'proxmoxWindowEdit',
66 subject
: gettext('Smarthost'),
68 xtype
: 'proxmoxtextfield',
71 fieldLabel
: gettext('Smarthost')
78 var baseurl
= '/config/mail';
80 var reload = function() {
84 var run_editor = function() {
85 var sm
= me
.getSelectionModel();
86 var rec
= sm
.getSelection()[0];
91 var rowdef
= rows
[rec
.data
.key
];
97 if (Ext
.isString(rowdef
.editor
)) {
98 win
= Ext
.create(rowdef
.editor
, {
99 pveSelNode
: me
.pveSelNode
,
100 confid
: rec
.data
.key
,
101 url
: '/api2/extjs/' + baseurl
104 var config
= Ext
.apply({
105 pveSelNode
: me
.pveSelNode
,
106 confid
: rec
.data
.key
,
107 url
: '/api2/extjs/' + baseurl
109 win
= Ext
.createWidget(rowdef
.editor
.xtype
, config
);
114 win
.on('destroy', reload
);
118 url
: '/api2/json/' + baseurl
,
121 //tbar: [ edit_btn, revert_btn ],
124 itemdblclick
: run_editor
125 //selectionchange: set_button_status
131 me
.on('activate', me
.rstore
.startUpdate
);
132 me
.on('destroy', me
.rstore
.stopUpdate
);
134 //me.rstore.on('datachanged', function() {
135 //set_button_status();