blacklight-gallery 4.4.1 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/ruby.yml +1 -1
- data/app/assets/javascripts/blacklight_gallery/slideshow.js +4 -2
- data/app/components/blacklight/gallery/slideshow_preview_component.html.erb +2 -2
- data/app/components/blacklight/gallery/slideshow_preview_component.rb +18 -0
- data/app/views/catalog/_document_slideshow.html.erb +2 -2
- data/app/views/catalog/_slideshow_modal.html.erb +2 -2
- data/lib/blacklight/gallery/version.rb +1 -1
- data/package.json +1 -1
- data/spec/features/slideshow_spec.rb +8 -8
- data/spec/views/catalog/_document_slideshow.html.erb_spec.rb +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 489c0dc3753e54b640a5e7c45247f1cc35a5761fe40f3d210c3d916b745d02aa
|
|
4
|
+
data.tar.gz: 687bc2a13226ddbbb6086c0273c74d06fd31f45b07f74933e550112c6f3e143a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b6b951139a002872a5f4b4c1831f9b43ae21b9f95821c260f25dcac0949905a7fa3cf04b66df2f3cdde566536583c428893712c7be10e48d1371eb8f5c1955e
|
|
7
|
+
data.tar.gz: 77a7c845ce3c8a191b225d63f81700347cf9e21dd23334b6ca54c602006719e3b9831f89d9c386c4452b6f8183ebda91d8ae9218cc0835904767cc421dc7cab8
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -43,7 +43,7 @@ jobs:
|
|
|
43
43
|
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
|
|
44
44
|
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
|
|
45
45
|
steps:
|
|
46
|
-
- uses: actions/checkout@
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
47
|
- name: Set up Ruby ${{ matrix.ruby }}
|
|
48
48
|
uses: ruby/setup-ruby@v1
|
|
49
49
|
with:
|
|
@@ -84,10 +84,12 @@
|
|
|
84
84
|
_this.play();
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
$(document).on('click', '[data-slide], [data-slide-to]', function(e) {
|
|
87
|
+
$(document).on('click', '[data-slide], [data-bs-slide], [data-slide-to], [data-bs-slide-to]', function(e) {
|
|
88
88
|
e.preventDefault();
|
|
89
89
|
|
|
90
|
-
pos = parseInt($(this).attr('data-slide-to')
|
|
90
|
+
pos = parseInt($(this).attr('data-slide-to') || $(this).attr('data-bs-slide-to'), 10) ||
|
|
91
|
+
$(this).attr('data-slide') ||
|
|
92
|
+
$(this).attr('data-bs-slide');
|
|
91
93
|
|
|
92
94
|
if (pos === 'next' || pos === 'prev') _this.pause();
|
|
93
95
|
_this.to(pos);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<% component = Blacklight::VERSION > '8' ?
|
|
2
2
|
Blacklight::DocumentComponent.new(classes: 'slideshow-preview-thumbnail', component: :div, document: @presenter, counter: @counter) :
|
|
3
3
|
Blacklight::DocumentComponent.new(classes: 'slideshow-preview-thumbnail', component: :div, document: @document, presenter: @presenter, counter: @counter)
|
|
4
|
-
%>
|
|
4
|
+
%>
|
|
5
5
|
<%= render(component) do |component| %>
|
|
6
6
|
<% component.with_body do %>
|
|
7
|
-
<%=
|
|
7
|
+
<%= link_to_document %>
|
|
8
8
|
<% end %>
|
|
9
9
|
<% end %>
|
|
@@ -35,6 +35,24 @@ module Blacklight
|
|
|
35
35
|
def render_document_class(*args)
|
|
36
36
|
@view_context.render_document_class(*args)
|
|
37
37
|
end
|
|
38
|
+
|
|
39
|
+
def link_to_document
|
|
40
|
+
helpers.link_to_document(@document, thumbnail, class: 'thumbnail', data: data_attributes)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def data_attributes
|
|
44
|
+
# 'context-href': nil is for Blacklight < 7.38, :context_href is for those after 7.38
|
|
45
|
+
{
|
|
46
|
+
'context-href': nil,
|
|
47
|
+
context_href: nil,
|
|
48
|
+
'slide-to': @document_counter,
|
|
49
|
+
'bs-slide-to': @document_counter,
|
|
50
|
+
toggle: "modal",
|
|
51
|
+
'bs-toggle': "modal",
|
|
52
|
+
target: "#slideshow-modal",
|
|
53
|
+
'bs-target': "#slideshow-modal"
|
|
54
|
+
}
|
|
55
|
+
end
|
|
38
56
|
end
|
|
39
57
|
end
|
|
40
58
|
end
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
<!-- Controls -->
|
|
17
|
-
<a class="left carousel-control prev" href="#slideshow" data-slide="prev">
|
|
17
|
+
<a class="left carousel-control prev" href="#slideshow" data-slide="prev" data-bs-slide="prev">
|
|
18
18
|
<%= render Blacklight::Gallery::Icons::ChevronLeftComponent.new additional_options: { label_context: 'previous_image' } %>
|
|
19
19
|
</a>
|
|
20
|
-
<a class="right carousel-control next" href="#slideshow" data-slide="next">
|
|
20
|
+
<a class="right carousel-control next" href="#slideshow" data-slide="next" data-bs-slide="next">
|
|
21
21
|
<%= render Blacklight::Gallery::Icons::ChevronRightComponent.new additional_options: { label_context: 'next_image' } %>
|
|
22
22
|
</a>
|
|
23
23
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<div class="modal-dialog modal-xl">
|
|
4
4
|
<div class="modal-content">
|
|
5
5
|
<div class="modal-header">
|
|
6
|
-
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
|
7
|
-
<span aria-hidden="true">×</span>
|
|
6
|
+
<button type="button" class="blacklight-modal-close btn-close close btn-close-white" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
|
7
|
+
<span aria-hidden="true" class="visually-hidden">×</span>
|
|
8
8
|
</button>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="modal-body">
|
data/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe
|
|
3
|
+
RSpec.describe 'Slideshow', default_max_wait_time: 10, js: true do
|
|
4
4
|
|
|
5
|
-
it
|
|
6
|
-
visit search_catalog_path( :
|
|
7
|
-
expect(page).to have_content
|
|
8
|
-
within
|
|
9
|
-
click_link
|
|
5
|
+
it 'opens when one of the grid panes is clicked' do
|
|
6
|
+
visit search_catalog_path( q: 'medicine', view: 'slideshow' )
|
|
7
|
+
expect(page).to have_content 'You searched for:'
|
|
8
|
+
within '.view-type' do
|
|
9
|
+
click_link 'Slideshow'
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
find('.grid [data-slide-to="0"]').click
|
|
12
|
+
find('.grid [data-slide-to="0"], .grid [data-bs-slide-to="0"]').click
|
|
13
|
+
expect(page).to have_css('.slideshow-inner .item')
|
|
13
14
|
end
|
|
14
|
-
|
|
15
15
|
end
|
|
@@ -30,8 +30,9 @@ RSpec.describe "catalog/_document_slideshow", :type => :view do
|
|
|
30
30
|
it 'has a modal' do
|
|
31
31
|
render 'catalog/document_slideshow', view_config: view_config
|
|
32
32
|
expect(rendered).to have_selector '#slideshow-modal'
|
|
33
|
-
expect(rendered).to have_selector '[data-slide="prev"]'
|
|
34
|
-
expect(rendered).to have_selector '[data-slide="next"]'
|
|
35
|
-
expect(rendered).to have_selector '[data-slide-to="0"][data-
|
|
33
|
+
expect(rendered).to have_selector '[data-slide="prev"][data-bs-slide="prev"]'
|
|
34
|
+
expect(rendered).to have_selector '[data-slide="next"][data-bs-slide="next"]'
|
|
35
|
+
expect(rendered).to have_selector '[data-slide-to="0"][data-bs-slide-to="0"][data-toggle="modal"]' \
|
|
36
|
+
'[data-bs-toggle="modal"][data-target="#slideshow-modal"]'
|
|
36
37
|
end
|
|
37
38
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: blacklight-gallery
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Beer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -197,6 +197,7 @@ executables: []
|
|
|
197
197
|
extensions: []
|
|
198
198
|
extra_rdoc_files: []
|
|
199
199
|
files:
|
|
200
|
+
- ".github/dependabot.yml"
|
|
200
201
|
- ".github/workflows/ruby.yml"
|
|
201
202
|
- ".gitignore"
|
|
202
203
|
- ".solr_wrapper.yml"
|
|
@@ -318,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
318
319
|
- !ruby/object:Gem::Version
|
|
319
320
|
version: '0'
|
|
320
321
|
requirements: []
|
|
321
|
-
rubygems_version: 3.5.
|
|
322
|
+
rubygems_version: 3.5.15
|
|
322
323
|
signing_key:
|
|
323
324
|
specification_version: 4
|
|
324
325
|
summary: Gallery display for Blacklight
|