From 94c954121efafcf01e0ae4a37425678642b5d4a5 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 26 Jan 2018 12:09:40 +0100 Subject: [FIX] mass_mailing: lower the risk of messing with the mail wrapper Mail content is wrapped in a table to properly allow centering the layout in all mail clients. The problem was that this table was able to be customized by the editor while it should not. --- addons/mass_mailing/static/src/js/mass_mailing_editor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addons/mass_mailing/static/src') 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 7705e62fa9e..c40f31c258f 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -323,20 +323,20 @@ snippets_editor.Class.include({ $body.removeClass(all_classes).addClass(theme_params.className); var $old_layout = $editable_area.find(".o_layout"); - // This wrapper structure is the only way to have a responsive and - // centered fixed-width content column on all mail clients var $new_wrapper, $new_wrapper_content; if (theme_params.nowrap) { $new_wrapper = $new_wrapper_content = $("
", {"class": "oe_structure"}); } else { + // This wrapper structure is the only way to have a responsive and + // centered fixed-width content column on all mail clients $new_wrapper = $('', {class: 'o_mail_wrapper'}); - $new_wrapper_content = $("').append( - $("
", {class: 'o_mail_no_resize o_mail_wrapper_td oe_structure'}); + $new_wrapper_content = $("", {class: 'o_mail_no_resize o_mail_no_colorpicker o_mail_wrapper_td oe_structure'}); $new_wrapper.append($('
", {class: 'o_mail_no_resize'}), + $("", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}), $new_wrapper_content, - $("", {class: 'o_mail_no_resize'}) + $("", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}) )); } var $new_layout = $("
", {"class": "o_layout " + theme_params.className}).append($new_wrapper); -- cgit v1.2.3