blacklight 7.20.0 → 7.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +8 -3
- data/app/javascript/blacklight/core.js +4 -1
- data/blacklight.gemspec +1 -1
- data/package.json +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee4c46b8533bb359a6619ef6dddd96b4de1449b4bfc96db65a357469bebc7cc1
|
4
|
+
data.tar.gz: 9eecbab00d1484a3e417bd60245479fc58d6bd9c41a7b16be91d3cef056846a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d968403618ee1d25fac527cea64467e3be78040e0d58e8d672463b94c22f272ff7b30fec66af576084bf2a9e8d169a7d3bec9b58b0d1187bb8ffc5bdab2f21
|
7
|
+
data.tar.gz: 31855c12d2d58eb7863aa90a4b60c106d208b302460bd0f263fdd32baf8d6025f94025cdf953c82a42220a403c2d0eeae367e7729c7f714f8bc19d23bb561974
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.20.
|
1
|
+
7.20.1
|
@@ -38,6 +38,7 @@ Blacklight.listeners().forEach(function (listener) {
|
|
38
38
|
});
|
39
39
|
Blacklight.onLoad(function () {
|
40
40
|
const elem = document.querySelector('.no-js');
|
41
|
+
if (!elem) return;
|
41
42
|
elem.classList.remove('no-js');
|
42
43
|
elem.classList.add('js');
|
43
44
|
});
|
@@ -450,7 +451,11 @@ Blacklight.doSearchContextBehavior = function () {
|
|
450
451
|
Blacklight.handleSearchContextMethod.call(e.currentTarget, e);
|
451
452
|
});
|
452
453
|
});
|
453
|
-
};
|
454
|
+
};
|
455
|
+
|
456
|
+
Blacklight.csrfToken = () => document.querySelector('meta[name=csrf-token]')?.content;
|
457
|
+
|
458
|
+
Blacklight.csrfParam = () => document.querySelector('meta[name=csrf-param]')?.content; // this is the Rails.handleMethod with a couple adjustments, described inline:
|
454
459
|
// first, we're attaching this directly to the event handler, so we can check for meta-keys
|
455
460
|
|
456
461
|
|
@@ -464,8 +469,8 @@ Blacklight.handleSearchContextMethod = function (event) {
|
|
464
469
|
|
465
470
|
let href = link.getAttribute('data-context-href');
|
466
471
|
let target = link.getAttribute('target');
|
467
|
-
let csrfToken =
|
468
|
-
let csrfParam =
|
472
|
+
let csrfToken = Blacklight.csrfToken();
|
473
|
+
let csrfParam = Blacklight.csrfParam();
|
469
474
|
let form = document.createElement('form');
|
470
475
|
form.method = 'post';
|
471
476
|
form.action = href;
|
@@ -39,7 +39,10 @@ Blacklight.listeners().forEach(function(listener) {
|
|
39
39
|
})
|
40
40
|
|
41
41
|
Blacklight.onLoad(function () {
|
42
|
-
const elem = document.querySelector('.no-js')
|
42
|
+
const elem = document.querySelector('.no-js');
|
43
|
+
|
44
|
+
if (!elem) return;
|
45
|
+
|
43
46
|
elem.classList.remove('no-js')
|
44
47
|
elem.classList.add('js')
|
45
48
|
})
|
data/blacklight.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_dependency "deprecation"
|
33
33
|
s.add_dependency "i18n", '>= 1.7.0' # added named parameters
|
34
34
|
s.add_dependency "ostruct", '>= 0.3.2'
|
35
|
-
s.add_dependency "view_component", '~> 2.42
|
35
|
+
s.add_dependency "view_component", '~> 2.42'
|
36
36
|
|
37
37
|
s.add_development_dependency "rsolr", ">= 1.0.6", "< 3" # Library for interacting with rSolr.
|
38
38
|
s.add_development_dependency "rspec-rails", "~> 4.0.0.beta2"
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "blacklight-frontend",
|
3
|
-
"version": "7.20.
|
3
|
+
"version": "7.20.1",
|
4
4
|
"description": "[![Build Status](https://travis-ci.com/projectblacklight/blacklight.png?branch=master)](https://travis-ci.com/projectblacklight/blacklight) [![Gem Version](https://badge.fury.io/rb/blacklight.png)](http://badge.fury.io/rb/blacklight) [![Coverage Status](https://coveralls.io/repos/github/projectblacklight/blacklight/badge.svg?branch=master)](https://coveralls.io/github/projectblacklight/blacklight?branch=master)",
|
5
5
|
"main": "app/assets/javascripts/blacklight",
|
6
6
|
"scripts": {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.20.
|
4
|
+
version: 7.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2021-11-
|
20
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|
@@ -129,14 +129,14 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 2.42
|
132
|
+
version: '2.42'
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.42
|
139
|
+
version: '2.42'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: rsolr
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -933,7 +933,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
933
933
|
- !ruby/object:Gem::Version
|
934
934
|
version: '0'
|
935
935
|
requirements: []
|
936
|
-
rubygems_version: 3.1.
|
936
|
+
rubygems_version: 3.1.4
|
937
937
|
signing_key:
|
938
938
|
specification_version: 4
|
939
939
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|