From aca85f9f197de465b47443cff099d9b2c67b2faf Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Fri, 3 Sep 2021 13:19:58 +0000 Subject: [PATCH] [IMP] website_sale: improve the design of the product block options task-2501515 Part-of: odoo/odoo#74206 --- .../static/src/js/editor/snippets.options.js | 3 +- .../static/src/scss/website_sale.editor.scss | 4 +- .../website_sale/views/snippets/snippets.xml | 47 ++++++++++--------- 3 files changed, 27 insertions(+), 27 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 466e37a4fc6..fa037627f3a 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -3477,7 +3477,8 @@ const SnippetOptionWidget = Widget.extend({ // TODO improve this, this is hackish to rely on DOM structure here. // Layouting elements should be handled as widgets or other. for (const el of this.$el.find('we-row')) { - el.classList.toggle('d-none', !$(el).find('> div > .o_we_user_value_widget').not('.d-none').length); + const $userValueWidget = $(el).find('> div > .o_we_user_value_widget'); + el.classList.toggle('d-none', $userValueWidget.length && !$userValueWidget.not('.d-none').length); } for (const el of this.$el.find('we-collapse')) { const $el = $(el); diff --git a/addons/website_sale/static/src/scss/website_sale.editor.scss b/addons/website_sale/static/src/scss/website_sale.editor.scss index deacc64ebd4..58757206f00 100644 --- a/addons/website_sale/static/src/scss/website_sale.editor.scss +++ b/addons/website_sale/static/src/scss/website_sale.editor.scss @@ -1,8 +1,6 @@ .o_wsale_soptions_menu_sizes { - margin-top: $o-we-sidebar-content-field-spacing; - we-title { - width: $o-we-sidebar-content-field-label-width; + align-self: flex-start; } table { diff --git a/addons/website_sale/views/snippets/snippets.xml b/addons/website_sale/views/snippets/snippets.xml index b7a525dafd2..817373c6004 100644 --- a/addons/website_sale/views/snippets/snippets.xml +++ b/addons/website_sale/views/snippets/snippets.xml @@ -76,24 +76,32 @@
-
- Size - - - - - - - - - -
-
-
-
-
+
+ + + + + + + + + + +
+
+
+
+
+
+ + + + + + + None @@ -119,13 +127,6 @@ Right
- -
- Push to top - Push up - Push down - Push to bottom -