blacklight 5.19.2 → 6.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -3
  3. data/.hound.yml +2 -0
  4. data/.jshintrc +67 -0
  5. data/.rubocop_hound.yml +4 -0
  6. data/.travis.yml +11 -8
  7. data/Gemfile +11 -21
  8. data/Rakefile +1 -0
  9. data/VERSION +1 -1
  10. data/app/assets/javascripts/blacklight/blacklight.js +1 -0
  11. data/app/assets/javascripts/blacklight/core.js +5 -19
  12. data/app/assets/javascripts/blacklight/facet_load.js +23 -0
  13. data/app/assets/stylesheets/blacklight/_balanced_list.scss +18 -0
  14. data/app/assets/stylesheets/blacklight/_blacklight_base.scss +5 -1
  15. data/app/assets/stylesheets/blacklight/_bookmark.scss +14 -6
  16. data/app/assets/stylesheets/blacklight/_constraints.scss +52 -0
  17. data/app/assets/stylesheets/blacklight/_controls.scss +61 -0
  18. data/app/assets/stylesheets/blacklight/_facets.scss +31 -4
  19. data/app/assets/stylesheets/blacklight/_header.scss +17 -3
  20. data/app/assets/stylesheets/blacklight/_pagination.scss +21 -0
  21. data/app/assets/stylesheets/blacklight/_search_results.scss +28 -0
  22. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -3
  23. data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
  24. data/app/controllers/concerns/blacklight/catalog.rb +3 -45
  25. data/app/controllers/concerns/blacklight/controller.rb +29 -18
  26. data/app/controllers/concerns/blacklight/default_component_configuration.rb +4 -3
  27. data/app/controllers/concerns/blacklight/facet.rb +1 -0
  28. data/app/controllers/concerns/blacklight/request_builders.rb +4 -107
  29. data/app/controllers/concerns/blacklight/search_fields.rb +1 -1
  30. data/app/controllers/concerns/blacklight/search_helper.rb +8 -160
  31. data/app/controllers/saved_searches_controller.rb +1 -1
  32. data/app/controllers/search_history_controller.rb +18 -1
  33. data/app/helpers/blacklight/blacklight_helper_behavior.rb +17 -85
  34. data/app/helpers/blacklight/catalog_helper_behavior.rb +4 -48
  35. data/app/helpers/blacklight/component_helper_behavior.rb +9 -2
  36. data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -43
  37. data/app/helpers/blacklight/facets_helper_behavior.rb +10 -6
  38. data/app/helpers/blacklight/layout_helper_behavior.rb +0 -8
  39. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -10
  40. data/app/helpers/blacklight/render_partials_helper.rb +1 -3
  41. data/app/helpers/blacklight/url_helper_behavior.rb +15 -187
  42. data/{lib → app/models}/blacklight/abstract_repository.rb +0 -15
  43. data/{lib → app/models}/blacklight/configuration.rb +22 -59
  44. data/app/models/blacklight/configuration/context.rb +47 -0
  45. data/{lib → app/models}/blacklight/configuration/facet_field.rb +1 -0
  46. data/{lib → app/models}/blacklight/configuration/field.rb +0 -0
  47. data/{lib → app/models}/blacklight/configuration/fields.rb +2 -6
  48. data/{lib → app/models}/blacklight/configuration/search_field.rb +0 -0
  49. data/{lib → app/models}/blacklight/configuration/solr_field.rb +0 -0
  50. data/{lib → app/models}/blacklight/configuration/sort_field.rb +0 -0
  51. data/{lib → app/models}/blacklight/configuration/tool_config.rb +0 -0
  52. data/app/models/blacklight/configuration/view_config.rb +9 -0
  53. data/app/models/blacklight/facet_paginator.rb +14 -28
  54. data/{lib → app/models}/blacklight/search_builder.rb +16 -24
  55. data/app/models/blacklight/solr/facet_paginator.rb +6 -2
  56. data/{lib → app/models}/blacklight/solr/repository.rb +0 -21
  57. data/{lib → app/models}/blacklight/solr/request.rb +0 -0
  58. data/{lib → app/models}/blacklight/solr/response.rb +9 -8
  59. data/{lib → app/models}/blacklight/solr/response/facets.rb +37 -29
  60. data/{lib → app/models}/blacklight/solr/response/group.rb +0 -0
  61. data/{lib → app/models}/blacklight/solr/response/group_response.rb +0 -0
  62. data/{lib → app/models}/blacklight/solr/response/more_like_this.rb +0 -0
  63. data/{lib → app/models}/blacklight/solr/response/pagination_methods.rb +0 -0
  64. data/{lib → app/models}/blacklight/solr/response/response.rb +0 -0
  65. data/{lib → app/models}/blacklight/solr/response/spelling.rb +2 -1
  66. data/{lib → app/models}/blacklight/solr/search_builder.rb +0 -0
  67. data/app/models/concerns/blacklight/document.rb +11 -27
  68. data/app/models/concerns/blacklight/document/active_model_shim.rb +8 -0
  69. data/app/models/concerns/blacklight/solr/document.rb +8 -3
  70. data/{lib → app/models/concerns}/blacklight/solr/search_builder_behavior.rb +21 -33
  71. data/app/models/concerns/blacklight/user.rb +0 -9
  72. data/app/models/record_mailer.rb +0 -1
  73. data/app/presenters/blacklight/document_presenter.rb +23 -13
  74. data/app/views/blacklight/nav/_saved_searches.html.erb +1 -1
  75. data/app/views/blacklight/nav/_search_history.html.erb +1 -1
  76. data/app/views/bookmarks/_tools.html.erb +1 -2
  77. data/app/views/bookmarks/index.html.erb +2 -2
  78. data/app/views/catalog/_document_default.atom.builder +4 -2
  79. data/app/views/catalog/_facet_index_navigation.html.erb +9 -0
  80. data/app/views/catalog/_facet_layout.html.erb +2 -3
  81. data/app/views/catalog/_facet_pagination.html.erb +19 -21
  82. data/app/views/catalog/_facets.html.erb +2 -3
  83. data/app/views/catalog/_home_text.html.erb +2 -3
  84. data/app/views/catalog/_index_header_default.html.erb +2 -2
  85. data/app/views/catalog/_per_page_widget.html.erb +1 -1
  86. data/app/views/catalog/_search_form.html.erb +21 -18
  87. data/app/views/catalog/_sort_widget.html.erb +1 -1
  88. data/app/views/catalog/_zero_results.html.erb +2 -2
  89. data/app/views/catalog/facet.html.erb +3 -0
  90. data/app/views/catalog/index.atom.builder +1 -1
  91. data/app/views/layouts/blacklight.html.erb +2 -2
  92. data/app/views/saved_searches/index.html.erb +6 -7
  93. data/app/views/search_history/index.html.erb +5 -5
  94. data/app/views/shared/_header_navbar.html.erb +2 -2
  95. data/blacklight.gemspec +5 -5
  96. data/config/locales/blacklight.de.yml +1 -4
  97. data/config/locales/blacklight.en.yml +2 -7
  98. data/config/locales/blacklight.es.yml +1 -4
  99. data/config/locales/blacklight.fr.yml +1 -4
  100. data/config/locales/blacklight.it.yml +1 -4
  101. data/config/locales/blacklight.pt-BR.yml +1 -4
  102. data/config/routes.rb +9 -0
  103. data/db/migrate/20140202020201_create_searches.rb +1 -1
  104. data/db/migrate/20140202020202_create_bookmarks.rb +1 -1
  105. data/lib/blacklight.rb +5 -82
  106. data/lib/blacklight/engine.rb +0 -5
  107. data/lib/blacklight/parameters.rb +13 -0
  108. data/lib/blacklight/path.rb +143 -0
  109. data/lib/blacklight/routes.rb +3 -134
  110. data/lib/blacklight/routes/exportable.rb +25 -0
  111. data/lib/blacklight/routes/searchable.rb +20 -0
  112. data/lib/blacklight/solr.rb +1 -9
  113. data/lib/blacklight/utils.rb +2 -44
  114. data/lib/generators/blacklight/controller_generator.rb +7 -4
  115. data/lib/generators/blacklight/install_generator.rb +16 -9
  116. data/lib/generators/blacklight/models_generator.rb +18 -0
  117. data/lib/generators/blacklight/templates/catalog_controller.rb +85 -91
  118. data/lib/generators/blacklight/test_support_generator.rb +22 -15
  119. data/solr/conf/_rest_managed.json +3 -0
  120. data/solr/conf/admin-extra.html +31 -0
  121. data/solr/conf/elevate.xml +36 -0
  122. data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  123. data/solr/conf/protwords.txt +21 -0
  124. data/solr/conf/schema.xml +621 -0
  125. data/solr/conf/scripts.conf +24 -0
  126. data/solr/conf/solrconfig.xml +391 -0
  127. data/solr/conf/spellings.txt +2 -0
  128. data/solr/conf/stopwords.txt +58 -0
  129. data/solr/conf/stopwords_en.txt +58 -0
  130. data/solr/conf/synonyms.txt +31 -0
  131. data/solr/conf/xslt/example.xsl +132 -0
  132. data/solr/conf/xslt/example_atom.xsl +67 -0
  133. data/solr/conf/xslt/example_rss.xsl +66 -0
  134. data/solr/conf/xslt/luke.xsl +337 -0
  135. data/solr/sample_solr_documents.yml +1 -0
  136. data/spec/controllers/blacklight/base_spec.rb +17 -0
  137. data/spec/controllers/blacklight/search_helper_spec.rb +25 -297
  138. data/spec/controllers/catalog_controller_spec.rb +7 -6
  139. data/spec/controllers/saved_searches_controller_spec.rb +1 -0
  140. data/spec/controllers/search_history_controller_spec.rb +1 -0
  141. data/spec/features/alternate_controller_spec.rb +10 -10
  142. data/spec/features/bookmarks_spec.rb +8 -22
  143. data/spec/features/facets_spec.rb +27 -7
  144. data/spec/features/record_view_spec.rb +4 -13
  145. data/spec/features/search_formats_spec.rb +1 -26
  146. data/spec/features/sitelinks_search_box.rb +1 -1
  147. data/spec/helpers/blacklight_helper_spec.rb +8 -38
  148. data/spec/helpers/catalog_helper_spec.rb +0 -8
  149. data/spec/helpers/configuration_helper_spec.rb +0 -25
  150. data/spec/helpers/facets_helper_spec.rb +12 -11
  151. data/spec/helpers/hash_as_hidden_fields_spec.rb +7 -7
  152. data/spec/helpers/layout_helper_spec.rb +0 -7
  153. data/spec/helpers/render_constraints_helper_spec.rb +4 -2
  154. data/spec/helpers/url_helper_spec.rb +13 -254
  155. data/spec/lib/blacklight/parameters_spec.rb +22 -0
  156. data/spec/lib/blacklight/path_spec.rb +254 -0
  157. data/spec/lib/blacklight_spec.rb +6 -2
  158. data/spec/models/blacklight/configuration/context_spec.rb +33 -0
  159. data/spec/models/blacklight/document/active_model_shim_spec.rb +33 -0
  160. data/spec/models/blacklight/document_spec.rb +29 -1
  161. data/spec/models/blacklight/facet_paginator_spec.rb +14 -13
  162. data/spec/models/blacklight/search_builder_spec.rb +17 -23
  163. data/spec/models/blacklight/solr/facet_paginator_spec.rb +11 -1
  164. data/spec/models/blacklight/solr/response/facets_spec.rb +19 -25
  165. data/spec/models/blacklight/solr/response/group_response_spec.rb +5 -5
  166. data/spec/models/blacklight/solr/response_spec.rb +0 -11
  167. data/spec/models/blacklight/solr/search_builder_spec.rb +49 -57
  168. data/spec/presenters/document_presenter_spec.rb +15 -42
  169. data/spec/routing/catalog_routing_spec.rb +7 -11
  170. data/spec/spec_helper.rb +4 -42
  171. data/spec/support/controller_level_helpers.rb +17 -0
  172. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -2
  173. data/spec/views/_user_util_links.html.erb_spec.rb +1 -1
  174. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +40 -0
  175. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +1 -1
  176. data/spec/views/catalog/_facets.html.erb_spec.rb +2 -2
  177. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +1 -1
  178. data/spec/views/catalog/_show_tools.html.erb_spec.rb +8 -8
  179. data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +2 -2
  180. data/tasks/blacklight.rake +25 -30
  181. metadata +93 -71
  182. data/app/assets/stylesheets/blacklight/_catalog.scss +0 -229
  183. data/app/controllers/concerns/blacklight/search_history.rb +0 -31
  184. data/app/views/catalog/_refworks_form.html.erb +0 -6
  185. data/lib/blacklight/configuration/view_config.rb +0 -71
  186. data/lib/blacklight/rails/routes.rb +0 -29
  187. data/lib/blacklight/solr_helper.rb +0 -9
  188. data/lib/generators/blacklight/templates/config/initializers/blacklight_initializer.rb +0 -9
  189. data/spec/helpers/component_helper_spec.rb +0 -19
  190. data/spec/lib/blacklight/routes_spec.rb +0 -25
  191. data/spec/lib/blacklight/solr_helper_spec.rb +0 -12
  192. data/spec/routing/routes_spec.rb +0 -20
  193. data/spec/views/catalog/_document_action.html.erb_spec.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 761dc2c92919a348edb283346eed0c9c5a5fb098
