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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 264d92ef87c83424b382a6925033397b0b886f66d9ef9e5fefeeff8a0f492a9b
4
- data.tar.gz: 00f4a1e42e0d4bacfa15cea790ec24085cdb9e46a2a005f1d47417de0b61cc21
3
+ metadata.gz: 7a324cd5bd7ef8be554451b146fb0c5c33ca1342d025d7ea872849d4c5f998e0
4
+ data.tar.gz: 54ffbf2d1e42fd09efd9eca2a057e99184f3644717486137e0007e02d358cdc2
5
5
  SHA512:
6
- metadata.gz: 6e7c7c123467a8001c771d28944353fae1bb24d80039ca41c7dc927e1e8a8cfff6ec916467ff5241e88c45647d393d6dc68d05a17065cea95e31fc67c3de3a8e
7
- data.tar.gz: 24fbaf64f21ac53e2c0eb5c38663fd9fa3d490b5cab5854ee407237ba6c50092a5b1e72a79828d7775729531a4167006c7b9cfcf59c1d8c2265a8974aa162924
6
+ metadata.gz: c3f8450b4a44ea96e77bbc338d9fa9a4a63cf76dd528f5d4917ca9b453ab015f52650c657f627a18c1163c47e043b7b0bd8f5918ef05803ec730f22ecbbb44dc
7
+ data.tar.gz: 930db0f811a7323c48eb89a439bc257edbe21cf92416aa1495f9b16e39e5b5da22bf2c8953c0a43be2386441dc7e6520923c772b350bba549616bffe050030a8
@@ -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
 
@@ -7165,7 +7169,6 @@ class AdminIndex {
7165
7169
  connect() {
7166
7170
  new AddAnother().connect();
7167
7171
  new AddNewButton().connect();
7168
- new Appearance().connect();
7169
7172
  new CopyEmailAddress().connect();
7170
7173
  new Croppable().connect();
7171
7174
  new EditInPlace().connect();