[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) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2022-08-23 16:29:16 +02:00
parent 87effdf514
commit 670c079d16
2 changed files with 3 additions and 3 deletions
@@ -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();
+2 -2
View File
@@ -445,8 +445,8 @@
<div data-js="CarouselItem"
data-selector=".s_carousel .carousel-item, .s_quotes_carousel .carousel-item">
<we-button class="fa fa-fw fa-angle-left" data-slide="left" data-no-preview="true" data-tooltip="Move Backward"/>
<we-button class="fa fa-fw fa-angle-right me-2" data-slide="right" data-no-preview="true" data-tooltip="Move Forward"/>
<we-button class="fa fa-fw fa-angle-left" data-switch-to-slide="left" data-no-preview="true" data-tooltip="Move Backward"/>
<we-button class="fa fa-fw fa-angle-right me-2" data-switch-to-slide="right" data-no-preview="true" data-tooltip="Move Forward"/>
<we-button class="fa fa-fw fa-plus o_we_bg_success" data-add-slide-item="true" data-no-preview="true" data-tooltip="Add Slide"/>
<we-button class="fa fa-fw fa-minus o_we_bg_danger" data-remove-slide="true" data-no-preview="true" data-tooltip="Remove Slide"/>
</div>