zena 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +23 -1
- data/MIT-LICENSE +2 -2
- data/README.rdoc +2 -15
- data/app/controllers/acls_controller.rb +1 -1
- data/app/controllers/documents_controller.rb +12 -3
- data/app/controllers/nodes_controller.rb +1 -3
- data/app/controllers/sites_controller.rb +7 -0
- data/app/controllers/versions_controller.rb +1 -1
- data/app/controllers/virtual_classes_controller.rb +7 -8
- data/app/models/acl.rb +3 -2
- data/app/models/relation_proxy.rb +2 -1
- data/app/models/role.rb +16 -0
- data/app/models/site.rb +48 -0
- data/app/models/text_document.rb +2 -1
- data/app/models/user.rb +2 -1
- data/app/models/zip.rb +2 -1
- data/app/views/acls/index.rhtml +11 -1
- data/app/views/documents/show.rhtml +1 -1
- data/app/views/relations/_add.erb +2 -2
- data/app/views/relations/_form.erb +5 -2
- data/app/views/relations/_li.erb +4 -1
- data/app/views/relations/index.erb +3 -3
- data/app/views/sites/_form.erb +1 -1
- data/app/views/sites/_job.erb +4 -0
- data/app/views/sites/index.erb +1 -1
- data/app/views/sites/jobs.erb +10 -0
- data/app/views/templates/document_create_tabs/_file.rhtml +3 -0
- data/app/views/zafu/default/Node-+search.zafu +2 -2
- data/bricks/acls/zena/init.rb +2 -1
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +5 -5
- data/bricks/acls/zena/test/sites/erebus/acls.yml +2 -2
- data/bricks/acls/zena/test/unit/acl_test.rb +2 -2
- data/bricks/grid/lib/bricks/grid.rb +110 -0
- data/bricks/grid/zena/init.rb +4 -0
- data/bricks/math/lib/bricks/math.rb +1 -0
- data/bricks/pdf/lib/bricks/pdf.rb +10 -1
- data/bricks/sphinx/zena/tasks.rb +8 -40
- data/bricks/spreadsheet/README +31 -0
- data/bricks/spreadsheet/lib/bricks/spreadsheet.rb +293 -0
- data/bricks/spreadsheet/zena/init.rb +3 -0
- data/bricks/spreadsheet/zena/test/sites/zena/links.yml +11 -0
- data/bricks/spreadsheet/zena/test/unit/xlsx_test.rb +5 -0
- data/bricks/spreadsheet/zena/test/zafu/README +27 -0
- data/bricks/spreadsheet/zena/test/zafu/spreadsheet.yml +19 -0
- data/bricks/worker/lib/bricks/worker.rb +11 -5
- data/bricks/worker/zena/init.rb +8 -0
- data/bricks/worker/zena/migrate/20120501091514_add_site_id_to_jobs.rb +9 -0
- data/bricks/zena/zena/migrate/01_base.rb +0 -7
- data/bricks/zena/zena/migrate/20111214112233_add_comment_to_relations.rb +9 -0
- data/config/bricks.yml +15 -1
- data/config/environments/production.rb +2 -2
- data/config/gems.yml +6 -1
- data/doc/zafu_changes.yml +1 -1
- data/lib/tasks/zena.rake +6 -2
- data/lib/zena/app.rb +1 -1
- data/lib/zena/code/default_syntax.rb +5 -1
- data/lib/zena/db_helper/mysql.rb +5 -1
- data/lib/zena/deploy/app_init.rhtml +11 -7
- data/lib/zena/deploy/awstats.conf.rhtml +1 -1
- data/lib/zena/deploy/start_stop.rhtml +5 -5
- data/lib/zena/deploy/vhost.rhtml +16 -2
- data/lib/zena/deploy.rb +5 -3
- data/lib/zena/info.rb +1 -1
- data/lib/zena/parser/zazen_rules.rb +7 -7
- data/lib/zena/remote/node.rb +7 -0
- data/lib/zena/routes.rb +4 -5
- data/lib/zena/test_controller.rb +18 -1
- data/lib/zena/use/action.rb +13 -4
- data/lib/zena/use/ajax.rb +10 -4
- data/lib/zena/use/authlogic.rb +1 -1
- data/lib/zena/use/calendar.rb +4 -0
- data/lib/zena/use/conditional.rb +3 -0
- data/lib/zena/use/dates.rb +44 -4
- data/lib/zena/use/display.rb +45 -15
- data/lib/zena/use/forms.rb +59 -30
- data/lib/zena/use/query_builder.rb +12 -12
- data/lib/zena/use/recursion.rb +1 -1
- data/lib/zena/use/rendering.rb +18 -17
- data/lib/zena/use/urls.rb +2 -1
- data/lib/zena/use/zafu_safe_definitions.rb +0 -9
- data/lib/zena/use/zafu_templates.rb +2 -2
- data/lib/zena/use/zazen.rb +1 -3
- data/lib/zena/use.rb +13 -2
- data/lib/zena.rb +8 -2
- data/public/images/bullet_back.png +0 -0
- data/public/javascripts/grid.js +535 -0
- data/public/javascripts/tablekit.js +0 -0
- data/public/javascripts/window.js +0 -0
- data/public/javascripts/zena.js +17 -7
- data/public/stylesheets/admin.css +5 -1
- data/public/stylesheets/grid.css +19 -0
- data/test/fixtures/files/TestNode.zafu +123 -311
- data/test/fixtures/files/translations_fr.yml +6 -1
- data/test/functional/acls_controller_test.rb +2 -2
- data/test/functional/nodes_controller_test.rb +17 -11
- data/test/functional/virtual_classes_controller_test.rb +1 -1
- data/test/integration/query_node/basic.yml +9 -0
- data/test/integration/query_node/dates.yml +1 -1
- data/test/integration/zafu_compiler/ajax.yml +9 -9
- data/test/integration/zafu_compiler/basic.yml +0 -24
- data/test/integration/zafu_compiler/dates.yml +24 -7
- data/test/integration/zafu_compiler/display.yml +45 -2
- data/test/integration/zafu_compiler/errors.yml +0 -6
- data/test/integration/zafu_compiler/forms.yml +41 -3
- data/test/integration/zafu_compiler/query.yml +29 -3
- data/test/integration/zafu_compiler/roles.yml +0 -4
- data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
- data/test/integration/zafu_compiler_test.rb +11 -3
- data/test/selenium/Add/add3.rsel +8 -8
- data/test/selenium/Drop/drop1.rsel +12 -12
- data/test/selenium/Drop/drop2.rsel +14 -14
- data/test/selenium/Drop/drop3.rsel +21 -21
- data/test/selenium/Drop/drop4.rsel +1 -1
- data/test/selenium/Edit/edit2.rsel +9 -9
- data/test/selenium/Edit/edit4.rsel +55 -0
- data/test/selenium/Edit/edit5.rsel +41 -0
- data/test/selenium/Edit/edit6.rsel +53 -0
- data/test/selenium/Filter/0setup.rsel +12 -0
- data/test/selenium/Filter/filter1.rsel +9 -0
- data/test/selenium/Filter/filter2.rsel +9 -0
- data/test/selenium/Form/form1.rsel +1 -1
- data/test/selenium/Form/form2.rsel +1 -1
- data/test/selenium/Form/form3.rsel +15 -0
- data/test/selenium/Grid/0setup.rsel +13 -0
- data/test/selenium/Grid/grid1.rsel +11 -0
- data/test/selenium/Swap/0setup.rsel +12 -0
- data/test/selenium/Swap/swap1.rsel +13 -0
- data/test/selenium/Swap/swap2.rsel +11 -0
- data/test/selenium/Toggle/toggle1.rsel +6 -6
- data/test/sites/zena/versions.yml +1 -1
- data/test/unit/relation_proxy_test.rb +36 -0
- data/test/unit/site_test.rb +10 -2
- data/test/unit/zena/use/rendering_test.rb +7 -6
- data/test/unit/zena/use/zazen_test.rb +1 -2
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +24 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +58 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +88 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +27 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +23 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +19 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +19 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +22 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +23 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +25 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +20 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +20 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +104 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +13 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +25 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +166 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +304 -0
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +37 -0
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +52 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +118 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
- data/vendor/TextMate/Zena.tmbundle/info.plist +17 -0
- data/vendor/plugins/selenium-on-rails/CHANGELOG +125 -0
- data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +202 -0
- data/vendor/plugins/selenium-on-rails/README.md +202 -0
- data/vendor/plugins/selenium-on-rails/Rakefile +38 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +265 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +148 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +231 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +195 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +295 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +219 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +156 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +179 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +223 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +441 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +3098 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +2080 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +116 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +116 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +126 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +150 -0
- data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +422 -0
- data/vendor/plugins/selenium-on-rails/doc/files/README.html +321 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +108 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +222 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +109 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +111 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +118 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +114 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +113 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +120 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +108 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +115 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +42 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +43 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +182 -0
- data/vendor/plugins/selenium-on-rails/doc/index.html +24 -0
- data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +208 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +19 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +50 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +16 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +14 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +11 -0
- data/vendor/plugins/selenium-on-rails/init.rb +15 -0
- data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +122 -0
- data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +16 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +8 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +215 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +57 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +36 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +61 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +20 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +44 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +87 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +56 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +116 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +1002 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +514 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +91 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +24 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +11 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +30 -0
- data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +18 -0
- data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +5 -0
- data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +9 -0
- data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +67 -0
- data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +26 -0
- data/vendor/plugins/selenium-on-rails/routes.rb +24 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +7 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +8 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +110 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +109 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +145 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +55 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +177 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +177 -0
- 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 +298 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +16 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +205 -0
- 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 +1759 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +1800 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +6 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +142 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +150 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +53 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +356 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +2006 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +101 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +815 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +915 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +958 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +47 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +283 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +383 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +91 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +69 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +1616 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +72 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +3184 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +2300 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +153 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +377 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +175 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +148 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +695 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +1362 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +5 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +803 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +1537 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +979 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +3 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +75 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +153 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +43 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +316 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +566 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +2816 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +549 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +149 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +2450 -0
- data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +8 -0
- data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +37 -0
- data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +27 -0
- data/vendor/plugins/selenium-on-rails/test/paths_test.rb +72 -0
- data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +157 -0
- data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +708 -0
- data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +242 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +67 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +43 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +35 -0
- data/vendor/plugins/selenium-on-rails/test/setup_test.rb +31 -0
- data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +109 -0
- data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +17 -0
- data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +51 -0
- data/vendor/plugins/selenium-on-rails/test/test_helper.rb +101 -0
- data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +12 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +6 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +2 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +6 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +5 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +5 -0
- data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +7 -0
- data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +8 -0
- data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +7 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +1 -0
- data/zena.gemspec +290 -7
- metadata +346 -52
- data/app/views/nodes/_table.rhtml +0 -14
- data/lib/zena/use/grid.rb +0 -154
@@ -3,7 +3,7 @@
|
|
3
3
|
<title do='title_for_layout' do='show' attr='title' name='page_title'>page title</title>
|
4
4
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
5
5
|
<r:void name='stylesheets'>
|
6
|
-
<r:stylesheets media='all' list='reset,zena,code,calendar'/>
|
6
|
+
<r:stylesheets media='all' list='reset,zena,code,calendar,grid'/>
|
7
7
|
</r:void>
|
8
8
|
<link href="style.css" rel="Stylesheet" type="text/css"/>
|
9
9
|
<style>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
.test .drop {background:#ccc;}
|
22
22
|
.test .drop_hover { background:#ace; border:2px dashed #99f;}
|
23
23
|
</style>
|
24
|
-
<r:javascripts list='prototype,effects,zena,dragdrop'/>
|
24
|
+
<r:javascripts list='prototype,effects,zena,dragdrop,grid'/>
|
25
25
|
<r:uses_datebox/>
|
26
26
|
</r:with>
|
27
27
|
|
@@ -94,6 +94,63 @@
|
|
94
94
|
</table>
|
95
95
|
</div>
|
96
96
|
|
97
|
+
//! edit4
|
98
|
+
<div class='test' id='edit4' do='selenium' do='root'>
|
99
|
+
<h3>edit4</h3>
|
100
|
+
<p>Edit element from list in place (makes form from each block).</p>
|
101
|
+
<ul do='pages'>
|
102
|
+
<li class='#{title}' do='each'><span class='title' do='title'/> <r:edit/></li>
|
103
|
+
</ul>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
//! edit5
|
107
|
+
<div class='test' id='edit5' do='selenium' do='root'>
|
108
|
+
<h3>edit5</h3>
|
109
|
+
<p>Edit element from list in place (use a custom form).</p>
|
110
|
+
<ul do='pages'>
|
111
|
+
<li do='each'><span class='title' do='title'/> <r:edit/></li>
|
112
|
+
<li do='form'><r:input name='title'/> <r:select name='origin' nodes='contacts in site' attr='name'/></li>
|
113
|
+
</ul>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
//! edit6
|
117
|
+
<div class='test' id='edit6' do='selenium' do='root'>
|
118
|
+
<h3>edit6</h3>
|
119
|
+
<p>Edit link after [block].</p>
|
120
|
+
<ul do='pages'>
|
121
|
+
<li do='each'><span class='title' do='title'/> <div do='block'>O:<span id='swap_span' do='if' test='origin' do='origin'/> <r:swap attr='origin' states=',bob' do='t'>swap</r:swap></div> <r:edit/></li>
|
122
|
+
<li do='form'><r:input name='title'/></li>
|
123
|
+
</ul>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
//! swap1
|
127
|
+
<div class='test' id='swap1' do='selenium' do='root'>
|
128
|
+
<h3>swap1</h3>
|
129
|
+
<p>Swap value in [block].</p>
|
130
|
+
<div id='swap1_s' class='#{origin}' do='block'>
|
131
|
+
<span id='swap1_span' do='if' test='origin' do='origin'/>
|
132
|
+
<r:swap attr='origin' states=',bob' do='t'>swap</r:swap>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
//! swap2
|
137
|
+
<div class='test' id='swap2' do='selenium' do='root'>
|
138
|
+
<h3>swap2</h3>
|
139
|
+
<p>Swap value in [block] with [drop] in same block.</p>
|
140
|
+
<ul do='pages in site limit 3'>
|
141
|
+
<li do='each' draggable='true' do='title'/>
|
142
|
+
</ul>
|
143
|
+
|
144
|
+
<div id='swap2_s' class='#{origin}' do='block'>
|
145
|
+
<span id='swap2_span' do='if' test='origin' do='origin'/>
|
146
|
+
<r:swap attr='origin' states=',bob' do='t'>swap</r:swap>
|
147
|
+
<ul do='drop' set='reference' change='receiver' do='references'>
|
148
|
+
<li class='#{id}' do='each'><r:unlink/> <r:title/></li>
|
149
|
+
</ul>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
//! toggle1
|
97
154
|
<div class='test' id='toggle1' do='selenium'>
|
98
155
|
<h3>toggle1</h3>
|
99
156
|
<p>Toggle relation in list.</p>
|
@@ -125,6 +182,32 @@
|
|
125
182
|
</table>
|
126
183
|
</div>
|
127
184
|
|
185
|
+
<div class='test' id='filter1' do='selenium'>
|
186
|
+
<h3>filter1</h3>
|
187
|
+
<p>Ajax live filter.</p>
|
188
|
+
<div id='filter1_form' do='filter' live='true'>
|
189
|
+
<input name='f' id='filter1_in' value=''/>
|
190
|
+
</div>
|
191
|
+
<ul id='filter1_list' do='block' do='nodes where title like "%#{params[:f]}%" in site limit 2'>
|
192
|
+
<li id='fil1_#{id}' do='each' do='title'/>
|
193
|
+
</ul>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div class='test' id='filter2' do='selenium'>
|
197
|
+
<h3>filter2</h3>
|
198
|
+
<p>Ajax live filter (remote target).</p>
|
199
|
+
<div do='parent'>
|
200
|
+
<b do='title'/> //! Filter is not in same parent as filtered list. Explicit target.
|
201
|
+
<div id='filter2_form' do='filter' live='true' update='filter2_list'>
|
202
|
+
<input name='f' id='filter2_in' value=''/>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
<ul id='filter2_list' do='block' do='nodes where title like "%#{params[:f]}%" in site limit 2'>
|
206
|
+
<li id='fil2_#{id}' do='each' do='title'/>
|
207
|
+
</ul>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
//! form1
|
128
211
|
<div class='test' id='form1' do='selenium'>
|
129
212
|
<h3>form1</h3>
|
130
213
|
<p>Form in [new] to create objects.</p>
|
@@ -135,6 +218,7 @@
|
|
135
218
|
</r:new>
|
136
219
|
</div>
|
137
220
|
|
221
|
+
//! form2
|
138
222
|
<div class='test' id='form2' do='selenium'>
|
139
223
|
<h3>form2</h3>
|
140
224
|
<p>Form to update object.</p>
|
@@ -143,6 +227,19 @@
|
|
143
227
|
</r:form>
|
144
228
|
</div>
|
145
229
|
|
230
|
+
//! form3
|
231
|
+
<div class='test' id='form3' do='selenium'>
|
232
|
+
<h3>form3</h3>
|
233
|
+
<p>Form to update object with checkbox.</p>
|
234
|
+
<r:form node[v_status]='50'>
|
235
|
+
<ul>
|
236
|
+
<li><r:input label='t' name='title'/></li>
|
237
|
+
<li style='margin-top:1em; border-top:1px solid black;'><r:checkbox role='set_tag' nodes='tags in site'/></li>
|
238
|
+
<li><r:input type='submit'/></li>
|
239
|
+
</ul>
|
240
|
+
</r:form>
|
241
|
+
</div>
|
242
|
+
|
146
243
|
<div class='test' id='drop1' do='selenium'>
|
147
244
|
<h3>drop1</h3>
|
148
245
|
<p>Create a relation by drag and dropping.</p>
|
@@ -215,317 +312,32 @@
|
|
215
312
|
</ul>
|
216
313
|
</r:projects>
|
217
314
|
</div>
|
218
|
-
|
219
|
-
|
220
|
-
<
|
221
|
-
<
|
222
|
-
<
|
223
|
-
|
224
|
-
</
|
225
|
-
|
226
|
-
<
|
227
|
-
|
228
|
-
|
229
|
-
<h3>publish = true</h3>
|
230
|
-
<r:zazen attr='origin' edit='true' publish='true'/>
|
231
|
-
|
232
|
-
<h3>publish = force</h3>
|
233
|
-
<r:zazen attr='origin' edit='true' publish='force'/>
|
234
|
-
|
235
|
-
<h3>pagination test</h3>
|
236
|
-
(no ajax)
|
237
|
-
<r:nodes in='site' order='zip' limit='8' paginate='p'>
|
238
|
-
<p><b do='page_count'/> nodes</p>
|
239
|
-
<p>
|
240
|
-
<r:link mode='test' page='previous' do='t'>previous</r:link>
|
241
|
-
<r:p/>/<r:page_count/>
|
242
|
-
|| <r:link page='list' mode='test'/> ||
|
243
|
-
<r:link mode='test' page='next' do='t'>next</r:link>
|
244
|
-
</p>
|
245
|
-
<ul>
|
246
|
-
<li do='each'><r:show attr='zip'/> <r:link/></li>
|
247
|
-
</ul>
|
248
|
-
</r:nodes>
|
249
|
-
|
250
|
-
(ajax)
|
251
|
-
<div id='pagir' do='block' do='nodes' in='site' order='zip' limit='8' paginate='p'>
|
252
|
-
<p><b do='page_count'/> nodes</p>
|
253
|
-
<p>
|
254
|
-
<r:link mode='test' update='pagir' page='previous' do='t'>previous</r:link>
|
255
|
-
<r:p/>/<r:page_count/>
|
256
|
-
|| <r:link page='list' update='pagir'/> ||
|
257
|
-
<r:link mode='test' update='pagir' page='next' do='t'>next</r:link>
|
258
|
-
</p>
|
259
|
-
<ul>
|
260
|
-
<li do='each'><r:show attr='zip'/> <r:link/></li>
|
261
|
-
</ul>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
<hr/>
|
265
|
-
<h3>date query test</h3>
|
266
|
-
|
267
|
-
<h4>event='week'</h4>
|
268
|
-
<ul do='nodes in site' event='week'>
|
269
|
-
<li do='each' do='link'/>
|
270
|
-
</ul>
|
271
|
-
|
272
|
-
<h4>event='today'</h4>
|
273
|
-
<ul do='nodes in site' event='today'>
|
274
|
-
<li do='each' do='link'/>
|
275
|
-
</ul>
|
276
|
-
|
277
|
-
<h4>event='4 days' (+/- 4 days)</h4>
|
278
|
-
<ul do='nodes in site' event='4 days'>
|
279
|
-
<li do='each' do='link'/>
|
280
|
-
</ul>
|
281
|
-
|
282
|
-
<h4>event='-4 hours' (last 4 hours)</h4>
|
283
|
-
<ul do='nodes in site' event='-4 hours'>
|
284
|
-
<li do='each' do='link'/>
|
285
|
-
</ul>
|
286
|
-
|
287
|
-
<h3>calendar test</h3>
|
288
|
-
<div do='calendar' select='posts in site' attr='date'/>
|
289
|
-
|
290
|
-
<h3>week calendar</h3>
|
291
|
-
<div do='calendar' select='posts in site' attr='date' type='week'/>
|
292
|
-
|
293
|
-
<h3>tiny calendar</h3>
|
294
|
-
<div do='calendar' select='posts in site' attr='date' size='tiny'/>
|
295
|
-
|
296
|
-
<h2>assign calendar</h2>
|
297
|
-
<r:root>
|
298
|
-
<div do='block' id='assign_cal'>
|
299
|
-
<h3><b><r:show attr='title'/></b> calendar</h3>
|
300
|
-
<r:calendar assign_as='reference' used='warn' split_hours='12' />
|
315
|
+
|
316
|
+
//! link create
|
317
|
+
<div class='test' id='link1' do='selenium'>
|
318
|
+
<h3>link-create</h3>
|
319
|
+
<p>Create objects with links.</p>
|
320
|
+
<ul>
|
321
|
+
<li id='link1_create' do='link' action='create' node[title]='%{New node}' node[klass]='%{Page}' do='t'>create page</li>
|
322
|
+
</ul>
|
323
|
+
<ul do='pages'>
|
324
|
+
<li do='each' do='link' action='destroy'/>
|
325
|
+
</ul>
|
301
326
|
</div>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
<
|
306
|
-
|
307
|
-
<r:
|
308
|
-
|
309
|
-
</div>
|
310
|
-
|
311
|
-
<hr/>
|
312
|
-
|
313
|
-
<h2>update target test</h2>
|
314
|
-
<div id='bozo' do='block'><h3 do='title' actions='all'/><r:img mode='pv'/>
|
315
|
-
<r:summary/>
|
316
|
-
</div>
|
317
|
-
|
318
|
-
<ul do='images in site'><r:each join=', ' do='link' update='bozo'/></ul>
|
319
|
-
|
320
|
-
<hr/>
|
321
|
-
|
322
|
-
<div id='upfi' do='block'>
|
323
|
-
<h2>distant filter block test</h2>
|
324
|
-
<ol do='pages where title like "[param:f]%" limit 5'><li do='each' do='title'/></ol>
|
325
|
-
</div>
|
326
|
-
|
327
|
-
<hr/>
|
328
|
-
|
329
|
-
<div id='filter'>
|
330
|
-
<h2>filter block test</h2>
|
331
|
-
<r:filter live='true'/>
|
332
|
-
<r:block do='pages where title like "[param:f]%" limit 5'>
|
333
|
-
<ol><li do='each' do='title'/></ol>
|
334
|
-
</r:block>
|
335
|
-
</div>
|
336
|
-
|
337
|
-
<hr/>
|
338
|
-
|
339
|
-
|
340
|
-
<h2>data test</h2>
|
341
|
-
<ol do='data'>
|
342
|
-
<li do='each'><r:edit/> <b do='[text]'/> <r:show attr='value_a'/> <r:show attr='value_b'/><r:unlink/></li>
|
343
|
-
<li do='form'><r:cancel/> <r:input name='text'/> <r:input name='value_a'/> <r:input name='value_b'/> <r:input type='submit'/></li>
|
344
|
-
<li do='add' done='focus'/>
|
345
|
-
<r:set var='hours' do='stat' find='sum' from='value_a'/> <r:set var='exp' do='stat' find='sum' of='value_b'/>
|
346
|
-
<li><b><r:show var='hours'/> * 150.00 = <r:show eval='hours * 150'/> + <r:show var='exp'/> = <r:show eval='( hours * 150 ) + exp'/></b></li>
|
347
|
-
</ol>
|
348
|
-
|
349
|
-
<hr/>
|
350
|
-
|
351
|
-
<h2>data group block test</h2>
|
352
|
-
<ol id='bdata' do='block' do='data'>
|
353
|
-
<r:group by='value_a'>
|
354
|
-
<li>value: <b do='[value_a]'/></li>
|
355
|
-
<li do='each'><r:edit/> <b do='[text]'/> <r:show attr='value_a'/> <r:show attr='value_b'/><r:unlink/></li>
|
356
|
-
</r:group>
|
357
|
-
<li do='form'><r:cancel/> <r:input name='text'/> <r:input name='value_a'/> <r:input name='value_b'/> <r:input type='submit'/></li>
|
358
|
-
<li do='add' done='focus'/>
|
359
|
-
<r:set var='hours' do='stat' find='sum' from='value_a'/> <r:set var='exp' do='stat' find='sum' of='value_b'/>
|
360
|
-
<li><b><r:show var='hours'/> * 150.00 = <r:show eval='hours * 150'/> + <r:show var='exp'/> = <r:show eval='( hours * 150 ) + exp'/></b></li>
|
361
|
-
</ol>
|
362
|
-
|
363
|
-
<hr/>
|
364
|
-
|
365
|
-
<h2>data block test</h2>
|
366
|
-
<ol id='bdata' do='block' do='data'>
|
367
|
-
<li do='each'><r:edit/> <b do='[text]'/> <r:show attr='value_a'/> <r:show attr='value_b'/><r:unlink/></li>
|
368
|
-
<li do='form'><r:cancel/> <r:input name='text'/> <r:input name='value_a'/> <r:input name='value_b'/> <r:input type='submit'/></li>
|
369
|
-
<li do='add' done='focus'/>
|
370
|
-
<r:set var='hours' do='stat' find='sum' from='value_a'/> <r:set var='exp' do='stat' find='sum' of='value_b'/>
|
371
|
-
<li><b><r:show var='hours'/> * 150.00 = <r:show eval='hours * 150'/> + <r:show var='exp'/> = <r:show eval='( hours * 150 ) + exp'/></b></li>
|
372
|
-
</ol>
|
373
|
-
|
374
|
-
<hr/>
|
375
|
-
|
376
|
-
<h2>swap</h2>
|
377
|
-
<style>
|
378
|
-
.orange { background:orange;}
|
379
|
-
.green { background:green;}
|
380
|
-
</style>
|
381
|
-
<div id='swap' class='orange' do='block' green_if='weight == 100'>
|
382
|
-
<span do='swap' states=',100' attr='weight' publish='true'><r:if test='weight == 100'><r:t>done</r:t><r:else do='t'>open</r:else></r:if></span> weight: <b do='weight'/>
|
383
|
-
</div>
|
384
|
-
|
385
|
-
<h2>drag & drop</h2>
|
386
|
-
|
387
|
-
<r:images in='site' do='each' draggable='all' do='img' mode='tiny'/>
|
388
|
-
|
389
|
-
<h3>drop set relation (drop in each)</h3>
|
390
|
-
|
391
|
-
<ul do='tags in site'>
|
392
|
-
//! drop in each
|
393
|
-
<li style='border:1px solid #400; min_width:100px; min_height:100px;' do='each' do='drop' set='set_tag'>
|
394
|
-
<b do='title'/>
|
395
|
-
<ul do='context' select='tagged'><li do='each' do='unlink' do='img' mode='tiny'/></ul>
|
396
|
-
</li>
|
397
|
-
</ul>
|
398
|
-
|
399
|
-
<h3>drop set relation (drop in each/add)</h3>
|
400
|
-
|
401
|
-
|
402
|
-
<ul do='tags in site'>
|
403
|
-
//! drop in each
|
404
|
-
<li style='border:1px solid #400; min_width:100px; min_height:100px;' do='each' do='drop' set='set_tag'>
|
405
|
-
<b do='title'/>
|
406
|
-
<ul do='context' select='tagged'><li do='each' do='unlink' do='img' mode='tiny'/></ul>
|
407
|
-
</li>
|
408
|
-
<li do='add' klass='Tag'/>
|
409
|
-
</ul>
|
410
|
-
|
411
|
-
<h3>drop set attributes</h3>
|
412
|
-
|
413
|
-
<ul do='projects in site'>
|
414
|
-
<li style='border:1px solid #400; min_width:100px; min_height:100px;' do='each'><r:drop node[origin]='%Q{I am an icon for #{title}}' node[icon_for_id]='id'><b do='title' actions='all'/><r:icon where='1'><r:unlink do='img' mode='pv'/> <r:origin/> </r:icon></r:drop>
|
415
|
-
</li>
|
416
|
-
</ul>
|
417
|
-
|
418
|
-
<h3>drop reload with param (comment on receiving)</h3>
|
419
|
-
//! The strange %q{#{id}} means "lazy evaluation on drop".
|
420
|
-
<div style='border:1px solid #400; min_width:100px; min_height:100px;' do='drop' change='params' d='%q{#{id}}' do='if' test='params[:d]'>
|
421
|
-
<r:node where='id = #{params[:d]}' in='site'>
|
422
|
-
Change icon to <r:img mode='tiny'/> (<r:title/>)?
|
423
|
-
<r:set icon='this' do='main' do='form'>
|
424
|
-
<r:input type='hidden' name='icon_id' value='#{icon.id}'/>
|
425
|
-
<r:input type='hidden' name='m_title' value='icon changed to #{icon.title}'/>
|
426
|
-
<r:textarea name='m_text'/>
|
427
|
-
<r:input type='submit'/>
|
428
|
-
</r:set>
|
429
|
-
</r:node>
|
430
|
-
<r:else>
|
431
|
-
<r:icon do='img' mode='pv'/>
|
432
|
-
please drop a node to change the icon
|
433
|
-
<ul do='comments'>
|
434
|
-
<li do='each'><b do='title'/> <b do='author.title'/>
|
435
|
-
<div do='zazen' attr='text'/>
|
436
|
-
</li>
|
437
|
-
</ul></r:else>
|
438
|
-
</div>
|
439
|
-
|
440
|
-
<hr/>
|
441
|
-
|
442
|
-
<h3>drop reload with param (comment on dropped)</h3>
|
443
|
-
|
444
|
-
<r:images in='site' do='each' draggable='true' do='img' mode='tiny'/>
|
445
|
-
//! The strange %q{#{id}} means "lazy evaluation on drop".
|
446
|
-
<div style='border:1px solid #400; min_width:100px; min_height:100px;' do='drop' change='params' d='%q{#{id}}' do='if' test='params[:d]'>
|
447
|
-
<r:node where='id = #{params[:d]}' in='site'>
|
448
|
-
<r:img mode='tiny'/> (<r:title/>) Set as icon for <r:main do='title'/> ?
|
449
|
-
//! We need to set 't_id' (template rendering object id) so that after form submit, the
|
450
|
-
//! original (main) element is rendered and not the icon.
|
451
|
-
<r:form node[icon_for_id]='main.id' node[m_title]='%{icon for #{main.title}}' t_id='main.id'>
|
452
|
-
<r:input name='m_text'/>
|
327
|
+
|
328
|
+
//! grid edition
|
329
|
+
<div class='test' id='grid1' do='selenium'>
|
330
|
+
<h3>grid editing</h3>
|
331
|
+
<p>Attribute based grid.</p>
|
332
|
+
<r:form redir='url(this, :test =>"grid1")'>
|
333
|
+
<r:grid attr='origin'/>
|
453
334
|
<r:input type='submit'/>
|
454
335
|
</r:form>
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
<li do='each'><b do='title'/>
|
462
|
-
<b do='author.title'/>
|
463
|
-
<div do='zazen' attr='text'/>
|
464
|
-
</li>
|
465
|
-
</ul>
|
466
|
-
</r:icon>
|
467
|
-
</r:else>
|
468
|
-
</div>
|
469
|
-
|
470
|
-
<hr/>
|
471
|
-
|
472
|
-
<h2>add in updated DOM</h2>
|
473
|
-
|
474
|
-
<div id='add_and_update' do='block'>
|
475
|
-
<h3 do='title'/>
|
476
|
-
<ul do='pages'>
|
477
|
-
<li do='each' do='[title]'/>
|
478
|
-
<li do='add' klass='Page' update='add_and_update'/>
|
479
|
-
</ul>
|
480
|
-
</div>
|
481
|
-
|
482
|
-
<r:projects in='site' do='each' join=', ' do='link' update='add_and_update'/>
|
483
|
-
|
484
|
-
<hr/>
|
485
|
-
|
486
|
-
<h2>simplest comments</h2>
|
487
|
-
|
488
|
-
<ul do='comments'>
|
489
|
-
<li do='each'><r:zazen attr='text'/></li>
|
490
|
-
<li do='add'/>
|
491
|
-
</ul>
|
492
|
-
|
493
|
-
<h2>notes & comments</h2>
|
494
|
-
|
495
|
-
<div id='notes' do='posts' in='project' limit='10' order='date desc'>
|
496
|
-
<ul class='note_list'>
|
497
|
-
<li do='add' after='self'/>
|
498
|
-
<li class='inline_form' do='form'>
|
499
|
-
<p class='node_title'><r:input type='text' name='title' size='25'/></p>
|
500
|
-
<p class='node_klass'> <r:select name='klass' root_class='Note' selected='Post'/></p>
|
501
|
-
<p class='node_date'> <r:input type='date_box' name='date'/> </p>
|
502
|
-
<p class='validate'> <r:input type="submit" value='validate' do='void' tset_value='validate'/></p>
|
503
|
-
</li>
|
504
|
-
<li class='note' do='each'>
|
505
|
-
<div class='header'>
|
506
|
-
<p class='date' do='show' attr='date' tformat='full_date'>04.10</p>
|
507
|
-
<h2 class='title' do='title' actions='all'/>
|
508
|
-
<div class='summary' do ='summary'/>
|
509
|
-
</div>
|
510
|
-
<r:text/>
|
511
|
-
<ul do='comments'>
|
512
|
-
<li do='each'><b do='title'/> <b do='author_name'/>
|
513
|
-
<div do='zazen' attr='text'/>
|
514
|
-
</li>
|
515
|
-
<li do='add'/>
|
516
|
-
<li do='form'>
|
517
|
-
<p><r:input name='title'/></p>
|
518
|
-
<p><r:textarea name='text'/></p>
|
519
|
-
<p><r:input type='submit'/></p>
|
520
|
-
</li>
|
521
|
-
</ul>
|
522
|
-
<div class='clear'></div>
|
523
|
-
</li>
|
524
|
-
</ul>
|
525
|
-
</div>
|
526
|
-
|
527
|
-
|
528
|
-
<hr/>
|
529
|
-
-->
|
336
|
+
<r:js>
|
337
|
+
$$('.grid').each(function(e) {
|
338
|
+
Grid.make(e);
|
339
|
+
});
|
340
|
+
</r:js>
|
341
|
+
</div>
|
530
342
|
</r:with>
|
531
343
|
</r:include>
|
@@ -17,4 +17,9 @@ translations:
|
|
17
17
|
not_found: sans
|
18
18
|
crop: rogner
|
19
19
|
no_parent: pas de parent
|
20
|
-
admin_interface: interface admin
|
20
|
+
admin_interface: interface admin
|
21
|
+
# Used to test options list in [select].
|
22
|
+
assigned_: '--'
|
23
|
+
assigned_1: foo
|
24
|
+
assigned_2: bar
|
25
|
+
assigned_3: baz
|
@@ -32,7 +32,7 @@ class AclsControllerTest < Zena::Controller::TestCase
|
|
32
32
|
|
33
33
|
should 'respond missing' do
|
34
34
|
assert_difference('Acl.count', 0) do
|
35
|
-
post :create, :acl => { :query => 'assigned_project', :group_id => groups_id(:sky) }
|
35
|
+
post :create, :acl => { :query => '%q{assigned_project}', :group_id => groups_id(:sky) }
|
36
36
|
end
|
37
37
|
|
38
38
|
assert_response :missing
|
@@ -45,7 +45,7 @@ class AclsControllerTest < Zena::Controller::TestCase
|
|
45
45
|
|
46
46
|
should 'create acl' do
|
47
47
|
assert_difference('Acl.count', 1) do
|
48
|
-
post :create, :acl => { :query => 'assigned_project', :group_id => groups_id(:sky) }
|
48
|
+
post :create, :acl => { :query => '%q{assigned_project}', :group_id => groups_id(:sky) }
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end # with admin rights
|
@@ -178,7 +178,7 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
178
178
|
|
179
179
|
should 'insert cachestamp and render template' do
|
180
180
|
get_subject
|
181
|
-
#
|
181
|
+
#
|
182
182
|
assert_redirected_to "/en/page18_info.js?#{nodes(:projects).updated_at.to_i}"
|
183
183
|
get 'show', :path => subject[:path], :cachestamp => nodes(:projects).updated_at.to_i.to_s, :prefix => 'en'
|
184
184
|
assert_response :success
|
@@ -314,7 +314,7 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
314
314
|
should 'succeed' do
|
315
315
|
post_subject
|
316
316
|
node = assigns(:node)
|
317
|
-
assert_redirected_to "/oo/blog#{node.zip}.html"
|
317
|
+
assert_redirected_to "/oo/blog#{node.zip}.html?new=true"
|
318
318
|
end
|
319
319
|
|
320
320
|
should 'set type and vclass' do
|
@@ -527,9 +527,9 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
527
527
|
{:action => 'create', :controller => 'nodes', :node => {:parent_id => nodes_zip(:zena), :title => 'hello'}, :mode => 'info'}
|
528
528
|
end
|
529
529
|
|
530
|
-
should 'redirect to node with mode' do
|
530
|
+
should 'redirect to node with mode with new' do
|
531
531
|
post_subject
|
532
|
-
assert_redirected_to "/oo/page#{assigns(:node).zip}_info.html"
|
532
|
+
assert_redirected_to "/oo/page#{assigns(:node).zip}_info.html?new=true"
|
533
533
|
end
|
534
534
|
end # with a redir param
|
535
535
|
end # creating a node
|
@@ -700,7 +700,7 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
700
700
|
# cache info ok
|
701
701
|
get 'show', :prefix => 'en', :path => ["image#{node.zip}.jpg"], :cachestamp => node.updated_at.to_i
|
702
702
|
assert_response :success
|
703
|
-
assert File.exist?("#{SITES_ROOT}/test.host/public/en/image#{node.zip}.jpg")
|
703
|
+
assert File.exist?(make_cache_path("#{SITES_ROOT}/test.host/public/en/image#{node.zip}.jpg", node))
|
704
704
|
end
|
705
705
|
end
|
706
706
|
end
|
@@ -761,6 +761,10 @@ END:VCALENDAR
|
|
761
761
|
end
|
762
762
|
end
|
763
763
|
|
764
|
+
def make_cache_path(file, node)
|
765
|
+
"#{file}.#{node.updated_at.to_i}"
|
766
|
+
end
|
767
|
+
|
764
768
|
def test_cache_css_auto_publish
|
765
769
|
test_site('zena')
|
766
770
|
Site.connection.execute "UPDATE sites set auto_publish = #{Zena::Db::TRUE}, redit_time = 7200 WHERE id = #{sites_id(:zena)}"
|
@@ -774,18 +778,20 @@ END:VCALENDAR
|
|
774
778
|
assert !File.exist?(filename)
|
775
779
|
get 'show', :prefix => 'en', :path => [name], :cachestamp => node.updated_at.to_i
|
776
780
|
assert_response :success
|
777
|
-
|
778
|
-
|
781
|
+
cache1 = make_cache_path(filename, node)
|
782
|
+
assert File.exist?(cache1) # cached page created
|
783
|
+
assert_match %r[body \{ background: #eee; color:#444;], File.read(cache1)
|
779
784
|
put 'save_text', :id => nodes_zip(:style_css), :node => {'text' => '/* empty */'}
|
780
785
|
node = assigns['node']
|
781
786
|
assert node.errors.empty?
|
782
787
|
assert_equal Zena::Status::Pub, node.version.status
|
783
788
|
assert_equal versions_id(:style_css_en), node.version.id # auto publish
|
784
|
-
assert !File.exist?(
|
789
|
+
assert !File.exist?(cache1) # old cached page removed
|
785
790
|
get 'show', :prefix => 'en', :path => [name], :cachestamp => node.updated_at.to_i
|
786
791
|
assert_response :success
|
787
|
-
|
788
|
-
|
792
|
+
cache2 = make_cache_path(filename, node)
|
793
|
+
assert File.exist?(cache2) # cached page created again
|
794
|
+
assert_match %r[/\* empty \*/], File.read(cache2)
|
789
795
|
end
|
790
796
|
end
|
791
797
|
end
|
@@ -895,7 +901,7 @@ END:VCALENDAR
|
|
895
901
|
img = secure!(Node) { nodes(:bird_jpg) }
|
896
902
|
assert_not_equal pub_version_id, img.version.id
|
897
903
|
assert_not_equal pub_content_id, img.version.attachment.id
|
898
|
-
assert_equal
|
904
|
+
assert_equal 2002, img.size
|
899
905
|
assert_equal 160, img.width
|
900
906
|
assert_equal 80, img.height
|
901
907
|
end
|
@@ -203,7 +203,7 @@ class VirtualClassesControllerTest < Zena::Controller::TestCase
|
|
203
203
|
post_subject
|
204
204
|
assert_response :success
|
205
205
|
diff = assigns(:diff)
|
206
|
-
assert_match(/<ins class="differ"
|
206
|
+
assert_match(/<ins class="differ">.*Foo/, diff)
|
207
207
|
end
|
208
208
|
end
|
209
209
|
end # importing virtual class definitions
|
@@ -51,6 +51,15 @@ project:
|
|
51
51
|
sql: "[%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} AND nodes.id = ? ORDER BY nodes.zip ASC}, @node.get_project_id]"
|
52
52
|
res: 'Clean Water project'
|
53
53
|
|
54
|
+
date_year:
|
55
|
+
src: "nodes where created_at = 2006 in site"
|
56
|
+
# sql: "%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} GROUP BY nodes.project_id HAVING MIN(nodes.created_at) = 2006 ORDER BY nodes.zip ASC}"
|
57
|
+
res: ""
|
58
|
+
|
59
|
+
min:
|
60
|
+
src: "nodes select created_at.min as mat in site group by project_id"
|
61
|
+
sql: "%Q{SELECT nodes.*,MIN(nodes.created_at) AS `mat` FROM nodes WHERE #{secure_scope('nodes')} GROUP BY nodes.project_id ORDER BY nodes.zip ASC}"
|
62
|
+
|
54
63
|
many_alternatives:
|
55
64
|
src: tagged in site or images in site or tags in site
|
56
65
|
sql: "%Q{SELECT nodes.*,links.id AS `link_id`,links.status AS `l_status`,links.comment AS `l_comment`,links.date AS `l_date` FROM links,nodes WHERE #{secure_scope('nodes')} AND ((nodes.id = links.source_id AND links.relation_id = _ID(node_has_tags)) OR (nodes.kpath LIKE 'NDI%' AND links.id = 0) OR (nodes.kpath LIKE 'NPT%' AND links.id = 0)) GROUP BY nodes.id ORDER BY nodes.zip ASC}"
|