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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spotlight/spotlight.esm.js +27 -24
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  4. data/app/assets/javascripts/spotlight/spotlight.js +27 -24
  5. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  6. data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +19 -1
  7. data/app/components/spotlight/breadcrumbs_component.html.erb +19 -0
  8. data/app/components/spotlight/breadcrumbs_component.rb +23 -0
  9. data/app/components/spotlight/exhibit_navbar_component.html.erb +25 -0
  10. data/app/components/spotlight/exhibit_navbar_component.rb +12 -0
  11. data/app/components/spotlight/tag_list_form_component.html.erb +14 -0
  12. data/app/components/spotlight/tag_list_form_component.rb +13 -0
  13. data/app/controllers/concerns/spotlight/controller.rb +9 -1
  14. data/app/controllers/spotlight/about_pages_controller.rb +1 -1
  15. data/app/controllers/spotlight/admin_users_controller.rb +2 -2
  16. data/app/controllers/spotlight/appearances_controller.rb +3 -3
  17. data/app/controllers/spotlight/browse_controller.rb +2 -2
  18. data/app/controllers/spotlight/bulk_updates_controller.rb +6 -1
  19. data/app/controllers/spotlight/catalog_controller.rb +11 -10
  20. data/app/controllers/spotlight/contacts_controller.rb +5 -5
  21. data/app/controllers/spotlight/custom_fields_controller.rb +5 -5
  22. data/app/controllers/spotlight/custom_search_fields_controller.rb +5 -5
  23. data/app/controllers/spotlight/dashboards_controller.rb +4 -4
  24. data/app/controllers/spotlight/exhibits_controller.rb +6 -5
  25. data/app/controllers/spotlight/feature_pages_controller.rb +5 -5
  26. data/app/controllers/spotlight/home_pages_controller.rb +2 -2
  27. data/app/controllers/spotlight/job_trackers_controller.rb +3 -3
  28. data/app/controllers/spotlight/metadata_configurations_controller.rb +3 -3
  29. data/app/controllers/spotlight/pages_controller.rb +2 -2
  30. data/app/controllers/spotlight/resources_controller.rb +4 -4
  31. data/app/controllers/spotlight/roles_controller.rb +3 -3
  32. data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
  33. data/app/controllers/spotlight/searches_controller.rb +4 -4
  34. data/app/controllers/spotlight/sites_controller.rb +4 -4
  35. data/app/controllers/spotlight/tags_controller.rb +3 -3
  36. data/app/controllers/spotlight/translations_controller.rb +3 -3
  37. data/app/javascript/spotlight/admin/edit_in_place.js +27 -0
  38. data/app/javascript/spotlight/admin/index.js +0 -2
  39. data/app/models/breadcrumb.rb +15 -0
  40. data/app/models/spotlight/analytics/ga.rb +2 -2
  41. data/app/views/shared/_exhibit_navbar.html.erb +2 -24
  42. data/app/views/shared/_masthead.html.erb +1 -1
  43. data/app/views/spotlight/exhibits/_form.html.erb +1 -1
  44. data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +1 -1
  45. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +16 -5
  46. data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
  47. data/config/locales/spotlight.en.yml +4 -0
  48. data/lib/generators/spotlight/templates/catalog_controller.rb +1 -0
  49. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +4 -0
  50. data/lib/spotlight/engine.rb +2 -9
  51. data/lib/spotlight/version.rb +1 -1
  52. data/spec/support/views/test_view_helpers.rb +0 -1
  53. metadata +10 -26
  54. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +0 -39
  55. data/app/javascript/spotlight/admin/appearance.js +0 -22
  56. 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();