blacklight-spotlight 4.3.6 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 +1 -0
- 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 +48 -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/custom_field.rb +1 -1
- data/app/services/spotlight/exhibit_import_export_service.rb +1 -0
- 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/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 +1 -4
- 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/sir_trevor/blocks/_uploaded_items_block.html.erb +2 -2
- data/config/locales/spotlight.en.yml +11 -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: 7b824d393d7e458b70cd977fb7bcf44ebb8a01a42149fafc864279494643da83
|
4
|
+
data.tar.gz: 252004c2bd545f5a02a2ef89e2fc413714a1aabcba17cf36326b7d28367d5f9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8c4d7c05b5acb51e72e700ef80b18b176234a3f6a8e1f98ff298374da5776c3da8034fdfc4fb800bb3fae2a9657247abf874a8f6f342f539ad690e55d154fe1
|
7
|
+
data.tar.gz: 1ed0b3c2e3518b50aeedc6ab2cf3bf6d19257453722abadedb34565fbcbb8f982b30231042e78db462658f9065ffa33f6df4e53b6bc3698786a95940e47626bc
|
@@ -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 "" },
|