blacklight 7.1.0 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.jshintrc +3 -1
  3. data/.rubocop_todo.yml +8 -8
  4. data/.travis.yml +13 -13
  5. data/CONTRIBUTING.md +3 -1
  6. data/Gemfile +2 -0
  7. data/VERSION +1 -1
  8. data/app/assets/images/blacklight/list.svg +1 -1
  9. data/app/assets/images/blacklight/search.svg +1 -1
  10. data/app/assets/javascripts/blacklight/blacklight.js +82 -70
  11. data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +17 -13
  12. data/app/assets/stylesheets/blacklight/_facets.scss +3 -0
  13. data/app/assets/stylesheets/blacklight/_header.scss +26 -0
  14. data/app/assets/stylesheets/blacklight/_icons.scss +6 -6
  15. data/app/assets/stylesheets/blacklight/_mixins.scss +3 -3
  16. data/app/controllers/concerns/blacklight/facet.rb +1 -7
  17. data/app/helpers/blacklight/catalog_helper_behavior.rb +16 -17
  18. data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
  19. data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
  20. data/app/javascript/blacklight/button_focus.js +9 -0
  21. data/app/javascript/blacklight/facet_load.js +18 -19
  22. data/app/javascript/blacklight/search_context.js +67 -49
  23. data/app/models/blacklight/icon.rb +26 -5
  24. data/app/presenters/blacklight/search_bar_presenter.rb +3 -1
  25. data/app/views/catalog/_bookmark_control.html.erb +11 -13
  26. data/app/views/catalog/_facet_group.html.erb +1 -1
  27. data/app/views/catalog/_facet_layout.html.erb +9 -2
  28. data/app/views/catalog/_facets.html.erb +1 -1
  29. data/app/views/catalog/_per_page_widget.html.erb +1 -1
  30. data/app/views/catalog/_search_form.html.erb +1 -1
  31. data/app/views/catalog/_search_results.html.erb +4 -0
  32. data/app/views/catalog/_sort_widget.html.erb +1 -1
  33. data/app/views/layouts/blacklight.html.erb +2 -2
  34. data/app/views/layouts/blacklight/base.html.erb +14 -8
  35. data/config/locales/blacklight.de.yml +17 -2
  36. data/config/locales/blacklight.en.yml +17 -2
  37. data/config/locales/blacklight.es.yml +17 -2
  38. data/config/locales/blacklight.fr.yml +17 -2
  39. data/config/locales/blacklight.hu.yml +17 -3
  40. data/config/locales/blacklight.it.yml +17 -2
  41. data/config/locales/blacklight.nl.yml +17 -3
  42. data/config/locales/blacklight.pt-BR.yml +17 -2
  43. data/config/locales/blacklight.sq.yml +17 -2
  44. data/config/locales/blacklight.zh.yml +17 -3
  45. data/lib/blacklight/configuration.rb +6 -0
  46. data/lib/blacklight/engine.rb +5 -4
  47. data/lib/blacklight/solr.rb +2 -0
  48. data/{app/models/concerns → lib}/blacklight/solr/document.rb +0 -0
  49. data/{app/models → lib}/blacklight/solr/facet_paginator.rb +0 -0
  50. data/lib/blacklight/solr/response/group_response.rb +10 -0
  51. data/lib/blacklight/solr/response/pagination_methods.rb +12 -0
  52. data/lib/generators/blacklight/assets_generator.rb +4 -1
  53. data/package-lock.json +1 -1
  54. data/package.json +2 -2
  55. data/spec/features/facets_spec.rb +22 -1
  56. data/spec/features/search_filters_spec.rb +25 -5
  57. data/spec/helpers/blacklight/layout_helper_behavior_spec.rb +4 -4
  58. data/spec/helpers/catalog_helper_spec.rb +0 -9
  59. data/spec/models/blacklight/icon_spec.rb +25 -1
  60. data/spec/models/blacklight/solr/response/group_response_spec.rb +13 -0
  61. data/spec/models/blacklight/solr/response_spec.rb +3 -0
  62. data/spec/presenters/blacklight/search_bar_presenter_spec.rb +15 -0
  63. data/spec/views/catalog/_facet_group.html.erb_spec.rb +82 -0
  64. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +1 -1
  65. data/spec/views/catalog/_facets.html.erb_spec.rb +5 -66
  66. metadata +7 -5
  67. data/app/javascript/blacklight/collapsable.js +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1781363312295e0871899850efea8278e255485d84991ad9e5ce1c798eba9680
