summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-07-27 10:24:44 +0000
committerqsm-odoo <qsm@odoo.com>2020-07-28 07:45:40 +0000
commit430b5b669f8dc42c7bd5ed08de3e080fb0200ac2 (patch)
treef7126b2021c397df3bdf1d0803c680f8c698b187 /addons/web_editor
parent59d46b51b137715143d35ca749226316c3a0a5ec (diff)
[IMP] website, *: move all google map options to left panel
*: web_editor -> Introduce the we-gpspicker widget and improve the way the gmap lib is loaded (for Odoo / multiple snippets / ...). Part of https://github.com/odoo/odoo/pull/49101 task-2091396
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.options.js9
1 files changed, 9 insertions, 0 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 c9803a5b142..1dfdc5be860 100644
--- a/addons/web_editor/static/src/js/editor/snippets.options.js
+++ b/addons/web_editor/static/src/js/editor/snippets.options.js
@@ -1601,6 +1601,7 @@ const SnippetOptionWidget = Widget.extend({
tagName: 'we-customizeblock-option',
custom_events: {
'user_value_update': '_onUserValueUpdate',
+ 'user_value_widget_critical': '_onUserValueWidgetCritical',
},
/**
* Indicates if the option should be displayed in the button group at the
@@ -2546,6 +2547,14 @@ const SnippetOptionWidget = Widget.extend({
});
}
},
+ /**
+ * @private
+ */
+ _onUserValueWidgetCritical() {
+ this.trigger_up('remove_snippet', {
+ $snippet: this.$target,
+ });
+ },
});
const registry = {};