diff options
| author | Anshuman Sharma <ans@odoo.com> | 2018-07-12 11:33:28 +0530 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-08-13 11:34:34 +0200 |
| commit | 590679f868234c07e7f263171f3fa2c6fa9eea8b (patch) | |
| tree | 9f6e58818a6852c57c5305abe26bea6f4993f2af /addons/mass_mailing/static/src/js/mass_mailing_editor.js | |
| parent | 7f0cc6ac527cc3251ad1c1086e3302d589de0c20 (diff) | |
[IMP] mass_mailing: removed font-family from plain text
Purpose behind this commit is to remove font-family from all elements in
plaintext theme. So mail receiver will see this mail in default system font.
This is inspired by new Gmail and suggested by FP
As we want to show system's default font in the mail sent with the basic theme.
And so we remove font-family from basic theme while saving. But by doing so in
readonly mode is not getting proper font in odoo as we don't having any assets in
readonly mail editor. So we added stylesheet just for display purpose.
Diffstat (limited to 'addons/mass_mailing/static/src/js/mass_mailing_editor.js')
| -rw-r--r-- | addons/mass_mailing/static/src/js/mass_mailing_editor.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index ec7f01bbc25..b5bc4915918 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -366,6 +366,14 @@ snippets_editor.Class.include({ self._disableUndroppableSnippets(); } }, + cleanForSave: function () { + this._super.apply(this, arguments); + // remove font-family from all elements for plain text theme (just like gmail) + var $basicTheme = this.$editable.find('.o_basic_theme'); + if($basicTheme.length && this.$editable.data('oe-model') === 'mail.mass_mailing') { + this.$editable.find('*').css('font-family', ''); + } + } }); var callback = window ? window["callback"] : undefined; |