4
- data.tar.gz: 36d788152cb804ca30d4414da33fa7796554d630
3
+ metadata.gz: c84e27929bc5c308f60b44bf8308bd12fff0f611
4
+ data.tar.gz: 9fc7f3e715f61d045128e0eade0ee748f933779c
5
5
  SHA512:
6
- metadata.gz: 3b301e9391b46a513548988d0e3e3047b30e37ad75e9151a9797185820651e55831b637436bac45e8192e60561d94d72628dcfaa97146634b5f8a7626e02e3a2
7
- data.tar.gz: d5ac69b68ce1d3fb8eb0efaa3679b5d758549c4e7fb5040e392656f14a107d0b73a1aa0eacdaa3201b4e7d63c443602c650ea94cade8ca1fedd2889bf7e06fc3
6
+ metadata.gz: 59a8e9e76e5bf91d854c742d98d357bd22040e9910661f164ea56ca41494dc28d18878533e71acaa0d29b0a272544f9a27af619b3f0b8cf8ca6da46f8c597f87
7
+ data.tar.gz: f68961e3673557464a4c67359812097453d707828d020a8cfbd7611a00912cb7c51aa53e80850c04f96bbf0745a3bbac537d7e09f97975dc2d53a803787d6f11
data/.gitignore CHANGED
@@ -8,9 +8,6 @@ coverage/
8
8
  gemfiles/*.gemfile.lock
9
9
  jetty/
10
10
  log/*
11
- solr_marc/solrmarc.log
12
- lib/solrmarc.log.*
13
11
  tmp/*
14
12
  pkg/*
15
13
  .internal_test_app
16
- /spec/examples.txt
data/.hound.yml CHANGED
@@ -1,2 +1,4 @@
1
1
  ruby:
2
2
  config_file: .rubocop.yml
3
+ javascript:
4
+ config_file: .jshintrc
data/.jshintrc ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ /*
3
+ * ENVIRONMENTS
4
+ * =================
5
+ */
6
+
7
+ // Define globals exposed by modern browsers.
8
+ "browser": true,
9
+
10
+ // Define globals exposed by jQuery.
11
+ "jquery": true,
12
+
13
+ // Define globals exposed by Node.js.
14
+ "node": true,
15
+
16
+ // Allow ES6.
17
+ "esnext": true,
18
+
19
+ /*
20
+ * ENFORCING OPTIONS
21
+ * =================
22
+ */
23
+
24
+ // Force all variable names to use either camelCase style or UPPER_CASE
25
+ // with underscores.
26
+ "camelcase": true,
27
+
28
+ // Prohibit use of == and != in favor of === and !==.
29
+ "eqeqeq": true,
30
+
31
+ // Enforce tab width of 2 spaces.
32
+ "indent": 2,
33
+
34
+ // Prohibit use of a variable before it is defined.
35
+ "latedef": true,
36
+
37
+ // Enforce line length to 80 characters
38
+ "maxlen": 80,
39
+
40
+ // Require capitalized names for constructor functions.
41
+ "newcap": true,
42
+
43
+ // Enforce use of single quotation marks for strings.
44
+ "quotmark": "single",
45
+
46
+ // Enforce placing 'use strict' at the top function scope
47
+ "strict": true,
48
+
49
+ // Prohibit use of explicitly undeclared variables.
50
+ "undef": true,
51
+
52
+ // Warn when variables are defined but never used.
53
+ "unused": true,
54
+
55
+ /*
56
+ * RELAXING OPTIONS
57
+ * =================
58
+ */
59
+
60
+ // Suppress warnings about == null comparisons.
61
+ "eqnull": true,
62
+
63
+ // Custom predefined javascript objects that should be defined
64
+ "predef": [
65
+ "Blacklight"
66
+ ]
67
+ }
data/.rubocop_hound.yml CHANGED
@@ -648,6 +648,10 @@ Style/Blocks:
648
648
  ugly). Prefer {...} over do...end for single-line blocks.
