blacklight-spotlight 4.5.0 → 4.6.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/images/spotlight/blocks/sir-trevor-icons.svg +1 -1
- data/app/assets/javascripts/spotlight/spotlight.esm.js +19 -22
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +19 -22
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +5 -4
- data/app/components/spotlight/bulk_action_component.html.erb +8 -0
- data/app/components/spotlight/bulk_action_component.rb +20 -0
- data/app/components/spotlight/header_navigation_link_component.html.erb +1 -0
- data/app/components/spotlight/header_navigation_link_component.rb +14 -0
- data/app/components/spotlight/save_search_component.html.erb +25 -0
- data/app/components/spotlight/save_search_component.rb +25 -0
- data/app/components/spotlight/translations/subheading_component.html.erb +3 -0
- data/app/components/spotlight/translations/subheading_component.rb +17 -0
- data/app/controllers/spotlight/accessibility_controller.rb +1 -3
- data/app/helpers/spotlight/application_helper.rb +6 -7
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/javascript/spotlight/admin/blacklight_configuration.js +18 -21
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +2 -2
- data/app/models/spotlight/page_configurations.rb +2 -1
- data/app/views/catalog/_bulk_actions.html.erb +1 -10
- data/app/views/catalog/_save_search.html.erb +1 -25
- data/app/views/shared/_about_navbar.html.erb +1 -1
- data/app/views/shared/_browse_navbar.html.erb +1 -1
- data/app/views/shared/_curated_features_navbar.html.erb +4 -1
- data/app/views/spotlight/accessibility/alt_text.html.erb +1 -7
- data/app/views/spotlight/admin_users/index.html.erb +2 -2
- data/app/views/spotlight/metadata_configurations/edit.html.erb +12 -2
- data/app/views/spotlight/translations/_general.html.erb +2 -6
- data/app/views/spotlight/translations/_metadata.html.erb +1 -3
- data/app/views/spotlight/translations/_pages.html.erb +4 -9
- data/app/views/spotlight/translations/_search_fields.html.erb +3 -9
- data/config/locales/spotlight.en.yml +1 -1
- data/lib/generators/spotlight/templates/spotlight.scss +0 -1
- data/lib/spotlight/engine.rb +7 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +10 -3
- data/app/assets/stylesheets/spotlight/_variables_bootstrap.scss +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf4c6e80e6610969a1f0c37a27cb1c3e67ada96d4e22b63ef92a84a32d1e4946
|
|
4
|
+
data.tar.gz: e03d10a0a4db7fcdab708987cf5be0a50966ed831ece6037a9d3eb8b5fddb022
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a00ff7e056f1839c65c4656b636c5c29fccf1d293ff8d14ba2fc383d5485d12e08f0bf54c57a35d8100533180e61c68df01cce5e2a4461cf6124e98a47b6f566
|
|
7
|
+
data.tar.gz: 192e740e4f9fc8d6d08ff5119ecb174789f2f974f07f520b2077f86d4be4af402167b8a82634372f412e3732f16feb87f9b34716017c4cb0c9e6ae725781f633
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</symbol>
|
|
35
35
|
<symbol id="fmt-heading" viewBox="0 0 1024 1024">
|
|
36
36
|
<title>fmt-heading</title>
|
|
37
|
-
<path class="path1" d="
|
|
37
|
+
<path class="path1" d="M760 737.28h-105.943v-216.343h-198.514v216.343h-106.286v-501.257h106.286v196.457h198.514v-196.457h105.943v501.257zM847.871"></path>
|
|
38
38
|
</symbol>
|
|
39
39
|
<symbol id="fmt-quote2" viewBox="0 0 1024 1024">
|
|
40
40
|
<title>fmt-quote2</title>
|
|
@@ -4052,54 +4052,51 @@ class AddNewButton {
|
|
|
4052
4052
|
|
|
4053
4053
|
class BlacklightConfiguration {
|
|
4054
4054
|
connect() {
|
|
4055
|
-
// Add Select/Deselect all
|
|
4055
|
+
// Add Select/Deselect all input behavior
|
|
4056
4056
|
this.addCheckboxToggleBehavior();
|
|
4057
4057
|
this.addEnableToggleBehavior();
|
|
4058
4058
|
}
|
|
4059
4059
|
|
|
4060
|
-
// Add Select/Deselect all
|
|
4060
|
+
// Add Select/Deselect all behavior for metadata field names for a given view e.g. Item details.
|
|
4061
4061
|
addCheckboxToggleBehavior() {
|
|
4062
4062
|
$("[data-behavior='metadata-select']").each(function(){
|
|
4063
|
-
var
|
|
4064
|
-
var parentCell =
|
|
4063
|
+
var selectCheckbox = $(this);
|
|
4064
|
+
var parentCell = selectCheckbox.parents("th");
|
|
4065
4065
|
var table = parentCell.closest("table");
|
|
4066
4066
|
var columnRows = $("tr td:nth-child(" + (parentCell.index() + 1) + ")", table);
|
|
4067
4067
|
var checkboxes = $("input[type='checkbox']", columnRows);
|
|
4068
|
-
|
|
4069
|
-
// Add the check/uncheck behavior to the
|
|
4070
|
-
|
|
4071
|
-
button.on('click', function(e){
|
|
4072
|
-
e.preventDefault();
|
|
4068
|
+
updateSelectAllInput(selectCheckbox, columnRows);
|
|
4069
|
+
// Add the check/uncheck behavior to the select/deselect all checkbox
|
|
4070
|
+
selectCheckbox.on('click', function(e){
|
|
4073
4071
|
var allChecked = allCheckboxesChecked(columnRows);
|
|
4074
4072
|
columnRows.each(function(){
|
|
4075
4073
|
$("input[type='checkbox']", $(this)).prop('checked', !allChecked);
|
|
4076
|
-
swapSelectAllButtonText(button, columnRows);
|
|
4077
4074
|
});
|
|
4078
4075
|
});
|
|
4079
|
-
//
|
|
4076
|
+
// When a single checkbox is selected/unselected, the "All" checkbox should be updated accordingly.
|
|
4080
4077
|
checkboxes.each(function(){
|
|
4081
4078
|
$(this).on('change', function(){
|
|
4082
|
-
|
|
4079
|
+
updateSelectAllInput(selectCheckbox, columnRows);
|
|
4083
4080
|
});
|
|
4084
|
-
});
|
|
4081
|
+
});
|
|
4085
4082
|
});
|
|
4083
|
+
|
|
4086
4084
|
// Check number of checkboxes against the number of checked
|
|
4087
4085
|
// checkboxes to determine if all of them are checked or not
|
|
4088
4086
|
function allCheckboxesChecked(elements) {
|
|
4089
4087
|
return ($("input[type='checkbox']", elements).length == $("input[type='checkbox']:checked", elements).length)
|
|
4090
4088
|
}
|
|
4091
|
-
|
|
4092
|
-
//
|
|
4093
|
-
|
|
4094
|
-
function swapSelectAllButtonText(button, elements) {
|
|
4089
|
+
|
|
4090
|
+
// Check or uncheck the "All" checkbox for each view column, e.g. Item details, List, etc.
|
|
4091
|
+
function updateSelectAllInput(checkbox, elements) {
|
|
4095
4092
|
if ( allCheckboxesChecked(elements) ) {
|
|
4096
|
-
|
|
4093
|
+
checkbox.prop('checked', true);
|
|
4097
4094
|
} else {
|
|
4098
|
-
|
|
4095
|
+
checkbox.prop('checked', false);
|
|
4099
4096
|
}
|
|
4100
4097
|
}
|
|
4101
4098
|
}
|
|
4102
|
-
|
|
4099
|
+
|
|
4103
4100
|
addEnableToggleBehavior() {
|
|
4104
4101
|
$("[data-behavior='enable-feature']").each(function(){
|
|
4105
4102
|
var checkbox = $(this);
|
|
@@ -6972,8 +6969,8 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
|
6972
6969
|
</div>
|
|
6973
6970
|
<div class="col-md-4">
|
|
6974
6971
|
<input name="${this.zpr_key}" type="hidden" value="false" />
|
|
6975
|
-
<input name="${this.zpr_key}" id="${this.formId(this.zpr_key)}" data-key
|
|
6976
|
-
<label for="${this.formId(this.zpr_key)}">${
|
|
6972
|
+
<input name="${this.zpr_key}" id="${this.formId(this.zpr_key)}" data-key="${this.zpr_key}" type="checkbox" value="true" />
|
|
6973
|
+
<label for="${this.formId(this.zpr_key)}">${i18n.t("blocks:solr_documents:zpr:title")}</label>
|
|
6977
6974
|
</div>
|
|
6978
6975
|
</div>
|
|
6979
6976
|
${this.text_area()}
|