blacklight-spotlight 3.6.0.beta9 → 4.0.0

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.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spotlight/spotlight.esm.js +34 -34
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  4. data/app/assets/javascripts/spotlight/spotlight.js +34 -34
  5. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  6. data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +0 -8
  7. data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +2 -1
  8. data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +0 -5
  9. data/app/assets/stylesheets/spotlight/_catalog.scss +6 -3
  10. data/app/assets/stylesheets/spotlight/_mixins.scss +2 -1
  11. data/app/assets/stylesheets/spotlight/_pages.scss +2 -1
  12. data/app/assets/stylesheets/spotlight/_report_a_problem.scss +2 -1
  13. data/app/assets/stylesheets/spotlight/_translations.scss +0 -6
  14. data/app/assets/stylesheets/spotlight/_utilities.scss +0 -4
  15. data/app/components/spotlight/document_component.rb +1 -1
  16. data/app/javascript/spotlight/admin/block_mixins/plustextable.js +1 -1
  17. data/app/javascript/spotlight/admin/blocks/browse_block.js +2 -2
  18. data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +1 -1
  19. data/app/javascript/spotlight/admin/blocks/oembed_block.js +1 -1
  20. data/app/javascript/spotlight/admin/blocks/resources_block.js +3 -3
  21. data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +5 -5
  22. data/app/javascript/spotlight/admin/blocks/solr_documents_features_block.js +5 -5
  23. data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +5 -5
  24. data/app/javascript/spotlight/admin/users.js +6 -6
  25. data/app/javascript/spotlight/user/report_a_problem.js +1 -1
  26. data/app/javascript/spotlight/user/zpr_links.js +3 -3
  27. data/app/models/sir_trevor_rails/blocks/solr_documents_carousel_block.rb +5 -2
  28. data/app/models/spotlight/resources/upload.rb +2 -2
  29. data/app/views/catalog/_add_tags.html.erb +4 -4
  30. data/app/views/catalog/_bulk_actions.html.erb +2 -2
  31. data/app/views/catalog/_change_visibility.html.erb +3 -3
  32. data/app/views/catalog/_remove_tags.html.erb +5 -5
  33. data/app/views/catalog/_save_search.html.erb +5 -5
  34. data/app/views/shared/_curated_features_navbar.html.erb +1 -1
  35. data/app/views/shared/_exhibit_navbar.html.erb +1 -1
  36. data/app/views/shared/_header_navbar.html.erb +1 -1
  37. data/app/views/shared/_user_util_links.html.erb +2 -2
  38. data/app/views/spotlight/admin_users/index.html.erb +6 -6
  39. data/app/views/spotlight/appearances/edit.html.erb +4 -4
  40. data/app/views/spotlight/browse/_search_box.html.erb +2 -2
  41. data/app/views/spotlight/browse/index.html.erb +1 -1
  42. data/app/views/spotlight/browse/show.html.erb +1 -1
  43. data/app/views/spotlight/bulk_updates/_download.html.erb +2 -2
  44. data/app/views/spotlight/bulk_updates/_upload.html.erb +17 -7
  45. data/app/views/spotlight/bulk_updates/edit.html.erb +3 -3
  46. data/app/views/spotlight/catalog/_admin_header.html.erb +1 -1
  47. data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +1 -1
  48. data/app/views/spotlight/catalog/_document_visibility_control.html.erb +1 -1
  49. data/app/views/spotlight/catalog/_edit_default.html.erb +1 -1
  50. data/app/views/spotlight/contacts/_form.html.erb +3 -3
  51. data/app/views/spotlight/custom_fields/_form.html.erb +2 -2
  52. data/app/views/spotlight/custom_fields/form_group/_text.html.erb +3 -3
  53. data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +3 -3
  54. data/app/views/spotlight/custom_search_fields/_form.html.erb +1 -1
  55. data/app/views/spotlight/dashboards/_analytics.html.erb +2 -2
  56. data/app/views/spotlight/exhibits/_contact.html.erb +1 -1
  57. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +1 -1
  58. data/app/views/spotlight/exhibits/_form.html.erb +4 -4
  59. data/app/views/spotlight/exhibits/_import.html.erb +1 -1
  60. data/app/views/spotlight/exhibits/_languages.html.erb +1 -1
  61. data/app/views/spotlight/exhibits/edit.html.erb +6 -6
  62. data/app/views/spotlight/exhibits/index.html.erb +3 -3
  63. data/app/views/spotlight/featured_images/_form.html.erb +4 -4
  64. data/app/views/spotlight/featured_images/_upload_form.html.erb +3 -3
  65. data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
  66. data/app/views/spotlight/job_trackers/show.html.erb +3 -3
  67. data/app/views/spotlight/locks/_lock.html.erb +1 -1
  68. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +6 -2
  69. data/app/views/spotlight/pages/_edit_page_link.html.erb +1 -1
  70. data/app/views/spotlight/pages/_form.html.erb +8 -8
  71. data/app/views/spotlight/pages/_order_pages.html.erb +1 -1
  72. data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
  73. data/app/views/spotlight/resources/_external_resources_form.html.erb +1 -0
  74. data/app/views/spotlight/resources/_form.html.erb +1 -1
  75. data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
  76. data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
  77. data/app/views/spotlight/resources/json_upload/_form.html.erb +1 -1
  78. data/app/views/spotlight/resources/new.html.erb +1 -0
  79. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  80. data/app/views/spotlight/roles/index.html.erb +4 -4
  81. data/app/views/spotlight/search_configurations/_default_per_page.html.erb +1 -1
  82. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +7 -2
  83. data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
  84. data/app/views/spotlight/search_configurations/edit.html.erb +3 -3
  85. data/app/views/spotlight/searches/_form.html.erb +6 -6
  86. data/app/views/spotlight/searches/index.html.erb +4 -4
  87. data/app/views/spotlight/shared/_dd3_item.html.erb +2 -2
  88. data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -1
  89. data/app/views/spotlight/shared/_locale_picker.html.erb +1 -1
  90. data/app/views/spotlight/shared/_report_a_problem.html.erb +1 -1
  91. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +2 -2
  92. data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +1 -1
  93. data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -1
  94. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +1 -1
  95. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +4 -4
  96. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +1 -1
  97. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +2 -2
  98. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +1 -1
  99. data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +1 -1
  100. data/app/views/spotlight/sites/_exhibit.html.erb +4 -4
  101. data/app/views/spotlight/sites/edit.html.erb +2 -2
  102. data/app/views/spotlight/sites/edit_exhibits.html.erb +4 -4
  103. data/app/views/spotlight/tags/index.html.erb +1 -1
  104. data/app/views/spotlight/translations/_browse_categories.html.erb +8 -8
  105. data/app/views/spotlight/translations/_general.html.erb +18 -18
  106. data/app/views/spotlight/translations/_groups.html.erb +1 -1
  107. data/app/views/spotlight/translations/_import.html.erb +31 -18
  108. data/app/views/spotlight/translations/_metadata.html.erb +6 -6
  109. data/app/views/spotlight/translations/_page.html.erb +1 -1
  110. data/app/views/spotlight/translations/_search_fields.html.erb +9 -9
  111. data/app/views/spotlight/translations/edit.html.erb +6 -6
  112. data/config/locales/spotlight.en.yml +7 -2
  113. data/lib/generators/spotlight/templates/catalog_controller.rb +4 -0
  114. data/lib/spotlight/version.rb +1 -1
  115. data/vendor/assets/javascripts/bootstrap-tagsinput.js +1 -1
  116. data/vendor/assets/javascripts/sir-trevor.js +1 -1
  117. metadata +12 -6
