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,549 +0,0 @@
|
|
1
|
-
// Copyright 2005 Google
|
2
|
-
//
|
3
|
-
// Author: Steffen Meschkat <mesch@google.com>
|
4
|
-
//
|
5
|
-
// Miscellaneous utility and placeholder functions.
|
6
|
-
|
7
|
-
// Dummy implmentation for the logging functions. Replace by something
|
8
|
-
// useful when you want to debug.
|
9
|
-
function xpathLog(msg) {};
|
10
|
-
function xsltLog(msg) {};
|
11
|
-
function xsltLogXml(msg) {};
|
12
|
-
|
13
|
-
var ajaxsltIsIE6 = navigator.appVersion.match(/MSIE 6.0/);
|
14
|
-
|
15
|
-
// Throws an exception if false.
|
16
|
-
function assert(b) {
|
17
|
-
if (!b) {
|
18
|
-
throw "Assertion failed";
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
// Splits a string s at all occurrences of character c. This is like
|
23
|
-
// the split() method of the string object, but IE omits empty
|
24
|
-
// strings, which violates the invariant (s.split(x).join(x) == s).
|
25
|
-
function stringSplit(s, c) {
|
26
|
-
var a = s.indexOf(c);
|
27
|
-
if (a == -1) {
|
28
|
-
return [ s ];
|
29
|
-
}
|
30
|
-
var parts = [];
|
31
|
-
parts.push(s.substr(0,a));
|
32
|
-
while (a != -1) {
|
33
|
-
var a1 = s.indexOf(c, a + 1);
|
34
|
-
if (a1 != -1) {
|
35
|
-
parts.push(s.substr(a + 1, a1 - a - 1));
|
36
|
-
} else {
|
37
|
-
parts.push(s.substr(a + 1));
|
38
|
-
}
|
39
|
-
a = a1;
|
40
|
-
}
|
41
|
-
return parts;
|
42
|
-
}
|
43
|
-
|
44
|
-
// The following function does what document.importNode(node, true)
|
45
|
-
// would do for us here; however that method is broken in Safari/1.3,
|
46
|
-
// so we have to emulate it.
|
47
|
-
function xmlImportNode(doc, node) {
|
48
|
-
if (node.nodeType == DOM_TEXT_NODE) {
|
49
|
-
return domCreateTextNode(doc, node.nodeValue);
|
50
|
-
|
51
|
-
} else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
|
52
|
-
return domCreateCDATASection(doc, node.nodeValue);
|
53
|
-
|
54
|
-
} else if (node.nodeType == DOM_ELEMENT_NODE) {
|
55
|
-
var newNode = domCreateElement(doc, node.nodeName);
|
56
|
-
for (var i = 0; i < node.attributes.length; ++i) {
|
57
|
-
var an = node.attributes[i];
|
58
|
-
var name = an.nodeName;
|
59
|
-
var value = an.nodeValue;
|
60
|
-
domSetAttribute(newNode, name, value);
|
61
|
-
}
|
62
|
-
|
63
|
-
for (var c = node.firstChild; c; c = c.nextSibling) {
|
64
|
-
var cn = arguments.callee(doc, c);
|
65
|
-
domAppendChild(newNode, cn);
|
66
|
-
}
|
67
|
-
|
68
|
-
return newNode;
|
69
|
-
|
70
|
-
} else {
|
71
|
-
return domCreateComment(doc, node.nodeName);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
// A set data structure. It can also be used as a map (i.e. the keys
|
76
|
-
// can have values other than 1), but we don't call it map because it
|
77
|
-
// would be ambiguous in this context. Also, the map is iterable, so
|
78
|
-
// we can use it to replace for-in loops over core javascript Objects.
|
79
|
-
// For-in iteration breaks when Object.prototype is modified, which
|
80
|
-
// some clients of the maps API do.
|
81
|
-
//
|
82
|
-
// NOTE(mesch): The set keys by the string value of its element, NOT
|
83
|
-
// by the typed value. In particular, objects can't be used as keys.
|
84
|
-
//
|
85
|
-
// @constructor
|
86
|
-
function Set() {
|
87
|
-
this.keys = [];
|
88
|
-
}
|
89
|
-
|
90
|
-
Set.prototype.size = function() {
|
91
|
-
return this.keys.length;
|
92
|
-
}
|
93
|
-
|
94
|
-
// Adds the entry to the set, ignoring if it is present.
|
95
|
-
Set.prototype.add = function(key, opt_value) {
|
96
|
-
var value = opt_value || 1;
|
97
|
-
if (!this.contains(key)) {
|
98
|
-
this[':' + key] = value;
|
99
|
-
this.keys.push(key);
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
// Sets the entry in the set, adding if it is not yet present.
|
104
|
-
Set.prototype.set = function(key, opt_value) {
|
105
|
-
var value = opt_value || 1;
|
106
|
-
if (!this.contains(key)) {
|
107
|
-
this[':' + key] = value;
|
108
|
-
this.keys.push(key);
|
109
|
-
} else {
|
110
|
-
this[':' + key] = value;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
|
114
|
-
// Increments the key's value by 1. This works around the fact that
|
115
|
-
// numbers are always passed by value, never by reference, so that we
|
116
|
-
// can't increment the value returned by get(), or the iterator
|
117
|
-
// argument. Sets the key's value to 1 if it doesn't exist yet.
|
118
|
-
Set.prototype.inc = function(key) {
|
119
|
-
if (!this.contains(key)) {
|
120
|
-
this[':' + key] = 1;
|
121
|
-
this.keys.push(key);
|
122
|
-
} else {
|
123
|
-
this[':' + key]++;
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
Set.prototype.get = function(key) {
|
128
|
-
if (this.contains(key)) {
|
129
|
-
return this[':' + key];
|
130
|
-
} else {
|
131
|
-
var undefined;
|
132
|
-
return undefined;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
|
136
|
-
// Removes the entry from the set.
|
137
|
-
Set.prototype.remove = function(key) {
|
138
|
-
if (this.contains(key)) {
|
139
|
-
delete this[':' + key];
|
140
|
-
removeFromArray(this.keys, key, true);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
|
144
|
-
// Tests if an entry is in the set.
|
145
|
-
Set.prototype.contains = function(entry) {
|
146
|
-
return typeof this[':' + entry] != 'undefined';
|
147
|
-
}
|
148
|
-
|
149
|
-
// Gets a list of values in the set.
|
150
|
-
Set.prototype.items = function() {
|
151
|
-
var list = [];
|
152
|
-
for (var i = 0; i < this.keys.length; ++i) {
|
153
|
-
var k = this.keys[i];
|
154
|
-
var v = this[':' + k];
|
155
|
-
list.push(v);
|
156
|
-
}
|
157
|
-
return list;
|
158
|
-
}
|
159
|
-
|
160
|
-
|
161
|
-
// Invokes function f for every key value pair in the set as a method
|
162
|
-
// of the set.
|
163
|
-
Set.prototype.map = function(f) {
|
164
|
-
for (var i = 0; i < this.keys.length; ++i) {
|
165
|
-
var k = this.keys[i];
|
166
|
-
f.call(this, k, this[':' + k]);
|
167
|
-
}
|
168
|
-
}
|
169
|
-
|
170
|
-
Set.prototype.clear = function() {
|
171
|
-
for (var i = 0; i < this.keys.length; ++i) {
|
172
|
-
delete this[':' + this.keys[i]];
|
173
|
-
}
|
174
|
-
this.keys.length = 0;
|
175
|
-
}
|
176
|
-
|
177
|
-
|
178
|
-
// Applies the given function to each element of the array, preserving
|
179
|
-
// this, and passing the index.
|
180
|
-
function mapExec(array, func) {
|
181
|
-
for (var i = 0; i < array.length; ++i) {
|
182
|
-
func.call(this, array[i], i);
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
// Returns an array that contains the return value of the given
|
187
|
-
// function applied to every element of the input array.
|
188
|
-
function mapExpr(array, func) {
|
189
|
-
var ret = [];
|
190
|
-
for (var i = 0; i < array.length; ++i) {
|
191
|
-
ret.push(func(array[i]));
|
192
|
-
}
|
193
|
-
return ret;
|
194
|
-
};
|
195
|
-
|
196
|
-
// Reverses the given array in place.
|
197
|
-
function reverseInplace(array) {
|
198
|
-
for (var i = 0; i < array.length / 2; ++i) {
|
199
|
-
var h = array[i];
|
200
|
-
var ii = array.length - i - 1;
|
201
|
-
array[i] = array[ii];
|
202
|
-
array[ii] = h;
|
203
|
-
}
|
204
|
-
}
|
205
|
-
|
206
|
-
// Removes value from array. Returns the number of instances of value
|
207
|
-
// that were removed from array.
|
208
|
-
function removeFromArray(array, value, opt_notype) {
|
209
|
-
var shift = 0;
|
210
|
-
for (var i = 0; i < array.length; ++i) {
|
211
|
-
if (array[i] === value || (opt_notype && array[i] == value)) {
|
212
|
-
array.splice(i--, 1);
|
213
|
-
shift++;
|
214
|
-
}
|
215
|
-
}
|
216
|
-
return shift;
|
217
|
-
}
|
218
|
-
|
219
|
-
// Shallow-copies an array to the end of another array
|
220
|
-
// Basically Array.concat, but works with other non-array collections
|
221
|
-
function copyArray(dst, src) {
|
222
|
-
if (!src) return;
|
223
|
-
var dstLength = dst.length;
|
224
|
-
for (var i = src.length - 1; i >= 0; --i) {
|
225
|
-
dst[i+dstLength] = src[i];
|
226
|
-
}
|
227
|
-
}
|
228
|
-
|
229
|
-
/**
|
230
|
-
* This is an optimization for copying attribute lists in IE. IE includes many
|
231
|
-
* extraneous properties in its DOM attribute lists, which take require
|
232
|
-
* significant extra processing when evaluating attribute steps. With this
|
233
|
-
* function, we ignore any such attributes that has an empty string value.
|
234
|
-
*/
|
235
|
-
function copyArrayIgnoringAttributesWithoutValue(dst, src)
|
236
|
-
{
|
237
|
-
if (!src) return;
|
238
|
-
for (var i = src.length - 1; i >= 0; --i) {
|
239
|
-
// this test will pass so long as the attribute has a non-empty string
|
240
|
-
// value, even if that value is "false", "0", "undefined", etc.
|
241
|
-
if (src[i].nodeValue) {
|
242
|
-
dst.push(src[i]);
|
243
|
-
}
|
244
|
-
}
|
245
|
-
}
|
246
|
-
|
247
|
-
// Returns the text value of a node; for nodes without children this
|
248
|
-
// is the nodeValue, for nodes with children this is the concatenation
|
249
|
-
// of the value of all children. Browser-specific optimizations are used by
|
250
|
-
// default; they can be disabled by passing "true" in as the second parameter.
|
251
|
-
function xmlValue(node, disallowBrowserSpecificOptimization) {
|
252
|
-
if (!node) {
|
253
|
-
return '';
|
254
|
-
}
|
255
|
-
|
256
|
-
var ret = '';
|
257
|
-
if (node.nodeType == DOM_TEXT_NODE ||
|
258
|
-
node.nodeType == DOM_CDATA_SECTION_NODE) {
|
259
|
-
ret += node.nodeValue;
|
260
|
-
|
261
|
-
} else if (node.nodeType == DOM_ATTRIBUTE_NODE) {
|
262
|
-
if (ajaxsltIsIE6) {
|
263
|
-
ret += xmlValueIE6Hack(node);
|
264
|
-
} else {
|
265
|
-
ret += node.nodeValue;
|
266
|
-
}
|
267
|
-
} else if (node.nodeType == DOM_ELEMENT_NODE ||
|
268
|
-
node.nodeType == DOM_DOCUMENT_NODE ||
|
269
|
-
node.nodeType == DOM_DOCUMENT_FRAGMENT_NODE) {
|
270
|
-
if (!disallowBrowserSpecificOptimization) {
|
271
|
-
// IE, Safari, Opera, and friends
|
272
|
-
var innerText = node.innerText;
|
273
|
-
if (innerText != undefined) {
|
274
|
-
return innerText;
|
275
|
-
}
|
276
|
-
// Firefox
|
277
|
-
var textContent = node.textContent;
|
278
|
-
if (textContent != undefined) {
|
279
|
-
return textContent;
|
280
|
-
}
|
281
|
-
}
|
282
|
-
// pobrecito!
|
283
|
-
var len = node.childNodes.length;
|
284
|
-
for (var i = 0; i < len; ++i) {
|
285
|
-
ret += arguments.callee(node.childNodes[i]);
|
286
|
-
}
|
287
|
-
}
|
288
|
-
return ret;
|
289
|
-
}
|
290
|
-
|
291
|
-
function xmlValueIE6Hack(node) {
|
292
|
-
// Issue 19, IE6 mangles href attribute when it's a javascript: url
|
293
|
-
var nodeName = node.nodeName;
|
294
|
-
var nodeValue = node.nodeValue;
|
295
|
-
if (nodeName.length != 4) return nodeValue;
|
296
|
-
if (!/^href$/i.test(nodeName)) return nodeValue;
|
297
|
-
if (!/^javascript:/.test(nodeValue)) return nodeValue;
|
298
|
-
return unescape(nodeValue);
|
299
|
-
}
|
300
|
-
|
301
|
-
// Returns the representation of a node as XML text.
|
302
|
-
function xmlText(node, opt_cdata) {
|
303
|
-
var buf = [];
|
304
|
-
xmlTextR(node, buf, opt_cdata);
|
305
|
-
return buf.join('');
|
306
|
-
}
|
307
|
-
|
308
|
-
function xmlTextR(node, buf, cdata) {
|
309
|
-
if (node.nodeType == DOM_TEXT_NODE) {
|
310
|
-
buf.push(xmlEscapeText(node.nodeValue));
|
311
|
-
|
312
|
-
} else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
|
313
|
-
if (cdata) {
|
314
|
-
buf.push(node.nodeValue);
|
315
|
-
} else {
|
316
|
-
buf.push('<![CDATA[' + node.nodeValue + ']]>');
|
317
|
-
}
|
318
|
-
|
319
|
-
} else if (node.nodeType == DOM_COMMENT_NODE) {
|
320
|
-
buf.push('<!--' + node.nodeValue + '-->');
|
321
|
-
|
322
|
-
} else if (node.nodeType == DOM_ELEMENT_NODE) {
|
323
|
-
buf.push('<' + xmlFullNodeName(node));
|
324
|
-
for (var i = 0; i < node.attributes.length; ++i) {
|
325
|
-
var a = node.attributes[i];
|
326
|
-
if (a && a.nodeName && a.nodeValue) {
|
327
|
-
buf.push(' ' + xmlFullNodeName(a) + '="' +
|
328
|
-
xmlEscapeAttr(a.nodeValue) + '"');
|
329
|
-
}
|
330
|
-
}
|
331
|
-
|
332
|
-
if (node.childNodes.length == 0) {
|
333
|
-
buf.push('/>');
|
334
|
-
} else {
|
335
|
-
buf.push('>');
|
336
|
-
for (var i = 0; i < node.childNodes.length; ++i) {
|
337
|
-
arguments.callee(node.childNodes[i], buf, cdata);
|
338
|
-
}
|
339
|
-
buf.push('</' + xmlFullNodeName(node) + '>');
|
340
|
-
}
|
341
|
-
|
342
|
-
} else if (node.nodeType == DOM_DOCUMENT_NODE ||
|
343
|
-
node.nodeType == DOM_DOCUMENT_FRAGMENT_NODE) {
|
344
|
-
for (var i = 0; i < node.childNodes.length; ++i) {
|
345
|
-
arguments.callee(node.childNodes[i], buf, cdata);
|
346
|
-
}
|
347
|
-
}
|
348
|
-
}
|
349
|
-
|
350
|
-
function xmlFullNodeName(n) {
|
351
|
-
if (n.prefix && n.nodeName.indexOf(n.prefix + ':') != 0) {
|
352
|
-
return n.prefix + ':' + n.nodeName;
|
353
|
-
} else {
|
354
|
-
return n.nodeName;
|
355
|
-
}
|
356
|
-
}
|
357
|
-
|
358
|
-
// Escape XML special markup chracters: tag delimiter < > and entity
|
359
|
-
// reference start delimiter &. The escaped string can be used in XML
|
360
|
-
// text portions (i.e. between tags).
|
361
|
-
function xmlEscapeText(s) {
|
362
|
-
return ('' + s).replace(/&/g, '&').replace(/</g, '<').
|
363
|
-
replace(/>/g, '>');
|
364
|
-
}
|
365
|
-
|
366
|
-
// Escape XML special markup characters: tag delimiter < > entity
|
367
|
-
// reference start delimiter & and quotes ". The escaped string can be
|
368
|
-
// used in double quoted XML attribute value portions (i.e. in
|
369
|
-
// attributes within start tags).
|
370
|
-
function xmlEscapeAttr(s) {
|
371
|
-
return xmlEscapeText(s).replace(/\"/g, '"');
|
372
|
-
}
|
373
|
-
|
374
|
-
// Escape markup in XML text, but don't touch entity references. The
|
375
|
-
// escaped string can be used as XML text (i.e. between tags).
|
376
|
-
function xmlEscapeTags(s) {
|
377
|
-
return s.replace(/</g, '<').replace(/>/g, '>');
|
378
|
-
}
|
379
|
-
|
380
|
-
/**
|
381
|
-
* Wrapper function to access the owner document uniformly for document
|
382
|
-
* and other nodes: for the document node, the owner document is the
|
383
|
-
* node itself, for all others it's the ownerDocument property.
|
384
|
-
*
|
385
|
-
* @param {Node} node
|
386
|
-
* @return {Document}
|
387
|
-
*/
|
388
|
-
function xmlOwnerDocument(node) {
|
389
|
-
if (node.nodeType == DOM_DOCUMENT_NODE) {
|
390
|
-
return node;
|
391
|
-
} else {
|
392
|
-
return node.ownerDocument;
|
393
|
-
}
|
394
|
-
}
|
395
|
-
|
396
|
-
// Wrapper around DOM methods so we can condense their invocations.
|
397
|
-
function domGetAttribute(node, name) {
|
398
|
-
return node.getAttribute(name);
|
399
|
-
}
|
400
|
-
|
401
|
-
function domSetAttribute(node, name, value) {
|
402
|
-
return node.setAttribute(name, value);
|
403
|
-
}
|
404
|
-
|
405
|
-
function domRemoveAttribute(node, name) {
|
406
|
-
return node.removeAttribute(name);
|
407
|
-
}
|
408
|
-
|
409
|
-
function domAppendChild(node, child) {
|
410
|
-
return node.appendChild(child);
|
411
|
-
}
|
412
|
-
|
413
|
-
function domRemoveChild(node, child) {
|
414
|
-
return node.removeChild(child);
|
415
|
-
}
|
416
|
-
|
417
|
-
function domReplaceChild(node, newChild, oldChild) {
|
418
|
-
return node.replaceChild(newChild, oldChild);
|
419
|
-
}
|
420
|
-
|
421
|
-
function domInsertBefore(node, newChild, oldChild) {
|
422
|
-
return node.insertBefore(newChild, oldChild);
|
423
|
-
}
|
424
|
-
|
425
|
-
function domRemoveNode(node) {
|
426
|
-
return domRemoveChild(node.parentNode, node);
|
427
|
-
}
|
428
|
-
|
429
|
-
function domCreateTextNode(doc, text) {
|
430
|
-
return doc.createTextNode(text);
|
431
|
-
}
|
432
|
-
|
433
|
-
function domCreateElement(doc, name) {
|
434
|
-
return doc.createElement(name);
|
435
|
-
}
|
436
|
-
|
437
|
-
function domCreateAttribute(doc, name) {
|
438
|
-
return doc.createAttribute(name);
|
439
|
-
}
|
440
|
-
|
441
|
-
function domCreateCDATASection(doc, data) {
|
442
|
-
return doc.createCDATASection(data);
|
443
|
-
}
|
444
|
-
|
445
|
-
function domCreateComment(doc, text) {
|
446
|
-
return doc.createComment(text);
|
447
|
-
}
|
448
|
-
|
449
|
-
function domCreateDocumentFragment(doc) {
|
450
|
-
return doc.createDocumentFragment();
|
451
|
-
}
|
452
|
-
|
453
|
-
function domGetElementById(doc, id) {
|
454
|
-
return doc.getElementById(id);
|
455
|
-
}
|
456
|
-
|
457
|
-
// Same for window methods.
|
458
|
-
function windowSetInterval(win, fun, time) {
|
459
|
-
return win.setInterval(fun, time);
|
460
|
-
}
|
461
|
-
|
462
|
-
function windowClearInterval(win, id) {
|
463
|
-
return win.clearInterval(id);
|
464
|
-
}
|
465
|
-
|
466
|
-
/**
|
467
|
-
* Escape the special regular expression characters when the regular expression
|
468
|
-
* is specified as a string.
|
469
|
-
*
|
470
|
-
* Based on: http://simonwillison.net/2006/Jan/20/escape/
|
471
|
-
*/
|
472
|
-
RegExp.escape = (function() {
|
473
|
-
var specials = [
|
474
|
-
'/', '.', '*', '+', '?', '|', '^', '$',
|
475
|
-
'(', ')', '[', ']', '{', '}', '\\'
|
476
|
-
];
|
477
|
-
|
478
|
-
var sRE = new RegExp(
|
479
|
-
'(\\' + specials.join('|\\') + ')', 'g'
|
480
|
-
);
|
481
|
-
|
482
|
-
return function(text) {
|
483
|
-
return text.replace(sRE, '\\$1');
|
484
|
-
}
|
485
|
-
})();
|
486
|
-
|
487
|
-
/**
|
488
|
-
* Determines whether a predicate expression contains a "positional selector".
|
489
|
-
* A positional selector filters nodes from the nodelist input based on their
|
490
|
-
* position within that list. When such selectors are encountered, the
|
491
|
-
* evaluation of the predicate cannot be depth-first, because the positional
|
492
|
-
* selector may be based on the result of evaluating predicates that precede
|
493
|
-
* it.
|
494
|
-
*/
|
495
|
-
function predicateExprHasPositionalSelector(expr, isRecursiveCall) {
|
496
|
-
if (!expr) {
|
497
|
-
return false;
|
498
|
-
}
|
499
|
-
if (!isRecursiveCall && exprReturnsNumberValue(expr)) {
|
500
|
-
// this is a "proximity position"-based predicate
|
501
|
-
return true;
|
502
|
-
}
|
503
|
-
if (expr instanceof FunctionCallExpr) {
|
504
|
-
var value = expr.name.value;
|
505
|
-
return (value == 'last' || value == 'position');
|
506
|
-
}
|
507
|
-
if (expr instanceof BinaryExpr) {
|
508
|
-
return (
|
509
|
-
predicateExprHasPositionalSelector(expr.expr1, true) ||
|
510
|
-
predicateExprHasPositionalSelector(expr.expr2, true));
|
511
|
-
}
|
512
|
-
return false;
|
513
|
-
}
|
514
|
-
|
515
|
-
function exprReturnsNumberValue(expr) {
|
516
|
-
if (expr instanceof FunctionCallExpr) {
|
517
|
-
var isMember = {
|
518
|
-
last: true
|
519
|
-
, position: true
|
520
|
-
, count: true
|
521
|
-
, 'string-length': true
|
522
|
-
, number: true
|
523
|
-
, sum: true
|
524
|
-
, floor: true
|
525
|
-
, ceiling: true
|
526
|
-
, round: true
|
527
|
-
};
|
528
|
-
return isMember[expr.name.value];
|
529
|
-
}
|
530
|
-
else if (expr instanceof UnaryMinusExpr) {
|
531
|
-
return true;
|
532
|
-
}
|
533
|
-
else if (expr instanceof BinaryExpr) {
|
534
|
-
var isMember = {
|
535
|
-
'+': true
|
536
|
-
, '-': true
|
537
|
-
, '*': true
|
538
|
-
, mod: true
|
539
|
-
, div: true
|
540
|
-
};
|
541
|
-
return isMember[expr.op.value];
|
542
|
-
}
|
543
|
-
else if (expr instanceof NumberExpr) {
|
544
|
-
return true;
|
545
|
-
}
|
546
|
-
return false;
|
547
|
-
}
|
548
|
-
|
549
|
-
|