From a83f812357baea4ec25cfa4a0da389d91d5f12f7 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 17 May 2017 11:15:13 +0200 Subject: [FIX] mass_mailing, web_editor: increase mail clients compatibility Following bee3253b44850c0d563ee8973556ece33376781b, this commit is made to increase the mail clients compatibility for the mails that are created with the odoo mail editor. Three new problems are handled: - Font family of titles had to be forced too as outlook was not inheriting parent font family on those either. - Default text font-size had to be forced as was not detected in transcoding correctly. - text-decoration rule was decomposed in text-decoration(-line, -style and -color) in transcoding. Outlook is ignoring those three rules for some reason. As the decomposition is useless, the transcoder now forces the recomposition of these three rules. --- addons/web_editor/static/src/js/transcoder.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'addons/web_editor/static/src/js/transcoder.js') diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js index 05068972532..6b42e028b3a 100644 --- a/addons/web_editor/static/src/js/transcoder.js +++ b/addons/web_editor/static/src/js/transcoder.js @@ -121,6 +121,16 @@ var getMatchedCSSRules = function (a) { } }); + // text-decoration rule is decomposed in -line, -color and -style. This is + // however not supported by many browser/mail clients and the editor does + // not allow to change -color and -style rule anyway + if (style['text-decoration-line']) { + style['text-decoration'] = style['text-decoration-line']; + delete style['text-decoration-line']; + delete style['text-decoration-color']; + delete style['text-decoration-style']; + } + return style; }; -- cgit v1.2.3