diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-02-04 09:59:33 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-07-17 11:28:11 +0000 |
| commit | 7a36eee043b70507ba8af554d286beb1626e81ef (patch) | |
| tree | 8276e1dd0ab1f207cd708eabafbed706ff36d177 /addons/website/static/src/snippets | |
| parent | 119637cf9e87e637f80d96ff55bc43240b19844c (diff) | |
[IMP] website: remove right/left indicators in gallery in editor
In gallery snippet with slideshow mode, the right/left indicators have
now the same behavior in editor and outside. Before this commit, these
indicators were always visible in editable mode.
Part of https://github.com/odoo/odoo/pull/45096
task-2162952
Diffstat (limited to 'addons/website/static/src/snippets')
| -rw-r--r-- | addons/website/static/src/snippets/s_image_gallery/000.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/website/static/src/snippets/s_image_gallery/000.js b/addons/website/static/src/snippets/s_image_gallery/000.js index 3bd6c10f389..19e98a7b341 100644 --- a/addons/website/static/src/snippets/s_image_gallery/000.js +++ b/addons/website/static/src/snippets/s_image_gallery/000.js @@ -99,9 +99,6 @@ const GallerySliderWidget = publicWidget.Widget.extend({ $lis.each(function (i) { $(this).toggleClass('d-none', i < page * nbPerPage || i >= (page + 1) * nbPerPage); }); - if (self.editableMode) { // do not remove DOM in edit mode - return; - } if (page <= 0) { self.$prev.detach(); } else { @@ -133,7 +130,11 @@ const GallerySliderWidget = publicWidget.Widget.extend({ page += ($(this).hasClass('o_indicators_left') ? -1 : 1); page = Math.max(0, Math.min(nbPages - 1, page)); // should not be necessary self.$carousel.carousel(page * realNbPerPage); - hide(); + // We dont use hide() before the slide animation in the editor because there is a traceback + // TO DO: fix this traceback + if (!self.editableMode) { + hide(); + } }); this.$carousel.on('slid.bs.carousel.gallery_slider', update); |
