blacklight-spotlight 4.3.6 → 4.5.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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spotlight/spotlight.esm.js +20 -11
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +20 -11
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_accessibility.scss +9 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +4 -11
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +4 -2
- data/app/assets/stylesheets/spotlight/_mixins.scss +1 -0
- data/app/components/spotlight/edit_view_links_component.html.erb +13 -0
- data/app/components/spotlight/edit_view_links_component.rb +16 -0
- data/app/components/spotlight/solr_document_legacy_embed_component.rb +1 -1
- data/app/components/spotlight/tag_list_form_component.html.erb +1 -1
- data/app/controllers/spotlight/accessibility_controller.rb +45 -0
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/helpers/spotlight/title_helper.rb +4 -0
- data/app/javascript/spotlight/admin/blocks/resources_block.js +16 -7
- data/app/javascript/spotlight/admin/blocks/solr_documents_embed_block.js +0 -1
- data/app/javascript/spotlight/admin/pages.js +1 -0
- data/app/javascript/spotlight/admin/visibility_toggle.js +1 -1
- data/app/javascript/spotlight/user/clear_form_button.js +2 -2
- data/app/models/sir_trevor_rails/block.rb +12 -0
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +4 -0
- data/app/models/sir_trevor_rails/blocks/solr_documents_embed_block.rb +3 -0
- data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +4 -0
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/models/spotlight/custom_field.rb +1 -1
- data/app/services/spotlight/exhibit_import_export_service.rb +1 -0
- data/app/views/layouts/spotlight/base.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/spotlight/accessibility/alt_text.html.erb +64 -0
- data/app/views/spotlight/browse/_search_box.html.erb +9 -11
- data/app/views/spotlight/bulk_updates/_upload.html.erb +1 -1
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +1 -1
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page.html.erb +1 -9
- data/app/views/spotlight/exhibits/_form.html.erb +2 -2
- data/app/views/spotlight/feature_pages/_header.html.erb +3 -6
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +7 -0
- data/app/views/spotlight/metadata_configurations/edit.html.erb +1 -0
- data/app/views/spotlight/pages/_form.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +1 -5
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
- data/app/views/spotlight/shared/_honeypot_field.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_featured_pages_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +2 -2
- data/app/views/spotlight/translations/_import.html.erb +1 -1
- data/config/locales/spotlight.en.yml +15 -2
- data/config/routes.rb +2 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e81518a3e626b78dc9b2c1e12f76deffb597018f8346e646068ae5533a9088fd
|
4
|
+
data.tar.gz: 713b5118b8d18e0a611927af250597c855a18607224851b21fd69b4620d259dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c28398ba6f1b73939288ea0e3320259581ae0ff06903499d1120c9518c0506e2274f4d7c15d9c0e9d9ed0cf3c6fdd1f8ed31dd3cc93e2401324940215be3235b
|
7
|
+
data.tar.gz: 1017fd63630a575d362cd6b675df840477d5eb3fefc706372283b1499c77952632a48582379162dde287eb360aff5c84c4ffeaaf95ec7fd545b659dbfdfcf61a
|
@@ -58,10 +58,10 @@ class Carousel {
|
|
58
58
|
class ClearFormButton {
|
59
59
|
connect() {
|
60
60
|
var $clearBtn = $('.btn-reset');
|
61
|
-
var $input = $clearBtn.
|
61
|
+
var $input = $clearBtn.prev('#browse_q');
|
62
62
|
var btnCheck = function(){
|
63
63
|
if ($input.val() !== '') {
|
64
|
-
$clearBtn.css('display', '
|
64
|
+
$clearBtn.css('display', 'block');
|
65
65
|
} else {
|
66
66
|
$clearBtn.css('display', 'none');
|
67
67
|
}
|
@@ -5160,6 +5160,7 @@ class Pages {
|
|
5160
5160
|
var editor = new SirTrevor.Editor({
|
5161
5161
|
el: instance[0],
|
5162
5162
|
blockTypes: instance.data('blockTypes'),
|
5163
|
+
altTextSettings: instance.data('altTextSettings'),
|
5163
5164
|
defaultType:["Text"],
|
5164
5165
|
onEditorRender: function() {
|
5165
5166
|
$.SerializedForm();
|
@@ -5609,7 +5610,7 @@ const VisibilityToggle = (e) => {
|
|
5609
5610
|
if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
|
5610
5611
|
const form = e.target.closest('form');
|
5611
5612
|
if (form) {
|
5612
|
-
new CheckboxSubmit(form).clicked(e);
|
5613
|
+
if (!Blacklight.BookmarkToggle) new CheckboxSubmit(form).clicked(e);
|
5613
5614
|
|
5614
5615
|
// Add/remove the "private" label to the document row when visibility is toggled
|
5615
5616
|
const docRow = form.closest('tr');
|
@@ -5930,18 +5931,16 @@ Spotlight$1.Block.Resources = (function(){
|
|
5930
5931
|
formable: true,
|
5931
5932
|
autocompleteable: true,
|
5932
5933
|
show_heading: true,
|
5933
|
-
show_alt_text: true,
|
5934
|
-
|
5935
5934
|
title: function() { return i18n.t("blocks:" + this.type + ":title"); },
|
5936
5935
|
description: function() { return i18n.t("blocks:" + this.type + ":description"); },
|
5937
|
-
alt_text_guidelines: function() {
|
5938
|
-
if (this.
|
5936
|
+
alt_text_guidelines: function() {
|
5937
|
+
if (this.showAltText()) {
|
5939
5938
|
return i18n.t("blocks:alt_text_guidelines:intro");
|
5940
5939
|
}
|
5941
5940
|
return "";
|
5942
5941
|
},
|
5943
5942
|
alt_text_guidelines_link: function() {
|
5944
|
-
if (this.
|
5943
|
+
if (this.showAltText()) {
|
5945
5944
|
var link_url = i18n.t("blocks:alt_text_guidelines:link_url");
|
5946
5945
|
var link_label = i18n.t("blocks:alt_text_guidelines:link_label");
|
5947
5946
|
return '<a target="_blank" href="' + link_url + '">' + link_label + '</a>';
|
@@ -5967,12 +5966,23 @@ Spotlight$1.Block.Resources = (function(){
|
|
5967
5966
|
},
|
5968
5967
|
|
5969
5968
|
_altTextFieldsHTML: function(index, data) {
|
5970
|
-
if (this.
|
5969
|
+
if (this.showAltText()) {
|
5971
5970
|
return this.altTextHTML(index, data);
|
5972
5971
|
}
|
5973
5972
|
return "";
|
5974
5973
|
},
|
5975
5974
|
|
5975
|
+
showAltText: function() {
|
5976
|
+
return this.editorOptions.altTextSettings[this._typeAsCamelCase()]
|
5977
|
+
},
|
5978
|
+
|
5979
|
+
_typeAsCamelCase: function() {
|
5980
|
+
return this.type
|
5981
|
+
.split('_')
|
5982
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
5983
|
+
.join('');
|
5984
|
+
},
|
5985
|
+
|
5976
5986
|
_itemPanel: function(data) {
|
5977
5987
|
var index = "item_" + this.globalIndex++;
|
5978
5988
|
var checked;
|
@@ -6110,7 +6120,7 @@ Spotlight$1.Block.Resources = (function(){
|
|
6110
6120
|
},
|
6111
6121
|
|
6112
6122
|
attachAltTextHandlers: function(panel) {
|
6113
|
-
if (this.
|
6123
|
+
if (this.showAltText()) {
|
6114
6124
|
const decorativeCheckbox = $('input[name$="[decorative]"]', panel);
|
6115
6125
|
const altTextInput = $('textarea[name$="[alt_text]"]', panel);
|
6116
6126
|
const altTextBackupInput = $('input[name$="[alt_text_backup]"]', panel);
|
@@ -6758,7 +6768,6 @@ SirTrevor.Blocks.SolrDocumentsEmbed = (function(){
|
|
6758
6768
|
|
6759
6769
|
return SirTrevor.Blocks.SolrDocumentsBase.extend({
|
6760
6770
|
type: "solr_documents_embed",
|
6761
|
-
show_alt_text: false,
|
6762
6771
|
icon_name: "item_embed",
|
6763
6772
|
|
6764
6773
|
item_options: function() { return "" },
|