summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-02-17 11:33:32 +0000
committerqsm-odoo <qsm@odoo.com>2020-03-31 18:16:07 +0000
commite912823cb1bfbe8baf9b6d6478faab7f023b039b (patch)
tree9b136ef9bcbca495c0cb8d9f618ccee17e0a5422 /addons/web_editor/static/src/js
parent90c0f1e960cdc0e43c097a317f9ccda077f837f0 (diff)
[IMP] website, *: split the customize method into 3 different methods
* theme_bootswatch, web_editor Split the customizeWebsite method into 3 different methods so we can use customizeWebsite for variable, views or color on the same widget. Part of https://github.com/odoo/odoo/pull/38950 task-2087641
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.options.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js
index 50a2ac8dda1..235cb0a8d17 100644
--- a/addons/web_editor/static/src/js/editor/snippets.options.js
+++ b/addons/web_editor/static/src/js/editor/snippets.options.js
@@ -1731,7 +1731,7 @@ const SnippetOptionWidget = Widget.extend({
const proms = this._userValueWidgets.map(async widget => {
// Update widget value (for each method)
const methodsNames = widget.getMethodsNames();
- const proms = methodsNames.map(async methodName => {
+ for (const methodName of methodsNames) {
const params = widget.getMethodsParams(methodName);
let obj = this;
@@ -1749,8 +1749,7 @@ const SnippetOptionWidget = Widget.extend({
}
const normalizedValue = this._normalizeWidgetValue(value);
widget.setValue(normalizedValue, methodName);
- });
- await Promise.all(proms);
+ }
// Refresh the UI of all widgets (after all the current values they
// hold have been updated).