]> git.proxmox.com Git - pmg-gui.git/commitdiff
code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 1 Apr 2021 11:34:24 +0000 (13:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 1 Apr 2021 11:38:49 +0000 (13:38 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/AttachmentQuarantine.js
js/QuarantineList.js

index 188dae508c536ae5099f6d527b8915cad85c610e..ed443d76803eacd81fe14593a0d8f3fefa75284d 100644 (file)
@@ -40,7 +40,10 @@ Ext.define('PMG.AttachmentQuarantine', {
                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>");
        },
index 9280489ad65f11c4b78fa46c7a506acaa57236aa..6aeea3d797e67b6848b57bb5c21f67d9fa38dd74 100644 (file)
@@ -185,7 +185,7 @@ Ext.define('PMG.QuarantineList', {
            if (!me.allowPositionSave) {
                return;
            }
-           if (!selected.length) {
+           if (selected.length <= 0) {
                me.savedPosition = undefined;
                return;
            }