[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) <qsm@odoo.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<we-input string="Speed"
|
||||
data-dependencies="slideshow_mode_opt"
|
||||
data-apply-to=".carousel:first"
|
||||
data-select-data-attribute="0s" data-attribute-name="interval"
|
||||
data-select-data-attribute="0s" data-attribute-name="bsInterval"
|
||||
data-unit="s" data-save-unit="ms" data-step="0.1"/>
|
||||
<we-select string="Columns" data-dependencies="masonry_mode_opt, grid_mode_opt">
|
||||
<we-button data-columns="1">1</we-button>
|
||||
|
||||
Reference in New Issue
Block a user