From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-gui 2/2] quarantineview: unify url generation
Date: Wed, 5 May 2021 11:33:04 +0200 [thread overview]
Message-ID: <20210505093304.32640-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210505093304.32640-1-s.ivanov@proxmox.com>
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 | 5 ++++-
js/VirusQuarantine.js | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js
index f580ab3..daa3a69 100644
--- a/js/SpamQuarantine.js
+++ b/js/SpamQuarantine.js
@@ -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);
diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js
index 105a438..d5753dd 100644
--- a/js/VirusQuarantine.js
+++ b/js/VirusQuarantine.js
@@ -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>");
},
--
2.20.1
next prev parent reply other threads:[~2021-05-05 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 9:33 [pmg-devel] [PATCH pmg-gui 0/2] fix small glitch in attachment quarantine Stoiko Ivanov
2021-05-05 9:33 ` [pmg-devel] [PATCH pmg-gui 1/2] attachmentquarantine: fix missing '&' for raw-param addition Stoiko Ivanov
2021-05-05 9:33 ` Stoiko Ivanov [this message]
2021-05-11 14:20 ` [pmg-devel] applied: [PATCH pmg-gui 0/2] fix small glitch in attachment quarantine Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210505093304.32640-3-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox