blacklight-gallery 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f1e7482c4ccd593780df7fe914534583e803b8cb7586a98db381f425ca3326
4
- data.tar.gz: f91d53c9e4d750ab085d7ba97c1a67f7d26e2dde31541b273e7195098453fedb
3
+ metadata.gz: fa60fe858f02cf0e8ad35e15410446d6cfdf10d27a2ce2a1fc4f7e76da748b18
4
+ data.tar.gz: ab1a86345f1f78c5b24ac90b5ad9d8d5f3d63b69f0366daa1a59ab68ed5d3768
5
5
  SHA512:
6
- metadata.gz: 5ed81094a38b233941ad06c6b62e5555a407809151d87b902c9d5422fbe3953f9a58691510253c407f3f7e756b9d703ab4da4515558ecb9caf3cdbe6fdd986ce
7
- data.tar.gz: 05cca47ed3750c5c3b8663b910a106d1d1b2437d36e46972c7a52a215659966c0b1798f16dabb35601674f9234b3cb87777afafd426e71566a03ade868d485dd
6
+ metadata.gz: c28c9ab1878442fdfce7988a43cb17e4f5890bcb015d7f3e46e7d2a542432d715de5f29eb885ec2d94aa04aee7fc6d290165db08ed28438ae511fb54edd4e576
7
+ data.tar.gz: a0f0f5a415e6e7c44fa71d48cc24922548c65bc7de08be422924ff7aba431cb3e315d7ee9774aeecaec0c761596ca73266a7b625be0fd206418f3308a735e2c0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"></path></svg
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"></path></svg>
@@ -72,12 +72,16 @@
72
72
  var $img = this.$element.find('.frame img'),
73
73
  _this = this;
74
74
 
