]> git.proxmox.com Git - pmg-gui.git/commitdiff
MailProxyOptions: new class
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 24 Feb 2017 10:08:35 +0000 (11:08 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 24 Feb 2017 10:08:35 +0000 (11:08 +0100)
js/MailProxyConfiguration.js
js/MailProxyOptions.js [new file with mode: 0644]
js/Makefile

index a5ce8bc38fb256c49012af5eef80d318fdd35679..563941923395d89b7d75623fa1139f8b9663de4c 100644 (file)
@@ -15,7 +15,7 @@ Ext.define('PMG.MailProxyConfiguration', {
        },
        {
             title: gettext('Options'),
-           html: "Options"
+           xtype: 'pmgMailProxyOptions'
        },
        {
             title: gettext('Transports'),
diff --git a/js/MailProxyOptions.js b/js/MailProxyOptions.js
new file mode 100644 (file)
index 0000000..f765720
--- /dev/null
@@ -0,0 +1,46 @@
+Ext.define('PMG.MailProxyOptions', {
+    extend: 'Proxmox.grid.ObjectGrid',
+    alias: ['widget.pmgMailProxyOptions'],
+
+    initComponent : function() {
+       var me = this;
+
+       var rows = {
+           banner: {
+               required: true,
+               defaultValue: 'ESMTP Proxmox',
+               header: gettext('SMTPD Banner'),
+               editor: {
+                   xtype: 'proxmoxWindowEdit',
+                   subject: gettext('SMTPD Banner'),
+                   items: {
+                       xtype: 'proxmoxtextfield',
+                       name: 'banner',
+                       deleteEmpty: true,
+                       fieldLabel: gettext('SMTPD Banner')
+                   }
+               }
+           },
+       };
+
+       var baseurl = '/config/mail';
+
+       Ext.apply(me, {
+           url: '/api2/json' + baseurl,
+           editorConfig: {
+               url: '/api2/extjs' + baseurl,
+           },
+           interval: 5000,
+           cwidth1: 200,
+           rows: rows,
+           listeners: {
+               itemdblclick: me.run_editor
+           }
+       });
+
+       me.callParent();
+
+       me.on('activate', me.rstore.startUpdate);
+       me.on('destroy', me.rstore.stopUpdate);
+    }
+});
index 4b10023f96fa8008daea7761a3f30d4ce3161301..41c0f63a56266d9c6971372b6c6c6dd59162a865 100644 (file)
@@ -6,6 +6,7 @@ JSSRC=                                                  \
        SystemConfiguration.js                          \
        MailProxyRelaying.js                            \
        MailProxyPorts.js                               \
+       MailProxyOptions.js                             \
        MailProxyConfiguration.js                       \
        ConfigPanel.js                                  \
        Workspace.js