summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-01-25 17:30:22 +0100
committerqsm-odoo <qsm@odoo.com>2018-02-05 15:18:55 +0100
commit1ed7f219a59a2ff036bcaf72cb423b961a39802c (patch)
tree435f97084239661d4eec9d30624ab83611d2101b /addons
parent4999449c8a19728e143d2fb6853ebc20f3cf298d (diff)
[FIX] mass_mailing: complete commit 66aefb1723c336cc1c61fb32926ed926ba9e29e4
- There should not be margins around lists - There should not be editor overlay on the whole content
Diffstat (limited to 'addons')
-rw-r--r--addons/mass_mailing/static/src/js/mass_mailing_editor.js25
-rw-r--r--addons/mass_mailing/static/src/less/themes/theme_basic.less2
-rw-r--r--addons/mass_mailing/views/snippets_themes_options.xml32
-rw-r--r--addons/mass_mailing/views/themes_templates.xml2
4 files changed, 28 insertions, 33 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 62f2062b75c..8ebec45da2b 100644
--- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js
+++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js
@@ -326,30 +326,31 @@ snippets_editor.Class.include({
$body.removeClass(all_classes).addClass(theme_params.className);
- var $old_layout = $editable_area.find(".o_layout");
- var $new_wrapper, $new_wrapper_content;
+ var $old_layout = $editable_area.find('.o_layout');
+ var $new_wrapper;
+ var $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 = $('<div/>', {class: 'oe_structure'});
+ $new_wrapper_content = $new_wrapper;
+ } 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_no_colorpicker o_mail_wrapper_td oe_structure'});
+ $new_wrapper_content = $('<td/>', {class: 'o_mail_no_options o_mail_wrapper_td oe_structure'});
$new_wrapper.append($('<tr/>').append(
- $("<td/>", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}),
+ $('<td/>', {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'}),
$new_wrapper_content,
- $("<td/>", {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'})
+ $('<td/>', {class: 'o_mail_no_resize o_not_editable', contenteditable: 'false'})
));
}
- var $new_layout = $("<div/>", {"class": "o_layout " + theme_params.className}).append($new_wrapper);
+ var $new_layout = $('<div/>', {class: 'o_layout ' + theme_params.className}).append($new_wrapper);
var $contents;
if (first_choice) {
$contents = theme_params.template;
} else if ($old_layout.length) {
- $contents = ($old_layout.hasClass("oe_structure") ? $old_layout : $old_layout.find(".oe_structure").first()).contents();
+ $contents = ($old_layout.hasClass('oe_structure') ? $old_layout : $old_layout.find('.oe_structure').first()).contents();
} else {
$contents = $editable_area.contents();
}
diff --git a/addons/mass_mailing/static/src/less/themes/theme_basic.less b/addons/mass_mailing/static/src/less/themes/theme_basic.less
index c5c88e8144b..00f3a6304bc 100644
--- a/addons/mass_mailing/static/src/less/themes/theme_basic.less
+++ b/addons/mass_mailing/static/src/less/themes/theme_basic.less
@@ -19,7 +19,7 @@
}
ul, ol {
- margin: 13px 0;
+ margin: 0;
}
}
}
diff --git a/addons/mass_mailing/views/snippets_themes_options.xml b/addons/mass_mailing/views/snippets_themes_options.xml
index 705995344b5..3caafae46d5 100644
--- a/addons/mass_mailing/views/snippets_themes_options.xml
+++ b/addons/mass_mailing/views/snippets_themes_options.xml
@@ -7,46 +7,40 @@
<div data-js="sizing_x"
data-selector="img, .mv, .col_mv, td, th"
- data-exclude=".o_mail_no_resize, .o_mail_wrapper_td"/>
+ data-exclude=".o_mail_no_resize, .o_mail_no_options"/>
<div data-js="table_item"
data-selector="td, th"
- data-exclude=".o_mail_wrapper_td"/>
+ data-exclude=".o_mail_no_options"/>
<div data-js="table_row"
data-selector="tr:has(> .row), tr:has(> .col_mv)"
- data-drop-near="tr:has(> .row), tr:has(> .col_mv)">
- </div>
+ data-exclude=".o_mail_no_options"
+ data-drop-near="tr:has(> .row), tr:has(> .col_mv)"/>
<div data-js="table_column"
data-selector=".col>td, .col>th"
- data-exclude=".o_mail_wrapper_td"
- data-drop-near=".col>td, .col>th">
- </div>
+ data-exclude=".o_mail_no_options"
+ data-drop-near=".col>td, .col>th"/>
<div data-js="table_column_mv"
data-selector=".col_mv, td, th"
- data-exclude=".o_mail_wrapper_td"
- data-drop-near=".col_mv, td, th">
- </div>
+ data-exclude=".o_mail_no_options"
+ data-drop-near=".col_mv, td, th"/>
<div data-js="content"
data-selector="[data-oe-field='body_html'] > div:not(.o_layout), [data-oe-field='body_html'] .oe_structure > div, .oe_snippet_body"
+ data-exclude=".o_mail_no_options"
data-drop-near="[data-oe-field='body_html']:not(:has(.o_layout)) > *, .oe_structure > *"
- data-drop-in="[data-oe-field='body_html']:not(:has(.o_layout)), .oe_structure">
- </div>
+ data-drop-in="[data-oe-field='body_html']:not(:has(.o_layout)), .oe_structure"/>
<div data-js="sizing_y"
data-selector="[data-oe-field='body_html'] > div:not(.o_layout), [data-oe-field='body_html'] .oe_structure > div, td, th"
- data-exclude=".o_mail_no_resize, .o_mail_wrapper_td"/>
+ data-exclude=".o_mail_no_resize, .o_mail_no_options"/>
<div data-js="colorpicker"
- data-selector="
- [data-oe-field='body_html'] > div:not(.o_layout),
- [data-oe-field='body_html'] .oe_structure > div,
- td, th
- "
- data-exclude=".o_mail_no_colorpicker">
+ data-selector="[data-oe-field='body_html'] > div:not(.o_layout), [data-oe-field='body_html'] .oe_structure > div, td, th"
+ data-exclude=".o_mail_no_colorpicker, .o_mail_no_options">
<li class="dropdown-submenu">
<a tabindex="-1" href="#"><i class="fa fa-eyedropper"/>Background Color</a>
<ul class="dropdown-menu">
diff --git a/addons/mass_mailing/views/themes_templates.xml b/addons/mass_mailing/views/themes_templates.xml
index 277791828e8..d6ce5a3aebf 100644
--- a/addons/mass_mailing/views/themes_templates.xml
+++ b/addons/mass_mailing/views/themes_templates.xml
@@ -2,7 +2,7 @@
<odoo>
<!-- Theme "Basic" template -->
<template id="theme_basic_template">
- <div>
+ <div class="o_mail_no_options">
<p>
<br/>
</p>