blacklight-spotlight 4.0.1 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -9
- data/Rakefile +3 -3
- data/app/assets/javascripts/spotlight/spotlight.esm.js +144 -104
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +144 -104
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/javascript/spotlight/admin/blocks/oembed_block.js +2 -2
- data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +0 -2
- data/app/javascript/spotlight/admin/exhibits.js +2 -0
- data/app/javascript/spotlight/admin/form_observer.js +1 -1
- data/app/javascript/spotlight/admin/index.js +0 -1
- data/app/javascript/spotlight/admin/multi_image_selector.js +1 -1
- data/app/javascript/spotlight/admin/search_typeahead.js +2 -2
- data/app/javascript/spotlight/admin/spotlight_nestable.js +2 -2
- data/app/models/spotlight/featured_image.rb +5 -18
- data/lib/generators/spotlight/install_generator.rb +2 -10
- data/lib/spotlight/version.rb +1 -1
- data/vendor/assets/javascripts/parameterize.js +2 -0
- metadata +5 -5
@@ -30,8 +30,8 @@ SirTrevor.Blocks.Oembed = (function(){
|
|
30
30
|
</div>
|
31
31
|
<div class="row">
|
32
32
|
<div class="form-group mb-3 col-md-8">
|
33
|
-
<label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
|
34
|
-
<input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
|
33
|
+
<label for="${this.formId(this.id_key)}">${i18n.t("blocks:oembed:url")}</label>
|
34
|
+
<input name="${this.id_key}" class="form-control col-md-6" type="text" id="${this.formId(this.id_key)}" />
|
35
35
|
</div>
|
36
36
|
</div>
|
37
37
|
${this.text_area()}
|
@@ -12,8 +12,6 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
|
|
12
12
|
auto_play_images_interval_key: "auto-play-images-interval",
|
13
13
|
max_height_key: "max-height",
|
14
14
|
|
15
|
-
item_options: function() { return "" },
|
16
|
-
|
17
15
|
carouselCycleTimesInSeconds: {
|
18
16
|
values: [ 3, 5, 8, 12, 20 ],
|
19
17
|
selected: 5
|
@@ -66,7 +66,7 @@
|
|
66
66
|
$('li', thumbList).each(function(){
|
67
67
|
var thisThumb = $(this),
|
68
68
|
image = $('img', thisThumb),
|
69
|
-
totalWidth = width += thisThumb.width()
|
69
|
+
totalWidth = width += thisThumb.width(),
|
70
70
|
position = (thumbList.position().left + totalWidth) - thisThumb.width();
|
71
71
|
|
72
72
|
if(position >= 0 && position < viewportWidth) {
|
@@ -6,7 +6,7 @@ import { addImageSelector } from 'spotlight/admin/add_image_selector'
|
|
6
6
|
addAutocompleteBehavior($(this));
|
7
7
|
});
|
8
8
|
|
9
|
-
function addAutocompleteBehavior( typeAheadInput,
|
9
|
+
function addAutocompleteBehavior( typeAheadInput, _ ) {
|
10
10
|
var settings = $.extend({
|
11
11
|
displayKey: 'title',
|
12
12
|
minLength: 0,
|
@@ -63,4 +63,4 @@ export function addAutocompletetoFeaturedImage(){
|
|
63
63
|
$(this).attr('type', 'text');
|
64
64
|
});
|
65
65
|
}
|
66
|
-
}
|
66
|
+
}
|
@@ -27,7 +27,7 @@ const Module = (function() {
|
|
27
27
|
var children = data[i]['children'];
|
28
28
|
for(var child in children){
|
29
29
|
var id = children[child]['id']
|
30
|
-
child_node = findNode(id, container);
|
30
|
+
var child_node = findNode(id, container);
|
31
31
|
setWeight(child_node, weight++);
|
32
32
|
setParent(child_node, parent_id);
|
33
33
|
}
|
@@ -65,4 +65,4 @@ const Module = (function() {
|
|
65
65
|
}
|
66
66
|
})();
|
67
67
|
|
68
|
-
export default Module
|
68
|
+
export default Module
|
@@ -100,24 +100,11 @@ module Spotlight
|
|
100
100
|
# Ideally, we might create a join table to connect this model to where it is used, but 🤷♂️
|
101
101
|
# Instead, we check each place this might be used and touch it
|
102
102
|
def bust_containing_resource_caches
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
Spotlight::Resources::Upload.where(upload: self).touch_all
|
109
|
-
else
|
110
|
-
bust_containing_resource_caches_rails5
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
# Rails 5 doesn't support touch_all.
|
115
|
-
def bust_containing_resource_caches_rails5
|
116
|
-
Spotlight::Search.where(thumbnail: self).or(Spotlight::Search.where(masthead: self)).find_each(&:touch)
|
117
|
-
Spotlight::Page.where(thumbnail: self).find_each(&:touch)
|
118
|
-
Spotlight::Exhibit.where(thumbnail: self).or(Spotlight::Exhibit.where(masthead: self)).find_each(&:touch)
|
119
|
-
Spotlight::Contact.where(avatar: self).find_each(&:touch)
|
120
|
-
Spotlight::Resources::Upload.where(upload: self).find_each(&:touch)
|
103
|
+
Spotlight::Search.where(thumbnail: self).or(Spotlight::Search.where(masthead: self)).touch_all
|
104
|
+
Spotlight::Page.where(thumbnail: self).touch_all
|
105
|
+
Spotlight::Exhibit.where(thumbnail: self).or(Spotlight::Exhibit.where(masthead: self)).touch_all
|
106
|
+
Spotlight::Contact.where(avatar: self).touch_all
|
107
|
+
Spotlight::Resources::Upload.where(upload: self).touch_all
|
121
108
|
end
|
122
109
|
end
|
123
110
|
end
|
@@ -10,14 +10,6 @@ module Spotlight
|
|
10
10
|
class_option :solr_update_class, type: :string, default: 'Spotlight::SolrDocument::AtomicUpdates'
|
11
11
|
class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000
|
12
12
|
|
13
|
-
# we're not using webpacker, so we need to re-add sprockets functionality
|
14
|
-
def add_js_rails6
|
15
|
-
return unless Rails.version.to_i == 6
|
16
|
-
|
17
|
-
# By default rails generates javascript_pack_tag, we'll change this to javascript_include_tag
|
18
|
-
gsub_file 'app/views/layouts/application.html.erb', /pack/, 'include'
|
19
|
-
end
|
20
|
-
|
21
13
|
def add_manifest
|
22
14
|
append_to_file 'app/assets/javascripts/application.js', "\n//= require_tree .\n"
|
23
15
|
append_to_file 'app/assets/config/manifest.js', "\n//= link spotlight/manifest.js"
|
@@ -42,7 +34,7 @@ module Spotlight
|
|
42
34
|
|
43
35
|
def riiif
|
44
36
|
gem 'riiif'
|
45
|
-
Bundler.
|
37
|
+
Bundler.with_unbundled_env { run 'bundle install' }
|
46
38
|
route "mount Riiif::Engine => '/images', as: 'riiif'"
|
47
39
|
copy_file 'config/initializers/riiif.rb'
|
48
40
|
end
|
@@ -194,7 +186,7 @@ module Spotlight
|
|
194
186
|
|
195
187
|
def bundle_install
|
196
188
|
inside destination_root do
|
197
|
-
Bundler.
|
189
|
+
Bundler.with_unbundled_env { run 'bundle install' }
|
198
190
|
end
|
199
191
|
end
|
200
192
|
end
|
data/lib/spotlight/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-09-
|
14
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -459,7 +459,7 @@ dependencies:
|
|
459
459
|
requirements:
|
460
460
|
- - ">="
|
461
461
|
- !ruby/object:Gem::Version
|
462
|
-
version: '
|
462
|
+
version: '7.0'
|
463
463
|
- - "<"
|
464
464
|
- !ruby/object:Gem::Version
|
465
465
|
version: '8'
|
@@ -469,7 +469,7 @@ dependencies:
|
|
469
469
|
requirements:
|
470
470
|
- - ">="
|
471
471
|
- !ruby/object:Gem::Version
|
472
|
-
version: '
|
472
|
+
version: '7.0'
|
473
473
|
- - "<"
|
474
474
|
- !ruby/object:Gem::Version
|
475
475
|
version: '8'
|
@@ -1572,7 +1572,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1572
1572
|
- !ruby/object:Gem::Version
|
1573
1573
|
version: '0'
|
1574
1574
|
requirements: []
|
1575
|
-
rubygems_version: 3.
|
1575
|
+
rubygems_version: 3.4.19
|
1576
1576
|
signing_key:
|
1577
1577
|
specification_version: 4
|
1578
1578
|
summary: Enable librarians, curators, and others who are responsible for digital collections
|