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,370 +0,0 @@
1
- /* ===========================================================
2
- * bootstrap-modalmanager.js v2.0
3
- * ===========================================================
4
- * Copyright 2012 Jordan Schroter.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- * ========================================================== */
18
-
19
- !function ($) {
20
-
21
- "use strict"; // jshint ;_;
22
-
23
- /* MODAL MANAGER CLASS DEFINITION
24
- * ====================== */
25
-
26
- var ModalManager = function (element, options) {
27
- this.init(element, options);
28
- }
29
-
30
- ModalManager.prototype = {
31
-
32
- constructor: ModalManager,
33
-
34
- init: function (element, options) {
35
- this.$element = $(element);
36
- this.options = $.extend({}, $.fn.modalmanager.defaults, this.$element.data(), typeof options == 'object' && options);
37
- this.stack = [];
38
- this.backdropCount = 0;
39
- },
40
-
41
- createModal: function (element, options) {
42
- $(element).modal($.extend({ manager: this }, options));
43
- },
44
-
45
- appendModal: function (modal) {
46
- this.stack.push(modal);
47
-
48
- var that = this;
49
-
50
- modal.$element.on('show.modalmanager', targetIsSelf(function (e) {
51
- modal.isShown = true;
52
-
53
- var transition = $.support.transition && modal.$element.hasClass('fade');
54
-
55
- that.$element
56
- .toggleClass('modal-open', that.hasOpenModal())
57
- .toggleClass('page-overflow', $(window).height() < that.$element.height());
58
-
59
- modal.$parent = modal.$element.parent();
60
-
61
- modal.$container = that.createContainer(modal);
62
-
63
- modal.$element.appendTo(modal.$container);
64
-
65
- var modalOverflow = $(window).height() < modal.$element.height() || modal.options.modalOverflow;
66
-
67
- that.backdrop(modal, function () {
68
-
69
- modal.$element.show();
70
-
71
- if (transition) {
72
- modal.$element[0].style.display = 'run-in';
73
- modal.$element[0].offsetWidth;
74
- modal.$element.one($.support.transition.end, function () { modal.$element[0].style.display = 'block' });
75
- }
76
-
77
- modal.$element
78
- .toggleClass('modal-overflow', modalOverflow)
79
- .css('margin-top', modalOverflow ? 0 : 0 - modal.$element.height()/2)
80
- .addClass('in')
81
- .attr('aria-hidden', false);
82
-
83
- var complete = function () {
84
- that.setFocus();
85
- modal.$element.triggerHandler('shown');
86
- }
87
-
88
- transition ?
89
- modal.$element.one($.support.transition.end, complete) :
90
- complete();
91
- });
92
- }));
93
-
94
- modal.$element.on('hidden.modalmanager', targetIsSelf(function (e) {
95
-
96
- that.backdrop(modal);
97
-
98
- if (modal.$backdrop){
99
- $.support.transition && modal.$element.hasClass('fade')?
100
- modal.$backdrop.one($.support.transition.end, function () { that.destroyModal(modal) }) :
101
- that.destroyModal(modal);
102
- } else {
103
- that.destroyModal(modal);
104
- }
105
-
106
- }));
107
-
108
- modal.$element.on('destroy.modalmanager', targetIsSelf(function (e) {
109
- that.removeModal(modal);
110
- }));
111
- },
112
-
113
- destroyModal: function (modal) {
114
-
115
- modal.destroy();
116
-
117
- var hasOpenModal = this.hasOpenModal();
118
-
119
- this.$element.toggleClass('modal-open', hasOpenModal);
120
-
121
- if (!hasOpenModal){
122
- this.$element.removeClass('page-overflow');
123
- }
124
-
125
- this.removeContainer(modal);
126
-
127
- this.setFocus();
128
- },
129
-
130
- hasOpenModal: function () {
131
- for (var i = 0; i < this.stack.length; i++){
132
- if (this.stack[i].isShown) return true;
133
- }
134
-
135
- return false;
136
- },
137
-
138
- setFocus: function () {
139
- var topModal;
140
-
141
- for (var i = 0; i < this.stack.length; i++){
142
- if (this.stack[i].isShown) topModal = this.stack[i];
143
- }
144
-
145
- if (!topModal) return;
146
-
147
- topModal.focus();
148
-
149
- },
150
-
151
- removeModal: function (modal) {
152
- modal.$element.off('.modalmanager');
153
- if (modal.$backdrop) this.removeBackdrop.call(modal);
154
- this.stack.splice(this.getIndexOfModal(modal), 1);
155
- },
156
-
157
- getModalAt: function (index) {
158
- return this.stack[index];
159
- },
160
-
161
- getIndexOfModal: function (modal) {
162
- for (var i = 0; i < this.stack.length; i++){
163
- if (modal === this.stack[i]) return i;
164
- }
165
- },
166
-
167
- removeBackdrop: function (modal) {
168
- modal.$backdrop.remove();
169
- modal.$backdrop = null;
170
- },
171
-
172
- createBackdrop: function (animate) {
173
- var $backdrop;
174
-
175
- if (!this.isLoading) {
176
- $backdrop = $('<div class="modal-backdrop ' + animate + '" />')
177
- .appendTo(this.$element);
178
-
179
- } else {
180
- $backdrop = this.$loading;
181
- $backdrop.off('.modalmanager');
182
- this.$spinner.remove();
183
- this.isLoading = false;
184
- this.$loading = this.$spinner = null;
185
- }
186
-
187
- return $backdrop
188
- },
189
-
190
- removeContainer: function (modal) {
191
- modal.$container.remove();
192
- modal.$container = null;
193
- },
194
-
195
- createContainer: function (modal) {
196
- var $container;
197
-
198
- $container = $('<div class="modal-scrollable">')
199
- .css('z-index', getzIndex( 'modal',
200
- modal ? this.getIndexOfModal(modal) : this.stack.length ))
201
- .appendTo(this.$element);
202
-
203
- if (modal && modal.options.backdrop != 'static') {
204
- $container.on('click.modal', targetIsSelf(function (e) {
205
- modal.hide();
206
- }));
207
- } else if (modal) {
208
- $container.on('click.modal', targetIsSelf(function (e) {
209
- modal.attention();
210
- }));
211
- }
212
-
213
- return $container;
214
-
215
- },
216
-
217
- backdrop: function (modal, callback) {
218
- var animate = modal.$element.hasClass('fade') ? 'fade' : '',
219
- showBackdrop = modal.options.backdrop &&
220
- this.backdropCount < this.options.backdropLimit;
221
-
222
- if (modal.isShown && showBackdrop) {
223
- var doAnimate = $.support.transition && animate && !this.isLoading;
224
-
225
-
226
- modal.$backdrop = this.createBackdrop(animate);
227
-
228
- modal.$backdrop.css('z-index', getzIndex( 'backdrop', this.getIndexOfModal(modal) ))
229
-
230
- if (doAnimate) modal.$backdrop[0].offsetWidth // force reflow
231
-
232
- modal.$backdrop.addClass('in')
233
-
234
- this.backdropCount += 1;
235
-
236
- doAnimate ?
237
- modal.$backdrop.one($.support.transition.end, callback) :
238
- callback();
239
-
240
- } else if (!modal.isShown && modal.$backdrop) {
241
- modal.$backdrop.removeClass('in');
242
-
243
- this.backdropCount -= 1;
244
-
245
- var that = this;
246
-
247
- $.support.transition && modal.$element.hasClass('fade')?
248
- modal.$backdrop.one($.support.transition.end, function () { that.removeBackdrop(modal) }) :
249
- that.removeBackdrop(modal);
250
-
251
- } else if (callback) {
252
- callback();
253
- }
254
- },
255
-
256
- removeLoading: function () {
257
- this.$loading && this.$loading.remove();
258
- this.$loading = null;
259
- this.isLoading = false;
260
- },
261
-
262
- loading: function (callback) {
263
- callback = callback || function () { };
264
-
265
- this.$element
266
- .toggleClass('modal-open', !this.isLoading || this.hasOpenModal())
267
- .toggleClass('page-overflow', $(window).height() < this.$element.height());
268
-
269
- if (!this.isLoading) {
270
-
271
- this.$loading = this.createBackdrop('fade');
272
-
273
- this.$loading[0].offsetWidth // force reflow
274
-
275
- this.$loading
276
- .css('z-index', getzIndex('backdrop', this.stack.length))
277
- .addClass('in');
278
-
279
- var $spinner = $(this.options.spinner)
280
- .css('z-index', getzIndex('modal', this.stack.length))
281
- .appendTo(this.$element)
282
- .addClass('in');
283
-
284
- this.$spinner = $(this.createContainer())
285
- .append($spinner)
286
- .on('click.modalmanager', $.proxy(this.loading, this));
287
-
288
- this.isLoading = true;
289
-
290
- $.support.transition ?
291
- this.$loading.one($.support.transition.end, callback) :
292
- callback();
293
-
294
- } else if (this.isLoading && this.$loading) {
295
- this.$loading.removeClass('in');
296
-
297
- if (this.$spinner) this.$spinner.remove();
298
-
299
- var that = this;
300
- $.support.transition ?
301
- this.$loading.one($.support.transition.end, function () { that.removeLoading() }) :
302
- that.removeLoading();
303
-
304
- } else if (callback) {
305
- callback(this.isLoading);
306
- }
307
- }
308
- }
309
-
310
- /* PRIVATE METHODS
311
- * ======================= */
312
-
313
- // computes and caches the zindexes
314
- var getzIndex = (function () {
315
- var zIndexFactor,
316
- baseIndex = {};
317
-
318
- return function (type, pos) {
319
-
320
- if (typeof zIndexFactor === 'undefined'){
321
- var $baseModal = $('<div class="modal hide" />').appendTo('body'),
322
- $baseBackdrop = $('<div class="modal-backdrop hide" />').appendTo('body');
323
-
324
- baseIndex['modal'] = +$baseModal.css('z-index'),
325
- baseIndex['backdrop'] = +$baseBackdrop.css('z-index'),
326
- zIndexFactor = baseIndex['modal'] - baseIndex['backdrop'];
327
-
328
- $baseModal.remove();
329
- $baseBackdrop.remove();
330
- $baseBackdrop = $baseModal = null;
331
- }
332
-
333
- return baseIndex[type] + (zIndexFactor * pos);
334
-
335
- }
336
- }())
337
-
338
- // make sure the event target is the modal itself in order to prevent
339
- // other components such as tabsfrom triggering the modal manager.
340
- // if Boostsrap namespaced events, this would not be needed.
341
- function targetIsSelf(callback){
342
- return function (e) {
343
- if (this === e.target){
344
- return callback.apply(this, arguments);
345
- }
346
- }
347
- }
348
-
349
-
350
- /* MODAL MANAGER PLUGIN DEFINITION
351
- * ======================= */
352
-
353
- $.fn.modalmanager = function (option) {
354
- return this.each(function () {
355
- var $this = $(this),
356
- data = $this.data('modalmanager');
357
-
358
- if (!data) $this.data('modalmanager', (data = new ModalManager(this, option)))
359
- if (typeof option === 'string') data[option]()
360
- })
361
- }
362
-
363
- $.fn.modalmanager.defaults = {
364
- backdropLimit: 999,
365
- spinner: '<div class="loading-spinner fade" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>'
366
- }
367
-
368
- $.fn.modalmanager.Constructor = ModalManager
369
-
370
- }(jQuery);
@@ -1,33 +0,0 @@
1
- ul.bookmarkTools
2
- {
3
- @include border-radius(0 0 4px 4px);
4
- background-color: $well_bg_color;
5
- border-color: $well_bg_color;
6
- margin:0;
7
-
8
- li
9
- {
10
- display:inline-block;
11
- }
12
-
13
- li form
14
- {
15
- display:inline;
16
- }
17
- }
18
-
19
-
20
- ul.tools
21
- {
22
- margin:0;
23
- padding:0;
24
- list-style: none;
25
-
26
- li
27
- {
28
- display: inline;
29
- list-style: none;
30
- margin: 0;
31
- margin-right: 10px;
32
- }
33
- }
@@ -1,255 +0,0 @@
1
- .catalog_startOverLink {
2
- padding-top: 0.3em;
3
- float: right;
4
- }
5
-
6
- #sort-dropdown {
7
- padding-left: 1em;
8
- }
9
-
10
- #document
11
- {
12
- margin-top:1em;
13
-
14
-
15
- h1
16
- {
17
- margin:0;
18
- padding:0 0 0.4em;
19
- }
20
- }
21
-
22
- #documents
23
- {
24
- margin-bottom:1em;
25
- margin-top:1em;
26
-
27
- .documentHeader
28
- {
29
- padding: 5px 0 0;
30
- }
31
- }
32
-
33
- .ajax_form
34
- {
35
- margin-bottom: 0;
36
- }
37
-
38
- #librarian_view
39
- {
40
- left:-17%;
41
- text-align:left;
42
- top:10%;
43
- width:700px;
44
- }
45
-
46
- #marc_view
47
- {
48
- padding:5px;
49
- text-align:left;
50
-
51
- .field
52
- {
53
- border-bottom: $marc_item_separator;
54
- clear:both;
55
- }
56
-
57
- .ind1, .ind2
58
- {
59
- display:inline;
60
- padding:0 5px;
61
- }
62
-
63
- .subfields
64
- {
65
- padding-left:5em;
66
- }
67
-
68
- .tag_ind
69
- {
70
- float:left;
71
- }
72
- }
73
-
74
- .constraints-container {
75
- @extend .well;
76
- padding-bottom: 9px;
77
- }
78
-
79
- span.constraints-label {
80
- font-weight:bold;
81
- }
82
-
83
- .appliedFilter
84
- {
85
- background: $constraint_bg_color;
86
- border:1px solid $constraint_border_color;
87
- display:inline-block;
88
- margin-bottom:0.66em;
89
- margin-right:0.33em;
90
- padding:3px 3px 3px 1.5em;
91
- padding-right:50px;
92
- position:relative;
93
- @include border-radius(15px 15px 15px 15px);
94
-
95
- .btnRemove
96
- {
97
- background: image_url('blacklight/remove.gif') no-repeat center center;
98
- border-bottom:none;
99
- border-left:1px solid $constraint_border_color;
100
- display:block;
101
- height:100%;
102
- outline:none;
103
- position:absolute;
104
- right:0;
105
- text-indent:-99999px;
106
- top:0;
107
- width:32px;
108
- z-index:5;
109
- }
110
-
111
- .btnRemove:active,.btnRemove:focus
112
- {
113
- border:1px dotted $constraint_border_active_color;
114
- }
115
-
116
- .filterName
117
- {
118
- background: image_url('blacklight/separator.gif') no-repeat right center;
119
- padding-right:14px;
120
- }
121
- }
122
-
123
- .document
124
- {
125
- border-bottom:1px dotted $dotted_border_color;
126
- clear:both;
127
- padding-bottom: 1em;
128
-
129
- dd {
130
- padding-bottom:0.5em;
131
- }
132
- }
133
-
134
- #documents .documentFunctions
135
- {
136
- float:right;
137
- margin: 10px 0;
138
-
139
- .bookmark_toggle
140
- {
141
- display:inline;
142
- }
143
- }
144
-
145
- #sidebar form {
146
- margin: 0;
147
- }
148
-
149
- .page_links
150
- {
151
- display: inline-block;
152
- }
153
-
154
- .pagination {
155
- text-align: center ;
156
- }
157
-
158
-
159
- .solrQuery
160
- {
161
- background-color: $search_ui_bg_color;
162
- border:1px dotted $dotted_border_color;
163
- font-size:90%;
164
- margin:2em;
165
- padding:.5em;
166
- }
167
-
168
- .document dl {
169
- margin-top: 0;
170
- margin-bottom: 0;
171
- }
172
-
173
- .dl-invert {
174
- dt {
175
- font-weight: normal;
176
- color: #888;
177
- }
178
- }
179
-
180
- label.checked
181
- {
182
- font-weight:700;
183
- }
184
-
185
- label.toggle_bookmark
186
- {
187
- color:inherit;
188
- display:inline-block;
189
- font-weight:inherit;
190
- min-width:8.5em;
191
- text-align:left;
192
- }
193
-
194
-
195
- span.page a,span.page.current
196
- {
197
- border-bottom:none;
198
- margin-right:0.2em;
199
- padding:0.2em 0.5em;
200
- text-decoration:none;
201
- }
202
-
203
-
204
- #sidebar .well
205
- {
206
- padding: 8px 0;
207
- }
208
-
209
- #sidebar-mlt li {
210
- padding-bottom: 0.5em;
211
- }
212
-
213
- .show-document
214
- {
215
- .document {
216
- border: none;
217
- }
218
- }
219
-
220
- #sortAndPerPage {
221
- @extend .well;
222
- }
223
-
224
- #sortAndPerPage .dropdown-toggle {
225
- cursor: pointer;
226
- }
227
-
228
- .no-js #sortAndPerPage {
229
- & {
230
- @extend .clearfix;
231
- }
232
- .dropdown-menu {
233
- background: none;
234
- box-shadow: none;
235
- border: none;
236
- position: relative;
237
- display: block;
238
- float: none;
239
- }
240
-
241
- }
242
-
243
- .index_title {
244
- float: left;
245
- max-width: 414px; //span7; figure out how to calculate this correctly?
246
- }
247
-
248
- #email_form {
249
- @extend .span6;
250
- }
251
-
252
- .document-thumbnail {
253
- float: right;
254
- padding-left: 20px;
255
- }