blacklight 4.9.0 → 5.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.travis.yml +22 -12
  4. data/Gemfile +3 -40
  5. data/LICENSE +1 -2
  6. data/README.md +1 -2
  7. data/Rakefile +0 -4
  8. data/VERSION +1 -1
  9. data/app/assets/images/blacklight/logo.png +0 -0
  10. data/app/assets/javascripts/blacklight/ajax_modal.js +190 -0
  11. data/app/assets/javascripts/blacklight/blacklight.js +7 -17
  12. data/app/assets/javascripts/blacklight/checkbox_submit.js +1 -1
  13. data/app/assets/stylesheets/blacklight/{_blacklight_base.scss → _blacklight_base.css.scss} +0 -21
  14. data/app/assets/stylesheets/blacklight/_bookmark.css.scss +4 -0
  15. data/app/assets/stylesheets/blacklight/_catalog.css.scss +192 -0
  16. data/app/assets/stylesheets/blacklight/_facets.css.scss +141 -0
  17. data/app/assets/stylesheets/blacklight/{_group.scss → _group.css.scss} +1 -1
  18. data/app/assets/stylesheets/blacklight/_header.css.scss +44 -0
  19. data/app/assets/stylesheets/blacklight/_layout.css.scss +5 -0
  20. data/app/assets/stylesheets/blacklight/{_modal.scss → _modal.css.scss} +7 -7
  21. data/app/assets/stylesheets/blacklight/_search_history.css.scss +20 -0
  22. data/app/assets/stylesheets/blacklight/{blacklight.scss → blacklight.css.scss} +0 -0
  23. data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +14 -0
  24. data/app/controllers/bookmarks_controller.rb +0 -4
  25. data/app/controllers/feedback_controller.rb +0 -4
  26. data/app/helpers/blacklight/blacklight_helper_behavior.rb +45 -155
  27. data/app/helpers/blacklight/catalog_helper_behavior.rb +8 -41
  28. data/app/helpers/blacklight/facets_helper_behavior.rb +20 -43
  29. data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +2 -9
  30. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -14
  31. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +6 -6
  32. data/app/views/_flash_msg.html.erb +9 -2
  33. data/app/views/_user_util_links.html.erb +29 -15
  34. data/app/views/bookmarks/_tools.html.erb +4 -7
  35. data/app/views/bookmarks/index.html.erb +3 -2
  36. data/app/views/catalog/_citation.html.erb +1 -1
  37. data/app/views/catalog/_constraints.html.erb +1 -1
  38. data/app/views/catalog/_constraints_element.html.erb +12 -8
  39. data/app/views/catalog/_did_you_mean.html.erb +2 -2
  40. data/app/views/catalog/_document_header.html.erb +3 -3
  41. data/app/views/catalog/_email_form.html.erb +10 -10
  42. data/app/views/catalog/_facet_layout.html.erb +11 -3
  43. data/app/views/catalog/_facet_limit.html.erb +7 -7
  44. data/app/views/catalog/_facet_pagination.html.erb +8 -7
  45. data/app/views/catalog/_facet_pivot.html.erb +3 -1
  46. data/app/views/catalog/_facets.html.erb +12 -9
  47. data/app/views/catalog/_paginate_compact.html.erb +1 -7
  48. data/app/views/catalog/_per_page_widget.html.erb +5 -8
  49. data/app/views/catalog/_previous_next_doc.html.erb +11 -9
  50. data/app/views/catalog/_refworks_form.html.erb +3 -4
  51. data/app/views/catalog/_results_pagination.html.erb +1 -1
  52. data/app/views/catalog/_search_form.html.erb +16 -14
  53. data/app/views/catalog/_show_sidebar.html.erb +7 -9
  54. data/app/views/catalog/_show_tools.html.erb +13 -7
  55. data/app/views/catalog/_sms_form.html.erb +8 -8
  56. data/app/views/catalog/_sort_and_per_page.html.erb +4 -6
  57. data/app/views/catalog/_sort_widget.html.erb +5 -6
  58. data/app/views/catalog/email.html.erb +1 -1
  59. data/app/views/catalog/facet.html.erb +2 -8
  60. data/app/views/catalog/index.html.erb +11 -6
  61. data/app/views/catalog/show.html.erb +5 -5
  62. data/app/views/catalog/sms.html.erb +1 -1
  63. data/app/views/catalog/sms_sent.html.erb +1 -1
  64. data/app/views/feedback/complete.html.erb +2 -2
  65. data/app/views/feedback/show.html.erb +1 -1
  66. data/app/views/kaminari/blacklight/_paginator.html.erb +1 -1
  67. data/app/views/kaminari/blacklight_compact/_paginator.html.erb +25 -5
  68. data/app/views/layouts/blacklight.html.erb +23 -23
  69. data/app/views/saved_searches/index.html.erb +2 -2
  70. data/app/views/search_history/index.html.erb +5 -7
  71. data/app/views/shared/_header_navbar.html.erb +23 -23
  72. data/blacklight.gemspec +10 -13
  73. data/config/locales/blacklight.en.yml +1 -12
  74. data/config/locales/blacklight.fr.yml +1 -12
  75. data/gemfiles/rails3.gemfile +21 -0
  76. data/gemfiles/rails4.gemfile +20 -0
  77. data/lib/blacklight.rb +0 -8
  78. data/lib/blacklight/base.rb +0 -2
  79. data/lib/blacklight/catalog.rb +6 -32
  80. data/lib/blacklight/catalog/search_context.rb +8 -48
  81. data/lib/blacklight/configurable.rb +2 -1
  82. data/lib/blacklight/configuration.rb +1 -2
  83. data/lib/blacklight/configuration/facet_field.rb +0 -2
  84. data/lib/blacklight/engine.rb +3 -3
  85. data/lib/blacklight/legacy_controller_methods.rb +1 -64
  86. data/lib/blacklight/rails/routes.rb +17 -0
  87. data/lib/blacklight/routes.rb +46 -40
  88. data/lib/blacklight/solr.rb +1 -0
  89. data/lib/blacklight/solr/document.rb +21 -42
  90. data/lib/blacklight/solr/facet_paginator.rb +30 -54
  91. data/lib/blacklight/solr/request.rb +45 -0
  92. data/lib/blacklight/solr_helper.rb +16 -53
  93. data/lib/blacklight/solr_response.rb +0 -6
  94. data/lib/blacklight/user.rb +2 -7
  95. data/lib/blacklight/utils.rb +1 -9
  96. data/lib/generators/blacklight/assets_generator.rb +0 -14
  97. data/lib/generators/blacklight/blacklight_generator.rb +17 -14
  98. data/lib/generators/blacklight/templates/blacklight.css.scss +3 -0
  99. data/lib/generators/blacklight/templates/catalog_controller.rb +4 -1
  100. data/lib/railties/blacklight.rake +3 -1
  101. data/solr/sample_solr_documents.yml +641 -0
  102. data/spec/controllers/application_controller_spec.rb +5 -21
  103. data/spec/controllers/bookmarks_controller_spec.rb +11 -11
  104. data/spec/controllers/catalog_controller_spec.rb +122 -119
  105. data/spec/controllers/search_history_controller_spec.rb +8 -8
  106. data/spec/features/alternate_controller_spec.rb +5 -5
  107. data/spec/features/facets_spec.rb +9 -0
  108. data/spec/features/record_view_spec.rb +1 -1
  109. data/spec/features/search_filters_spec.rb +97 -41
  110. data/spec/features/search_results_spec.rb +14 -17
  111. data/spec/features/search_sort_spec.rb +1 -1
  112. data/spec/helpers/blacklight_helper_spec.rb +170 -285
  113. data/spec/helpers/catalog_helper_spec.rb +57 -96
  114. data/spec/helpers/facets_helper_spec.rb +130 -152
  115. data/spec/helpers/hash_as_hidden_fields_spec.rb +9 -15
  116. data/spec/helpers/render_constraints_helper_spec.rb +5 -5
  117. data/spec/helpers/search_history_constraints_helper_spec.rb +21 -21
  118. data/spec/lib/blacklight/routes_spec.rb +25 -0
  119. data/spec/lib/blacklight/solr/request_spec.rb +37 -0
  120. data/spec/lib/blacklight/solr_response/group_response_spec.rb +2 -2
  121. data/spec/lib/blacklight_configurable_spec.rb +16 -16
  122. data/spec/lib/blacklight_configuration_spec.rb +132 -132
  123. data/spec/lib/blacklight_email_spec.rb +4 -4
  124. data/spec/lib/blacklight_sms_spec.rb +4 -4
  125. data/spec/lib/blacklight_solr_document_dublin_core_spec.rb +6 -6
  126. data/spec/lib/blacklight_solr_document_more_like_this_spec.rb +4 -4
  127. data/spec/lib/blacklight_solr_document_spec.rb +36 -36
  128. data/spec/lib/blacklight_solr_response_spec.rb +43 -48
  129. data/spec/lib/blacklight_spec.rb +6 -14
  130. data/spec/lib/blacklight_user_spec.rb +5 -9
  131. data/spec/lib/facet_paginator_spec.rb +59 -51
  132. data/spec/lib/search_fields_spec.rb +13 -13
  133. data/spec/lib/solr_helper_spec.rb +258 -304
  134. data/spec/lib/tasks/blacklight_task_spec.rb +1 -1
  135. data/spec/lib/utils_spec.rb +16 -46
  136. data/spec/models/bookmark_spec.rb +6 -7
  137. data/spec/models/record_mailer_spec.rb +16 -16
  138. data/spec/models/search_spec.rb +8 -8
  139. data/spec/models/solr_document_spec.rb +6 -77
  140. data/spec/routing/catalog_routing_spec.rb +16 -10
  141. data/spec/spec_helper.rb +7 -7
  142. data/spec/support/assert_difference.rb +2 -2
  143. data/spec/support/features.rb +0 -11
  144. data/spec/support/features/session_helpers.rb +3 -3
  145. data/spec/support/include_text.rb +2 -2
  146. data/spec/test_app_templates/Gemfile.extra +10 -2
  147. data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -18
  148. data/spec/views/catalog/_constraints_element.html.erb_spec.rb +13 -13
  149. data/spec/views/catalog/_document.html.erb_spec.rb +1 -1
  150. data/spec/views/catalog/_document_list.html.erb_spec.rb +1 -1
  151. data/spec/views/catalog/_facets.html.erb_spec.rb +13 -14
  152. data/spec/views/catalog/_index_default.erb_spec.rb +21 -21
  153. data/spec/views/catalog/_search_header.erb_spec.rb +1 -1
  154. data/spec/views/catalog/_show_default.erb_spec.rb +21 -21
  155. data/spec/views/catalog/_show_sidebar.erb_spec.rb +7 -7
  156. data/spec/views/catalog/_thumbnail_default.erb_spec.rb +3 -3
  157. data/spec/views/catalog/index.atom.builder_spec.rb +29 -29
  158. data/spec/views/catalog/index.html.erb_spec.rb +6 -7
  159. data/tasks/blacklight.rake +8 -2
  160. metadata +84 -180
  161. data/app/assets/javascripts/blacklight/css_dropdowns.js +0 -10
  162. data/app/assets/javascripts/blacklight/facet_expand_contract.js +0 -41
  163. data/app/assets/javascripts/blacklight/lightbox_dialog.js +0 -70
  164. data/app/assets/javascripts/blacklight/select_submit.js +0 -27
  165. data/app/assets/javascripts/blacklight/zebra_stripe.js +0 -13
  166. data/app/assets/javascripts/improved-modal/bootstrap-modal.js +0 -355
  167. data/app/assets/javascripts/improved-modal/bootstrap-modalmanager.js +0 -370
  168. data/app/assets/stylesheets/blacklight/_bookmark.scss +0 -33
  169. data/app/assets/stylesheets/blacklight/_catalog.scss +0 -255
  170. data/app/assets/stylesheets/blacklight/_dropdown.scss +0 -57
  171. data/app/assets/stylesheets/blacklight/_facets.scss +0 -197
  172. data/app/assets/stylesheets/blacklight/_footer.scss +0 -0
  173. data/app/assets/stylesheets/blacklight/_header.scss +0 -53
  174. data/app/assets/stylesheets/blacklight/_layout.scss +0 -10
  175. data/app/assets/stylesheets/blacklight/_mixins.scss +0 -0
  176. data/app/assets/stylesheets/blacklight/_print.scss +0 -0
  177. data/app/assets/stylesheets/blacklight/_responsive.scss +0 -3
  178. data/app/assets/stylesheets/blacklight/_search_history.scss +0 -42
  179. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -49
  180. data/app/assets/stylesheets/blacklight/responsive_partials/_catalog.scss +0 -5
  181. data/app/assets/stylesheets/blacklight/responsive_partials/_facets.scss +0 -37
  182. data/app/assets/stylesheets/blacklight/responsive_partials/_header.scss +0 -30
  183. data/app/assets/stylesheets/improved-modal/bootstrap-modal.css +0 -217
  184. data/app/helpers/blacklight/html_head_helper_behavior.rb +0 -118
  185. data/app/helpers/html_head_helper.rb +0 -3
  186. data/app/views/catalog/_bookmark_form.html.erb +0 -7
  187. data/app/views/catalog/_marc_view.html.erb +0 -32
  188. data/app/views/catalog/librarian_view.html.erb +0 -10
  189. data/config/routes.rb +0 -17
  190. data/doc/Atom-Responses.md +0 -90
  191. data/doc/Blacklight-3.0-Release-Notes-And-Upgrade-Guide.md +0 -107
  192. data/doc/Blacklight-3.2-Release-Notes-and-Upgrade-Guide.md +0 -191
  193. data/doc/Blacklight-3.3-release-notes-and-upgrade-guide.md +0 -37
  194. data/doc/Blacklight-3.4-release-notes-and-upgrade-guide.md +0 -27
  195. data/doc/Blacklight-3.5-release-notes-and-upgrade-guide.md +0 -44
  196. data/doc/Blacklight-3.6-release-notes-and-upgrade-guide.md +0 -25
  197. data/doc/Blacklight-3.7-release-notes-and-upgrade-guide.md +0 -80
  198. data/doc/Blacklight-3.8-release-notes-and-upgrade-guide.md +0 -11
  199. data/doc/Blacklight-4.0-release-notes-and-upgrade-guide.md +0 -135
  200. data/doc/Blacklight-4.1-release-notes-and-upgrade-guide.md +0 -17
  201. data/doc/Blacklight-4.2-release-notes-and-upgrade-guide.md +0 -25
  202. data/doc/Blacklight-4.3-release-notes-and-upgrade-guide.md +0 -21
  203. data/doc/Blacklight-4.4-release-notes-and-upgrade-guide.md +0 -41
  204. data/doc/Blacklight-Add-ons.md +0 -28
  205. data/doc/Blacklight-configuration.md +0 -411
  206. data/doc/Blacklight-on-Heroku.md +0 -135
  207. data/doc/Code4Lib-2014.md +0 -48
  208. data/doc/Community-principles.md +0 -44
  209. data/doc/Configuring-and-Customizing-Blacklight.md +0 -271
  210. data/doc/Configuring-rails-routes.md +0 -13
  211. data/doc/Contributing-to-Blacklight.md +0 -25
  212. data/doc/Examples.md +0 -94
  213. data/doc/Extending-or-Modifying-Blacklight-Search-Behavior.md +0 -141
  214. data/doc/FAQs.md +0 -1
  215. data/doc/Home.md +0 -80
  216. data/doc/How-to-release-a-version.md +0 -29
  217. data/doc/Indexing-your-data-into-solr.md +0 -32
  218. data/doc/Integration-with-Rails-Footnotes.md +0 -20
  219. data/doc/Internationalization.md +0 -32
  220. data/doc/JSON-API.md +0 -17
  221. data/doc/Pagination.md +0 -51
  222. data/doc/Providing-your-own-view-templates.md +0 -109
  223. data/doc/Quickstart.md +0 -115
  224. data/doc/README_SOLR.md +0 -245
  225. data/doc/Release-Notes-And-Upgrade-Guides.md +0 -20
  226. data/doc/Roadmap.md +0 -43
  227. data/doc/Sunspot-for-indexing.md +0 -46
  228. data/doc/Theming.md +0 -64
  229. data/doc/User-Authentication.md +0 -60
  230. data/doc/testing.md +0 -57
  231. data/lib/SolrMarc.jar +0 -0
  232. data/lib/blacklight/mash.rb +0 -19
  233. data/lib/blacklight/solr/document/marc.rb +0 -71
  234. data/lib/blacklight/solr/document/marc_export.rb +0 -590
  235. data/lib/generators/blacklight/marc_generator.rb +0 -66
  236. data/lib/generators/blacklight/templates/blacklight.scss +0 -4
  237. data/lib/generators/blacklight/templates/config/SolrMarc/config-test.properties +0 -37
  238. data/lib/generators/blacklight/templates/config/SolrMarc/config.properties +0 -37
  239. data/lib/generators/blacklight/templates/config/SolrMarc/index.properties +0 -97
  240. data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/dewey.bsh +0 -47
  241. data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/format.bsh +0 -126
  242. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/README_MAPS +0 -1
  243. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
  244. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
  245. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/country_map.properties +0 -379
  246. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/format_map.properties +0 -50
  247. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
  248. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/language_map.properties +0 -490
  249. data/lib/railties/solr_marc.rake +0 -162
  250. data/spec/data/test_data.utf8.mrc +0 -1
  251. data/spec/features/librarian_view_spec.rb +0 -13
  252. data/spec/helpers/html_head_helper_spec.rb +0 -164
  253. data/spec/lib/blacklight_solr_document_marc_spec.rb +0 -89
  254. data/spec/lib/marc_export_spec.rb +0 -746
  255. data/spec/lib/tasks/solr_marc_task_spec.rb +0 -60
  256. data/spec/requests/alternate_controller_spec.rb +0 -16
  257. data/spec/routing/routes_spec.rb +0 -20
  258. data/spec/views/catalog/_constraints.html.erb_spec.rb +0 -33
  259. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +0 -49
  260. data/test_support/data/test_data.utf8.mrc +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ea490616aa86b3b39a0189cbc5a5367c443085d
