serum-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +6 -0
- data/.rspec +3 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +42 -0
- data/LICENSE +22 -0
- data/README.md +40 -0
- data/bin/serum-rails +13 -0
- data/lib/serum/rails/app.rb +50 -0
- data/lib/serum/rails/code_scanner.rb +49 -0
- data/lib/serum/rails/metrics.rb +118 -0
- data/lib/serum/rails/type_selection.rb +31 -0
- data/lib/serum/rails/version.rb +7 -0
- data/lib/serum-rails.rb +5 -0
- data/serum-rails.gemspec +23 -0
- data/spec/serum/rails/metrics_spec.rb +87 -0
- data/spec/spec_helper.rb +80 -0
- data/spec/test_app/Capfile +4 -0
- data/spec/test_app/Gemfile +54 -0
- data/spec/test_app/Gemfile.lock +163 -0
- data/spec/test_app/Rakefile +11 -0
- data/spec/test_app/app/controllers/admin/categories_controller.rb +17 -0
- data/spec/test_app/app/controllers/admin/users_controller.rb +30 -0
- data/spec/test_app/app/controllers/application_controller/i18n_trait.rb +24 -0
- data/spec/test_app/app/controllers/application_controller/navigation_trait.rb +19 -0
- data/spec/test_app/app/controllers/application_controller/security_trait/disabled_clearance_accounts_trait.rb +41 -0
- data/spec/test_app/app/controllers/application_controller/security_trait.rb +65 -0
- data/spec/test_app/app/controllers/application_controller.rb +13 -0
- data/spec/test_app/app/controllers/conferences_controller.rb +67 -0
- data/spec/test_app/app/controllers/friendship_requests_controller.rb +31 -0
- data/spec/test_app/app/controllers/invitations_controller.rb +39 -0
- data/spec/test_app/app/controllers/members_controller.rb +21 -0
- data/spec/test_app/app/controllers/passwords_controller.rb +33 -0
- data/spec/test_app/app/controllers/sessions_controller.rb +17 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait/deletable_trait.rb +23 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait/flash_trait.rb +23 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait/helpers_trait.rb +35 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait/index_trait.rb +39 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait/log_changes_trait.rb +18 -0
- data/spec/test_app/app/controllers/shared/boring_controller_trait.rb +16 -0
- data/spec/test_app/app/controllers/users_controller.rb +49 -0
- data/spec/test_app/app/controllers/ws/api_controller/formatters_trait.rb +91 -0
- data/spec/test_app/app/controllers/ws/api_controller/parsers_trait.rb +59 -0
- data/spec/test_app/app/controllers/ws/api_controller.rb +70 -0
- data/spec/test_app/app/controllers/ws/attendees_controller.rb +43 -0
- data/spec/test_app/app/controllers/ws/categories_controller.rb +30 -0
- data/spec/test_app/app/controllers/ws/conferences_controller.rb +62 -0
- data/spec/test_app/app/controllers/ws/contacts_controller.rb +41 -0
- data/spec/test_app/app/controllers/ws/factory_controller.rb +45 -0
- data/spec/test_app/app/controllers/ws/members_controller.rb +34 -0
- data/spec/test_app/app/controllers/ws/series_controller.rb +19 -0
- data/spec/test_app/app/controllers/ws/tests_controller.rb +23 -0
- data/spec/test_app/app/helpers/application_helper.rb +180 -0
- data/spec/test_app/app/helpers/mail_helper.rb +9 -0
- data/spec/test_app/app/helpers/tags_helper.rb +16 -0
- data/spec/test_app/app/helpers/user_helper.rb +23 -0
- data/spec/test_app/app/models/attendance.rb +11 -0
- data/spec/test_app/app/models/category/ancestry_trait.rb +23 -0
- data/spec/test_app/app/models/category.rb +25 -0
- data/spec/test_app/app/models/conference/attendance_trait.rb +23 -0
- data/spec/test_app/app/models/conference/categories_trait.rb +26 -0
- data/spec/test_app/app/models/conference/icalendar_trait.rb +36 -0
- data/spec/test_app/app/models/conference/search_trait.rb +44 -0
- data/spec/test_app/app/models/conference.rb +24 -0
- data/spec/test_app/app/models/conference_category.rb +6 -0
- data/spec/test_app/app/models/conference_search.rb +51 -0
- data/spec/test_app/app/models/error.rb +25 -0
- data/spec/test_app/app/models/friendship.rb +14 -0
- data/spec/test_app/app/models/friendship_request.rb +19 -0
- data/spec/test_app/app/models/invitation.rb +38 -0
- data/spec/test_app/app/models/member_search.rb +18 -0
- data/spec/test_app/app/models/navigation.rb +38 -0
- data/spec/test_app/app/models/patterns.rb +14 -0
- data/spec/test_app/app/models/permissions.rb +106 -0
- data/spec/test_app/app/models/shared/afterlife_trait.rb +18 -0
- data/spec/test_app/app/models/shared/choice_trait.rb +37 -0
- data/spec/test_app/app/models/shared/deletable_trait.rb +8 -0
- data/spec/test_app/app/models/shared/flag_trait.rb +30 -0
- data/spec/test_app/app/models/shared/indestructible_trait.rb +19 -0
- data/spec/test_app/app/models/shared/list_field_trait.rb +70 -0
- data/spec/test_app/app/models/shared/person_name_trait.rb +25 -0
- data/spec/test_app/app/models/shared/searchable_trait.rb +71 -0
- data/spec/test_app/app/models/shared/sortable_trait.rb +24 -0
- data/spec/test_app/app/models/user/authentication_trait.rb +33 -0
- data/spec/test_app/app/models/user/authorization_trait.rb +17 -0
- data/spec/test_app/app/models/user/friends_trait.rb +42 -0
- data/spec/test_app/app/models/user/search_trait.rb +43 -0
- data/spec/test_app/app/models/user.rb +61 -0
- data/spec/test_app/app/models/util.rb +19 -0
- data/spec/test_app/app/views/admin/categories/_form.html.haml +18 -0
- data/spec/test_app/app/views/admin/categories/_list.html.haml +17 -0
- data/spec/test_app/app/views/admin/categories/edit.html.haml +6 -0
- data/spec/test_app/app/views/admin/categories/index.html.haml +6 -0
- data/spec/test_app/app/views/admin/categories/new.html.haml +6 -0
- data/spec/test_app/app/views/admin/categories/show.html.haml +27 -0
- data/spec/test_app/app/views/admin/users/_form.html.haml +49 -0
- data/spec/test_app/app/views/admin/users/_head.html.haml +5 -0
- data/spec/test_app/app/views/admin/users/_list.html.haml +20 -0
- data/spec/test_app/app/views/admin/users/_search.html.haml +9 -0
- data/spec/test_app/app/views/admin/users/deleted.html.haml +5 -0
- data/spec/test_app/app/views/admin/users/edit.html.haml +5 -0
- data/spec/test_app/app/views/admin/users/index.html.haml +7 -0
- data/spec/test_app/app/views/admin/users/new.html.haml +6 -0
- data/spec/test_app/app/views/clearance_mailer/change_password.erb +9 -0
- data/spec/test_app/app/views/conferences/_categories_list.html.haml +8 -0
- data/spec/test_app/app/views/conferences/_form.html.haml +32 -0
- data/spec/test_app/app/views/conferences/_head.html.haml +4 -0
- data/spec/test_app/app/views/conferences/_list.html.haml +22 -0
- data/spec/test_app/app/views/conferences/_search.html.haml +24 -0
- data/spec/test_app/app/views/conferences/edit.html.haml +8 -0
- data/spec/test_app/app/views/conferences/index.html.haml +22 -0
- data/spec/test_app/app/views/conferences/new.html.haml +9 -0
- data/spec/test_app/app/views/conferences/search.html.haml +7 -0
- data/spec/test_app/app/views/conferences/show.html.haml +78 -0
- data/spec/test_app/app/views/invitations/index.html.haml +26 -0
- data/spec/test_app/app/views/invitations/new.html.haml +22 -0
- data/spec/test_app/app/views/layouts/_flashes.html.haml +13 -0
- data/spec/test_app/app/views/layouts/_javascript_requirement.html.haml +8 -0
- data/spec/test_app/app/views/layouts/_javascripts.html.haml +4 -0
- data/spec/test_app/app/views/layouts/_notifications.html.haml +11 -0
- data/spec/test_app/app/views/layouts/_session_navigation.html.haml +12 -0
- data/spec/test_app/app/views/layouts/_stylesheets.html.haml +6 -0
- data/spec/test_app/app/views/layouts/screen.html.haml +30 -0
- data/spec/test_app/app/views/members/index.html.haml +40 -0
- data/spec/test_app/app/views/passwords/edit.html.haml +21 -0
- data/spec/test_app/app/views/passwords/new.html.haml +14 -0
- data/spec/test_app/app/views/sessions/new.html.haml +19 -0
- data/spec/test_app/app/views/users/_form.html.haml +45 -0
- data/spec/test_app/app/views/users/_head.html.haml +3 -0
- data/spec/test_app/app/views/users/edit.html.haml +5 -0
- data/spec/test_app/app/views/users/new.html.haml +6 -0
- data/spec/test_app/app/views/users/show.html.haml +49 -0
- data/spec/test_app/assets/data.json +981 -0
- data/spec/test_app/config/boot.rb +125 -0
- data/spec/test_app/config/cucumber.yml +8 -0
- data/spec/test_app/config/database.sample.yml +24 -0
- data/spec/test_app/config/deploy/production.rb +9 -0
- data/spec/test_app/config/deploy.rb +100 -0
- data/spec/test_app/config/environment.rb +27 -0
- data/spec/test_app/config/environments/cucumber.rb +28 -0
- data/spec/test_app/config/environments/development.rb +22 -0
- data/spec/test_app/config/environments/production.rb +35 -0
- data/spec/test_app/config/environments/test.rb +30 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/clearance.rb +5 -0
- data/spec/test_app/config/initializers/collect_hash.rb +23 -0
- data/spec/test_app/config/initializers/collection_path_with_params.rb +18 -0
- data/spec/test_app/config/initializers/cookie_verification_secret.rb +10 -0
- data/spec/test_app/config/initializers/form_builder.rb +166 -0
- data/spec/test_app/config/initializers/inflections.rb +10 -0
- data/spec/test_app/config/initializers/invert_ordered_hash.rb +12 -0
- data/spec/test_app/config/initializers/localize_textfield_input_for_numbers.rb +30 -0
- data/spec/test_app/config/initializers/mime_types.rb +7 -0
- data/spec/test_app/config/initializers/new_rails_defaults.rb +21 -0
- data/spec/test_app/config/initializers/preload_associations.rb +7 -0
- data/spec/test_app/config/initializers/query_diet.rb +6 -0
- data/spec/test_app/config/initializers/saner_field_with_errors.rb +5 -0
- data/spec/test_app/config/initializers/session_store.rb +18 -0
- data/spec/test_app/config/locales/en.yml +231 -0
- data/spec/test_app/config/preinitializer.rb +22 -0
- data/spec/test_app/config/routes.rb +47 -0
- data/spec/test_app/db/migrate/20110114164517_initial_tables.rb +52 -0
- data/spec/test_app/db/migrate/20110118090858_add_profile_fields_to_user.rb +15 -0
- data/spec/test_app/db/migrate/20110118092741_create_conference.rb +20 -0
- data/spec/test_app/db/migrate/20110118093503_create_category.rb +17 -0
- data/spec/test_app/db/migrate/20110118104438_create_conference_category.rb +16 -0
- data/spec/test_app/db/migrate/20110118105959_create_attendance.rb +17 -0
- data/spec/test_app/db/migrate/20110118122324_create_friendship_requests.rb +15 -0
- data/spec/test_app/db/migrate/20110118162436_create_invitation.rb +16 -0
- data/spec/test_app/db/migrate/20110118170347_create_friendships.rb +15 -0
- data/spec/test_app/db/migrate/20110118193528_add_timestamps_to_conference.rb +12 -0
- data/spec/test_app/db/migrate/20110119075012_set_unique_index_on_username_for_user.rb +11 -0
- data/spec/test_app/db/migrate/20110119093458_remove_first_and_last_name_from_user.rb +12 -0
- data/spec/test_app/db/migrate/20110119110857_add_missing_indexes.rb +23 -0
- data/spec/test_app/db/migrate/20110119115751_add_uniqueness_of_name_to_category.rb +9 -0
- data/spec/test_app/db/seeds.rb +5 -0
- data/spec/test_app/lib/scripts/create_many_users_sql.rb +14 -0
- data/spec/test_app/lib/tasks/cucumber.rake +53 -0
- data/spec/test_app/lib/tasks/pending_migrations.rake +24 -0
- data/spec/test_app/lib/tasks/rcov.rake +42 -0
- data/spec/test_app/lib/tasks/rspec.rake +144 -0
- data/spec/test_app/public/404.html +30 -0
- data/spec/test_app/public/422.html +30 -0
- data/spec/test_app/public/500.html +30 -0
- data/spec/test_app/public/favicon.ico +0 -0
- data/spec/test_app/public/images/ajax-loader.gif +0 -0
- data/spec/test_app/public/images/icons/balloon-quotation.png +0 -0
- data/spec/test_app/public/images/icons/balloon-sound.png +0 -0
- data/spec/test_app/public/images/icons/balloon.png +0 -0
- data/spec/test_app/public/images/icons/bell.png +0 -0
- data/spec/test_app/public/images/icons/bin.png +0 -0
- data/spec/test_app/public/images/icons/bookmark.png +0 -0
- data/spec/test_app/public/images/icons/cake.png +0 -0
- data/spec/test_app/public/images/icons/calendar-blue.png +0 -0
- data/spec/test_app/public/images/icons/calendar-month.png +0 -0
- data/spec/test_app/public/images/icons/calendar-month_light.png +0 -0
- data/spec/test_app/public/images/icons/calendar-select.png +0 -0
- data/spec/test_app/public/images/icons/card-address.png +0 -0
- data/spec/test_app/public/images/icons/cards-address.png +0 -0
- data/spec/test_app/public/images/icons/cross-script.png +0 -0
- data/spec/test_app/public/images/icons/cross-small.png +0 -0
- data/spec/test_app/public/images/icons/cross.png +0 -0
- data/spec/test_app/public/images/icons/crown-silver.png +0 -0
- data/spec/test_app/public/images/icons/crown.png +0 -0
- data/spec/test_app/public/images/icons/dashboard.png +0 -0
- data/spec/test_app/public/images/icons/document-list.png +0 -0
- data/spec/test_app/public/images/icons/document-node.png +0 -0
- data/spec/test_app/public/images/icons/document-number.png +0 -0
- data/spec/test_app/public/images/icons/document-stamp.png +0 -0
- data/spec/test_app/public/images/icons/document-task.png +0 -0
- data/spec/test_app/public/images/icons/document-text.png +0 -0
- data/spec/test_app/public/images/icons/fire.png +0 -0
- data/spec/test_app/public/images/icons/folder-medium.png +0 -0
- data/spec/test_app/public/images/icons/folder.png +0 -0
- data/spec/test_app/public/images/icons/gear.png +0 -0
- data/spec/test_app/public/images/icons/globe-green.png +0 -0
- data/spec/test_app/public/images/icons/globe-green_light.png +0 -0
- data/spec/test_app/public/images/icons/globe-medium-green.png +0 -0
- data/spec/test_app/public/images/icons/heart-break.png +0 -0
- data/spec/test_app/public/images/icons/heart.png +0 -0
- data/spec/test_app/public/images/icons/images-flickr.png +0 -0
- data/spec/test_app/public/images/icons/information-balloon.png +0 -0
- data/spec/test_app/public/images/icons/key.png +0 -0
- data/spec/test_app/public/images/icons/light-bulb.png +0 -0
- data/spec/test_app/public/images/icons/lock--exclamation.png +0 -0
- data/spec/test_app/public/images/icons/lock.png +0 -0
- data/spec/test_app/public/images/icons/magnifier-medium.png +0 -0
- data/spec/test_app/public/images/icons/magnifier.png +0 -0
- data/spec/test_app/public/images/icons/mail.png +0 -0
- data/spec/test_app/public/images/icons/paper-clip-small.png +0 -0
- data/spec/test_app/public/images/icons/paper-clip.png +0 -0
- data/spec/test_app/public/images/icons/pencil.png +0 -0
- data/spec/test_app/public/images/icons/plus-circle.png +0 -0
- data/spec/test_app/public/images/icons/plus-small.png +0 -0
- data/spec/test_app/public/images/icons/plus.png +0 -0
- data/spec/test_app/public/images/icons/printer.png +0 -0
- data/spec/test_app/public/images/icons/question-balloon.png +0 -0
- data/spec/test_app/public/images/icons/question-white.png +0 -0
- data/spec/test_app/public/images/icons/question.png +0 -0
- data/spec/test_app/public/images/icons/quill.png +0 -0
- data/spec/test_app/public/images/icons/robot.png +0 -0
- data/spec/test_app/public/images/icons/ruby_16.png +0 -0
- data/spec/test_app/public/images/icons/ruby_2_16.png +0 -0
- data/spec/test_app/public/images/icons/ruby_32.png +0 -0
- data/spec/test_app/public/images/icons/show.png +0 -0
- data/spec/test_app/public/images/icons/star.png +0 -0
- data/spec/test_app/public/images/icons/sticky-note-text.png +0 -0
- data/spec/test_app/public/images/icons/telephone-fax.png +0 -0
- data/spec/test_app/public/images/icons/telephone-fax_light.png +0 -0
- data/spec/test_app/public/images/icons/telephone.png +0 -0
- data/spec/test_app/public/images/icons/telephone_light.png +0 -0
- data/spec/test_app/public/images/icons/thumb-up.png +0 -0
- data/spec/test_app/public/images/icons/thumb.png +0 -0
- data/spec/test_app/public/images/icons/tick.png +0 -0
- data/spec/test_app/public/images/icons/trophy-silver.png +0 -0
- data/spec/test_app/public/images/icons/trophy.png +0 -0
- data/spec/test_app/public/images/icons/user-gray.png +0 -0
- data/spec/test_app/public/images/icons/user-gray_gray.png +0 -0
- data/spec/test_app/public/images/icons/user-medium.png +0 -0
- data/spec/test_app/public/images/icons/user-red.png +0 -0
- data/spec/test_app/public/images/icons/users.png +0 -0
- data/spec/test_app/public/images/icons/users_gray.png +0 -0
- data/spec/test_app/public/images/icons/xfn.png +0 -0
- data/spec/test_app/public/images/legend_bg.png +0 -0
- data/spec/test_app/public/images/poshytip/tip-deepgray.png +0 -0
- data/spec/test_app/public/images/poshytip/tip-deepgray_arrows.png +0 -0
- data/spec/test_app/public/images/stripes_bottom_dark.png +0 -0
- data/spec/test_app/public/images/stripes_top_dark.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_flat_10_000000_40x100.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/spec/test_app/public/images/ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/spec/test_app/public/images/ui/ui-icons_222222_256x240.png +0 -0
- data/spec/test_app/public/images/ui/ui-icons_228ef1_256x240.png +0 -0
- data/spec/test_app/public/images/ui/ui-icons_ef8c08_256x240.png +0 -0
- data/spec/test_app/public/images/ui/ui-icons_ffd27a_256x240.png +0 -0
- data/spec/test_app/public/images/ui/ui-icons_ffffff_256x240.png +0 -0
- data/spec/test_app/public/javascripts/application.js +175 -0
- data/spec/test_app/public/javascripts/lib/jquery-1.4.2.min.js +154 -0
- data/spec/test_app/public/javascripts/lib/jquery-ui-1.8.5.custom.min.js +249 -0
- data/spec/test_app/public/javascripts/lib/jquery-ui-1.8.5.custom.min.txt +9 -0
- data/spec/test_app/public/javascripts/lib/jquery-ui-timepicker-addon.js +682 -0
- data/spec/test_app/public/javascripts/lib/jquery-ui-timepicker-addon.min.js +22 -0
- data/spec/test_app/public/javascripts/lib/jquery.elastic.js +6 -0
- data/spec/test_app/public/javascripts/lib/jquery.elastic.performance.js +128 -0
- data/spec/test_app/public/javascripts/lib/jquery.elastic.source.js +117 -0
- data/spec/test_app/public/javascripts/lib/jquery.poshytip.js +414 -0
- data/spec/test_app/public/javascripts/lib/jquery.poshytip.min.js +7 -0
- data/spec/test_app/public/javascripts/lib/jquery.ui.datepicker-de.js +23 -0
- data/spec/test_app/public/javascripts/lib/jrails.js +1 -0
- data/spec/test_app/public/javascripts/lib/multiple-autocomplete.js +39 -0
- data/spec/test_app/public/javascripts/lib/underscore-min.js +17 -0
- data/spec/test_app/public/javascripts/lib/underscore.js +704 -0
- data/spec/test_app/public/robots.txt +5 -0
- data/spec/test_app/public/stylesheets/lib/PIE.htc +77 -0
- data/spec/test_app/public/stylesheets/lib/PIE_uncompressed.htc +3064 -0
- data/spec/test_app/public/stylesheets/lib/jquery-ui-timepicker-addon.css +11 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray.css +62 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-darkgray/tip-darkgray_arrows.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-deepgray/tip-deepgray.css +64 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-green/tip-green.css +57 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-green/tip-green_arrows.gif +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue.css +58 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-skyblue/tip-skyblue_arrows.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-twitter/tip-twitter.css +59 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-twitter/tip-twitter_arrows.gif +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet.css +60 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-violet/tip-violet_arrows.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow.css +60 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellow/tip-yellow_arrows.png +0 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellowsimple/tip-yellowsimple.css +60 -0
- data/spec/test_app/public/stylesheets/lib/poshytip/tip-yellowsimple/tip-yellowsimple_arrows.gif +0 -0
- data/spec/test_app/public/stylesheets/lib/ui-lightness/jquery-ui-1.8.5.custom.css +459 -0
- data/spec/test_app/public/stylesheets/sass/_mixins.sass +79 -0
- data/spec/test_app/public/stylesheets/sass/_reset.sass +40 -0
- data/spec/test_app/public/stylesheets/sass/print.sass +22 -0
- data/spec/test_app/public/stylesheets/sass/screen.sass +866 -0
- data/spec/test_app/script/about +4 -0
- data/spec/test_app/script/autospec +6 -0
- data/spec/test_app/script/console +3 -0
- data/spec/test_app/script/cucumber +10 -0
- data/spec/test_app/script/dbconsole +3 -0
- data/spec/test_app/script/destroy +3 -0
- data/spec/test_app/script/generate +3 -0
- data/spec/test_app/script/performance/benchmarker +3 -0
- data/spec/test_app/script/performance/profiler +3 -0
- data/spec/test_app/script/plugin +3 -0
- data/spec/test_app/script/runner +3 -0
- data/spec/test_app/script/server +3 -0
- data/spec/test_app/script/spec +10 -0
- metadata +748 -0
@@ -0,0 +1,414 @@
|
|
1
|
+
/*
|
2
|
+
* Poshy Tip jQuery plugin v1.0
|
3
|
+
* http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/
|
4
|
+
* Copyright 2010, Vasil Dinkov, http://vadikom.com/
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function($) {
|
8
|
+
|
9
|
+
var tips = [],
|
10
|
+
reBgImage = /^url\(["']?([^"'\)]*)["']?\);?$/i,
|
11
|
+
rePNG = /\.png$/i,
|
12
|
+
ie6 = $.browser.msie && $.browser.version == 6;
|
13
|
+
|
14
|
+
// make sure the tips' position is updated on resize
|
15
|
+
function handleWindowResize() {
|
16
|
+
$.each(tips, function() {
|
17
|
+
this.refresh(true);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
$(window).resize(handleWindowResize);
|
21
|
+
|
22
|
+
$.Poshytip = function(elm, options) {
|
23
|
+
this.$elm = $(elm);
|
24
|
+
this.opts = $.extend({}, $.fn.poshytip.defaults, options);
|
25
|
+
this.$tip = $(['<div class="',this.opts.className,'">',
|
26
|
+
'<div class="tip-inner tip-bg-image"></div>',
|
27
|
+
'<div class="tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left"></div>',
|
28
|
+
'</div>'].join(''));
|
29
|
+
this.$arrow = this.$tip.find('div.tip-arrow');
|
30
|
+
this.$inner = this.$tip.find('div.tip-inner');
|
31
|
+
this.disabled = false;
|
32
|
+
this.init();
|
33
|
+
};
|
34
|
+
|
35
|
+
$.Poshytip.prototype = {
|
36
|
+
init: function() {
|
37
|
+
tips.push(this);
|
38
|
+
|
39
|
+
// save the original title and a reference to the Poshytip object
|
40
|
+
this.$elm.data('title.poshytip', this.$elm.attr('title'))
|
41
|
+
.data('poshytip', this);
|
42
|
+
|
43
|
+
// hook element events
|
44
|
+
switch (this.opts.showOn) {
|
45
|
+
case 'hover':
|
46
|
+
this.$elm.bind({
|
47
|
+
'mouseenter.poshytip': $.proxy(this.mouseenter, this),
|
48
|
+
'mouseleave.poshytip': $.proxy(this.mouseleave, this)
|
49
|
+
});
|
50
|
+
if (this.opts.alignTo == 'cursor')
|
51
|
+
this.$elm.bind('mousemove.poshytip', $.proxy(this.mousemove, this));
|
52
|
+
if (this.opts.allowTipHover)
|
53
|
+
this.$tip.hover($.proxy(this.clearTimeouts, this), $.proxy(this.hide, this));
|
54
|
+
break;
|
55
|
+
case 'focus':
|
56
|
+
this.$elm.bind({
|
57
|
+
'focus.poshytip': $.proxy(this.show, this),
|
58
|
+
'blur.poshytip': $.proxy(this.hide, this)
|
59
|
+
});
|
60
|
+
break;
|
61
|
+
}
|
62
|
+
},
|
63
|
+
mouseenter: function(e) {
|
64
|
+
if (this.disabled)
|
65
|
+
return true;
|
66
|
+
|
67
|
+
this.clearTimeouts();
|
68
|
+
this.$elm.attr('title', '');
|
69
|
+
this.showTimeout = setTimeout($.proxy(this.show, this), this.opts.showTimeout);
|
70
|
+
},
|
71
|
+
mouseleave: function() {
|
72
|
+
if (this.disabled)
|
73
|
+
return true;
|
74
|
+
|
75
|
+
this.clearTimeouts();
|
76
|
+
this.$elm.attr('title', this.$elm.data('title.poshytip'));
|
77
|
+
this.hideTimeout = setTimeout($.proxy(this.hide, this), this.opts.hideTimeout);
|
78
|
+
},
|
79
|
+
mousemove: function(e) {
|
80
|
+
if (this.disabled)
|
81
|
+
return true;
|
82
|
+
|
83
|
+
this.eventX = e.pageX;
|
84
|
+
this.eventY = e.pageY;
|
85
|
+
if (this.opts.followCursor && this.$tip.data('active')) {
|
86
|
+
this.calcPos();
|
87
|
+
this.$tip.css({left: this.pos.l, top: this.pos.t});
|
88
|
+
if (this.pos.arrow)
|
89
|
+
this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
|
90
|
+
}
|
91
|
+
},
|
92
|
+
show: function() {
|
93
|
+
if (this.disabled || this.$tip.data('active'))
|
94
|
+
return;
|
95
|
+
|
96
|
+
this.reset();
|
97
|
+
this.update();
|
98
|
+
this.display();
|
99
|
+
},
|
100
|
+
hide: function() {
|
101
|
+
if (this.disabled || !this.$tip.data('active'))
|
102
|
+
return;
|
103
|
+
|
104
|
+
this.display(true);
|
105
|
+
},
|
106
|
+
reset: function() {
|
107
|
+
this.$tip.queue([]).detach().css('visibility', 'hidden').data('active', false);
|
108
|
+
this.$inner.find('*').poshytip('hide');
|
109
|
+
if (this.opts.fade)
|
110
|
+
this.$tip.css('opacity', this.opacity);
|
111
|
+
this.$arrow[0].className = 'tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left';
|
112
|
+
},
|
113
|
+
update: function(content) {
|
114
|
+
if (this.disabled)
|
115
|
+
return;
|
116
|
+
|
117
|
+
var async = content !== undefined;
|
118
|
+
if (async) {
|
119
|
+
if (!this.$tip.data('active'))
|
120
|
+
return;
|
121
|
+
} else {
|
122
|
+
content = this.opts.content;
|
123
|
+
}
|
124
|
+
|
125
|
+
this.$inner.contents().detach();
|
126
|
+
var self = this;
|
127
|
+
this.$inner.append(
|
128
|
+
typeof content == 'function' ?
|
129
|
+
content.call(this.$elm[0], function(newContent) {
|
130
|
+
self.update(newContent);
|
131
|
+
}) :
|
132
|
+
content == '[title]' ? this.$elm.data('title.poshytip') : content
|
133
|
+
);
|
134
|
+
|
135
|
+
this.refresh(async);
|
136
|
+
},
|
137
|
+
refresh: function(async) {
|
138
|
+
if (this.disabled)
|
139
|
+
return;
|
140
|
+
|
141
|
+
if (async) {
|
142
|
+
if (!this.$tip.data('active'))
|
143
|
+
return;
|
144
|
+
// save current position as we will need to animate
|
145
|
+
var currPos = {left: this.$tip.css('left'), top: this.$tip.css('top')};
|
146
|
+
}
|
147
|
+
|
148
|
+
// reset position to avoid text wrapping, etc.
|
149
|
+
this.$tip.css({left: 0, top: 0}).appendTo(document.body);
|
150
|
+
|
151
|
+
// save default opacity
|
152
|
+
if (this.opacity === undefined)
|
153
|
+
this.opacity = this.$tip.css('opacity');
|
154
|
+
|
155
|
+
// check for images - this code is here (i.e. executed each time we show the tip and not on init) due to some browser inconsistencies
|
156
|
+
var bgImage = this.$tip.css('background-image').match(reBgImage),
|
157
|
+
arrow = this.$arrow.css('background-image').match(reBgImage);
|
158
|
+
|
159
|
+
if (bgImage) {
|
160
|
+
var bgImagePNG = rePNG.test(bgImage[1]);
|
161
|
+
// fallback to background-color/padding/border in IE6 if a PNG is used
|
162
|
+
if (ie6 && bgImagePNG) {
|
163
|
+
this.$tip.css('background-image', 'none');
|
164
|
+
this.$inner.css({margin: 0, border: 0, padding: 0});
|
165
|
+
bgImage = bgImagePNG = false;
|
166
|
+
} else {
|
167
|
+
this.$tip.prepend('<table border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>')
|
168
|
+
.css({border: 0, padding: 0, 'background-image': 'none', 'background-color': 'transparent'})
|
169
|
+
.find('.tip-bg-image').css('background-image', 'url("' + bgImage[1] +'")').end()
|
170
|
+
.find('td').eq(3).append(this.$inner);
|
171
|
+
}
|
172
|
+
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
173
|
+
if (bgImagePNG && !$.support.opacity)
|
174
|
+
this.opts.fade = false;
|
175
|
+
}
|
176
|
+
// IE arrow fixes
|
177
|
+
if (arrow && !$.support.opacity) {
|
178
|
+
// disable arrow in IE6 if using a PNG
|
179
|
+
if (ie6 && rePNG.test(arrow[1])) {
|
180
|
+
arrow = false;
|
181
|
+
this.$arrow.css('background-image', 'none');
|
182
|
+
}
|
183
|
+
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
184
|
+
this.opts.fade = false;
|
185
|
+
}
|
186
|
+
|
187
|
+
var $table = this.$tip.find('table');
|
188
|
+
if (ie6) {
|
189
|
+
// fix min/max-width in IE6
|
190
|
+
this.$tip[0].style.width = '';
|
191
|
+
$table.width('auto').find('td').eq(3).width('auto');
|
192
|
+
var tipW = this.$tip.width(),
|
193
|
+
minW = parseInt(this.$tip.css('min-width')),
|
194
|
+
maxW = parseInt(this.$tip.css('max-width'));
|
195
|
+
if (!isNaN(minW) && tipW < minW)
|
196
|
+
tipW = minW;
|
197
|
+
else if (!isNaN(maxW) && tipW > maxW)
|
198
|
+
tipW = maxW;
|
199
|
+
this.$tip.add($table).width(tipW).eq(0).find('td').eq(3).width('100%');
|
200
|
+
} else if ($table[0]) {
|
201
|
+
// fix the table width if we are using a background image
|
202
|
+
$table.width('auto').find('td').eq(3).width('auto').end().end().width(this.$tip.width()).find('td').eq(3).width('100%');
|
203
|
+
}
|
204
|
+
this.tipOuterW = this.$tip.outerWidth();
|
205
|
+
this.tipOuterH = this.$tip.outerHeight();
|
206
|
+
|
207
|
+
this.calcPos();
|
208
|
+
|
209
|
+
// position and show the arrow image
|
210
|
+
if (arrow && this.pos.arrow) {
|
211
|
+
this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
|
212
|
+
this.$arrow.css('visibility', 'inherit');
|
213
|
+
}
|
214
|
+
|
215
|
+
if (async)
|
216
|
+
this.$tip.css(currPos).animate({left: this.pos.l, top: this.pos.t}, 200);
|
217
|
+
else
|
218
|
+
this.$tip.css({left: this.pos.l, top: this.pos.t});
|
219
|
+
},
|
220
|
+
display: function(hide) {
|
221
|
+
var active = this.$tip.data('active');
|
222
|
+
if (active && !hide || !active && hide)
|
223
|
+
return;
|
224
|
+
|
225
|
+
this.$tip.stop();
|
226
|
+
if ((this.opts.slide && this.pos.arrow || this.opts.fade) && (hide && this.opts.hideAniDuration || !hide && this.opts.showAniDuration)) {
|
227
|
+
var from = {}, to = {};
|
228
|
+
// this.pos.arrow is only undefined when alignX == alignY == 'center' and we don't need to slide in that rare case
|
229
|
+
if (this.opts.slide && this.pos.arrow) {
|
230
|
+
var prop, arr;
|
231
|
+
if (this.pos.arrow == 'bottom' || this.pos.arrow == 'top') {
|
232
|
+
prop = 'top';
|
233
|
+
arr = 'bottom';
|
234
|
+
} else {
|
235
|
+
prop = 'left';
|
236
|
+
arr = 'right';
|
237
|
+
}
|
238
|
+
var val = parseInt(this.$tip.css(prop));
|
239
|
+
from[prop] = val + (hide ? 0 : this.opts.slideOffset * (this.pos.arrow == arr ? -1 : 1));
|
240
|
+
to[prop] = val + (hide ? this.opts.slideOffset * (this.pos.arrow == arr ? 1 : -1) : 0);
|
241
|
+
}
|
242
|
+
if (this.opts.fade) {
|
243
|
+
from.opacity = hide ? this.$tip.css('opacity') : 0;
|
244
|
+
to.opacity = hide ? 0 : this.opacity;
|
245
|
+
}
|
246
|
+
this.$tip.css(from).animate(to, this.opts[hide ? 'hideAniDuration' : 'showAniDuration']);
|
247
|
+
}
|
248
|
+
hide ? this.$tip.queue($.proxy(this.reset, this)) : this.$tip.css('visibility', 'inherit');
|
249
|
+
this.$tip.data('active', !active);
|
250
|
+
},
|
251
|
+
disable: function() {
|
252
|
+
this.reset();
|
253
|
+
this.disabled = true;
|
254
|
+
},
|
255
|
+
enable: function() {
|
256
|
+
this.disabled = false;
|
257
|
+
},
|
258
|
+
destroy: function() {
|
259
|
+
this.reset();
|
260
|
+
this.$tip.remove();
|
261
|
+
this.$elm.unbind('poshytip').removeData('title.poshytip').removeData('poshytip');
|
262
|
+
tips.splice($.inArray(this, tips), 1);
|
263
|
+
},
|
264
|
+
clearTimeouts: function() {
|
265
|
+
if (this.showTimeout) {
|
266
|
+
clearTimeout(this.showTimeout);
|
267
|
+
this.showTimeout = 0;
|
268
|
+
}
|
269
|
+
if (this.hideTimeout) {
|
270
|
+
clearTimeout(this.hideTimeout);
|
271
|
+
this.hideTimeout = 0;
|
272
|
+
}
|
273
|
+
},
|
274
|
+
calcPos: function() {
|
275
|
+
var pos = {l: 0, t: 0, arrow: ''},
|
276
|
+
$win = $(window),
|
277
|
+
win = {
|
278
|
+
l: $win.scrollLeft(),
|
279
|
+
t: $win.scrollTop(),
|
280
|
+
w: $win.width(),
|
281
|
+
h: $win.height()
|
282
|
+
}, xL, xC, xR, yT, yC, yB;
|
283
|
+
if (this.opts.alignTo == 'cursor') {
|
284
|
+
xL = xC = xR = this.eventX;
|
285
|
+
yT = yC = yB = this.eventY;
|
286
|
+
} else { // this.opts.alignTo == 'target'
|
287
|
+
var elmOffset = this.$elm.offset(),
|
288
|
+
elm = {
|
289
|
+
l: elmOffset.left,
|
290
|
+
t: elmOffset.top,
|
291
|
+
w: this.$elm.outerWidth(),
|
292
|
+
h: this.$elm.outerHeight()
|
293
|
+
};
|
294
|
+
xL = elm.l + (this.opts.alignX != 'inner-right' ? 0 : elm.w); // left edge
|
295
|
+
xC = xL + Math.floor(elm.w / 2); // h center
|
296
|
+
xR = xL + (this.opts.alignX != 'inner-left' ? elm.w : 0); // right edge
|
297
|
+
yT = elm.t + (this.opts.alignY != 'inner-bottom' ? 0 : elm.h); // top edge
|
298
|
+
yC = yT + Math.floor(elm.h / 2); // v center
|
299
|
+
yB = yT + (this.opts.alignY != 'inner-top' ? elm.h : 0); // bottom edge
|
300
|
+
}
|
301
|
+
|
302
|
+
// keep in viewport and calc arrow position
|
303
|
+
switch (this.opts.alignX) {
|
304
|
+
case 'right':
|
305
|
+
case 'inner-left':
|
306
|
+
pos.l = xR + this.opts.offsetX;
|
307
|
+
if (pos.l + this.tipOuterW > win.l + win.w)
|
308
|
+
pos.l = win.l + win.w - this.tipOuterW;
|
309
|
+
if (this.opts.alignX == 'right' || this.opts.alignY == 'center')
|
310
|
+
pos.arrow = 'left';
|
311
|
+
break;
|
312
|
+
case 'center':
|
313
|
+
pos.l = xC - Math.floor(this.tipOuterW / 2);
|
314
|
+
if (pos.l + this.tipOuterW > win.l + win.w)
|
315
|
+
pos.l = win.l + win.w - this.tipOuterW;
|
316
|
+
else if (pos.l < win.l)
|
317
|
+
pos.l = win.l;
|
318
|
+
break;
|
319
|
+
default: // 'left' || 'inner-right'
|
320
|
+
pos.l = xL - this.tipOuterW - this.opts.offsetX;
|
321
|
+
if (pos.l < win.l)
|
322
|
+
pos.l = win.l;
|
323
|
+
if (this.opts.alignX == 'left' || this.opts.alignY == 'center')
|
324
|
+
pos.arrow = 'right';
|
325
|
+
}
|
326
|
+
switch (this.opts.alignY) {
|
327
|
+
case 'bottom':
|
328
|
+
case 'inner-top':
|
329
|
+
pos.t = yB + this.opts.offsetY;
|
330
|
+
// 'left' and 'right' need priority for 'target'
|
331
|
+
if (!pos.arrow || this.opts.alignTo == 'cursor')
|
332
|
+
pos.arrow = 'top';
|
333
|
+
if (pos.t + this.tipOuterH > win.t + win.h) {
|
334
|
+
pos.t = yT - this.tipOuterH - this.opts.offsetY;
|
335
|
+
if (pos.arrow == 'top')
|
336
|
+
pos.arrow = 'bottom';
|
337
|
+
}
|
338
|
+
break;
|
339
|
+
case 'center':
|
340
|
+
pos.t = yC - Math.floor(this.tipOuterH / 2);
|
341
|
+
if (pos.t + this.tipOuterH > win.t + win.h)
|
342
|
+
pos.t = win.t + win.h - this.tipOuterH;
|
343
|
+
else if (pos.t < win.t)
|
344
|
+
pos.t = win.t;
|
345
|
+
break;
|
346
|
+
default: // 'top' || 'inner-bottom'
|
347
|
+
pos.t = yT - this.tipOuterH - this.opts.offsetY;
|
348
|
+
// 'left' and 'right' need priority for 'target'
|
349
|
+
if (!pos.arrow || this.opts.alignTo == 'cursor')
|
350
|
+
pos.arrow = 'bottom';
|
351
|
+
if (pos.t < win.t) {
|
352
|
+
pos.t = yB + this.opts.offsetY;
|
353
|
+
if (pos.arrow == 'bottom')
|
354
|
+
pos.arrow = 'top';
|
355
|
+
}
|
356
|
+
}
|
357
|
+
this.pos = pos;
|
358
|
+
}
|
359
|
+
};
|
360
|
+
|
361
|
+
$.fn.poshytip = function(options){
|
362
|
+
if (typeof options == 'string') {
|
363
|
+
return this.each(function() {
|
364
|
+
var poshytip = $(this).data('poshytip');
|
365
|
+
if (poshytip && poshytip[options])
|
366
|
+
poshytip[options]();
|
367
|
+
});
|
368
|
+
}
|
369
|
+
|
370
|
+
var opts = $.extend({}, $.fn.poshytip.defaults, options);
|
371
|
+
|
372
|
+
// generate CSS for this tip class if not already generated
|
373
|
+
if (!$('#poshytip-css-' + opts.className)[0])
|
374
|
+
$(['<style id="poshytip-css-',opts.className,'" type="text/css">',
|
375
|
+
'div.',opts.className,'{visibility:hidden;position:absolute;top:0;left:0;}',
|
376
|
+
'div.',opts.className,' table, div.',opts.className,' td{margin:0;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;}',
|
377
|
+
'div.',opts.className,' td.tip-bg-image span{display:block;font:1px/1px sans-serif;height:',opts.bgImageFrameSize,'px;width:',opts.bgImageFrameSize,'px;overflow:hidden;}',
|
378
|
+
'div.',opts.className,' td.tip-right{background-position:100% 0;}',
|
379
|
+
'div.',opts.className,' td.tip-bottom{background-position:100% 100%;}',
|
380
|
+
'div.',opts.className,' td.tip-left{background-position:0 100%;}',
|
381
|
+
'div.',opts.className,' div.tip-inner{background-position:-',opts.bgImageFrameSize,'px -',opts.bgImageFrameSize,'px;}',
|
382
|
+
'div.',opts.className,' div.tip-arrow{visibility:hidden;position:absolute;overflow:hidden;font:1px/1px sans-serif;}',
|
383
|
+
'</style>'].join('')).appendTo('head');
|
384
|
+
|
385
|
+
return this.each(function() {
|
386
|
+
new $.Poshytip(this, opts);
|
387
|
+
});
|
388
|
+
}
|
389
|
+
|
390
|
+
// default settings
|
391
|
+
$.fn.poshytip.defaults = {
|
392
|
+
content: '[title]', // content to display ('[title]', 'string', element, function(updateCallback){...}, jQuery)
|
393
|
+
className: 'tip-yellow', // class for the tips
|
394
|
+
bgImageFrameSize: 10, // size in pixels for the background-image (if set in CSS) frame around the inner content of the tip
|
395
|
+
showTimeout: 500, // timeout before showing the tip (in milliseconds 1000 == 1 second)
|
396
|
+
hideTimeout: 100, // timeout before hiding the tip
|
397
|
+
showOn: 'hover', // handler for showing the tip ('hover', 'focus', 'none') - use 'none' to trigger it manually
|
398
|
+
alignTo: 'cursor', // align/position the tip relative to ('cursor', 'target')
|
399
|
+
alignX: 'right', // horizontal alignment for the tip relative to the mouse cursor or the target element
|
400
|
+
// ('right', 'center', 'left', 'inner-left', 'inner-right') - 'inner-*' matter if alignTo:'target'
|
401
|
+
alignY: 'top', // vertical alignment for the tip relative to the mouse cursor or the target element
|
402
|
+
// ('bottom', 'center', 'top', 'inner-bottom', 'inner-top') - 'inner-*' matter if alignTo:'target'
|
403
|
+
offsetX: -22, // offset X pixels from the default position - doesn't matter if alignX:'center'
|
404
|
+
offsetY: 18, // offset Y pixels from the default position - doesn't matter if alignY:'center'
|
405
|
+
allowTipHover: true, // allow hovering the tip without hiding it onmouseout of the target - matters only if showOn:'hover'
|
406
|
+
followCursor: false, // if the tip should follow the cursor - matters only if showOn:'hover' and alignTo:'cursor'
|
407
|
+
fade: true, // use fade animation
|
408
|
+
slide: true, // use slide animation
|
409
|
+
slideOffset: 8, // slide animation offset
|
410
|
+
showAniDuration: 300, // show animation duration - set to 0 if you don't want show animation
|
411
|
+
hideAniDuration: 300 // hide animation duration - set to 0 if you don't want hide animation
|
412
|
+
};
|
413
|
+
|
414
|
+
})(jQuery);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* Poshy Tip jQuery plugin v1.0
|
3
|
+
* http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/
|
4
|
+
* Copyright 2010, Vasil Dinkov, http://vadikom.com/
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function(e){var a=[],d=/^url\(["']?([^"'\)]*)["']?\);?$/i,c=/\.png$/i,b=e.browser.msie&&e.browser.version==6;function f(){e.each(a,function(){this.refresh(true)})}e(window).resize(f);e.Poshytip=function(h,g){this.$elm=e(h);this.opts=e.extend({},e.fn.poshytip.defaults,g);this.$tip=e(['<div class="',this.opts.className,'">','<div class="tip-inner tip-bg-image"></div>','<div class="tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left"></div>',"</div>"].join(""));this.$arrow=this.$tip.find("div.tip-arrow");this.$inner=this.$tip.find("div.tip-inner");this.disabled=false;this.init()};e.Poshytip.prototype={init:function(){a.push(this);this.$elm.data("title.poshytip",this.$elm.attr("title")).data("poshytip",this);switch(this.opts.showOn){case"hover":this.$elm.bind({"mouseenter.poshytip":e.proxy(this.mouseenter,this),"mouseleave.poshytip":e.proxy(this.mouseleave,this)});if(this.opts.alignTo=="cursor"){this.$elm.bind("mousemove.poshytip",e.proxy(this.mousemove,this))}if(this.opts.allowTipHover){this.$tip.hover(e.proxy(this.clearTimeouts,this),e.proxy(this.hide,this))}break;case"focus":this.$elm.bind({"focus.poshytip":e.proxy(this.show,this),"blur.poshytip":e.proxy(this.hide,this)});break}},mouseenter:function(g){if(this.disabled){return true}this.clearTimeouts();this.$elm.attr("title","");this.showTimeout=setTimeout(e.proxy(this.show,this),this.opts.showTimeout)},mouseleave:function(){if(this.disabled){return true}this.clearTimeouts();this.$elm.attr("title",this.$elm.data("title.poshytip"));this.hideTimeout=setTimeout(e.proxy(this.hide,this),this.opts.hideTimeout)},mousemove:function(g){if(this.disabled){return true}this.eventX=g.pageX;this.eventY=g.pageY;if(this.opts.followCursor&&this.$tip.data("active")){this.calcPos();this.$tip.css({left:this.pos.l,top:this.pos.t});if(this.pos.arrow){this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow}}},show:function(){if(this.disabled||this.$tip.data("active")){return}this.reset();this.update();this.display()},hide:function(){if(this.disabled||!this.$tip.data("active")){return}this.display(true)},reset:function(){this.$tip.queue([]).detach().css("visibility","hidden").data("active",false);this.$inner.find("*").poshytip("hide");if(this.opts.fade){this.$tip.css("opacity",this.opacity)}this.$arrow[0].className="tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left"},update:function(i){if(this.disabled){return}var h=i!==undefined;if(h){if(!this.$tip.data("active")){return}}else{i=this.opts.content}this.$inner.contents().detach();var g=this;this.$inner.append(typeof i=="function"?i.call(this.$elm[0],function(j){g.update(j)}):i=="[title]"?this.$elm.data("title.poshytip"):i);this.refresh(h)},refresh:function(h){if(this.disabled){return}if(h){if(!this.$tip.data("active")){return}var k={left:this.$tip.css("left"),top:this.$tip.css("top")}}this.$tip.css({left:0,top:0}).appendTo(document.body);if(this.opacity===undefined){this.opacity=this.$tip.css("opacity")}var l=this.$tip.css("background-image").match(d),m=this.$arrow.css("background-image").match(d);if(l){var i=c.test(l[1]);if(b&&i){this.$tip.css("background-image","none");this.$inner.css({margin:0,border:0,padding:0});l=i=false}else{this.$tip.prepend('<table border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>').css({border:0,padding:0,"background-image":"none","background-color":"transparent"}).find(".tip-bg-image").css("background-image",'url("'+l[1]+'")').end().find("td").eq(3).append(this.$inner)}if(i&&!e.support.opacity){this.opts.fade=false}}if(m&&!e.support.opacity){if(b&&c.test(m[1])){m=false;this.$arrow.css("background-image","none")}this.opts.fade=false}var o=this.$tip.find("table");if(b){this.$tip[0].style.width="";o.width("auto").find("td").eq(3).width("auto");var n=this.$tip.width(),j=parseInt(this.$tip.css("min-width")),g=parseInt(this.$tip.css("max-width"));if(!isNaN(j)&&n<j){n=j}else{if(!isNaN(g)&&n>g){n=g}}this.$tip.add(o).width(n).eq(0).find("td").eq(3).width("100%")}else{if(o[0]){o.width("auto").find("td").eq(3).width("auto").end().end().width(this.$tip.width()).find("td").eq(3).width("100%")}}this.tipOuterW=this.$tip.outerWidth();this.tipOuterH=this.$tip.outerHeight();this.calcPos();if(m&&this.pos.arrow){this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow;this.$arrow.css("visibility","inherit")}if(h){this.$tip.css(k).animate({left:this.pos.l,top:this.pos.t},200)}else{this.$tip.css({left:this.pos.l,top:this.pos.t})}},display:function(h){var i=this.$tip.data("active");if(i&&!h||!i&&h){return}this.$tip.stop();if((this.opts.slide&&this.pos.arrow||this.opts.fade)&&(h&&this.opts.hideAniDuration||!h&&this.opts.showAniDuration)){var m={},l={};if(this.opts.slide&&this.pos.arrow){var k,g;if(this.pos.arrow=="bottom"||this.pos.arrow=="top"){k="top";g="bottom"}else{k="left";g="right"}var j=parseInt(this.$tip.css(k));m[k]=j+(h?0:this.opts.slideOffset*(this.pos.arrow==g?-1:1));l[k]=j+(h?this.opts.slideOffset*(this.pos.arrow==g?1:-1):0)}if(this.opts.fade){m.opacity=h?this.$tip.css("opacity"):0;l.opacity=h?0:this.opacity}this.$tip.css(m).animate(l,this.opts[h?"hideAniDuration":"showAniDuration"])}h?this.$tip.queue(e.proxy(this.reset,this)):this.$tip.css("visibility","inherit");this.$tip.data("active",!i)},disable:function(){this.reset();this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.reset();this.$tip.remove();this.$elm.unbind("poshytip").removeData("title.poshytip").removeData("poshytip");a.splice(e.inArray(this,a),1)},clearTimeouts:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}},calcPos:function(){var n={l:0,t:0,arrow:""},h=e(window),k={l:h.scrollLeft(),t:h.scrollTop(),w:h.width(),h:h.height()},p,j,m,i,q,g;if(this.opts.alignTo=="cursor"){p=j=m=this.eventX;i=q=g=this.eventY}else{var o=this.$elm.offset(),l={l:o.left,t:o.top,w:this.$elm.outerWidth(),h:this.$elm.outerHeight()};p=l.l+(this.opts.alignX!="inner-right"?0:l.w);j=p+Math.floor(l.w/2);m=p+(this.opts.alignX!="inner-left"?l.w:0);i=l.t+(this.opts.alignY!="inner-bottom"?0:l.h);q=i+Math.floor(l.h/2);g=i+(this.opts.alignY!="inner-top"?l.h:0)}switch(this.opts.alignX){case"right":case"inner-left":n.l=m+this.opts.offsetX;if(n.l+this.tipOuterW>k.l+k.w){n.l=k.l+k.w-this.tipOuterW}if(this.opts.alignX=="right"||this.opts.alignY=="center"){n.arrow="left"}break;case"center":n.l=j-Math.floor(this.tipOuterW/2);if(n.l+this.tipOuterW>k.l+k.w){n.l=k.l+k.w-this.tipOuterW}else{if(n.l<k.l){n.l=k.l}}break;default:n.l=p-this.tipOuterW-this.opts.offsetX;if(n.l<k.l){n.l=k.l}if(this.opts.alignX=="left"||this.opts.alignY=="center"){n.arrow="right"}}switch(this.opts.alignY){case"bottom":case"inner-top":n.t=g+this.opts.offsetY;if(!n.arrow||this.opts.alignTo=="cursor"){n.arrow="top"}if(n.t+this.tipOuterH>k.t+k.h){n.t=i-this.tipOuterH-this.opts.offsetY;if(n.arrow=="top"){n.arrow="bottom"}}break;case"center":n.t=q-Math.floor(this.tipOuterH/2);if(n.t+this.tipOuterH>k.t+k.h){n.t=k.t+k.h-this.tipOuterH}else{if(n.t<k.t){n.t=k.t}}break;default:n.t=i-this.tipOuterH-this.opts.offsetY;if(!n.arrow||this.opts.alignTo=="cursor"){n.arrow="bottom"}if(n.t<k.t){n.t=g+this.opts.offsetY;if(n.arrow=="bottom"){n.arrow="top"}}}this.pos=n}};e.fn.poshytip=function(g){if(typeof g=="string"){return this.each(function(){var i=e(this).data("poshytip");if(i&&i[g]){i[g]()}})}var h=e.extend({},e.fn.poshytip.defaults,g);if(!e("#poshytip-css-"+h.className)[0]){e(['<style id="poshytip-css-',h.className,'" type="text/css">',"div.",h.className,"{visibility:hidden;position:absolute;top:0;left:0;}","div.",h.className," table, div.",h.className," td{margin:0;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;}","div.",h.className," td.tip-bg-image span{display:block;font:1px/1px sans-serif;height:",h.bgImageFrameSize,"px;width:",h.bgImageFrameSize,"px;overflow:hidden;}","div.",h.className," td.tip-right{background-position:100% 0;}","div.",h.className," td.tip-bottom{background-position:100% 100%;}","div.",h.className," td.tip-left{background-position:0 100%;}","div.",h.className," div.tip-inner{background-position:-",h.bgImageFrameSize,"px -",h.bgImageFrameSize,"px;}","div.",h.className," div.tip-arrow{visibility:hidden;position:absolute;overflow:hidden;font:1px/1px sans-serif;}","</style>"].join("")).appendTo("head")}return this.each(function(){new e.Poshytip(this,h)})};e.fn.poshytip.defaults={content:"[title]",className:"tip-yellow",bgImageFrameSize:10,showTimeout:500,hideTimeout:100,showOn:"hover",alignTo:"cursor",alignX:"right",alignY:"top",offsetX:-22,offsetY:18,allowTipHover:true,followCursor:false,fade:true,slide:true,slideOffset:8,showAniDuration:300,hideAniDuration:300}})(jQuery);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/* German initialisation for the jQuery UI date picker plugin. */
|
2
|
+
/* Written by Milian Wolff (mail@milianw.de). */
|
3
|
+
jQuery(function($){
|
4
|
+
$.datepicker.regional['de'] = {
|
5
|
+
closeText: 'schließen',
|
6
|
+
prevText: '<zurück',
|
7
|
+
nextText: 'Vor>',
|
8
|
+
currentText: 'heute',
|
9
|
+
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
10
|
+
'Juli','August','September','Oktober','November','Dezember'],
|
11
|
+
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
12
|
+
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
13
|
+
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
14
|
+
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
15
|
+
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
16
|
+
weekHeader: 'Wo',
|
17
|
+
dateFormat: 'dd.mm.yy',
|
18
|
+
firstDay: 1,
|
19
|
+
isRTL: false,
|
20
|
+
showMonthAfterYear: false,
|
21
|
+
yearSuffix: ''};
|
22
|
+
$.datepicker.setDefaults($.datepicker.regional['de']);
|
23
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function($){$.ajaxSettings.accepts._default="text/javascript, text/html, application/xml, text/xml, */*"})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(){return this.each(function(){this.disabled=false})};$.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click"}else{if(obs&&(field.type=="text"||field.type=="textarea"||field.type=="password")){e="keyup"}}return e}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){var observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1000);observed.oldVal=observed.obj.formVal()}}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){var observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.oldVal){return}else{window.delayedObserverCallback(stackPos)}})})}else{el.bind($.fieldEvent(el,delay),function(){var observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize()}if(el.type=="checkbox"||el.type=="radio"){return this.filter("input:checked").val()||""}else{return this.val()}}})})(jQuery);(function($){$.fn.extend({visualEffect:function(o,options){if(options){speed=options.duration*1000}else{speed=null}e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval("$(this)."+e+"("+speed+")")},appear:function(speed,callback){return this.fadeIn(speed,callback)},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback)},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback)},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback)},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback)},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback)},fade:function(speed,callback){return this.fadeOut(speed,callback)},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback)},fold:function(speed,callback){return this.hide("fold",{},speed,callback)},foldOut:function(speed,callback){return this.show("fold",{},speed,callback)},grow:function(speed,callback){return this.show("scale",{},speed,callback)},highlight:function(speed,callback){return this.show("highlight",{},speed,callback)},puff:function(speed,callback){return this.hide("puff",{},speed,callback)},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback)},shake:function(speed,callback){return this.show("shake",{},speed,callback)},shrink:function(speed,callback){return this.hide("scale",{},speed,callback)},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback)},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback)},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback)},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback)},switchOn:function(speed,callback){return this.show("clip",{},speed,callback)}})})(jQuery);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
$.fn.multipleAutocomplete = function(options) {
|
2
|
+
|
3
|
+
var values = options.source;
|
4
|
+
|
5
|
+
var split = function(val) {
|
6
|
+
return val.split(/\s*,\s*/);
|
7
|
+
};
|
8
|
+
|
9
|
+
var extractLast = function(term) {
|
10
|
+
return split(term).pop();
|
11
|
+
};
|
12
|
+
|
13
|
+
this.autocomplete({
|
14
|
+
minLength: 0,
|
15
|
+
source: function(request, response) {
|
16
|
+
// delegate back to autocomplete, but extract the last term
|
17
|
+
response($.ui.autocomplete.filter(values, extractLast(request.term)));
|
18
|
+
},
|
19
|
+
focus: function() {
|
20
|
+
// prevent value inserted on focus
|
21
|
+
return false;
|
22
|
+
},
|
23
|
+
select: function(event, ui) {
|
24
|
+
var terms = split( this.value );
|
25
|
+
// remove the current input
|
26
|
+
terms.pop();
|
27
|
+
// add the selected item
|
28
|
+
terms.push( ui.item.value );
|
29
|
+
// add placeholder to get the comma-and-space at the end
|
30
|
+
terms.push("");
|
31
|
+
this.value = terms.join(", ");
|
32
|
+
return false;
|
33
|
+
},
|
34
|
+
open: function(event, ui) {
|
35
|
+
$(this).autocomplete('widget').width(500);
|
36
|
+
}
|
37
|
+
});
|
38
|
+
|
39
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
(function(){var n=this,A=n._,r=typeof StopIteration!=="undefined"?StopIteration:"__break__",j=Array.prototype,l=Object.prototype,o=j.slice,B=j.unshift,C=l.toString,p=l.hasOwnProperty,s=j.forEach,t=j.map,u=j.reduce,v=j.reduceRight,w=j.filter,x=j.every,y=j.some,m=j.indexOf,z=j.lastIndexOf;l=Array.isArray;var D=Object.keys,b=function(a){return new k(a)};if(typeof exports!=="undefined")exports._=b;n._=b;b.VERSION="1.0.4";var i=b.forEach=function(a,c,d){try{if(s&&a.forEach===s)a.forEach(c,d);else if(b.isNumber(a.length))for(var e=
|
2
|
+
0,f=a.length;e<f;e++)c.call(d,a[e],e,a);else for(e in a)p.call(a,e)&&c.call(d,a[e],e,a)}catch(g){if(g!=r)throw g;}return a};b.map=function(a,c,d){if(t&&a.map===t)return a.map(c,d);var e=[];i(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(u&&a.reduce===u)return a.reduce(b.bind(d,e),c);i(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(v&&a.reduceRight===v)return a.reduceRight(b.bind(d,e),c);a=b.clone(b.toArray(a)).reverse();return b.reduce(a,
|
3
|
+
c,d,e)};b.detect=function(a,c,d){var e;i(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.filter=function(a,c,d){if(w&&a.filter===w)return a.filter(c,d);var e=[];i(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];i(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.every=function(a,c,d){c=c||b.identity;if(x&&a.every===x)return a.every(c,d);var e=true;i(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.some=
|
4
|
+
function(a,c,d){c=c||b.identity;if(y&&a.some===y)return a.some(c,d);var e=false;i(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(m&&a.indexOf===m)return a.indexOf(c)!=-1;var d=false;i(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,
|
5
|
+
a);var e={computed:-Infinity};i(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};i(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){var g=e.criteria,h=f.criteria;return g<h?-1:g>h?
|
6
|
+
1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return o.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?o.call(a,0,c):a[0]};b.rest=function(a,c,d){return o.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};
|
7
|
+
b.compact=function(a){return b.filter(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.filter(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.filter(b.uniq(a),function(d){return b.every(c,
|
8
|
+
function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(m&&a.indexOf===m)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(z&&a.lastIndexOf===z)return a.lastIndexOf(c);for(var d=a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=
|
9
|
+
1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||{},d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);i(c,function(d){a[d]=b.bind(a[d],a)});return a};b.memoize=function(a,c){var d={};c=c||b.identity;return function(){var e=c.apply(this,arguments);return e in
|
10
|
+
d?d[e]:(d[e]=a.apply(this,arguments))}};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=D||function(a){if(b.isArray(a))return b.range(0,
|
11
|
+
a.length);var c=[];for(var d in a)p.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a){i(b.rest(arguments),function(c){for(var d in c)a[d]=c[d]});return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;
|
12
|
+
if(a==c)return true;if(!a&&c||a&&!c)return false;if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return false;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!(f in c)||!b.isEqual(a[f],
|
13
|
+
c[f]))return false;return true};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(p.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=l||function(a){return!!(a&&a.concat&&a.unshift&&!a.callee)};b.isArguments=function(a){return a&&a.callee};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return a===
|
14
|
+
+a||C.call(a)==="[object Number]"};b.isBoolean=function(a){return a===true||a===false};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){n._=A;return this};b.identity=function(a){return a};b.times=function(a,c,d){for(var e=
|
15
|
+
0;e<a;e++)c.call(d,e)};b.breakLoop=function(){throw r;};b.mixin=function(a){i(b.functions(a),function(c){E(c,b[c]=a[c])})};var F=0;b.uniqueId=function(a){var c=F++;return a?a+c:c};b.templateSettings={start:"<%",end:"%>",interpolate:/<%=(.+?)%>/g};b.template=function(a,c){var d=b.templateSettings,e=new RegExp("'(?=[^"+d.end.substr(0,1)+"]*"+d.end.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")+")","g");d=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
|
16
|
+
" ").replace(e,"\t").split("'").join("\\'").split("\t").join("'").replace(d.interpolate,"',$1,'").split(d.start).join("');").split(d.end).join("p.push('")+"');}return p.join('');");return c?d(c):d};b.each=b.forEach;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.select=b.filter;b.all=b.every;b.any=b.some;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var k=function(a){this._wrapped=a},q=function(a,c){return c?b(a).chain():a},E=function(a,c){k.prototype[a]=function(){var d=b.toArray(arguments);
|
17
|
+
B.call(d,this._wrapped);return q(c.apply(b,d),this._chain)}};b.mixin(b);i(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=j[a];k.prototype[a]=function(){c.apply(this._wrapped,arguments);return q(this._wrapped,this._chain)}});i(["concat","join","slice"],function(a){var c=j[a];k.prototype[a]=function(){return q(c.apply(this._wrapped,arguments),this._chain)}});k.prototype.chain=function(){this._chain=true;return this};k.prototype.value=function(){return this._wrapped}})();
|