diff --git a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.js b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.js index 31c1dce656b2e..42a1a526119c9 100644 --- a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.js +++ b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.js @@ -1,7 +1,9 @@ import { BaseOptionComponent, useDomState } from "@html_builder/core/utils"; +import { BorderConfigurator } from "@html_builder/plugins/border_configurator_option"; export class ImageGalleryComponent extends BaseOptionComponent { static template = "html_builder.ImageGalleryOption"; + static components = { BorderConfigurator }; static props = {}; setup() { diff --git a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.xml b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.xml index 7236bec0dd952..5d0c352d83b73 100644 --- a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.xml +++ b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option.xml @@ -30,6 +30,44 @@ + + + + Classic + Indicators outside + Outside, center + Outside, at right + Outside, at left + + + + + + + + + + Default + Boxed + Rounded + Hidden + + + + + + Bars + Dots + Numbers + Squared Miniatures + Rounded Miniatures + Hidden + + + + + +
diff --git a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option_plugin.js b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option_plugin.js index 1db8fbd258ebd..ad315956f2eac 100644 --- a/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option_plugin.js +++ b/addons/html_builder/static/src/website_builder/plugins/options/image_gallery_option_plugin.js @@ -27,6 +27,10 @@ class ImageGalleryOption extends Plugin { on_reorder_items_handlers: this.reorderGalleryItems.bind(this), on_remove_handlers: this.onRemove.bind(this), after_remove_handlers: this.afterRemove.bind(this), + on_add_element_handlers: (element) => { + const carousels = element.elementToAdd.querySelectorAll(".s_image_gallery .carousel"); + this.addCarouselListener(carousels); + }, }; getActions() { @@ -82,10 +86,15 @@ class ImageGalleryOption extends Plugin { setup() { const slideshowCarousels = this.document.querySelectorAll(".s_image_gallery .carousel"); + this.addCarouselListener(slideshowCarousels); + } + + addCarouselListener(slideshowCarousels) { for (const carousel of slideshowCarousels) { this.addDomListener(carousel, "slid.bs.carousel", this.onCarouselSlid); } } + restoreSelection(imageToSelect) { if (imageToSelect && !this.dependencies.history.getIsPreviewing()) { // We want to update the container to the equivalent cloned image.