649
649
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
650
650
  Enabled: true
651
+ Style/CaseEquality:
652
+ Description: Avoid explicit use of the case equality operator(===).
653
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
654
+ Enabled: false
651
655
  Style/CharacterLiteral:
652
656
  Description: Checks for uses of character literals.
653
657
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
data/.travis.yml CHANGED
@@ -1,29 +1,32 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ cache:
4
+ directories:
5
+ - /tmp/solr-5.3.0
3
6
 
4
7
  notifications:
5
8
  email: false
6
9
 
7
10
  rvm:
8
- - 2.3.1
11
+ - 2.2.3
9
12
 
10
13
  matrix:
11
14
  include:
12
- - rvm: 2.2.5
15
+ - rvm: 2.2.2
13
16
  env: "RAILS_VERSION=4.1.13"
14
- - rvm: 2.1.5
15
- env: "RAILS_VERSION=4.2.7.1"
16
- - rvm: jruby-9.0.5.0
17
- env: "RAILS_VERSION=4.2.7.1 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
17
+ - rvm: 2.1.6
18
+ env: "RAILS_VERSION=4.2.4"
19
+ - rvm: jruby-9.0.1.0
20
+ env: "RAILS_VERSION=4.2.4 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
18
21
  allow_failures:
19
- - rvm: jruby-9.0.5.0
22
+ - rvm: jruby-9.0.1.0
20
23
  fast_finish: true
