diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-06-08 12:45:56 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-06-08 13:19:21 +0000 |
| commit | 7813f7b555c9f9352fd631dbe3f9bc17c5538114 (patch) | |
| tree | 9b60151c065b4acace3007a7862608879538c236 /addons/web_editor/static/src/js/common/utils.js | |
| parent | a3362275c5fce2c15cb9a60c55476288dc618226 (diff) | |
[FIX] web_editor: fix color classes for non-background properties
The computed preview for non-background properties (e.g. borders) was
wrong in the left panel since the color presets classes were considered
by mistake.
Part of https://github.com/odoo/odoo/pull/52605
closes odoo/odoo#52605
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/common/utils.js')
| -rw-r--r-- | addons/web_editor/static/src/js/common/utils.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/common/utils.js b/addons/web_editor/static/src/js/common/utils.js index e7e2a4fad97..1ed08a80792 100644 --- a/addons/web_editor/static/src/js/common/utils.js +++ b/addons/web_editor/static/src/js/common/utils.js @@ -154,8 +154,9 @@ function _isColorCombinationName(name) { */ function _computeColorClasses(colorNames, prefix = 'bg-') { let hasCCClasses = false; + const isBgPrefix = (prefix === 'bg-'); const classes = colorNames.map(c => { - if (_isColorCombinationName(c)) { + if (isBgPrefix && _isColorCombinationName(c)) { hasCCClasses = true; return `o_cc${c}`; } |
