From 1a323596cfce62f3651c770f8cb35efa89b97426 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Fri, 31 Jan 2020 12:37:27 +0000 Subject: [PATCH] [FIX] website: restore hidden indicators in gallery snippet Indicators were hidden in editor when switching to slideshow mode from any other mode. Because the class of the selected mode was defined after rendering and we need this class before the rendering. This also fixes other small issues when switching between different modes. Part of https://github.com/odoo/odoo/pull/44180 task-2162952 closes odoo/odoo#47519 X-original-commit: a99150b11a463901121bbe9751370231e3564ca2 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/snippets/s_image_gallery/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/snippets/s_image_gallery/options.js b/addons/website/static/src/snippets/s_image_gallery/options.js index e796b5a16d3..22e84298c20 100644 --- a/addons/website/static/src/snippets/s_image_gallery/options.js +++ b/addons/website/static/src/snippets/s_image_gallery/options.js @@ -205,10 +205,10 @@ options.registry.gallery = options.Class.extend({ mode: function (previewMode, widgetValue, params) { widgetValue = widgetValue || 'slideshow'; // FIXME should not be needed this.$target.css('height', ''); - this[widgetValue](); this.$target .removeClass('o_nomode o_masonry o_grid o_slideshow') .addClass('o_' + widgetValue); + this[widgetValue](); this.trigger_up('cover_update'); }, /**