21
24
 
22
25
  before_install:
23
26
  - gem install bundler
24
27
 
25
28
  env:
26
- - "RAILS_VERSION=4.2.7.1"
29
+ - "RAILS_VERSION=4.2.4"
27
30
 
28
31
  notifications:
29
32
  irc: "irc.freenode.org#blacklight"
data/Gemfile CHANGED
@@ -4,19 +4,17 @@ source 'https://rubygems.org'
4
4
  gemspec path: File.expand_path('..', __FILE__)
5
5
 
6
6
  gem 'simplecov', '~> 0.10', require: false
7
- gem 'coveralls', '~> 0.8.6', require: false
8
- gem 'autoprefixer-rails', '~> 6.0.0' if RUBY_VERSION < '2.0'
7
+ gem 'coveralls', require: false
9
8
 
10
9
  group :test do
11
- gem "blacklight-marc", '~> 5.0'
12
10
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
13
11
  end
14
12
 
15
13
  # BEGIN ENGINE_CART BLOCK
16
- # engine_cart: 0.10.0
17
- # engine_cart stanza: 0.10.0
14
+ # engine_cart: 0.8.0
15
+ # engine_cart stanza: 0.8.0
18
16
  # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
19
- file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
17
+ file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path(".internal_test_app", File.dirname(__FILE__)))
20
18
  if File.exist?(file)
