sufia 3.7.2 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +3 -0
- data/README.md +88 -11
- data/SUFIA_VERSION +1 -1
- data/app/assets/images/old_main_tulips.jpg +0 -0
- data/app/assets/javascripts/contact_form.js +0 -16
- data/app/assets/javascripts/jquery.blacklightTagCloud.js +44 -0
- data/app/assets/javascripts/jquery.tagcloud.js +116 -0
- data/app/assets/javascripts/jquery.tinysort.min.js +7 -0
- data/app/assets/javascripts/sufia.js +41 -44
- data/app/assets/javascripts/sufia/edit_metadata.js +1 -1
- data/app/assets/javascripts/sufia/editor.js +12 -0
- data/app/assets/javascripts/sufia/featured_works.js +64 -0
- data/app/assets/javascripts/sufia/fileupload.js +1 -1
- data/app/assets/javascripts/sufia/multiForm.js +1 -1
- data/app/assets/javascripts/sufia/permissions.js +4 -8
- data/app/assets/javascripts/sufia/single_use_link.js +1 -2
- data/app/assets/javascripts/sufia/trophy.js +42 -27
- data/app/assets/javascripts/terms_of_service.js +1 -1
- data/app/assets/stylesheets/dashboard.css.scss +81 -40
- data/app/assets/stylesheets/featured.css.scss +16 -0
- data/app/assets/stylesheets/fileupload/{jquery.fileupload-ui.css → jquery.fileupload-ui.css.erb} +2 -2
- data/app/assets/stylesheets/{generic_files.css → generic_files.css.erb} +6 -7
- data/app/assets/stylesheets/header.css.scss +93 -0
- data/app/assets/stylesheets/home-page.css.scss +50 -0
- data/app/assets/stylesheets/nestable.css.scss +111 -0
- data/app/assets/stylesheets/styles.css.scss +106 -0
- data/app/assets/stylesheets/sufia.css.scss +13 -8
- data/app/assets/stylesheets/tagcloud.css +83 -0
- data/app/assets/stylesheets/usage-stats.css +30 -0
- data/app/controllers/batch_controller.rb +0 -1
- data/app/controllers/concerns/sufia/catalog.rb +64 -0
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +16 -13
- data/app/controllers/content_blocks_controller.rb +8 -0
- data/app/controllers/featured_work_lists_controller.rb +16 -0
- data/app/controllers/featured_works_controller.rb +26 -0
- data/app/controllers/mailbox_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +7 -0
- data/app/controllers/single_use_links_viewer_controller.rb +2 -5
- data/app/controllers/tinymce_assets_controller.rb +12 -0
- data/app/helpers/content_block_helper.rb +21 -0
- data/app/helpers/generic_file_helper.rb +2 -2
- data/app/helpers/sufia_helper.rb +8 -4
- data/app/helpers/trophy_helper.rb +15 -7
- data/app/models/content_block.rb +2 -0
- data/app/models/featured_work_list.rb +42 -0
- data/app/models/tinymce_asset.rb +3 -0
- data/app/uploaders/tinymce_asset_uploader.rb +51 -0
- data/app/views/_add_assets_links.html.erb +0 -16
- data/app/views/_controls.html.erb +17 -0
- data/app/views/_flash_msg.html.erb +2 -18
- data/app/views/_footer.html.erb +10 -15
- data/app/views/_ga.html.erb +0 -16
- data/app/views/_logo.html.erb +2 -2
- data/app/views/_masthead.html.erb +9 -36
- data/app/views/_user_util_links.html.erb +16 -11
- data/app/views/advanced/_advanced_search_facets.html.erb +0 -16
- data/app/views/advanced/_advanced_search_fields.html.erb +0 -16
- data/app/views/advanced/_advanced_search_help.html.erb +0 -16
- data/app/views/advanced/_facet_layout.html.erb +0 -16
- data/app/views/advanced/_facet_limit.html.erb +0 -16
- data/app/views/advanced/index.html.erb +2 -18
- data/app/views/batch/_metadata.html.erb +3 -3
- data/app/views/batch/edit.html.erb +4 -21
- data/app/views/catalog/_facet_limit.html.erb +11 -12
- data/app/views/catalog/_featured_researcher.html.erb +2 -0
- data/app/views/catalog/_home.html.erb +6 -2
- data/app/views/catalog/_home_content.html.erb +36 -0
- data/app/views/catalog/_home_header.html.erb +15 -0
- data/app/views/catalog/_recent_document.html.erb +1 -1
- data/app/views/catalog/_recents.html.erb +3 -4
- data/app/views/catalog/_search_form.html.erb +13 -9
- data/app/views/catalog/_tagcloud.html.erb +7 -0
- data/app/views/catalog/index.html.erb +4 -10
- data/app/views/contact_form/create.html.erb +0 -16
- data/app/views/contact_form/new.html.erb +0 -16
- data/app/views/dashboard/_constraints.html.erb +3 -19
- data/app/views/dashboard/_did_you_mean.html.erb +0 -16
- data/app/views/dashboard/_document_list.html.erb +0 -16
- data/app/views/dashboard/_facet_layout.html.erb +1 -17
- data/app/views/dashboard/_facet_limit.html.erb +5 -5
- data/app/views/dashboard/_facet_selected.html.erb +1 -17
- data/app/views/dashboard/_facets.html.erb +0 -18
- data/app/views/dashboard/_heading.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_default_group.html.erb +7 -23
- data/app/views/dashboard/_index_partials/_list_files.html.erb +62 -57
- data/app/views/dashboard/_search_form.html.erb +10 -7
- data/app/views/dashboard/_show_partials/_default.html.erb +0 -18
- data/app/views/dashboard/_show_partials/_default_details.html.erb +0 -16
- data/app/views/dashboard/_show_partials/_facets.html.erb +0 -16
- data/app/views/dashboard/_sort_and_per_page.html.erb +10 -9
- data/app/views/dashboard/facet.html.erb +4 -19
- data/app/views/dashboard/index.html.erb +27 -49
- data/app/views/error/401.html.erb +1 -17
- data/app/views/error/404.html.erb +0 -16
- data/app/views/error/500.html.erb +0 -16
- data/app/views/error/single_use_error.html.erb +1 -17
- data/app/views/generic_files/_asset_deleted_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_permissions_denial_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_saved_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_updated_flash.html.erb +0 -16
- data/app/views/generic_files/_breadcrumbs.html.erb +0 -16
- data/app/views/generic_files/_browse_everything.html.erb +24 -0
- data/app/views/generic_files/_descriptions.html.erb +1 -1
- data/app/views/generic_files/_field_form.html.erb +5 -5
- data/app/views/generic_files/_media_display.html.erb +3 -3
- data/app/views/generic_files/_permission_form.html.erb +5 -5
- data/app/views/generic_files/_rights_modal.html.erb +13 -29
- data/app/views/generic_files/_show_actions.html.erb +13 -1
- data/app/views/generic_files/_versioning.html.erb +14 -10
- data/app/views/generic_files/citation.html.erb +0 -16
- data/app/views/generic_files/edit.html.erb +10 -12
- data/app/views/generic_files/edit_fields/_default.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_description.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_resource_type.html.erb +2 -3
- data/app/views/generic_files/edit_fields/_rights.html.erb +1 -1
- data/app/views/generic_files/new.html.erb +11 -26
- data/app/views/generic_files/show.html.erb +7 -25
- data/app/views/generic_files/stats.html.erb +141 -0
- data/app/views/homepage/_featured.html.erb +11 -0
- data/app/views/homepage/_featured_fields.html.erb +18 -0
- data/app/views/homepage/_featured_works.html.erb +17 -0
- data/app/views/homepage/_sortable_featured.html.erb +26 -0
- data/app/views/layouts/_head_tag_content.html.erb +1 -1
- data/app/views/layouts/_homepage_sidebar2.html.erb +14 -0
- data/app/views/layouts/error.html.erb +3 -21
- data/app/views/layouts/homepage.html.erb +8 -37
- data/app/views/layouts/sufia-dashboard.html.erb +46 -0
- data/app/views/layouts/sufia-one-column.html.erb +8 -24
- data/app/views/layouts/sufia-two-column.html.erb +9 -8
- data/app/views/pages/show.html.erb +4 -0
- data/app/views/single_use_links_viewer/show.html.erb +2 -2
- data/app/views/static/agreement.html.erb +0 -17
- data/app/views/static/help.html.erb +0 -17
- data/app/views/static/mendeley.html.erb +0 -16
- data/app/views/static/subject_libraries.html.erb +0 -17
- data/app/views/static/terms.html.erb +0 -16
- data/app/views/static/zotero.html.erb +0 -16
- data/app/views/users/_activity_log.html.erb +2 -2
- data/app/views/users/_contributions.html.erb +6 -2
- data/app/views/users/_follower_modal.html.erb +2 -2
- data/app/views/users/_following_modal.html.erb +2 -2
- data/app/views/users/_left_sidebar.html.erb +1 -1
- data/app/views/users/_notify_link.html.erb +1 -1
- data/app/views/users/_notify_number.html.erb +1 -1
- data/app/views/users/_profile_actions.html.erb +3 -3
- data/app/views/users/_profile_tabs.html.erb +1 -1
- data/app/views/users/_search_form.html.erb +3 -2
- data/app/views/users/_social_media_info.html.erb +3 -3
- data/app/views/users/_trophy_edit.html.erb +2 -2
- data/app/views/users/_user_info.html.erb +27 -27
- data/app/views/users/_vitals.html.erb +2 -2
- data/app/views/users/edit.html.erb +39 -39
- data/app/views/users/index.html.erb +3 -3
- data/app/views/users/show.html.erb +7 -9
- data/config/locales/sufia.en.yml +15 -7
- data/config/routes.rb +12 -9
- data/lib/generators/sufia/sufia_generator.rb +18 -15
- data/lib/generators/sufia/templates/catalog_controller.rb +11 -73
- data/lib/generators/sufia/templates/config/tinymce.yml +7 -0
- data/lib/sufia.rb +7 -0
- data/lib/sufia/downloads_controller_behavior.rb +3 -4
- data/lib/sufia/files_controller_behavior.rb +38 -27
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/batch_controller_spec.rb +1 -1
- data/spec/controllers/batch_edits_controller_spec.rb +5 -5
- data/spec/controllers/catalog_controller_spec.rb +37 -58
- data/spec/controllers/content_blocks_controller_spec.rb +37 -0
- data/spec/controllers/downloads_controller_spec.rb +3 -11
- data/spec/controllers/featured_work_lists_controller_spec.rb +20 -0
- data/spec/controllers/featured_works_controller_spec.rb +50 -0
- data/spec/controllers/generic_files_controller_spec.rb +74 -9
- data/spec/controllers/mailbox_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +25 -0
- data/spec/controllers/single_use_links_controller_spec.rb +1 -1
- data/spec/controllers/single_use_links_viewer_controller_spec.rb +1 -1
- data/spec/controllers/tinymce_assets_controller_spec.rb +39 -0
- data/spec/controllers/users_controller_spec.rb +3 -8
- data/spec/factories/content_blocks.rb +4 -0
- data/spec/factories/featured_works.rb +4 -0
- data/spec/factories/generic_files.rb +46 -39
- data/spec/factories/users.rb +18 -18
- data/spec/features/browse_dashboard_files_spec.rb +6 -7
- data/spec/features/browse_files_spec.rb +9 -6
- data/spec/features/cloud_upload_spec.rb +18 -0
- data/spec/features/single_use_links_spec.rb +2 -3
- data/spec/helpers/content_block_helper_spec.rb +31 -0
- data/spec/helpers/generic_file_helper_spec.rb +3 -3
- data/spec/helpers/sufia_helper_spec.rb +13 -81
- data/spec/helpers/trophy_helper_spec.rb +39 -0
- data/spec/jobs/import_url_job_spec.rb +1 -1
- data/spec/jobs/ingest_local_file_job_spec.rb +1 -1
- data/spec/lib/sufia/usage_statistics_spec.rb +75 -0
- data/spec/models/ability_spec.rb +31 -0
- data/spec/models/active_fedora_pid_based_job_spec.rb +1 -1
- data/spec/models/audit_job_spec.rb +1 -1
- data/spec/models/batch_spec.rb +1 -1
- data/spec/models/batch_update_job_spec.rb +1 -1
- data/spec/models/event_jobs_spec.rb +1 -1
- data/spec/models/featured_work_list_spec.rb +23 -0
- data/spec/models/featured_work_spec.rb +42 -0
- data/spec/models/fits_datastream_spec.rb +2 -2
- data/spec/models/generic_file/reload_on_save_spec.rb +1 -1
- data/spec/models/generic_file/web_form_spec.rb +4 -4
- data/spec/models/generic_file_spec.rb +41 -40
- data/spec/models/pageview.rb +19 -0
- data/spec/models/properties_datastream_spec.rb +2 -2
- data/spec/models/solr_document_spec.rb +9 -0
- data/spec/models/user_spec.rb +2 -2
- data/spec/routing/featured_works_route_spec.rb +16 -0
- data/spec/routing/route_spec.rb +10 -15
- data/spec/spec_helper.rb +3 -0
- data/spec/support/lib/generators/test_app_generator.rb +19 -8
- data/spec/views/dashboard/facet_limit.html.erb_spec.rb +2 -2
- data/spec/views/generic_file/show.html.erb_spec.rb +44 -0
- data/spec/views/generic_file/stats.html.erb_spec.rb +47 -0
- data/spec/views/users/_follower_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/_following_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/index.html.erb_spec.rb +1 -1
- data/sufia-models/app/models/batch.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb +30 -0
- data/sufia-models/app/models/concerns/sufia/user.rb +1 -1
- data/sufia-models/app/models/datastreams/batch_rdf_datastream.rb +4 -7
- data/sufia-models/app/models/datastreams/fits_datastream.rb +3 -0
- data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +53 -51
- data/sufia-models/app/models/datastreams/properties_datastream.rb +1 -15
- data/sufia-models/app/models/featured_work.rb +22 -0
- data/sufia-models/app/models/sufia/pageview.rb +9 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/id_service.rb +0 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/noid.rb +0 -0
- data/sufia-models/app/services/sufia/usage_statistics.rb +73 -0
- data/sufia-models/config/locales/sufia.en.yml +3 -4
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +23 -8
- data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +9 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +6 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +11 -2
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +10 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +12 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +8 -0
- data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +19 -0
- data/sufia-models/lib/sufia/ability.rb +34 -0
- data/sufia-models/lib/sufia/models/engine.rb +5 -3
- data/sufia-models/lib/sufia/models/generic_file.rb +4 -2
- data/sufia-models/lib/sufia/models/generic_file/export.rb +3 -3
- data/sufia-models/lib/sufia/models/generic_file/featured.rb +14 -0
- data/sufia-models/lib/sufia/models/solr_document_behavior.rb +11 -4
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +6 -5
- data/sufia.gemspec +6 -4
- data/tasks/release.rake +1 -0
- data/tasks/sufia-dev.rake +5 -1
- data/vendor/assets/javascripts/flot/excanvas.js +1428 -0
- data/vendor/assets/javascripts/flot/jquery.flot.js +3137 -0
- data/vendor/assets/javascripts/flot/jquery.flot.selection.js +360 -0
- data/vendor/assets/javascripts/flot/jquery.flot.time.js +431 -0
- data/vendor/assets/javascripts/nestable.js +647 -0
- data/vendor/assets/javascripts/video.js +135 -126
- data/{app → vendor}/assets/stylesheets/video-js.css.erb +7 -6
- metadata +155 -33
- data/app/assets/stylesheets/application-bootstrap.css.erb +0 -295
- data/app/assets/stylesheets/audio-js.css +0 -3
- data/app/assets/stylesheets/blacklight_more_facets.css +0 -427
- data/app/assets/stylesheets/bootstrap.min.css.erb +0 -1433
- data/app/assets/stylesheets/contact_form.css +0 -4
- data/app/assets/stylesheets/reset_body.css +0 -4
- data/app/assets/stylesheets/trophy.css +0 -7
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +0 -84
- data/app/helpers/facets_helper.rb +0 -3
- data/app/helpers/sufia/facets_helper_behavior.rb +0 -23
- data/app/views/catalog/_home_text.html.erb +0 -10
- data/app/views/generic_files/_dropbox_import.html.erb +0 -3
- data/app/views/generic_files/upload/_dropbox_chooser.html.erb +0 -39
- data/app/views/static/about.html.erb +0 -21
- data/spec/helpers/render_constraints_helper_behavior_spec.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c16d96868814166f2c0475ce38bd6da8e5f3193
|
4
|
+
data.tar.gz: b77646cded22e7a995937bb92df35d437f24e59d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c6f2849a8b5589d25862010da85d8bb22f0c63252694b6f4810f52c89f911970e46958b8056edea4bc9aac0d1f9a21348c7dc4e93c262f04ab627441c46163
|
7
|
+
data.tar.gz: e98491c8e9502bd04ff101db715fb4c9e3ef37a05dde8330699e119341b4083258736a6240d088cc89e4aaab7f7fa8531b735ed0fcbc27f4f6008552cde0b329
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -6,11 +6,14 @@ gemspec
|
|
6
6
|
# Required for doing pagination inside an engine. See https://github.com/amatsuda/kaminari/pull/322
|
7
7
|
gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype'
|
8
8
|
gem 'sufia-models', path: './sufia-models'
|
9
|
+
gem 'sass', '~> 3.2.15'
|
10
|
+
gem 'sprockets', '~> 2.11.0'
|
9
11
|
|
10
12
|
group :development, :test do
|
11
13
|
gem 'sqlite3'
|
12
14
|
gem 'rspec-rails'
|
13
15
|
gem 'launchy' unless ENV['TRAVIS']
|
16
|
+
gem 'byebug' unless ENV['TRAVIS']
|
14
17
|
gem 'capybara'
|
15
18
|
gem "jettywrapper"
|
16
19
|
gem "factory_girl_rails"
|
data/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# Sufia [![Version](https://badge.fury.io/rb/sufia.png)](http://badge.fury.io/rb/sufia) [![Build Status](https://travis-ci.org/projecthydra/sufia.png?branch=master)](https://travis-ci.org/projecthydra/sufia) [![Dependency Status](https://gemnasium.com/projecthydra/sufia.png)](https://gemnasium.com/projecthydra/sufia)
|
2
2
|
|
3
3
|
## What is Sufia?
|
4
|
-
Sufia is a component that adds self-deposit institutional repository features to a Rails app.
|
4
|
+
Sufia is a component that adds self-deposit institutional repository features to a Rails app.
|
5
5
|
Sufia is created with Ruby on Rails and builds on the Hydra Framework.
|
6
6
|
|
7
7
|
Sufia has the following features:
|
8
8
|
|
9
9
|
* Multiple file, or folder, upload
|
10
10
|
* Flexible user- and group-based access controls
|
11
|
-
* Transcoding of audio and video files
|
11
|
+
* Transcoding of audio and video files
|
12
12
|
* Generation and validation of identifiers
|
13
13
|
* Fixity checking
|
14
14
|
* Version control
|
@@ -24,6 +24,7 @@ Sufia has the following features:
|
|
24
24
|
* Activity streams
|
25
25
|
* Background jobs
|
26
26
|
* Single-use links
|
27
|
+
* Usage statistics
|
27
28
|
|
28
29
|
## Sufia needs the following software to work:
|
29
30
|
1. Solr
|
@@ -42,11 +43,10 @@ Sufia has the following features:
|
|
42
43
|
```
|
43
44
|
gem 'sufia'
|
44
45
|
gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype' # required to handle pagination properly in dashboard. See https://github.com/amatsuda/kaminari/pull/322
|
45
|
-
gem 'font-awesome-sass-rails'
|
46
46
|
```
|
47
47
|
Then `bundle install`
|
48
48
|
|
49
|
-
Note the line with kaminari listed as a dependency. This is a temporary fix to address a problem in the current release of kaminari.
|
49
|
+
Note the line with kaminari listed as a dependency. This is a temporary fix to address a problem in the current release of kaminari. Technically you should not have to list kaminari, which is a dependency of blacklight and sufia.
|
50
50
|
|
51
51
|
### Run the sufia generator
|
52
52
|
```
|
@@ -66,18 +66,17 @@ rake jetty:config
|
|
66
66
|
rake jetty:start
|
67
67
|
```
|
68
68
|
|
69
|
-
###
|
69
|
+
### To use the CSS and JavaScript and other assets that ship with Sufia...
|
70
|
+
|
70
71
|
#### Modify app/assets/stylesheets/application.css
|
71
72
|
Add this line:
|
72
73
|
```
|
73
74
|
*= require sufia
|
74
75
|
```
|
75
|
-
**Remove** this line:
|
76
|
-
```*= require_tree .```
|
77
|
-
|
78
|
-
_Removing the require_tree from application.css will ensure you're not loading the blacklight.css. This is because blacklight's css styling does not mix well with sufia's default styling._
|
79
|
-
|
76
|
+
**Remove** this line:
|
77
|
+
```*= require_tree .```
|
80
78
|
|
79
|
+
_Removing the require_tree from application.css will ensure you're not loading the blacklight.css. This is because blacklight's css styling does not mix well with sufia's default styling._
|
81
80
|
#### Modify app/assets/javascripts/application.js
|
82
81
|
|
83
82
|
Add this line:
|
@@ -92,6 +91,69 @@ Add this line:
|
|
92
91
|
|
93
92
|
Turbolinks does not mix well with Blacklight.
|
94
93
|
|
94
|
+
### Usage statistics
|
95
|
+
|
96
|
+
Sufia provides support for capturing usage information via Google Analytics and for displaying usage stats in the UI.
|
97
|
+
|
98
|
+
#### Capturing usage
|
99
|
+
|
100
|
+
To enable the Google Analytics javascript snippet, make sure that `config.google_analytics_id` is set in your app within the `config/initializers/sufia.rb` file. A Google Analytics ID typically looks like _UA-99999999-1_.
|
101
|
+
|
102
|
+
#### Displaying usage
|
103
|
+
|
104
|
+
To display usage statistics in the UI, first head to the Google Developers Console and create a new project:
|
105
|
+
|
106
|
+
https://console.developers.google.com/project
|
107
|
+
|
108
|
+
Let's assume for now Google assigns it a project ID of _foo-bar-123_. It may take a few seconds for this to complete (watch the Activities bar near the bottom of the browser). Once it's complete, enable the Google+ and Google Analytics APIs here (note: this is an example URL -- you'll have to change the project ID to match yours):
|
109
|
+
|
110
|
+
https://console.developers.google.com/project/apps~foo-bar-123/apiui/api
|
111
|
+
|
112
|
+
Finally, head to this URL (note: this is an example URL -- you'll have to change the project ID to match yours):
|
113
|
+
|
114
|
+
https://console.developers.google.com/project/apps~foo-bar-537/apiui/credential
|
115
|
+
|
116
|
+
And create a new OAuth client ID. When prompted for the type, use the "Service Account" type. This will give you the OAuth client ID, a client email address, a private key file, a private key secret/password, which you will need in the next step.
|
117
|
+
|
118
|
+
Then run this generator:
|
119
|
+
|
120
|
+
```
|
121
|
+
rails g sufia:models:usagestats
|
122
|
+
```
|
123
|
+
|
124
|
+
The generator will create a configuration file at _config/analytics.yml_. Edit that file to reflect the information that the Google Developer Console gave you earlier, namely you'll need to provide it:
|
125
|
+
|
126
|
+
* The path to the private key
|
127
|
+
* The password/secret for the privatekey
|
128
|
+
* The OAuth client email
|
129
|
+
* An application name (you can make this up)
|
130
|
+
* An application version (you can make this up)
|
131
|
+
|
132
|
+
Finally, you will need to set `config.usage_statistics = true` in _config/initializers/sufia.rb_.
|
133
|
+
|
134
|
+
### To use browse-everything
|
135
|
+
|
136
|
+
Sufia provides built-in support for the [browse-everything](https://github.com/projecthydra/browse-everything) gem, which provides a consolidated file picker experience for selecting files from [DropBox](http://www.dropbox.com),
|
137
|
+
[Skydrive](https://skydrive.live.com/), [Google Drive](http://drive.google.com),
|
138
|
+
[Box](http://www.box.com), and a server-side directory share.
|
139
|
+
|
140
|
+
To activate browse-everything in your sufia app, run the browse-everything config generator
|
141
|
+
|
142
|
+
```
|
143
|
+
rails g browse_everything:config
|
144
|
+
```
|
145
|
+
|
146
|
+
This will generate a file at _config/browse_everything_providers.yml_. Open that file and enter the API keys for the providers that you want to support in your app. For more info on configuring browse-everything, go to the [project page](https://github.com/projecthydra/browse-everything) on github.
|
147
|
+
|
148
|
+
After running the browse-everything config generator and setting the API keys for the desired providers, an extra tab will appear in your app's Upload page allowing users to pick files from those providers and submit them into your app's repository.
|
149
|
+
|
150
|
+
*Note*: If you want to use the built-in browse-everything support, _you need to include the browse-everything css and javascript files_. If you already included the sufia css and javascript (see [above](#if-you-want-to-use-the-css-and-javascript-and-other-assets-that-ship-with-sufia)), then you don't need to do anything. Otherwise, follow the instructions in the [browse-everything README page](https://github.com/projecthydra/browse-everything)
|
151
|
+
|
152
|
+
*If your config/initializers/sufia.rb was generated with sufia 3.7.2 or older*, then you need to add this line to an initializer (probably _config/initializers/sufia.rb _):
|
153
|
+
```ruby
|
154
|
+
config.browse_everything = BrowseEverything.config
|
155
|
+
```
|
156
|
+
|
95
157
|
### Install Fits.sh
|
96
158
|
1. Go to http://code.google.com/p/fits/downloads/list and download a copy of fits & unpack it somewhere on your machine. You can also install fits on OSX with homebrew `brew install fits` (you may also have to create a symlink from `fits.sh -> fits` in the next step).
|
97
159
|
1. Give your system access to fits
|
@@ -124,6 +186,21 @@ Use homebrew:
|
|
124
186
|
```
|
125
187
|
brew install ffmpeg --with-fdk-aac --with-libvpx --with-libvorbis
|
126
188
|
```
|
189
|
+
### Tag Cloud
|
190
|
+
Sufia provides a tag cloud on the home page. To change which field is displayed in that cloud, change the value of `config.tag_cloud_field_name` in the `blacklight_config` section of your CatalogController. For example:
|
191
|
+
```ruby
|
192
|
+
configure_blacklight do |config|
|
193
|
+
...
|
194
|
+
|
195
|
+
# Specify which field to use in the tag cloud on the homepage.
|
196
|
+
# To disable the tag cloud, comment out this line.
|
197
|
+
config.tag_cloud_field_name = Solrizer.solr_name("desc_metadata__tag", :facetable)
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
If your CatalogController was generated by a version of sufia older than 3.7.3 you need to add that line to the blacklight configuration in order to make the tag cloud appear.
|
202
|
+
|
203
|
+
The contents of the cloud are retrieved as JSON from Blacklight's CatalogController#facet method. If you need to change how that content is returned (ie. if you need to limit the number of results), override the `render_facet_list_as_json` method in your CatalogController.
|
127
204
|
|
128
205
|
#### On Ubuntu Linux
|
129
206
|
See https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
|
@@ -131,7 +208,7 @@ See https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
|
|
131
208
|
## Developers:
|
132
209
|
This information is for people who want to modify the engine itself, not an application that uses the engine:
|
133
210
|
|
134
|
-
|
211
|
+
### run the tests
|
135
212
|
rake clean spec
|
136
213
|
```
|
137
214
|
|
data/SUFIA_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4.0.0.beta1
|
Binary file
|
@@ -1,18 +1,2 @@
|
|
1
|
-
/*
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
1
|
// Place all the behaviors and hooks related to the matching controller here.
|
18
2
|
// All this logic will automatically be available in application.js.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
//= require jquery.tagcloud
|
2
|
+
//= require jquery.tinysort.min
|
3
|
+
|
4
|
+
(function( $ ){
|
5
|
+
|
6
|
+
// Loads facet values for the facet specified in data-facet attribute
|
7
|
+
// Displays the results as a tag cloud
|
8
|
+
// Passes all options through to the tagcloud jquery plugin. See https://github.com/addywaddy/jquery.tagcloud.js for options.
|
9
|
+
$.fn.blacklightTagCloud = function( options ) {
|
10
|
+
// Create some defaults, extending them with any options that were provided
|
11
|
+
var settings = $.extend( { }, options);
|
12
|
+
|
13
|
+
var $container = this;
|
14
|
+
|
15
|
+
return this.each(function() {
|
16
|
+
var facet_name = $(this).data("facet");
|
17
|
+
var $tagCloud = $(this)
|
18
|
+
$.ajax({url:"/catalog/facet/"+facet_name+".json"}).done(function(data) {
|
19
|
+
data.response.facets.items.map(function(item) {
|
20
|
+
$tagCloud.append('<li rel="'+item.hits+'" title="'+item.value+'"><a href="/?f['+facet_name+'][]='+item.value+'">'+item.value+'</a><span class="badge facet-count">'+item.hits+'</span></li>');
|
21
|
+
});
|
22
|
+
$tagCloud.tagcloud(options);
|
23
|
+
$tagCloud.children().tsort({attr:'title', order:'asc'});
|
24
|
+
});
|
25
|
+
$tagCloud.siblings('.tag-toggle-list').each(function() {
|
26
|
+
var $toggle = $(this)
|
27
|
+
$toggle.click(function() {
|
28
|
+
$tagCloud.toggleClass("list");
|
29
|
+
$toggle.text( $toggle.text()=="Cloud"?"List":"Cloud");
|
30
|
+
});
|
31
|
+
});
|
32
|
+
$tagCloud.siblings('.tag-sort').children().each(function() {
|
33
|
+
var $btn = $(this)
|
34
|
+
if ($btn.hasClass('tag-sort-az')) { var opts = {attr:'title', order:'asc'} }
|
35
|
+
else if ($btn.hasClass('tag-sort-za')) { var opts = {attr:'title', order:'desc'} }
|
36
|
+
else if ($btn.hasClass('tag-sort-numerical')) { var opts = {attr:'rel', order:'desc'} }
|
37
|
+
if (opts) {
|
38
|
+
$btn.click(function() { $tagCloud.children().tsort(opts); });
|
39
|
+
};
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
};
|
44
|
+
})( jQuery );
|
@@ -0,0 +1,116 @@
|
|
1
|
+
/*!
|
2
|
+
* flyingzumwalt: jquery.tagcloud.js v. 0.1.0
|
3
|
+
* (contains modifications for use in projecthydra/sufia)
|
4
|
+
*
|
5
|
+
* Forked from:
|
6
|
+
*
|
7
|
+
* jquery.tagcloud.js
|
8
|
+
* A Simple Tag Cloud Plugin for JQuery
|
9
|
+
*
|
10
|
+
* https://github.com/addywaddy/jquery.tagcloud.js
|
11
|
+
* created by Adam Groves
|
12
|
+
*/
|
13
|
+
(function($) {
|
14
|
+
|
15
|
+
/*global jQuery*/
|
16
|
+
"use strict";
|
17
|
+
|
18
|
+
var compareWeights = function(a, b)
|
19
|
+
{
|
20
|
+
return a - b;
|
21
|
+
};
|
22
|
+
|
23
|
+
// Converts hex to an RGB array
|
24
|
+
var toRGB = function(code) {
|
25
|
+
if (code.length === 4) {
|
26
|
+
code = code.replace(/(\w)(\w)(\w)/gi, "\$1\$1\$2\$2\$3\$3");
|
27
|
+
}
|
28
|
+
var hex = /(\w{2})(\w{2})(\w{2})/.exec(code);
|
29
|
+
return [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)];
|
30
|
+
};
|
31
|
+
|
32
|
+
// Converts an RGB array to hex
|
33
|
+
var toHex = function(ary) {
|
34
|
+
return "#" + jQuery.map(ary, function(i) {
|
35
|
+
var hex = i.toString(16);
|
36
|
+
hex = (hex.length === 1) ? "0" + hex : hex;
|
37
|
+
return hex;
|
38
|
+
}).join("");
|
39
|
+
};
|
40
|
+
|
41
|
+
var colorIncrement = function(color, range) {
|
42
|
+
return jQuery.map(toRGB(color.end), function(n, i) {
|
43
|
+
return (n - toRGB(color.start)[i])/range;
|
44
|
+
});
|
45
|
+
};
|
46
|
+
|
47
|
+
var tagColor = function(color, increment, weighting) {
|
48
|
+
var rgb = jQuery.map(toRGB(color.start), function(n, i) {
|
49
|
+
var ref = Math.round(n + (increment[i] * weighting));
|
50
|
+
if (ref > 255) {
|
51
|
+
ref = 255;
|
52
|
+
} else {
|
53
|
+
if (ref < 0) {
|
54
|
+
ref = 0;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
return ref;
|
58
|
+
});
|
59
|
+
return toHex(rgb);
|
60
|
+
};
|
61
|
+
|
62
|
+
// Scales the value according to the preferred granularity based on the max value for the scale
|
63
|
+
// Assumes an inverted scale, where 1 corresponds to the highest values.
|
64
|
+
// This is useful for generating css styles corresponding to scaled values
|
65
|
+
// (ie. weight-1 for largest values, weight-15 for smallest values)
|
66
|
+
// Examples:
|
67
|
+
// scaleValue(322,322,15) => 1
|
68
|
+
// scaleValue(250,322,15) => 4
|
69
|
+
// scaleValue(75,322,15) => 12
|
70
|
+
// scaleValue(5,322,15) => 15
|
71
|
+
// scaleValue(2,322,15) => 15
|
72
|
+
var scaleValue = function(value, max, granularity) {
|
73
|
+
var scaleFactor = ((granularity-1)/max)
|
74
|
+
return granularity - Math.round(value*scaleFactor)
|
75
|
+
}
|
76
|
+
|
77
|
+
$.fn.tagcloud = function(options) {
|
78
|
+
|
79
|
+
var opts = $.extend({}, $.fn.tagcloud.defaults, options);
|
80
|
+
var tagWeights = this.children().map(function(idx, item){
|
81
|
+
return $(item).attr("rel")
|
82
|
+
});
|
83
|
+
tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights);
|
84
|
+
var lowest = tagWeights[0];
|
85
|
+
var highest = tagWeights.pop();
|
86
|
+
var range = highest - lowest;
|
87
|
+
if(range === 0) {range = 1;}
|
88
|
+
// Sizes
|
89
|
+
var fontIncr, colorIncr;
|
90
|
+
if (opts.size) {
|
91
|
+
fontIncr = (opts.size.end - opts.size.start)/range;
|
92
|
+
}
|
93
|
+
// Colors
|
94
|
+
if (opts.color) {
|
95
|
+
colorIncr = colorIncrement (opts.color, range);
|
96
|
+
}
|
97
|
+
return this.children().each(function() {
|
98
|
+
var weighting = $(this).attr("rel") - lowest;
|
99
|
+
if (opts.size) {
|
100
|
+
$(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit});
|
101
|
+
}
|
102
|
+
if (opts.color) {
|
103
|
+
$(this).css({"color": tagColor(opts.color, colorIncr, weighting)});
|
104
|
+
}
|
105
|
+
if (opts.cssHooks) {
|
106
|
+
$(this).addClass("weight-"+scaleValue($(this).attr("rel"), highest, opts.cssHooks.granularity))
|
107
|
+
}
|
108
|
+
});
|
109
|
+
};
|
110
|
+
|
111
|
+
$.fn.tagcloud.defaults = {
|
112
|
+
// size: {start: 0.9, end: 2.5, unit: "em"},
|
113
|
+
cssHooks: {granularity: 15}
|
114
|
+
};
|
115
|
+
|
116
|
+
})(jQuery);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*! TinySort 1.5.6
|
2
|
+
* Copyright (c) 2008-2013 Ron Valstar http://tinysort.sjeiti.com/
|
3
|
+
* License:
|
4
|
+
* MIT: http://www.opensource.org/licenses/mit-license.php
|
5
|
+
* GPL: http://www.gnu.org/licenses/gpl.html
|
6
|
+
*/
|
7
|
+
!function(a,b){"use strict";function c(a){return a&&a.toLowerCase?a.toLowerCase():a}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]==b)return!e;return e}var e=!1,f=null,g=parseFloat,h=Math.min,i=/(-?\d+\.?\d*)$/g,j=/(\d+\.?\d*)$/g,k=[],l=[],m=function(a){return"string"==typeof a},n=function(a,b){for(var c,d=a.length,e=d;e--;)c=d-e-1,b(a[c],c)},o=Array.prototype.indexOf||function(a){var b=this.length,c=Number(arguments[1])||0;for(c=0>c?Math.ceil(c):Math.floor(c),0>c&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1};a.tinysort={id:"TinySort",version:"1.5.6",copyright:"Copyright (c) 2008-2013 Ron Valstar",uri:"http://tinysort.sjeiti.com/",licensed:{MIT:"http://www.opensource.org/licenses/mit-license.php",GPL:"http://www.gnu.org/licenses/gpl.html"},plugin:function(){var a=function(a,b){k.push(a),l.push(b)};return a.indexOf=o,a}(),defaults:{order:"asc",attr:f,data:f,useVal:e,place:"start",returns:e,cases:e,forceStrings:e,ignoreDashes:e,sortFunction:f}},a.fn.extend({tinysort:function(){var p,q,r,s,t=this,u=[],v=[],w=[],x=[],y=0,z=[],A=[],B=function(a){n(k,function(b){b.call(b,a)})},C=function(a,b){return"string"==typeof b&&(a.cases||(b=c(b)),b=b.replace(/^\s*(.*?)\s*$/i,"$1")),b},D=function(a,b){var c=0;for(0!==y&&(y=0);0===c&&s>y;){var d=x[y],f=d.oSettings,h=f.ignoreDashes?j:i;if(B(f),f.sortFunction)c=f.sortFunction(a,b);else if("rand"==f.order)c=Math.random()<.5?1:-1;else{var k=e,o=C(f,a.s[y]),p=C(f,b.s[y]);if(!f.forceStrings){var q=m(o)?o&&o.match(h):e,r=m(p)?p&&p.match(h):e;if(q&&r){var t=o.substr(0,o.length-q[0].length),u=p.substr(0,p.length-r[0].length);t==u&&(k=!e,o=g(q[0]),p=g(r[0]))}}c=d.iAsc*(p>o?-1:o>p?1:0)}n(l,function(a){c=a.call(a,k,o,p,c)}),0===c&&y++}return c};for(p=0,r=arguments.length;r>p;p++){var E=arguments[p];m(E)?z.push(E)-1>A.length&&(A.length=z.length-1):A.push(E)>z.length&&(z.length=A.length)}for(z.length>A.length&&(A.length=z.length),s=z.length,0===s&&(s=z.length=1,A.push({})),p=0,r=s;r>p;p++){var F=z[p],G=a.extend({},a.tinysort.defaults,A[p]),H=!(!F||""===F),I=H&&":"===F[0];x.push({sFind:F,oSettings:G,bFind:H,bAttr:!(G.attr===f||""===G.attr),bData:G.data!==f,bFilter:I,$Filter:I?t.filter(F):t,fnSort:G.sortFunction,iAsc:"asc"==G.order?1:-1})}return t.each(function(c,d){var e,f=a(d),g=f.parent().get(0),h=[];for(q=0;s>q;q++){var i=x[q],j=i.bFind?i.bFilter?i.$Filter.filter(d):f.find(i.sFind):f;h.push(i.bData?j.data(i.oSettings.data):i.bAttr?j.attr(i.oSettings.attr):i.oSettings.useVal?j.val():j.text()),e===b&&(e=j)}var k=o.call(w,g);0>k&&(k=w.push(g)-1,v[k]={s:[],n:[]}),e.length>0?v[k].s.push({s:h,e:f,n:c}):v[k].n.push({e:f,n:c})}),n(v,function(a){a.s.sort(D)}),n(v,function(a){var b=a.s,c=a.n,f=b.length,g=c.length,i=f+g,j=[],k=i,l=[0,0];switch(G.place){case"first":n(b,function(a){k=h(k,a.n)});break;case"org":n(b,function(a){j.push(a.n)});break;case"end":k=g;break;default:k=0}for(p=0;i>p;p++){var m=d(j,p)?!e:p>=k&&k+f>p,o=m?0:1,q=(m?b:c)[l[o]].e;q.parent().append(q),(m||!G.returns)&&u.push(q.get(0)),l[o]++}}),t.length=0,Array.prototype.push.apply(t,u),t}}),a.fn.TinySort=a.fn.Tinysort=a.fn.tsort=a.fn.tinysort}(jQuery);
|
@@ -1,19 +1,3 @@
|
|
1
|
-
/*
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
1
|
//= require jquery-ui-1.9.2/jquery.ui.core
|
18
2
|
//= require jquery-ui-1.9.2/jquery.ui.widget
|
19
3
|
//= require jquery-ui-1.9.2/jquery.ui.menu
|
@@ -22,13 +6,13 @@ limitations under the License.
|
|
22
6
|
//= require jquery-ui-1.9.2/jquery.ui.effect
|
23
7
|
//= require jquery-ui-1.9.2/jquery.ui.effect-highlight
|
24
8
|
|
25
|
-
//= require bootstrap
|
26
|
-
//= require bootstrap
|
27
|
-
//= require bootstrap
|
28
|
-
//= require bootstrap
|
29
|
-
//= require bootstrap
|
30
|
-
//= require bootstrap
|
31
|
-
//= require bootstrap
|
9
|
+
//= require bootstrap/dropdown
|
10
|
+
//= require bootstrap/button
|
11
|
+
//= require bootstrap/modal
|
12
|
+
//= require bootstrap/collapse
|
13
|
+
//= require bootstrap/tooltip
|
14
|
+
//= require bootstrap/popover
|
15
|
+
//= require bootstrap/tab
|
32
16
|
|
33
17
|
//= require video
|
34
18
|
//= require audio.min
|
@@ -36,18 +20,28 @@ limitations under the License.
|
|
36
20
|
//= require swfobject
|
37
21
|
//= require ZeroClipboard.min
|
38
22
|
|
23
|
+
//= require flot/excanvas
|
24
|
+
//= require flot/jquery.flot
|
25
|
+
//= require flot/jquery.flot.time
|
26
|
+
//= require flot/jquery.flot.selection
|
27
|
+
|
39
28
|
//= require batch_edit
|
40
29
|
//= require terms_of_service
|
41
30
|
//= require sufia/fileupload
|
42
31
|
//= require sufia/permissions
|
43
32
|
//= require sufia/trophy
|
33
|
+
//= require sufia/featured_works
|
44
34
|
//= require sufia/batch_select_all
|
45
35
|
//= require sufia/multiForm
|
46
36
|
//= require sufia/edit_metadata
|
47
37
|
//= require sufia/single_use_link
|
48
38
|
//= require sufia/audio
|
39
|
+
//= require sufia/editor
|
49
40
|
//= require hydra/batch_select
|
50
41
|
//= require hydra_collections
|
42
|
+
//= require browse_everything
|
43
|
+
//= require jquery.blacklightTagCloud
|
44
|
+
//= require nestable
|
51
45
|
|
52
46
|
// this needs to be after batch_select so that the form ids get setup correctly
|
53
47
|
//= require sufia/batch_edit
|
@@ -69,8 +63,7 @@ function notify_update_link() {
|
|
69
63
|
$('#notify_update_link').click();
|
70
64
|
}
|
71
65
|
|
72
|
-
|
73
|
-
$(function() {
|
66
|
+
Blacklight.onLoad(function() {
|
74
67
|
|
75
68
|
// set up global batch edit options to override the ones in the gem
|
76
69
|
window.batch_edits_options = { checked_label: "",unchecked_label: "",progress_label: "",status_label: "",css_class: "batch_toggle"};
|
@@ -99,18 +92,14 @@ $(function() {
|
|
99
92
|
|
100
93
|
// show/hide more information on the dashboard when clicking
|
101
94
|
// plus/minus
|
102
|
-
$('.
|
95
|
+
$('.glyphicon-plus').on('click', function() {
|
96
|
+
var button = $(this);
|
103
97
|
//this.id format: "expand_NNNNNNNNNN"
|
104
|
-
var
|
105
|
-
if (
|
106
|
-
var docId =
|
107
|
-
$("#detail_"+docId).
|
108
|
-
|
109
|
-
$("#expand_"+docId).attr("class", "icon-plus icon-large");
|
110
|
-
}
|
111
|
-
else {
|
112
|
-
$("#expand_"+docId).attr("class", "icon-minus icon-large");
|
113
|
-
}
|
98
|
+
var array = this.id.split("expand_");
|
99
|
+
if (array.length > 1) {
|
100
|
+
var docId = array[1];
|
101
|
+
$("#detail_" + docId + " .expanded-details").slideToggle();
|
102
|
+
button.toggleClass('glyphicon-plus glyphicon-minus');
|
114
103
|
}
|
115
104
|
return false;
|
116
105
|
});
|
@@ -123,6 +112,14 @@ $(function() {
|
|
123
112
|
|
124
113
|
$("a[rel=popover]").click(function() { return false;});
|
125
114
|
|
115
|
+
/*
|
116
|
+
* Tag cloud(s)
|
117
|
+
*/
|
118
|
+
$(".tagcloud").blacklightTagCloud({
|
119
|
+
size: {start: 0.9, end: 2.5, unit: 'em'},
|
120
|
+
cssHooks: {granularity: 15},
|
121
|
+
// color: {start: '#cde', end: '#f52'}
|
122
|
+
});
|
126
123
|
|
127
124
|
|
128
125
|
/*
|
@@ -140,28 +137,28 @@ $(function() {
|
|
140
137
|
$(".sorts-dash").click(function(){
|
141
138
|
var itag =$(this).find('i');
|
142
139
|
toggle_icon(itag);
|
143
|
-
sort = itag.attr('class') == "
|
140
|
+
sort = itag.attr('class') == "caret" ? itag.attr('id')+' desc' : itag.attr('id') +' asc';
|
144
141
|
$('#sort').val(sort).selected = true;
|
145
|
-
$("
|
142
|
+
$("#dashboard_sort_submit").click();
|
146
143
|
});
|
144
|
+
|
147
145
|
$(".sorts").click(function(){
|
148
146
|
var itag =$(this).find('i');
|
149
147
|
toggle_icon(itag);
|
150
|
-
sort = itag.attr('class') == "
|
148
|
+
sort = itag.attr('class') == "caret up" ? itag.attr('id')+' desc': itag.attr('id');
|
151
149
|
$('input[name="sort"]').attr('value', sort);
|
152
|
-
$("
|
150
|
+
$("#user_submit").click();
|
153
151
|
});
|
154
|
-
}); //closing function at the top of the page
|
155
|
-
|
156
152
|
|
153
|
+
}); //closing function at the top of the page
|
157
154
|
|
158
155
|
/*
|
159
156
|
* begin functions
|
160
157
|
*/
|
161
158
|
|
162
159
|
function toggle_icon(itag){
|
163
|
-
itag.toggleClass("
|
164
|
-
itag.toggleClass("
|
160
|
+
itag.toggleClass("caret");
|
161
|
+
itag.toggleClass("caret up");
|
165
162
|
}
|
166
163
|
|
167
164
|
function preg_quote( str ) {
|