4
- data.tar.gz: 2be4ffe011dc4a8c96d58097db27c768422fb24b2528cd9cbc8d91cf80728072
3
+ metadata.gz: 00a998f008fdf60cfe8e5623d8230c040e82f3a43daed779ad0aa276361b6050
4
+ data.tar.gz: 2ec969ac9ad9f859206c684d3380945345c175362dae5e0fc785d7aa9d4a697e
5
5
  SHA512:
6
- metadata.gz: 737b9592762ed056e36f6d41a5560387764bf01643bcfee555c0bc8e17ddf7d6d663161a6bc777c41d0cdbf8e157ae42ab2ed92f4d596dbeac0409b76a4d8a17
7
- data.tar.gz: 62e3b74deba357f21e09145d6fcd25a241d05b1fbcd6ca3e40c3794fca3fe202074e8bab9ecbb2dac21b1980db54a9cee6af62144fe6545760b9d135ba4cfed7
6
+ metadata.gz: 67616cd584f0210b58b23de20c4c216e0f10ac9e547458b1eb98c34d6169372f42ca43b2131e804d9d0846c77218db81e36947223e5e96f8e470158a65bddfe9
7
+ data.tar.gz: 37a72f8450db7388d77764ff430b12962febc213a0a3cb8f5e1a84bff134dc1edbf2f79f08bf4f68980c71d4b47ccea7396554f99dfb6ea50847ea729851396f
data/.jshintrc CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "asi": true,
2
3
  "browser": true,
3
4
  "jquery": true,
4
5
  "node": true,
@@ -15,6 +16,7 @@
15
16
  "unused": true,
16
17
  "eqnull": true,
17
18
  "predef": [
18
- "Blacklight"
19
+ "Blacklight",
20
+ "Rails"
19
21
  ]
20
22
  }
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-08-05 11:45:43 -0500 using RuboCop version 0.63.1.
3
+ # on 2019-09-11 10:59:32 -0500 using RuboCop version 0.63.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -36,7 +36,7 @@ Layout/ClosingParenthesisIndentation:
36
36
  Exclude:
37
37
  - 'app/views/catalog/index.atom.builder'
38
38
 
39
- # Offense count: 109
39
+ # Offense count: 108
40
40
  # Cop supports --auto-correct.
41
41
  Layout/EmptyLineAfterMagicComment:
42
42
  Enabled: false
@@ -185,7 +185,7 @@ Lint/UselessComparison:
185
185
  Exclude:
186
186
  - 'spec/models/blacklight/document/active_model_shim_spec.rb'
187
187
 
188
- # Offense count: 57
188
+ # Offense count: 58
189
189
  Metrics/AbcSize:
190
190
  Max: 49
191
191
 
@@ -245,10 +245,10 @@ Naming/UncommunicativeMethodParamName:
245
245
  Exclude:
246
246
  - 'app/models/blacklight/facet_paginator.rb'
247
247
  - 'app/models/concerns/blacklight/document.rb'
248
- - 'app/models/concerns/blacklight/solr/document.rb'
249
248
  - 'app/presenters/blacklight/rendering/link_to_facet.rb'
250
249
  - 'lib/blacklight/nested_open_struct_with_hash_access.rb'
251
250
  - 'lib/blacklight/search_state.rb'
251
+ - 'lib/blacklight/solr/document.rb'
252
252
  - 'lib/blacklight/solr/search_builder_behavior.rb'
253
253
  - 'spec/features/search_context_spec.rb'
254
254
  - 'spec/features/search_results_spec.rb'
@@ -290,7 +290,7 @@ RSpec/BeforeAfterAll:
290
290
  - 'spec/models/blacklight/document/sms_spec.rb'
291
291
  - 'spec/models/blacklight/solr/document_spec.rb'
292
292
 
293
- # Offense count: 70
293
+ # Offense count: 71
294
294
  # Configuration parameters: Prefixes.
295
295
  # Prefixes: when, with, without
296
296
  RSpec/ContextWording:
@@ -330,7 +330,7 @@ RSpec/FilePath:
330
330
  - 'spec/presenters/pipeline_spec.rb'