75
- // pause slideshow on image mouseenter event
76
- $img.on('mouseenter', function() { _this.pause(); });
75
+ $(document).on('click', '[data-behavior="pause-slideshow"]', function(e) {
76
+ e.preventDefault();
77
+
78
+ _this.pause();
79
+ });
80
+
81
+ $(document).on('click', '[data-behavior="start-slideshow"]', function(e) {
82
+ e.preventDefault();
77
83
 
78
- // play slideshow on image mouseleave event
79
- $img.on('mouseleave', function() {
80
- if (_this.options.autoPlay) _this.play();
84
+ _this.play();
81
85
  });
82
86
 
83
87
  $(document).on('click', '[data-slide], [data-slide-to]', function(e) {
@@ -99,7 +103,7 @@
99
103
 
100
104
 
101
105
  Slideshow.DEFAULTS = {
102
- autoPlay: true,
106
+ autoPlay: false,
103
107
  interval: 5000 // in milliseconds
104
108
  }
105
109
 
@@ -1,4 +1,4 @@
1
- #document {
1
+ .openseadragon-container {
2
2
 
3
3
  .osd-toolbar {
4
4
  padding: 5px 0;
@@ -26,4 +26,4 @@
26
26
  height: 400px;
27
27
 
28
28
  }
29
- }
29
+ }
@@ -93,6 +93,12 @@ $gray-dark: #343a40 !default;
93
93
  padding: 4px 10px;
94
94
  text-align: center;
95
95
  }
96
+
97
+ .controls {
98
+ svg {
99
+ fill: $gray-light;
100
+ }
101
+ }
96
102
  }
97
103
 
98
104
  .slideshow-documents {
@@ -1,9 +1,5 @@
1
1
  <% # container for all documents in slideshow view -%>
2
2
  <div id="documents" class="row slideshow-documents">
3
- <div class="info w-100">
4
- <h3><%= t(:'blacklight_gallery.catalog.document_slideshow.header') %></h3>
5
- </div>
6
-
7
3
  <div class="grid">
8
4
  <%= render collection: documents, as: :document, partial: 'grid_slideshow' %>
9
5
  </div>
@@ -2,7 +2,7 @@
2
2
  <div class="thumbnail">
3
3
  <%= link_to '#', data: { :'slide-to' => document_counter, toggle: "modal", target: "#slideshow-modal" } do %>
4
4
  <% if thumbnail_url(document) %>
5
- <%= image_tag thumbnail_url(document), class: 'img-thumbnail' %>
5
+ <%= image_tag thumbnail_url(document), class: 'img-thumbnail', alt: index_presenter(document).heading %>
6
6
  <% else %>
7
7
  <%= t('.missing_image', scope: [:blacklight_gallery]) %>
8
8
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <div class="item<%= ' active' if document_counter == 0 %>">
2
2
  <div class="frame">
3
- <%= render_slideshow_tag(document) %>
3
+ <%= render_slideshow_tag(document, { alt: '' }) %>
4
4
  <div class="caption">
5
5
  <%= index_presenter(document).label(document_show_link_field(document)) %>
6
6
  </div>
@@ -23,21 +23,20 @@
23
23
  <% count = Array(image).length %>
24
24
  <div class="openseadragon-container <%= osd_container_class %>">
25
25
  <div class="osd-toolbar row">
26
- <% if count > 1 %>
27
- <% osd_config = osd_config_referencestrip.merge(osd_config) %>
28
-
29
- <div class="col-md-6 pagination">
30
- <a id="osd-previous"><%= blacklight_icon('chevron_left') %></a>
31
- <span id="osd-page">1</span> of <%= count %>
32
- <a id="osd-next"><%= blacklight_icon('chevron_right') %></a>
33
- </div>
34
- <% end %>
35
- <div class="col-md-6 controls">
36
- <a id="osd-zoom-in"><%= blacklight_icon('add_circle') %></a>
37
- <a id="osd-zoom-out"><%= blacklight_icon('remove_circle') %></a>
38
- <a id="osd-home"><%= blacklight_icon('resize_small') %></a>
39
- <a id="osd-full-page"><%= blacklight_icon('custom_fullscreen') %></a>
40
- </div>
26
+ <div class="col-md-6 pagination">
27
+ <% if count > 1 %>
28
+ <% osd_config = osd_config_referencestrip.merge(osd_config) %>
29
+ <a id="osd-previous"><%= blacklight_icon('chevron_left') %></a>
30
+ <span id="osd-page">1</span> of <%= count %>
31
+ <a id="osd-next"><%= blacklight_icon('chevron_right') %></a>
32
+ <% end %>
33
+ </div>
34
+ <div class="col-md-6 controls">
35
+ <a id="osd-zoom-in"><%= blacklight_icon('add_circle') %></a>
36
+ <a id="osd-zoom-out"><%= blacklight_icon('remove_circle') %></a>
37
+ <a id="osd-home"><%= blacklight_icon('resize_small') %></a>
38
+ <a id="osd-full-page"><%= blacklight_icon('custom_fullscreen') %></a>
39
+ </div>
41
40
  </div>
42
41
  <%= openseadragon_picture_tag image, class: 'osd-image row', data: { openseadragon: osd_config } %>
43
42
  </div>
@@ -6,10 +6,18 @@
6
6
 
7
7
  <!-- Controls -->
8
8
  <a class="left carousel-control prev" href="#slideshow" data-slide="prev">
9
- <%= blacklight_icon 'chevron_left' %>
9
+ <%= blacklight_icon 'chevron_left', { additional_options: { label_context: 'previous_image' }} %>
10
10
  </a>
11
11
  <a class="right carousel-control next" href="#slideshow" data-slide="next">
12
- <%= blacklight_icon 'chevron_right' %>
12
+ <%= blacklight_icon 'chevron_right', { additional_options: { label_context: 'next_image' }} %>
13
13
  </a>
14
14
 
15
+ <div class="controls text-center">
16
+ <button class="btn btn-sm btn-link" data-behavior="pause-slideshow" aria-label="<%= t('blacklight_gallery.catalog.slideshow.pause') %>">
17
+ <%= blacklight_icon 'pause_slideshow' %>
18
+ </button>
19
+ <button class="btn btn-sm btn-link" data-behavior="start-slideshow" aria-label="<%= t('blacklight_gallery.catalog.slideshow.start') %>">
20
+ <%= blacklight_icon 'start_slideshow' %>
21
+ </button>
22
+ </div>
15
23
  </div>
@@ -4,7 +4,8 @@
4
4
  <div class="modal-content">
5
5
  <div class="modal-header">
6
6
  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
7
- ×
7
+ <span class="sr-only">close</span>
8
+ <span aria-hidden="true">×</span>
8
9
  </button>
9
10
  </div>
10
11
  <div class="modal-body">
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "rails", '~> 5.1'
21
- spec.add_dependency 'blacklight', '~> 7.0'
21
+ spec.add_dependency 'blacklight', '~> 7.7'
22
22
  spec.add_dependency "bootstrap", "~> 4.0"
23
23
  spec.add_dependency "openseadragon", ">= 0.2.0"
24
24
 
@@ -9,7 +9,8 @@ ar:
9
9
  catalog:
10
10
  grid_slideshow:
11
11
  missing_image: "صورة غير موجودة"
12
- document_slideshow:
13
- header: "حدد صورة لبدء العرض المتتابع"
14
12
  modal_slideshow:
15
13
  counter: "%{counter} من %{count}"
14
+ slideshow:
15
+ pause: "وقفة عرض الشرائح"
16
+ start: "بدء عرض الشرائح"
@@ -1,5 +1,8 @@
1
1
  en:
2
2
  blacklight:
3
+ icon:
4
+ chevron_left_previous_image: 'previous image'
5
+ chevron_right_next_image: 'next image'
3
6
  search:
4
7
  view:
5
8
  gallery: "Gallery"
@@ -9,7 +12,8 @@ en:
9
12
  catalog:
10
13
  grid_slideshow:
11
14
  missing_image: 'Missing'
12
- document_slideshow:
13
- header: "Select an image to start the slideshow"
14
15
  modal_slideshow:
15
16
  counter: "%{counter} of %{count}"
17
+ slideshow:
18
+ pause: Pause slideshow
19
+ start: Start slideshow
@@ -9,7 +9,8 @@ es:
9
9
  catalog:
10
10
  grid_slideshow:
11
11
  missing_image: No hay nada
12
- document_slideshow:
13
- header: Selecione una imagen para empezar
14
12
  modal_slideshow:
15
13
  counter: "%{counter} de %{count}"
14
+ slideshow:
15
+ pause: Pausa la Diapositivas
16
+ start: Empezar la Diapositivas
@@ -9,7 +9,8 @@ fr:
9
9
  catalog:
10
10
  grid_slideshow:
11
11
  missing_image: 'Image manquante'
12
- document_slideshow:
13
- header: "Sélectionnez une image pour lancer le diaporama"
14
12
  modal_slideshow:
15
13
  counter: "%{counter} de %{count}"
14
+ slideshow:
15
+ pause: Suspendre le diaporama
16
+ start: Lancer le diaporama
@@ -9,7 +9,8 @@ it:
9
9
  catalog:
10
10
  grid_slideshow:
11
11
  missing_image: 'Mancante'
12
- document_slideshow:
13
- header: "Seleziona un immagine per l'avvio del slideshow"
14
12
  modal_slideshow:
15
13
  counter: "%{counter} di %{count}"
14
+ slideshow:
15
+ pause: Pausa del slideshow
16
+ start: Avvia del slideshow
@@ -13,3 +13,6 @@ pt-BR:
13
13
  header: "Selecione uma imagem para iniciar a apresentação de slides"
14
14
  modal_slideshow:
15
15
  counter: "%{counter} de %{count}"
16
+ slideshow:
17
+ pause: Pausar a apresentação de slides
18
+ start: Iniciar a apresentação de slides
@@ -9,7 +9,8 @@ zh:
9
9
  catalog:
10
10
  grid_slideshow:
11
11
  missing_image: '图片缺失'
12
- document_slideshow:
13
- header: '选择图片启动幻灯展示'
14
12
  modal_slideshow:
15
13
  counter: "%{counter} of %{count}"
14
+ slideshow:
15
+ pause: 暂停幻灯片展示
16
+ start: 启动幻灯片展示
@@ -4,7 +4,6 @@ module Blacklight
4
4
  module Gallery
5
5
  class Engine < Rails::Engine
6
6
  require 'openseadragon'
7
-
8
7
  end
9
8
  end
10
9
  end
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Gallery
3
- VERSION = "1.7.0"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  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: 1.7.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-13 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '7.0'
33
+ version: '7.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '7.0'
40
+ version: '7.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -240,9 +240,11 @@ files:
240
240
  - app/assets/images/blacklight/custom_fullscreen.svg
241
241
  - app/assets/images/blacklight/gallery.svg
242
242
  - app/assets/images/blacklight/masonry.svg
243
+ - app/assets/images/blacklight/pause_slideshow.svg
243
244
  - app/assets/images/blacklight/remove_circle.svg
244
245
  - app/assets/images/blacklight/resize_small.svg
245
246
  - app/assets/images/blacklight/slideshow.svg
247
+ - app/assets/images/blacklight/start_slideshow.svg
246
248
  - app/assets/javascripts/blacklight_gallery/default.js
247
249
  - app/assets/javascripts/blacklight_gallery/masonry.js
248
250
  - app/assets/javascripts/blacklight_gallery/osd_viewer.js
@@ -330,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
332
  - !ruby/object:Gem::Version
331
333
  version: '0'
332
334
  requirements: []
333
- rubygems_version: 3.1.1
335
+ rubygems_version: 3.0.3
334
336
  signing_key:
335
337
  specification_version: 4
336
338
  summary: Gallery display for Blacklight