@@ -30,14 +30,6 @@
30
30
  padding-top: 0;
31
31
  padding-bottom: 0;
32
32
 
33
- label {
34
- margin-left: $spacer;
35
- margin-right: $spacer;
36
- padding-left: 0px;
37
- padding-bottom: $table-cell-padding;
38
- padding-top: 1 + $table-cell-padding;
39
- display: block;
40
- }
41
33
  input {
42
34
  display: inline-block;
43
35
  float: none;
@@ -1,5 +1,6 @@
1
1
  .submit-search-text {
2
- @extend .sr-only;
2
+ @extend .sr-only !optional;
3
+ @extend .visually-hidden !optional;
3
4
  }
4
5
 
5
6
  .search-query-form {
@@ -89,11 +89,6 @@ legend {
89
89
  margin-bottom: $spacer;
90
90
  }
91
91
 
92
- small.form-text {
93
- margin-bottom: $spacer;
94
- margin-top: $spacer * 0.3125;
95
- }
96
-
97
92
  div.form-check + input[type="file"] {
98
93
  margin-top: $spacer;
99
94
  }
@@ -43,7 +43,8 @@
43
43
  text-align: center;
44
44
  li {
45
45
  @extend .badge;
46
- @extend .badge-secondary;
46
+ @extend .badge-secondary !optional;
47
+ @extend .bg-secondary !optional;
47
48
  a {
48
49
  color: #fff;
49
50
  }
@@ -152,10 +153,12 @@ form.edit_solr_document {
152
153
  .document {
153
154
  .blacklight-exhibit_tags a {
154
155
  @extend .badge;
155
- @extend .badge-secondary;
156
+ @extend .badge-secondary !optional;
157
+ @extend .bg-secondary !optional;
156
158
 
157
159
  &:not(:last-child) {
158
- @extend .mr-2;
160
+ @extend .mr-2 !optional;
161
+ @extend .me-2 !optional;
159
162
  }
160
163
  }
161
164
  }
@@ -10,7 +10,8 @@
10
10
  @mixin private-label() {
11
11
  &:after {
12
12
  @extend .badge;
13
- @extend .badge-warning;
13
+ @extend .badge-warning !optional;
14
+ @extend .bg-warning !optional;
14
15
  content: 'Private';
15
16
  margin-left: 3px;
16
17
  }
@@ -12,7 +12,8 @@
12
12
  }
13
13
 
14
14
  .primary-actions {
15
- @extend .float-right;
15
+ @extend .float-right !optional;
16
+ @extend .float-end !optional;
16
17
  }
17
18
 
18
19
  #nested-pages {
@@ -3,7 +3,8 @@
3
3
  border-bottom: 1px solid $gray-600;
4
4
 
5
5
  h2 {
6
- @extend .sr-only;
6
+ @extend .sr-only !optional;
7
+ @extend .visually-hidden !optional;
7
8
  }
8
9
  }
9
10
 
@@ -78,9 +78,3 @@
78
78
  margin-top: $spacer;
79
79
  padding-bottom: 3px;
80
80
  }
81
-
82
- .translation-import-export-label {
83
- @media (min-width: 576px) {
84
- text-align: right;
85
- }
86
- }
@@ -1,7 +1,3 @@
1
1
  .inline-block {
2
2
  display: inline-block;
3
3
  }
4
-
5
- .btn-sizing {
6
- @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
7
- }
@@ -15,7 +15,7 @@ module Spotlight
15
15
  delegate :current_exhibit, :can?, :add_document_meta_content, to: :helpers
16
16
 
17
17
  def exhibit_edit_link
18
- helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-right btn btn-primary' if can?(:curate, current_exhibit)
18
+ helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-right float-end btn btn-primary' if can?(:curate, current_exhibit)
19
19
  end
20
20
  end
21
21
  end
@@ -21,7 +21,7 @@
21
21
  return `
22
22
  <div class="row">
23
23
  <div class="col-md-8">
24
- <div class="form-group">
24
+ <div class="form-group mb-3">
25
25
  ${this.heading()}
26
26
  <div class="field">
27
27
  <label for="${this.formId(this.text_key)}" class="col-form-label">${i18n.t("blocks:textable:text")}</label>
@@ -47,7 +47,7 @@ SirTrevor.Blocks.Browse = (function(){
47
47
  <div class="checkbox">
48
48
  <input name="item[${index}][display]" type="hidden" value="false" />
49
49
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
50
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
50
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
51
51
  </div>
52
52
  <div class="pic">
53
53
  <img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
@@ -56,7 +56,7 @@ SirTrevor.Blocks.Browse = (function(){
56
56
  <div class="title card-title">${(data.full_title || data.title)}</div>
57
57
  <div>${(data.slug || data.id)}</div>
58
58
  </div>
59
- <div class="remove float-right">
59
+ <div class="remove float-right float-end">
60
60
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
61
61
  </div>
62
62
  </div>
@@ -53,7 +53,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
53
53
  <div class="checkbox">
54
54
  <input name="item[${index}][display]" type="hidden" value="false" />
55
55
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
56
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
56
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
57
57
  </div>
58
58
  <div class="main">
59
59
  <div class="title card-title">${data.title}</div>
@@ -29,7 +29,7 @@ SirTrevor.Blocks.Oembed = (function(){
29
29
  ${this.description()}
30
30
  </div>
31
31
  <div class="row">
32
- <div class="form-group col-md-8">
32
+ <div class="form-group mb-3 col-md-8">
33
33
  <label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
34
34
  <input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
35
35
  </div>
@@ -50,7 +50,7 @@ Core.Block.Resources = (function(){
50
50
  <div class="checkbox">
51
51
  <input name="item[${index}][display]" type="hidden" value="false" />
52
52
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
53
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
53
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
54
54
  </div>
55
55
  <div class="pic">
56
56
  <img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
@@ -59,7 +59,7 @@ Core.Block.Resources = (function(){
59
59
  <div class="title card-title">${data.title}</div>
60
60
  <div>${(data.slug || data.id)}</div>
61
61
  </div>
62
- <div class="remove float-right">
62
+ <div class="remove float-right float-end">
63
63
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
64
64
  </div>
65
65
  </div>
@@ -111,7 +111,7 @@ Core.Block.Resources = (function(){
111
111
  items_selector: function() { return [
112
112
  '<div class="row">',
113
113
  '<div class="col-md-8">',
114
- '<div class="form-group">',
114
+ '<div class="form-group mb-3">',
115
115
  '<div class="panels dd nestable-item-grid" data-behavior="nestable" data-max-depth="1"><ol class="dd-list"></ol></div>',
116
116
  this.autocomplete_control(),
117
117
  '</div>',
@@ -72,15 +72,15 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
72
72
  afterPreviewLoad: function(options) {
73
73
  $(this.inner).find('.carousel').carousel();
74
74
 
75
- // the bootstrap carousel only initializes data-slide widgets on page load, so we need
75
+ // the bootstrap carousel only initializes data-bs-slide widgets on page load, so we need
76
76
  // to initialize them ourselves..
77
77
  var clickHandler = function (e) {
78
78
  var href
79
79
  var $this = $(this)
80
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
80
+ var $target = $($this.attr('data-target') || $this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
81
81
  if (!$target.hasClass('carousel')) return
82
82
  var options = $.extend({}, $target.data(), $this.data())
83
- var slideIndex = $this.attr('data-slide-to')
83
+ var slideIndex = $this.attr('data-slide-to') || $this.attr('data-bs-slide-to')
84
84
  if (slideIndex) options.interval = false
85
85
 
86
86
  $.fn.carousel.call($target, options)
@@ -93,8 +93,8 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
93
93
  }
94
94
 
95
95
  $(this.inner).find('.carousel')
96
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
97
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
96
+ .on('click.bs.carousel.data-api', '[data-slide], [data-bs-slide]', clickHandler)
97
+ .on('click.bs.carousel.data-api', '[data-slide-to], [data-bs-slide-to]', clickHandler)
98
98
  }
99
99
 
100
100
  });
@@ -11,15 +11,15 @@ SirTrevor.Blocks.SolrDocumentsFeatures = (function(){
11
11
  afterPreviewLoad: function(options) {
12
12
  $(this.inner).find('.carousel').carousel();
13
13
 
14
- // the bootstrap carousel only initializes data-slide widgets on page load, so we need
14
+ // the bootstrap carousel only initializes data-bs-slide widgets on page load, so we need
15
15
  // to initialize them ourselves..
16
16
  var clickHandler = function (e) {
17
17
  var href
18
18
  var $this = $(this)
19
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
19
+ var $target = $($this.attr('data-target') || $this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
20
20
  if (!$target.hasClass('carousel')) return
21
21
  var options = $.extend({}, $target.data(), $this.data())
22
- var slideIndex = $this.attr('data-slide-to')
22
+ var slideIndex = $this.attr('data-slide-to') || $this.attr('data-bs-slide-to')
23
23
  if (slideIndex) options.interval = false
24
24
 
25
25
  $.fn.carousel.call($target, options)
@@ -32,8 +32,8 @@ SirTrevor.Blocks.SolrDocumentsFeatures = (function(){
32
32
  }
33
33
 
34
34
  $(this.inner).find('.carousel')
35
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
36
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
35
+ .on('click.bs.carousel.data-api', '[data-slide], [data-bs-slide]', clickHandler)
36
+ .on('click.bs.carousel.data-api', '[data-slide-to], [data-bs-slide-to]', clickHandler)
37
37
  }
38
38
 
39
39
  });
@@ -81,23 +81,23 @@ SirTrevor.Blocks.UploadedItems = (function(){
81
81
  <div class="checkbox">
82
82
  <input name="item[${index}][display]" type="hidden" value="false" />
83
83
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + dataId)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
84
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + dataId)}">${i18n.t("blocks:resources:panel:display")}</label>
84
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + dataId)}">${i18n.t("blocks:resources:panel:display")}</label>
85
85
  </div>
86
86
  <div class="pic">
87
87
  <img class="img-thumbnail" src="${dataUrl}" />
88
88
  </div>
89
89
  <div class="main form-horizontal">
90
90
  <div class="title card-title">${dataTitle}</div>
91
- <div class="field row mr-3">
91
+ <div class="field row mr-3 me-3">
92
92
  <label for="${this.formId('caption_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:caption")}</label>
93
93
  <input type="text" class="form-control col" id="${this.formId('caption_' + dataId)}" name="item[${index}][caption]" data-field="caption"/>
94
94
  </div>
95
- <div class="field row mr-3">
95
+ <div class="field row mr-3 me-3">
96
96
  <label for="${this.formId('link_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:link")}</label>
97
97
  <input type="text" class="form-control col" id="${this.formId('link_' + dataId)}" name="item[${index}][link]" data-field="link"/>
98
98
  </div>
99
99
  </div>
100
- <div class="remove float-right">
100
+ <div class="remove float-right float-end">
101
101
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
102
102
  </div>
103
103
  </div>
@@ -125,7 +125,7 @@ SirTrevor.Blocks.UploadedItems = (function(){
125
125
  ${this.description()}
126
126
  </div>
127
127
  <div class="row">
128
- <div class="form-group col-md-8">
128
+ <div class="form-group mb-3 col-md-8">
129
129
  <div class="panels dd nestable-item-grid" data-behavior="nestable" data-max-depth="1">
130
130
  <ol class="dd-list">
131
131
  </ol>
@@ -4,8 +4,8 @@ export default class {
4
4
  function edit_user(event) {
5
5
  event.preventDefault();
6
6
  $(this).closest('tr').hide();
7
- id = $(this).attr('data-target')
8
- edit_view = $("[data-edit-for='"+id+"']", container).show();
7
+ const id = $(this).attr('data-target') || $(this).attr('data-bs-target');
8
+ const edit_view = $("[data-edit-for='"+id+"']", container).show();
9
9
  $.each(edit_view.find('input[type="text"], select'), function() {
10
10
  // Cache original values incase editing is canceled
11
11
  $(this).data('orig', $(this).val());
@@ -14,8 +14,8 @@ export default class {
14
14
 
15
15
  function cancel_edit(event) {
16
16
  event.preventDefault();
17
- id = $(this).closest('tr').attr('data-edit-for');
18
- edit_view = $("[data-edit-for='"+id+"']", container).hide();
17
+ const id = $(this).closest('tr').attr('data-edit-for');
18
+ const edit_view = $("[data-edit-for='"+id+"']", container).hide();
19
19
  clear_errors(edit_view);
20
20
  rollback_changes(edit_view);
21
21
  $("[data-show-for='"+id+"']", container).show();
@@ -35,13 +35,13 @@ export default class {
35
35
  }
36
36
 
37
37
  function destroy_user(event) {
38
- id = $(this).attr('data-target')
38
+ const id = $(this).attr('data-target') || $(this).attr('data-bs-target');
39
39
  $("[data-destroy-for='"+id+"']", container).val('1');
40
40
  }
41
41
 
42
42
  function new_user(event) {
43
43
  event.preventDefault();
44
- edit_view = $("[data-edit-for='new']", container).show();
44
+ const edit_view = $("[data-edit-for='new']", container).show();
45
45
  $.each(edit_view.find('input[type="text"], select'), function() {
46
46
  // Cache original values incase editing is canceled
47
47
  $(this).data('orig', $(this).val());
@@ -3,7 +3,7 @@ export default class {
3
3
  var container, target;
4
4
 
5
5
  function init() {
6
- const target_val = container.attr('data-target')
6
+ const target_val = container.attr('data-target') || container.attr('data-bs-target');
7
7
  if (!target_val)
8
8
  return
9
9
 
@@ -7,10 +7,10 @@ export default class {
7
7
  modalDialog.addClass('modal-xl')
8
8
  modalContent.html('<div id="osd-modal-container"></div>');
9
9
  var controls = `<div class="controls d-flex justify-content-center justify-content-md-end">
10
- <div class="custom-close-controls pr-3 pt-3">
11
- <button type="button" class="btn btn-dark" data-dismiss="modal" aria-hidden="true">${Spotlight.ZprLinks.close}</button>
10
+ <div class="custom-close-controls pr-3 pe-3 pt-3">
11
+ <button type="button" class="btn btn-dark" data-dismiss="modal" data-bs-dismiss="modal" aria-hidden="true">${Spotlight.ZprLinks.close}</button>
12
12
  </div>
13
- <div class="zoom-controls mb-3 mr-md-3">
13
+ <div class="zoom-controls mb-3 mr-md-3 me-md-3">
14
14
  <button id="osd-zoom-in" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomIn}</button>
15
15
  <button id="osd-zoom-out" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomOut}</button>
