[FIX] website: not create editors for form field parts
Since [1] when the "Padding (Y, X)" option was added, form elements are recognized as columns because they match the `.row > div` selector of that new option. This commit excludes those form elements from this option's selector. Steps to reproduce: - Drop a website form. - Click on field's input. => An empty "Column" editor appeared in the side panel, and an error occurred when trying to delete it. [1]: https://github.com/odoo/odoo/commit/11418cc6f0afcc8e14869f4f38ae0d6d462ac712 task-3748574 closes odoo/odoo#157572 Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
This commit is contained in:
@@ -187,6 +187,13 @@ const wSnippetMenu = weSnippetEditor.SnippetsMenu.extend({
|
||||
// "Effect" option of the "On Hover" animation option.
|
||||
const hoverEffectSelectEl = $html.find('[data-set-img-shape-hover-effect]')[0];
|
||||
delete hoverEffectSelectEl.dataset.noPreview;
|
||||
|
||||
// TODO remove in master: as a stable fix we exclude the form fields
|
||||
// from the grid cell's Padding (Y, X) option.
|
||||
const gridColumnsEl = $html.find('[data-js="GridColumns"]')[0];
|
||||
if (gridColumnsEl) {
|
||||
gridColumnsEl.dataset.selector = ".row:not(.s_col_no_resize) > div";
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Depending of the demand, reconfigure they gmap key or configure it
|
||||
|
||||
@@ -681,7 +681,7 @@
|
||||
|
||||
<!-- Grid mode columns -->
|
||||
<div data-js="GridColumns"
|
||||
data-selector=".row > div">
|
||||
data-selector=".row:not(.s_col_no_resize) > div">
|
||||
<we-row string="Padding (Y, X)">
|
||||
<we-input data-select-style="" data-css-property="--grid-item-padding-y" data-unit="px" data-name="grid_padding_y_opt"/>
|
||||
<we-input data-select-style="" data-css-property="--grid-item-padding-x" data-unit="px" data-name="grid_padding_x_opt"/>
|
||||
|
||||
Reference in New Issue
Block a user