[pmg-devel] [PATCH pmg-gui] Quarantine: set mailinfo visible only on html preview

Dominik Csapak d.csapak at proxmox.com
Wed Apr 15 13:37:58 CEST 2020


We did already hide it when toggling raw/html, but when choosing raw
and changing the mail, it was again set to visible.
This patch fixes that by always taking 'me.raw' into account.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 js/AttachmentQuarantine.js | 2 +-
 js/SpamQuarantine.js       | 2 +-
 js/VirusQuarantine.js      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/js/AttachmentQuarantine.js b/js/AttachmentQuarantine.js
index 56de22a..c69c6ae 100644
--- a/js/AttachmentQuarantine.js
+++ b/js/AttachmentQuarantine.js
@@ -79,7 +79,7 @@ Ext.define('PMG.AttachmentQuarantine', {
 
 	    me.updatePreview(me.raw || false, rec);
 	    me.lookup('attachmentlist').setID(rec);
-	    mailinfo.setVisible(!!rec.data);
+	    mailinfo.setVisible(!!rec.data && !me.raw);
 	    mailinfo.update(rec.data);
 	},
 
diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js
index d2c3a67..60fbae8 100644
--- a/js/SpamQuarantine.js
+++ b/js/SpamQuarantine.js
@@ -163,7 +163,7 @@ Ext.define('PMG.SpamQuarantine', {
 	    me.getViewModel().set('mailid', rec.data ? rec.data.id : '');
 	    me.updatePreview(me.raw || false, rec);
 	    me.lookupReference('spaminfo').setID(rec);
-	    me.lookupReference('mailinfo').setVisible(!!rec.data);
+	    me.lookupReference('mailinfo').setVisible(!!rec.data && !me.raw);
 	    me.lookupReference('mailinfo').update(rec.data);
 	},
 
diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js
index fb1d836..fd72396 100644
--- a/js/VirusQuarantine.js
+++ b/js/VirusQuarantine.js
@@ -82,7 +82,7 @@ Ext.define('PMG.VirusQuarantine', {
 		mailinfo.setVisible(false);
 		return;
 	    }
-	    mailinfo.setVisible(true);
+	    mailinfo.setVisible(!me.raw);
 	    mailinfo.update(selection[0].data);
 	},
 
-- 
2.20.1




More information about the pmg-devel mailing list