4
- data.tar.gz: 9997faba251e860106a7d5cd144298f6126d7653
3
+ metadata.gz: 5631f0f750bdf8d5e7976d0b0a771537d1aa06d6
4
+ data.tar.gz: bbacc4edb12e35515e736b2c9affcae1f77be44a
5
5
  SHA512:
6
- metadata.gz: cbf5727a785c3e85e3fc29b9dae71f8ee244ccda246cca9d1ae25999fafc2de3ff94fc1e396cff6ce4181a46c53e5cc3940fa94c29b4b02521cae98da897e9b5
7
- data.tar.gz: 83c06a38785804fb67995acbd2771a2bde1cfac55201b28f25d0ee86ca386b6e5ef1cc432c235c619e270a88d5ef73ac16c458b11b8296468e571f502065879f
6
+ metadata.gz: be0707d62ef0c9a16c9a16d5de6bc621f4e1ea4bfb1528a7a8731c71ccf94f76ec7728d4d7b67b38ee5c91ddf4d082019922dce72f72db4286d440f5ad6a2307
7
+ data.tar.gz: 9b3b49fa307537ba8e5efee64a683292641a6d9477795e54b038a7d493bb74e205d239f3bfd1f5bbef3a27861737ece82d102c582857577d91c77f2d8024714b
data/.gitignore CHANGED
@@ -20,4 +20,3 @@ spec/internal
20
20
  pkg/*
21
21
  *.sw[pon]
22
22
  gemfiles/*.gemfile.lock
23
- /.internal_test_app
@@ -1,19 +1,29 @@
1
- sudo: false
2
- language: ruby
1
+ notifications:
2
+ email: false
3
+
3
4
  rvm:
4
- - 2.3.7
5
+ - 2.1.0
6
+ - 2.0.0
7
+ - 1.9.3
8
+ - jruby-19mode
9
+
10
+ before_install:
11
+ - gem install bundler
5
12
 
6
13
  matrix:
7
- include:
8
- - rvm: 2.3.7
9
- env: "RAILS_VERSION=4.0.13"
10
- - rvm: 2.3.7
11
- env: "RAILS_VERSION=4.1.16"
12
- - rvm: 2.3.7
13
- env: "RAILS_VERSION=4.2.10"
14
+ allow_failures:
15
+ - rvm: 2.1.0
16
+
17
+ gemfile:
18
+ - gemfiles/rails3.gemfile
19
+ - gemfiles/rails4.gemfile
14
20
 
15
21
  notifications:
16
22
  irc: "irc.freenode.org#blacklight"
17
- email: false
23
+ email:
24
+ - blacklight-commits@googlegroups.com
18
25
 
19
- env: JRUBY_OPTS="-J-Xms512m -J-Xmx1024m"
26
+ env:
27
+ global:
28
+ - JRUBY_OPTS="-J-Xms512m -J-Xmx1024m"
29
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -3,52 +3,15 @@ source 'https://rubygems.org'
3
3
  # Please see blacklight.gemspec for dependency information.
4
4
  gemspec
5
5
 
6
- gem 'simplecov', :platform => :mri
7
- gem 'simplecov-rcov', :platform => :mri
8
- gem 'json', '~> 1.8'
9
-
10
6
  group :test do
11
7
  gem 'devise'
12
8
  gem 'devise-guests'
13
- gem 'bootstrap-sass'
9
+ gem "bootstrap-sass"
14
10
  gem 'turbolinks'
15
- gem 'poltergeist'
16
- end
17
-
18
- # BEGIN ENGINE_CART BLOCK
19
- # engine_cart: 1.0.1
20
- # engine_cart stanza: 0.10.0
21
- # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
22
- file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
23
- if File.exist?(file)
24
- begin
25
- eval_gemfile file
26
- rescue Bundler::GemfileError => e
27
- Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
28
- Bundler.ui.warn e.message
29
- end
30
- else
31
- Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
32
- if ENV['RAILS_VERSION']
33
- if ENV['RAILS_VERSION'] == 'edge'
34
- gem 'rails', github: 'rails/rails'
35
- ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
36
- else
37
- gem 'rails', ENV['RAILS_VERSION']
38
- end
39
- end
40
- case ENV['RAILS_VERSION']
41
- when /^4.2/
42
- gem 'responders', '~> 2.0'
43
- gem 'sass-rails', '>= 5.0'
44
- gem 'coffee-rails', '~> 4.1.0'
45
- when /^4.[01]/
46
- gem 'sass-rails', '< 5.0'
47
- end
11
+ gem 'sass-rails'
12
+ gem 'blacklight_marc', :github => 'projectblacklight/blacklight_marc'
48
13
  end
49
- # END ENGINE_CART BLOCK
50
14
 
51
15
  if File.exists?('spec/test_app_templates/Gemfile.extra')
52
16
  eval File.read('spec/test_app_templates/Gemfile.extra'), nil, 'spec/test_app_templates/Gemfile.extra'
53
17
  end
54
- gem 'transpec'
data/LICENSE CHANGED
@@ -1,6 +1,5 @@
1
1
  ##########################################################################
2
- # Copyright 2008-2014 Rector and Visitors of the University of Virginia, The Board of Trustees of the Leland Stanford Junior University, Johns Hopkins Universities, and Data Curation Experts
3
- # Additional copyright may be held by others, as reflected in the commit log
2
+ # Copyright 2008 Rector and Visitors of the University of Virginia
4
3
  #
5
4
  # Licensed under the Apache License, Version 2.0 (the "License");
6
5
  # you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -22,10 +22,9 @@ the University of Virginia Library and is made public under an Apache 2.0 licens
22
22
 
23
23
  * ruby v1.9.3 or higher
24
24
  * git
25
- * java 1.5 or higher
26
25
  * access to a command prompt on the machine to install
27
26
 
28
- In addition, you must have the Bundler and Rails 3.0 gems installed. Other gem dependencies are defined in the blacklight.gemspec file and will be automatically loaded by Bundler.
27
+ In addition, you must have the Bundler and Rails 4.0 gems installed. Other gem dependencies are defined in the blacklight.gemspec file and will be automatically loaded by Bundler.
29
28
 
30
29
  ## Configuring Apache Solr
31
30
  You'll also want some information about how Blacklight expects [Apache Solr](http://lucene.apache.org/solr ) to run, which you can find in [README_SOLR](https://github.com/projectblacklight/blacklight/wiki/README_SOLR)
data/Rakefile CHANGED
@@ -7,12 +7,8 @@ rescue LoadError
7
7
  end
8
8
 
9
9
  Bundler::GemHelper.install_tasks
10
- require 'rspec/core/rake_task'
11
- RSpec::Core::RakeTask.new(:spec)
12
10
 
13
- # load rake tasks defined in lib/tasks that are not loaded in lib/active_fedora.rb
14
11
  load "tasks/blacklight.rake"
15
12
 
16
13
  task :default => [:ci]
17
14
  task :clean => ['blacklight:clean']
18
-
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.9.0
1
+ 5.0.0.pre1
@@ -0,0 +1,190 @@
1
+ //= require blacklight/core
2
+
3
+ /*
4
+ The ajax_modal plugin can display some interactions inside a Bootstrap
5
+ modal window, including some multi-page interactions.
6
+
7
+ It supports unobtrusive Javascript, where a link or form that would have caused
8
+ a new page load is changed to display it's results inside a modal dialog,
9
+ by this plugin. The plugin assumes there is a Bootstrap modal div
10
+ on the page with id #ajax-modal to use as the modal -- the standard Blacklight
11
+ layout provides this.
12
+
13
+ To make a link or form have their results display inside a modal, add
14
+ `data-ajax-modal="trigger"` to the link or form. (Note, form itself not submit input)
15
+ With Rails link_to helper, you'd do that like:
16
+
17
+ link_to something, link, :data => {:ajax_modal => "trigger"}
18
+
19
+ The results of the link href or form submit will be displayed inside
20
+ a modal -- they should include the proper HTML markup for a bootstrap modal's
21
+ contents. Also, you ordinarily won't want the Rails template with wrapping
22
+ navigational elements to be used. The Rails controller could suppress
23
+ the layout when a JS AJAX request is detected, OR the response
24
+ can include a `<div data-ajax-modal="container">` -- only the contents
25
+ of the container will be placed inside the modal, the rest of the
26
+ page will be ignored.
27
+
28
+ If you'd like to have a link or button that closes the modal,
29
+ you can just add a `data-dismiss="modal"` to the link,
30
+ standard Bootstrap convention. But you can also have
31
+ an href on this link for non-JS contexts, we'll make sure
32
+ inside the modal it closes the modal and the link is NOT followed.
33
+
34
+ Link or forms inside the modal will ordinarily cause page loads
35
+ when they are triggered. However, if you'd like their results
36
+ to stay within the modal, just add `data-ajax-modal="preserve"`
37
+ to the link or form.
38
+
39
+ Here's an example of what might be returned, demonstrating most of the devices available:
40
+
41
+ <div data-ajax-modal="container">
42
+ <div class="modal-header">
43
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
44
+ <h3 class="modal-title">Request Placed</h3>
45
+ </div>
46
+
47
+ <div class="modal-body">
48
+ <p>Some message</p>
49
+ <%= link_to "This result will still be within modal", some_link, :data => {:ajax_modal => "preserve"} %>
50
+ </div>
51
+
52
+
53
+ <div class="modal-footer">
54
+ <%= link_to "Close the modal", request_done_path, :class => "submit button dialog-close", :data => {:dismiss => "modal"} %>
55
+ </div>
56
+ </div>
57
+
58
+
59
+ One additional feature. If the content returned from the AJAX modal load
60
+ has an element with `data-ajax-modal=close`, that will trigger the modal
61
+ to be closed. And if this element includes a node with class "flash_messages",
62
+ the flash-messages node will be added to the main page inside #main-flahses.
63
+
64
+ == Events
65
+
66
+ We'll send out an event 'loaded.blacklight.ajax-modal' with the #ajax-modal
67
+ dialog as the target, right after content is loaded into the modal but before
68
+ it is shown (if not already a shown modal). In an event handler, you can
69
+ inspect loaded content by looking inside $(this). If you call event.preventDefault(),
70
+ we won't 'show' the dialog (although it may already have been shown, you may want to
71
+ $(this).modal("hide") if you want to ensure hidden/closed.
72
+
73
+ The data-ajax-modal=close behavior is implemented with this event, see for example.
74
+ */
75
+
76
+ // We keep all our data in Blacklight.ajaxModal object.
77
+ // Create lazily if someone else created first.
78
+ if (Blacklight.ajaxModal === undefined) {
79
+ Blacklight.ajaxModal = {};
80
+ }
81
+
82
+
83
+ // a Bootstrap modal div that should be already on the page hidden
84
+ Blacklight.ajaxModal.modalSelector = "#ajax-modal";
85
+
86
+ Blacklight.ajaxModal.triggerLinkSelector = "a[data-ajax-modal~=trigger], a.lightboxLink,a.more_facets_link,.ajax_modal_launch";
87
+ Blacklight.ajaxModal.triggerFormSelector = "form[data-ajax-modal~=trigger], form.ajax_form";
88
+
89
+ // preserve selectors will be scopied inside the modal only
90
+ Blacklight.ajaxModal.preserveLinkSelector = 'a[data-ajax-modal~=preserve]';
91
+ Blacklight.ajaxModal.preserveFormSelector = 'form[data-ajax-modal~=preserve], form.ajax_form';
92
+
93
+ Blacklight.ajaxModal.containerSelector = "[data-ajax-modal~=container]";
94
+
95
+ Blacklight.ajaxModal.modalCloseSelector = "[data-ajax-modal~=close], span.ajax-close-modal";
96
+
97
+ Blacklight.ajaxModal.receiveAjax = function (data) {
98
+ var contents = data.responseText;
99
+
100
+ // does it have a data- selector for container?
101
+ // important we don't execute script tags, we shouldn't.
102
+ // code modelled off of JQuery ajax.load. https://github.com/jquery/jquery/blob/master/src/ajax/load.js?source=c#L62
103
+ var container = $("<div>").
104
+ append( jQuery.parseHTML(contents) ).find( Blacklight.ajaxModal.containerSelector ).first();
105
+ if (container.size() !== 0) {
106
+ contents = container.html();
107
+ }
108
+
109
+ $(Blacklight.ajaxModal.modalSelector).find('.modal-content').html(contents);
110
+
111
+ // send custom event with the modal dialog div as the target
112
+ var e = $.Event('loaded.blacklight.ajax-modal')
113
+ $(Blacklight.ajaxModal.modalSelector).trigger(e);
114
+ // if they did preventDefault, don't show the dialog
115
+ if (e.isDefaultPrevented()) return;
116
+
117
+ $(Blacklight.ajaxModal.modalSelector).modal('show');
118
+ };
119
+
120
+
121
+ Blacklight.ajaxModal.modalAjaxLinkClick = function(e) {
122
+ e.preventDefault();
123
+
124
+ var jqxhr = $.ajax({
125
+ url: $(this).attr('href'),
126
+ dataType: 'script'
127
+ });
128
+
129
+ jqxhr.always( Blacklight.ajaxModal.receiveAjax );
130
+ };
131
+
132
+ Blacklight.ajaxModal.modalAjaxFormSubmit = function(e) {
133
+ e.preventDefault();
134
+
135
+ var jqxhr = $.ajax({
136
+ url: $(this).attr('action'),
137
+ data: $(this).serialize(),
138
+ type: $(this).attr('method'), //POST',
139
+ dataType: 'script'
140
+ });
141
+
142
+ jqxhr.always(Blacklight.ajaxModal.receiveAjax);
143
+ }
144
+
145
+
146
+
147
+ Blacklight.ajaxModal.setup_modal = function() {
148
+ // Event indicating blacklight is setting up a modal link,
149
+ // you can catch it and call e.preventDefault() to abort
150
+ // setup.
151
+ var e = $.Event('setup.blacklight.ajax-modal');
152
+ $("body").trigger(e);
153
+ if (e.isDefaultPrevented()) return;
154
+
155
+ $("body").on("click", Blacklight.ajaxModal.triggerLinkSelector, Blacklight.ajaxModal.modalAjaxLinkClick);
156
+ $("body").on("submit", Blacklight.ajaxModal.triggerFormSelector, Blacklight.ajaxModal.modalAjaxFormSubmit);
157
+
158
+ // preserve selectors apply just within the existing modal
159
+ $("body").on("click", Blacklight.ajaxModal.modalSelector + " " + Blacklight.ajaxModal.preserveLinkSelector, Blacklight.ajaxModal.modalAjaxLinkClick);
160
+ $("body").on("submit", Blacklight.ajaxModal.modalSelector + " " + Blacklight.ajaxModal.preserveFormSelector, Blacklight.ajaxModal.modalAjaxFormSubmit);
161
+
162
+ // Catch our own custom loaded event to implement data-ajax-modal=closed
163
+ $("body").on("loaded.blacklight.ajax-modal", Blacklight.ajaxModal.check_close_ajax_modal);
164
+
165
+ // we support doing data-dismiss=modal on a <a> with a href for non-ajax
166
+ // use, we need to suppress following the a's href that's there for
167
+ // non-JS contexts.
168
+ $("body ").on("click", Blacklight.ajaxModal.modalSelector + " a[data-dismiss~=modal]", function (e) {
169
+ e.preventDefault();
170
+ });
171
+ };
172
+
173
+ // A function used as an event handler on loaded.blacklight.ajax-modal
174
+ // to catch contained data-ajax-modal=closed directions
175
+ Blacklight.ajaxModal.check_close_ajax_modal = function(event) {
176
+ if ($(event.target).find(Blacklight.ajaxModal.modalCloseSelector).length) {
177
+ modal_flashes = $(this).find('.flash_messages');
178
+
179
+ $(event.target).modal("hide");
180
+ event.preventDefault();
181
+
182
+ main_flashes = $('#main-flashes');
183
+ main_flashes.append(modal_flashes);
184
+ modal_flashes.fadeIn(500);
185
+ }
186
+ }
187
+
188
+ Blacklight.onLoad(function() {
189
+ Blacklight.ajaxModal.setup_modal();
190
+ });
@@ -7,19 +7,15 @@
7
7
  //= require blacklight/core
