Skip to content
Snippets Groups Projects
Commit 1a323596 authored by Benjamin Vray's avatar Benjamin Vray Committed by qsm-odoo
Browse files

[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: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 490723b4
No related branches found
No related tags found
No related merge requests found
......@@ -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');
},
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment