diff options
| author | fja-odoo <fja@odoo.com> | 2020-05-06 08:45:53 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-05-14 22:45:33 +0000 |
| commit | a72c9adbe5e60ba178e431e42a81334f85786942 (patch) | |
| tree | c2bf14c26ccd2a082d92b38b1c387b50358db13f /addons/web_editor/static/src/js/common/utils.js | |
| parent | 57ec9049e2d1fe6043b2a4b6660cc83b480a4cef (diff) | |
[IMP] web_editor, *: make Colorpicker a Widget
*: website, web
Move the colorpicker dialog logic into a colorpicker *widget*, which the
colorpicker dialog will now instantiate.
Part of https://github.com/odoo/odoo/pull/46088
task-2195313
Diffstat (limited to 'addons/web_editor/static/src/js/common/utils.js')
| -rw-r--r-- | addons/web_editor/static/src/js/common/utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/common/utils.js b/addons/web_editor/static/src/js/common/utils.js index 6600abc6aaa..912b4717c69 100644 --- a/addons/web_editor/static/src/js/common/utils.js +++ b/addons/web_editor/static/src/js/common/utils.js @@ -1,7 +1,7 @@ odoo.define('web_editor.utils', function (require) { 'use strict'; -const ColorpickerDialog = require('web.ColorpickerDialog'); +const {ColorpickerWidget} = require('web.Colorpicker'); /** * window.getComputedStyle cannot work properly with CSS shortcuts (like @@ -121,8 +121,8 @@ function _getNumericAndUnit(value) { */ function _areCssValuesEqual(value1, value2, cssProp, $target) { // If not colors, they will be left untouched - value1 = ColorpickerDialog.normalizeCSSColor(value1); - value2 = ColorpickerDialog.normalizeCSSColor(value2); + value1 = ColorpickerWidget.normalizeCSSColor(value1); + value2 = ColorpickerWidget.normalizeCSSColor(value2); // String comparison first if (value1 === value2) { |
