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.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/.hound.yml +2 -0
- data/.jshintrc +67 -0
- data/.rubocop_hound.yml +4 -0
- data/.travis.yml +11 -8
- data/Gemfile +11 -21
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +1 -0
- data/app/assets/javascripts/blacklight/core.js +5 -19
- data/app/assets/javascripts/blacklight/facet_load.js +23 -0
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +18 -0
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +5 -1
- data/app/assets/stylesheets/blacklight/_bookmark.scss +14 -6
- data/app/assets/stylesheets/blacklight/_constraints.scss +52 -0
- data/app/assets/stylesheets/blacklight/_controls.scss +61 -0
- data/app/assets/stylesheets/blacklight/_facets.scss +31 -4
- data/app/assets/stylesheets/blacklight/_header.scss +17 -3
- data/app/assets/stylesheets/blacklight/_pagination.scss +21 -0
- data/app/assets/stylesheets/blacklight/_search_results.scss +28 -0
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -3
- data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -45
- data/app/controllers/concerns/blacklight/controller.rb +29 -18
- data/app/controllers/concerns/blacklight/default_component_configuration.rb +4 -3
- data/app/controllers/concerns/blacklight/facet.rb +1 -0
- data/app/controllers/concerns/blacklight/request_builders.rb +4 -107
- data/app/controllers/concerns/blacklight/search_fields.rb +1 -1
- data/app/controllers/concerns/blacklight/search_helper.rb +8 -160
- data/app/controllers/saved_searches_controller.rb +1 -1
- data/app/controllers/search_history_controller.rb +18 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +17 -85
- data/app/helpers/blacklight/catalog_helper_behavior.rb +4 -48
- data/app/helpers/blacklight/component_helper_behavior.rb +9 -2
- data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -43
- data/app/helpers/blacklight/facets_helper_behavior.rb +10 -6
- data/app/helpers/blacklight/layout_helper_behavior.rb +0 -8
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -10
- data/app/helpers/blacklight/render_partials_helper.rb +1 -3
- data/app/helpers/blacklight/url_helper_behavior.rb +15 -187
- data/{lib → app/models}/blacklight/abstract_repository.rb +0 -15
- data/{lib → app/models}/blacklight/configuration.rb +22 -59
- data/app/models/blacklight/configuration/context.rb +47 -0
- data/{lib → app/models}/blacklight/configuration/facet_field.rb +1 -0
- data/{lib → app/models}/blacklight/configuration/field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/fields.rb +2 -6
- data/{lib → app/models}/blacklight/configuration/search_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/solr_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/sort_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/tool_config.rb +0 -0
- data/app/models/blacklight/configuration/view_config.rb +9 -0
- data/app/models/blacklight/facet_paginator.rb +14 -28
- data/{lib → app/models}/blacklight/search_builder.rb +16 -24
- data/app/models/blacklight/solr/facet_paginator.rb +6 -2
- data/{lib → app/models}/blacklight/solr/repository.rb +0 -21
- data/{lib → app/models}/blacklight/solr/request.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response.rb +9 -8
- data/{lib → app/models}/blacklight/solr/response/facets.rb +37 -29
- data/{lib → app/models}/blacklight/solr/response/group.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/group_response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/more_like_this.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/pagination_methods.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/spelling.rb +2 -1
- data/{lib → app/models}/blacklight/solr/search_builder.rb +0 -0
- data/app/models/concerns/blacklight/document.rb +11 -27
- data/app/models/concerns/blacklight/document/active_model_shim.rb +8 -0
- data/app/models/concerns/blacklight/solr/document.rb +8 -3
- data/{lib → app/models/concerns}/blacklight/solr/search_builder_behavior.rb +21 -33
- data/app/models/concerns/blacklight/user.rb +0 -9
- data/app/models/record_mailer.rb +0 -1
- data/app/presenters/blacklight/document_presenter.rb +23 -13
- data/app/views/blacklight/nav/_saved_searches.html.erb +1 -1
- data/app/views/blacklight/nav/_search_history.html.erb +1 -1
- data/app/views/bookmarks/_tools.html.erb +1 -2
- data/app/views/bookmarks/index.html.erb +2 -2
- data/app/views/catalog/_document_default.atom.builder +4 -2
- data/app/views/catalog/_facet_index_navigation.html.erb +9 -0
- data/app/views/catalog/_facet_layout.html.erb +2 -3
- data/app/views/catalog/_facet_pagination.html.erb +19 -21
- data/app/views/catalog/_facets.html.erb +2 -3
- data/app/views/catalog/_home_text.html.erb +2 -3
- data/app/views/catalog/_index_header_default.html.erb +2 -2
- data/app/views/catalog/_per_page_widget.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +21 -18
- data/app/views/catalog/_sort_widget.html.erb +1 -1
- data/app/views/catalog/_zero_results.html.erb +2 -2
- data/app/views/catalog/facet.html.erb +3 -0
- data/app/views/catalog/index.atom.builder +1 -1
- data/app/views/layouts/blacklight.html.erb +2 -2
- data/app/views/saved_searches/index.html.erb +6 -7
- data/app/views/search_history/index.html.erb +5 -5
- data/app/views/shared/_header_navbar.html.erb +2 -2
- data/blacklight.gemspec +5 -5
- data/config/locales/blacklight.de.yml +1 -4
- data/config/locales/blacklight.en.yml +2 -7
- data/config/locales/blacklight.es.yml +1 -4
- data/config/locales/blacklight.fr.yml +1 -4
- data/config/locales/blacklight.it.yml +1 -4
- data/config/locales/blacklight.pt-BR.yml +1 -4
- data/config/routes.rb +9 -0
- data/db/migrate/20140202020201_create_searches.rb +1 -1
- data/db/migrate/20140202020202_create_bookmarks.rb +1 -1
- data/lib/blacklight.rb +5 -82
- data/lib/blacklight/engine.rb +0 -5
- data/lib/blacklight/parameters.rb +13 -0
- data/lib/blacklight/path.rb +143 -0
- data/lib/blacklight/routes.rb +3 -134
- data/lib/blacklight/routes/exportable.rb +25 -0
- data/lib/blacklight/routes/searchable.rb +20 -0
- data/lib/blacklight/solr.rb +1 -9
- data/lib/blacklight/utils.rb +2 -44
- data/lib/generators/blacklight/controller_generator.rb +7 -4
- data/lib/generators/blacklight/install_generator.rb +16 -9
- data/lib/generators/blacklight/models_generator.rb +18 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +85 -91
- data/lib/generators/blacklight/test_support_generator.rb +22 -15
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +621 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +391 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/solr/sample_solr_documents.yml +1 -0
- data/spec/controllers/blacklight/base_spec.rb +17 -0
- data/spec/controllers/blacklight/search_helper_spec.rb +25 -297
- data/spec/controllers/catalog_controller_spec.rb +7 -6
- data/spec/controllers/saved_searches_controller_spec.rb +1 -0
- data/spec/controllers/search_history_controller_spec.rb +1 -0
- data/spec/features/alternate_controller_spec.rb +10 -10
- data/spec/features/bookmarks_spec.rb +8 -22
- data/spec/features/facets_spec.rb +27 -7
- data/spec/features/record_view_spec.rb +4 -13
- data/spec/features/search_formats_spec.rb +1 -26
- data/spec/features/sitelinks_search_box.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +8 -38
- data/spec/helpers/catalog_helper_spec.rb +0 -8
- data/spec/helpers/configuration_helper_spec.rb +0 -25
- data/spec/helpers/facets_helper_spec.rb +12 -11
- data/spec/helpers/hash_as_hidden_fields_spec.rb +7 -7
- data/spec/helpers/layout_helper_spec.rb +0 -7
- data/spec/helpers/render_constraints_helper_spec.rb +4 -2
- data/spec/helpers/url_helper_spec.rb +13 -254
- data/spec/lib/blacklight/parameters_spec.rb +22 -0
- data/spec/lib/blacklight/path_spec.rb +254 -0
- data/spec/lib/blacklight_spec.rb +6 -2
- data/spec/models/blacklight/configuration/context_spec.rb +33 -0
- data/spec/models/blacklight/document/active_model_shim_spec.rb +33 -0
- data/spec/models/blacklight/document_spec.rb +29 -1
- data/spec/models/blacklight/facet_paginator_spec.rb +14 -13
- data/spec/models/blacklight/search_builder_spec.rb +17 -23
- data/spec/models/blacklight/solr/facet_paginator_spec.rb +11 -1
- data/spec/models/blacklight/solr/response/facets_spec.rb +19 -25
- data/spec/models/blacklight/solr/response/group_response_spec.rb +5 -5
- data/spec/models/blacklight/solr/response_spec.rb +0 -11
- data/spec/models/blacklight/solr/search_builder_spec.rb +49 -57
- data/spec/presenters/document_presenter_spec.rb +15 -42
- data/spec/routing/catalog_routing_spec.rb +7 -11
- data/spec/spec_helper.rb +4 -42
- data/spec/support/controller_level_helpers.rb +17 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -2
- data/spec/views/_user_util_links.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +40 -0
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facets.html.erb_spec.rb +2 -2
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +8 -8
- data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +2 -2
- data/tasks/blacklight.rake +25 -30
- metadata +93 -71
- data/app/assets/stylesheets/blacklight/_catalog.scss +0 -229
- data/app/controllers/concerns/blacklight/search_history.rb +0 -31
- data/app/views/catalog/_refworks_form.html.erb +0 -6
- data/lib/blacklight/configuration/view_config.rb +0 -71
- data/lib/blacklight/rails/routes.rb +0 -29
- data/lib/blacklight/solr_helper.rb +0 -9
- data/lib/generators/blacklight/templates/config/initializers/blacklight_initializer.rb +0 -9
- data/spec/helpers/component_helper_spec.rb +0 -19
- data/spec/lib/blacklight/routes_spec.rb +0 -25
- data/spec/lib/blacklight/solr_helper_spec.rb +0 -12
- data/spec/routing/routes_spec.rb +0 -20
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c84e27929bc5c308f60b44bf8308bd12fff0f611
|
4
|
+
data.tar.gz: 9fc7f3e715f61d045128e0eade0ee748f933779c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a8e9e76e5bf91d854c742d98d357bd22040e9910661f164ea56ca41494dc28d18878533e71acaa0d29b0a272544f9a27af619b3f0b8cf8ca6da46f8c597f87
|
7
|
+
data.tar.gz: f68961e3673557464a4c67359812097453d707828d020a8cfbd7611a00912cb7c51aa53e80850c04f96bbf0745a3bbac537d7e09f97975dc2d53a803787d6f11
|
data/.gitignore
CHANGED
data/.hound.yml
CHANGED
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
|
11
|
+
- 2.2.3
|
9
12
|
|
10
13
|
matrix:
|
11
14
|
include:
|
12
|
-
- rvm: 2.2.
|
15
|
+
- rvm: 2.2.2
|
13
16
|
env: "RAILS_VERSION=4.1.13"
|
14
|
-
- rvm: 2.1.
|
15
|
-
env: "RAILS_VERSION=4.2.
|
16
|
-
- rvm: jruby-9.0.
|
17
|
-
env: "RAILS_VERSION=4.2.
|
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.
|
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.
|
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',
|
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.
|
17
|
-
# engine_cart stanza: 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(
|
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
|
-
|
40
|
-
|
41
|
-
gem '
|
42
|
-
|
43
|
-
gem '
|
44
|
-
|
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
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
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(
|
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);
|
@@ -10,9 +10,13 @@
|
|
10
10
|
|
11
11
|
@import "blacklight/layout";
|
12
12
|
@import "blacklight/header";
|
13
|
-
@import "blacklight/
|
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
|
+
|