iqvoc 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +69 -0
- data/Gemfile.lock +134 -0
- data/LICENSE +13 -0
- data/README.md +68 -0
- data/Rakefile +23 -0
- data/app/controllers/application_controller.rb +125 -0
- data/app/controllers/collections/hierarchical_controller.rb +44 -0
- data/app/controllers/collections_controller.rb +124 -0
- data/app/controllers/concepts/alphabetical_controller.rb +39 -0
- data/app/controllers/concepts/hierarchical_controller.rb +74 -0
- data/app/controllers/concepts/untranslated_controller.rb +38 -0
- data/app/controllers/concepts/versions_controller.rb +119 -0
- data/app/controllers/concepts_controller.rb +174 -0
- data/app/controllers/dashboard_controller.rb +43 -0
- data/app/controllers/pages_controller.rb +22 -0
- data/app/controllers/rdf_controller.rb +43 -0
- data/app/controllers/search_results_controller.rb +101 -0
- data/app/controllers/triple_store_syncs_controller.rb +45 -0
- data/app/controllers/user_sessions_controller.rb +48 -0
- data/app/controllers/users_controller.rb +81 -0
- data/app/helpers/application_helper.rb +60 -0
- data/app/helpers/concepts_helper.rb +86 -0
- data/app/helpers/dashboard_helper.rb +46 -0
- data/app/helpers/rdf_helper.rb +63 -0
- data/app/helpers/search_results_helper.rb +32 -0
- data/app/models/collection/base.rb +161 -0
- data/app/models/collection/member/base.rb +23 -0
- data/app/models/collection/member/collection.rb +33 -0
- data/app/models/collection/member/concept.rb +33 -0
- data/app/models/collection/unordered.rb +18 -0
- data/app/models/concept/base.rb +418 -0
- data/app/models/concept/relation/base.rb +95 -0
- data/app/models/concept/relation/reverse_relation_extension.rb +49 -0
- data/app/models/concept/relation/skos/base.rb +37 -0
- data/app/models/concept/relation/skos/broader/base.rb +41 -0
- data/app/models/concept/relation/skos/broader/mono.rb +28 -0
- data/app/models/concept/relation/skos/broader/poly.rb +23 -0
- data/app/models/concept/relation/skos/narrower/base.rb +37 -0
- data/app/models/concept/relation/skos/related.rb +21 -0
- data/app/models/concept/skos/base.rb +28 -0
- data/app/models/label/base.rb +98 -0
- data/app/models/label/skos/base.rb +27 -0
- data/app/models/labeling/base.rb +81 -0
- data/app/models/labeling/skos/alt_label.rb +21 -0
- data/app/models/labeling/skos/base.rb +99 -0
- data/app/models/labeling/skos/hidden_label.rb +25 -0
- data/app/models/labeling/skos/pref_label.rb +30 -0
- data/app/models/match/base.rb +57 -0
- data/app/models/match/skos/base.rb +23 -0
- data/app/models/match/skos/broad_match.rb +21 -0
- data/app/models/match/skos/close_match.rb +21 -0
- data/app/models/match/skos/exact_match.rb +21 -0
- data/app/models/match/skos/mapping_relation.rb +21 -0
- data/app/models/match/skos/narrow_match.rb +21 -0
- data/app/models/match/skos/related_match.rb +21 -0
- data/app/models/note/annotated/base.rb +29 -0
- data/app/models/note/base.rb +127 -0
- data/app/models/note/skos/base.rb +52 -0
- data/app/models/note/skos/change_note.rb +38 -0
- data/app/models/note/skos/definition.rb +33 -0
- data/app/models/note/skos/editorial_note.rb +21 -0
- data/app/models/note/skos/example.rb +21 -0
- data/app/models/note/skos/history_note.rb +21 -0
- data/app/models/note/skos/scope_note.rb +21 -0
- data/app/models/origin_mapping.rb +58 -0
- data/app/models/rdf_store.rb +96 -0
- data/app/models/search_extension.rb +58 -0
- data/app/models/user.rb +49 -0
- data/app/models/user_session.rb +23 -0
- data/app/views/collections/_collection.html.erb +10 -0
- data/app/views/collections/_form.html.erb +47 -0
- data/app/views/collections/edit.html.erb +11 -0
- data/app/views/collections/index.html.erb +12 -0
- data/app/views/collections/new.html.erb +7 -0
- data/app/views/collections/show.html.erb +53 -0
- data/app/views/collections/show.iqrdf +22 -0
- data/app/views/concepts/_base_data.html.erb +72 -0
- data/app/views/concepts/_close_match.html.erb +16 -0
- data/app/views/concepts/_show_head.html.erb +23 -0
- data/app/views/concepts/_visualization.html.erb +9 -0
- data/app/views/concepts/alphabetical/_pref_labeling.html.erb +6 -0
- data/app/views/concepts/alphabetical/index.html.erb +17 -0
- data/app/views/concepts/edit.html.erb +32 -0
- data/app/views/concepts/hierarchical/_treeview.html.erb +20 -0
- data/app/views/concepts/hierarchical/index.html.erb +5 -0
- data/app/views/concepts/index.iqrdf +24 -0
- data/app/views/concepts/new.html.erb +3 -0
- data/app/views/concepts/show_published.html.erb +16 -0
- data/app/views/concepts/show_unpublished.html.erb +43 -0
- data/app/views/concepts/untranslated/index.html.erb +23 -0
- data/app/views/dashboard/index.html.erb +47 -0
- data/app/views/errors/access_denied.html.erb +3 -0
- data/app/views/errors/multiple_choices.html.erb +11 -0
- data/app/views/errors/not_found.html.erb +8 -0
- data/app/views/kaminari/_page.html.erb +6 -0
- data/app/views/kaminari/_paginator.html.erb +15 -0
- data/app/views/layouts/_controls.html.erb +37 -0
- data/app/views/layouts/_header.html.erb +1 -0
- data/app/views/layouts/_navigation.html.erb +27 -0
- data/app/views/layouts/_sections.html.erb +8 -0
- data/app/views/layouts/application.html.erb +83 -0
- data/app/views/pages/about.html.erb +77 -0
- data/app/views/partials/_rdf_logo.html.erb +4 -0
- data/app/views/partials/collection/_member.html.erb +14 -0
- data/app/views/partials/collection_label/_search_result.html.erb +5 -0
- data/app/views/partials/concept/_edit_link_base.html.erb +4 -0
- data/app/views/partials/concept/_inline_base.html.erb +4 -0
- data/app/views/partials/concept/_new_link_base.html.erb +4 -0
- data/app/views/partials/concept/relation/_base.html.erb +8 -0
- data/app/views/partials/concept/relation/_edit_base.html.erb +15 -0
- data/app/views/partials/concept/relation/skos/_narrower.html.erb +12 -0
- data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +28 -0
- data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +14 -0
- data/app/views/partials/labeling/skos/_base.html.erb +17 -0
- data/app/views/partials/labeling/skos/_edit_base.html.erb +7 -0
- data/app/views/partials/labeling/skos/_search_result.html.erb +12 -0
- data/app/views/partials/match/_base.html.erb +13 -0
- data/app/views/partials/match/_edit_base.html.erb +6 -0
- data/app/views/partials/note/_base.html.erb +15 -0
- data/app/views/partials/note/_edit_base.html.erb +28 -0
- data/app/views/partials/note/_note.html.erb +14 -0
- data/app/views/partials/note/_search_result.html.erb +8 -0
- data/app/views/partials/note/skos/_edit_change_note.html.erb +47 -0
- data/app/views/partials/note/skos/definition/_search_result.html.erb +8 -0
- data/app/views/rdf/show_concept.iqrdf +5 -0
- data/app/views/search_results/_head_contents.html.erb +4 -0
- data/app/views/search_results/_rdf_links.html.erb +4 -0
- data/app/views/search_results/index.html.erb +92 -0
- data/app/views/search_results/index.iqrdf +33 -0
- data/app/views/triple_store_syncs/new.html.erb +7 -0
- data/app/views/user_sessions/new.html.erb +11 -0
- data/app/views/users/_form.html.erb +45 -0
- data/app/views/users/_user_preference.html.erb +12 -0
- data/app/views/users/edit.html.erb +14 -0
- data/app/views/users/index.html.erb +29 -0
- data/app/views/users/new.html.erb +13 -0
- data/config/application.rb +82 -0
- data/config/boot.rb +29 -0
- data/config/database.template.yml +43 -0
- data/config/database.yml +40 -0
- data/config/deploy/common.rb +79 -0
- data/config/deploy/ec2.rb +43 -0
- data/config/deploy/history.rb +29 -0
- data/config/deploy/innoq.rb +37 -0
- data/config/deploy.rb +72 -0
- data/config/engine.rb +25 -0
- data/config/environment.rb +21 -0
- data/config/environments/development.rb +74 -0
- data/config/environments/production.rb +65 -0
- data/config/environments/production.template.rb +65 -0
- data/config/environments/production_internal.rb +65 -0
- data/config/environments/test.rb +51 -0
- data/config/initializers/action_view.rb +23 -0
- data/config/initializers/active_record.rb +18 -0
- data/config/initializers/backtrace_silencers.rb +23 -0
- data/config/initializers/inflections.rb +26 -0
- data/config/initializers/iqvoc.rb +50 -0
- data/config/initializers/jdbc.rb +23 -0
- data/config/initializers/kaminari_config.rb +8 -0
- data/config/initializers/language.rb +6 -0
- data/config/initializers/mime_types.rb +24 -0
- data/config/initializers/secret_token.rb +29 -0
- data/config/initializers/secret_token.rb.template +29 -0
- data/config/initializers/session_store.rb +24 -0
- data/config/locales/activerecord.de.yml +135 -0
- data/config/locales/activerecord.en.yml +135 -0
- data/config/locales/authlogic.de.yml +38 -0
- data/config/locales/authlogic.en.yml +38 -0
- data/config/locales/de.yml +326 -0
- data/config/locales/defaults.de.yml +153 -0
- data/config/locales/en.yml +332 -0
- data/config/routes.rb +53 -0
- data/config/warble.rb +158 -0
- data/db/iqvoc_test.sqlite3 +0 -0
- data/db/migrate/20100927101502_create_schema.rb +174 -0
- data/db/migrate/20101125141218_add_collection_tables.rb +32 -0
- data/db/migrate/20101129161528_add_type_to_collections.rb +24 -0
- data/db/migrate/20101202094602_add_origin_to_collections.rb +25 -0
- data/db/migrate/20101202135420_rename_collection_contents_to_collection_members.rb +25 -0
- data/db/migrate/20101208103531_add_type_to_collection_contents.rb +27 -0
- data/db/migrate/20101210153916_add_indexes_to_collections.rb +25 -0
- data/db/migrate/20110204121244_create_collection_labels.rb +32 -0
- data/db/migrate/20110208084250_change_origin_lengths.rb +27 -0
- data/db/migrate/20110328124300_discard_collection_specifics.rb +27 -0
- data/db/migrate/20110408120357_remove_classifications_and_classifiers.rb +32 -0
- data/db/migrate/20110408120740_remove_xl_specfic_stuff.rb +39 -0
- data/db/migrate/20110420133640_change_value_in_notes.rb +8 -0
- data/db/migrate/20110427120534_add_published_at_to_labels.rb +9 -0
- data/db/migrate/20110510162719_use_mono_hierarchy_instead_of_poly_hierarchy.rb +13 -0
- data/db/migrate/20110512132624_extend_notes_value_field_length.rb +8 -0
- data/db/migrate/20110525103100_separate_note_annotation_predicates.rb +38 -0
- data/db/migrate/20110615134040_change_umt_note_annotations_to_dct.rb +9 -0
- data/db/schema.rb +127 -0
- data/db/seeds.rb +37 -0
- data/iqvoc.gemspec +27 -0
- data/lib/engine_tasks/assets.rake +49 -0
- data/lib/engine_tasks/db.rake +18 -0
- data/lib/engine_tasks/release.rake +118 -0
- data/lib/iqvoc/ability.rb +44 -0
- data/lib/iqvoc/data_helper.rb +27 -0
- data/lib/iqvoc/deep_cloning.rb +92 -0
- data/lib/iqvoc/rdf_helper.rb +67 -0
- data/lib/iqvoc/skos_importer.rb +144 -0
- data/lib/iqvoc/version.rb +19 -0
- data/lib/iqvoc/versioning.rb +151 -0
- data/lib/iqvoc.rb +228 -0
- data/lib/maker.rb +144 -0
- data/lib/ojdbc14.jar +0 -0
- data/lib/string.rb +23 -0
- data/lib/tasks/importer.rake +16 -0
- data/lib/tasks/jdbc.rake +24 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/iqvoc/add.png +0 -0
- data/public/images/iqvoc/arrow_down.gif +0 -0
- data/public/images/iqvoc/arrow_up.gif +0 -0
- data/public/images/iqvoc/footer.png +0 -0
- data/public/images/iqvoc/go_there.png +0 -0
- data/public/images/iqvoc/header.png +0 -0
- data/public/images/iqvoc/header_long.png +0 -0
- data/public/images/iqvoc/iqvoc.png +0 -0
- data/public/images/iqvoc/note_add.png +0 -0
- data/public/images/iqvoc/note_delete.png +0 -0
- data/public/images/iqvoc/note_edit.png +0 -0
- data/public/images/iqvoc/ok.png +0 -0
- data/public/images/iqvoc/rails.png +0 -0
- data/public/images/iqvoc/rdf_flyer.gif +0 -0
- data/public/images/iqvoc/red_arrow.png +0 -0
- data/public/images/iqvoc/remove.png +0 -0
- data/public/images/iqvoc/shadow.png +0 -0
- data/public/images/iqvoc/spinner.gif +0 -0
- data/public/images/iqvoc/tokenizer_delete.png +0 -0
- data/public/images/iqvoc/tokenizer_pencile.png +0 -0
- data/public/images/iqvoc/tokenizer_show.png +0 -0
- data/public/images/iqvoc/unfinished.png +0 -0
- data/public/javascripts/iqvoc/application.js +123 -0
- data/public/javascripts/iqvoc/entityselect.js +121 -0
- data/public/javascripts/iqvoc/excanvas.js +35 -0
- data/public/javascripts/iqvoc/iqvoc.js +118 -0
- data/public/javascripts/iqvoc/jit_rgraph.js +153 -0
- data/public/javascripts/iqvoc/jquery-1.6.2.min.js +18 -0
- data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +29 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +44 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +43 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +56 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +340 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +559 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +621 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +24 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +75 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +251 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +15 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +16 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +92 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +3363 -0
- data/public/javascripts/iqvoc/jquery-treeview/todo +8 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.js +3229 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +163 -0
- data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +22 -0
- data/public/javascripts/iqvoc/json2.js +480 -0
- data/public/javascripts/iqvoc/langselect.js +73 -0
- data/public/javascripts/iqvoc/rails.js +132 -0
- data/public/javascripts/iqvoc/storage.js +122 -0
- data/public/javascripts/iqvoc/visualization.js +321 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/iqvoc/blueprint/ie.css +35 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +32 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +97 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +71 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +18 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +40 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +10 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +110 -0
- data/public/stylesheets/iqvoc/blueprint/print.css +29 -0
- data/public/stylesheets/iqvoc/blueprint/screen.css +258 -0
- data/public/stylesheets/iqvoc/blueprint/src/forms.css +65 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.css +280 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/src/ie.css +76 -0
- data/public/stylesheets/iqvoc/blueprint/src/print.css +85 -0
- data/public/stylesheets/iqvoc/blueprint/src/reset.css +45 -0
- data/public/stylesheets/iqvoc/blueprint/src/typography.css +106 -0
- data/public/stylesheets/iqvoc/forms.css +71 -0
- data/public/stylesheets/iqvoc/images/back.png +0 -0
- data/public/stylesheets/iqvoc/images/branch.png +0 -0
- data/public/stylesheets/iqvoc/images/categ.png +0 -0
- data/public/stylesheets/iqvoc/images/categ_open.png +0 -0
- data/public/stylesheets/iqvoc/images/go_there.png +0 -0
- data/public/stylesheets/iqvoc/images/iqvoc.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/top_01.png +0 -0
- data/public/stylesheets/iqvoc/images/trunk.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/iqvoc/iqvoc.css +477 -0
- data/public/stylesheets/iqvoc/jquery-ui-1.8.13.custom.css +415 -0
- data/public/stylesheets/iqvoc/widgets.css +81 -0
- data/test/factories.rb +74 -0
- data/test/integration/alphabetical_test.rb +53 -0
- data/test/integration/authentication_test.rb +41 -0
- data/test/integration/browse_concepts_and_labels_test.rb +61 -0
- data/test/integration/browse_static_pages_test.rb +29 -0
- data/test/integration/client_augmentation_test.rb +42 -0
- data/test/integration/client_edit_concept_test.rb +72 -0
- data/test/integration/collection_circularity_test.rb +110 -0
- data/test/integration/concept_test.rb +61 -0
- data/test/integration/edit_concepts_test.rb +40 -0
- data/test/integration/note_annotations_test.rb +86 -0
- data/test/integration/search_test.rb +205 -0
- data/test/integration/tree_test.rb +31 -0
- data/test/integration/untranslated_test.rb +60 -0
- data/test/integration_test_helper.rb +45 -0
- data/test/performance/browsing_test.rb +25 -0
- data/test/test_helper.rb +29 -0
- data/test/unit/concept_test.rb +93 -0
- data/test/unit/note_test.rb +32 -0
- data/test/unit/origin_mapping_test.rb +70 -0
- data/test/unit/skos_import_test.rb +100 -0
- metadata +522 -0
@@ -0,0 +1,251 @@
|
|
1
|
+
/*
|
2
|
+
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
5
|
+
* http://docs.jquery.com/Plugins/Treeview
|
6
|
+
*
|
7
|
+
* Copyright (c) 2007 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
|
17
|
+
;(function($) {
|
18
|
+
|
19
|
+
$.extend($.fn, {
|
20
|
+
swapClass: function(c1, c2) {
|
21
|
+
var c1Elements = this.filter('.' + c1);
|
22
|
+
this.filter('.' + c2).removeClass(c2).addClass(c1);
|
23
|
+
c1Elements.removeClass(c1).addClass(c2);
|
24
|
+
return this;
|
25
|
+
},
|
26
|
+
replaceClass: function(c1, c2) {
|
27
|
+
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
|
28
|
+
},
|
29
|
+
hoverClass: function(className) {
|
30
|
+
className = className || "hover";
|
31
|
+
return this.hover(function() {
|
32
|
+
$(this).addClass(className);
|
33
|
+
}, function() {
|
34
|
+
$(this).removeClass(className);
|
35
|
+
});
|
36
|
+
},
|
37
|
+
heightToggle: function(animated, callback) {
|
38
|
+
animated ?
|
39
|
+
this.animate({ height: "toggle" }, animated, callback) :
|
40
|
+
this.each(function(){
|
41
|
+
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
42
|
+
if(callback)
|
43
|
+
callback.apply(this, arguments);
|
44
|
+
});
|
45
|
+
},
|
46
|
+
heightHide: function(animated, callback) {
|
47
|
+
if (animated) {
|
48
|
+
this.animate({ height: "hide" }, animated, callback);
|
49
|
+
} else {
|
50
|
+
this.hide();
|
51
|
+
if (callback)
|
52
|
+
this.each(callback);
|
53
|
+
}
|
54
|
+
},
|
55
|
+
prepareBranches: function(settings) {
|
56
|
+
if (!settings.prerendered) {
|
57
|
+
// mark last tree items
|
58
|
+
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
|
59
|
+
// collapse whole tree, or only those marked as closed, anyway except those marked as open
|
60
|
+
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
|
61
|
+
}
|
62
|
+
// return all items with sublists
|
63
|
+
return this.filter(":has(>ul)");
|
64
|
+
},
|
65
|
+
applyClasses: function(settings, toggler) {
|
66
|
+
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
|
67
|
+
toggler.apply($(this).next());
|
68
|
+
}).add( $("a", this) ).hoverClass();
|
69
|
+
|
70
|
+
if (!settings.prerendered) {
|
71
|
+
// handle closed ones first
|
72
|
+
this.filter(":has(>ul:hidden)")
|
73
|
+
.addClass(CLASSES.expandable)
|
74
|
+
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
|
75
|
+
|
76
|
+
// handle open ones
|
77
|
+
this.not(":has(>ul:hidden)")
|
78
|
+
.addClass(CLASSES.collapsable)
|
79
|
+
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
|
80
|
+
|
81
|
+
// create hitarea
|
82
|
+
this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
|
83
|
+
var classes = "";
|
84
|
+
$.each($(this).parent().attr("class").split(" "), function() {
|
85
|
+
classes += this + "-hitarea ";
|
86
|
+
});
|
87
|
+
$(this).addClass( classes );
|
88
|
+
});
|
89
|
+
}
|
90
|
+
|
91
|
+
// apply event to hitarea
|
92
|
+
this.find("div." + CLASSES.hitarea).click( toggler );
|
93
|
+
},
|
94
|
+
treeview: function(settings) {
|
95
|
+
|
96
|
+
settings = $.extend({
|
97
|
+
cookieId: "treeview"
|
98
|
+
}, settings);
|
99
|
+
|
100
|
+
if (settings.add) {
|
101
|
+
return this.trigger("add", [settings.add]);
|
102
|
+
}
|
103
|
+
|
104
|
+
if ( settings.toggle ) {
|
105
|
+
var callback = settings.toggle;
|
106
|
+
settings.toggle = function() {
|
107
|
+
return callback.apply($(this).parent()[0], arguments);
|
108
|
+
};
|
109
|
+
}
|
110
|
+
|
111
|
+
// factory for treecontroller
|
112
|
+
function treeController(tree, control) {
|
113
|
+
// factory for click handlers
|
114
|
+
function handler(filter) {
|
115
|
+
return function() {
|
116
|
+
// reuse toggle event handler, applying the elements to toggle
|
117
|
+
// start searching for all hitareas
|
118
|
+
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
|
119
|
+
// for plain toggle, no filter is provided, otherwise we need to check the parent element
|
120
|
+
return filter ? $(this).parent("." + filter).length : true;
|
121
|
+
}) );
|
122
|
+
return false;
|
123
|
+
};
|
124
|
+
}
|
125
|
+
// click on first element to collapse tree
|
126
|
+
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
|
127
|
+
// click on second to expand tree
|
128
|
+
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
|
129
|
+
// click on third to toggle tree
|
130
|
+
$("a:eq(2)", control).click( handler() );
|
131
|
+
}
|
132
|
+
|
133
|
+
// handle toggle event
|
134
|
+
function toggler() {
|
135
|
+
$(this)
|
136
|
+
.parent()
|
137
|
+
// swap classes for hitarea
|
138
|
+
.find(">.hitarea")
|
139
|
+
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
140
|
+
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
141
|
+
.end()
|
142
|
+
// swap classes for parent li
|
143
|
+
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
144
|
+
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
145
|
+
// find child lists
|
146
|
+
.find( ">ul" )
|
147
|
+
// toggle them
|
148
|
+
.heightToggle( settings.animated, settings.toggle );
|
149
|
+
if ( settings.unique ) {
|
150
|
+
$(this).parent()
|
151
|
+
.siblings()
|
152
|
+
// swap classes for hitarea
|
153
|
+
.find(">.hitarea")
|
154
|
+
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
155
|
+
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
156
|
+
.end()
|
157
|
+
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
|
158
|
+
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
159
|
+
.find( ">ul" )
|
160
|
+
.heightHide( settings.animated, settings.toggle );
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
function serialize() {
|
165
|
+
function binary(arg) {
|
166
|
+
return arg ? 1 : 0;
|
167
|
+
}
|
168
|
+
var data = [];
|
169
|
+
branches.each(function(i, e) {
|
170
|
+
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
|
171
|
+
});
|
172
|
+
$.cookie(settings.cookieId, data.join("") );
|
173
|
+
}
|
174
|
+
|
175
|
+
function deserialize() {
|
176
|
+
var stored = $.cookie(settings.cookieId);
|
177
|
+
if ( stored ) {
|
178
|
+
var data = stored.split("");
|
179
|
+
branches.each(function(i, e) {
|
180
|
+
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
|
181
|
+
});
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
// add treeview class to activate styles
|
186
|
+
this.addClass("treeview");
|
187
|
+
|
188
|
+
// prepare branches and find all tree items with child lists
|
189
|
+
var branches = this.find("li").prepareBranches(settings);
|
190
|
+
|
191
|
+
switch(settings.persist) {
|
192
|
+
case "cookie":
|
193
|
+
var toggleCallback = settings.toggle;
|
194
|
+
settings.toggle = function() {
|
195
|
+
serialize();
|
196
|
+
if (toggleCallback) {
|
197
|
+
toggleCallback.apply(this, arguments);
|
198
|
+
}
|
199
|
+
};
|
200
|
+
deserialize();
|
201
|
+
break;
|
202
|
+
case "location":
|
203
|
+
var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
|
204
|
+
if ( current.length ) {
|
205
|
+
current.addClass("selected").parents("ul, li").add( current.next() ).show();
|
206
|
+
}
|
207
|
+
break;
|
208
|
+
}
|
209
|
+
|
210
|
+
branches.applyClasses(settings, toggler);
|
211
|
+
|
212
|
+
// if control option is set, create the treecontroller and show it
|
213
|
+
if ( settings.control ) {
|
214
|
+
treeController(this, settings.control);
|
215
|
+
$(settings.control).show();
|
216
|
+
}
|
217
|
+
|
218
|
+
return this.bind("add", function(event, branches) {
|
219
|
+
$(branches).prev()
|
220
|
+
.removeClass(CLASSES.last)
|
221
|
+
.removeClass(CLASSES.lastCollapsable)
|
222
|
+
.removeClass(CLASSES.lastExpandable)
|
223
|
+
.find(">.hitarea")
|
224
|
+
.removeClass(CLASSES.lastCollapsableHitarea)
|
225
|
+
.removeClass(CLASSES.lastExpandableHitarea);
|
226
|
+
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
|
227
|
+
});
|
228
|
+
}
|
229
|
+
});
|
230
|
+
|
231
|
+
// classes used by the plugin
|
232
|
+
// need to be styled via external stylesheet, see first example
|
233
|
+
var CLASSES = $.fn.treeview.classes = {
|
234
|
+
open: "open",
|
235
|
+
closed: "closed",
|
236
|
+
expandable: "expandable",
|
237
|
+
expandableHitarea: "expandable-hitarea",
|
238
|
+
lastExpandableHitarea: "lastExpandable-hitarea",
|
239
|
+
collapsable: "collapsable",
|
240
|
+
collapsableHitarea: "collapsable-hitarea",
|
241
|
+
lastCollapsableHitarea: "lastCollapsable-hitarea",
|
242
|
+
lastCollapsable: "lastCollapsable",
|
243
|
+
lastExpandable: "lastExpandable",
|
244
|
+
last: "last",
|
245
|
+
hitarea: "hitarea"
|
246
|
+
};
|
247
|
+
|
248
|
+
// provide backwards compability
|
249
|
+
$.fn.Treeview = $.fn.treeview;
|
250
|
+
|
251
|
+
})(jQuery);
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
5
|
+
* http://docs.jquery.com/Plugins/Treeview
|
6
|
+
*
|
7
|
+
* Copyright (c) 2007 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
|
14
|
+
*
|
15
|
+
*/;(function($){$.extend($.fn,{swapClass:function(c1,c2){var c1Elements=this.filter('.'+c1);this.filter('.'+c2).removeClass(c2).addClass(c1);c1Elements.removeClass(c1).addClass(c2);return this;},replaceClass:function(c1,c2){return this.filter('.'+c1).removeClass(c1).addClass(c2).end();},hoverClass:function(className){className=className||"hover";return this.hover(function(){$(this).addClass(className);},function(){$(this).removeClass(className);});},heightToggle:function(animated,callback){animated?this.animate({height:"toggle"},animated,callback):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(callback)callback.apply(this,arguments);});},heightHide:function(animated,callback){if(animated){this.animate({height:"hide"},animated,callback);}else{this.hide();if(callback)this.each(callback);}},prepareBranches:function(settings){if(!settings.prerendered){this.filter(":last-child:not(ul)").addClass(CLASSES.last);this.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").find(">ul").hide();}return this.filter(":has(>ul)");},applyClasses:function(settings,toggler){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event){toggler.apply($(this).next());}).add($("a",this)).hoverClass();if(!settings.prerendered){this.filter(":has(>ul:hidden)").addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable);this.not(":has(>ul:hidden)").addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable);this.prepend("<div class=\""+CLASSES.hitarea+"\"/>").find("div."+CLASSES.hitarea).each(function(){var classes="";$.each($(this).parent().attr("class").split(" "),function(){classes+=this+"-hitarea ";});$(this).addClass(classes);});}this.find("div."+CLASSES.hitarea).click(toggler);},treeview:function(settings){settings=$.extend({cookieId:"treeview"},settings);if(settings.add){return this.trigger("add",[settings.add]);}if(settings.toggle){var callback=settings.toggle;settings.toggle=function(){return callback.apply($(this).parent()[0],arguments);};}function treeController(tree,control){function handler(filter){return function(){toggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){return filter?$(this).parent("."+filter).length:true;}));return false;};}$("a:eq(0)",control).click(handler(CLASSES.collapsable));$("a:eq(1)",control).click(handler(CLASSES.expandable));$("a:eq(2)",control).click(handler());}function toggler(){$(this).parent().find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightToggle(settings.animated,settings.toggle);if(settings.unique){$(this).parent().siblings().find(">.hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightHide(settings.animated,settings.toggle);}}function serialize(){function binary(arg){return arg?1:0;}var data=[];branches.each(function(i,e){data[i]=$(e).is(":has(>ul:visible)")?1:0;});$.cookie(settings.cookieId,data.join(""));}function deserialize(){var stored=$.cookie(settings.cookieId);if(stored){var data=stored.split("");branches.each(function(i,e){$(e).find(">ul")[parseInt(data[i])?"show":"hide"]();});}}this.addClass("treeview");var branches=this.find("li").prepareBranches(settings);switch(settings.persist){case"cookie":var toggleCallback=settings.toggle;settings.toggle=function(){serialize();if(toggleCallback){toggleCallback.apply(this,arguments);}};deserialize();break;case"location":var current=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase();});if(current.length){current.addClass("selected").parents("ul, li").add(current.next()).show();}break;}branches.applyClasses(settings,toggler);if(settings.control){treeController(this,settings.control);$(settings.control).show();}return this.bind("add",function(event,branches){$(branches).prev().removeClass(CLASSES.last).removeClass(CLASSES.lastCollapsable).removeClass(CLASSES.lastExpandable).find(">.hitarea").removeClass(CLASSES.lastCollapsableHitarea).removeClass(CLASSES.lastExpandableHitarea);$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings,toggler);});}});var CLASSES=$.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};$.fn.Treeview=$.fn.treeview;})(jQuery);
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
5
|
+
* http://docs.jquery.com/Plugins/Treeview
|
6
|
+
*
|
7
|
+
* Copyright (c) 2007 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){$.1l($.F,{E:4(b,c){l a=3.n(\'.\'+b);3.n(\'.\'+c).o(c).m(b);a.o(b).m(c);8 3},s:4(a,b){8 3.n(\'.\'+a).o(a).m(b).P()},1n:4(a){a=a||"1j";8 3.1j(4(){$(3).m(a)},4(){$(3).o(a)})},1h:4(b,a){b?3.1g({1e:"p"},b,a):3.x(4(){T(3)[T(3).1a(":U")?"H":"D"]();7(a)a.A(3,O)})},12:4(b,a){7(b){3.1g({1e:"D"},b,a)}1L{3.D();7(a)3.x(a)}},11:4(a){7(!a.1k){3.n(":r-1H:G(9)").m(k.r);3.n((a.1F?"":"."+k.X)+":G(."+k.W+")").6(">9").D()}8 3.n(":y(>9)")},S:4(b,c){3.n(":y(>9):G(:y(>a))").6(">1z").C(4(a){c.A($(3).19())}).w($("a",3)).1n();7(!b.1k){3.n(":y(>9:U)").m(k.q).s(k.r,k.t);3.G(":y(>9:U)").m(k.u).s(k.r,k.v);3.1r("<J 14=\\""+k.5+"\\"/>").6("J."+k.5).x(4(){l a="";$.x($(3).B().1o("14").13(" "),4(){a+=3+"-5 "});$(3).m(a)})}3.6("J."+k.5).C(c)},z:4(g){g=$.1l({N:"z"},g);7(g.w){8 3.1K("w",[g.w])}7(g.p){l d=g.p;g.p=4(){8 d.A($(3).B()[0],O)}}4 1m(b,c){4 L(a){8 4(){K.A($("J."+k.5,b).n(4(){8 a?$(3).B("."+a).1i:1I}));8 1G}}$("a:10(0)",c).C(L(k.u));$("a:10(1)",c).C(L(k.q));$("a:10(2)",c).C(L())}4 K(){$(3).B().6(">.5").E(k.Z,k.Y).E(k.I,k.M).P().E(k.u,k.q).E(k.v,k.t).6(">9").1h(g.1f,g.p);7(g.1E){$(3).B().1D().6(">.5").s(k.Z,k.Y).s(k.I,k.M).P().s(k.u,k.q).s(k.v,k.t).6(">9").12(g.1f,g.p)}}4 1d(){4 1C(a){8 a?1:0}l b=[];j.x(4(i,e){b[i]=$(e).1a(":y(>9:1B)")?1:0});$.V(g.N,b.1A(""))}4 1c(){l b=$.V(g.N);7(b){l a=b.13("");j.x(4(i,e){$(e).6(">9")[1y(a[i])?"H":"D"]()})}}3.m("z");l j=3.6("Q").11(g);1x(g.1w){18"V":l h=g.p;g.p=4(){1d();7(h){h.A(3,O)}};1c();17;18"1b":l f=3.6("a").n(4(){8 3.16.15()==1b.16.15()});7(f.1i){f.m("1v").1u("9, Q").w(f.19()).H()}17}j.S(g,K);7(g.R){1m(3,g.R);$(g.R).H()}8 3.1t("w",4(a,b){$(b).1s().o(k.r).o(k.v).o(k.t).6(">.5").o(k.I).o(k.M);$(b).6("Q").1q().11(g).S(g,K)})}});l k=$.F.z.1J={W:"W",X:"X",q:"q",Y:"q-5",M:"t-5",u:"u",Z:"u-5",I:"v-5",v:"v",t:"t",r:"r",5:"5"};$.F.1p=$.F.z})(T);',62,110,'|||this|function|hitarea|find|if|return|ul||||||||||||var|addClass|filter|removeClass|toggle|expandable|last|replaceClass|lastExpandable|collapsable|lastCollapsable|add|each|has|treeview|apply|parent|click|hide|swapClass|fn|not|show|lastCollapsableHitarea|div|toggler|handler|lastExpandableHitarea|cookieId|arguments|end|li|control|applyClasses|jQuery|hidden|cookie|open|closed|expandableHitarea|collapsableHitarea|eq|prepareBranches|heightHide|split|class|toLowerCase|href|break|case|next|is|location|deserialize|serialize|height|animated|animate|heightToggle|length|hover|prerendered|extend|treeController|hoverClass|attr|Treeview|andSelf|prepend|prev|bind|parents|selected|persist|switch|parseInt|span|join|visible|binary|siblings|unique|collapsed|false|child|true|classes|trigger|else'.split('|'),0,{}))
|
@@ -0,0 +1,92 @@
|
|
1
|
+
/**
|
2
|
+
* Cookie plugin
|
3
|
+
*
|
4
|
+
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
5
|
+
* Dual licensed under the MIT and GPL licenses:
|
6
|
+
* http://www.opensource.org/licenses/mit-license.php
|
7
|
+
* http://www.gnu.org/licenses/gpl.html
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Create a cookie with the given name and value and other optional parameters.
|
13
|
+
*
|
14
|
+
* @example $.cookie('the_cookie', 'the_value');
|
15
|
+
* @desc Set the value of a cookie.
|
16
|
+
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
|
17
|
+
* @desc Create a cookie with all available options.
|
18
|
+
* @example $.cookie('the_cookie', 'the_value');
|
19
|
+
* @desc Create a session cookie.
|
20
|
+
* @example $.cookie('the_cookie', null);
|
21
|
+
* @desc Delete a cookie by passing null as value.
|
22
|
+
*
|
23
|
+
* @param String name The name of the cookie.
|
24
|
+
* @param String value The value of the cookie.
|
25
|
+
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
26
|
+
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
27
|
+
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
28
|
+
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
29
|
+
* when the the browser exits.
|
30
|
+
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
31
|
+
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
32
|
+
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
33
|
+
* require a secure protocol (like HTTPS).
|
34
|
+
* @type undefined
|
35
|
+
*
|
36
|
+
* @name $.cookie
|
37
|
+
* @cat Plugins/Cookie
|
38
|
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
39
|
+
*/
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Get the value of a cookie with the given name.
|
43
|
+
*
|
44
|
+
* @example $.cookie('the_cookie');
|
45
|
+
* @desc Get the value of a cookie.
|
46
|
+
*
|
47
|
+
* @param String name The name of the cookie.
|
48
|
+
* @return The value of the cookie.
|
49
|
+
* @type String
|
50
|
+
*
|
51
|
+
* @name $.cookie
|
52
|
+
* @cat Plugins/Cookie
|
53
|
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
54
|
+
*/
|
55
|
+
jQuery.cookie = function(name, value, options) {
|
56
|
+
if (typeof value != 'undefined') { // name and value given, set cookie
|
57
|
+
options = options || {};
|
58
|
+
if (value === null) {
|
59
|
+
value = '';
|
60
|
+
options.expires = -1;
|
61
|
+
}
|
62
|
+
var expires = '';
|
63
|
+
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
64
|
+
var date;
|
65
|
+
if (typeof options.expires == 'number') {
|
66
|
+
date = new Date();
|
67
|
+
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
68
|
+
} else {
|
69
|
+
date = options.expires;
|
70
|
+
}
|
71
|
+
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
72
|
+
}
|
73
|
+
var path = options.path ? '; path=' + options.path : '';
|
74
|
+
var domain = options.domain ? '; domain=' + options.domain : '';
|
75
|
+
var secure = options.secure ? '; secure' : '';
|
76
|
+
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
77
|
+
} else { // only name given, get cookie
|
78
|
+
var cookieValue = null;
|
79
|
+
if (document.cookie && document.cookie != '') {
|
80
|
+
var cookies = document.cookie.split(';');
|
81
|
+
for (var i = 0; i < cookies.length; i++) {
|
82
|
+
var cookie = jQuery.trim(cookies[i]);
|
83
|
+
// Does this cookie string begin with the name we want?
|
84
|
+
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
85
|
+
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
86
|
+
break;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
return cookieValue;
|
91
|
+
}
|
92
|
+
};
|