8
8
  //= require blacklight/autofocus
9
9
  //= require blacklight/bookmark_toggle
10
- //= require blacklight/facet_expand_contract
11
- //= require blacklight/lightbox_dialog
10
+ //= require blacklight/ajax_modal
12
11
  //= require blacklight/search_context
13
- //= require blacklight/select_submit
14
- //= require blacklight/zebra_stripe
15
- //= require blacklight/css_dropdowns
16
12
  //
17
13
  //Bootstrap JS for providing collapsable tablet/mobile menu/alert boxes
18
- //= require bootstrap-transition
19
- //= require bootstrap-collapse
20
- //= require bootstrap-alert
21
- //= require improved-modal/bootstrap-modalmanager.js
22
- //= require improved-modal/bootstrap-modal.js
14
+ //= require bootstrap/transition
15
+ //= require bootstrap/collapse
16
+ //= require bootstrap/dropdown
17
+ //= require bootstrap/alert
18
+ //= require bootstrap/modal
23
19
 
24
20
  /* Blacklight has a Javascript setup meant to support local disabling,
25
21
  modification, and use of Blacklight behaviors.
@@ -39,13 +35,7 @@
39
35
  comes along.
40
36
 
41
37
  Examples, in your application's own JS:
42
-
43
- Change what items zebra_striping gets applied to:
44
-
45
- Blacklight.do_zebra_stripe.selector = ".my_class .even";
46
- //Or even add on to existing:
47
- Blacklight.do_zebra_stripe.selector = Blacklight.do_zebra_stripe.selector + " .my_class .even";
48
-
38
+
49
39
  Turn off adding of behavior to facet 'more' links, using a no-op function:
50
40
 
51
41
  Blacklight.do_more_facets_behavior = function() {};
@@ -40,7 +40,7 @@
40
40
  //for both bookmarks/$doc_id. But let's take out the irrelevant parts
41
41
  //of the form to avoid any future confusion.
42
42
  form.find("input[type=submit]").remove();
43
- form.addClass('form-inline');
43
+ form.addClass('form-horizontal');
44
44
 
45
45
  //View needs to set data-doc-id so we know a unique value
46
46
  //for making DOM id
@@ -6,34 +6,13 @@
6
6
  which over-rides things in this file. Or of course you can choose
7
7
  not to use the Blacklight CSS file at all in your local app. */