331
331
  - 'spec/presenters/thumbnail_presenter_spec.rb'
332
332
 
333
- # Offense count: 197
333
+ # Offense count: 196
334
334
  # Configuration parameters: AssignmentOnly.
335
335
  RSpec/InstanceVariable:
336
336
  Enabled: false
@@ -386,7 +386,7 @@ RSpec/MessageSpies:
386
386
  RSpec/MultipleExpectations:
387
387
  Max: 16
388
388
 
389
- # Offense count: 329
389
+ # Offense count: 332
390
390
  # Configuration parameters: IgnoreSharedExamples.
391
391
  RSpec/NamedSubject:
392
392
  Enabled: false
@@ -587,9 +587,9 @@ Style/NumericPredicate:
587
587
  Exclude:
588
588
  - 'spec/**/*'
589
589
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
590
- - 'app/models/blacklight/solr/facet_paginator.rb'
591
590
  - 'app/services/blacklight/search_service.rb'
592
591
  - 'lib/blacklight/search_builder.rb'
592
+ - 'lib/blacklight/solr/facet_paginator.rb'
593
593
  - 'lib/blacklight/solr/response/facets.rb'
594
594
  - 'lib/blacklight/solr/search_builder_behavior.rb'
595
595
  - 'lib/railties/blacklight.rake'
@@ -8,20 +8,20 @@ notifications:
8
8
 
9
9
  matrix:
10
10
  include:
11
- - rvm: 2.6.0
12
- env: "RAILS_VERSION=5.2.2"
13
- - rvm: 2.5.3
14
- env: "RAILS_VERSION=5.1.6"
15
- - rvm: 2.4.5
16
- env: "RAILS_VERSION=5.2.1"
17
- - rvm: 2.5.3
18
- env: "RAILS_VERSION=5.2.1 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\""
19
- - rvm: 2.4.5
20
- env: "RAILS_VERSION=5.1.6"
21
- - rvm: jruby-9.2.0.0
22
- env: "RAILS_VERSION=5.1.6 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
11
+ - rvm: 2.6.5
12
+ env: "RAILS_VERSION=5.2.3"
13
+ - rvm: 2.5.7
14
+ env: "RAILS_VERSION=5.1.7"
15
+ - rvm: 2.4.9
16
+ env: "RAILS_VERSION=5.2.3"
17
+ - rvm: 2.5.7
18
+ env: "RAILS_VERSION=5.2.3 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\""
19
+ - rvm: 2.4.9
20
+ env: "RAILS_VERSION=5.1.7"
21
+ - rvm: jruby-9.2.8.0
22
+ env: "RAILS_VERSION=5.1.7 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
23
23
  allow_failures:
24
- - rvm: jruby-9.2.0.0
24
+ - rvm: jruby-9.2.8.0
25
25
  fast_finish: true
26
26
 
27
27
  before_install:
@@ -20,11 +20,13 @@ Let us know you're interested in working on a feature by filing a ticket in our
20
20
 
21
21
  ## Pull Requests and Code Review
22
22
  - Pull requests must be reviewed and approved by one non-author with write-permissions
23
+ - If additional code changes are made after approval, another approval (from the same or another qualified person) is required.
23
24
  - A reviewer who has approved a PR but has not merged it should provide a comment (e.g. "This looks good, I'm just waiting for Travis to build", "This is a breaking change. I would like at least one more reviewer.")
24
25
  - An approved PR may be merged by the reviewer, the author, or another committer
26
+ - Additional discussion and feedback by non-maintainers is heartily encouraged.
25
27
 
26
28
  ## Support