21
19
  begin
22
20
  eval_gemfile file
@@ -27,22 +25,14 @@ if File.exist?(file)
27
25
  else
28
26
  Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
29
27
 
30
- if ENV['RAILS_VERSION']
31
- if ENV['RAILS_VERSION'] == 'edge'
32
- gem 'rails', github: 'rails/rails'
33
- ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
34
- else
35
- gem 'rails', ENV['RAILS_VERSION']
36
- end
37
- end
28
+ gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
38
29
 
39
- case ENV['RAILS_VERSION']
40
- when /^4.2/
41
- gem 'responders', '~> 2.0'
42
- gem 'sass-rails', '>= 5.0'
43
- gem 'coffee-rails', '~> 4.1.0'
44
- when /^4.[01]/
45
- gem 'sass-rails', '< 5.0'
30
+ if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
31
+ gem 'responders', "~> 2.0"
32
+ gem 'sass-rails', ">= 5.0"
33
+ else
34
+ gem 'bootstrap-sass', '< 3.3.5' # 3.3.5 requires sass 3.3, incompatible with sass-rails 4.x
35
+ gem 'sass-rails', "< 5.0"
46
36
  end
47
37
  end
48
38
  # END ENGINE_CART BLOCK
data/Rakefile CHANGED
@@ -10,5 +10,6 @@ end
10
10
  Bundler::GemHelper.install_tasks
