From d3584c69d08e8b4cee9ea631f4e5d84466beb9fc Mon Sep 17 00:00:00 2001 From: "Louis (loco)" Date: Wed, 15 Feb 2023 13:08:51 +0000 Subject: [PATCH] [FIX] website: restore the speed option of the image gallery snippet Steps to reproduce the bug: - On the website application, add an image gallery snippet. - Change the "Speed" parameter. - Save. -> Nothing happens: The displayed image is always the first one and there is no cycle between the images of the snippet. Since Bootstrap 5, the amount of time to delay between automatically cycling to the next item is defined by `data-bs-interval`. The bug comes from the fact that some parts of the code still used the old parameter name (`data-interval`). opw-3165570 closes odoo/odoo#113423 X-original-commit: 8368fa1f5e45a14ed8938017b2da90a810dbf0c8 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/snippets/s_image_gallery/options.js | 2 +- addons/website/views/snippets/s_image_gallery.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 50773955455..ba55a83aef3 100644 --- a/addons/website/static/src/snippets/s_image_gallery/options.js +++ b/addons/website/static/src/snippets/s_image_gallery/options.js @@ -275,7 +275,7 @@ options.registry.gallery = options.Class.extend({ src: img.getAttribute('src'), alt: img.getAttribute('alt'), })); - var currentInterval = this.$target.find('.carousel:first').attr('data-interval'); + var currentInterval = this.$target.find('.carousel:first').attr('data-bs-interval'); var params = { images: images, index: 0, diff --git a/addons/website/views/snippets/s_image_gallery.xml b/addons/website/views/snippets/s_image_gallery.xml index e1971a522cc..43123041d6a 100644 --- a/addons/website/views/snippets/s_image_gallery.xml +++ b/addons/website/views/snippets/s_image_gallery.xml @@ -83,7 +83,7 @@ 1