27
- If you are interested in working on the Blacklight plugin, but want guidance or support, please send an email to our [Blacklight-development mailing list](http://groups.google.com/group/blacklight-development) and we'll be glad to help.
29
+ If you are interested in working on the Blacklight plugin, but want guidance or support, please send an email to our [Blacklight-development mailing list](http://groups.google.com/group/blacklight-development) and we'll be glad to help. The #blacklight channel on [code4lib Slack](https://code4lib.org/irc/) is another active forum for informal discussion and troubleshooting.
28
30
 
29
31
  ## Becoming a Committer
30
32
 
data/Gemfile CHANGED
@@ -34,6 +34,8 @@ else
34
34
  end
35
35
 
36
36
  case ENV['RAILS_VERSION']
37
+ when /^5.[12]/
38
+ gem 'sass-rails', '~> 5.0'
37
39
  when /^4.2/
38
40
  gem 'responders', '~> 2.0'
39
41
  gem 'sass-rails', '>= 5.0'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.1.0
1
+ 7.2.0
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><style>.a{stroke-width:2;}</style><title>List</title><desc> Created with Sketch.</desc><g fill="none"><path d="M4.9 2L14 2" class="a"/><path d="M5 6L14 6" class="a"/><path d="M5 10L14 10" class="a"/><path d="M5 14L14 14" class="a"/><circle cx="2" cy="2" r="1"/><circle cx="2" cy="6" r="1"/><circle cx="2" cy="10" r="1"/><circle cx="2" cy="14" r="1"/></g></svg>
1
+ <svg width="14" height="14" xmlns="http://www.w3.org/2000/svg"><circle cx="1" cy="1" r="1"/><circle cx="1" cy="5" r="1"/><circle cx="1" cy="9" r="1"/><circle cx="1" cy="13" r="1"/><path d="M4 8.5h9v1H4zM4 4.5h9v1H4zM4 .5h9v1H4zM4 12.5h9v1H4z"/></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><title>Search</title><g fill="none"><g stroke="#000"><circle cx="6" cy="6" r="5"/><path d="M14 14L10 10" style="stroke-linejoin:round;stroke-width:2"/></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
@@ -95,6 +95,16 @@ Blacklight.onLoad(function () {
95
95
  Blacklight.doBookmarkToggleBehavior();
96
96
  });
97
97
  })(jQuery);
98
+
99
+ Blacklight.onLoad(function () {
100
+ // Button clicks should change focus. As of 10/3/19, Firefox for Mac and
101
+ // Safari both do not set focus to a button on button click.
102
+ document.querySelectorAll('button.collapse-toggle').forEach(button => {
103
+ button.addEventListener('click', () => {
104
+ event.target.focus();
105
+ });
106
+ });
107
+ });
98
108
  /* A JQuery plugin (should this be implemented as a widget instead? not sure)
99
109
  that will convert a "toggle" form, with single submit button to add/remove
100
110
  something, like used for Bookmarks, into an AJAXy checkbox instead.
@@ -126,7 +136,6 @@ Blacklight.onLoad(function () {
126
136
  });
127
137
  */
128
138
 