11
11
 
12
12
  load "tasks/blacklight.rake"
13
+ load "lib/railties/blacklight.rake"
13
14
 
14
15
  task :default => [:ci]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.19.2
1
+ 6.0.0.pre1
@@ -10,6 +10,7 @@
10
10
  //= require blacklight/ajax_modal
11
11
  //= require blacklight/search_context
12
12
  //= require blacklight/collapsable
13
+ //= require blacklight/facet_load
13
14
  //
14
15
  //Bootstrap JS for providing collapsable tablet/mobile menu/alert boxes
15
16
  //= require bootstrap/transition
@@ -9,31 +9,17 @@ Blacklight = function() {
9
9
  for(var i = 0; i < buffer.length; i++) {
10
10
  buffer[i].call();
11
11
  }
12
- },
13
-
14
- listeners: function () {
15
- var listeners = [];
16
- if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
17
- // Turbolinks 5
18
- if (Turbolinks.BrowserAdapter) {
19
- listeners.push('turbolinks:load');
20
- } else {
21
- // Turbolinks < 5
22
- listeners.push('page:load', 'ready');
23
- }
24
- } else {
25
- listeners.push('ready');
26
- }
27
-
28
- return listeners.join(' ');
29
12
  }
30
- };
13
+ }
31
14
  }();
32
15
 
33
16
  // turbolinks triggers page:load events on page transition
34
17
  // If app isn't using turbolinks, this event will never be triggered, no prob.
