diff --git a/app/assets/javascripts/blacklight_gallery/slideshow.js b/app/assets/javascripts/blacklight_gallery/slideshow.js index 306fb05..5598980 100644 --- a/app/assets/javascripts/blacklight_gallery/slideshow.js +++ b/app/assets/javascripts/blacklight_gallery/slideshow.js @@ -84,10 +84,12 @@ _this.play(); }); - $(document).on('click', '[data-slide], [data-slide-to]', function(e) { + $(document).on('click', '[data-slide], [data-bs-slide], [data-slide-to], [data-bs-slide-to]', function(e) { e.preventDefault(); - pos = parseInt($(this).attr('data-slide-to'), 10) || $(this).attr('data-slide'); + pos = parseInt($(this).attr('data-slide-to') || $(this).attr('data-bs-slide-to'), 10) || + $(this).attr('data-slide') || + $(this).attr('data-bs-slide'); if (pos === 'next' || pos === 'prev') _this.pause(); _this.to(pos); diff --git a/app/components/blacklight/gallery/slideshow_preview_component.html.erb b/app/components/blacklight/gallery/slideshow_preview_component.html.erb index 7e95f23..ab2017b 100644 --- a/app/components/blacklight/gallery/slideshow_preview_component.html.erb +++ b/app/components/blacklight/gallery/slideshow_preview_component.html.erb @@ -4,6 +4,8 @@ %> <%= render(component) do |component| %> <% component.with_body do %> - <%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', data: { 'context-href': nil, 'slide-to': @document_counter, toggle: "modal", target: "#slideshow-modal" }) %> + <%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', + data: { 'context-href': nil, 'slide-to': @document_counter, 'bs-slide-to': @document_counter, + toggle: "modal", 'bs-toggle': "modal", target: "#slideshow-modal", 'bs-target': "#slideshow-modal" }) %> <% end %> <% end %> diff --git a/app/views/catalog/_document_slideshow.html.erb b/app/views/catalog/_document_slideshow.html.erb index 6569ff0..21c888e 100644 --- a/app/views/catalog/_document_slideshow.html.erb +++ b/app/views/catalog/_document_slideshow.html.erb @@ -14,10 +14,10 @@ - - diff --git a/app/views/catalog/_slideshow_modal.html.erb b/app/views/catalog/_slideshow_modal.html.erb index 3333650..9173873 100644 --- a/app/views/catalog/_slideshow_modal.html.erb +++ b/app/views/catalog/_slideshow_modal.html.erb @@ -3,8 +3,8 @@