blacklight-spotlight 4.1.1 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) 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/icon_component.rb +3 -3
  12. data/app/components/spotlight/tag_list_form_component.html.erb +14 -0
  13. data/app/components/spotlight/tag_list_form_component.rb +13 -0
  14. data/app/controllers/concerns/spotlight/controller.rb +9 -1
  15. data/app/controllers/spotlight/about_pages_controller.rb +1 -1
  16. data/app/controllers/spotlight/admin_users_controller.rb +2 -2
  17. data/app/controllers/spotlight/appearances_controller.rb +3 -3
  18. data/app/controllers/spotlight/browse_controller.rb +2 -2
  19. data/app/controllers/spotlight/bulk_updates_controller.rb +6 -1
  20. data/app/controllers/spotlight/catalog_controller.rb +13 -10
  21. data/app/controllers/spotlight/contacts_controller.rb +5 -5
  22. data/app/controllers/spotlight/custom_fields_controller.rb +5 -5
  23. data/app/controllers/spotlight/custom_search_fields_controller.rb +5 -5
  24. data/app/controllers/spotlight/dashboards_controller.rb +4 -4
  25. data/app/controllers/spotlight/exhibits_controller.rb +6 -5
  26. data/app/controllers/spotlight/feature_pages_controller.rb +5 -5
  27. data/app/controllers/spotlight/home_pages_controller.rb +2 -2
  28. data/app/controllers/spotlight/job_trackers_controller.rb +3 -3
  29. data/app/controllers/spotlight/metadata_configurations_controller.rb +3 -3
  30. data/app/controllers/spotlight/pages_controller.rb +2 -2
  31. data/app/controllers/spotlight/resources_controller.rb +4 -4
  32. data/app/controllers/spotlight/roles_controller.rb +3 -3
  33. data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
  34. data/app/controllers/spotlight/searches_controller.rb +4 -4
  35. data/app/controllers/spotlight/sites_controller.rb +4 -4
  36. data/app/controllers/spotlight/tags_controller.rb +3 -3
  37. data/app/controllers/spotlight/translations_controller.rb +3 -3
  38. data/app/javascript/spotlight/admin/edit_in_place.js +27 -0
  39. data/app/javascript/spotlight/admin/index.js +0 -2
  40. data/app/models/breadcrumb.rb +15 -0
  41. data/app/models/spotlight/analytics/ga.rb +2 -2
  42. data/app/views/shared/_exhibit_navbar.html.erb +2 -24
  43. data/app/views/shared/_masthead.html.erb +1 -1
  44. data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
  45. data/app/views/spotlight/catalog/edit.html.erb +1 -1
  46. data/app/views/spotlight/exhibits/_form.html.erb +1 -1
  47. data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +1 -1
  48. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +16 -5
  49. data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
  50. data/config/locales/spotlight.en.yml +4 -0
  51. data/lib/generators/spotlight/templates/catalog_controller.rb +1 -0
  52. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +4 -0
  53. data/lib/spotlight/engine.rb +2 -9
  54. data/lib/spotlight/version.rb +1 -1
  55. data/spec/support/views/test_view_helpers.rb +0 -1
  56. metadata +9 -25
  57. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +0 -39
  58. data/app/javascript/spotlight/admin/appearance.js +0 -22
  59. data/app/views/shared/_breadcrumbs.html.erb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eb6356397553e1c11cf63f0ffea8c801d87985c9ac0cfdb953e349f85f7df86
4
- data.tar.gz: 11c1f79ab20f53abc3616c5bb3281748fcaf6c43eedc4366021e2120ff8689f0
3
+ metadata.gz: 7a324cd5bd7ef8be554451b146fb0c5c33ca1342d025d7ea872849d4c5f998e0
4
+ data.tar.gz: 54ffbf2d1e42fd09efd9eca2a057e99184f3644717486137e0007e02d358cdc2
5
5
  SHA512:
6
- metadata.gz: 607ba81110242c6cc63bcf6215ccea19ca51d886e3ae7d62a5a720a546c222b599a2057ae5542686a3d39eb3e08212883da12cc59924a820e4030b7d990ea9b5
7
- data.tar.gz: 37cf56a48274beae41af42e2f13ecac08644924732eeb492c8e7aa9168559605063348c8bad53e30ba5d7bf7790b02d42702210f0a9391a1c1f59156a8ac6cbf
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();