blacklight-spotlight 3.6.0.beta10 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spotlight/spotlight.esm.js +30 -30
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  4. data/app/assets/javascripts/spotlight/spotlight.js +30 -30
  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 +2 -2
  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 +17 -11
@@ -90,7 +90,7 @@
90
90
  var container, target;
91
91
 
92
92
  function init() {
93
- const target_val = container.attr('data-target');
93
+ const target_val = container.attr('data-target') || container.attr('data-bs-target');
94
94
  if (!target_val)
95
95
  return
96
96
 
@@ -125,10 +125,10 @@
125
125
  modalDialog.addClass('modal-xl');
126
126
  modalContent.html('<div id="osd-modal-container"></div>');
127
127
  var controls = `<div class="controls d-flex justify-content-center justify-content-md-end">
128
- <div class="custom-close-controls pr-3 pt-3">
129
- <button type="button" class="btn btn-dark" data-dismiss="modal" aria-hidden="true">${Spotlight.ZprLinks.close}</button>
128
+ <div class="custom-close-controls pr-3 pe-3 pt-3">
129
+ <button type="button" class="btn btn-dark" data-dismiss="modal" data-bs-dismiss="modal" aria-hidden="true">${Spotlight.ZprLinks.close}</button>
130
130
  </div>
131
- <div class="zoom-controls mb-3 mr-md-3">
131
+ <div class="zoom-controls mb-3 mr-md-3 me-md-3">
132
132
  <button id="osd-zoom-in" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomIn}</button>
133
133
  <button id="osd-zoom-out" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomOut}</button>
134
134
  </div>
@@ -941,7 +941,7 @@
941
941
 
942
942
  var defaultOptions = {
943
943
  tagClass: function(item) {
944
- return 'badge badge-info';
944
+ return 'badge badge-info bg-info';
945
945
  },
946
946
  itemValue: function(item) {
947
947
  return item ? item.toString() : item;
@@ -5585,7 +5585,7 @@
5585
5585
  function edit_user(event) {
5586
5586
  event.preventDefault();
5587
5587
  $(this).closest('tr').hide();
5588
- const id = $(this).attr('data-target');
5588
+ const id = $(this).attr('data-target') || $(this).attr('data-bs-target');
5589
5589
  const edit_view = $("[data-edit-for='"+id+"']", container).show();
5590
5590
  $.each(edit_view.find('input[type="text"], select'), function() {
5591
5591
  // Cache original values incase editing is canceled
@@ -5616,7 +5616,7 @@
5616
5616
  }
5617
5617
 
5618
5618
  function destroy_user(event) {
5619
- const id = $(this).attr('data-target');
5619
+ const id = $(this).attr('data-target') || $(this).attr('data-bs-target');
5620
5620
  $("[data-destroy-for='"+id+"']", container).val('1');
5621
5621
  }
5622
5622
 
@@ -5820,7 +5820,7 @@
5820
5820
  return `
5821
5821
  <div class="row">
5822
5822
  <div class="col-md-8">
5823
- <div class="form-group">
5823
+ <div class="form-group mb-3">
5824
5824
  ${this.heading()}
5825
5825
  <div class="field">
5826
5826
  <label for="${this.formId(this.text_key)}" class="col-form-label">${i18n.t("blocks:textable:text")}</label>
@@ -5929,7 +5929,7 @@
5929
5929
  <div class="checkbox">
5930
5930
  <input name="item[${index}][display]" type="hidden" value="false" />
5931
5931
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
5932
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
5932
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
5933
5933
  </div>
5934
5934
  <div class="pic">
5935
5935
  <img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
@@ -5938,7 +5938,7 @@
5938
5938
  <div class="title card-title">${data.title}</div>
5939
5939
  <div>${(data.slug || data.id)}</div>
5940
5940
  </div>
5941
- <div class="remove float-right">
5941
+ <div class="remove float-right float-end">
5942
5942
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
5943
5943
  </div>
5944
5944
  </div>
@@ -5990,7 +5990,7 @@
5990
5990
  items_selector: function() { return [
5991
5991
  '<div class="row">',
5992
5992
  '<div class="col-md-8">',
5993
- '<div class="form-group">',
5993
+ '<div class="form-group mb-3">',
5994
5994
  '<div class="panels dd nestable-item-grid" data-behavior="nestable" data-max-depth="1"><ol class="dd-list"></ol></div>',
5995
5995
  this.autocomplete_control(),
5996
5996
  '</div>',
@@ -6073,7 +6073,7 @@
6073
6073
  <div class="checkbox">
6074
6074
  <input name="item[${index}][display]" type="hidden" value="false" />
6075
6075
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
6076
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
6076
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
6077
6077
  </div>
6078
6078
  <div class="pic">
6079
6079
  <img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
@@ -6082,7 +6082,7 @@
6082
6082
  <div class="title card-title">${(data.full_title || data.title)}</div>
6083
6083
  <div>${(data.slug || data.id)}</div>
6084
6084
  </div>
6085
- <div class="remove float-right">
6085
+ <div class="remove float-right float-end">
6086
6086
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
6087
6087
  </div>
6088
6088
  </div>
@@ -6170,7 +6170,7 @@
6170
6170
  <div class="checkbox">
6171
6171
  <input name="item[${index}][display]" type="hidden" value="false" />
6172
6172
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
6173
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
6173
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
6174
6174
  </div>
6175
6175
  <div class="main">
6176
6176
  <div class="title card-title">${data.title}</div>
@@ -6284,7 +6284,7 @@
6284
6284
  ${this.description()}
6285
6285
  </div>
6286
6286
  <div class="row">
6287
- <div class="form-group col-md-8">
6287
+ <div class="form-group mb-3 col-md-8">
6288
6288
  <label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
6289
6289
  <input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
6290
6290
  </div>
@@ -6601,15 +6601,15 @@
6601
6601
  afterPreviewLoad: function(options) {
6602
6602
  $(this.inner).find('.carousel').carousel();
6603
6603
 
6604
- // the bootstrap carousel only initializes data-slide widgets on page load, so we need
6604
+ // the bootstrap carousel only initializes data-bs-slide widgets on page load, so we need
6605
6605
  // to initialize them ourselves..
6606
6606
  var clickHandler = function (e) {
6607
6607
  var href;
6608
6608
  var $this = $(this);
6609
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
6609
+ var $target = $($this.attr('data-target') || $this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
6610
6610
  if (!$target.hasClass('carousel')) return
6611
6611
  var options = $.extend({}, $target.data(), $this.data());
6612
- var slideIndex = $this.attr('data-slide-to');
6612
+ var slideIndex = $this.attr('data-slide-to') || $this.attr('data-bs-slide-to');
6613
6613
  if (slideIndex) options.interval = false;
6614
6614
 
6615
6615
  $.fn.carousel.call($target, options);
@@ -6622,8 +6622,8 @@
6622
6622
  };
6623
6623
 
6624
6624
  $(this.inner).find('.carousel')
6625
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
6626
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler);
6625
+ .on('click.bs.carousel.data-api', '[data-slide], [data-bs-slide]', clickHandler)
6626
+ .on('click.bs.carousel.data-api', '[data-slide-to], [data-bs-slide-to]', clickHandler);
6627
6627
  }
6628
6628
 
6629
6629
  });
@@ -6661,15 +6661,15 @@
6661
6661
  afterPreviewLoad: function(options) {
6662
6662
  $(this.inner).find('.carousel').carousel();
6663
6663
 
6664
- // the bootstrap carousel only initializes data-slide widgets on page load, so we need
6664
+ // the bootstrap carousel only initializes data-bs-slide widgets on page load, so we need
6665
6665
  // to initialize them ourselves..
6666
6666
  var clickHandler = function (e) {
6667
6667
  var href;
6668
6668
  var $this = $(this);
6669
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
6669
+ var $target = $($this.attr('data-target') || $this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
6670
6670
  if (!$target.hasClass('carousel')) return
6671
6671
  var options = $.extend({}, $target.data(), $this.data());
6672
- var slideIndex = $this.attr('data-slide-to');
6672
+ var slideIndex = $this.attr('data-slide-to') || $this.attr('data-bs-slide-to');
6673
6673
  if (slideIndex) options.interval = false;
6674
6674
 
6675
6675
  $.fn.carousel.call($target, options);
@@ -6682,8 +6682,8 @@
6682
6682
  };
6683
6683
 
6684
6684
  $(this.inner).find('.carousel')
6685
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
6686
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler);
6685
+ .on('click.bs.carousel.data-api', '[data-slide], [data-bs-slide]', clickHandler)
6686
+ .on('click.bs.carousel.data-api', '[data-slide-to], [data-bs-slide-to]', clickHandler);
6687
6687
  }
6688
6688
 
6689
6689
  });
