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
@@ -1,30 +0,0 @@
1
- @media (max-width: 979px) {
2
- body {
3
- padding-top: 0;
4
- }
5
-
6
- }
7
- @media (max-width: 979px) {
8
- .submit-search-text {
9
- display: none;
10
- }
11
-
12
-
13
- .navbar .brand {
14
- width: 120px;
15
- }
16
-
17
- #search_field {
18
- width: 50px;
19
- }
20
- }
21
-
22
- @media (max-width: 480px) {
23
- #search_field {
24
- display: none;
25
- }
26
-
27
- .navbar .brand {
28
- width: 35px;
29
- }
30
- }
@@ -1,217 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /*!
4
- * Bootstrap Modal
5
- *
6
- * Copyright Jordan Schroter
7
- * Licensed under the Apache License v2.0
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- */
11
-
12
- .modal-open {
13
- position: relative; /* safari */
14
- overflow: hidden;
15
- }
16
-
17
-
18
- /* add a scroll bar to stop page from jerking around */
19
- .modal-open.page-overflow .page-container,
20
- .modal-open.page-overflow .page-container .navbar-fixed-top,
21
- .modal-open.page-overflow .page-container .navbar-fixed-bottom,
22
- .modal-open.page-overflow .modal-scrollable {
23
- overflow-y: scroll;
24
- }
25
-
26
- @media (max-width: 979px) {
27
- .modal-open.page-overflow .page-container .navbar-fixed-top,
28
- .modal-open.page-overflow .page-container .navbar-fixed-bottom {
29
- overflow-y: visible;
30
- }
31
- }
32
-
33
-
34
- .modal-scrollable {
35
- position: fixed;
36
- top: 0;
37
- bottom: 0;
38
- left: 0;
39
- right: 0;
40
- overflow: auto;
41
- }
42
-
43
- .modal {
44
- outline: none;
45
- position: absolute;
46
- margin-top: 0;
47
- top: 50%;
48
- overflow: visible; /* allow content to popup out (i.e tooltips) */
49
- }
50
-
51
- .modal.fade {
52
- top: -100%;
53
- -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
54
- -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
55
- -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
56
- transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
57
- }
58
-
59
- .modal.fade.in {
60
- top: 50%;
61
- }
62
-
63
- .modal-body {
64
- max-height: none;
65
- overflow: visible;
66
- }
67
-
68
- .modal.modal-absolute {
69
- position: absolute;
70
- z-index: 950;
71
- }
72
-
73
- .modal .loading-mask {
74
- position: absolute;
75
- top: 0;
76
- bottom: 0;
77
- left: 0;
78
- right: 0;
79
- background: #fff;
80
- border-radius: 6px;
81
- }
82
-
83
- .modal-backdrop.modal-absolute{
84
- position: absolute;
85
- z-index: 940;
86
- }
87
-
88
- .modal-backdrop,
89
- .modal-backdrop.fade.in{
90
- opacity: 0.7;
91
- filter: alpha(opacity=70);
92
- background: #fff;
93
- }
94
-
95
- .modal.container {
96
- width: 940px;
97
- margin-left: -470px;
98
- }
99
-
100
- /* Modal Overflow */
101
-
102
- .modal-overflow.modal {
103
- top: 1%;
104
- }
105
-
106
- .modal-overflow.modal.fade {
107
- top: -100%;
108
- }
109
-
110
- .modal-overflow.modal.fade.in {
111
- top: 1%;
112
- }
113
-
114
- .modal-overflow .modal-body {
115
- overflow: auto;
116
- -webkit-overflow-scrolling: touch;
117
- }
118
-
119
- /* Responsive */
120
-
121
- @media (min-width: 1200px) {
122
- .modal.container {
123
- width: 1170px;
124
- margin-left: -585px;
125
- }
126
- }
127
-
128
- @media (max-width: 979px) {
129
- .modal,
130
- .modal.container,
131
- .modal.modal-overflow {
132
- top: 1%;
133
- right: 1%;
134
- left: 1%;
135
- bottom: auto;
136
- width: auto !important;
137
- height: auto !important;
138
- margin: 0 !important;
139
- padding: 0 !important;
140
- }
141
-
142
- .modal.fade.in,
143
- .modal.container.fade.in,
144
- .modal.modal-overflow.fade.in {
145
- top: 1%;
146
- bottom: auto;
147
- }
148
-
149
- .modal-body,
150
- .modal-overflow .modal-body {
151
- position: static;
152
- margin: 0;
153
- height: auto !important;
154
- max-height: none !important;
155
- overflow: visible !important;
156
- }
157
-
158
- .modal-footer,
159
- .modal-overflow .modal-footer {
160
- position: static;
161
- }
162
- }
163
-
164
- .loading-spinner {
165
- position: absolute;
166
- top: 50%;
167
- left: 50%;
168
- margin: -12px 0 0 -12px;
169
- }
170
-
171
- /*
172
- Animate.css - http://daneden.me/animate
173
- Licensed under the ☺ license (http://licence.visualidiot.com/)
174
-
175
- Copyright (c) 2012 Dan Eden*/
176
-
177
- .animated {
178
- -webkit-animation-duration: 1s;
179
- -moz-animation-duration: 1s;
180
- -o-animation-duration: 1s;
181
- animation-duration: 1s;
182
- -webkit-animation-fill-mode: both;
183
- -moz-animation-fill-mode: both;
184
- -o-animation-fill-mode: both;
185
- animation-fill-mode: both;
186
- }
187
-
188
- @-webkit-keyframes shake {
189
- 0%, 100% {-webkit-transform: translateX(0);}
190
- 10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
191
- 20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
192
- }
193
-
194
- @-moz-keyframes shake {
195
- 0%, 100% {-moz-transform: translateX(0);}
196
- 10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
197
- 20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
198
- }
199
-
200
- @-o-keyframes shake {
201
- 0%, 100% {-o-transform: translateX(0);}
202
- 10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
203
- 20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
204
- }
205
-
206
- @keyframes shake {
207
- 0%, 100% {transform: translateX(0);}
208
- 10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
209
- 20%, 40%, 60%, 80% {transform: translateX(10px);}
210
- }
211
-
212
- .shake {
213
- -webkit-animation-name: shake;
214
- -moz-animation-name: shake;
215
- -o-animation-name: shake;
216
- animation-name: shake;
217
- }
@@ -1,118 +0,0 @@
1
- module Blacklight::HtmlHeadHelperBehavior
2
- extend Deprecation
3
- self.deprecation_horizon = 'Blacklight 5.x'
4
-
5
- ##
6
- # This method should be included in any Blacklight layout, including
7
- # custom ones. It will output results of #render_js_includes,
8
- # #render_stylesheet_includes, all the content of
9
- # current_controller#extra_head_content as well as any content passed
10
- # in any content_for(:head) blocks.
11
- #
12
- # Uses controller methods #extra_head_content, #javascript_includes,
13
- # and #stylesheet_links to find content. Tolerates it if those
14
- # methods don't exist, silently skipping.
15
- #
16
- # By a layout outputting this in html HEAD, it provides an easy way for
17
- # local config or extra plugins to add HEAD content.
18
- #
19
- # Add your own css or remove the defaults by simply editing
20
- # controller.stylesheet_links, controller.javascript_includes,
21
- # or controller.extra_head_content.
22
- #
23
- #
24
- #
25
- # in an initializer or other startup file (plugin init.rb?):
26
- #
27
- # == Apply to all actions in all controllers:
28
- #
29
- # ApplicationController.before_filter do |controller|
30
- # # remove default jquery-ui theme.
31
- # controller.stylesheet_links.each do |args|
32
- # args.delete_if {|a| a =~ /^|\/jquery-ui-[\d.]+\.custom\.css$/ }
33
- # end
34
- #
35
- # # add in a different jquery-ui theme, or any other css or what have you
36
- # controller.stylesheet_links << 'my_css.css'
37
- #
38
- # controller.javascript_includes << "my_local_behaviors.js"
39
- #
40
- # controller.extra_head_content << '<link rel="something" href="something">'
41
- # end
42
- #
43
- # == Apply to a particular action in a particular controller:
44
- #
45
- # CatalogController.before_filter :only => :show |controller|
46
- # controller.extra_head_content << '<link rel="something" href="something">'
47
- # end
48
- #
49
- # == Or in a view file that wants to add certain header content? no problem:
50
- #
51
- # <% stylesheet_links << "mystylesheet.css" %>
52
- # <% javascript_includes << "my_js.js" %>
53
- # <% extra_head_content << capture do %>
54
- # <%= tag :link, { :href => some_method_for_something, :rel => "alternate" } %>
55
- # <% end %>
56
- #
57
- # == Full power of javascript_include_tag and stylesheet_link_tag
58
- # Note that the elements added to stylesheet_links and javascript_links
59
- # are arguments to Rails javascript_include_tag and stylesheet_link_tag
60
- # respectively, you can pass complex arguments. eg:
61
- #
62
- # stylesheet_links << ["stylesheet1.css", "stylesheet2.css", {:cache => "mykey"}]
63
- # javascript_includes << ["myjavascript.js", {:plugin => :myplugin} ]
64
- def render_head_content
65
- Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
66
- render_stylesheet_includes +
67
- render_js_includes +
68
- render_extra_head_content
69
- end +
70
- content_for(:head)
71
- end
72
-
73
- deprecation_deprecate :render_head_content
74
-
75
- ##
76
- # Assumes controller has a #stylesheet_link_tag method, array with
77
- # each element being a set of arguments for stylesheet_link_tag
78
- # See #render_head_content for instructions on local code or plugins
79
- # adding stylesheets.
80
- def render_stylesheet_includes
81
- return "".html_safe unless respond_to?(:stylesheet_links)
82
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
83
- stylesheet_links.uniq.collect do |args|
84
- stylesheet_link_tag(*args)
85
- end.join("\n").html_safe
86
- end
87
- end
88
- deprecation_deprecate :render_stylesheet_includes
89
-
90
-
91
- ##
92
- # Assumes controller has a #js_includes method, array with each
93
- # element being a set of arguments for javsascript_include_tag.
94
- # See #render_head_content for instructions on local code or plugins
95
- # adding js files.
96
- def render_js_includes
97
- return "".html_safe unless respond_to?(:javascript_includes)
98
-
99
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
100
- javascript_includes.uniq.collect do |args|
101
- javascript_include_tag(*args)
102
- end.join("\n").html_safe
103
- end
104
- end
105
- deprecation_deprecate :render_js_includes
106
-
107
- ##
108
- # Assumes controller has a #extra_head_content method
109
- #
110
- def render_extra_head_content
111
- return "".html_safe unless respond_to?(:extra_head_content)
112
-
113
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
114
- extra_head_content.join("\n").html_safe
115
- end
116
- end
117
- deprecation_deprecate :render_extra_head_content
118
- end
@@ -1,3 +0,0 @@
1
- module HtmlHeadHelper
2
- include Blacklight::HtmlHeadHelperBehavior
3
- end
@@ -1,7 +0,0 @@
1
- <%= form_tag bookmarks_url, :name => "bookmarks" do %>
2
- <% documents.each_with_index do |document, index| %>
3
- <%= hidden_field_tag "bookmarks[#{index}][document_id]", document.id %>
4
- <%= hidden_field_tag "bookmarks[#{index}][title]", h(document[document_show_link_field])%>
5
- <% end %>
6
- <%= submit_tag t('blacklight.bookmarks.collection.add.button'), :class => 'btn' %>
7
- <% end %>
@@ -1,32 +0,0 @@
1
- <div id="marc_view">
2
- <% fields = @document.to_marc.find_all{|f| ('000'..'999') === f.tag } %>
3
- <div class="field"><%= t('blacklight.search.librarian_view.leader', :leader => @document.to_marc.leader) %></div>
4
- <%- fields.each do |field| -%>
5
- <%- unless field.tag.to_s == "940" -%>
6
- <div class="field">
7
- <div class="tag_ind">
8
- <span class="tag">
9
- <%= h(field.tag) %>
10
- </span>
11
- <%- if field.is_a?(MARC::ControlField) -%>
12
- <span class="control_field_values">
13
- <%= h(field.value) %>
14
- </span>
15
- <%- else -%>
16
- <div class="ind1">
17
- <%= !field.indicator1.blank? ? field.indicator1 : "&nbsp;&nbsp;".html_safe -%>
18
- </div>
19
- <div class="ind2">
20
- <%= !field.indicator2.blank? ? field.indicator2 : "&nbsp;&nbsp;".html_safe -%>
21
- </div>
22
- </div>
23
- <div class="subfields">
24
- <%- field.each do |sub| -%>
25
- <span class="sub_code"><%= h(sub.code) %>|</span> <%= h(sub.value) %>
26
- <%- end -%>
27
- <%- end -%>
28
- </div>
29
- </div>
30
- <%- end-%>
31
- <%- end -%>
32
- </div>
@@ -1,10 +0,0 @@
1
-
2
- <div class="modal-header">
3
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
4
- <h1><%= t('blacklight.search.librarian_view.title') %></h1>
5
- </div>
6
- <%- if @document.respond_to?(:to_marc) -%>
7
- <%= render "marc_view" %>
8
- <%- else %>
9
- <%= t('blacklight.search.librarian_view.empty') %>
10
- <%- end -%>
@@ -1,17 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- Rails.application.routes.draw do
3
- # A Note on User Sessions:
4
- # Blacklight expects the following named routes or at least the associated path helper methods to be defined.
5
- # new_user_session (for logging in) - pages that require a log in will redirect users here.
6
- # destroy_user_session (for logging out)
7
-
8
- # Routes for the Blacklight application are defined in Blacklight::Routes
9
- #
10
- # These routes can be injected into your Rails application by adding
11
- # Blacklight.add_routes(self)
12
- # to the application's ./config/routes.rb. The injected routes can be
13
- # customized as well, e.g.:
14
- # Blacklight.add_routes(self, :only => [:bookmarks]) # will only look bookmark routes
15
- # Blacklight.add_routes(self, :except => [:catalog]) # will not load catalog routes
16
- end
17
-
@@ -1,90 +0,0 @@
1
- Blacklight will provide atom responses for all catalog/index results. Just add ".atom" on to the end of your path component, `/catalog.atom`, or `/catalog/index.atom`.
2
- ```xml
3
- <?xml version="1.0" encoding="UTF-8"?>
4
- <feed xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.w3.org/2005/Atom">
5
- <title>Blacklight Search Results</title>
6
- <author>
7
- <name>Blacklight</name>
8
- </author>
9
- <link href="http://demo.projectblacklight.org/?commit=search&amp;amp;format=atom&amp;amp;q=urdu&amp;amp;search_field=all_fields" rel="self"/>
10
- <link href="http://demo.projectblacklight.org/?commit=search&amp;amp;format=html&amp;amp;q=urdu&amp;amp;search_field=all_fields" rel="alternate" type="text/html"/>
11
- <id>http://demo.projectblacklight.org/?commit=search&amp;amp;format=html&amp;amp;q=urdu&amp;amp;search_field=all_fields&amp;amp;type=text%2Fhtml</id>
12
- <link href="http://demo.projectblacklight.org/?commit=search&amp;amp;format=atom&amp;amp;page=2&amp;amp;q=urdu&amp;amp;search_field=all_fields" rel="next"/>
13
- <link href="http://demo.projectblacklight.org/?commit=search&amp;amp;format=atom&amp;amp;page=1&amp;amp;q=urdu&amp;amp;search_field=all_fields" rel="first"/>
14
- <link href="http://demo.projectblacklight.org/?commit=search&amp;amp;format=atom&amp;amp;page=15&amp;amp;q=urdu&amp;amp;search_field=all_fields" rel="last"/>
15
- <link href="http://demo.projectblacklight.org/catalog/opensearch.xml" rel="search" type="application/opensearchdescription+xml"/>
16
- <opensearch:totalResults>147</opensearch:totalResults>
17
- <opensearch:startIndex>0</opensearch:startIndex>
18
- <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
19
- <opensearch:Query searchTerms="urdu" startPage="1" role="request"/>
20
- <updated>2011-05-11T17:46:58Z</updated>
21
- <entry>
22
- <title>Urdu&#772; d&#803;ra&#772;ma&#772;</title>
23
- <updated>2011-05-11T17:46:58Z</updated>
24
- <link href="http://demo.projectblacklight.org/catalog/2008306442" rel="alternate" type="text/html"/>
25
- <link href="http://demo.projectblacklight.org/catalog/2008306442.dc_xml" rel="alternate" title="dc_xml" type="text/xml" />
26
- <link href="http://demo.projectblacklight.org/catalog/2008306442.xml" rel="alternate" title="xml" type="application/xml" />
27
- <id>http://demo.projectblacklight.org/catalog/2008306442</id>
28
- <author>
29
- <name>Farg&#818;h&#818;a&#772;nah, 1979-</name>
30
- </author>
31
- <summary type="html">
32
- &lt;dl class="defList"&gt;
33
-
34
-
35
- &lt;dt class="blacklight-title_display"&gt;Title:&lt;/dt&gt;
36
- &lt;dd class="blacklight-title_display"&gt;Urdu&#772; d&#803;ra&#772;ma&#772;&lt;/dd&gt;
37
-
38
- &lt;dt class="blacklight-author_display"&gt;Author:&lt;/dt&gt;
39
- &lt;dd class="blacklight-author_display"&gt;Farg&#818;h&#818;a&#772;nah, 1979-&lt;/dd&gt;
40
-
41
-
42
- <!-- [...] -->
43
- &lt;/dl&gt;
44
- </summary>
45
- </entry>
46
- <!-- [...] -->
47
- </feed>
48
- ```
49
-
50
-
51
- The same HTML summary included in your HTML results pages are included as an `atom:summary` element -- the atom template uses the `[[#render_document_partial|https://github.com/projectblacklight/blacklight/blob/master/app/helpers/blacklight/blacklight_helper_behavior.rb#L203]]` helper method to generate this HTML summary, so if you've over-ridden that for your app, it will be used as the `atom:summary` content instead.
52
-
53
- ## API Usage
54
- The Atom response is intended to be pretty full of data, so it can fill many traditional API requests. It makes use of every relevant atom or [[OpenSearch|http://www.opensearch.org/Home]] element that could be conveniently included.
55
-
56
- The Atom response also supports arbitrary format representations in the `atom:content` element. You can include `&content_format=some_format` in your request URL (e.g. `[[/catalog.atom?content_format=oai_dc_xml|http://demo.projectblacklight.org/catalog.atom?q=urdu&content_format=oai_dc_xml]]`). Any format a given document can be exported as using the [[Blacklight document framework|Extending-blacklight-with-the-document-extension-framework]] is available. Not every document can export in every format -- if a format is requested one or more of the items in your atom result can not export as, it will not have an `atom:content` element. Non-XML-based formats are supported, as the content is Base64-encoded (as per Atom spec, unless the format is `text/plain`).
57
- ```xml
58
- <?xml version="1.0" encoding="UTF-8"?>
59
- <feed xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.w3.org/2005/Atom">
60
- <title>Blacklight Search Results</title>
61
- <author>
62
- <name>Blacklight</name>
63
- </author>
64
- <link href="http://demo.projectblacklight.org/?content_format=oai_dc_xml&amp;amp;format=atom&amp;amp;per_page=1" rel="self"/>
65
- <!-- [...] -->
66
- <entry>
67
- <title>The book of the dance in the 20th century selections from the Jane Bourne Parton collection of books on the dance</title>
68
- <updated>2011-05-11T17:59:32Z</updated>
69
- <link href="http://demo.projectblacklight.org/catalog/u1" rel="alternate" type="text/html"/>
70
- <link href="http://demo.projectblacklight.org/catalog/u1.dc_xml" rel="alternate" title="dc_xml" type="text/xml" />
71
- <link href="http://demo.projectblacklight.org/catalog/u1.xml" rel="alternate" title="xml" type="application/xml" />
72
- <id>http://demo.projectblacklight.org/catalog/u1</id>
73
- <author>
74
- <name>Roatcap, Adela Spindler</name>
75
- </author>
76
- <summary type="html">
77
- <!-- [...] -->
78
- </summary>
79
- <!-- [ Here is the export format as OAI Dublin Core XML ] -->
80
- <content type="text/xml">
81
- <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:language>English</dc:language><dc:title>The book of the dance in the 20th century selections from the Jane Bourne Parton collection of books on the dance</dc:title><dc:format>Book</dc:format></oai_dc:dc> </content>
82
- </entry>
83
- </feed>
84
- ```
85
-
86
- This means that if you add on a document extension that provides more export formats for some or all of your documents, that will automatically be available in the atom response.
87
-
88
- If you choose to use the [[Blacklight CQL add-on|https://github.com/projectblacklight/blacklight_cql]], the combination of [[CQL|http://www.loc.gov/standards/sru/specs/cql.html]] requests and Atom responses provides a pretty good more-or-less standards-based API to search results through Blacklight.
89
-
90
- The Atom response generating template is at `app/views/catalog/index.builder.atom`.