From 670c079d16894ceef7e6b5d1fe73a5cf4e3bf059 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 18 Aug 2022 09:17:07 +0000 Subject: [PATCH] [REF] website: rename `slide` method of `CarouselItem` option class This method name, while being not specific enough to ease grepping, leads to have `data-slide` in the option XML declaration. This was actually confusing with the BS4 data-slide of carousel elements. Here, in master, this leads to even more confusion as BS5 uses data-bs-slide thus making it unsure if the option's `data-slide` has to be converted or not during the current BS5 bug fixing. Indeed, it was converted by mistake with the original BS5 merge at [1] and later fixed with [2] but it could be matched by regexes again and be re-broken by mistake. [1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968 [2]: https://github.com/odoo/odoo/commit/c6524ee9d60888bb147b77db5e394af8beda05ab closes odoo/odoo#98362 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/editor/snippets.options.js | 2 +- addons/website/views/snippets/snippets.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index e793be13ae7..94af196b35b 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -1715,7 +1715,7 @@ options.registry.CarouselItem = options.Class.extend({ * * @see this.selectClass for parameters */ - slide: function (previewMode, widgetValue, params) { + switchToSlide: function (previewMode, widgetValue, params) { switch (widgetValue) { case 'left': this.$controls.filter('.carousel-control-prev')[0].click(); diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index f258331252d..90d06c555d9 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -445,8 +445,8 @@
- - + +