]> git.proxmox.com Git - pmg-gui.git/commitdiff
quarantineview: unify url generation
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 5 May 2021 09:33:04 +0000 (11:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 May 2021 14:17:05 +0000 (16:17 +0200)
this patch adds the cleanup for the attachment quarantine from
0e26e20aa5522b3f7d05e68c96104b051419b901 to the virus- and
spamquarantine.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
js/SpamQuarantine.js
js/VirusQuarantine.js

index f580ab3cf468f922a187c5273b6396a72f855b3a..daa3a693bd7074089ad66b9fe426db4c3628a086 100644 (file)
@@ -67,7 +67,10 @@ Ext.define('PMG.SpamQuarantine', {
                return;
            }
 
-           var url = '/api2/htmlmail/quarantine/content?id=' + rec.data.id + (raw?'&raw=1':'');
+           let url = `/api2/htmlmail/quarantine/content?id=${rec.data.id}`;
+           if (raw) {
+               url += '&raw=1';
+           }
            preview.setDisabled(false);
            this.lookupReference('raw').setDisabled(false);
            this.lookupReference('spam').setDisabled(false);
index 105a43872e6e944b725999425f608432dd69f80f..d5753dd5b00d8c70d7354a0de0d30775ee02c987 100644 (file)
@@ -43,7 +43,10 @@ Ext.define('PMG.VirusQuarantine', {
                return;
            }
 
-           var url = '/api2/htmlmail/quarantine/content?id=' + rec.data.id + (raw?'&raw=1':'');
+           let url = `/api2/htmlmail/quarantine/content?id=${rec.data.id}`;
+           if (raw) {
+               url += '&raw=1';
+           }
            preview.setDisabled(false);
            preview.update("<iframe frameborder=0 width=100% height=100% sandbox='allow-same-origin' src='" + url +"'></iframe>");
        },