]> git.proxmox.com Git - pmg-gui.git/commitdiff
quarantine: improve borders for docked items
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 4 Nov 2022 15:04:24 +0000 (16:04 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Nov 2022 08:46:31 +0000 (09:46 +0100)
one cannot set the different borders seperately in panels/grids and
docked items don't have a bottom border in extjs, but we want to remove
all borders except the ones between the toolbar and the grids/content
below that.

to achieve that, set a custom 'border-bottom-width' with '!important'
(extjs has a rule with !important as well) for the toolbar, and
everywhere else remove the border.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/SpamQuarantine.js
js/VirusQuarantine.js

index c86ce79ac45e4d2a840ebc396a43cdb26c1fc592..af706fd70681aa23db093cf77f6f6c5fb4d71283 100644 (file)
@@ -204,6 +204,11 @@ Ext.define('PMG.SpamQuarantine', {
                {
                    xtype: 'toolbar',
                    dock: 'top',
+                   style: {
+                       // docked items have set the bottom with to 0px with '! important'
+                       // but we still want one here, so we can remove the borders of the grids
+                       'border-bottom-width': '1px ! important',
+                   },
                    items: [
                        {
                            xtype: 'button',
@@ -262,13 +267,14 @@ Ext.define('PMG.SpamQuarantine', {
                },
                {
                    xtype: 'pmgSpamInfoGrid',
-                   border: false,
                    reference: 'spaminfo',
+                   border: false,
                },
                {
                    xtype: 'pmgMailInfo',
                    hidden: true,
                    reference: 'mailinfo',
+                   border: false,
                },
            ],
        },
index 47e055cd67fde32b5df7225512e957e676926a0b..240cd675b0c787581dee4050bdf5f697bf7c8546 100644 (file)
@@ -106,6 +106,11 @@ Ext.define('PMG.VirusQuarantine', {
                {
                    xtype: 'toolbar',
                    dock: 'top',
+                   style: {
+                       // docked items have set the bottom with to 0px with '! important'
+                       // but we still want one here, so we can remove the borders of the grids
+                       'border-bottom-width': '1px ! important',
+                   },
                    items: [
                        {
                            xtype: 'button',
@@ -146,6 +151,7 @@ Ext.define('PMG.VirusQuarantine', {
                    xtype: 'pmgMailInfo',
                    hidden: true,
                    reference: 'mailinfo',
+                   border: false,
                },
            ],
        },