From ef631c5d10f3169f5d5ffab80f5013f83badaf33 Mon Sep 17 00:00:00 2001 From: Sanjay Sharma Date: Thu, 11 Apr 2024 15:20:59 +0530 Subject: [PATCH] [FIX] website: remove sub level options of border width Steps to reproduce : 1. click on edit website. 2. click on THEME tab from snippet options. 3. scroll down to input fields. 4. the border width has options for small and large size, which serves no purpose and were displayed empty. Purpose: This commit aims to remove the changes made on [1] which added 2 sublevel options for Border Width for Input Field which served no purpose. After this commit : The Border Width option will not have sub options small and large. [1]: odoo@388e4bb task-3771146 closes odoo/odoo#161872 X-original-commit: f35123799408614c0bd50fcb79d147d2f69a84f7 Signed-off-by: Benoit Socias (bso) --- addons/website/static/src/js/editor/snippets.editor.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/website/static/src/js/editor/snippets.editor.js b/addons/website/static/src/js/editor/snippets.editor.js index d3d8ced4059..34ae0125aac 100644 --- a/addons/website/static/src/js/editor/snippets.editor.js +++ b/addons/website/static/src/js/editor/snippets.editor.js @@ -194,6 +194,14 @@ const wSnippetMenu = weSnippetEditor.SnippetsMenu.extend({ if (gridColumnsEl) { gridColumnsEl.dataset.selector = ".row:not(.s_col_no_resize) > div"; } + + // Remove the input-border-width-sm and input-border-width-lg from the input-border-width + ['input-border-width-sm', 'input-border-width-lg'].forEach(variable => { + const element = $html.find( + `[data-selector='theme-input'] we-input[data-customize-website-variable][data-variable='${variable}']` + )[0]; + element.remove(); + }); }, /** * Depending of the demand, reconfigure they gmap key or configure it