16
16
  </div>
@@ -9,9 +9,12 @@ module SirTrevorRails
9
9
  send(:'max-height')
10
10
  end
11
11
 
12
+ def autoplay?
13
+ send(:'auto-play-images') == 'true'
14
+ end
15
+
12
16
  def interval
13
- val = send(:'auto-play-images')
14
- if val == 'true'
17
+ if autoplay?
15
18
  send(:'auto-play-images-interval')
16
19
  else
17
20
  false
@@ -68,11 +68,11 @@ module Spotlight
68
68
  end
69
69
 
70
70
  def custom_fields_data
71
- data.slice(*exhibit.custom_fields.map(&:slug).map(&:to_s)).select { |_k, v| v.present? }
71
+ data.slice(*exhibit.custom_fields.map(&:slug).map(&:to_s)).compact_blank
72
72
  end
73
73
 
74
74
  def configured_fields_data
75
- data.slice(*configured_fields.map(&:field_name).map(&:to_s)).select { |_k, v| v.present? }
75
+ data.slice(*configured_fields.map(&:field_name).map(&:to_s)).compact_blank
76
76
  end
77
77
  end
78
78
  end
@@ -4,15 +4,15 @@
4
4
  <div class="modal-content">
5
5
  <div class="modal-header">
6
6
  <h4 class="modal-title" id="add-tag-modal"><%= t(:'spotlight.bulk_actions.add_tags.heading') %></h4>
