zena 1.2.7 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +80 -25
- data/Rakefile +2 -2
- data/app/controllers/columns_controller.rb +2 -2
- data/app/controllers/nodes_controller.rb +22 -29
- data/app/controllers/user_sessions_controller.rb +35 -10
- data/app/controllers/users_controller.rb +2 -2
- data/app/controllers/versions_controller.rb +2 -2
- data/app/models/group.rb +15 -1
- data/app/models/node.rb +109 -8
- data/app/models/role.rb +4 -0
- data/app/models/site.rb +64 -58
- data/app/models/template.rb +1 -1
- data/app/models/user.rb +135 -29
- data/app/models/user_session.rb +0 -1
- data/app/models/virtual_class.rb +11 -6
- data/app/views/columns/_form.html.erb +3 -1
- data/app/views/columns/_li.html.erb +1 -1
- data/app/views/columns/create.rjs +1 -1
- data/app/views/groups/_form.rhtml +16 -13
- data/app/views/relations/_form.erb +18 -6
- data/app/views/sites/_form.erb +12 -6
- data/app/views/users/_form.rhtml +23 -8
- data/app/views/users/_li.rhtml +14 -3
- data/app/views/users/index.rhtml +1 -1
- data/app/views/virtual_classes/_form.erb +12 -2
- data/app/views/zafu/default/Node-+login.zafu +8 -1
- data/app/views/zafu/default/Node-+search.zafu +1 -1
- data/bricks/acls/lib/bricks/acls.rb +1 -0
- data/bricks/acls/zena/migrate/20130903150356_longer_names_for_acl.rb +9 -0
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +2 -2
- data/bricks/currency/lib/bricks/currency.rb +120 -0
- data/bricks/currency/zena/test/unit/currency_test.rb +43 -0
- data/bricks/fs_skin/lib/bricks/fs_skin.rb +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node-+search.zafu +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node.zafu +1 -1
- data/bricks/fs_skin/zena/test/unit/fs_skin_view_test.rb +35 -0
- data/bricks/pdf/lib/bricks/pdf.rb +1 -1
- data/bricks/sphinx/lib/bricks/sphinx.rb +2 -0
- data/bricks/sphinx/zena/init.rb +14 -0
- data/bricks/tags/zena/test/zafu/tags.yml +5 -1
- data/bricks/worker/lib/bricks/worker.rb +3 -2
- data/bricks/zena/zena/migrate/20130829093753_add_versioned_flag_to_column.rb +10 -0
- data/bricks/zena/zena/migrate/20130903084909_count_login_attempts.rb +11 -0
- data/bricks/zena/zena/migrate/20131104153126_index_fullpath.rb +10 -0
- data/bricks/zena/zena/migrate/20131104210011_rebuild_fullpath_after_change.rb +10 -0
- data/bricks/zena/zena/migrate/20131105160420_add_skin_id_to_sites.rb +9 -0
- data/bricks/zena/zena/migrate/20131105175822_add_profile_to_users.rb +11 -0
- data/bricks/zena/zena/migrate/20140213120038_fix_idx_scope.rb +13 -0
- data/bricks/zena/zena/migrate/20140628140247_add_site_readonly.rb +9 -0
- data/config/bricks.yml +8 -4
- data/config/gems.yml +5 -3
- data/db/init/base/skins/default/Node-+login.zafu +8 -1
- data/db/init/base/skins/default/Node-+search.zafu +1 -1
- data/lib/bricks/loader.rb +5 -5
- data/lib/gettext_strings.rb +3 -0
- data/lib/tasks/zena.rake +25 -22
- data/lib/zafu/process/context.rb +4 -0
- data/lib/zena/acts/secure_node.rb +3 -3
- data/lib/zena/app.rb +1 -0
- data/lib/zena/deploy.rb +1 -1
- data/lib/zena/deploy/template.rb +1 -1
- data/lib/zena/foxy_parser.rb +5 -2
- data/lib/zena/info.rb +1 -1
- data/lib/zena/site_worker.rb +2 -2
- data/lib/zena/test_controller.rb +5 -2
- data/lib/zena/use/action.rb +9 -2
- data/lib/zena/use/ajax.rb +20 -4
- data/lib/zena/use/ancestry.rb +89 -15
- data/lib/zena/use/authlogic.rb +8 -2
- data/lib/zena/use/context.rb +1 -0
- data/lib/zena/use/display.rb +1 -97
- data/lib/zena/use/forms.rb +28 -8
- data/lib/zena/use/html_tags.rb +16 -7
- data/lib/zena/use/i18n.rb +1 -1
- data/lib/zena/use/prop_eval.rb +6 -1
- data/lib/zena/use/query_node.rb +69 -4
- data/lib/zena/use/recursion.rb +1 -1
- data/lib/zena/use/refactor.rb +5 -2
- data/lib/zena/use/relations.rb +1 -0
- data/lib/zena/use/rendering.rb +7 -4
- data/lib/zena/use/test_helper.rb +8 -4
- data/lib/zena/use/upload.rb +14 -0
- data/lib/zena/use/urls.rb +39 -23
- data/lib/zena/use/version_hash.rb +5 -2
- data/lib/zena/use/workflow.rb +116 -70
- data/lib/zena/use/zafu_eval.rb +41 -0
- data/lib/zena/use/zafu_safe_definitions.rb +1 -0
- data/lib/zena/use/zafu_templates.rb +32 -26
- data/lib/zena/use/zazen.rb +8 -7
- data/locale/app.pot +5 -1
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +385 -281
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.po +378 -271
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.po +387 -272
- data/locale/it/LC_MESSAGES/zena.mo +0 -0
- data/locale/it/zena.po +433 -404
- data/locale/zena.pot +362 -268
- data/public/javascripts/grid.js +280 -104
- data/public/javascripts/zena.js +43 -15
- data/public/stylesheets/admin.css +8 -2
- data/public/stylesheets/grid.css +5 -2
- data/public/stylesheets/popup.css +1 -1
- data/test/fixtures/files/TestNode.zafu +51 -0
- data/test/functional/nodes_controller_test.rb +20 -5
- data/test/functional/user_sessions_controller_test.rb +41 -6
- data/test/functional/users_controller_test.rb +1 -2
- data/test/integration/navigation_test.rb +22 -4
- data/test/integration/query_node/basic.yml +7 -0
- data/test/integration/query_node/complex.yml +1 -1
- data/test/integration/query_node/errors.yml +1 -1
- data/test/integration/query_node/filters.yml +34 -1
- data/test/integration/query_node/relations.yml +6 -13
- data/test/integration/query_node_test.rb +22 -3
- data/test/integration/zafu_compiler/action.yml +1 -1
- data/test/integration/zafu_compiler/alias_site.yml +52 -0
- data/test/integration/zafu_compiler/complex.yml +1 -1
- data/test/integration/zafu_compiler/complex_ok.yml +5 -5
- data/test/integration/zafu_compiler/context.yml +1 -1
- data/test/integration/zafu_compiler/display.yml +56 -5
- data/test/integration/zafu_compiler/forms.yml +35 -2
- data/test/integration/zafu_compiler/meta.yml +4 -0
- data/test/integration/zafu_compiler/rubyless.yml +1 -1
- data/test/integration/zafu_compiler/safe_definitions.yml +4 -0
- data/test/integration/zafu_compiler/security.yml +10 -0
- data/test/integration/zafu_compiler/site.yml +5 -1
- data/test/integration/zafu_compiler/urls.yml +8 -2
- data/test/integration/zafu_compiler/zafu_attributes.yml +2 -1
- data/test/integration/zafu_compiler/zazen.yml +4 -0
- data/test/integration/zafu_compiler_test.rb +47 -4
- data/test/selenium/Grid/grid1.rsel +8 -8
- data/test/sites/complex/sites.yml +2 -2
- data/test/sites/complex/users.yml +1 -0
- data/test/sites/zena/columns.yml +4 -0
- data/test/sites/zena/sites.yml +1 -0
- data/test/sites/zena/users.yml +1 -0
- data/test/unit/node_test.rb +53 -5
- data/test/unit/note_test.rb +1 -1
- data/test/unit/relation_proxy_test.rb +20 -0
- data/test/unit/role_test.rb +2 -0
- data/test/unit/site_test.rb +28 -6
- data/test/unit/user_test.rb +332 -1
- data/test/unit/virtual_class_test.rb +55 -0
- data/test/unit/workflow_test.rb +175 -0
- data/test/unit/zena/use/ancestry_test.rb +52 -10
- data/test/unit/zena/use/prop_eval_test.rb +44 -0
- data/test/unit/zena/use/rendering_test.rb +48 -2
- data/test/unit/zena/use/upload_test.rb +15 -13
- data/test/unit/zena/use/urls_test.rb +1 -0
- data/vendor/plugins/ar_mysql_full_text/lib/ar_mysql_full_text.rb +39 -25
- data/zena.gemspec +69 -307
- metadata +143 -368
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Zena.tmbundle/info.plist +0 -17
- data/vendor/plugins/selenium-on-rails/CHANGELOG +0 -125
- data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +0 -202
- data/vendor/plugins/selenium-on-rails/README.md +0 -202
- data/vendor/plugins/selenium-on-rails/Rakefile +0 -38
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +0 -265
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +0 -148
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +0 -126
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +0 -231
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +0 -195
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +0 -295
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +0 -219
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +0 -156
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +0 -179
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +0 -223
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +0 -441
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +0 -3098
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +0 -2080
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +0 -150
- data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +0 -422
- data/vendor/plugins/selenium-on-rails/doc/files/README.html +0 -321
- data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +0 -222
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +0 -109
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +0 -111
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +0 -118
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +0 -114
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +0 -113
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +0 -120
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +0 -115
- data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +0 -42
- data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +0 -43
- data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +0 -182
- data/vendor/plugins/selenium-on-rails/doc/index.html +0 -24
- data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +0 -208
- data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +0 -19
- data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +0 -50
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +0 -16
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +0 -14
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +0 -11
- data/vendor/plugins/selenium-on-rails/init.rb +0 -15
- data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +0 -122
- data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +0 -16
- data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +0 -8
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +0 -11
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +0 -215
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +0 -57
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +0 -36
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +0 -61
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +0 -20
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +0 -44
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +0 -87
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +0 -56
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +0 -116
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +0 -1002
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +0 -514
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +0 -91
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +0 -24
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +0 -30
- data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +0 -18
- data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +0 -5
- data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +0 -9
- data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +0 -67
- data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +0 -26
- data/vendor/plugins/selenium-on-rails/routes.rb +0 -24
- data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +0 -7
- data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +0 -8
- data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +0 -110
- data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +0 -109
- data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +0 -145
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +0 -55
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butmin.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butplus.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.css +0 -298
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +0 -16
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +0 -205
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/all.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/selected.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc-core.xml +0 -1759
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +0 -1800
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +0 -6
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +0 -142
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +0 -150
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +0 -53
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +0 -356
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +0 -2006
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +0 -101
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +0 -815
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +0 -915
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +0 -958
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +0 -47
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +0 -283
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +0 -383
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +0 -91
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +0 -69
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +0 -1616
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +0 -72
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +0 -3184
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +0 -2300
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +0 -377
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +0 -175
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +0 -148
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +0 -695
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +0 -1362
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +0 -5
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +0 -803
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +0 -1537
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +0 -979
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +0 -3
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +0 -75
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +0 -43
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +0 -316
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +0 -566
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +0 -2816
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +0 -549
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +0 -149
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +0 -2450
- data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +0 -8
- data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +0 -37
- data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +0 -27
- data/vendor/plugins/selenium-on-rails/test/paths_test.rb +0 -72
- data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +0 -157
- data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +0 -708
- data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +0 -242
- data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +0 -67
- data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +0 -43
- data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +0 -35
- data/vendor/plugins/selenium-on-rails/test/setup_test.rb +0 -31
- data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +0 -109
- data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +0 -17
- data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +0 -51
- data/vendor/plugins/selenium-on-rails/test/test_helper.rb +0 -101
- data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +0 -12
- data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +0 -2
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +0 -8
- data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +0 -1
@@ -1,6 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
cssQuery, version 2.0.2 (2005-08-19)
|
3
|
-
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
|
4
|
-
License: http://creativecommons.org/licenses/LGPL/2.1/
|
5
|
-
*/
|
6
|
-
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 x=6(){7 1D="2.0.2";7 C=/\\s*,\\s*/;7 x=6(s,A){33{7 m=[];7 u=1z.32.2c&&!A;7 b=(A)?(A.31==22)?A:[A]:[1g];7 1E=18(s).1l(C),i;9(i=0;i<1E.y;i++){s=1y(1E[i]);8(U&&s.Z(0,3).2b("")==" *#"){s=s.Z(2);A=24([],b,s[1])}1A A=b;7 j=0,t,f,a,c="";H(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";8(s[j]=="("){H(s[j++]!=")")a+=s[j];a=a.Z(0,-1);c+="("+a+")"}A=(u&&V[c])?V[c]:21(A,t,f,a);8(u)V[c]=A}m=m.30(A)}2a x.2d;5 m}2Z(e){x.2d=e;5[]}};x.1Z=6(){5"6 x() {\\n [1D "+1D+"]\\n}"};7 V={};x.2c=L;x.2Y=6(s){8(s){s=1y(s).2b("");2a V[s]}1A V={}};7 29={};7 19=L;x.15=6(n,s){8(19)1i("s="+1U(s));29[n]=12 s()};x.2X=6(c){5 c?1i(c):o};7 D={};7 h={};7 q={P:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};7 T=[];D[" "]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=X(f[i],t,n);9(j=0;(e=s[j]);j++){8(M(e)&&14(e,n))r.z(e)}}};D["#"]=6(r,f,i){7 e,j;9(j=0;(e=f[j]);j++)8(e.B==i)r.z(e)};D["."]=6(r,f,c){c=12 1t("(^|\\\\s)"+c+"(\\\\s|$)");7 e,i;9(i=0;(e=f[i]);i++)8(c.l(e.1V))r.z(e)};D[":"]=6(r,f,p,a){7 t=h[p],e,i;8(t)9(i=0;(e=f[i]);i++)8(t(e,a))r.z(e)};h["2W"]=6(e){7 d=Q(e);8(d.1C)9(7 i=0;i<d.1C.y;i++){8(d.1C[i]==e)5 K}};h["2V"]=6(e){};7 M=6(e){5(e&&e.1c==1&&e.1f!="!")?e:23};7 16=6(e){H(e&&(e=e.2U)&&!M(e))28;5 e};7 G=6(e){H(e&&(e=e.2T)&&!M(e))28;5 e};7 1r=6(e){5 M(e.27)||G(e.27)};7 1P=6(e){5 M(e.26)||16(e.26)};7 1o=6(e){7 c=[];e=1r(e);H(e){c.z(e);e=G(e)}5 c};7 U=K;7 1h=6(e){7 d=Q(e);5(2S d.25=="2R")?/\\.1J$/i.l(d.2Q):2P(d.25=="2O 2N")};7 Q=6(e){5 e.2M||e.1g};7 X=6(e,t){5(t=="*"&&e.1B)?e.1B:e.X(t)};7 17=6(e,t,n){8(t=="*")5 M(e);8(!14(e,n))5 L;8(!1h(e))t=t.2L();5 e.1f==t};7 14=6(e,n){5!n||(n=="*")||(e.2K==n)};7 1e=6(e){5 e.1G};6 24(r,f,B){7 m,i,j;9(i=0;i<f.y;i++){8(m=f[i].1B.2J(B)){8(m.B==B)r.z(m);1A 8(m.y!=23){9(j=0;j<m.y;j++){8(m[j].B==B)r.z(m[j])}}}}5 r};8(![].z)22.2I.z=6(){9(7 i=0;i<1z.y;i++){o[o.y]=1z[i]}5 o.y};7 N=/\\|/;6 21(A,t,f,a){8(N.l(f)){f=f.1l(N);a=f[0];f=f[1]}7 r=[];8(D[t]){D[t](r,A,f,a)}5 r};7 S=/^[^\\s>+~]/;7 20=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 1y(s){8(S.l(s))s=" "+s;5 s.P(20)||[]};7 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;7 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;7 18=6(s){5 s.O(W,"$1").O(I,"$1*$2")};7 1u={1Z:6(){5"\'"},P:/^(\'[^\']*\')|("[^"]*")$/,l:6(s){5 o.P.l(s)},1S:6(s){5 o.l(s)?s:o+s+o},1Y:6(s){5 o.l(s)?s.Z(1,-1):s}};7 1s=6(t){5 1u.1Y(t)};7 E=/([\\/()[\\]?{}|*+-])/g;6 R(s){5 s.O(E,"\\\\$1")};x.15("1j-2H",6(){D[">"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=1o(f[i]);9(j=0;(e=s[j]);j++)8(17(e,t,n))r.z(e)}};D["+"]=6(r,f,t,n){9(7 i=0;i<f.y;i++){7 e=G(f[i]);8(e&&17(e,t,n))r.z(e)}};D["@"]=6(r,f,a){7 t=T[a].l;7 e,i;9(i=0;(e=f[i]);i++)8(t(e))r.z(e)};h["2G-10"]=6(e){5!16(e)};h["1x"]=6(e,c){c=12 1t("^"+c,"i");H(e&&!e.13("1x"))e=e.1n;5 e&&c.l(e.13("1x"))};q.1X=/\\\\:/g;q.1w="@";q.J={};q.O=6(m,a,n,c,v){7 k=o.1w+m;8(!T[k]){a=o.1W(a,c||"",v||"");T[k]=a;T.z(a)}5 T[k].B};q.1Q=6(s){s=s.O(o.1X,"|");7 m;H(m=s.P(o.P)){7 r=o.O(m[0],m[1],m[2],m[3],m[4]);s=s.O(o.P,r)}5 s};q.1W=6(p,t,v){7 a={};a.B=o.1w+T.y;a.2F=p;t=o.J[t];t=t?t(o.13(p),1s(v)):L;a.l=12 2E("e","5 "+t);5 a};q.13=6(n){1d(n.2D()){F"B":5"e.B";F"2C":5"e.1V";F"9":5"e.2B";F"1T":8(U){5"1U((e.2A.P(/1T=\\\\1v?([^\\\\s\\\\1v]*)\\\\1v?/)||[])[1]||\'\')"}}5"e.13(\'"+n.O(N,":")+"\')"};q.J[""]=6(a){5 a};q.J["="]=6(a,v){5 a+"=="+1u.1S(v)};q.J["~="]=6(a,v){5"/(^| )"+R(v)+"( |$)/.l("+a+")"};q.J["|="]=6(a,v){5"/^"+R(v)+"(-|$)/.l("+a+")"};7 1R=18;18=6(s){5 1R(q.1Q(s))}});x.15("1j-2z",6(){D["~"]=6(r,f,t,n){7 e,i;9(i=0;(e=f[i]);i++){H(e=G(e)){8(17(e,t,n))r.z(e)}}};h["2y"]=6(e,t){t=12 1t(R(1s(t)));5 t.l(1e(e))};h["2x"]=6(e){5 e==Q(e).1H};h["2w"]=6(e){7 n,i;9(i=0;(n=e.1F[i]);i++){8(M(n)||n.1c==3)5 L}5 K};h["1N-10"]=6(e){5!G(e)};h["2v-10"]=6(e){e=e.1n;5 1r(e)==1P(e)};h["2u"]=6(e,s){7 n=x(s,Q(e));9(7 i=0;i<n.y;i++){8(n[i]==e)5 L}5 K};h["1O-10"]=6(e,a){5 1p(e,a,16)};h["1O-1N-10"]=6(e,a){5 1p(e,a,G)};h["2t"]=6(e){5 e.B==2s.2r.Z(1)};h["1M"]=6(e){5 e.1M};h["2q"]=6(e){5 e.1q===L};h["1q"]=6(e){5 e.1q};h["1L"]=6(e){5 e.1L};q.J["^="]=6(a,v){5"/^"+R(v)+"/.l("+a+")"};q.J["$="]=6(a,v){5"/"+R(v)+"$/.l("+a+")"};q.J["*="]=6(a,v){5"/"+R(v)+"/.l("+a+")"};6 1p(e,a,t){1d(a){F"n":5 K;F"2p":a="2n";1a;F"2o":a="2n+1"}7 1m=1o(e.1n);6 1k(i){7 i=(t==G)?1m.y-i:i-1;5 1m[i]==e};8(!Y(a))5 1k(a);a=a.1l("n");7 m=1K(a[0]);7 s=1K(a[1]);8((Y(m)||m==1)&&s==0)5 K;8(m==0&&!Y(s))5 1k(s);8(Y(s))s=0;7 c=1;H(e=t(e))c++;8(Y(m)||m==1)5(t==G)?(c<=s):(s>=c);5(c%m)==s}});x.15("1j-2m",6(){U=1i("L;/*@2l@8(@\\2k)U=K@2j@*/");8(!U){X=6(e,t,n){5 n?e.2i("*",t):e.X(t)};14=6(e,n){5!n||(n=="*")||(e.2h==n)};1h=1g.1I?6(e){5/1J/i.l(Q(e).1I)}:6(e){5 Q(e).1H.1f!="2g"};1e=6(e){5 e.2f||e.1G||1b(e)};6 1b(e){7 t="",n,i;9(i=0;(n=e.1F[i]);i++){1d(n.1c){F 11:F 1:t+=1b(n);1a;F 3:t+=n.2e;1a}}5 t}}});19=K;5 x}();',62,190,'|||||return|function|var|if|for||||||||pseudoClasses||||test|||this||AttributeSelector|||||||cssQuery|length|push|fr|id||selectors||case|nextElementSibling|while||tests|true|false|thisElement||replace|match|getDocument|regEscape||attributeSelectors|isMSIE|cache||getElementsByTagName|isNaN|slice|child||new|getAttribute|compareNamespace|addModule|previousElementSibling|compareTagName|parseSelector|loaded|break|_0|nodeType|switch|getTextContent|tagName|document|isXML|eval|css|_1|split|ch|parentNode|childElements|nthChild|disabled|firstElementChild|getText|RegExp|Quote|x22|PREFIX|lang|_2|arguments|else|all|links|version|se|childNodes|innerText|documentElement|contentType|xml|parseInt|indeterminate|checked|last|nth|lastElementChild|parse|_3|add|href|String|className|create|NS_IE|remove|toString|ST|select|Array|null|_4|mimeType|lastChild|firstChild|continue|modules|delete|join|caching|error|nodeValue|textContent|HTML|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard||odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|Function|name|first|level2|prototype|item|scopeName|toUpperCase|ownerDocument|Document|XML|Boolean|URL|unknown|typeof|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try'.split('|'),0,{}))
|
@@ -1,142 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
cssQuery, version 2.0.2 (2005-08-19)
|
3
|
-
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
|
4
|
-
License: http://creativecommons.org/licenses/LGPL/2.1/
|
5
|
-
*/
|
6
|
-
|
7
|
-
cssQuery.addModule("css-level2", function() {
|
8
|
-
|
9
|
-
// -----------------------------------------------------------------------
|
10
|
-
// selectors
|
11
|
-
// -----------------------------------------------------------------------
|
12
|
-
|
13
|
-
// child selector
|
14
|
-
selectors[">"] = function($results, $from, $tagName, $namespace) {
|
15
|
-
var $element, i, j;
|
16
|
-
for (i = 0; i < $from.length; i++) {
|
17
|
-
var $subset = childElements($from[i]);
|
18
|
-
for (j = 0; ($element = $subset[j]); j++)
|
19
|
-
if (compareTagName($element, $tagName, $namespace))
|
20
|
-
$results.push($element);
|
21
|
-
}
|
22
|
-
};
|
23
|
-
|
24
|
-
// sibling selector
|
25
|
-
selectors["+"] = function($results, $from, $tagName, $namespace) {
|
26
|
-
for (var i = 0; i < $from.length; i++) {
|
27
|
-
var $element = nextElementSibling($from[i]);
|
28
|
-
if ($element && compareTagName($element, $tagName, $namespace))
|
29
|
-
$results.push($element);
|
30
|
-
}
|
31
|
-
};
|
32
|
-
|
33
|
-
// attribute selector
|
34
|
-
selectors["@"] = function($results, $from, $attributeSelectorID) {
|
35
|
-
var $test = attributeSelectors[$attributeSelectorID].test;
|
36
|
-
var $element, i;
|
37
|
-
for (i = 0; ($element = $from[i]); i++)
|
38
|
-
if ($test($element)) $results.push($element);
|
39
|
-
};
|
40
|
-
|
41
|
-
// -----------------------------------------------------------------------
|
42
|
-
// pseudo-classes
|
43
|
-
// -----------------------------------------------------------------------
|
44
|
-
|
45
|
-
pseudoClasses["first-child"] = function($element) {
|
46
|
-
return !previousElementSibling($element);
|
47
|
-
};
|
48
|
-
|
49
|
-
pseudoClasses["lang"] = function($element, $code) {
|
50
|
-
$code = new RegExp("^" + $code, "i");
|
51
|
-
while ($element && !$element.getAttribute("lang")) $element = $element.parentNode;
|
52
|
-
return $element && $code.test($element.getAttribute("lang"));
|
53
|
-
};
|
54
|
-
|
55
|
-
// -----------------------------------------------------------------------
|
56
|
-
// attribute selectors
|
57
|
-
// -----------------------------------------------------------------------
|
58
|
-
|
59
|
-
// constants
|
60
|
-
AttributeSelector.NS_IE = /\\:/g;
|
61
|
-
AttributeSelector.PREFIX = "@";
|
62
|
-
// properties
|
63
|
-
AttributeSelector.tests = {};
|
64
|
-
// methods
|
65
|
-
AttributeSelector.replace = function($match, $attribute, $namespace, $compare, $value) {
|
66
|
-
var $key = this.PREFIX + $match;
|
67
|
-
if (!attributeSelectors[$key]) {
|
68
|
-
$attribute = this.create($attribute, $compare || "", $value || "");
|
69
|
-
// store the selector
|
70
|
-
attributeSelectors[$key] = $attribute;
|
71
|
-
attributeSelectors.push($attribute);
|
72
|
-
}
|
73
|
-
return attributeSelectors[$key].id;
|
74
|
-
};
|
75
|
-
AttributeSelector.parse = function($selector) {
|
76
|
-
$selector = $selector.replace(this.NS_IE, "|");
|
77
|
-
var $match;
|
78
|
-
while ($match = $selector.match(this.match)) {
|
79
|
-
var $replace = this.replace($match[0], $match[1], $match[2], $match[3], $match[4]);
|
80
|
-
$selector = $selector.replace(this.match, $replace);
|
81
|
-
}
|
82
|
-
return $selector;
|
83
|
-
};
|
84
|
-
AttributeSelector.create = function($propertyName, $test, $value) {
|
85
|
-
var $attributeSelector = {};
|
86
|
-
$attributeSelector.id = this.PREFIX + attributeSelectors.length;
|
87
|
-
$attributeSelector.name = $propertyName;
|
88
|
-
$test = this.tests[$test];
|
89
|
-
$test = $test ? $test(this.getAttribute($propertyName), getText($value)) : false;
|
90
|
-
$attributeSelector.test = new Function("e", "return " + $test);
|
91
|
-
return $attributeSelector;
|
92
|
-
};
|
93
|
-
AttributeSelector.getAttribute = function($name) {
|
94
|
-
switch ($name.toLowerCase()) {
|
95
|
-
case "id":
|
96
|
-
return "e.id";
|
97
|
-
case "class":
|
98
|
-
return "e.className";
|
99
|
-
case "for":
|
100
|
-
return "e.htmlFor";
|
101
|
-
case "href":
|
102
|
-
if (isMSIE) {
|
103
|
-
// IE always returns the full path not the fragment in the href attribute
|
104
|
-
// so we RegExp it out of outerHTML. Opera does the same thing but there
|
105
|
-
// is no way to get the original attribute.
|
106
|
-
return "String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')";
|
107
|
-
}
|
108
|
-
}
|
109
|
-
return "e.getAttribute('" + $name.replace($NAMESPACE, ":") + "')";
|
110
|
-
};
|
111
|
-
|
112
|
-
// -----------------------------------------------------------------------
|
113
|
-
// attribute selector tests
|
114
|
-
// -----------------------------------------------------------------------
|
115
|
-
|
116
|
-
AttributeSelector.tests[""] = function($attribute) {
|
117
|
-
return $attribute;
|
118
|
-
};
|
119
|
-
|
120
|
-
AttributeSelector.tests["="] = function($attribute, $value) {
|
121
|
-
return $attribute + "==" + Quote.add($value);
|
122
|
-
};
|
123
|
-
|
124
|
-
AttributeSelector.tests["~="] = function($attribute, $value) {
|
125
|
-
return "/(^| )" + regEscape($value) + "( |$)/.test(" + $attribute + ")";
|
126
|
-
};
|
127
|
-
|
128
|
-
AttributeSelector.tests["|="] = function($attribute, $value) {
|
129
|
-
return "/^" + regEscape($value) + "(-|$)/.test(" + $attribute + ")";
|
130
|
-
};
|
131
|
-
|
132
|
-
// -----------------------------------------------------------------------
|
133
|
-
// parsing
|
134
|
-
// -----------------------------------------------------------------------
|
135
|
-
|
136
|
-
// override parseSelector to parse out attribute selectors
|
137
|
-
var _parseSelector = parseSelector;
|
138
|
-
parseSelector = function($selector) {
|
139
|
-
return _parseSelector(AttributeSelector.parse($selector));
|
140
|
-
};
|
141
|
-
|
142
|
-
}); // addModule
|
@@ -1,150 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
cssQuery, version 2.0.2 (2005-08-19)
|
3
|
-
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
|
4
|
-
License: http://creativecommons.org/licenses/LGPL/2.1/
|
5
|
-
*/
|
6
|
-
|
7
|
-
/* Thanks to Bill Edney */
|
8
|
-
|
9
|
-
cssQuery.addModule("css-level3", function() {
|
10
|
-
|
11
|
-
// -----------------------------------------------------------------------
|
12
|
-
// selectors
|
13
|
-
// -----------------------------------------------------------------------
|
14
|
-
|
15
|
-
// indirect sibling selector
|
16
|
-
selectors["~"] = function($results, $from, $tagName, $namespace) {
|
17
|
-
var $element, i;
|
18
|
-
for (i = 0; ($element = $from[i]); i++) {
|
19
|
-
while ($element = nextElementSibling($element)) {
|
20
|
-
if (compareTagName($element, $tagName, $namespace))
|
21
|
-
$results.push($element);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
};
|
25
|
-
|
26
|
-
// -----------------------------------------------------------------------
|
27
|
-
// pseudo-classes
|
28
|
-
// -----------------------------------------------------------------------
|
29
|
-
|
30
|
-
// I'm hoping these pseudo-classes are pretty readable. Let me know if
|
31
|
-
// any need explanation.
|
32
|
-
|
33
|
-
pseudoClasses["contains"] = function($element, $text) {
|
34
|
-
$text = new RegExp(regEscape(getText($text)));
|
35
|
-
return $text.test(getTextContent($element));
|
36
|
-
};
|
37
|
-
|
38
|
-
pseudoClasses["root"] = function($element) {
|
39
|
-
return $element == getDocument($element).documentElement;
|
40
|
-
};
|
41
|
-
|
42
|
-
pseudoClasses["empty"] = function($element) {
|
43
|
-
var $node, i;
|
44
|
-
for (i = 0; ($node = $element.childNodes[i]); i++) {
|
45
|
-
if (thisElement($node) || $node.nodeType == 3) return false;
|
46
|
-
}
|
47
|
-
return true;
|
48
|
-
};
|
49
|
-
|
50
|
-
pseudoClasses["last-child"] = function($element) {
|
51
|
-
return !nextElementSibling($element);
|
52
|
-
};
|
53
|
-
|
54
|
-
pseudoClasses["only-child"] = function($element) {
|
55
|
-
$element = $element.parentNode;
|
56
|
-
return firstElementChild($element) == lastElementChild($element);
|
57
|
-
};
|
58
|
-
|
59
|
-
pseudoClasses["not"] = function($element, $selector) {
|
60
|
-
var $negated = cssQuery($selector, getDocument($element));
|
61
|
-
for (var i = 0; i < $negated.length; i++) {
|
62
|
-
if ($negated[i] == $element) return false;
|
63
|
-
}
|
64
|
-
return true;
|
65
|
-
};
|
66
|
-
|
67
|
-
pseudoClasses["nth-child"] = function($element, $arguments) {
|
68
|
-
return nthChild($element, $arguments, previousElementSibling);
|
69
|
-
};
|
70
|
-
|
71
|
-
pseudoClasses["nth-last-child"] = function($element, $arguments) {
|
72
|
-
return nthChild($element, $arguments, nextElementSibling);
|
73
|
-
};
|
74
|
-
|
75
|
-
pseudoClasses["target"] = function($element) {
|
76
|
-
return $element.id == location.hash.slice(1);
|
77
|
-
};
|
78
|
-
|
79
|
-
// UI element states
|
80
|
-
|
81
|
-
pseudoClasses["checked"] = function($element) {
|
82
|
-
return $element.checked;
|
83
|
-
};
|
84
|
-
|
85
|
-
pseudoClasses["enabled"] = function($element) {
|
86
|
-
return $element.disabled === false;
|
87
|
-
};
|
88
|
-
|
89
|
-
pseudoClasses["disabled"] = function($element) {
|
90
|
-
return $element.disabled;
|
91
|
-
};
|
92
|
-
|
93
|
-
pseudoClasses["indeterminate"] = function($element) {
|
94
|
-
return $element.indeterminate;
|
95
|
-
};
|
96
|
-
|
97
|
-
// -----------------------------------------------------------------------
|
98
|
-
// attribute selector tests
|
99
|
-
// -----------------------------------------------------------------------
|
100
|
-
|
101
|
-
AttributeSelector.tests["^="] = function($attribute, $value) {
|
102
|
-
return "/^" + regEscape($value) + "/.test(" + $attribute + ")";
|
103
|
-
};
|
104
|
-
|
105
|
-
AttributeSelector.tests["$="] = function($attribute, $value) {
|
106
|
-
return "/" + regEscape($value) + "$/.test(" + $attribute + ")";
|
107
|
-
};
|
108
|
-
|
109
|
-
AttributeSelector.tests["*="] = function($attribute, $value) {
|
110
|
-
return "/" + regEscape($value) + "/.test(" + $attribute + ")";
|
111
|
-
};
|
112
|
-
|
113
|
-
// -----------------------------------------------------------------------
|
114
|
-
// nth child support (Bill Edney)
|
115
|
-
// -----------------------------------------------------------------------
|
116
|
-
|
117
|
-
function nthChild($element, $arguments, $traverse) {
|
118
|
-
switch ($arguments) {
|
119
|
-
case "n": return true;
|
120
|
-
case "even": $arguments = "2n"; break;
|
121
|
-
case "odd": $arguments = "2n+1";
|
122
|
-
}
|
123
|
-
|
124
|
-
var $$children = childElements($element.parentNode);
|
125
|
-
function _checkIndex($index) {
|
126
|
-
var $index = ($traverse == nextElementSibling) ? $$children.length - $index : $index - 1;
|
127
|
-
return $$children[$index] == $element;
|
128
|
-
};
|
129
|
-
|
130
|
-
// it was just a number (no "n")
|
131
|
-
if (!isNaN($arguments)) return _checkIndex($arguments);
|
132
|
-
|
133
|
-
$arguments = $arguments.split("n");
|
134
|
-
var $multiplier = parseInt($arguments[0]);
|
135
|
-
var $step = parseInt($arguments[1]);
|
136
|
-
|
137
|
-
if ((isNaN($multiplier) || $multiplier == 1) && $step == 0) return true;
|
138
|
-
if ($multiplier == 0 && !isNaN($step)) return _checkIndex($step);
|
139
|
-
if (isNaN($step)) $step = 0;
|
140
|
-
|
141
|
-
var $count = 1;
|
142
|
-
while ($element = $traverse($element)) $count++;
|
143
|
-
|
144
|
-
if (isNaN($multiplier) || $multiplier == 1)
|
145
|
-
return ($traverse == nextElementSibling) ? ($count <= $step) : ($step >= $count);
|
146
|
-
|
147
|
-
return ($count % $multiplier) == $step;
|
148
|
-
};
|
149
|
-
|
150
|
-
}); // addModule
|
@@ -1,53 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
cssQuery, version 2.0.2 (2005-08-19)
|
3
|
-
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
|
4
|
-
License: http://creativecommons.org/licenses/LGPL/2.1/
|
5
|
-
*/
|
6
|
-
|
7
|
-
cssQuery.addModule("css-standard", function() { // override IE optimisation
|
8
|
-
|
9
|
-
// cssQuery was originally written as the CSS engine for IE7. It is
|
10
|
-
// optimised (in terms of size not speed) for IE so this module is
|
11
|
-
// provided separately to provide cross-browser support.
|
12
|
-
|
13
|
-
// -----------------------------------------------------------------------
|
14
|
-
// browser compatibility
|
15
|
-
// -----------------------------------------------------------------------
|
16
|
-
|
17
|
-
// sniff for Win32 Explorer
|
18
|
-
isMSIE = eval("false;/*@cc_on@if(@\x5fwin32)isMSIE=true@end@*/");
|
19
|
-
|
20
|
-
if (!isMSIE) {
|
21
|
-
getElementsByTagName = function($element, $tagName, $namespace) {
|
22
|
-
return $namespace ? $element.getElementsByTagNameNS("*", $tagName) :
|
23
|
-
$element.getElementsByTagName($tagName);
|
24
|
-
};
|
25
|
-
|
26
|
-
compareNamespace = function($element, $namespace) {
|
27
|
-
return !$namespace || ($namespace == "*") || ($element.prefix == $namespace);
|
28
|
-
};
|
29
|
-
|
30
|
-
isXML = document.contentType ? function($element) {
|
31
|
-
return /xml/i.test(getDocument($element).contentType);
|
32
|
-
} : function($element) {
|
33
|
-
return getDocument($element).documentElement.tagName != "HTML";
|
34
|
-
};
|
35
|
-
|
36
|
-
getTextContent = function($element) {
|
37
|
-
// mozilla || opera || other
|
38
|
-
return $element.textContent || $element.innerText || _getTextContent($element);
|
39
|
-
};
|
40
|
-
|
41
|
-
function _getTextContent($element) {
|
42
|
-
var $textContent = "", $node, i;
|
43
|
-
for (i = 0; ($node = $element.childNodes[i]); i++) {
|
44
|
-
switch ($node.nodeType) {
|
45
|
-
case 11: // document fragment
|
46
|
-
case 1: $textContent += _getTextContent($node); break;
|
47
|
-
case 3: $textContent += $node.nodeValue; break;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
return $textContent;
|
51
|
-
};
|
52
|
-
}
|
53
|
-
}); // addModule
|
@@ -1,356 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
cssQuery, version 2.0.2 (2005-08-19)
|
3
|
-
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
|
4
|
-
License: http://creativecommons.org/licenses/LGPL/2.1/
|
5
|
-
*/
|
6
|
-
|
7
|
-
// the following functions allow querying of the DOM using CSS selectors
|
8
|
-
var cssQuery = function() {
|
9
|
-
var version = "2.0.2";
|
10
|
-
|
11
|
-
// -----------------------------------------------------------------------
|
12
|
-
// main query function
|
13
|
-
// -----------------------------------------------------------------------
|
14
|
-
|
15
|
-
var $COMMA = /\s*,\s*/;
|
16
|
-
var cssQuery = function($selector, $$from) {
|
17
|
-
try {
|
18
|
-
var $match = [];
|
19
|
-
var $useCache = arguments.callee.caching && !$$from;
|
20
|
-
var $base = ($$from) ? ($$from.constructor == Array) ? $$from : [$$from] : [document];
|
21
|
-
// process comma separated selectors
|
22
|
-
var $$selectors = parseSelector($selector).split($COMMA), i;
|
23
|
-
for (i = 0; i < $$selectors.length; i++) {
|
24
|
-
// convert the selector to a stream
|
25
|
-
$selector = _toStream($$selectors[i]);
|
26
|
-
// faster chop if it starts with id (MSIE only)
|
27
|
-
if (isMSIE && $selector.slice(0, 3).join("") == " *#") {
|
28
|
-
$selector = $selector.slice(2);
|
29
|
-
$$from = _msie_selectById([], $base, $selector[1]);
|
30
|
-
} else $$from = $base;
|
31
|
-
// process the stream
|
32
|
-
var j = 0, $token, $filter, $arguments, $cacheSelector = "";
|
33
|
-
while (j < $selector.length) {
|
34
|
-
$token = $selector[j++];
|
35
|
-
$filter = $selector[j++];
|
36
|
-
$cacheSelector += $token + $filter;
|
37
|
-
// some pseudo-classes allow arguments to be passed
|
38
|
-
// e.g. nth-child(even)
|
39
|
-
$arguments = "";
|
40
|
-
if ($selector[j] == "(") {
|
41
|
-
while ($selector[j++] != ")" && j < $selector.length) {
|
42
|
-
$arguments += $selector[j];
|
43
|
-
}
|
44
|
-
$arguments = $arguments.slice(0, -1);
|
45
|
-
$cacheSelector += "(" + $arguments + ")";
|
46
|
-
}
|
47
|
-
// process a token/filter pair use cached results if possible
|
48
|
-
$$from = ($useCache && cache[$cacheSelector]) ?
|
49
|
-
cache[$cacheSelector] : select($$from, $token, $filter, $arguments);
|
50
|
-
if ($useCache) cache[$cacheSelector] = $$from;
|
51
|
-
}
|
52
|
-
$match = $match.concat($$from);
|
53
|
-
}
|
54
|
-
delete cssQuery.error;
|
55
|
-
return $match;
|
56
|
-
} catch ($error) {
|
57
|
-
cssQuery.error = $error;
|
58
|
-
return [];
|
59
|
-
}};
|
60
|
-
|
61
|
-
// -----------------------------------------------------------------------
|
62
|
-
// public interface
|
63
|
-
// -----------------------------------------------------------------------
|
64
|
-
|
65
|
-
cssQuery.toString = function() {
|
66
|
-
return "function cssQuery() {\n [version " + version + "]\n}";
|
67
|
-
};
|
68
|
-
|
69
|
-
// caching
|
70
|
-
var cache = {};
|
71
|
-
cssQuery.caching = false;
|
72
|
-
cssQuery.clearCache = function($selector) {
|
73
|
-
if ($selector) {
|
74
|
-
$selector = _toStream($selector).join("");
|
75
|
-
delete cache[$selector];
|
76
|
-
} else cache = {};
|
77
|
-
};
|
78
|
-
|
79
|
-
// allow extensions
|
80
|
-
var modules = {};
|
81
|
-
var loaded = false;
|
82
|
-
cssQuery.addModule = function($name, $script) {
|
83
|
-
if (loaded) eval("$script=" + String($script));
|
84
|
-
modules[$name] = new $script();;
|
85
|
-
};
|
86
|
-
|
87
|
-
// hackery
|
88
|
-
cssQuery.valueOf = function($code) {
|
89
|
-
return $code ? eval($code) : this;
|
90
|
-
};
|
91
|
-
|
92
|
-
// -----------------------------------------------------------------------
|
93
|
-
// declarations
|
94
|
-
// -----------------------------------------------------------------------
|
95
|
-
|
96
|
-
var selectors = {};
|
97
|
-
var pseudoClasses = {};
|
98
|
-
// a safari bug means that these have to be declared here
|
99
|
-
var AttributeSelector = {match: /\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/};
|
100
|
-
var attributeSelectors = [];
|
101
|
-
|
102
|
-
// -----------------------------------------------------------------------
|
103
|
-
// selectors
|
104
|
-
// -----------------------------------------------------------------------
|
105
|
-
|
106
|
-
// descendant selector
|
107
|
-
selectors[" "] = function($results, $from, $tagName, $namespace) {
|
108
|
-
// loop through current selection
|
109
|
-
var $element, i, j;
|
110
|
-
for (i = 0; i < $from.length; i++) {
|
111
|
-
// get descendants
|
112
|
-
var $subset = getElementsByTagName($from[i], $tagName, $namespace);
|
113
|
-
// loop through descendants and add to results selection
|
114
|
-
for (j = 0; ($element = $subset[j]); j++) {
|
115
|
-
if (thisElement($element) && compareNamespace($element, $namespace))
|
116
|
-
$results.push($element);
|
117
|
-
}
|
118
|
-
}
|
119
|
-
};
|
120
|
-
|
121
|
-
// ID selector
|
122
|
-
selectors["#"] = function($results, $from, $id) {
|
123
|
-
// loop through current selection and check ID
|
124
|
-
var $element, j;
|
125
|
-
for (j = 0; ($element = $from[j]); j++) if ($element.id == $id) $results.push($element);
|
126
|
-
};
|
127
|
-
|
128
|
-
// class selector
|
129
|
-
selectors["."] = function($results, $from, $className) {
|
130
|
-
// create a RegExp version of the class
|
131
|
-
$className = new RegExp("(^|\\s)" + $className + "(\\s|$)");
|
132
|
-
// loop through current selection and check class
|
133
|
-
var $element, i;
|
134
|
-
for (i = 0; ($element = $from[i]); i++)
|
135
|
-
if ($className.test($element.className)) $results.push($element);
|
136
|
-
};
|
137
|
-
|
138
|
-
// pseudo-class selector
|
139
|
-
selectors[":"] = function($results, $from, $pseudoClass, $arguments) {
|
140
|
-
// retrieve the cssQuery pseudo-class function
|
141
|
-
var $test = pseudoClasses[$pseudoClass], $element, i;
|
142
|
-
// loop through current selection and apply pseudo-class filter
|
143
|
-
if ($test) for (i = 0; ($element = $from[i]); i++)
|
144
|
-
// if the cssQuery pseudo-class function returns "true" add the element
|
145
|
-
if ($test($element, $arguments)) $results.push($element);
|
146
|
-
};
|
147
|
-
|
148
|
-
// -----------------------------------------------------------------------
|
149
|
-
// pseudo-classes
|
150
|
-
// -----------------------------------------------------------------------
|
151
|
-
|
152
|
-
pseudoClasses["link"] = function($element) {
|
153
|
-
var $document = getDocument($element);
|
154
|
-
if ($document.links) for (var i = 0; i < $document.links.length; i++) {
|
155
|
-
if ($document.links[i] == $element) return true;
|
156
|
-
}
|
157
|
-
};
|
158
|
-
|
159
|
-
pseudoClasses["visited"] = function($element) {
|
160
|
-
// can't do this without jiggery-pokery
|
161
|
-
};
|
162
|
-
|
163
|
-
// -----------------------------------------------------------------------
|
164
|
-
// DOM traversal
|
165
|
-
// -----------------------------------------------------------------------
|
166
|
-
|
167
|
-
// IE5/6 includes comments (LOL) in it's elements collections.
|
168
|
-
// so we have to check for this. the test is tagName != "!". LOL (again).
|
169
|
-
var thisElement = function($element) {
|
170
|
-
return ($element && $element.nodeType == 1 && $element.tagName != "!") ? $element : null;
|
171
|
-
};
|
172
|
-
|
173
|
-
// return the previous element to the supplied element
|
174
|
-
// previousSibling is not good enough as it might return a text or comment node
|
175
|
-
var previousElementSibling = function($element) {
|
176
|
-
while ($element && ($element = $element.previousSibling) && !thisElement($element)) continue;
|
177
|
-
return $element;
|
178
|
-
};
|
179
|
-
|
180
|
-
// return the next element to the supplied element
|
181
|
-
var nextElementSibling = function($element) {
|
182
|
-
while ($element && ($element = $element.nextSibling) && !thisElement($element)) continue;
|
183
|
-
return $element;
|
184
|
-
};
|
185
|
-
|
186
|
-
// return the first child ELEMENT of an element
|
187
|
-
// NOT the first child node (though they may be the same thing)
|
188
|
-
var firstElementChild = function($element) {
|
189
|
-
return thisElement($element.firstChild) || nextElementSibling($element.firstChild);
|
190
|
-
};
|
191
|
-
|
192
|
-
var lastElementChild = function($element) {
|
193
|
-
return thisElement($element.lastChild) || previousElementSibling($element.lastChild);
|
194
|
-
};
|
195
|
-
|
196
|
-
// return child elements of an element (not child nodes)
|
197
|
-
var childElements = function($element) {
|
198
|
-
var $childElements = [];
|
199
|
-
$element = firstElementChild($element);
|
200
|
-
while ($element) {
|
201
|
-
$childElements.push($element);
|
202
|
-
$element = nextElementSibling($element);
|
203
|
-
}
|
204
|
-
return $childElements;
|
205
|
-
};
|
206
|
-
|
207
|
-
// -----------------------------------------------------------------------
|
208
|
-
// browser compatibility
|
209
|
-
// -----------------------------------------------------------------------
|
210
|
-
|
211
|
-
// all of the functions in this section can be overwritten. the default
|
212
|
-
// configuration is for IE. The functions below reflect this. standard
|
213
|
-
// methods are included in a separate module. It would probably be better
|
214
|
-
// the other way round of course but this makes it easier to keep IE7 trim.
|
215
|
-
|
216
|
-
var isMSIE = true;
|
217
|
-
|
218
|
-
var isXML = function($element) {
|
219
|
-
var $document = getDocument($element);
|
220
|
-
return (typeof $document.mimeType == "unknown") ?
|
221
|
-
/\.xml$/i.test($document.URL) :
|
222
|
-
Boolean($document.mimeType == "XML Document");
|
223
|
-
};
|
224
|
-
|
225
|
-
// return the element's containing document
|
226
|
-
var getDocument = function($element) {
|
227
|
-
return $element.ownerDocument || $element.document;
|
228
|
-
};
|
229
|
-
|
230
|
-
var getElementsByTagName = function($element, $tagName) {
|
231
|
-
return ($tagName == "*" && $element.all) ? $element.all : $element.getElementsByTagName($tagName);
|
232
|
-
};
|
233
|
-
|
234
|
-
var compareTagName = function($element, $tagName, $namespace) {
|
235
|
-
if ($tagName == "*") return thisElement($element);
|
236
|
-
if (!compareNamespace($element, $namespace)) return false;
|
237
|
-
if (!isXML($element)) $tagName = $tagName.toUpperCase();
|
238
|
-
return $element.tagName == $tagName;
|
239
|
-
};
|
240
|
-
|
241
|
-
var compareNamespace = function($element, $namespace) {
|
242
|
-
return !$namespace || ($namespace == "*") || ($element.scopeName == $namespace);
|
243
|
-
};
|
244
|
-
|
245
|
-
var getTextContent = function($element) {
|
246
|
-
return $element.innerText;
|
247
|
-
};
|
248
|
-
|
249
|
-
function _msie_selectById($results, $from, id) {
|
250
|
-
var $match, i, j;
|
251
|
-
for (i = 0; i < $from.length; i++) {
|
252
|
-
if ($match = $from[i].all.item(id)) {
|
253
|
-
if ($match.id == id) $results.push($match);
|
254
|
-
else if ($match.length != null) {
|
255
|
-
for (j = 0; j < $match.length; j++) {
|
256
|
-
if ($match[j].id == id) $results.push($match[j]);
|
257
|
-
}
|
258
|
-
}
|
259
|
-
}
|
260
|
-
}
|
261
|
-
return $results;
|
262
|
-
};
|
263
|
-
|
264
|
-
// for IE5.0
|
265
|
-
if (![].push) Array.prototype.push = function() {
|
266
|
-
for (var i = 0; i < arguments.length; i++) {
|
267
|
-
this[this.length] = arguments[i];
|
268
|
-
}
|
269
|
-
return this.length;
|
270
|
-
};
|
271
|
-
|
272
|
-
// -----------------------------------------------------------------------
|
273
|
-
// query support
|
274
|
-
// -----------------------------------------------------------------------
|
275
|
-
|
276
|
-
// select a set of matching elements.
|
277
|
-
// "from" is an array of elements.
|
278
|
-
// "token" is a character representing the type of filter
|
279
|
-
// e.g. ">" means child selector
|
280
|
-
// "filter" represents the tag name, id or class name that is being selected
|
281
|
-
// the function returns an array of matching elements
|
282
|
-
var $NAMESPACE = /\|/;
|
283
|
-
function select($$from, $token, $filter, $arguments) {
|
284
|
-
if ($NAMESPACE.test($filter)) {
|
285
|
-
$filter = $filter.split($NAMESPACE);
|
286
|
-
$arguments = $filter[0];
|
287
|
-
$filter = $filter[1];
|
288
|
-
}
|
289
|
-
var $results = [];
|
290
|
-
if (selectors[$token]) {
|
291
|
-
selectors[$token]($results, $$from, $filter, $arguments);
|
292
|
-
}
|
293
|
-
return $results;
|
294
|
-
};
|
295
|
-
|
296
|
-
// -----------------------------------------------------------------------
|
297
|
-
// parsing
|
298
|
-
// -----------------------------------------------------------------------
|
299
|
-
|
300
|
-
// convert css selectors to a stream of tokens and filters
|
301
|
-
// it's not a real stream. it's just an array of strings.
|
302
|
-
var $STANDARD_SELECT = /^[^\s>+~]/;
|
303
|
-
var $$STREAM = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;
|
304
|
-
function _toStream($selector) {
|
305
|
-
if ($STANDARD_SELECT.test($selector)) $selector = " " + $selector;
|
306
|
-
return $selector.match($$STREAM) || [];
|
307
|
-
};
|
308
|
-
|
309
|
-
var $WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g;
|
310
|
-
var $IMPLIED_ALL = /([\s>+~,]|[^(]\+|^)([#.:@])/g;
|
311
|
-
var parseSelector = function($selector) {
|
312
|
-
return $selector
|
313
|
-
// trim whitespace
|
314
|
-
.replace($WHITESPACE, "$1")
|
315
|
-
// e.g. ".class1" --> "*.class1"
|
316
|
-
.replace($IMPLIED_ALL, "$1*$2");
|
317
|
-
};
|
318
|
-
|
319
|
-
var Quote = {
|
320
|
-
toString: function() {return "'"},
|
321
|
-
match: /^('[^']*')|("[^"]*")$/,
|
322
|
-
test: function($string) {
|
323
|
-
return this.match.test($string);
|
324
|
-
},
|
325
|
-
add: function($string) {
|
326
|
-
return this.test($string) ? $string : this + $string + this;
|
327
|
-
},
|
328
|
-
remove: function($string) {
|
329
|
-
return this.test($string) ? $string.slice(1, -1) : $string;
|
330
|
-
}
|
331
|
-
};
|
332
|
-
|
333
|
-
var getText = function($text) {
|
334
|
-
return Quote.remove($text);
|
335
|
-
};
|
336
|
-
|
337
|
-
var $ESCAPE = /([\/()[\]?{}|*+-])/g;
|
338
|
-
function regEscape($string) {
|
339
|
-
return $string.replace($ESCAPE, "\\$1");
|
340
|
-
};
|
341
|
-
|
342
|
-
// -----------------------------------------------------------------------
|
343
|
-
// modules
|
344
|
-
// -----------------------------------------------------------------------
|
345
|
-
|
346
|
-
// -------- >> insert modules here for packaging << -------- \\
|
347
|
-
|
348
|
-
loaded = true;
|
349
|
-
|
350
|
-
// -----------------------------------------------------------------------
|
351
|
-
// return the query function
|
352
|
-
// -----------------------------------------------------------------------
|
353
|
-
|
354
|
-
return cssQuery;
|
355
|
-
|
356
|
-
}(); // cssQuery
|