From 0281c951f2808b77599210fe76d4b980b67a85eb Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 28 May 2020 10:04:39 +0000 Subject: [PATCH] [IMP] website: remove the old color palette *re*generation Changing 'alpha' does not change the other colors which have been chosen by the user. If only 'alpha' is chosen by the user, then the other colors are still adapted accordinly (compatibility). Part of https://github.com/odoo/odoo/pull/45856 task-2197038 --- .../website/static/src/js/editor/snippets.options.js | 11 +---------- addons/website/views/snippets/snippets.xml | 6 ++---- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index d48df0b5e50..98fb4a9dd05 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -343,16 +343,7 @@ options.Class.include({ color = style.getPropertyValue('--' + color).trim(); color = ColorpickerWidget.normalizeCSSColor(color); } - const colors = {}; - colors[params.color] = color; - if (params.color === 'alpha') { - colors['beta'] = null; - colors['gamma'] = null; - colors['delta'] = null; - colors['epsilon'] = null; - } - - return this._makeSCSSCusto(url, colors); + return this._makeSCSSCusto(url, {[params.color]: color}); }, /** * @private diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index ef12644edfd..646952b9c06 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -632,14 +632,12 @@ Switch Theme - + - +