From 6bfca9f714b06fd342f6c04f22747b8364eea5cd Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 26 Jul 2022 13:26:20 +0000 Subject: [PATCH] [IMP] web_editor: adds a remove button next to the shape selector This commit aims to make it easier to remove a shape over a background image. Before this commit, we could only remove a shape by clicking on the "shape" button in the background options (it was not easy to find quickly), but with this commit we can now also remove it thanks to a "remove" button that has been added next to the shape selector. task-2827802 closes odoo/odoo#96788 Signed-off-by: Quentin Smetz (qsm) --- .../static/src/js/editor/snippets.options.js | 9 - addons/web_editor/views/snippets.xml | 261 +++++++++--------- 2 files changed, 131 insertions(+), 139 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 e861a31b847..73e1d6c8305 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -6246,15 +6246,6 @@ registry.BackgroundShape = SnippetOptionWidget.extend({ }); return uiFragment; }, - /** - * @override - */ - async _computeWidgetVisibility(widgetName, params) { - if (widgetName === 'shape_none_opt') { - return false; - } - return this._super(...arguments); - }, /** * Flips the shape on its x/y axis. * diff --git a/addons/web_editor/views/snippets.xml b/addons/web_editor/views/snippets.xml index 986c0b3d81a..250d8f9a8a0 100644 --- a/addons/web_editor/views/snippets.xml +++ b/addons/web_editor/views/snippets.xml @@ -234,136 +234,137 @@ t-att-data-selector="selector" t-att-data-exclude="exclude" t-att-data-target="target"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +