refinerycms 0.9.6.19 → 0.9.6.21
Sign up to get free protection for your applications and to get access to all the features.
- data/.gems +0 -8
- data/.gitignore +3 -1
- data/Rakefile +1 -5
- data/VERSION +1 -1
- data/bin/refinery-update-core +11 -2
- data/config/application.rb +6 -1
- data/config/environments/development.rb +10 -6
- data/config/settings.rb +3 -0
- data/db/migrate/20100305023036_change_users_columns_for_authlogic.rb +46 -0
- data/db/migrate/20100305023037_remove_unused_users_columns.rb +16 -0
- data/db/migrate/20100312155331_make_user_perishable_token_nullable.rb +13 -0
- data/db/migrate/20100312160327_make_user_persistence_token_nullable.rb +13 -0
- data/db/migrate/20100315203301_remove_state_from_users.rb +9 -0
- data/db/schema.rb +8 -21
- data/db/seeds.rb +5 -19
- data/lib/refinery/tasks/refinery.rb +1 -1
- data/public/javascripts/admin.js +6 -2
- data/public/javascripts/jquery-ui-1.8.min.js +374 -0
- data/public/javascripts/jquery.js +606 -444
- data/public/javascripts/refinery/admin.js +30 -9
- data/public/javascripts/refinery/boot_wym.js +4 -0
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +3 -4
- data/public/stylesheets/refinery/refinery.css +11 -0
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +3 -1
- data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +5 -5
- data/readme.md +13 -10
- data/test/fixtures/users.yml +5 -5
- data/test/functional/dashboard_controller_test.rb +0 -4
- data/test/functional/images_controller_test.rb +0 -3
- data/test/test_helper.rb +7 -3
- data/themes/hemingway/views/layouts/application.html.erb +1 -12
- data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +1 -3
- data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +3 -14
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +26 -37
- data/vendor/plugins/authentication/app/models/user.rb +29 -112
- data/vendor/plugins/authentication/app/models/user_mailer.rb +8 -5
- data/vendor/plugins/authentication/app/models/user_session.rb +9 -0
- data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +1 -1
- data/vendor/plugins/authentication/app/views/sessions/new.html.erb +5 -4
- data/vendor/plugins/authentication/lib/authenticated_system.rb +40 -30
- data/vendor/plugins/authentication/rails/init.rb +9 -0
- data/vendor/plugins/authlogic/CHANGELOG.rdoc +345 -0
- data/vendor/plugins/authlogic/LICENSE +20 -0
- data/vendor/plugins/authlogic/README.rdoc +246 -0
- data/vendor/plugins/authlogic/Rakefile +42 -0
- data/vendor/plugins/authlogic/VERSION.yml +5 -0
- data/vendor/plugins/authlogic/authlogic.gemspec +217 -0
- data/vendor/plugins/authlogic/generators/session/session_generator.rb +9 -0
- data/vendor/plugins/authlogic/generators/session/templates/session.rb +2 -0
- data/vendor/plugins/authlogic/init.rb +1 -0
- data/vendor/plugins/authlogic/lib/authlogic.rb +64 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb +107 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/email.rb +110 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/logged_in_status.rb +60 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb +141 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/magic_columns.rb +24 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/password.rb +355 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/perishable_token.rb +105 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/persistence_token.rb +68 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/restful_authentication.rb +61 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb +139 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/single_access_token.rb +65 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/validations_scope.rb +32 -0
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/association.rb +42 -0
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/base.rb +55 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb +67 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/merb_adapter.rb +30 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/rails_adapter.rb +48 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/sinatra_adapter.rb +61 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/aes256.rb +43 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/bcrypt.rb +90 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/md5.rb +34 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha1.rb +35 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha256.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha512.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/wordpress.rb +43 -0
- data/vendor/plugins/authlogic/lib/authlogic/i18n.rb +83 -0
- data/vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb +15 -0
- data/vendor/plugins/authlogic/lib/authlogic/random.rb +33 -0
- data/vendor/plugins/authlogic/lib/authlogic/regex.rb +25 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/activation.rb +58 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/active_record_trickery.rb +64 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/base.rb +37 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/brute_force_protection.rb +96 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb +99 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/cookies.rb +130 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/existence.rb +93 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/foundation.rb +63 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/http_auth.rb +58 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/id.rb +41 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/klass.rb +78 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_columns.rb +95 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_states.rb +59 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/params.rb +101 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/password.rb +240 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/perishable_token.rb +18 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/persistence.rb +70 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/priority_record.rb +34 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/scopes.rb +101 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/session.rb +62 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/timeout.rb +82 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/unauthorized_record.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/validation.rb +82 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case.rb +120 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_controller.rb +45 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_cookie_jar.rb +14 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_logger.rb +10 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_request.rb +19 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/rails_request_adapter.rb +30 -0
- data/vendor/plugins/authlogic/rails/init.rb +1 -0
- data/vendor/plugins/authlogic/shoulda_macros/authlogic.rb +69 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/base_test.rb +18 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/email_test.rb +97 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/logged_in_status_test.rb +36 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/login_test.rb +109 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/magic_columns_test.rb +27 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/password_test.rb +236 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/perishable_token_test.rb +90 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/persistence_token_test.rb +55 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/restful_authentication_test.rb +40 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/session_maintenance_test.rb +84 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/single_access_test.rb +44 -0
- data/vendor/plugins/authlogic/test/authenticates_many_test.rb +16 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/aes256_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/bcrypt_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha1_test.rb +23 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha256_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha512_test.rb +14 -0
- data/vendor/plugins/authlogic/test/fixtures/companies.yml +5 -0
- data/vendor/plugins/authlogic/test/fixtures/employees.yml +17 -0
- data/vendor/plugins/authlogic/test/fixtures/projects.yml +3 -0
- data/vendor/plugins/authlogic/test/fixtures/users.yml +24 -0
- data/vendor/plugins/authlogic/test/i18n_test.rb +33 -0
- data/vendor/plugins/authlogic/test/libs/affiliate.rb +7 -0
- data/vendor/plugins/authlogic/test/libs/company.rb +6 -0
- data/vendor/plugins/authlogic/test/libs/employee.rb +7 -0
- data/vendor/plugins/authlogic/test/libs/employee_session.rb +2 -0
- data/vendor/plugins/authlogic/test/libs/ldaper.rb +3 -0
- data/vendor/plugins/authlogic/test/libs/ordered_hash.rb +9 -0
- data/vendor/plugins/authlogic/test/libs/project.rb +3 -0
- data/vendor/plugins/authlogic/test/libs/user.rb +5 -0
- data/vendor/plugins/authlogic/test/libs/user_session.rb +6 -0
- data/vendor/plugins/authlogic/test/random_test.rb +49 -0
- data/vendor/plugins/authlogic/test/session_test/activation_test.rb +43 -0
- data/vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb +36 -0
- data/vendor/plugins/authlogic/test/session_test/brute_force_protection_test.rb +101 -0
- data/vendor/plugins/authlogic/test/session_test/callbacks_test.rb +6 -0
- data/vendor/plugins/authlogic/test/session_test/cookies_test.rb +112 -0
- data/vendor/plugins/authlogic/test/session_test/credentials_test.rb +0 -0
- data/vendor/plugins/authlogic/test/session_test/existence_test.rb +64 -0
- data/vendor/plugins/authlogic/test/session_test/http_auth_test.rb +28 -0
- data/vendor/plugins/authlogic/test/session_test/id_test.rb +17 -0
- data/vendor/plugins/authlogic/test/session_test/klass_test.rb +40 -0
- data/vendor/plugins/authlogic/test/session_test/magic_columns_test.rb +62 -0
- data/vendor/plugins/authlogic/test/session_test/magic_states_test.rb +60 -0
- data/vendor/plugins/authlogic/test/session_test/params_test.rb +53 -0
- data/vendor/plugins/authlogic/test/session_test/password_test.rb +106 -0
- data/vendor/plugins/authlogic/test/session_test/perishability_test.rb +15 -0
- data/vendor/plugins/authlogic/test/session_test/persistence_test.rb +21 -0
- data/vendor/plugins/authlogic/test/session_test/scopes_test.rb +60 -0
- data/vendor/plugins/authlogic/test/session_test/session_test.rb +59 -0
- data/vendor/plugins/authlogic/test/session_test/timeout_test.rb +52 -0
- data/vendor/plugins/authlogic/test/session_test/unauthorized_record_test.rb +13 -0
- data/vendor/plugins/authlogic/test/session_test/validation_test.rb +23 -0
- data/vendor/plugins/authlogic/test/test_helper.rb +182 -0
- data/vendor/plugins/dashboard/app/helpers/admin/dashboard_helper.rb +1 -1
- data/vendor/plugins/friendly_id/Changelog.md +243 -0
- data/vendor/plugins/friendly_id/Contributors.md +30 -0
- data/vendor/plugins/friendly_id/Gemfile +2 -0
- data/vendor/plugins/friendly_id/Guide.md +509 -0
- data/vendor/plugins/friendly_id/LICENSE +19 -0
- data/vendor/plugins/friendly_id/README.md +76 -0
- data/vendor/plugins/friendly_id/Rakefile +68 -0
- data/vendor/plugins/friendly_id/extras/README.txt +3 -0
- data/vendor/plugins/friendly_id/extras/bench.rb +59 -0
- data/vendor/plugins/friendly_id/extras/extras.rb +31 -0
- data/vendor/plugins/friendly_id/extras/prof.rb +14 -0
- data/vendor/plugins/friendly_id/extras/template-gem.rb +26 -0
- data/vendor/plugins/friendly_id/extras/template-plugin.rb +28 -0
- data/vendor/plugins/friendly_id/friendly_id.gemspec +40 -0
- data/vendor/plugins/friendly_id/generators/friendly_id/friendly_id_generator.rb +28 -0
- data/vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb +18 -0
- data/vendor/plugins/friendly_id/lib/friendly_id.rb +67 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2.rb +47 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/configuration.rb +66 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/finders.rb +140 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/simple_model.rb +162 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slug.rb +111 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slugged_model.rb +323 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks.rb +66 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks/friendly_id.rake +19 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/configuration.rb +132 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/finders.rb +106 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/slug_string.rb +292 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/slugged.rb +91 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/status.rb +35 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/test.rb +175 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/version.rb +8 -0
- data/vendor/plugins/friendly_id/rails/init.rb +2 -0
- data/vendor/plugins/friendly_id/test/active_record2/basic_slugged_model_test.rb +14 -0
- data/vendor/plugins/friendly_id/test/active_record2/cached_slug_test.rb +61 -0
- data/vendor/plugins/friendly_id/test/active_record2/core.rb +93 -0
- data/vendor/plugins/friendly_id/test/active_record2/custom_normalizer_test.rb +20 -0
- data/vendor/plugins/friendly_id/test/active_record2/custom_table_name_test.rb +22 -0
- data/vendor/plugins/friendly_id/test/active_record2/deprecated_test.rb +23 -0
- data/vendor/plugins/friendly_id/test/active_record2/scoped_model_test.rb +111 -0
- data/vendor/plugins/friendly_id/test/active_record2/simple_test.rb +59 -0
- data/vendor/plugins/friendly_id/test/active_record2/slug_test.rb +34 -0
- data/vendor/plugins/friendly_id/test/active_record2/slugged.rb +30 -0
- data/vendor/plugins/friendly_id/test/active_record2/slugged_status_test.rb +61 -0
- data/vendor/plugins/friendly_id/test/active_record2/sti_test.rb +22 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.mysql.yml +4 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.postgres.yml +6 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.sqlite3.yml +2 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/models.rb +78 -0
- data/vendor/plugins/friendly_id/test/active_record2/tasks_test.rb +82 -0
- data/vendor/plugins/friendly_id/test/active_record2/test_helper.rb +114 -0
- data/vendor/plugins/friendly_id/test/friendly_id_test.rb +60 -0
- data/vendor/plugins/friendly_id/test/slug_string_test.rb +78 -0
- data/vendor/plugins/friendly_id/test/test_helper.rb +9 -0
- data/vendor/plugins/hpricot/CHANGELOG +88 -0
- data/vendor/plugins/hpricot/COPYING +18 -0
- data/vendor/plugins/hpricot/README +275 -0
- data/vendor/plugins/hpricot/Rakefile +272 -0
- data/vendor/plugins/hpricot/ext/fast_xs/FastXsService.java +1030 -0
- data/vendor/plugins/hpricot/ext/fast_xs/extconf.rb +4 -0
- data/vendor/plugins/hpricot/ext/fast_xs/fast_xs.c +201 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotCss.java +831 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotScanService.java +2086 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/MANIFEST +0 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/extconf.rb +6 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_common.rl +76 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.c +3503 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.java.rl +155 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.rl +115 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.c +6927 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.h +79 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.java.rl +1152 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.rl +788 -0
- data/vendor/plugins/hpricot/extras/mingw-rbconfig.rb +176 -0
- data/vendor/plugins/hpricot/hpricot.gemspec +17 -0
- data/vendor/plugins/hpricot/lib/hpricot.rb +26 -0
- data/vendor/plugins/hpricot/lib/hpricot/blankslate.rb +63 -0
- data/vendor/plugins/hpricot/lib/hpricot/builder.rb +216 -0
- data/vendor/plugins/hpricot/lib/hpricot/elements.rb +510 -0
- data/vendor/plugins/hpricot/lib/hpricot/htmlinfo.rb +691 -0
- data/vendor/plugins/hpricot/lib/hpricot/inspect.rb +103 -0
- data/vendor/plugins/hpricot/lib/hpricot/modules.rb +40 -0
- data/vendor/plugins/hpricot/lib/hpricot/parse.rb +38 -0
- data/vendor/plugins/hpricot/lib/hpricot/tag.rb +219 -0
- data/vendor/plugins/hpricot/lib/hpricot/tags.rb +164 -0
- data/vendor/plugins/hpricot/lib/hpricot/traverse.rb +839 -0
- data/vendor/plugins/hpricot/lib/hpricot/xchar.rb +94 -0
- data/vendor/plugins/hpricot/setup.rb +1585 -0
- data/vendor/plugins/hpricot/test/files/basic.xhtml +17 -0
- data/vendor/plugins/hpricot/test/files/boingboing.html +2266 -0
- data/vendor/plugins/hpricot/test/files/cy0.html +3653 -0
- data/vendor/plugins/hpricot/test/files/immob.html +400 -0
- data/vendor/plugins/hpricot/test/files/pace_application.html +1320 -0
- data/vendor/plugins/hpricot/test/files/tenderlove.html +16 -0
- data/vendor/plugins/hpricot/test/files/uswebgen.html +220 -0
- data/vendor/plugins/hpricot/test/files/utf8.html +1054 -0
- data/vendor/plugins/hpricot/test/files/week9.html +1723 -0
- data/vendor/plugins/hpricot/test/files/why.xml +19 -0
- data/vendor/plugins/hpricot/test/load_files.rb +7 -0
- data/vendor/plugins/hpricot/test/nokogiri-bench.rb +64 -0
- data/vendor/plugins/hpricot/test/test_alter.rb +96 -0
- data/vendor/plugins/hpricot/test/test_builder.rb +37 -0
- data/vendor/plugins/hpricot/test/test_parser.rb +428 -0
- data/vendor/plugins/hpricot/test/test_paths.rb +25 -0
- data/vendor/plugins/hpricot/test/test_preserved.rb +88 -0
- data/vendor/plugins/hpricot/test/test_xml.rb +28 -0
- data/vendor/plugins/inquiries/app/controllers/admin/inquiries_controller.rb +1 -6
- data/vendor/plugins/inquiries/app/helpers/inquiries_helper.rb +0 -11
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +10 -6
- data/vendor/plugins/inquiries/app/views/inquiry_mailer/confirmation.html.erb +1 -1
- data/vendor/plugins/inquiries/config/routes.rb +1 -1
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +16 -3
- data/vendor/plugins/pages/app/models/page_part.rb +9 -0
- data/vendor/plugins/rails_indexes/lib/indexer.rb +0 -2
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +2 -1
- data/vendor/plugins/refinery/app/views/shared/_head.html.erb +0 -1
- data/vendor/plugins/refinery/app/views/shared/_ie6check.html.erb +23 -11
- data/vendor/plugins/refinery/app/views/welcome.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/wymiframe.html.erb +2 -1
- data/vendor/plugins/refinery/lib/generators/refinery/USAGE +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/migration.rb +2 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/model.rb +4 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb +6 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb +5 -3
- data/vendor/plugins/refinery/lib/refinery/application_helper.rb +2 -2
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +4 -41
- data/vendor/plugins/refinery_settings/app/models/refinery_setting.rb +7 -3
- data/vendor/plugins/slim_scrooge/README.textile +112 -0
- data/vendor/plugins/slim_scrooge/Rakefile +29 -0
- data/vendor/plugins/slim_scrooge/VERSION.yml +5 -0
- data/vendor/plugins/slim_scrooge/ext/Rakefile +42 -0
- data/vendor/plugins/slim_scrooge/ext/extconf.rb +5 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge.rb +16 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsite.rb +96 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsites.rb +70 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/monitored_hash.rb +103 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/result_set.rb +38 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/simple_set.rb +34 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/slim_scrooge.rb +46 -0
- data/vendor/plugins/slim_scrooge/rails/init.rb +8 -0
- data/vendor/plugins/slim_scrooge/slim_scrooge.gemspec +62 -0
- data/vendor/plugins/slim_scrooge/slim_scrooge_windows.gemspec +59 -0
- data/vendor/plugins/slim_scrooge/test/active_record_setup.rb +3 -0
- data/vendor/plugins/slim_scrooge/test/helper.rb +91 -0
- data/vendor/plugins/slim_scrooge/test/models/course.rb +2 -0
- data/vendor/plugins/slim_scrooge/test/schema/schema.rb +5 -0
- data/vendor/plugins/slim_scrooge/test/setup.rb +5 -0
- data/vendor/plugins/themes/app/models/theme.rb +7 -0
- data/vendor/plugins/themes/lib/theme_server.rb +3 -1
- data/vendor/plugins/themes/rails/init.rb +16 -13
- data/vendor/plugins/will_paginate/.manifest +43 -0
- data/vendor/plugins/will_paginate/CHANGELOG.rdoc +139 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +107 -0
- data/vendor/plugins/will_paginate/Rakefile +53 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +90 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +43 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +264 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +408 -0
- data/vendor/plugins/will_paginate/test/boot.rb +21 -0
- data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
- data/vendor/plugins/will_paginate/test/console +8 -0
- data/vendor/plugins/will_paginate/test/database.yml +22 -0
- data/vendor/plugins/will_paginate/test/finder_test.rb +473 -0
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
- data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +13 -0
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
- data/vendor/plugins/will_paginate/test/fixtures/projects.yml +6 -0
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
- data/vendor/plugins/will_paginate/test/fixtures/reply.rb +7 -0
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
- data/vendor/plugins/will_paginate/test/fixtures/topics.yml +30 -0
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
- data/vendor/plugins/will_paginate/test/fixtures/users.yml +35 -0
- data/vendor/plugins/will_paginate/test/helper.rb +37 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +43 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +75 -0
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
- data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +179 -0
- data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
- data/vendor/plugins/will_paginate/test/view_test.rb +373 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +19 -0
- metadata +308 -27
- data/db/migrate/20091029034951_remove_blurb_from_news_items.rb +0 -9
- data/public/javascripts/jquery-ui-1.8rc1.min.js +0 -375
- data/test/fixtures/news_items.yml +0 -14
- data/test/unit/news_items_test.rb +0 -33
- data/vendor/plugins/authentication/test/fixtures/users.yml +0 -19
- data/vendor/plugins/authentication/test/functional/sessions_controller_test.rb +0 -85
- data/vendor/plugins/authentication/test/functional/users_controller_test.rb +0 -99
- data/vendor/plugins/authentication/test/unit/user_test.rb +0 -164
- data/vendor/plugins/news/app/controllers/admin/news_items_controller.rb +0 -5
- data/vendor/plugins/news/app/controllers/news_items_controller.rb +0 -20
- data/vendor/plugins/news/app/models/news_item.rb +0 -24
- data/vendor/plugins/news/app/views/admin/news_items/_form.html.erb +0 -19
- data/vendor/plugins/news/app/views/admin/news_items/_news_item.html.erb +0 -15
- data/vendor/plugins/news/app/views/admin/news_items/edit.html.erb +0 -1
- data/vendor/plugins/news/app/views/admin/news_items/index.html.erb +0 -31
- data/vendor/plugins/news/app/views/admin/news_items/new.html.erb +0 -1
- data/vendor/plugins/news/app/views/news_items/_recent_posts.html.erb +0 -8
- data/vendor/plugins/news/app/views/news_items/index.html.erb +0 -17
- data/vendor/plugins/news/app/views/news_items/index.rss.builder +0 -26
- data/vendor/plugins/news/app/views/news_items/show.html.erb +0 -13
- data/vendor/plugins/news/config/routes.rb +0 -7
- data/vendor/plugins/news/news.md +0 -20
- data/vendor/plugins/news/rails/init.rb +0 -11
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v1.4.
|
2
|
+
* jQuery JavaScript Library v1.4.2
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Copyright 2010, John Resig
|
@@ -11,7 +11,7 @@
|
|
11
11
|
* Copyright 2010, The Dojo Foundation
|
12
12
|
* Released under the MIT, BSD, and GPL Licenses.
|
13
13
|
*
|
14
|
-
* Date:
|
14
|
+
* Date: Sat Feb 13 22:33:48 2010 -0500
|
15
15
|
*/
|
16
16
|
(function( window, undefined ) {
|
17
17
|
|
@@ -86,6 +86,15 @@ jQuery.fn = jQuery.prototype = {
|
|
86
86
|
this.length = 1;
|
87
87
|
return this;
|
88
88
|
}
|
89
|
+
|
90
|
+
// The body element only exists once, optimize finding it
|
91
|
+
if ( selector === "body" && !context ) {
|
92
|
+
this.context = document;
|
93
|
+
this[0] = document.body;
|
94
|
+
this.selector = "body";
|
95
|
+
this.length = 1;
|
96
|
+
return this;
|
97
|
+
}
|
89
98
|
|
90
99
|
// Handle HTML strings
|
91
100
|
if ( typeof selector === "string" ) {
|
@@ -116,7 +125,9 @@ jQuery.fn = jQuery.prototype = {
|
|
116
125
|
ret = buildFragment( [ match[1] ], [ doc ] );
|
117
126
|
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
|
118
127
|
}
|
119
|
-
|
128
|
+
|
129
|
+
return jQuery.merge( this, selector );
|
130
|
+
|
120
131
|
// HANDLE: $("#id")
|
121
132
|
} else {
|
122
133
|
elem = document.getElementById( match[2] );
|
@@ -143,6 +154,7 @@ jQuery.fn = jQuery.prototype = {
|
|
143
154
|
this.selector = selector;
|
144
155
|
this.context = document;
|
145
156
|
selector = document.getElementsByTagName( selector );
|
157
|
+
return jQuery.merge( this, selector );
|
146
158
|
|
147
159
|
// HANDLE: $(expr, $(...))
|
148
160
|
} else if ( !context || context.jquery ) {
|
@@ -165,16 +177,14 @@ jQuery.fn = jQuery.prototype = {
|
|
165
177
|
this.context = selector.context;
|
166
178
|
}
|
167
179
|
|
168
|
-
return jQuery.
|
169
|
-
this.setArray( selector ) :
|
170
|
-
jQuery.makeArray( selector, this );
|
180
|
+
return jQuery.makeArray( selector, this );
|
171
181
|
},
|
172
182
|
|
173
183
|
// Start with an empty selector
|
174
184
|
selector: "",
|
175
185
|
|
176
186
|
// The current version of jQuery being used
|
177
|
-
jquery: "1.4.
|
187
|
+
jquery: "1.4.2",
|
178
188
|
|
179
189
|
// The default length of a jQuery object is 0
|
180
190
|
length: 0,
|
@@ -204,7 +214,14 @@ jQuery.fn = jQuery.prototype = {
|
|
204
214
|
// (returning the new matched element set)
|
205
215
|
pushStack: function( elems, name, selector ) {
|
206
216
|
// Build a new jQuery matched element set
|
207
|
-
var ret = jQuery(
|
217
|
+
var ret = jQuery();
|
218
|
+
|
219
|
+
if ( jQuery.isArray( elems ) ) {
|
220
|
+
push.apply( ret, elems );
|
221
|
+
|
222
|
+
} else {
|
223
|
+
jQuery.merge( ret, elems );
|
224
|
+
}
|
208
225
|
|
209
226
|
// Add the old object onto the stack (as a reference)
|
210
227
|
ret.prevObject = this;
|
@@ -221,18 +238,6 @@ jQuery.fn = jQuery.prototype = {
|
|
221
238
|
return ret;
|
222
239
|
},
|
223
240
|
|
224
|
-
// Force the current matched set of elements to become
|
225
|
-
// the specified array of elements (destroying the stack in the process)
|
226
|
-
// You should use pushStack() in order to do this, but maintain the stack
|
227
|
-
setArray: function( elems ) {
|
228
|
-
// Resetting the length to 0, then using the native Array push
|
229
|
-
// is a super-fast way to populate an object with array-like properties
|
230
|
-
this.length = 0;
|
231
|
-
push.apply( this, elems );
|
232
|
-
|
233
|
-
return this;
|
234
|
-
},
|
235
|
-
|
236
241
|
// Execute a callback for every element in the matched set.
|
237
242
|
// (You can seed the arguments with an array of args, but this is
|
238
243
|
// only used internally.)
|
@@ -492,6 +497,9 @@ jQuery.extend({
|
|
492
497
|
if ( typeof data !== "string" || !data ) {
|
493
498
|
return null;
|
494
499
|
}
|
500
|
+
|
501
|
+
// Make sure leading/trailing whitespace is removed (IE can't handle it)
|
502
|
+
data = jQuery.trim( data );
|
495
503
|
|
496
504
|
// Make sure the incoming data is actual JSON
|
497
505
|
// Logic borrowed from http://json.org/json2.js
|
@@ -619,6 +627,7 @@ jQuery.extend({
|
|
619
627
|
for ( var l = second.length; j < l; j++ ) {
|
620
628
|
first[ i++ ] = second[ j ];
|
621
629
|
}
|
630
|
+
|
622
631
|
} else {
|
623
632
|
while ( second[j] !== undefined ) {
|
624
633
|
first[ i++ ] = second[ j++ ];
|
@@ -807,7 +816,7 @@ function access( elems, key, value, exec, fn, pass ) {
|
|
807
816
|
}
|
808
817
|
|
809
818
|
// Getting an attribute
|
810
|
-
return length ? fn( elems[0], key ) :
|
819
|
+
return length ? fn( elems[0], key ) : undefined;
|
811
820
|
}
|
812
821
|
|
813
822
|
function now() {
|
@@ -871,7 +880,10 @@ function now() {
|
|
871
880
|
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
872
881
|
optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
|
873
882
|
|
883
|
+
parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null,
|
884
|
+
|
874
885
|
// Will be defined later
|
886
|
+
deleteExpando: true,
|
875
887
|
checkClone: false,
|
876
888
|
scriptEval: false,
|
877
889
|
noCloneEvent: true,
|
@@ -893,6 +905,15 @@ function now() {
|
|
893
905
|
delete window[ id ];
|
894
906
|
}
|
895
907
|
|
908
|
+
// Test to see if it's possible to delete an expando from an element
|
909
|
+
// Fails in Internet Explorer
|
910
|
+
try {
|
911
|
+
delete script.test;
|
912
|
+
|
913
|
+
} catch(e) {
|
914
|
+
jQuery.support.deleteExpando = false;
|
915
|
+
}
|
916
|
+
|
896
917
|
root.removeChild( script );
|
897
918
|
|
898
919
|
if ( div.attachEvent && div.fireEvent ) {
|
@@ -923,6 +944,7 @@ function now() {
|
|
923
944
|
document.body.appendChild( div );
|
924
945
|
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
|
925
946
|
document.body.removeChild( div ).style.display = 'none';
|
947
|
+
|
926
948
|
div = null;
|
927
949
|
});
|
928
950
|
|
@@ -962,7 +984,6 @@ jQuery.props = {
|
|
962
984
|
frameborder: "frameBorder"
|
963
985
|
};
|
964
986
|
var expando = "jQuery" + now(), uuid = 0, windowData = {};
|
965
|
-
var emptyObject = {};
|
966
987
|
|
967
988
|
jQuery.extend({
|
968
989
|
cache: {},
|
@@ -988,8 +1009,7 @@ jQuery.extend({
|
|
988
1009
|
|
989
1010
|
var id = elem[ expando ], cache = jQuery.cache, thisCache;
|
990
1011
|
|
991
|
-
|
992
|
-
if ( !name && !id ) {
|
1012
|
+
if ( !id && typeof name === "string" && data === undefined ) {
|
993
1013
|
return null;
|
994
1014
|
}
|
995
1015
|
|
@@ -1003,17 +1023,16 @@ jQuery.extend({
|
|
1003
1023
|
if ( typeof name === "object" ) {
|
1004
1024
|
elem[ expando ] = id;
|
1005
1025
|
thisCache = cache[ id ] = jQuery.extend(true, {}, name);
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
} else {
|
1011
|
-
thisCache = cache[ id ] = {};
|
1026
|
+
|
1027
|
+
} else if ( !cache[ id ] ) {
|
1028
|
+
elem[ expando ] = id;
|
1029
|
+
cache[ id ] = {};
|
1012
1030
|
}
|
1013
1031
|
|
1032
|
+
thisCache = cache[ id ];
|
1033
|
+
|
1014
1034
|
// Prevent overriding the named cache with undefined values
|
1015
1035
|
if ( data !== undefined ) {
|
1016
|
-
elem[ expando ] = id;
|
1017
1036
|
thisCache[ name ] = data;
|
1018
1037
|
}
|
1019
1038
|
|
@@ -1045,15 +1064,11 @@ jQuery.extend({
|
|
1045
1064
|
|
1046
1065
|
// Otherwise, we want to remove all of the element's data
|
1047
1066
|
} else {
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
// but it's ok with using removeAttribute
|
1054
|
-
if ( elem.removeAttribute ) {
|
1055
|
-
elem.removeAttribute( expando );
|
1056
|
-
}
|
1067
|
+
if ( jQuery.support.deleteExpando ) {
|
1068
|
+
delete elem[ jQuery.expando ];
|
1069
|
+
|
1070
|
+
} else if ( elem.removeAttribute ) {
|
1071
|
+
elem.removeAttribute( jQuery.expando );
|
1057
1072
|
}
|
1058
1073
|
|
1059
1074
|
// Completely remove the data cache
|
@@ -1230,12 +1245,13 @@ jQuery.fn.extend({
|
|
1230
1245
|
elem.className = value;
|
1231
1246
|
|
1232
1247
|
} else {
|
1233
|
-
var className = " " + elem.className + " ";
|
1248
|
+
var className = " " + elem.className + " ", setClass = elem.className;
|
1234
1249
|
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
|
1235
1250
|
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
|
1236
|
-
|
1251
|
+
setClass += " " + classNames[c];
|
1237
1252
|
}
|
1238
1253
|
}
|
1254
|
+
elem.className = jQuery.trim( setClass );
|
1239
1255
|
}
|
1240
1256
|
}
|
1241
1257
|
}
|
@@ -1264,7 +1280,7 @@ jQuery.fn.extend({
|
|
1264
1280
|
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
|
1265
1281
|
className = className.replace(" " + classNames[c] + " ", " ");
|
1266
1282
|
}
|
1267
|
-
elem.className =
|
1283
|
+
elem.className = jQuery.trim( className );
|
1268
1284
|
|
1269
1285
|
} else {
|
1270
1286
|
elem.className = "";
|
@@ -1520,15 +1536,16 @@ jQuery.extend({
|
|
1520
1536
|
}
|
1521
1537
|
|
1522
1538
|
// elem is actually elem.style ... set the style
|
1523
|
-
// Using attr for specific style information is now deprecated. Use style
|
1539
|
+
// Using attr for specific style information is now deprecated. Use style instead.
|
1524
1540
|
return jQuery.style( elem, name, value );
|
1525
1541
|
}
|
1526
1542
|
});
|
1527
|
-
var
|
1528
|
-
|
1529
|
-
return
|
1530
|
-
|
1531
|
-
};
|
1543
|
+
var rnamespaces = /\.(.*)$/,
|
1544
|
+
fcleanup = function( nm ) {
|
1545
|
+
return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
|
1546
|
+
return "\\" + ch;
|
1547
|
+
});
|
1548
|
+
};
|
1532
1549
|
|
1533
1550
|
/*
|
1534
1551
|
* A number of helper functions used for managing events.
|
@@ -1550,107 +1567,104 @@ jQuery.event = {
|
|
1550
1567
|
elem = window;
|
1551
1568
|
}
|
1552
1569
|
|
1570
|
+
var handleObjIn, handleObj;
|
1571
|
+
|
1572
|
+
if ( handler.handler ) {
|
1573
|
+
handleObjIn = handler;
|
1574
|
+
handler = handleObjIn.handler;
|
1575
|
+
}
|
1576
|
+
|
1553
1577
|
// Make sure that the function being executed has a unique ID
|
1554
1578
|
if ( !handler.guid ) {
|
1555
1579
|
handler.guid = jQuery.guid++;
|
1556
1580
|
}
|
1557
1581
|
|
1558
|
-
//
|
1559
|
-
|
1560
|
-
// Create temporary function pointer to original handler
|
1561
|
-
var fn = handler;
|
1562
|
-
|
1563
|
-
// Create unique handler function, wrapped around original handler
|
1564
|
-
handler = jQuery.proxy( fn );
|
1582
|
+
// Init the element's event structure
|
1583
|
+
var elemData = jQuery.data( elem );
|
1565
1584
|
|
1566
|
-
|
1567
|
-
|
1585
|
+
// If no elemData is found then we must be trying to bind to one of the
|
1586
|
+
// banned noData elements
|
1587
|
+
if ( !elemData ) {
|
1588
|
+
return;
|
1568
1589
|
}
|
1569
1590
|
|
1570
|
-
|
1571
|
-
|
1572
|
-
handle = jQuery.data( elem, "handle" ), eventHandle;
|
1591
|
+
var events = elemData.events = elemData.events || {},
|
1592
|
+
eventHandle = elemData.handle, eventHandle;
|
1573
1593
|
|
1574
|
-
if ( !
|
1575
|
-
eventHandle = function() {
|
1594
|
+
if ( !eventHandle ) {
|
1595
|
+
elemData.handle = eventHandle = function() {
|
1576
1596
|
// Handle the second event of a trigger and when
|
1577
1597
|
// an event is called after a page has unloaded
|
1578
1598
|
return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
|
1579
1599
|
jQuery.event.handle.apply( eventHandle.elem, arguments ) :
|
1580
1600
|
undefined;
|
1581
1601
|
};
|
1582
|
-
|
1583
|
-
handle = jQuery.data( elem, "handle", eventHandle );
|
1584
|
-
}
|
1585
|
-
|
1586
|
-
// If no handle is found then we must be trying to bind to one of the
|
1587
|
-
// banned noData elements
|
1588
|
-
if ( !handle ) {
|
1589
|
-
return;
|
1590
1602
|
}
|
1591
1603
|
|
1592
1604
|
// Add elem as a property of the handle function
|
1593
|
-
// This is to prevent a memory leak with non-native
|
1594
|
-
|
1595
|
-
handle.elem = elem;
|
1605
|
+
// This is to prevent a memory leak with non-native events in IE.
|
1606
|
+
eventHandle.elem = elem;
|
1596
1607
|
|
1597
1608
|
// Handle multiple events separated by a space
|
1598
1609
|
// jQuery(...).bind("mouseover mouseout", fn);
|
1599
|
-
types = types.split(
|
1610
|
+
types = types.split(" ");
|
1600
1611
|
|
1601
|
-
var type, i = 0;
|
1612
|
+
var type, i = 0, namespaces;
|
1602
1613
|
|
1603
1614
|
while ( (type = types[ i++ ]) ) {
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1615
|
+
handleObj = handleObjIn ?
|
1616
|
+
jQuery.extend({}, handleObjIn) :
|
1617
|
+
{ handler: handler, data: data };
|
1607
1618
|
|
1608
|
-
|
1609
|
-
|
1619
|
+
// Namespaced event handlers
|
1620
|
+
if ( type.indexOf(".") > -1 ) {
|
1621
|
+
namespaces = type.split(".");
|
1622
|
+
type = namespaces.shift();
|
1623
|
+
handleObj.namespace = namespaces.slice(0).sort().join(".");
|
1610
1624
|
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1625
|
+
} else {
|
1626
|
+
namespaces = [];
|
1627
|
+
handleObj.namespace = "";
|
1614
1628
|
}
|
1615
1629
|
|
1616
|
-
|
1630
|
+
handleObj.type = type;
|
1631
|
+
handleObj.guid = handler.guid;
|
1617
1632
|
|
1618
1633
|
// Get the current list of functions bound to this event
|
1619
1634
|
var handlers = events[ type ],
|
1620
|
-
special =
|
1635
|
+
special = jQuery.event.special[ type ] || {};
|
1621
1636
|
|
1622
1637
|
// Init the event handler queue
|
1623
1638
|
if ( !handlers ) {
|
1624
|
-
handlers = events[ type ] =
|
1639
|
+
handlers = events[ type ] = [];
|
1625
1640
|
|
1626
1641
|
// Check for a special event handler
|
1627
1642
|
// Only use addEventListener/attachEvent if the special
|
1628
1643
|
// events handler returns false
|
1629
|
-
if ( !special.setup || special.setup.call( elem, data, namespaces,
|
1644
|
+
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
1630
1645
|
// Bind the global event handler to the element
|
1631
1646
|
if ( elem.addEventListener ) {
|
1632
|
-
elem.addEventListener( type,
|
1647
|
+
elem.addEventListener( type, eventHandle, false );
|
1648
|
+
|
1633
1649
|
} else if ( elem.attachEvent ) {
|
1634
|
-
elem.attachEvent( "on" + type,
|
1650
|
+
elem.attachEvent( "on" + type, eventHandle );
|
1635
1651
|
}
|
1636
1652
|
}
|
1637
1653
|
}
|
1638
1654
|
|
1639
1655
|
if ( special.add ) {
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
}
|
1648
|
-
|
1656
|
+
special.add.call( elem, handleObj );
|
1657
|
+
|
1658
|
+
if ( !handleObj.handler.guid ) {
|
1659
|
+
handleObj.handler.guid = handler.guid;
|
1660
|
+
}
|
1661
|
+
}
|
1662
|
+
|
1649
1663
|
// Add the function to the element's handler list
|
1650
|
-
handlers
|
1664
|
+
handlers.push( handleObj );
|
1651
1665
|
|
1652
1666
|
// Keep track of which events have been used, for global triggering
|
1653
|
-
|
1667
|
+
jQuery.event.global[ type ] = true;
|
1654
1668
|
}
|
1655
1669
|
|
1656
1670
|
// Nullify elem to prevent memory leaks in IE
|
@@ -1660,90 +1674,121 @@ jQuery.event = {
|
|
1660
1674
|
global: {},
|
1661
1675
|
|
1662
1676
|
// Detach an event or set of events from an element
|
1663
|
-
remove: function( elem, types, handler ) {
|
1677
|
+
remove: function( elem, types, handler, pos ) {
|
1664
1678
|
// don't do events on text and comment nodes
|
1665
1679
|
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
1666
1680
|
return;
|
1667
1681
|
}
|
1668
1682
|
|
1669
|
-
var
|
1683
|
+
var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
|
1684
|
+
elemData = jQuery.data( elem ),
|
1685
|
+
events = elemData && elemData.events;
|
1670
1686
|
|
1671
|
-
if ( events ) {
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1687
|
+
if ( !elemData || !events ) {
|
1688
|
+
return;
|
1689
|
+
}
|
1690
|
+
|
1691
|
+
// types is actually an event object here
|
1692
|
+
if ( types && types.type ) {
|
1693
|
+
handler = types.handler;
|
1694
|
+
types = types.type;
|
1695
|
+
}
|
1696
|
+
|
1697
|
+
// Unbind all events for the element
|
1698
|
+
if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
|
1699
|
+
types = types || "";
|
1700
|
+
|
1701
|
+
for ( type in events ) {
|
1702
|
+
jQuery.event.remove( elem, type + types );
|
1703
|
+
}
|
1704
|
+
|
1705
|
+
return;
|
1706
|
+
}
|
1707
|
+
|
1708
|
+
// Handle multiple events separated by a space
|
1709
|
+
// jQuery(...).unbind("mouseover mouseout", fn);
|
1710
|
+
types = types.split(" ");
|
1711
|
+
|
1712
|
+
while ( (type = types[ i++ ]) ) {
|
1713
|
+
origType = type;
|
1714
|
+
handleObj = null;
|
1715
|
+
all = type.indexOf(".") < 0;
|
1716
|
+
namespaces = [];
|
1717
|
+
|
1718
|
+
if ( !all ) {
|
1719
|
+
// Namespaced event handlers
|
1720
|
+
namespaces = type.split(".");
|
1721
|
+
type = namespaces.shift();
|
1722
|
+
|
1723
|
+
namespace = new RegExp("(^|\\.)" +
|
1724
|
+
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
|
1725
|
+
}
|
1726
|
+
|
1727
|
+
eventType = events[ type ];
|
1728
|
+
|
1729
|
+
if ( !eventType ) {
|
1730
|
+
continue;
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
if ( !handler ) {
|
1734
|
+
for ( var j = 0; j < eventType.length; j++ ) {
|
1735
|
+
handleObj = eventType[ j ];
|
1736
|
+
|
1737
|
+
if ( all || namespace.test( handleObj.namespace ) ) {
|
1738
|
+
jQuery.event.remove( elem, origType, handleObj.handler, j );
|
1739
|
+
eventType.splice( j--, 1 );
|
1740
|
+
}
|
1682
1741
|
}
|
1683
1742
|
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
if ( events[ type ] ) {
|
1698
|
-
// remove the given handler for the given type
|
1699
|
-
if ( handler ) {
|
1700
|
-
fn = events[ type ][ handler.guid ];
|
1701
|
-
delete events[ type ][ handler.guid ];
|
1702
|
-
|
1703
|
-
// remove all handlers for the given type
|
1704
|
-
} else {
|
1705
|
-
for ( var handle in events[ type ] ) {
|
1706
|
-
// Handle the removal of namespaced events
|
1707
|
-
if ( all || namespace.test( events[ type ][ handle ].type ) ) {
|
1708
|
-
delete events[ type ][ handle ];
|
1709
|
-
}
|
1710
|
-
}
|
1743
|
+
continue;
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
special = jQuery.event.special[ type ] || {};
|
1747
|
+
|
1748
|
+
for ( var j = pos || 0; j < eventType.length; j++ ) {
|
1749
|
+
handleObj = eventType[ j ];
|
1750
|
+
|
1751
|
+
if ( handler.guid === handleObj.guid ) {
|
1752
|
+
// remove the given handler for the given type
|
1753
|
+
if ( all || namespace.test( handleObj.namespace ) ) {
|
1754
|
+
if ( pos == null ) {
|
1755
|
+
eventType.splice( j--, 1 );
|
1711
1756
|
}
|
1712
1757
|
|
1713
1758
|
if ( special.remove ) {
|
1714
|
-
special.remove.call( elem,
|
1759
|
+
special.remove.call( elem, handleObj );
|
1715
1760
|
}
|
1761
|
+
}
|
1716
1762
|
|
1717
|
-
|
1718
|
-
|
1719
|
-
break;
|
1720
|
-
}
|
1721
|
-
if ( !ret ) {
|
1722
|
-
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
|
1723
|
-
if ( elem.removeEventListener ) {
|
1724
|
-
elem.removeEventListener( type, jQuery.data( elem, "handle" ), false );
|
1725
|
-
} else if ( elem.detachEvent ) {
|
1726
|
-
elem.detachEvent( "on" + type, jQuery.data( elem, "handle" ) );
|
1727
|
-
}
|
1728
|
-
}
|
1729
|
-
ret = null;
|
1730
|
-
delete events[ type ];
|
1731
|
-
}
|
1763
|
+
if ( pos != null ) {
|
1764
|
+
break;
|
1732
1765
|
}
|
1733
1766
|
}
|
1734
1767
|
}
|
1735
1768
|
|
1736
|
-
//
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
if ( !ret ) {
|
1741
|
-
var handle = jQuery.data( elem, "handle" );
|
1742
|
-
if ( handle ) {
|
1743
|
-
handle.elem = null;
|
1769
|
+
// remove generic event handler if no more handlers exist
|
1770
|
+
if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
|
1771
|
+
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
|
1772
|
+
removeEvent( elem, type, elemData.handle );
|
1744
1773
|
}
|
1745
|
-
|
1746
|
-
|
1774
|
+
|
1775
|
+
ret = null;
|
1776
|
+
delete events[ type ];
|
1777
|
+
}
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
// Remove the expando if it's no longer used
|
1781
|
+
if ( jQuery.isEmptyObject( events ) ) {
|
1782
|
+
var handle = elemData.handle;
|
1783
|
+
if ( handle ) {
|
1784
|
+
handle.elem = null;
|
1785
|
+
}
|
1786
|
+
|
1787
|
+
delete elemData.events;
|
1788
|
+
delete elemData.handle;
|
1789
|
+
|
1790
|
+
if ( jQuery.isEmptyObject( elemData ) ) {
|
1791
|
+
jQuery.removeData( elem );
|
1747
1792
|
}
|
1748
1793
|
}
|
1749
1794
|
},
|
@@ -1774,7 +1819,7 @@ jQuery.event = {
|
|
1774
1819
|
event.stopPropagation();
|
1775
1820
|
|
1776
1821
|
// Only trigger if we've ever bound an event for it
|
1777
|
-
if (
|
1822
|
+
if ( jQuery.event.global[ type ] ) {
|
1778
1823
|
jQuery.each( jQuery.cache, function() {
|
1779
1824
|
if ( this.events && this.events[type] ) {
|
1780
1825
|
jQuery.event.trigger( event, data, this.handle.elem );
|
@@ -1825,9 +1870,12 @@ jQuery.event = {
|
|
1825
1870
|
|
1826
1871
|
} else if ( !event.isDefaultPrevented() ) {
|
1827
1872
|
var target = event.target, old,
|
1828
|
-
isClick = jQuery.nodeName(target, "a") && type === "click"
|
1873
|
+
isClick = jQuery.nodeName(target, "a") && type === "click",
|
1874
|
+
special = jQuery.event.special[ type ] || {};
|
1875
|
+
|
1876
|
+
if ( (!special._default || special._default.call( elem, event ) === false) &&
|
1877
|
+
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
|
1829
1878
|
|
1830
|
-
if ( !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
|
1831
1879
|
try {
|
1832
1880
|
if ( target[ type ] ) {
|
1833
1881
|
// Make sure that we don't accidentally re-trigger the onFOO events
|
@@ -1837,7 +1885,7 @@ jQuery.event = {
|
|
1837
1885
|
target[ "on" + type ] = null;
|
1838
1886
|
}
|
1839
1887
|
|
1840
|
-
|
1888
|
+
jQuery.event.triggered = true;
|
1841
1889
|
target[ type ]();
|
1842
1890
|
}
|
1843
1891
|
|
@@ -1848,53 +1896,57 @@ jQuery.event = {
|
|
1848
1896
|
target[ "on" + type ] = old;
|
1849
1897
|
}
|
1850
1898
|
|
1851
|
-
|
1899
|
+
jQuery.event.triggered = false;
|
1852
1900
|
}
|
1853
1901
|
}
|
1854
1902
|
},
|
1855
1903
|
|
1856
1904
|
handle: function( event ) {
|
1857
|
-
|
1858
|
-
var all, handlers;
|
1905
|
+
var all, handlers, namespaces, namespace, events;
|
1859
1906
|
|
1860
1907
|
event = arguments[0] = jQuery.event.fix( event || window.event );
|
1861
1908
|
event.currentTarget = this;
|
1862
1909
|
|
1863
1910
|
// Namespaced event handlers
|
1864
|
-
|
1865
|
-
event.type = namespaces.shift();
|
1911
|
+
all = event.type.indexOf(".") < 0 && !event.exclusive;
|
1866
1912
|
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1913
|
+
if ( !all ) {
|
1914
|
+
namespaces = event.type.split(".");
|
1915
|
+
event.type = namespaces.shift();
|
1916
|
+
namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
|
1917
|
+
}
|
1871
1918
|
|
1872
|
-
|
1919
|
+
var events = jQuery.data(this, "events"), handlers = events[ event.type ];
|
1873
1920
|
|
1874
|
-
|
1875
|
-
|
1921
|
+
if ( events && handlers ) {
|
1922
|
+
// Clone the handlers to prevent manipulation
|
1923
|
+
handlers = handlers.slice(0);
|
1876
1924
|
|
1877
|
-
|
1878
|
-
|
1879
|
-
// Pass in a reference to the handler function itself
|
1880
|
-
// So that we can later remove it
|
1881
|
-
event.handler = handler;
|
1882
|
-
event.data = handler.data;
|
1925
|
+
for ( var j = 0, l = handlers.length; j < l; j++ ) {
|
1926
|
+
var handleObj = handlers[ j ];
|
1883
1927
|
|
1884
|
-
|
1928
|
+
// Filter the functions by class
|
1929
|
+
if ( all || namespace.test( handleObj.namespace ) ) {
|
1930
|
+
// Pass in a reference to the handler function itself
|
1931
|
+
// So that we can later remove it
|
1932
|
+
event.handler = handleObj.handler;
|
1933
|
+
event.data = handleObj.data;
|
1934
|
+
event.handleObj = handleObj;
|
1935
|
+
|
1936
|
+
var ret = handleObj.handler.apply( this, arguments );
|
1885
1937
|
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1938
|
+
if ( ret !== undefined ) {
|
1939
|
+
event.result = ret;
|
1940
|
+
if ( ret === false ) {
|
1941
|
+
event.preventDefault();
|
1942
|
+
event.stopPropagation();
|
1943
|
+
}
|
1891
1944
|
}
|
1892
|
-
}
|
1893
1945
|
|
1894
|
-
|
1895
|
-
|
1946
|
+
if ( event.isImmediatePropagationStopped() ) {
|
1947
|
+
break;
|
1948
|
+
}
|
1896
1949
|
}
|
1897
|
-
|
1898
1950
|
}
|
1899
1951
|
}
|
1900
1952
|
|
@@ -1973,44 +2025,39 @@ jQuery.event = {
|
|
1973
2025
|
},
|
1974
2026
|
|
1975
2027
|
live: {
|
1976
|
-
add: function(
|
1977
|
-
jQuery.
|
1978
|
-
|
1979
|
-
proxy.guid += data.selector + data.live;
|
1980
|
-
data.liveProxy = proxy;
|
1981
|
-
|
1982
|
-
jQuery.event.add( this, data.live, liveHandler, data );
|
1983
|
-
|
2028
|
+
add: function( handleObj ) {
|
2029
|
+
jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) );
|
1984
2030
|
},
|
1985
2031
|
|
1986
|
-
remove: function(
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
});
|
1995
|
-
|
1996
|
-
if ( remove < 1 ) {
|
1997
|
-
jQuery.event.remove( this, namespaces[0], liveHandler );
|
2032
|
+
remove: function( handleObj ) {
|
2033
|
+
var remove = true,
|
2034
|
+
type = handleObj.origType.replace(rnamespaces, "");
|
2035
|
+
|
2036
|
+
jQuery.each( jQuery.data(this, "events").live || [], function() {
|
2037
|
+
if ( type === this.origType.replace(rnamespaces, "") ) {
|
2038
|
+
remove = false;
|
2039
|
+
return false;
|
1998
2040
|
}
|
2041
|
+
});
|
2042
|
+
|
2043
|
+
if ( remove ) {
|
2044
|
+
jQuery.event.remove( this, handleObj.origType, liveHandler );
|
1999
2045
|
}
|
2000
|
-
}
|
2001
|
-
|
2046
|
+
}
|
2047
|
+
|
2002
2048
|
},
|
2049
|
+
|
2003
2050
|
beforeunload: {
|
2004
|
-
setup: function( data, namespaces,
|
2051
|
+
setup: function( data, namespaces, eventHandle ) {
|
2005
2052
|
// We only want to do this special case on windows
|
2006
2053
|
if ( this.setInterval ) {
|
2007
|
-
this.onbeforeunload =
|
2054
|
+
this.onbeforeunload = eventHandle;
|
2008
2055
|
}
|
2009
2056
|
|
2010
2057
|
return false;
|
2011
2058
|
},
|
2012
|
-
teardown: function( namespaces,
|
2013
|
-
if ( this.onbeforeunload ===
|
2059
|
+
teardown: function( namespaces, eventHandle ) {
|
2060
|
+
if ( this.onbeforeunload === eventHandle ) {
|
2014
2061
|
this.onbeforeunload = null;
|
2015
2062
|
}
|
2016
2063
|
}
|
@@ -2018,6 +2065,14 @@ jQuery.event = {
|
|
2018
2065
|
}
|
2019
2066
|
};
|
2020
2067
|
|
2068
|
+
var removeEvent = document.removeEventListener ?
|
2069
|
+
function( elem, type, handle ) {
|
2070
|
+
elem.removeEventListener( type, handle, false );
|
2071
|
+
} :
|
2072
|
+
function( elem, type, handle ) {
|
2073
|
+
elem.detachEvent( "on" + type, handle );
|
2074
|
+
};
|
2075
|
+
|
2021
2076
|
jQuery.Event = function( src ) {
|
2022
2077
|
// Allow instantiation without the 'new' keyword
|
2023
2078
|
if ( !this.preventDefault ) {
|
@@ -2095,27 +2150,24 @@ var withinElement = function( event ) {
|
|
2095
2150
|
// Check if mouse(over|out) are still within the same parent element
|
2096
2151
|
var parent = event.relatedTarget;
|
2097
2152
|
|
2098
|
-
//
|
2099
|
-
|
2100
|
-
|
2101
|
-
//
|
2102
|
-
|
2153
|
+
// Firefox sometimes assigns relatedTarget a XUL element
|
2154
|
+
// which we cannot access the parentNode property of
|
2155
|
+
try {
|
2156
|
+
// Traverse up the tree
|
2157
|
+
while ( parent && parent !== this ) {
|
2103
2158
|
parent = parent.parentNode;
|
2104
|
-
|
2105
|
-
// assuming we've left the element since we most likely mousedover a xul element
|
2106
|
-
} catch(e) {
|
2107
|
-
break;
|
2108
2159
|
}
|
2109
|
-
}
|
2110
2160
|
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2161
|
+
if ( parent !== this ) {
|
2162
|
+
// set the correct event type
|
2163
|
+
event.type = event.data;
|
2114
2164
|
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2165
|
+
// handle event if we actually just moused on to a non sub-element
|
2166
|
+
jQuery.event.handle.apply( this, arguments );
|
2167
|
+
}
|
2118
2168
|
|
2169
|
+
// assuming we've left the element since we most likely mousedover a xul element
|
2170
|
+
} catch(e) { }
|
2119
2171
|
},
|
2120
2172
|
|
2121
2173
|
// In case of event delegation, we only need to rename the event.type,
|
@@ -2143,64 +2195,65 @@ jQuery.each({
|
|
2143
2195
|
// submit delegation
|
2144
2196
|
if ( !jQuery.support.submitBubbles ) {
|
2145
2197
|
|
2146
|
-
jQuery.event.special.submit = {
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
2198
|
+
jQuery.event.special.submit = {
|
2199
|
+
setup: function( data, namespaces ) {
|
2200
|
+
if ( this.nodeName.toLowerCase() !== "form" ) {
|
2201
|
+
jQuery.event.add(this, "click.specialSubmit", function( e ) {
|
2202
|
+
var elem = e.target, type = elem.type;
|
2151
2203
|
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2204
|
+
if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
|
2205
|
+
return trigger( "submit", this, arguments );
|
2206
|
+
}
|
2207
|
+
});
|
2156
2208
|
|
2157
|
-
|
2158
|
-
|
2209
|
+
jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
|
2210
|
+
var elem = e.target, type = elem.type;
|
2159
2211
|
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2212
|
+
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
|
2213
|
+
return trigger( "submit", this, arguments );
|
2214
|
+
}
|
2215
|
+
});
|
2164
2216
|
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2217
|
+
} else {
|
2218
|
+
return false;
|
2219
|
+
}
|
2220
|
+
},
|
2169
2221
|
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
}
|
2174
|
-
};
|
2222
|
+
teardown: function( namespaces ) {
|
2223
|
+
jQuery.event.remove( this, ".specialSubmit" );
|
2224
|
+
}
|
2225
|
+
};
|
2175
2226
|
|
2176
2227
|
}
|
2177
2228
|
|
2178
2229
|
// change delegation, happens here so we have bind.
|
2179
2230
|
if ( !jQuery.support.changeBubbles ) {
|
2180
2231
|
|
2181
|
-
var formElems = /textarea|input|select/i
|
2232
|
+
var formElems = /textarea|input|select/i,
|
2182
2233
|
|
2183
|
-
|
2184
|
-
var type = elem.type, val = elem.value;
|
2234
|
+
changeFilters,
|
2185
2235
|
|
2186
|
-
|
2187
|
-
val = elem.
|
2236
|
+
getVal = function( elem ) {
|
2237
|
+
var type = elem.type, val = elem.value;
|
2188
2238
|
|
2189
|
-
|
2190
|
-
|
2191
|
-
jQuery.map( elem.options, function( elem ) {
|
2192
|
-
return elem.selected;
|
2193
|
-
}).join("-") :
|
2194
|
-
"";
|
2239
|
+
if ( type === "radio" || type === "checkbox" ) {
|
2240
|
+
val = elem.checked;
|
2195
2241
|
|
2196
|
-
|
2197
|
-
|
2198
|
-
|
2242
|
+
} else if ( type === "select-multiple" ) {
|
2243
|
+
val = elem.selectedIndex > -1 ?
|
2244
|
+
jQuery.map( elem.options, function( elem ) {
|
2245
|
+
return elem.selected;
|
2246
|
+
}).join("-") :
|
2247
|
+
"";
|
2199
2248
|
|
2200
|
-
|
2201
|
-
|
2249
|
+
} else if ( elem.nodeName.toLowerCase() === "select" ) {
|
2250
|
+
val = elem.selectedIndex;
|
2251
|
+
}
|
2252
|
+
|
2253
|
+
return val;
|
2254
|
+
},
|
2202
2255
|
|
2203
|
-
function testChange( e ) {
|
2256
|
+
testChange = function testChange( e ) {
|
2204
2257
|
var elem = e.target, data, val;
|
2205
2258
|
|
2206
2259
|
if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
|
@@ -2223,61 +2276,61 @@ function testChange( e ) {
|
|
2223
2276
|
e.type = "change";
|
2224
2277
|
return jQuery.event.trigger( e, arguments[1], elem );
|
2225
2278
|
}
|
2226
|
-
}
|
2279
|
+
};
|
2227
2280
|
|
2228
|
-
jQuery.event.special.change = {
|
2229
|
-
|
2230
|
-
|
2281
|
+
jQuery.event.special.change = {
|
2282
|
+
filters: {
|
2283
|
+
focusout: testChange,
|
2231
2284
|
|
2232
|
-
|
2233
|
-
|
2285
|
+
click: function( e ) {
|
2286
|
+
var elem = e.target, type = elem.type;
|
2234
2287
|
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2288
|
+
if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
|
2289
|
+
return testChange.call( this, e );
|
2290
|
+
}
|
2291
|
+
},
|
2292
|
+
|
2293
|
+
// Change has to be called before submit
|
2294
|
+
// Keydown will be called before keypress, which is used in submit-event delegation
|
2295
|
+
keydown: function( e ) {
|
2296
|
+
var elem = e.target, type = elem.type;
|
2239
2297
|
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2298
|
+
if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
|
2299
|
+
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
|
2300
|
+
type === "select-multiple" ) {
|
2301
|
+
return testChange.call( this, e );
|
2302
|
+
}
|
2303
|
+
},
|
2244
2304
|
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2305
|
+
// Beforeactivate happens also before the previous element is blurred
|
2306
|
+
// with this event you can't trigger a change event, but you can store
|
2307
|
+
// information/focus[in] is not needed anymore
|
2308
|
+
beforeactivate: function( e ) {
|
2309
|
+
var elem = e.target;
|
2310
|
+
jQuery.data( elem, "_change_data", getVal(elem) );
|
2249
2311
|
}
|
2250
2312
|
},
|
2251
2313
|
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
var elem = e.target;
|
2314
|
+
setup: function( data, namespaces ) {
|
2315
|
+
if ( this.type === "file" ) {
|
2316
|
+
return false;
|
2317
|
+
}
|
2257
2318
|
|
2258
|
-
|
2259
|
-
jQuery.
|
2319
|
+
for ( var type in changeFilters ) {
|
2320
|
+
jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
|
2260
2321
|
}
|
2261
|
-
}
|
2262
|
-
},
|
2263
|
-
setup: function( data, namespaces, fn ) {
|
2264
|
-
for ( var type in changeFilters ) {
|
2265
|
-
jQuery.event.add( this, type + ".specialChange." + fn.guid, changeFilters[type] );
|
2266
|
-
}
|
2267
2322
|
|
2268
|
-
|
2269
|
-
|
2270
|
-
remove: function( namespaces, fn ) {
|
2271
|
-
for ( var type in changeFilters ) {
|
2272
|
-
jQuery.event.remove( this, type + ".specialChange" + (fn ? "."+fn.guid : ""), changeFilters[type] );
|
2273
|
-
}
|
2323
|
+
return formElems.test( this.nodeName );
|
2324
|
+
},
|
2274
2325
|
|
2275
|
-
|
2276
|
-
|
2277
|
-
};
|
2326
|
+
teardown: function( namespaces ) {
|
2327
|
+
jQuery.event.remove( this, ".specialChange" );
|
2278
2328
|
|
2279
|
-
|
2329
|
+
return formElems.test( this.nodeName );
|
2330
|
+
}
|
2331
|
+
};
|
2280
2332
|
|
2333
|
+
changeFilters = jQuery.event.special.change.filters;
|
2281
2334
|
}
|
2282
2335
|
|
2283
2336
|
function trigger( type, elem, args ) {
|
@@ -2325,11 +2378,16 @@ jQuery.each(["bind", "one"], function( i, name ) {
|
|
2325
2378
|
return fn.apply( this, arguments );
|
2326
2379
|
}) : fn;
|
2327
2380
|
|
2328
|
-
|
2329
|
-
this.one( type, data, fn )
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2381
|
+
if ( type === "unload" && name !== "one" ) {
|
2382
|
+
this.one( type, data, fn );
|
2383
|
+
|
2384
|
+
} else {
|
2385
|
+
for ( var i = 0, l = this.length; i < l; i++ ) {
|
2386
|
+
jQuery.event.add( this[i], type, handler, data );
|
2387
|
+
}
|
2388
|
+
}
|
2389
|
+
|
2390
|
+
return this;
|
2333
2391
|
};
|
2334
2392
|
});
|
2335
2393
|
|
@@ -2340,13 +2398,29 @@ jQuery.fn.extend({
|
|
2340
2398
|
for ( var key in type ) {
|
2341
2399
|
this.unbind(key, type[key]);
|
2342
2400
|
}
|
2343
|
-
|
2401
|
+
|
2402
|
+
} else {
|
2403
|
+
for ( var i = 0, l = this.length; i < l; i++ ) {
|
2404
|
+
jQuery.event.remove( this[i], type, fn );
|
2405
|
+
}
|
2344
2406
|
}
|
2345
2407
|
|
2346
|
-
return this
|
2347
|
-
|
2348
|
-
|
2408
|
+
return this;
|
2409
|
+
},
|
2410
|
+
|
2411
|
+
delegate: function( selector, types, data, fn ) {
|
2412
|
+
return this.live( types, data, fn, selector );
|
2413
|
+
},
|
2414
|
+
|
2415
|
+
undelegate: function( selector, types, fn ) {
|
2416
|
+
if ( arguments.length === 0 ) {
|
2417
|
+
return this.unbind( "live" );
|
2418
|
+
|
2419
|
+
} else {
|
2420
|
+
return this.die( types, null, fn, selector );
|
2421
|
+
}
|
2349
2422
|
},
|
2423
|
+
|
2350
2424
|
trigger: function( type, data ) {
|
2351
2425
|
return this.each(function() {
|
2352
2426
|
jQuery.event.trigger( type, data, this );
|
@@ -2390,32 +2464,60 @@ jQuery.fn.extend({
|
|
2390
2464
|
}
|
2391
2465
|
});
|
2392
2466
|
|
2467
|
+
var liveMap = {
|
2468
|
+
focus: "focusin",
|
2469
|
+
blur: "focusout",
|
2470
|
+
mouseenter: "mouseover",
|
2471
|
+
mouseleave: "mouseout"
|
2472
|
+
};
|
2473
|
+
|
2393
2474
|
jQuery.each(["live", "die"], function( i, name ) {
|
2394
|
-
jQuery.fn[ name ] = function( types, data, fn ) {
|
2395
|
-
var type, i = 0
|
2475
|
+
jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
|
2476
|
+
var type, i = 0, match, namespaces, preType,
|
2477
|
+
selector = origSelector || this.selector,
|
2478
|
+
context = origSelector ? this : jQuery( this.context );
|
2396
2479
|
|
2397
2480
|
if ( jQuery.isFunction( data ) ) {
|
2398
2481
|
fn = data;
|
2399
2482
|
data = undefined;
|
2400
2483
|
}
|
2401
2484
|
|
2402
|
-
types = (types || "").split(
|
2485
|
+
types = (types || "").split(" ");
|
2403
2486
|
|
2404
2487
|
while ( (type = types[ i++ ]) != null ) {
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2488
|
+
match = rnamespaces.exec( type );
|
2489
|
+
namespaces = "";
|
2490
|
+
|
2491
|
+
if ( match ) {
|
2492
|
+
namespaces = match[0];
|
2493
|
+
type = type.replace( rnamespaces, "" );
|
2494
|
+
}
|
2495
|
+
|
2496
|
+
if ( type === "hover" ) {
|
2497
|
+
types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
|
2498
|
+
continue;
|
2499
|
+
}
|
2500
|
+
|
2501
|
+
preType = type;
|
2502
|
+
|
2503
|
+
if ( type === "focus" || type === "blur" ) {
|
2504
|
+
types.push( liveMap[ type ] + namespaces );
|
2505
|
+
type = type + namespaces;
|
2506
|
+
|
2507
|
+
} else {
|
2508
|
+
type = (liveMap[ type ] || type) + namespaces;
|
2509
|
+
}
|
2510
|
+
|
2410
2511
|
if ( name === "live" ) {
|
2411
2512
|
// bind live handler
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2513
|
+
context.each(function(){
|
2514
|
+
jQuery.event.add( this, liveConvert( type, selector ),
|
2515
|
+
{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
|
2516
|
+
});
|
2415
2517
|
|
2416
2518
|
} else {
|
2417
2519
|
// unbind live handler
|
2418
|
-
|
2520
|
+
context.unbind( liveConvert( type, selector ), fn );
|
2419
2521
|
}
|
2420
2522
|
}
|
2421
2523
|
|
@@ -2425,45 +2527,46 @@ jQuery.each(["live", "die"], function( i, name ) {
|
|
2425
2527
|
|
2426
2528
|
function liveHandler( event ) {
|
2427
2529
|
var stop, elems = [], selectors = [], args = arguments,
|
2428
|
-
related, match,
|
2429
|
-
|
2530
|
+
related, match, handleObj, elem, j, i, l, data,
|
2531
|
+
events = jQuery.data( this, "events" );
|
2430
2532
|
|
2431
2533
|
// Make sure we avoid non-left-click bubbling in Firefox (#3861)
|
2432
|
-
if ( event.button && event.type === "click" ) {
|
2534
|
+
if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
|
2433
2535
|
return;
|
2434
2536
|
}
|
2435
2537
|
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2538
|
+
event.liveFired = this;
|
2539
|
+
|
2540
|
+
var live = events.live.slice(0);
|
2541
|
+
|
2542
|
+
for ( j = 0; j < live.length; j++ ) {
|
2543
|
+
handleObj = live[j];
|
2544
|
+
|
2545
|
+
if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
|
2546
|
+
selectors.push( handleObj.selector );
|
2440
2547
|
|
2441
|
-
data = fn.data;
|
2442
|
-
if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
|
2443
|
-
!data.beforeFilter[event.type](event)) ) {
|
2444
|
-
selectors.push( fn.selector );
|
2445
|
-
}
|
2446
2548
|
} else {
|
2447
|
-
|
2549
|
+
live.splice( j--, 1 );
|
2448
2550
|
}
|
2449
2551
|
}
|
2450
2552
|
|
2451
2553
|
match = jQuery( event.target ).closest( selectors, event.currentTarget );
|
2452
2554
|
|
2453
2555
|
for ( i = 0, l = match.length; i < l; i++ ) {
|
2454
|
-
for ( j
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2556
|
+
for ( j = 0; j < live.length; j++ ) {
|
2557
|
+
handleObj = live[j];
|
2558
|
+
|
2559
|
+
if ( match[i].selector === handleObj.selector ) {
|
2560
|
+
elem = match[i].elem;
|
2561
|
+
related = null;
|
2458
2562
|
|
2459
|
-
if ( match[i].selector === fn.selector ) {
|
2460
2563
|
// Those two events require additional checking
|
2461
|
-
if (
|
2462
|
-
related = jQuery( event.relatedTarget ).closest(
|
2564
|
+
if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
|
2565
|
+
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
|
2463
2566
|
}
|
2464
2567
|
|
2465
2568
|
if ( !related || related !== elem ) {
|
2466
|
-
elems.push({ elem: elem,
|
2569
|
+
elems.push({ elem: elem, handleObj: handleObj });
|
2467
2570
|
}
|
2468
2571
|
}
|
2469
2572
|
}
|
@@ -2472,8 +2575,10 @@ function liveHandler( event ) {
|
|
2472
2575
|
for ( i = 0, l = elems.length; i < l; i++ ) {
|
2473
2576
|
match = elems[i];
|
2474
2577
|
event.currentTarget = match.elem;
|
2475
|
-
event.data = match.
|
2476
|
-
|
2578
|
+
event.data = match.handleObj.data;
|
2579
|
+
event.handleObj = match.handleObj;
|
2580
|
+
|
2581
|
+
if ( match.handleObj.origHandler.apply( match.elem, args ) === false ) {
|
2477
2582
|
stop = false;
|
2478
2583
|
break;
|
2479
2584
|
}
|
@@ -2483,7 +2588,7 @@ function liveHandler( event ) {
|
|
2483
2588
|
}
|
2484
2589
|
|
2485
2590
|
function liveConvert( type, selector ) {
|
2486
|
-
return "live." + (type ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
|
2591
|
+
return "live." + (type && type !== "*" ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
|
2487
2592
|
}
|
2488
2593
|
|
2489
2594
|
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
|
@@ -3228,8 +3333,10 @@ var makeArray = function(array, results) {
|
|
3228
3333
|
|
3229
3334
|
// Perform a simple check to determine if the browser is capable of
|
3230
3335
|
// converting a NodeList to an array using builtin methods.
|
3336
|
+
// Also verifies that the returned array holds DOM nodes
|
3337
|
+
// (which is not the case in the Blackberry browser)
|
3231
3338
|
try {
|
3232
|
-
Array.prototype.slice.call( document.documentElement.childNodes, 0 );
|
3339
|
+
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
|
3233
3340
|
|
3234
3341
|
// Provide a fallback method if it does not work
|
3235
3342
|
} catch(e){
|
@@ -3533,7 +3640,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
|
|
3533
3640
|
}
|
3534
3641
|
|
3535
3642
|
var contains = document.compareDocumentPosition ? function(a, b){
|
3536
|
-
return a.compareDocumentPosition(b) & 16;
|
3643
|
+
return !!(a.compareDocumentPosition(b) & 16);
|
3537
3644
|
} : function(a, b){
|
3538
3645
|
return a !== b && (a.contains ? a.contains(b) : true);
|
3539
3646
|
};
|
@@ -3570,7 +3677,7 @@ jQuery.find = Sizzle;
|
|
3570
3677
|
jQuery.expr = Sizzle.selectors;
|
3571
3678
|
jQuery.expr[":"] = jQuery.expr.filters;
|
3572
3679
|
jQuery.unique = Sizzle.uniqueSort;
|
3573
|
-
jQuery.
|
3680
|
+
jQuery.text = getText;
|
3574
3681
|
jQuery.isXMLDoc = isXML;
|
3575
3682
|
jQuery.contains = contains;
|
3576
3683
|
|
@@ -3856,7 +3963,8 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
|
3856
3963
|
rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
|
3857
3964
|
rtagName = /<([\w:]+)/,
|
3858
3965
|
rtbody = /<tbody/i,
|
3859
|
-
rhtml =
|
3966
|
+
rhtml = /<|&#?\w+;/,
|
3967
|
+
rnocache = /<script|<object|<embed|<option|<style/i,
|
3860
3968
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
|
3861
3969
|
fcloseTag = function( all, front, tag ) {
|
3862
3970
|
return rselfClosing.test( tag ) ?
|
@@ -3896,7 +4004,7 @@ jQuery.fn.extend({
|
|
3896
4004
|
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
|
3897
4005
|
}
|
3898
4006
|
|
3899
|
-
return jQuery.
|
4007
|
+
return jQuery.text( this );
|
3900
4008
|
},
|
3901
4009
|
|
3902
4010
|
wrapAll: function( html ) {
|
@@ -4000,6 +4108,40 @@ jQuery.fn.extend({
|
|
4000
4108
|
return set;
|
4001
4109
|
}
|
4002
4110
|
},
|
4111
|
+
|
4112
|
+
// keepData is for internal use only--do not document
|
4113
|
+
remove: function( selector, keepData ) {
|
4114
|
+
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
4115
|
+
if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
|
4116
|
+
if ( !keepData && elem.nodeType === 1 ) {
|
4117
|
+
jQuery.cleanData( elem.getElementsByTagName("*") );
|
4118
|
+
jQuery.cleanData( [ elem ] );
|
4119
|
+
}
|
4120
|
+
|
4121
|
+
if ( elem.parentNode ) {
|
4122
|
+
elem.parentNode.removeChild( elem );
|
4123
|
+
}
|
4124
|
+
}
|
4125
|
+
}
|
4126
|
+
|
4127
|
+
return this;
|
4128
|
+
},
|
4129
|
+
|
4130
|
+
empty: function() {
|
4131
|
+
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
4132
|
+
// Remove element nodes and prevent memory leaks
|
4133
|
+
if ( elem.nodeType === 1 ) {
|
4134
|
+
jQuery.cleanData( elem.getElementsByTagName("*") );
|
4135
|
+
}
|
4136
|
+
|
4137
|
+
// Remove any remaining nodes
|
4138
|
+
while ( elem.firstChild ) {
|
4139
|
+
elem.removeChild( elem.firstChild );
|
4140
|
+
}
|
4141
|
+
}
|
4142
|
+
|
4143
|
+
return this;
|
4144
|
+
},
|
4003
4145
|
|
4004
4146
|
clone: function( events ) {
|
4005
4147
|
// Do the clone
|
@@ -4021,6 +4163,8 @@ jQuery.fn.extend({
|
|
4021
4163
|
}
|
4022
4164
|
|
4023
4165
|
return jQuery.clean([html.replace(rinlinejQuery, "")
|
4166
|
+
// Handle the case in IE 8 where action=/test/> self-closes a tag
|
4167
|
+
.replace(/=([^="'>\s]+\/)>/g, '="$1">')
|
4024
4168
|
.replace(rleadingWhitespace, "")], ownerDocument)[0];
|
4025
4169
|
} else {
|
4026
4170
|
return this.cloneNode(true);
|
@@ -4044,7 +4188,7 @@ jQuery.fn.extend({
|
|
4044
4188
|
null;
|
4045
4189
|
|
4046
4190
|
// See if we can take a shortcut and just use innerHTML
|
4047
|
-
} else if ( typeof value === "string" &&
|
4191
|
+
} else if ( typeof value === "string" && !rnocache.test( value ) &&
|
4048
4192
|
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
|
4049
4193
|
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
|
4050
4194
|
|
@@ -4083,16 +4227,17 @@ jQuery.fn.extend({
|
|
4083
4227
|
if ( this[0] && this[0].parentNode ) {
|
4084
4228
|
// Make sure that the elements are removed from the DOM before they are inserted
|
4085
4229
|
// this can help fix replacing a parent with child elements
|
4086
|
-
if (
|
4087
|
-
value = jQuery( value ).detach();
|
4088
|
-
|
4089
|
-
} else {
|
4230
|
+
if ( jQuery.isFunction( value ) ) {
|
4090
4231
|
return this.each(function(i) {
|
4091
4232
|
var self = jQuery(this), old = self.html();
|
4092
4233
|
self.replaceWith( value.call( this, i, old ) );
|
4093
4234
|
});
|
4094
4235
|
}
|
4095
4236
|
|
4237
|
+
if ( typeof value !== "string" ) {
|
4238
|
+
value = jQuery(value).detach();
|
4239
|
+
}
|
4240
|
+
|
4096
4241
|
return this.each(function() {
|
4097
4242
|
var next = this.nextSibling, parent = this.parentNode;
|
4098
4243
|
|
@@ -4114,7 +4259,7 @@ jQuery.fn.extend({
|
|
4114
4259
|
},
|
4115
4260
|
|
4116
4261
|
domManip: function( args, table, callback ) {
|
4117
|
-
var results, first, value = args[0], scripts = [];
|
4262
|
+
var results, first, value = args[0], scripts = [], fragment, parent;
|
4118
4263
|
|
4119
4264
|
// We can't cloneNode fragments that contain checked, in WebKit
|
4120
4265
|
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
|
@@ -4132,14 +4277,23 @@ jQuery.fn.extend({
|
|
4132
4277
|
}
|
4133
4278
|
|
4134
4279
|
if ( this[0] ) {
|
4280
|
+
parent = value && value.parentNode;
|
4281
|
+
|
4135
4282
|
// If we're in a fragment, just use that instead of building a new one
|
4136
|
-
if (
|
4137
|
-
results = { fragment:
|
4283
|
+
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
|
4284
|
+
results = { fragment: parent };
|
4285
|
+
|
4138
4286
|
} else {
|
4139
4287
|
results = buildFragment( args, this, scripts );
|
4140
4288
|
}
|
4141
|
-
|
4142
|
-
|
4289
|
+
|
4290
|
+
fragment = results.fragment;
|
4291
|
+
|
4292
|
+
if ( fragment.childNodes.length === 1 ) {
|
4293
|
+
first = fragment = fragment.firstChild;
|
4294
|
+
} else {
|
4295
|
+
first = fragment.firstChild;
|
4296
|
+
}
|
4143
4297
|
|
4144
4298
|
if ( first ) {
|
4145
4299
|
table = table && jQuery.nodeName( first, "tr" );
|
@@ -4149,14 +4303,14 @@ jQuery.fn.extend({
|
|
4149
4303
|
table ?
|
4150
4304
|
root(this[i], first) :
|
4151
4305
|
this[i],
|
4152
|
-
results.cacheable || this.length > 1
|
4153
|
-
|
4154
|
-
|
4306
|
+
i > 0 || results.cacheable || this.length > 1 ?
|
4307
|
+
fragment.cloneNode(true) :
|
4308
|
+
fragment
|
4155
4309
|
);
|
4156
4310
|
}
|
4157
4311
|
}
|
4158
4312
|
|
4159
|
-
if ( scripts ) {
|
4313
|
+
if ( scripts.length ) {
|
4160
4314
|
jQuery.each( scripts, evalScript );
|
4161
4315
|
}
|
4162
4316
|
}
|
@@ -4196,10 +4350,16 @@ function cloneCopyEvent(orig, ret) {
|
|
4196
4350
|
}
|
4197
4351
|
|
4198
4352
|
function buildFragment( args, nodes, scripts ) {
|
4199
|
-
var fragment, cacheable, cacheresults,
|
4353
|
+
var fragment, cacheable, cacheresults,
|
4354
|
+
doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
|
4355
|
+
|
4356
|
+
// Only cache "small" (1/2 KB) strings that are associated with the main document
|
4357
|
+
// Cloning options loses the selected state, so don't cache them
|
4358
|
+
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
|
4359
|
+
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
|
4360
|
+
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
|
4361
|
+
!rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
|
4200
4362
|
|
4201
|
-
// webkit does not clone 'checked' attribute of radio inputs on cloneNode, so don't cache if string has a checked
|
4202
|
-
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
|
4203
4363
|
cacheable = true;
|
4204
4364
|
cacheresults = jQuery.fragments[ args[0] ];
|
4205
4365
|
if ( cacheresults ) {
|
@@ -4210,7 +4370,6 @@ function buildFragment( args, nodes, scripts ) {
|
|
4210
4370
|
}
|
4211
4371
|
|
4212
4372
|
if ( !fragment ) {
|
4213
|
-
doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
|
4214
4373
|
fragment = doc.createDocumentFragment();
|
4215
4374
|
jQuery.clean( args, doc, fragment, scripts );
|
4216
4375
|
}
|
@@ -4232,46 +4391,22 @@ jQuery.each({
|
|
4232
4391
|
replaceAll: "replaceWith"
|
4233
4392
|
}, function( name, original ) {
|
4234
4393
|
jQuery.fn[ name ] = function( selector ) {
|
4235
|
-
var ret = [], insert = jQuery( selector )
|
4236
|
-
|
4237
|
-
|
4238
|
-
|
4239
|
-
|
4240
|
-
|
4241
|
-
|
4242
|
-
|
4243
|
-
|
4244
|
-
|
4245
|
-
|
4246
|
-
|
4247
|
-
// keepData is for internal use only--do not document
|
4248
|
-
remove: function( selector, keepData ) {
|
4249
|
-
if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
|
4250
|
-
if ( !keepData && this.nodeType === 1 ) {
|
4251
|
-
jQuery.cleanData( this.getElementsByTagName("*") );
|
4252
|
-
jQuery.cleanData( [ this ] );
|
4253
|
-
}
|
4254
|
-
|
4255
|
-
if ( this.parentNode ) {
|
4256
|
-
this.parentNode.removeChild( this );
|
4394
|
+
var ret = [], insert = jQuery( selector ),
|
4395
|
+
parent = this.length === 1 && this[0].parentNode;
|
4396
|
+
|
4397
|
+
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
|
4398
|
+
insert[ original ]( this[0] );
|
4399
|
+
return this;
|
4400
|
+
|
4401
|
+
} else {
|
4402
|
+
for ( var i = 0, l = insert.length; i < l; i++ ) {
|
4403
|
+
var elems = (i > 0 ? this.clone(true) : this).get();
|
4404
|
+
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
|
4405
|
+
ret = ret.concat( elems );
|
4257
4406
|
}
|
4407
|
+
|
4408
|
+
return this.pushStack( ret, name, insert.selector );
|
4258
4409
|
}
|
4259
|
-
},
|
4260
|
-
|
4261
|
-
empty: function() {
|
4262
|
-
// Remove element nodes and prevent memory leaks
|
4263
|
-
if ( this.nodeType === 1 ) {
|
4264
|
-
jQuery.cleanData( this.getElementsByTagName("*") );
|
4265
|
-
}
|
4266
|
-
|
4267
|
-
// Remove any remaining nodes
|
4268
|
-
while ( this.firstChild ) {
|
4269
|
-
this.removeChild( this.firstChild );
|
4270
|
-
}
|
4271
|
-
}
|
4272
|
-
}, function( name, fn ) {
|
4273
|
-
jQuery.fn[ name ] = function() {
|
4274
|
-
return this.each( fn, arguments );
|
4275
4410
|
};
|
4276
4411
|
});
|
4277
4412
|
|
@@ -4286,13 +4421,13 @@ jQuery.extend({
|
|
4286
4421
|
|
4287
4422
|
var ret = [];
|
4288
4423
|
|
4289
|
-
|
4424
|
+
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
4290
4425
|
if ( typeof elem === "number" ) {
|
4291
4426
|
elem += "";
|
4292
4427
|
}
|
4293
4428
|
|
4294
4429
|
if ( !elem ) {
|
4295
|
-
|
4430
|
+
continue;
|
4296
4431
|
}
|
4297
4432
|
|
4298
4433
|
// Convert html string into DOM nodes
|
@@ -4343,7 +4478,7 @@ jQuery.extend({
|
|
4343
4478
|
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
|
4344
4479
|
}
|
4345
4480
|
|
4346
|
-
elem =
|
4481
|
+
elem = div.childNodes;
|
4347
4482
|
}
|
4348
4483
|
|
4349
4484
|
if ( elem.nodeType ) {
|
@@ -4351,13 +4486,13 @@ jQuery.extend({
|
|
4351
4486
|
} else {
|
4352
4487
|
ret = jQuery.merge( ret, elem );
|
4353
4488
|
}
|
4354
|
-
|
4355
|
-
});
|
4489
|
+
}
|
4356
4490
|
|
4357
4491
|
if ( fragment ) {
|
4358
4492
|
for ( var i = 0; ret[i]; i++ ) {
|
4359
4493
|
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
|
4360
4494
|
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
|
4495
|
+
|
4361
4496
|
} else {
|
4362
4497
|
if ( ret[i].nodeType === 1 ) {
|
4363
4498
|
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
|
@@ -4371,9 +4506,36 @@ jQuery.extend({
|
|
4371
4506
|
},
|
4372
4507
|
|
4373
4508
|
cleanData: function( elems ) {
|
4374
|
-
|
4375
|
-
jQuery.event.
|
4376
|
-
jQuery.
|
4509
|
+
var data, id, cache = jQuery.cache,
|
4510
|
+
special = jQuery.event.special,
|
4511
|
+
deleteExpando = jQuery.support.deleteExpando;
|
4512
|
+
|
4513
|
+
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
4514
|
+
id = elem[ jQuery.expando ];
|
4515
|
+
|
4516
|
+
if ( id ) {
|
4517
|
+
data = cache[ id ];
|
4518
|
+
|
4519
|
+
if ( data.events ) {
|
4520
|
+
for ( var type in data.events ) {
|
4521
|
+
if ( special[ type ] ) {
|
4522
|
+
jQuery.event.remove( elem, type );
|
4523
|
+
|
4524
|
+
} else {
|
4525
|
+
removeEvent( elem, type, data.handle );
|
4526
|
+
}
|
4527
|
+
}
|
4528
|
+
}
|
4529
|
+
|
4530
|
+
if ( deleteExpando ) {
|
4531
|
+
delete elem[ jQuery.expando ];
|
4532
|
+
|
4533
|
+
} else if ( elem.removeAttribute ) {
|
4534
|
+
elem.removeAttribute( jQuery.expando );
|
4535
|
+
}
|
4536
|
+
|
4537
|
+
delete cache[ id ];
|
4538
|
+
}
|
4377
4539
|
}
|
4378
4540
|
}
|
4379
4541
|
});
|
@@ -4614,15 +4776,15 @@ var jsc = now(),
|
|
4614
4776
|
rquery = /\?/,
|
4615
4777
|
rts = /(\?|&)_=.*?(&|$)/,
|
4616
4778
|
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
4617
|
-
r20 = /%20/g
|
4779
|
+
r20 = /%20/g,
|
4618
4780
|
|
4619
|
-
|
4620
|
-
|
4621
|
-
_load: jQuery.fn.load,
|
4781
|
+
// Keep a copy of the old load method
|
4782
|
+
_load = jQuery.fn.load;
|
4622
4783
|
|
4784
|
+
jQuery.fn.extend({
|
4623
4785
|
load: function( url, params, callback ) {
|
4624
4786
|
if ( typeof url !== "string" ) {
|
4625
|
-
return
|
4787
|
+
return _load.call( this, url );
|
4626
4788
|
|
4627
4789
|
// Don't do a request if no elements are being requested
|
4628
4790
|
} else if ( !this.length ) {
|
@@ -5243,7 +5405,7 @@ jQuery.extend({
|
|
5243
5405
|
if ( jQuery.isArray(obj) ) {
|
5244
5406
|
// Serialize array item.
|
5245
5407
|
jQuery.each( obj, function( i, v ) {
|
5246
|
-
if ( traditional ) {
|
5408
|
+
if ( traditional || /\[\]$/.test( prefix ) ) {
|
5247
5409
|
// Treat each array item as a scalar.
|
5248
5410
|
add( prefix, v );
|
5249
5411
|
} else {
|
@@ -6075,4 +6237,4 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
|
|
6075
6237
|
// Expose jQuery to the global object
|
6076
6238
|
window.jQuery = window.$ = jQuery;
|
6077
6239
|
|
6078
|
-
})(window);
|
6240
|
+
})(window);
|