diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 1094906fe61..25bfb9ad6cd 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -1017,6 +1017,17 @@ options.registry.sizing_x = options.registry.sizing.extend({ }); options.registry.layout_column = options.Class.extend({ + /** + * @override + */ + start: function () { + // Needs to be done manually for now because _computeWidgetVisibility + // doesn't go through this option for buttons inside of a select. + // TODO: improve this. + this.$el.find('we-button[data-name="zero_cols_opt"]') + .toggleClass('d-none', !this.$target.is('.s_allow_columns')); + return this._super(...arguments); + }, //-------------------------------------------------------------------------- // Options @@ -1028,8 +1039,24 @@ options.registry.layout_column = options.Class.extend({ * @see this.selectClass for parameters */ selectCount: async function (previewMode, widgetValue, params) { + const previousNbColumns = this.$('> .row').children().length; + let $row = this.$('> .row'); + if (!$row.length) { + $row = this.$target.contents().wrapAll($('
Write one or two paragraphs describing your product, services or a specific feature.
To be successful your content needs to be useful to your readers.
diff --git a/addons/website/views/snippets/s_text_block.xml b/addons/website/views/snippets/s_text_block.xml
index 033636e6202..10727c7cc76 100644
--- a/addons/website/views/snippets/s_text_block.xml
+++ b/addons/website/views/snippets/s_text_block.xml
@@ -3,7 +3,7 @@
Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assists with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience. Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.Your Site Title