]> git.proxmox.com Git - pmg-gui.git/commitdiff
quarantine: display how many mails are selected
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Apr 2020 14:16:33 +0000 (16:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Apr 2020 14:16:37 +0000 (16:16 +0200)
Mostly taken from a bigger patch of Dominik, for now lets just show
the count (release is near) and add some padding

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/SpamQuarantine.js

index 60fbae84225735b3ea54c57d5ae1b5f9f142777b..3416ac0bbef76ab547723070043b47a123d0924c 100644 (file)
@@ -78,7 +78,7 @@ Ext.define('PMG.SpamQuarantine', {
            preview.update("<iframe frameborder=0 width=100% height=100% sandbox='allow-same-origin' src='" + url +"'></iframe>");
        },
 
-       multiSelect: function() {
+       multiSelect: function(selection) {
            var preview = this.lookupReference('preview');
            var raw = this.lookupReference('raw');
            var spam = this.lookupReference('spam');
@@ -87,7 +87,7 @@ Ext.define('PMG.SpamQuarantine', {
            var download = this.lookupReference('download');
 
            preview.setDisabled(false);
-           preview.update('<h3>' + gettext('Multiple E-Mails selected') + '</h3>');
+           preview.update(`<h3 style="padding-left:5px;">${gettext('Multiple E-Mails selected')} (${selection.length})</h3>`);
            raw.setDisabled(true);
            spam.setDisabled(true);
            spam.setPressed(false);
@@ -154,7 +154,7 @@ Ext.define('PMG.SpamQuarantine', {
            var list = this.lookupReference('list');
            var selection = list.selModel.getSelection();
            if (selection.length > 1) {
-               me.multiSelect();
+               me.multiSelect(selection);
                return;
            }