From 430b5b669f8dc42c7bd5ed08de3e080fb0200ac2 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 27 Jul 2020 10:24:44 +0000 Subject: [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 --- addons/web_editor/static/src/js/editor/snippets.options.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'addons/web_editor/static/src') 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 = {}; -- cgit v1.2.3