summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2020-04-16 14:00:41 +0000
committerfja-odoo <fja@odoo.com>2020-05-15 11:05:00 +0000
commit99910b526ed792235a778863b993d10cf4e77cd7 (patch)
treecda8b5a4bbe7a07d8b70c3a9fbfa3505871fdb63 /addons/web_editor/static/src/xml
parenta72c9adbe5e60ba178e431e42a81334f85786942 (diff)
[IMP] web, web_editor: integrate colorpicker in colorpalette
Stop using the colorpicker dialog in the colorpalette widget. Integrate the colorpicker widget in the colorpalette widget. Of course, the colorpicker behaviors are adapted so that no useless rerendering of the colorpalette is made on each value change. The 'reset color' button is now a button like the other colors, no need for a 'color_reset' event anymore. It is removed and replaced with a 'color_picked' event with color being an empty string. The clear button now also work on hover. Also, the topbar colorpalette for text and text background colors now has the exact same behaviour as the background colorpalette: adding color preview on hover. The colorpalette now also closes on 'enter' keypress. Part of https://github.com/odoo/odoo/pull/46088 task-2195313 closes odoo/odoo#46088 Related: odoo/enterprise#8696 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/xml')
-rw-r--r--addons/web_editor/static/src/xml/snippets.xml10
1 files changed, 1 insertions, 9 deletions
diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml
index a240431b6e8..59d3d28d5cc 100644
--- a/addons/web_editor/static/src/xml/snippets.xml
+++ b/addons/web_editor/static/src/xml/snippets.xml
@@ -44,15 +44,7 @@
<!-- options -->
<div t-name="web_editor.snippet.option.colorpicker" class="colorpicker">
- <div class="o_colorpicker_sections px-1 pb8">
- <div class="o_colorpicker_section">
- <a class="btn w-50 float-left o_colorpicker_reset d-none">
- <i class="fa fa-ban"/> Reset
- </a>
- <a class="btn w-50 o_add_custom_color" data-name="custom">
- <i class="fa fa-plus"/> Custom
- </a>
- </div>
+ <div class="o_colorpicker_sections">
<div class="tab-content o_colorpicker_section_tabs"/>
</div>
</div>