[IMP] website, *: expand click handler on theme color palettes

*: web_editor

The goal of this commit is make the whole we-collapse elements
clickable for theme color palettes.

Part of https://github.com/odoo/odoo/pull/68061
task-2431484
This commit is contained in:
xO-Tx
2021-07-12 08:30:57 +00:00
committed by qsm-odoo
parent ebba667508
commit 1bea3d5dd8
2 changed files with 4 additions and 1 deletions
@@ -1557,6 +1557,9 @@ body.editor_enable.editor_has_snippets {
background-color: $o-we-bg-lighter;
}
}
.o_we_collapse_toggler {
cursor: pointer;
}
}
.o_we_image_weight {
@@ -1245,7 +1245,7 @@ options.registry.ThemeColors = options.registry.OptionsTab.extend({
for (let i = 1; i <= 5; i++) {
const collapseEl = document.createElement('we-collapse');
const ccPreviewEl = $(qweb.render('web_editor.color.combination.preview'))[0];
ccPreviewEl.classList.add('text-center', `o_cc${i}`);
ccPreviewEl.classList.add('text-center', `o_cc${i}`, 'o_we_collapse_toggler');
collapseEl.appendChild(ccPreviewEl);
const editionEls = $(qweb.render('website.color_combination_edition', {number: i}));
for (const el of editionEls) {