diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-01-26 12:09:40 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-01-26 13:31:36 +0100 |
| commit | 94c954121efafcf01e0ae4a37425678642b5d4a5 (patch) | |
| tree | c4ff9ea0ffda480d65fdbbb94524df6dd174e821 /addons/mass_mailing/static/src | |
| parent | 927e13436aaf42bb11d1e74fe8a78af9fed7b082 (diff) | |
[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.
Diffstat (limited to 'addons/mass_mailing/static/src')
| -rw-r--r-- | addons/mass_mailing/static/src/js/mass_mailing_editor.js | 10 |
1 files changed, 5 insertions, 5 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 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 = $("<div/>", {"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 = $('<table/>', {class: 'o_mail_wrapper'}); - $new_wrapper_content = $("<td/>", {class: 'o_mail_no_resize o_mail_wrapper_td oe_structure'}); + $new_wrapper_content = $("<td/>", {class: 'o_mail_no_resize o_mail_no_colorpicker o_mail_wrapper_td oe_structure'}); $new_wrapper.append($('<tr/>').append( - $("<td/>", {class: 'o_mail_no_resize'}), + $("<td/>", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}), $new_wrapper_content, - $("<td/>", {class: 'o_mail_no_resize'}) + $("<td/>", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}) )); } var $new_layout = $("<div/>", {"class": "o_layout " + theme_params.className}).append($new_wrapper); |