129
-
130
139
  (function ($) {
131
140
  $.fn.blCheckboxSubmit = function (argOpts) {
132
141
  this.each(function () {
@@ -216,42 +225,32 @@ Blacklight.onLoad(function () {
216
225
 
217
226
  };
218
227
  })(jQuery);
219
-
220
- (function ($) {
221
- Blacklight.onLoad(function () {
222
- // when clicking on a link that toggles the collapsing behavior, don't do anything
223
- // with the hash or the page could jump around.
224
- $(document).on('click', 'a[data-toggle=collapse][href="#"], [data-toggle=collapse] a[href="#"]', function (event) {
225
- event.preventDefault();
226
- });
227
- });
228
- })(jQuery);
229
228
  /*global Blacklight */
230
229
 
231
230
 
232
- (function ($) {
233
- 'use strict';
231
+ 'use strict';
234
232
 
235
- Blacklight.doResizeFacetLabelsAndCounts = function () {
236
- // adjust width of facet columns to fit their contents
237
- function longer(a, b) {
238
- return b.textContent.length - a.textContent.length;
239
- }
233
+ Blacklight.doResizeFacetLabelsAndCounts = function () {
234
+ // adjust width of facet columns to fit their contents
235
+ function longer(a, b) {
236
+ return b.textContent.length - a.textContent.length;
237
+ }
240
238
 
241
- $('ul.facet-values, ul.pivot-facet').each(function () {
242
- var longest = $(this).find('span.facet-count').sort(longer)[0];
239
+ document.querySelectorAll('.facet-values, .pivot-facet').forEach(function (elem) {
240
+ const nodes = elem.querySelectorAll('.facet-count'); // TODO: when we drop ie11 support, this can become the spread operator:
243
241
 
244
- if (longest && longest.textContent) {
245
- var width = longest.textContent.length + 1 + 'ch';
246
- $(this).find('.facet-count').first().width(width);
247
- }
248
- });
249
- };
242
+ const longest = Array.from(nodes).sort(longer)[0];
250
243
 
251
- Blacklight.onLoad(function () {
252
- Blacklight.doResizeFacetLabelsAndCounts();
244
+ if (longest && longest.textContent) {
245
+ const width = longest.textContent.length + 1 + 'ch';
246
+ elem.querySelector('.facet-count').style.width = width;
247
+ }
253
248
  });
254
- })(jQuery);
249
+ };
250
+
251
+ Blacklight.onLoad(function () {
252
+ Blacklight.doResizeFacetLabelsAndCounts();
253
+ });
255
254
  /*
256
255
  The blacklight modal plugin can display some interactions inside a Bootstrap
257
256
  modal window, including some multi-page interactions.
@@ -327,7 +326,6 @@ Blacklight.onLoad(function () {
327
326
  // We keep all our data in Blacklight.modal object.
328
327
  // Create lazily if someone else created first.
329
328
 
330
-
331
329
  if (Blacklight.modal === undefined) {
332
330
  Blacklight.modal = {};
333
331
  } // a Bootstrap modal div that should be already on the page hidden
@@ -432,54 +430,68 @@ Blacklight.onLoad(function () {
432
430
  Blacklight.modal.setupModal();
433
431
  });
434
432
 
435
- (function ($) {
436
- Blacklight.doSearchContextBehavior = function () {
437
- if (typeof Blacklight.do_search_context_behavior == 'function') {
438
- console.warn("do_search_context_behavior is deprecated. Use doSearchContextBehavior instead.");
439
- return Blacklight.do_search_context_behavior();
440
- }
433
+ Blacklight.doSearchContextBehavior = function () {
434
+ if (typeof Blacklight.do_search_context_behavior == 'function') {
435
+ console.warn("do_search_context_behavior is deprecated. Use doSearchContextBehavior instead.");
436
+ return Blacklight.do_search_context_behavior();
437
+ }
441
438
 
442
- $('a[data-context-href]').on('click.search-context', Blacklight.handleSearchContextMethod);
443
- }; // this is the $.rails.handleMethod with a couple adjustments, described inline:
444
- // first, we're attaching this directly to the event handler, so we can check for meta-keys
439
+ const elements = document.querySelectorAll('a[data-context-href]'); // Equivalent to Array.from(), but supports ie11
445
440
 
441
+ const nodes = Array.prototype.slice.call(elements);
442
+ nodes.forEach(function (element) {
443
+ element.addEventListener('click', function (e) {
444
+ Blacklight.handleSearchContextMethod.call(e.target, e);
445
+ });
446
+ });
447
+ }; // this is the Rails.handleMethod with a couple adjustments, described inline:
448
+ // first, we're attaching this directly to the event handler, so we can check for meta-keys
446
449
 
447
- Blacklight.handleSearchContextMethod = function (event) {
448
- if (typeof Blacklight.handle_search_context_method == 'function') {
449
- console.warn("handle_search_context_method is deprecated. Use handleSearchContextMethod instead.");
450
- return Blacklight.handle_search_context_method(event);
451
- }
452
450
 
453
- var link = $(this); // instead of using the normal href, we need to use the context href instead
451
+ Blacklight.handleSearchContextMethod = function (event) {
452
+ if (typeof Blacklight.handle_search_context_method == 'function') {
453
+ console.warn("handle_search_context_method is deprecated. Use handleSearchContextMethod instead.");
454
+ return Blacklight.handle_search_context_method(event);
455
+ }
454
456
 
455
- var href = link.data('context-href'),
456
- method = 'post',
457
- target = link.attr('target'),
458
- csrfToken = $('meta[name=csrf-token]').attr('content'),
459
- csrfParam = $('meta[name=csrf-param]').attr('content'),
460
- form = $('<form method="post" action="' + href + '"></form>'),
461
- metadataInput = '<input name="_method" value="' + method + '" type="hidden" />',
462
- redirectHref = '<input name="redirect" value="' + link.attr('href') + '" type="hidden" />'; // check for meta keys.. if set, we should open in a new tab
457
+ var link = this; // instead of using the normal href, we need to use the context href instead
463
458
 
464
- if (event.metaKey || event.ctrlKey) {
465
- target = '_blank';
466
- }
459
+ let href = link.getAttribute('data-context-href');
460
+ let target = link.getAttribute('target');
461
+ let csrfToken = Rails.csrfToken();
462
+ let csrfParam = Rails.csrfParam();
463
+ let form = document.createElement('form');
464
+ form.method = 'post';
465
+ form.action = href;
466
+ let formContent = `<input name="_method" value="post" type="hidden" />
467
+ <input name="redirect" value="${link.getAttribute('href')}" type="hidden" />`; // check for meta keys.. if set, we should open in a new tab
467
468
 
468
- if (csrfParam !== undefined && csrfToken !== undefined) {
469
- metadataInput += '<input name="' + csrfParam + '" value="' + csrfToken + '" type="hidden" />';
470
- }
469
+ if (event.metaKey || event.ctrlKey) {
470
+ target = '_blank';
471
+ }
471
472
 
472
- if (target) {
473
- form.attr('target', target);
474
- }
473
+ if (csrfParam !== undefined && csrfToken !== undefined) {
474
+ formContent += `<input name="${csrfParam}" value="${csrfToken}" type="hidden" />`;
475
+ } // Must trigger submit by click on a button, else "submit" event handler won't work!
476
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit
475
477
 
476
- form.hide().append(metadataInput).append(redirectHref).appendTo('body');
477
- form.submit();
478
- return false;
479
- };
480
478
 
481
- Blacklight.onLoad(function () {
482
- Blacklight.doSearchContextBehavior();
483
- });
484
- })(jQuery);
479
+ formContent += '<input type="submit" />';
480
+
481
+ if (target) {
482
+ form.setAttribute('target', target);
483
+ }
484
+
485
+ form.style.display = 'none';
486
+ form.innerHTML = formContent;
487
+ document.body.appendChild(form);
488
+ form.querySelector('[type="submit"]').click();
489
+ event.preventDefault();
490
+ event.stopPropagation();
491
+ event.stopImmediatePropagation();
492
+ };
493
+
494
+ Blacklight.onLoad(function () {
495
+ Blacklight.doSearchContextBehavior();
496
+ });
485
497
 
@@ -2,26 +2,30 @@
2
2
  @extend .py-2;
3
3
  }
4
4
 
5
- .card-header.collapse-toggle {
6
- margin-bottom: 0;
5
+ // Facet field headings and buttons
6
+ .facet-field-heading {
7
+ border-bottom: 0;
8
+
9
+ button {
10
+ font-weight: $headings-font-weight;
7
11
 
8
- &::after {
9
- content: "❯";
10
- float: right;
11
- transform: rotate(90deg);
12
- }
12
+ &::after {
13
+ content: "❯";
14
+ float: right;
15
+ transform: rotate(90deg);
16
+ }
13
17
 
14
- &.collapsed {
15
- border-bottom: 0;
18
+ &.collapsed {
19
+ border-bottom: 0;
16
20
 
17
- &::after {
18
- transform: rotate(0deg);
19
- transition: transform 0.1s ease;
21
+ &::after {
22
+ transform: rotate(0deg);
23
+ transition: transform 0.1s ease;
24
+ }
20
25
  }
21
26
  }
22
27
  }
23
28
 
24
-
25
29
  .page-link {
26
30
  white-space: nowrap;
27
31
  }
@@ -123,6 +123,9 @@
123
123
  a {
124
124
  color: inherit;
125
125
  }
126
+
127
+ /* This prevents the contained stretch link from covering the panel body */
128
+ position: relative
126
129
  }
127
130
 
128
131
  /* Sidenav
@@ -53,3 +53,29 @@
53
53
  }
54
54
  }
55
55
  }
56
+
57
+ #skip-link {
58
+ position: absolute;
59
+ top: 5px;
60
+ left: 10px;
61
+ z-index: 1;
62
+
63
+ .element-invisible {
64
+ position: absolute !important;
65
+ clip: rect(1px, 1px, 1px, 1px);
66
+ overflow: hidden;
67
+ height: 1px;
68
+ }
69
+
70
+ .element-invisible.element-focusable:active,
71
+ .element-invisible.element-focusable:focus {
72
+ position: static !important;
73
+ clip: auto;
74
+ overflow: visible;
75
+ height: auto;
76
+ }
77
+
78
+ a:focus {
79
+ background-color: $white;
80
+ }
81
+ }