8
8
 
9
-
10
-
11
- $btnInfoBackground: #9ad0fe;
12
-
13
9
  @import 'blacklight/blacklight_defaults';
14
10
 
15
- /* Import this to maintain the old YUI font styles */
16
11
  @import "blacklight/layout";
17
12
  @import "blacklight/header";
18
- @import "blacklight/footer";
19
13
  @import "blacklight/catalog";
20
14
  @import "blacklight/group";
21
15
  @import "blacklight/bookmark";
22
16
  @import "blacklight/facets";
23
17
  @import "blacklight/search_history";
24
- @import "blacklight/print";
25
- @import "blacklight/responsive";
26
-
27
- @import "blacklight/dropdown";
28
18
  @import "blacklight/modal";
29
-
30
- @import "improved-modal/bootstrap-modal";
31
-
32
- .hide-text {
33
- width: 1px;
34
- position: absolute;
35
- display: inline-block;
36
- text-indent: 100%;
37
- white-space: nowrap;
38
- overflow: hidden;
39
- }
@@ -0,0 +1,4 @@
1
+ /* refworks uses a form; we need to give it some additional padding to make it look like a link */
2
+ #refworks-form .btn {
3
+ padding: $nav-link-padding;
4
+ }
@@ -0,0 +1,192 @@
1
+ .ajax_form
2
+ {
3
+ margin-bottom: 0;
4
+ }
5
+
6
+ #librarian_view
7
+ {
8
+ left:-17%;
9
+ text-align:left;
10
+ top:10%;
11
+ width:700px;
12
+ }
13
+
14
+ #marc_view
15
+ {
16
+ text-align:left;
17
+
18
+ .field
19
+ {
20
+ border-bottom: $marc_item_separator;
21
+ clear:both;
22
+ }
23
+
24
+ .ind1, .ind2
25
+ {
26
+ display:inline;
27
+ padding:0 5px;
28
+ }
29
+
30
+ .subfields
31
+ {
32
+ padding-left:5em;
33
+ }
34
+
35
+ .tag_ind
36
+ {
37
+ float:left;
38
+ }
39
+ }
40
+
41
+ .catalog_startOverLink {
42
+ @extend .pull-right;
43
+ }
44
+
45
+ .constraints-container {
46
+ @extend .well;
47
+ line-height: 2.5;
48
+ padding: 16px 19px;
49
+ }
50
+
51
+ span.constraints-label {
52
+ @extend .h5;
53
+ }
54
+
55
+ .appliedFilter
56
+ {
57
+ .constraint-value {
58
+ cursor: default;
59
+
60
+ &:hover, &:active {
61
+ background-color: $btn-default-bg;
62
+ border-color: $btn-default-border;
63
+ }
64
+ }
65
+
66
+ .filterName:after
67
+ {
68
+ @extend .text-muted;
69
+ content: "\276F";
70
+ padding-left: $caret-width-base;
71
+ }
72
+
73
+ .remove:hover, .remove:active {
74
+ @extend .btn-danger;
75
+
76
+ }
77
+ }
78
+
79
+ #documents {
80
+ .document {
81
+ margin-top: $padding-base-vertical;
82
+ padding-top: $padding-base-vertical;
83
+ border-bottom:1px dotted $table-border-color;
84
+ }
85
+
86
+ .documentFunctions {
87
+ @extend .pull-right;
88
+
89
+ .bookmark_toggle
90
+ {
91
+ display:inline;
92
+ }
93
+ }
94
+ }
95
+
96
+ // Tools link on documetn show page
97
+ .show-tools {
98
+ .bookmark_toggle {
99
+ padding: $nav-link-padding;
100
+ }
101
+ }
102
+
103
+
104
+ #sidebar form {
105
+ margin: 0;
106
+ }
107
+
108
+ .page_links
109
+ {
110
+ display: inline-block;
111
+ border: 1px solid transparent;
112
+ padding: $padding-base-vertical $padding-base-horizontal;
113
+ padding-left: 0;
114
+ }
115
+
116
+ .pagination {
117
+ text-align: center ;
118
+ }
119
+
120
+
121
+ .solrQuery
122
+ {
123
+ background-color: $search_ui_bg_color;
124
+ border:1px dotted $search_ui_border_color;
125
+ font-size:90%;
126
+ margin:2em;
127
+ padding:.5em;
128
+ }
129
+
130
+ .dl-horizontal
131
+ {
132
+ dd {
133
+ margin-bottom: $padding-base-vertical;
134
+ }
135
+ }
136
+
137
+ .dl-invert {
138
+ dt {
139
+ font-weight: normal;
140
+ color: $field_name_color;
141
+ }
142
+ }
143
+
144
+ label.toggle_bookmark
145
+ {
146
+ font-weight: inherit;
147
+ min-width: 8.5em;
148
+ }
149
+
150
+ #sidebar-mlt li {
151
+ padding-bottom: $padding-base-vertical;
152
+ }
153
+
154
+ #sortAndPerPage, #previousNextDocument {
155
+ border-bottom: 1px solid $pagination-border;
156
+ margin-bottom: 1em;
157
+ padding-bottom: 1em;
158
+ }
159
+
160
+ #previousNextDocument {
161
+ @extend .clearfix;
162
+ padding-top: 1px;
163
+ padding-bottom: $padding-base-vertical;
164
+ }
165
+
166
+ #sortAndPerPage .dropdown-toggle {
167
+ cursor: pointer;
168
+ }
169
+
170
+ .no-js #sortAndPerPage {
171
+ & {
172
+ @extend .clearfix;
173
+ }
174
+ .dropdown-menu {
175
+ background: none;
176
+ box-shadow: none;
177
+ border: none;
178
+ position: relative;
179
+ display: block;
180
+ float: none;
181
+ }
182
+
183
+ }
184
+
185
+ .index_title {
186
+ float: left;
187
+ }
188
+
189
+ .document-thumbnail {
190
+ float: right;
191
+ padding-left: 20px;
192
+ }