@@ -6785,23 +6785,23 @@
6785
6785
  <div class="checkbox">
6786
6786
  <input name="item[${index}][display]" type="hidden" value="false" />
6787
6787
  <input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + dataId)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
6788
- <label class="sr-only" for="${this.formId(this.display_checkbox + '_' + dataId)}">${i18n.t("blocks:resources:panel:display")}</label>
6788
+ <label class="sr-only visually-hidden" for="${this.formId(this.display_checkbox + '_' + dataId)}">${i18n.t("blocks:resources:panel:display")}</label>
6789
6789
  </div>
6790
6790
  <div class="pic">
6791
6791
  <img class="img-thumbnail" src="${dataUrl}" />
6792
6792
  </div>
6793
6793
  <div class="main form-horizontal">
6794
6794
  <div class="title card-title">${dataTitle}</div>
6795
- <div class="field row mr-3">
6795
+ <div class="field row mr-3 me-3">
6796
6796
  <label for="${this.formId('caption_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:caption")}</label>
6797
6797
  <input type="text" class="form-control col" id="${this.formId('caption_' + dataId)}" name="item[${index}][caption]" data-field="caption"/>
6798
6798
  </div>
6799
- <div class="field row mr-3">
6799
+ <div class="field row mr-3 me-3">
6800
6800
  <label for="${this.formId('link_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:link")}</label>
6801
6801
  <input type="text" class="form-control col" id="${this.formId('link_' + dataId)}" name="item[${index}][link]" data-field="link"/>
6802
6802
  </div>
6803
6803
  </div>
6804
- <div class="remove float-right">
6804
+ <div class="remove float-right float-end">
6805
6805
  <a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
6806
6806
  </div>
6807
6807
  </div>
@@ -6829,7 +6829,7 @@
6829
6829
  ${this.description()}
6830
6830
  </div>
6831
6831
  <div class="row">
6832
- <div class="form-group col-md-8">
6832
+ <div class="form-group mb-3 col-md-8">
6833
6833
  <div class="panels dd nestable-item-grid" data-behavior="nestable" data-max-depth="1">
6834
6834
  <ol class="dd-list">
6835
6835
  </ol>