From 74b4ff908eed95f3eae2692fbb622604bb93fcd6 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 20 Jul 2017 09:44:20 +0200 Subject: [PATCH] Not using ECS6 features because UglifyJs would fail --- mail/js/app.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 53c8014539..7b88ffd046 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -982,10 +982,12 @@ app.classes.mail = AppJS.extend( if(widget == null) continue; widget.set_value(dataElem.data[data_widgets[id]] || ""); } - ['smime_signature', 'smime_encryption'].forEach(id => + var smime_widgets = ['smime_signature', 'smime_encryption']; + + for (var i in smime_widgets) { - var widget = this.et2.getWidgetById(id); - switch (id) + var widget = this.et2.getWidgetById(smime_widgets[i]); + switch (smime_widgets[i]) { case 'smime_signature': widget.set_disabled(!(dataElem.data.smime == 'smimeSignature')); @@ -996,7 +998,8 @@ app.classes.mail = AppJS.extend( default: widget.set_disabled(true); } - }); + } + // Blank first, so we don't show previous email while loading var IframeHandle = this.et2.getWidgetById('messageIFRAME'); IframeHandle.set_src('about:blank');