summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml/snippets.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-05-28 10:04:47 +0000
committerqsm-odoo <qsm@odoo.com>2020-06-02 09:42:19 +0000
commit55c90cc9fa4ae3308f35129c8061c202c81f8bfc (patch)
treeec6fd38a9169a25096fb1ce924be823a260e2628 /addons/web_editor/static/src/xml/snippets.xml
parent7736cde22c3bce06305045a818a2d70892cf25ef (diff)
[IMP] website, *: allow presets user edition
*: web, web_editor Now, the user can edit each individual component of each color preset thanks to the third tab of the left panel. The edition of the first preset is the same as the others for the users but it is actually also used for "no-preset" areas, meaning that they impact the whole website by default (*without impacting the other presets*). The website thus appears as areas using presets, preset 1 being the default (in the future all areas will be customizable with a different preset). The only difference between "using preset 1 explicitely" and "not using a preset" will be that background color is transparent in no-preset, leaving the body background appear. If the body background has no image, then there is no difference at all as the background color of the body is set to be the background color of the preset 1. In boxed mode, that color is used for the "box" and the website body uses a different customizable color. Note: before this commit, the "text" color edition was used to set the main text color and one of the constrasting color for the color-yiq function (the darkest if a dark color or the lightest if a light color). That last part has been removed and automatic colors will now always use $gray-900 and $white as contrasting colors, unless changed by the theme explicitely. This needed to be removed as now the "text color" edition has been moved in the "preset 1" config and should thus only impact the "no-preset / preset 1" areas instead of all the presets. Part of https://github.com/odoo/odoo/pull/45856 task-2197038
Diffstat (limited to 'addons/web_editor/static/src/xml/snippets.xml')
-rw-r--r--addons/web_editor/static/src/xml/snippets.xml15
1 files changed, 9 insertions, 6 deletions
diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml
index aee5de39106..aff99211e31 100644
--- a/addons/web_editor/static/src/xml/snippets.xml
+++ b/addons/web_editor/static/src/xml/snippets.xml
@@ -64,14 +64,17 @@
<t t-name="web_editor.colorpalette.combination.btn">
<button type="button" class="o_we_color_btn o_we_color_combination_btn o_we_cc_preview_container"
t-att-data-color="number" t-attf-title="Preset #{number}">
- <div class="o_we_cc_preview_wrapper d-flex justify-content-between align-items-end">
- <h1 class="o_we_color_combination_btn_title">Title</h1>
- <p class="o_we_color_combination_btn_text flex-grow-1">Text</p>
- <span class="o_we_color_combination_btn_btn btn btn-sm btn-primary o_btn_preview mr-1"><small>Button</small></span>
- <span class="o_we_color_combination_btn_btn btn btn-sm btn-secondary o_btn_preview"><small>Button</small></span>
- </div>
+ <t t-call="web_editor.color.combination.preview"/>
</button>
</t>
+ <t t-name="web_editor.color.combination.preview">
+ <div class="o_we_cc_preview_wrapper d-flex justify-content-between align-items-end">
+ <h1 class="o_we_color_combination_btn_title">Title</h1>
+ <p class="o_we_color_combination_btn_text flex-grow-1">Text</p>
+ <span class="o_we_color_combination_btn_btn btn btn-sm btn-primary o_btn_preview mr-1"><small>Button</small></span>
+ <span class="o_we_color_combination_btn_btn btn btn-sm btn-secondary o_btn_preview"><small>Button</small></span>
+ </div>
+ </t>
<t t-name="web_editor.many2one.button">
<div class="btn-group">