35
- $(document).on(Blacklight.listeners(), function() {
18
+ $(document).on('page:load', function() {
36
19
  Blacklight.activate();
37
20
  });
38
21
 
22
+ $(document).ready(function() {
23
+ Blacklight.activate();
24
+ });
39
25
 
@@ -0,0 +1,23 @@
1
+ /*global Blacklight */
2
+
3
+ (function($) {
4
+ 'use strict';
5
+
6
+ Blacklight.doResizeFacetLabelsAndCounts = function() {
7
+ // adjust width of facet columns to fit their contents
8
+ function longer (a,b){ return b.textContent.length - a.textContent.length; }
9
+
10
+ $('ul.facet-values, ul.pivot-facet').each(function(){
11
+ var longest = $(this).find('span.facet-count').sort(longer).first();
12
+ var clone = longest.clone()
13
+ .css('visibility','hidden').css('width', 'auto');
14
+ $('body').append(clone);
15
+ $(this).find('.facet-count').first().width(clone.width());
16
+ clone.remove();
17
+ });
18
+ };
19
+
20
+ Blacklight.onLoad(function() {
21
+ Blacklight.doResizeFacetLabelsAndCounts();
22
+ });
23
+ })(jQuery);
@@ -0,0 +1,18 @@
1
+ .dl-horizontal {
2
+ dd {
3
+ margin-bottom: $padding-base-vertical;
4
+
5
+ &:after {
6
+ clear: none;
7
+ }
8
+ }
9
+ }
10
+
11
+ .dl-invert {
12
+ dt {
13
+ font-weight: normal;
14
+ color: $field_name_color;
15
+ }
16
+ }
17
+
18
+
@@ -10,9 +10,13 @@
10
10
 
11
11
  @import "blacklight/layout";
12
12
  @import "blacklight/header";
13
- @import "blacklight/catalog";
13
+ @import "blacklight/constraints";
14
+ @import "blacklight/controls";
15
+ @import "blacklight/search_results";
16
+ @import "blacklight/pagination";
14
17
  @import "blacklight/group";
15
18
  @import "blacklight/bookmark";
19
+ @import "blacklight/balanced_list";
16
20
  @import "blacklight/facets";
17
21
  @import "blacklight/search_history";
18
22
  @import "blacklight/modal";
@@ -1,8 +1,16 @@
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
- }
5
-
6
1
  .clear-bookmarks {
7
2
  margin-left: $border-radius-base;
8
- }
3
+ }
4
+
5
+ label.toggle_bookmark {
6
+ font-weight: inherit;
7
+ min-width: 8.5em;
8
+ }
9
+
10
+ // Tools link on document show page
11
+ .show-tools {
12
+ .bookmark_toggle {
13
+ padding: $nav-link-padding;
14
+ }
15
+ }
16
+
@@ -0,0 +1,52 @@
1
+ .constraints-container {
2
+ @extend .well;
3
+ line-height: 2.5;
4
+ padding: 16px 19px;
5
+ }
6
+
7
+ span.constraints-label {
8
+ @extend .h5;
9
+ }
10
+
11
+ .appliedFilter {
12
+ .constraint-value {
13
+ cursor: default;
14
+ text-overflow: ellipsis;
15
+ overflow: hidden;
16
+
17
+ @media (max-width: $screen-xs-max) {
18
+ max-width: $screen-xs-min / 2;
19
+ }
20
+
21
+ @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
22
+ max-width: $screen-sm-min / 2;
23
+ }
24
+
25
+ @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
26
+ max-width: $screen-md-min / 2;
27
+ }
28
+
29
+ @media (min-width: $screen-lg-min) {
30
+ max-width: $screen-lg-min / 2;
31
+ }
32
+
33
+ &:hover, &:active {
34
+ background-color: $btn-default-bg;
35
+ border-color: $btn-default-border;
36
+ box-shadow: none;
37
+ }
38
+ }
39
+
40
+ .filterName:after {
41
+ @extend .text-muted;
42
+ font-family: 'Glyphicons Halflings';
43
+ /* glyphicon-chevron-right */
44
+ content: "\e080";
45
+ font-size: 70%;
46
+ padding-left: $caret-width-base;
47
+ }
48
+
49
+ .remove:hover, .remove:active {
50
+ @extend .btn-danger;
51
+ }
52
+ }
@@ -0,0 +1,61 @@
1
+ #sortAndPerPage, .pagination-search-widgets {
2
+ border-bottom: 1px solid $pagination-border;
3
+ margin-bottom: 1em;
4
+ padding-bottom: 1em;
5
+ }
6
+
7
+ .pagination-search-widgets {
8
+ @extend .clearfix;
9
+ padding-top: 1px;
10
+ padding-bottom: $padding-base-vertical;
11
+ }
12
+
13
+ #sortAndPerPage .dropdown-toggle {
14
+ cursor: pointer;
15
+ }
16
+
17
+ .no-js #sortAndPerPage {
18
+ & {
19
+ @extend .clearfix;
20
+ }
21
+ .dropdown-menu {
22
+ background: none;
23
+ box-shadow: none;
24
+ border: none;
25
+ position: relative;
26
+ display: block;
27
+ float: none;
28
+ }
29
+
30
+ }
31
+
32
+ .view-type {
33
+ display: inline-block;
34
+
35
+ .caption {
36
+ @extend .sr-only;
37
+ }
38
+ }
39
+
40
+ #sort-dropdown .dropdown-toggle, #per_page-dropdown .dropdown-toggle {
41
+ color: $link-color;
42
+
43
+ .caret {
44
+ color: $text-color;
45
+ }
46
+ }
47
+
48
+ .search-input-group {
49
+ width: 80%;
50
+ }
51
+
52
+ @media (max-width: $screen-sm-min) {
53
+ .search-input-group {
54
+ width: auto;
55
+ }
56
+ }
57
+
58
+ .ajax_form {
59
+ margin-bottom: 0;
60
+ }
61
+