]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/AttachmentQuarantine.js
fix #4818: Revert "UserEdit: add minLength of 4 to username field"
[pmg-gui.git] / js / AttachmentQuarantine.js
index 8abfcad4f0977cffba25d5f2ab5933b07a383dbd..52bda4c6668e3da0df93be59e8a2aa4d47bb52c7 100644 (file)
@@ -18,34 +18,6 @@ Ext.define('pmg-attachment-list', {
     idProperty: 'id',
 });
 
-Ext.define('PMG.AttachmentQuarantineController', {
-    extend: 'PMG.controller.QuarantineController',
-    alias: 'controller.attachmentquarantine',
-    xtype: 'pmgAttachmentQuarantineController',
-
-    onSelectMail: function() {
-       let me = this;
-       let list = this.lookupReference('list');
-       let selection = list.selModel.getSelection();
-       if (selection.length <= 1) {
-           let rec = selection[0] || {};
-           me.lookup('attachmentlist').setID(rec);
-       }
-
-       me.callParent();
-    },
-
-    control: {
-       'button[reference=raw]': {
-           click: 'toggleRaw',
-       },
-       'pmgQuarantineList': {
-           selectionChange: 'onSelectMail',
-       },
-    },
-
-});
-
 Ext.define('PMG.AttachmentQuarantine', {
     extend: 'Ext.container.Container',
     xtype: 'pmgAttachmentQuarantine',
@@ -64,14 +36,14 @@ Ext.define('PMG.AttachmentQuarantine', {
            downloadMailURL: get => '/api2/json/quarantine/download?mailid=' + encodeURIComponent(get('mailid')),
        },
     },
-    controller: 'attachmentquarantine',
+    controller: 'quarantine',
     items: [
        {
            title: gettext('Attachment Quarantine'),
            xtype: 'pmgQuarantineList',
            emptyText: gettext('No data in database'),
            selModel: 'checkboxmodel',
-           emailSelection: false,
+           quarantineType: 'attachment',
            reference: 'list',
            region: 'west',
            width: 500,
@@ -125,6 +97,7 @@ Ext.define('PMG.AttachmentQuarantine', {
            dockedItems: [
                {
                    xtype: 'toolbar',
+                   overflowHandler: 'scroller',
                    dock: 'top',
                    items: [
                        {
@@ -134,6 +107,17 @@ Ext.define('PMG.AttachmentQuarantine', {
                            enableToggle: true,
                            iconCls: 'fa fa-file-code-o',
                        },
+                       {
+                           xtype: 'tbseparator',
+                           reference: 'themeCheckSep',
+                       },
+                       {
+                           xtype: 'proxmoxcheckbox',
+                           reference: 'themeCheck',
+                           checked: true,
+                           boxLabel: gettext('Dark-mode filter'),
+                           iconCls: 'fa fa-paint-brush',
+                       },
                        '->',
                        {
                            xtype: 'button',
@@ -162,18 +146,17 @@ Ext.define('PMG.AttachmentQuarantine', {
                        },
                    ],
                },
-               {
-                   xtype: 'pmgAttachmentGrid',
-                   minHeight: 50,
-                   maxHeight: 250,
-                   scrollable: true,
-                   reference: 'attachmentlist',
-               },
                {
                    xtype: 'pmgMailInfo',
                    hidden: true,
                    reference: 'mailinfo',
                },
+               {
+                   xtype: 'pmgAttachmentGrid',
+                   reference: 'attachmentlist',
+                   dock: 'bottom',
+                   collapsible: false,
+               },
            ],
        },
     ],