blacklight-spotlight 4.1.2 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/assets/javascripts/spotlight/spotlight.esm.js +146 -27
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +146 -27
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +19 -1
- data/app/components/spotlight/breadcrumbs_component.html.erb +19 -0
- data/app/components/spotlight/breadcrumbs_component.rb +23 -0
- data/app/components/spotlight/exhibit_navbar_component.html.erb +25 -0
- data/app/components/spotlight/exhibit_navbar_component.rb +12 -0
- data/app/components/spotlight/tag_list_form_component.html.erb +14 -0
- data/app/components/spotlight/tag_list_form_component.rb +13 -0
- data/app/controllers/concerns/spotlight/controller.rb +9 -1
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -2
- data/app/controllers/spotlight/about_pages_controller.rb +1 -1
- data/app/controllers/spotlight/admin_users_controller.rb +2 -2
- data/app/controllers/spotlight/appearances_controller.rb +4 -4
- data/app/controllers/spotlight/browse_controller.rb +2 -2
- data/app/controllers/spotlight/bulk_actions_controller.rb +1 -1
- data/app/controllers/spotlight/bulk_updates_controller.rb +7 -2
- data/app/controllers/spotlight/catalog_controller.rb +11 -10
- data/app/controllers/spotlight/contacts_controller.rb +5 -5
- data/app/controllers/spotlight/custom_fields_controller.rb +5 -5
- data/app/controllers/spotlight/custom_search_fields_controller.rb +5 -5
- data/app/controllers/spotlight/dashboards_controller.rb +4 -4
- data/app/controllers/spotlight/exhibits_controller.rb +6 -5
- data/app/controllers/spotlight/feature_pages_controller.rb +5 -5
- data/app/controllers/spotlight/featured_images_controller.rb +1 -1
- data/app/controllers/spotlight/groups_controller.rb +1 -1
- data/app/controllers/spotlight/home_pages_controller.rb +2 -2
- data/app/controllers/spotlight/job_trackers_controller.rb +3 -3
- data/app/controllers/spotlight/metadata_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/pages_controller.rb +3 -3
- data/app/controllers/spotlight/resources/csv_upload_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +4 -4
- data/app/controllers/spotlight/roles_controller.rb +4 -4
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +5 -5
- data/app/controllers/spotlight/sites_controller.rb +4 -4
- data/app/controllers/spotlight/tags_controller.rb +3 -3
- data/app/controllers/spotlight/translations_controller.rb +5 -5
- data/app/helpers/spotlight/application_helper.rb +2 -2
- data/app/helpers/spotlight/crop_helper.rb +1 -1
- data/app/helpers/spotlight/pages_helper.rb +7 -0
- data/app/helpers/spotlight/title_helper.rb +2 -2
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +1 -1
- data/app/javascript/spotlight/admin/blocks/resources_block.js +82 -1
- data/app/javascript/spotlight/admin/blocks/solr_documents_embed_block.js +1 -1
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +21 -0
- data/app/javascript/spotlight/admin/edit_in_place.js +27 -0
- data/app/javascript/spotlight/admin/index.js +0 -2
- data/app/javascript/spotlight/admin/sir-trevor/locales.js +11 -0
- data/app/jobs/concerns/spotlight/job_tracking.rb +1 -1
- data/app/jobs/spotlight/add_tags_job.rb +2 -2
- data/app/jobs/spotlight/add_uploads_from_csv.rb +1 -1
- data/app/jobs/spotlight/change_visibility_job.rb +2 -2
- data/app/jobs/spotlight/process_bulk_updates_csv_job.rb +2 -2
- data/app/jobs/spotlight/reindex_exhibit_job.rb +1 -1
- data/app/jobs/spotlight/reindex_job.rb +6 -6
- data/app/jobs/spotlight/remove_tags_job.rb +2 -2
- data/app/jobs/spotlight/rename_tags_job.rb +2 -2
- data/app/models/breadcrumb.rb +15 -0
- data/app/models/concerns/spotlight/exhibit_defaults.rb +1 -1
- data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
- data/app/models/concerns/spotlight/solr_document/finder.rb +4 -4
- data/app/models/concerns/spotlight/solr_document.rb +4 -4
- data/app/models/concerns/spotlight/translatables.rb +1 -1
- data/app/models/spotlight/analytics/ga.rb +3 -3
- data/app/models/spotlight/attachment.rb +1 -1
- data/app/models/spotlight/background_job_progress.rb +1 -1
- data/app/models/spotlight/contact_email.rb +1 -1
- data/app/models/spotlight/contact_form.rb +2 -2
- data/app/models/spotlight/custom_field.rb +2 -2
- data/app/models/spotlight/custom_search_field.rb +2 -2
- data/app/models/spotlight/job_tracker.rb +1 -1
- data/app/models/spotlight/page.rb +2 -2
- data/app/models/spotlight/resources/iiif_service.rb +4 -4
- data/app/models/spotlight/role.rb +1 -1
- data/app/models/spotlight/search.rb +2 -2
- data/app/services/spotlight/bulk_updates_csv_template_service.rb +2 -2
- data/app/services/spotlight/clone_translated_page_from_locale.rb +1 -1
- data/app/services/spotlight/etl/pipeline.rb +1 -1
- data/app/views/shared/_exhibit_navbar.html.erb +2 -24
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/spotlight/exhibits/_form.html.erb +1 -1
- data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +16 -5
- data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +3 -2
- data/config/locales/spotlight.en.yml +4 -0
- data/lib/generators/spotlight/templates/catalog_controller.rb +1 -0
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +4 -0
- data/lib/migration/iiif.rb +3 -3
- data/lib/spotlight/engine.rb +6 -26
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +3 -3
- data/spec/factories/exhibits.rb +1 -1
- data/spec/support/views/test_view_helpers.rb +0 -1
- metadata +11 -27
- data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +0 -39
- data/app/javascript/spotlight/admin/appearance.js +0 -22
- data/app/views/shared/_breadcrumbs.html.erb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b9748a58737da3155547a7ae91de947638a30a54f8b69eb616ececa64d6a90a
|
4
|
+
data.tar.gz: 62915d1d008172d70a7a6374bda9672077b4454bbcb6a621a5055a7f8912ef8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a2607a1b105f87dbce17fa9569f9c1126d08d0bd75ef6db193e87bf38c06874cc0976f71bf946987881babd5da4da7dd00494cc77515837309059b20acf3cff
|
7
|
+
data.tar.gz: 474aa21fe721b381cd3aa220f29090f34101906aff760a3d829b9108b1fa03a3b18797b24376050ddd01d85202610fb824a80cdad4948fdcb6d78d3b292f948f
|
data/README.md
CHANGED
@@ -78,9 +78,9 @@ See more detailed instructions for development environment setup at ["Contributi
|
|
78
78
|
## With Docker
|
79
79
|
|
80
80
|
```sh
|
81
|
-
# because of how docker
|
82
|
-
docker
|
83
|
-
docker
|
81
|
+
# because of how docker compose handles named images, running `docker compose up --build` will error when the Rails images have not been built locally
|
82
|
+
docker compose build
|
83
|
+
docker compose up
|
84
84
|
```
|
85
85
|
|
86
86
|
## Tests
|
@@ -4050,29 +4050,6 @@ class AddNewButton {
|
|
4050
4050
|
}
|
4051
4051
|
}
|
4052
4052
|
|
4053
|
-
class Appearance {
|
4054
|
-
connect(){
|
4055
|
-
$("[data-behavior='restore-default']").each(function(){
|
4056
|
-
var hidden = $("[data-default-value]", $(this));
|
4057
|
-
var value = $($("[data-in-place-edit-target]", $(this)).data('in-place-edit-target'), $(this));
|
4058
|
-
var button = $("[data-restore-default]", $(this));
|
4059
|
-
hidden.on('blur', function(){
|
4060
|
-
if( $(this).val() == $(this).data('default-value') ) {
|
4061
|
-
button.addClass('d-none');
|
4062
|
-
} else {
|
4063
|
-
button.removeClass('d-none');
|
4064
|
-
}
|
4065
|
-
});
|
4066
|
-
button.on('click', function(e){
|
4067
|
-
e.preventDefault();
|
4068
|
-
hidden.val(hidden.data('default-value'));
|
4069
|
-
value.text(hidden.data('default-value'));
|
4070
|
-
button.hide();
|
4071
|
-
});
|
4072
|
-
});
|
4073
|
-
}
|
4074
|
-
}
|
4075
|
-
|
4076
4053
|
class BlacklightConfiguration {
|
4077
4054
|
connect() {
|
4078
4055
|
// Add Select/Deselect all button behavior
|
@@ -4629,6 +4606,33 @@ class EditInPlace {
|
|
4629
4606
|
return false;
|
4630
4607
|
});
|
4631
4608
|
});
|
4609
|
+
|
4610
|
+
$("[data-behavior='restore-default']").each(function(){
|
4611
|
+
var hidden = $("[data-default-value]", $(this));
|
4612
|
+
var value = $($("[data-in-place-edit-target]", $(this)).data('in-place-edit-target'), $(this));
|
4613
|
+
var button = $("[data-restore-default]", $(this));
|
4614
|
+
|
4615
|
+
hidden.on('keypress', function(e) {
|
4616
|
+
if(e.which == 13) {
|
4617
|
+
hidden.trigger('blur');
|
4618
|
+
return false;
|
4619
|
+
}
|
4620
|
+
});
|
4621
|
+
|
4622
|
+
hidden.on('blur', function(){
|
4623
|
+
if( $(this).val() == $(this).data('default-value') ) {
|
4624
|
+
button.addClass('d-none');
|
4625
|
+
} else {
|
4626
|
+
button.removeClass('d-none');
|
4627
|
+
}
|
4628
|
+
});
|
4629
|
+
button.on('click', function(e){
|
4630
|
+
e.preventDefault();
|
4631
|
+
hidden.val(hidden.data('default-value'));
|
4632
|
+
value.text(hidden.data('default-value'));
|
4633
|
+
button.hide();
|
4634
|
+
});
|
4635
|
+
});
|
4632
4636
|
}
|
4633
4637
|
}
|
4634
4638
|
|
@@ -5131,6 +5135,7 @@ jQuery.fn.scrollStop = function(callback) {
|
|
5131
5135
|
};
|
5132
5136
|
|
5133
5137
|
// Place all the behaviors and hooks related to the matching controller here.
|
5138
|
+
// All this logic will automatically be available in application.js.
|
5134
5139
|
|
5135
5140
|
class Pages {
|
5136
5141
|
connect(){
|
@@ -5597,6 +5602,8 @@ class CheckboxSubmit {
|
|
5597
5602
|
}
|
5598
5603
|
|
5599
5604
|
// Visibility toggle for items in an exhibit, based on Blacklight's bookmark toggle
|
5605
|
+
// See: https://github.com/projectblacklight/blacklight/blob/main/app/javascript/blacklight/bookmark_toggle.js
|
5606
|
+
|
5600
5607
|
|
5601
5608
|
const VisibilityToggle = (e) => {
|
5602
5609
|
if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
|
@@ -5923,10 +5930,24 @@ Spotlight$1.Block.Resources = (function(){
|
|
5923
5930
|
formable: true,
|
5924
5931
|
autocompleteable: true,
|
5925
5932
|
show_heading: true,
|
5933
|
+
show_alt_text: true,
|
5926
5934
|
|
5927
5935
|
title: function() { return i18n.t("blocks:" + this.type + ":title"); },
|
5928
5936
|
description: function() { return i18n.t("blocks:" + this.type + ":description"); },
|
5929
|
-
|
5937
|
+
alt_text_guidelines: function() {
|
5938
|
+
if (this.show_alt_text) {
|
5939
|
+
return i18n.t("blocks:alt_text_guidelines:intro");
|
5940
|
+
}
|
5941
|
+
return "";
|
5942
|
+
},
|
5943
|
+
alt_text_guidelines_link: function() {
|
5944
|
+
if (this.show_alt_text) {
|
5945
|
+
var link_url = i18n.t("blocks:alt_text_guidelines:link_url");
|
5946
|
+
var link_label = i18n.t("blocks:alt_text_guidelines:link_label");
|
5947
|
+
return '<a target="_blank" href="' + link_url + '">' + link_label + '</a>';
|
5948
|
+
}
|
5949
|
+
return "";
|
5950
|
+
},
|
5930
5951
|
icon_name: "resources",
|
5931
5952
|
blockGroup: function() { return i18n.t("blocks:group:items") },
|
5932
5953
|
|
@@ -5936,6 +5957,8 @@ Spotlight$1.Block.Resources = (function(){
|
|
5936
5957
|
show_secondary_field_key: "show-secondary-caption",
|
5937
5958
|
|
5938
5959
|
display_checkbox: "display-checkbox",
|
5960
|
+
decorative_checkbox: "decorative-checkbox",
|
5961
|
+
alt_text_textarea: "alt-text-textarea",
|
5939
5962
|
|
5940
5963
|
globalIndex: 0,
|
5941
5964
|
|
@@ -5943,6 +5966,13 @@ Spotlight$1.Block.Resources = (function(){
|
|
5943
5966
|
return [];
|
5944
5967
|
},
|
5945
5968
|
|
5969
|
+
_altTextFieldsHTML: function(index, data) {
|
5970
|
+
if (this.show_alt_text) {
|
5971
|
+
return this.altTextHTML(index, data);
|
5972
|
+
}
|
5973
|
+
return "";
|
5974
|
+
},
|
5975
|
+
|
5946
5976
|
_itemPanel: function(data) {
|
5947
5977
|
var index = "item_" + this.globalIndex++;
|
5948
5978
|
var checked;
|
@@ -5973,6 +6003,7 @@ Spotlight$1.Block.Resources = (function(){
|
|
5973
6003
|
<div class="main">
|
5974
6004
|
<div class="title card-title">${data.title}</div>
|
5975
6005
|
<div>${(data.slug || data.id)}</div>
|
6006
|
+
${this._altTextFieldsHTML(index, data)}
|
5976
6007
|
</div>
|
5977
6008
|
<div class="remove float-right float-end">
|
5978
6009
|
<a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
|
@@ -6009,6 +6040,7 @@ Spotlight$1.Block.Resources = (function(){
|
|
6009
6040
|
|
6010
6041
|
createItemPanel: function(data) {
|
6011
6042
|
var panel = this._itemPanel(data);
|
6043
|
+
this.attachAltTextHandlers(panel);
|
6012
6044
|
$(panel).appendTo($('.panels > ol', this.inner));
|
6013
6045
|
$('[data-behavior="nestable"]', this.inner).trigger('change');
|
6014
6046
|
},
|
@@ -6041,11 +6073,67 @@ Spotlight$1.Block.Resources = (function(){
|
|
6041
6073
|
return `<div class="form resources-admin clearfix">
|
6042
6074
|
<div class="widget-header">
|
6043
6075
|
${this.description()}
|
6076
|
+
${this.alt_text_guidelines()}
|
6077
|
+
${this.alt_text_guidelines_link()}
|
6044
6078
|
</div>
|
6045
6079
|
${this.content()}
|
6046
6080
|
</div>`
|
6047
6081
|
},
|
6048
6082
|
|
6083
|
+
_altTextData: function(data) {
|
6084
|
+
const isDecorative = data.decorative;
|
6085
|
+
const altText = isDecorative ? '' : (data.alt_text || '');
|
6086
|
+
const altTextBackup = data.alt_text_backup || '';
|
6087
|
+
const placeholderAttr = isDecorative ? '' : `placeholder="${i18n.t("blocks:resources:alt_text:placeholder")}"`;
|
6088
|
+
const disabledAttr = isDecorative ? 'disabled' : '';
|
6089
|
+
|
6090
|
+
return { isDecorative, altText, altTextBackup, placeholderAttr, disabledAttr };
|
6091
|
+
},
|
6092
|
+
|
6093
|
+
altTextHTML: function(index, data) {
|
6094
|
+
const { isDecorative, altText, altTextBackup, placeholderAttr, disabledAttr } = this._altTextData(data);
|
6095
|
+
return `<div class="mt-2 pt-2 d-flex">
|
6096
|
+
<div class="me-2 mr-2">
|
6097
|
+
<label class="col-form-label pb-0 pt-1" for="${this.formId(this.alt_text_textarea + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:alternative_text")}</label>
|
6098
|
+
<div class="form-check mb-1 justify-content-end">
|
6099
|
+
<input class="form-check-input" type="checkbox"
|
6100
|
+
id="${this.formId(this.decorative_checkbox + '_' + data.id)}" name="item[${index}][decorative]" ${isDecorative ? 'checked' : ''}>
|
6101
|
+
<label class="form-check-label" for="${this.formId(this.decorative_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:decorative")}</label>
|
6102
|
+
</div>
|
6103
|
+
</div>
|
6104
|
+
<div class="flex-grow-1 flex-fill d-flex">
|
6105
|
+
<input type="hidden" name="item[${index}][alt_text_backup]" value="${altTextBackup}" />
|
6106
|
+
<textarea class="form-control w-100" rows="2" ${placeholderAttr}
|
6107
|
+
id="${this.formId(this.alt_text_textarea + '_' + data.id)}" name="item[${index}][alt_text]" ${disabledAttr}>${altText}</textarea>
|
6108
|
+
</div>
|
6109
|
+
</div>`
|
6110
|
+
},
|
6111
|
+
|
6112
|
+
attachAltTextHandlers: function(panel) {
|
6113
|
+
if (this.show_alt_text) {
|
6114
|
+
const decorativeCheckbox = $('input[name$="[decorative]"]', panel);
|
6115
|
+
const altTextInput = $('textarea[name$="[alt_text]"]', panel);
|
6116
|
+
const altTextBackupInput = $('input[name$="[alt_text_backup]"]', panel);
|
6117
|
+
|
6118
|
+
decorativeCheckbox.on('change', function() {
|
6119
|
+
const isDecorative = this.checked;
|
6120
|
+
if (isDecorative) {
|
6121
|
+
altTextBackupInput.val(altTextInput.val());
|
6122
|
+
altTextInput.val('');
|
6123
|
+
} else {
|
6124
|
+
altTextInput.val(altTextBackupInput.val());
|
6125
|
+
}
|
6126
|
+
altTextInput
|
6127
|
+
.prop('disabled', isDecorative)
|
6128
|
+
.attr('placeholder', isDecorative ? '' : i18n.t("blocks:resources:alt_text:placeholder"));
|
6129
|
+
});
|
6130
|
+
|
6131
|
+
altTextInput.on('input', function() {
|
6132
|
+
$(this).data('lastValue', $(this).val());
|
6133
|
+
});
|
6134
|
+
}
|
6135
|
+
},
|
6136
|
+
|
6049
6137
|
onBlockRender: function() {
|
6050
6138
|
Module.init($('[data-behavior="nestable"]', this.inner));
|
6051
6139
|
|
@@ -6235,7 +6323,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
|
|
6235
6323
|
},
|
6236
6324
|
|
6237
6325
|
item_options: function() { return `
|
6238
|
-
|
6326
|
+
<label>
|
6239
6327
|
<input type="hidden" name="display-item-counts" value="false" />
|
6240
6328
|
<input type="checkbox" name="display-item-counts" value="true" checked />
|
6241
6329
|
${i18n.t("blocks:browse_group_categories:item_counts")}
|
@@ -6670,7 +6758,7 @@ SirTrevor.Blocks.SolrDocumentsEmbed = (function(){
|
|
6670
6758
|
|
6671
6759
|
return SirTrevor.Blocks.SolrDocumentsBase.extend({
|
6672
6760
|
type: "solr_documents_embed",
|
6673
|
-
|
6761
|
+
show_alt_text: false,
|
6674
6762
|
icon_name: "item_embed",
|
6675
6763
|
|
6676
6764
|
item_options: function() { return "" },
|
@@ -6834,6 +6922,7 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
6834
6922
|
<label for="${this.formId('link_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:link")}</label>
|
6835
6923
|
<input type="text" class="form-control col" id="${this.formId('link_' + dataId)}" name="item[${index}][link]" data-field="link"/>
|
6836
6924
|
</div>
|
6925
|
+
${this._altTextFieldsHTML(index, data)}
|
6837
6926
|
</div>
|
6838
6927
|
<div class="remove float-right float-end">
|
6839
6928
|
<a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
|
@@ -6861,6 +6950,8 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
6861
6950
|
return `<div class="form oembed-text-admin clearfix">
|
6862
6951
|
<div class="widget-header">
|
6863
6952
|
${this.description()}
|
6953
|
+
${this.alt_text_guidelines()}
|
6954
|
+
${this.alt_text_guidelines_link()}
|
6864
6955
|
</div>
|
6865
6956
|
<div class="row">
|
6866
6957
|
<div class="form-group mb-3 col-md-8">
|
@@ -6880,6 +6971,24 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
6880
6971
|
</div>`
|
6881
6972
|
},
|
6882
6973
|
|
6974
|
+
altTextHTML: function(index, data) {
|
6975
|
+
const { isDecorative, altText, altTextBackup, placeholderAttr, disabledAttr } = this._altTextData(data);
|
6976
|
+
return `
|
6977
|
+
<div class="field row mr-3 me-3">
|
6978
|
+
<div class="col-lg-3 ps-md-2 pl-md-2">
|
6979
|
+
<label class="col-form-label text-nowrap pb-0 pt-1 justify-content-md-start justify-content-lg-end d-flex" for="${this.formId(this.alt_text_textarea + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:alternative_text")}</label>
|
6980
|
+
<div class="form-check d-flex justify-content-md-start justify-content-lg-end">
|
6981
|
+
<input class="form-check-input" type="checkbox"
|
6982
|
+
id="${this.formId(this.decorative_checkbox + '_' + data.id)}" name="item[${index}][decorative]" ${isDecorative ? 'checked' : ''}>
|
6983
|
+
<label class="form-check-label" for="${this.formId(this.decorative_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:decorative")}</label>
|
6984
|
+
</div>
|
6985
|
+
</div>
|
6986
|
+
<input type="hidden" name="item[${index}][alt_text_backup]" value="${altTextBackup}" />
|
6987
|
+
<textarea class="col-lg-9" rows="2" ${placeholderAttr}
|
6988
|
+
id="${this.formId(this.alt_text_textarea + '_' + data.id)}" name="item[${index}][alt_text]" ${disabledAttr}>${altText}</textarea>
|
6989
|
+
</div>`
|
6990
|
+
},
|
6991
|
+
|
6883
6992
|
zpr_key: 'zpr_link'
|
6884
6993
|
});
|
6885
6994
|
})();
|
@@ -7090,6 +7199,11 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
|
|
7090
7199
|
drag: "Drag",
|
7091
7200
|
display: "Display?",
|
7092
7201
|
remove: "Remove"
|
7202
|
+
},
|
7203
|
+
alt_text: {
|
7204
|
+
decorative: "Decorative",
|
7205
|
+
alternative_text: "Alternative text",
|
7206
|
+
placeholder: "Enter alt text for this item..."
|
7093
7207
|
}
|
7094
7208
|
},
|
7095
7209
|
|
@@ -7155,6 +7269,12 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
|
|
7155
7269
|
group: {
|
7156
7270
|
undefined: "Standard widgets",
|
7157
7271
|
items: "Exhibit item widgets"
|
7272
|
+
},
|
7273
|
+
|
7274
|
+
alt_text_guidelines: {
|
7275
|
+
intro: 'For each item, please enter alternative text or appropriately check the decorative box. ',
|
7276
|
+
link_label: 'Guidelines for writing alt text.',
|
7277
|
+
link_url: 'https://www.w3.org/WAI/tutorials/images/'
|
7158
7278
|
}
|
7159
7279
|
});
|
7160
7280
|
|
@@ -7165,7 +7285,6 @@ class AdminIndex {
|
|
7165
7285
|
connect() {
|
7166
7286
|
new AddAnother().connect();
|
7167
7287
|
new AddNewButton().connect();
|
7168
|
-
new Appearance().connect();
|
7169
7288
|
new CopyEmailAddress().connect();
|
7170
7289
|
new Croppable().connect();
|
7171
7290
|
new EditInPlace().connect();
|