blacklight-spotlight 4.1.2 → 4.2.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 +27 -24
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +27 -24
- 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/spotlight/about_pages_controller.rb +1 -1
- data/app/controllers/spotlight/admin_users_controller.rb +2 -2
- data/app/controllers/spotlight/appearances_controller.rb +3 -3
- data/app/controllers/spotlight/browse_controller.rb +2 -2
- data/app/controllers/spotlight/bulk_updates_controller.rb +6 -1
- 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/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 +2 -2
- data/app/controllers/spotlight/resources_controller.rb +4 -4
- data/app/controllers/spotlight/roles_controller.rb +3 -3
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +4 -4
- 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 +3 -3
- data/app/javascript/spotlight/admin/edit_in_place.js +27 -0
- data/app/javascript/spotlight/admin/index.js +0 -2
- data/app/models/breadcrumb.rb +15 -0
- data/app/models/spotlight/analytics/ga.rb +2 -2
- 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/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/spotlight/engine.rb +2 -9
- data/lib/spotlight/version.rb +1 -1
- data/spec/support/views/test_view_helpers.rb +0 -1
- metadata +10 -26
- 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
@@ -4056,29 +4056,6 @@
|
|
4056
4056
|
}
|
4057
4057
|
}
|
4058
4058
|
|
4059
|
-
class Appearance {
|
4060
|
-
connect(){
|
4061
|
-
$("[data-behavior='restore-default']").each(function(){
|
4062
|
-
var hidden = $("[data-default-value]", $(this));
|
4063
|
-
var value = $($("[data-in-place-edit-target]", $(this)).data('in-place-edit-target'), $(this));
|
4064
|
-
var button = $("[data-restore-default]", $(this));
|
4065
|
-
hidden.on('blur', function(){
|
4066
|
-
if( $(this).val() == $(this).data('default-value') ) {
|
4067
|
-
button.addClass('d-none');
|
4068
|
-
} else {
|
4069
|
-
button.removeClass('d-none');
|
4070
|
-
}
|
4071
|
-
});
|
4072
|
-
button.on('click', function(e){
|
4073
|
-
e.preventDefault();
|
4074
|
-
hidden.val(hidden.data('default-value'));
|
4075
|
-
value.text(hidden.data('default-value'));
|
4076
|
-
button.hide();
|
4077
|
-
});
|
4078
|
-
});
|
4079
|
-
}
|
4080
|
-
}
|
4081
|
-
|
4082
4059
|
class BlacklightConfiguration {
|
4083
4060
|
connect() {
|
4084
4061
|
// Add Select/Deselect all button behavior
|
@@ -4635,6 +4612,33 @@
|
|
4635
4612
|
return false;
|
4636
4613
|
});
|
4637
4614
|
});
|
4615
|
+
|
4616
|
+
$("[data-behavior='restore-default']").each(function(){
|
4617
|
+
var hidden = $("[data-default-value]", $(this));
|
4618
|
+
var value = $($("[data-in-place-edit-target]", $(this)).data('in-place-edit-target'), $(this));
|
4619
|
+
var button = $("[data-restore-default]", $(this));
|
4620
|
+
|
4621
|
+
hidden.on('keypress', function(e) {
|
4622
|
+
if(e.which == 13) {
|
4623
|
+
hidden.trigger('blur');
|
4624
|
+
return false;
|
4625
|
+
}
|
4626
|
+
});
|
4627
|
+
|
4628
|
+
hidden.on('blur', function(){
|
4629
|
+
if( $(this).val() == $(this).data('default-value') ) {
|
4630
|
+
button.addClass('d-none');
|
4631
|
+
} else {
|
4632
|
+
button.removeClass('d-none');
|
4633
|
+
}
|
4634
|
+
});
|
4635
|
+
button.on('click', function(e){
|
4636
|
+
e.preventDefault();
|
4637
|
+
hidden.val(hidden.data('default-value'));
|
4638
|
+
value.text(hidden.data('default-value'));
|
4639
|
+
button.hide();
|
4640
|
+
});
|
4641
|
+
});
|
4638
4642
|
}
|
4639
4643
|
}
|
4640
4644
|
|
@@ -7171,7 +7175,6 @@
|
|
7171
7175
|
connect() {
|
7172
7176
|
new AddAnother().connect();
|
7173
7177
|
new AddNewButton().connect();
|
7174
|
-
new Appearance().connect();
|
7175
7178
|
new CopyEmailAddress().connect();
|
7176
7179
|
new Croppable().connect();
|
7177
7180
|
new EditInPlace().connect();
|