summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-05-17 11:15:13 +0200
committerqsm-odoo <qsm@odoo.com>2017-05-17 11:29:24 +0200
commita83f812357baea4ec25cfa4a0da389d91d5f12f7 (patch)
treea9bd9e954c307c511b1d7f2d16dead6b1cfe4d6c /addons/web_editor/static/src
parent5bbe4a8ce79579628e7cc4fbb8a7e50afc4ce77b (diff)
[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.
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/transcoder.js10
1 files changed, 10 insertions, 0 deletions
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;
};