[FIX] mass_mailing: make better link dialog for mass mailing

Primary and link buttons are "hacked" by mailing themes scss. We thus
have to fix their preview if possible (as they are previewed as standard
bootstrap while they actually have a different look depending on the
mailing theme).

Note: this commit is obviously a big hack which calls for lots of
improvements in master.

FIXME: this only partially work due to the new editor, it has to be
fixed as soon as the master becomes stable again...

Part of https://github.com/odoo/odoo/pull/60308
opw-2360756

X-original-commit: 7bd7bc2513b72f5ffc006758c4bf4eb42ae6ed67
This commit is contained in:
qsm-odoo
2020-10-20 09:14:00 +00:00
parent c7f4f6d978
commit 6ce28c29db
5 changed files with 87 additions and 1 deletions
@@ -53,6 +53,7 @@ var LinkDialog = Dialog.extend({
// data is used in the dialog template.
this.props = options.props || {};
this.__editorEditable = this.props.__editorEditable;
this.colorCombinationClass = this.props.colorCombinationClass;
var allBtnClassSuffixes = /(^|\s+)btn(-[a-z0-9_-]*)?/gi;
@@ -666,6 +666,8 @@ var Wysiwyg = Widget.extend({
initialClassNames: classes,
colorCombinationClass: colorCombinationClass,
target: target,
__editorEditable: this.editorEditable,
},
},
);