7
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
- <span aria-hidden="true">&times;</span>
7
+ <button type="button" class="blacklight-modal-close close btn-close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
+ <span aria-hidden="true" class="visually-hidden">&times;</span>
9
9
  </button>
10
10
  </div>
11
11
  <div class="modal-body">
12
12
  <p>
13
13
  <%= t(:'spotlight.bulk_actions.add_tags.description', count: @response.total) %>
14
14
  </p>
15
- <div class="form-group">
15
+ <div class="form-group mb-3">
16
16
  <%= label_tag :tags, t(:'spotlight.bulk_actions.add_tags.label') %>
17
17
  <%= text_field_tag :tags, '', class: 'form-control', data: { autocomplete_tag: true, autocomplete_url: exhibit_tags_path(current_exhibit, format: 'json')} %>
18
18
  </div>
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
22
22
  <%= f.submit t(:'spotlight.bulk_actions.add'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
23
- <button type="button" class="btn btn-link" data-dismiss="modal"><%= t :cancel %></button>
23
+ <button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
24
24
  </div>
25
25
  </div>
26
26
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <div class="dropdown bulk-actions-dropdown">
2
- <button class="btn btn-secondary dropdown-toggle" type="button" id="bulk-actions-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2
+ <button class="btn btn-secondary dropdown-toggle" type="button" id="bulk-actions-button" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
3
3
  <%= t(:'spotlight.bulk_actions.label') %>
4
4
  </button>
5
5
  <div class="dropdown-menu" aria-labelledby="bulk-actions-button">
6
6
  <% blacklight_config.bulk_actions.each do |key, _config| %>
7
- <%= link_to t("spotlight.bulk_actions.#{key}.heading"), '#', class: 'dropdown-item', data: {toggle:"modal", target:"##{key.to_s.dasherize}-modal"} %>
7
+ <%= link_to t("spotlight.bulk_actions.#{key}.heading"), '#', class: 'dropdown-item', data: { toggle: "modal", "bs-toggle": "modal", target: "##{key.to_s.dasherize}-modal", "bs-target": "##{key.to_s.dasherize}-modal" } %>
8
8
  <% end %>
9
9
  </div>
10
10
  </div>
@@ -4,8 +4,8 @@
4
4
  <div class="modal-content">
5
5
  <div class="modal-header">
6
6
  <h4 class="modal-title" id="save-modal-label"><%= t(:'spotlight.bulk_actions.change_visibility.heading') %></h4>
7
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
- <span aria-hidden="true">&times;</span>
7
+ <button type="button" class="blacklight-modal-close close btn-close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
+ <span aria-hidden="true" class="visually-hidden">&times;</span>
9
9
  </button>
10
10
  </div>
11
11
  <div class="modal-body">
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
29
29
  <%= f.submit t(:'spotlight.bulk_actions.change'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
30
- <button type="button" class="btn btn-link" data-dismiss="modal"><%= t :cancel %></button>
30
+ <button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
31
31
  </div>
32
32
  </div>
33
33
  <% end %>
@@ -4,8 +4,8 @@
4
4
  <div class="modal-content">
5
5
  <div class="modal-header">
6
6
  <h4 class="modal-title" id="remove-tag-modal"><%= t(:'spotlight.bulk_actions.remove_tags.heading') %></h4>
7
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
- <span aria-hidden="true">&times;</span>
7
+ <button type="button" class="blacklight-modal-close close btn-close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
8
+ <span aria-hidden="true" class="visually-hidden">&times;</span>
9
9
  </button>
10
10
  </div>
11
11
  <div class="modal-body">
@@ -16,12 +16,12 @@
16
16
  <h5><%= t(:'spotlight.bulk_actions.remove_tags.assigned') %></h5>
17
17
  <% end %>
18
18
  <% facet.items.each do |facet_item| %>
19
- <div class="badge badge-info">
19
+ <div class="badge badge-info bg-info">
20
20
  <%= "#{facet_item.value} (#{facet_item.hits})" %>
21
21
  </div>
22
22
  <% end %>
23
23
 
24
- <div class="form-group mt-4">
24
+ <div class="form-group mb-3 mt-4">
25
25
  <%= label_tag :tags, t(:'spotlight.bulk_actions.remove_tags.label') %>
26
26
  <%= text_field_tag :tags, '', class: 'form-control', data: { autocomplete_tag: true, autocomplete_url: exhibit_tags_path(current_exhibit, format: 'json')} %>
27
27
  </div>
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
31
31
  <%= f.submit t(:'spotlight.bulk_actions.remove'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
32
- <button type="button" class="btn btn-link" data-dismiss="modal"><%= t :cancel %></button>
32
+ <button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
33
33
  </div>
34
34
  </div>
35
35
  <% end %>
@@ -1,12 +1,12 @@
1
- <%= button_tag t(:'spotlight.saved_search.label'), id: "save-this-search", class: 'btn btn-secondary', data: {toggle:"modal", target:"#save-modal"} %>
1
+ <%= button_tag t(:'spotlight.saved_search.label'), id: "save-this-search", class: 'btn btn-secondary', data: { toggle: "modal", "bs-toggle": "modal", target: "#save-modal", "bs-target": "#save-modal" } %>
2
2
  <div class="modal fade" id="save-modal" tabindex="-1" role="dialog" aria-labelledby="save-modal-label" aria-hidden="true">
3
3
  <div class="modal-dialog">
4
- <%= bootstrap_form_for [spotlight, current_exhibit, Spotlight::Search.new] do |f| %>
4
+ <%= bootstrap_form_for [spotlight, current_exhibit, Spotlight::Search.new], html: { novalidate: true } do |f| %>
5
5
  <div class="modal-content">
6
6
  <div class="modal-header">
7
7
  <h4 class="modal-title" id="save-modal-label"><%= t(:'spotlight.saved_search.label') %></h4>
8
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
9
- <span aria-hidden="true">&times;</span>
8
+ <button type="button" class="blacklight-modal-close close btn-close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
9
+ <span aria-hidden="true" class="visually-hidden">&times;</span>
10
10
  </button>
11
11
  </div>
12
12
  <div class="modal-body">
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
19
19
  <%= f.submit nil, class: 'btn btn-primary' %>
20
- <button type="button" class="btn btn-link" data-dismiss="modal"><%= t :cancel %></button>
20
+ <button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
21
21
  </div>
22
22
  </div>
23
23
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <% if published_top_level_feature_pages.present? %>
3
3
  <% if published_top_level_feature_pages.many? %>
4
4
  <li class="nav-item dropdown">
5
- <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"><%= navigation.label_or_default %></a>
5
+ <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" data-bs-toggle="dropdown"><%= navigation.label_or_default %></a>
6
6
  <ul class="dropdown-menu">
7
7
  <% published_top_level_feature_pages.each do |page| %>
8
8
  <li><%= link_to page.title, [spotlight, page.exhibit, page], class: 'dropdown-item' %></li>
@@ -4,7 +4,7 @@
4
4
  <%= link_to(current_exhibit.title, spotlight.exhibit_path(current_exhibit), class: 'navbar-brand') %>
5
5
  <% end %>
6
6
 
7
- <ul class="navbar-nav <%= resource_masthead? ? 'justify-content-md-end' : 'mr-auto' %>">
7
+ <ul class="navbar-nav <%= resource_masthead? ? 'justify-content-md-end' : 'mr-auto me-auto' %>">
8
8
  <li class="nav-item <%= "active" if current_page?([spotlight, current_exhibit]) %>"><%= link_to t(:'spotlight.curation.nav.home'), [spotlight, current_exhibit], class: 'nav-link' %></li>
9
9
  <% current_exhibit.main_navigations.displayable.each do |navigation| %>
10
10
  <%= render partial: "shared/#{navigation.nav_type}_navbar", locals: { navigation: navigation } %>
@@ -1,7 +1,7 @@
1
1
  <nav class="navbar navbar-expand-md navbar-dark bg-dark topbar" role="navigation" aria-label="<%= t('spotlight.topbar.label') %>">
2
2
  <div class="<%= container_classes %>">
3
3
  <%= link_to application_name, main_app.root_path, class: 'mb-0 navbar-brand navbar-logo' %>
4
- <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="<%= t :toggle_nav %>">
4
+ <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-bs-toggle="collapse" data-target="#user-util-collapse" data-bs-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="<%= t :toggle_nav %>">
5
5
  <span class="navbar-toggler-icon"></span>
6
6
  </button>
7
7
 
@@ -5,7 +5,7 @@
5
5
  <% end %>
6
6
 
7
7
  <% if nav_actions.present? %>
8
- <ul class="navbar-nav mr-auto">
8
+ <ul class="navbar-nav mr-auto me-auto">
9
9
  <%= nav_actions %>
10
10
  </ul>
11
11
  <% end %>
@@ -14,7 +14,7 @@
14
14
  <%= render '/spotlight/shared/locale_picker' %>
15
15
  <% if current_user %>
16
16
  <li class="nav-item dropdown">
17
- <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"><%=current_user%></a>
17
+ <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" data-bs-toggle="dropdown"><%=current_user%></a>
18
18
  <ul class="dropdown-menu">
19
19
  <% if can? :manage, Spotlight::Site.instance %>
20
20
  <li><%= link_to t(:'spotlight.header_links.edit_site'), spotlight.edit_site_path, class: 'dropdown-item' %></li>