From 9afa8acaae42b0103907f6110070578cc074d2be Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 14 Aug 2014 07:43:23 +0000 Subject: [PATCH] Fix switching between HTML/PLAIN is not working on mail compose --- mail/js/app.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 74f0edf85d..0150b5bb98 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2944,14 +2944,22 @@ app.classes.mail = AppJS.extend( * * @param {egw object} _egw * @param {widget object} _widget - * @param {window object} _window */ - submitOnChange: function(_egw, _widget, _window) { + submitOnChange: function(_egw, _widget) + { if (!jQuery.isEmptyObject(_widget)) { - if (!jQuery.isEmptyObject(_widget.getValue())) + if (typeof _widget.id !== 'undefined') var widgetId = _widget.id; + switch (widgetId) { - this.et2_obj.submit(); + case 'mimeType': + this.et2_obj.submit(); + break; + default: + if (!jQuery.isEmptyObject(_widget.getValue())) + { + this.et2_obj.submit(); + } } } },