zena 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/public/javascripts/zena.js
CHANGED
|
@@ -226,8 +226,8 @@ Zena.resizeElement = function(name) {
|
|
|
226
226
|
}
|
|
227
227
|
var hMargin = obj.offsetLeft;
|
|
228
228
|
var vMargin = obj.offsetTop;
|
|
229
|
-
obj.style.width = (myWidth - hMargin - 5) + 'px';
|
|
230
|
-
obj.style.height = (myHeight - vMargin -
|
|
229
|
+
// obj.style.width = (myWidth - hMargin - 5) + 'px';
|
|
230
|
+
obj.style.height = (myHeight - vMargin - 12) + 'px';
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
// transfer html from src tag to trgt tag
|
|
@@ -839,10 +839,10 @@ Zena.set_toggle = function(dom_id, definition) {
|
|
|
839
839
|
if (elem.tagName == 'TR') {
|
|
840
840
|
target = elem.select('td')[0];
|
|
841
841
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
842
|
+
var input_type = 'checkbox'
|
|
843
|
+
if (definition['arity'] == 'one') {
|
|
844
|
+
input_type = 'radio'
|
|
845
|
+
}
|
|
846
846
|
target.insert({top:"<input type='"+input_type+"' class='cb'/>"});
|
|
847
847
|
}
|
|
848
848
|
|
|
@@ -1018,6 +1018,7 @@ Zena.do = function(method, dom, query, opts) {
|
|
|
1018
1018
|
var todo = list.length
|
|
1019
1019
|
for (var i=0; i < list.length; i++) {
|
|
1020
1020
|
var q = list[i]
|
|
1021
|
+
q.zs = Zena.stamp(dom.id)
|
|
1021
1022
|
new Ajax.Request(makeUrl(method, dom, q), {
|
|
1022
1023
|
method:method,
|
|
1023
1024
|
parameters:Zena.prepare_query(q),
|
|
@@ -1041,6 +1042,7 @@ Zena.do = function(method, dom, query, opts) {
|
|
|
1041
1042
|
query.dom_id = dom.id
|
|
1042
1043
|
if (!query.s) query.s = $(document.body).getAttribute('data-z')
|
|
1043
1044
|
if (!query.t_url) query.t_url = $(document.body).getAttribute('data-t') + '/' + (dom.getAttribute('data-t') || dom.id)
|
|
1045
|
+
query.zs = Zena.stamp(dom.id)
|
|
1044
1046
|
new Ajax.Request(makeUrl(method, dom, query), {
|
|
1045
1047
|
method:method,
|
|
1046
1048
|
parameters:Zena.prepare_query(query),
|
|
@@ -1067,18 +1069,25 @@ Zena.post = function(dom_name, query) {
|
|
|
1067
1069
|
}
|
|
1068
1070
|
|
|
1069
1071
|
Zena.loading = function(e) {
|
|
1070
|
-
e.
|
|
1072
|
+
var id = e.id
|
|
1073
|
+
e.addClassName('zloading_s')
|
|
1074
|
+
setTimeout(function() {
|
|
1075
|
+
e = $(id)
|
|
1076
|
+
if (e.hasClassName('zloading_s')) {
|
|
1077
|
+
e.addClassName('zloading')
|
|
1078
|
+
}
|
|
1079
|
+
}, 300)
|
|
1071
1080
|
}
|
|
1072
1081
|
|
|
1073
|
-
Zena._add_sort = function(
|
|
1082
|
+
Zena._add_sort = function(upd, elem, val) {
|
|
1074
1083
|
var query
|
|
1075
1084
|
elem.setAttribute('data-p',val)
|
|
1076
1085
|
var link_id = elem.getAttribute('data-l')
|
|
1077
1086
|
if (link_id) {
|
|
1078
1087
|
query = {
|
|
1079
|
-
id:elem.id.gsub(
|
|
1088
|
+
id:elem.id.gsub(/^.*?_/,''),
|
|
1080
1089
|
node: {
|
|
1081
|
-
link_id:
|
|
1090
|
+
link_id:link_id,
|
|
1082
1091
|
l_status:val
|
|
1083
1092
|
}
|
|
1084
1093
|
}
|
|
@@ -1087,7 +1096,7 @@ Zena._add_sort = function(dom, upd, elem, val) {
|
|
|
1087
1096
|
id:elem.id.gsub(/^.*?_/,''),
|
|
1088
1097
|
node: {}
|
|
1089
1098
|
}
|
|
1090
|
-
query.node[
|
|
1099
|
+
query.node[elem.getAttribute('data-a') || 'position'] = val
|
|
1091
1100
|
}
|
|
1092
1101
|
upd.push(query)
|
|
1093
1102
|
}
|
|
@@ -1107,7 +1116,7 @@ Zena._sortable_upd = function(dom) {
|
|
|
1107
1116
|
|
|
1108
1117
|
if (p_s == 0) {
|
|
1109
1118
|
p_s = 1
|
|
1110
|
-
Zena._add_sort(
|
|
1119
|
+
Zena._add_sort(upd, prev, p_s)
|
|
1111
1120
|
}
|
|
1112
1121
|
|
|
1113
1122
|
var list_len = list.length
|
|
@@ -1118,7 +1127,7 @@ Zena._sortable_upd = function(dom) {
|
|
|
1118
1127
|
var n_s = next ? parseFloat(next.getAttribute('data-p')) || 0 : false
|
|
1119
1128
|
if (i == 1 && p_s > c_s) {
|
|
1120
1129
|
p_s = c_s > 0.01 ? c_s / 2 : 1
|
|
1121
|
-
Zena._add_sort(
|
|
1130
|
+
Zena._add_sort(upd, prev, p_s)
|
|
1122
1131
|
}
|
|
1123
1132
|
|
|
1124
1133
|
if(p_s < c_s) {
|
|
@@ -1129,7 +1138,7 @@ Zena._sortable_upd = function(dom) {
|
|
|
1129
1138
|
} else {
|
|
1130
1139
|
c_s = p_s + 1
|
|
1131
1140
|
}
|
|
1132
|
-
Zena._add_sort(
|
|
1141
|
+
Zena._add_sort(upd, curr, c_s)
|
|
1133
1142
|
}
|
|
1134
1143
|
prev = curr
|
|
1135
1144
|
p_s = c_s
|
|
@@ -1191,4 +1200,23 @@ Zena.resetSort = function(ref) {
|
|
|
1191
1200
|
Zena.reload(dom)
|
|
1192
1201
|
}
|
|
1193
1202
|
})
|
|
1194
|
-
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
var stamps = {}
|
|
1206
|
+
Zena.stamp = function (dom) {
|
|
1207
|
+
var s = (stamps[dom] || 0) + 1
|
|
1208
|
+
stamps[dom] = s
|
|
1209
|
+
return s
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// Used to make sure requests are served in chronological order. Stores stamp by dom_id.
|
|
1213
|
+
Zena.stampOk = function(dom, stamp) {
|
|
1214
|
+
var c = stamps[dom]
|
|
1215
|
+
if (
|
|
1216
|
+
!c || // this happens if Zena.stamp was not called prior to the ajax query (old templates)
|
|
1217
|
+
(stamp == c) || // this is normal behavior
|
|
1218
|
+
stamp == 0) { // this happens with pagination (Zena.stamp is called for query but not for pagination so the stamp is always 0)
|
|
1219
|
+
return true
|
|
1220
|
+
}
|
|
1221
|
+
return false
|
|
1222
|
+
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
table.admin, table.admin table { border-collapse:separate; border-width:0; margin:auto; border-color:#999; border-style:solid; }
|
|
18
|
-
table.admin { width:
|
|
18
|
+
table.admin { width:650px; }
|
|
19
19
|
.admin_group { display:table; margin:1em auto; width:500px; border:1px solid grey; padding:5px; background:#eee;}
|
|
20
20
|
.admin_group .btn_validate { float:right;}
|
|
21
21
|
table.admin table { width:90%; }
|
|
@@ -27,6 +27,7 @@ table.admin td:first-child { border-left: 1px solid #999; }
|
|
|
27
27
|
#add_user td { border: 0;}
|
|
28
28
|
#add_group td { border: 0;}
|
|
29
29
|
#virtual_class_list td, #virtual_class_list, #virtual_class_list th {border-color:#ccc;}
|
|
30
|
+
.admin .profile {font-weight: bold;}
|
|
30
31
|
.admin td { padding: 3px; height:18px; border-right:1px solid #999; border-bottom:1px solid #999; }
|
|
31
32
|
.admin th { border-bottom:1px solid #999; padding:4px;}
|
|
32
33
|
.admin .adm_icon, .admin .adm_add, .admin .action { width:22px; text-align:center; margin:0;}
|
|
@@ -43,6 +44,8 @@ table.admin td:first-child { border-left: 1px solid #999; }
|
|
|
43
44
|
.admin th { background:#999; color:#222; font-weight:bold;}
|
|
44
45
|
.admin .Role { color:#eee;}
|
|
45
46
|
.admin .name { font-weight:bold;}
|
|
47
|
+
.admin .name.versioned { color:#1F8A1F}
|
|
48
|
+
.admin .name.not-versioned { color:#5699B9}
|
|
46
49
|
.admin .blank { text-align:center; background:none; padding-top:2em;}
|
|
47
50
|
.admin th .kpath {font-weight:normal; font-family:Monaco, monospace; color:#ccc;}
|
|
48
51
|
.admin .light { background:#eee;}
|
|
@@ -94,7 +97,7 @@ ul.actions select { width:186px; }
|
|
|
94
97
|
.actions .errors li { margin-left:0.4em; background:inherit; line-height:1.2em;}
|
|
95
98
|
|
|
96
99
|
/* forms */
|
|
97
|
-
label { font-size:0.9em; font-weight:bold; display:block; color:#5C1515; margin:10px 0 5px; clear:left;}
|
|
100
|
+
.nform label { font-size:0.9em; font-weight:bold; display:block; color:#5C1515; margin:10px 0 5px; clear:left;}
|
|
98
101
|
|
|
99
102
|
.comment { font-style:italic; color:#777}
|
|
100
103
|
.comment strong {font-weight:bold; font-style:italic;}
|
|
@@ -107,3 +110,6 @@ label { font-size:0.9em; font-weight:bold; display:block; color:#5C1515; margin:
|
|
|
107
110
|
.virtual_class .nav.constant {color: #003F9D;}
|
|
108
111
|
.role .constant {color:#0C9616;}
|
|
109
112
|
.role .nav.constant {color:#05540B;}
|
|
113
|
+
.boxes p {margin:2px 0}
|
|
114
|
+
.boxes input {}
|
|
115
|
+
.boxes label {padding-left:8px; }
|
data/public/stylesheets/grid.css
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
.grid td {white-space:pre-line}
|
|
1
2
|
.grid td.action {border-width:0 0 0 1px; font-size:70%}
|
|
2
3
|
.grid tr.action td {border-width:0 0 1px 0; font-size:70%}
|
|
3
4
|
.grid tr.action td.action {border:0}
|
|
@@ -15,14 +16,16 @@
|
|
|
15
16
|
.grid .action .del {background:url('/images/bullet_delete.png') no-repeat; padding:5px;}
|
|
16
17
|
.grid .action .copy {background:url('/images/table_go.png') no-repeat; padding:8px;}
|
|
17
18
|
|
|
18
|
-
.grid_btn a {text-decoration:none; border:1px solid #333; border-radius:4px; padding:2px 5px; color
|
|
19
|
+
.grid_btn a {text-decoration:none; border:1px solid #333; border-radius:4px; padding:2px 5px; color:#333;}
|
|
19
20
|
.grid_btn {margin:1em 0}
|
|
20
21
|
.grid_btn a.save {background:#80B62D}
|
|
21
22
|
.grid_btn a.undo {background:#AAB76D}
|
|
23
|
+
.grid_btn a.save:active {position:relative; top:1px; background:#97D13E}
|
|
24
|
+
.grid_btn a.undo:active {position:relative; top:1px; background:#D8E69B}
|
|
22
25
|
.grid_msg {border:1px solid #888; background:#eee; border-radius:4px; padding:5px; display:table}
|
|
23
26
|
|
|
24
27
|
.tags li {border-radius:2px; background:#ccc url('/images/remove_tag.png') no-repeat; padding:2px 5px 2px 15px; margin:3px; display:inline; background-position:2px 4px}
|
|
25
28
|
.tags li.add {background:#8c8 url('/images/add.png') no-repeat;background-position:1px 2px}
|
|
26
29
|
|
|
27
30
|
.grid .asc {background:#7b7}
|
|
28
|
-
.grid .desc {background:#fa0}
|
|
31
|
+
.grid .desc {background:#fa0}
|
|
@@ -48,7 +48,7 @@ form .infos li { clear:none;}
|
|
|
48
48
|
.tab_content { font-size:0.9em; padding:30px 0 2px 8px; }
|
|
49
49
|
/* text */
|
|
50
50
|
#text_tab { padding:0;}
|
|
51
|
-
#node_text { width:
|
|
51
|
+
#node_text { width:97%; height:75%; margin:30px 0px 5px 0px; font:inherit; padding:5px;}
|
|
52
52
|
|
|
53
53
|
/* title */
|
|
54
54
|
.full_width { width:96%; font:inherit; font-size:0.9em; padding:2px;}
|
|
@@ -408,8 +408,59 @@
|
|
|
408
408
|
<r:js>
|
|
409
409
|
$$('.grid').each(function(e) {
|
|
410
410
|
Grid.make(e);
|
|
411
|
+
$('grid1').insert({bottom:'grid setup done'})
|
|
411
412
|
});
|
|
412
413
|
</r:js>
|
|
413
414
|
</div>
|
|
415
|
+
|
|
416
|
+
//! grid table edit
|
|
417
|
+
<div class='test' id='grid2' do='selenium'>
|
|
418
|
+
<h3>grid table</h3>
|
|
419
|
+
<p>Batch create and edit objects</h3>
|
|
420
|
+
<table class='grid' id='grid2_table' do='posts in site'>
|
|
421
|
+
<tr>
|
|
422
|
+
<th data-a='date' do='t'>date</th>
|
|
423
|
+
<th data-a='parent_id' do='t'>parent</th>
|
|
424
|
+
<th data-a='title' do='t'>title</th>
|
|
425
|
+
<th data-a='summary' do='t'>summary</th>
|
|
426
|
+
</tr>
|
|
427
|
+
|
|
428
|
+
<r:each>
|
|
429
|
+
<tr id='id_#{id}'>
|
|
430
|
+
<td class='date' do='this.date' format='%d.%m.%Y %H:%M'/>
|
|
431
|
+
<r:parent>
|
|
432
|
+
<td data-v='#{id}' do='title'/>
|
|
433
|
+
</r:parent>
|
|
434
|
+
<td class='title' do='title'/>
|
|
435
|
+
<td class='summary' do='summary'/>
|
|
436
|
+
</tr>
|
|
437
|
+
</r:each>
|
|
438
|
+
</table>
|
|
439
|
+
|
|
440
|
+
<div id='h_grid' style='display:none'>
|
|
441
|
+
<select name='parent_id' do='projects in site'>
|
|
442
|
+
<option value='#{id}' do='each' do='title'/>
|
|
443
|
+
</select>
|
|
444
|
+
<r:input data-d='true' type='hidden' param='klass' value='Post'/>
|
|
445
|
+
</div>
|
|
446
|
+
|
|
447
|
+
<table style='display:none'>
|
|
448
|
+
<tr id='new_row'>
|
|
449
|
+
<td class='date'></td>
|
|
450
|
+
<td></td>
|
|
451
|
+
<td class='title'></td>
|
|
452
|
+
<td class='summary'></td>
|
|
453
|
+
</tr>
|
|
454
|
+
</table>
|
|
455
|
+
|
|
456
|
+
<r:js>
|
|
457
|
+
Grid.make('grid2_table', {
|
|
458
|
+
newRow: 'new_row',
|
|
459
|
+
helper: 'h_grid',
|
|
460
|
+
fdate: '%d.%m.%Y %H:%M',
|
|
461
|
+
contenteditable: true,
|
|
462
|
+
})
|
|
463
|
+
</r:js>
|
|
464
|
+
</div>
|
|
414
465
|
</r:with>
|
|
415
466
|
</r:include>
|
|
@@ -359,7 +359,7 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
|
359
359
|
assert_redirected_to '/foo/bar/baz'
|
|
360
360
|
end
|
|
361
361
|
end # with a redir param
|
|
362
|
-
|
|
362
|
+
|
|
363
363
|
context 'by changing a link comment' do
|
|
364
364
|
subject do
|
|
365
365
|
{:action => 'update', :controller => 'nodes', :id => nodes_zip(:opening), :node => {:link_id => links_id(:opening_in_art), :l_comment => 'To be removed'}}
|
|
@@ -409,8 +409,9 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
|
409
409
|
|
|
410
410
|
should 'set error message on skin_id' do
|
|
411
411
|
put_subject
|
|
412
|
-
assert_response :
|
|
412
|
+
assert_response :redirect
|
|
413
413
|
assert_equal 'type mismatch (Page is not a Skin)', assigns(:node).errors[:skin_id]
|
|
414
|
+
assert_equal %Q{<table class='errors'>\n<tr><td><b>skin_id</b></td><td>type mismatch (Page is not a Skin)</td></tr>\n</table>}, flash[:error]
|
|
414
415
|
end
|
|
415
416
|
end # with a bad value
|
|
416
417
|
|
|
@@ -538,6 +539,18 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
|
538
539
|
assert_redirected_to '/foo/bar/baz'
|
|
539
540
|
end
|
|
540
541
|
end # with a redir param
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
context 'with a redir param with NODE_ID' do
|
|
545
|
+
subject do
|
|
546
|
+
{:action => 'create', :controller => 'nodes', :node => {:parent_id => nodes_zip(:zena), :title => 'hello'}, :redir => '/foo/bar/baz/NODE_ID'}
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
should 'replace NODE_ID in redirect' do
|
|
550
|
+
post_subject
|
|
551
|
+
assert_redirected_to "/foo/bar/baz/66"
|
|
552
|
+
end
|
|
553
|
+
end # with a redir param
|
|
541
554
|
|
|
542
555
|
context 'with a mode param' do
|
|
543
556
|
subject do
|
|
@@ -727,8 +740,9 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
|
727
740
|
test_site(:zena)
|
|
728
741
|
without_files('/test.host/public') do
|
|
729
742
|
name = "section#{nodes_zip(:people)}.xml"
|
|
743
|
+
cache_path = "#{SITES_ROOT}/test.host/public/en/#{name}"
|
|
730
744
|
with_caching do
|
|
731
|
-
assert !File.exist?(
|
|
745
|
+
assert !File.exist?(cache_path)
|
|
732
746
|
login(:lion)
|
|
733
747
|
doc = secure!(Template) { Template.create('title'=>'Node', 'format'=>'xml', 'text' => '<?xml version="1.0" encoding="utf-8"?><node><title do="title"/></node>', 'parent_id'=>nodes_id(:default))}
|
|
734
748
|
assert !doc.new_record?, "Not a new record"
|
|
@@ -736,8 +750,9 @@ class NodesControllerTest < Zena::Controller::TestCase
|
|
|
736
750
|
login(:anon)
|
|
737
751
|
get 'show', :prefix => 'en', :path => [name]
|
|
738
752
|
assert_response :success
|
|
739
|
-
assert_equal
|
|
740
|
-
assert File.exist?(
|
|
753
|
+
assert_equal '<?xml version="1.0" encoding="utf-8"?><node><title>people</title></node>', @response.body
|
|
754
|
+
assert File.exist?(cache_path)
|
|
755
|
+
assert_equal '<?xml version="1.0" encoding="utf-8"?><node><title>people</title></node>', File.read(cache_path)
|
|
741
756
|
end
|
|
742
757
|
end
|
|
743
758
|
end
|
|
@@ -14,11 +14,41 @@ class UserSessionsControllerTest < Zena::Controller::TestCase
|
|
|
14
14
|
assert assigns(:user_session).persisting?
|
|
15
15
|
assert_response 302
|
|
16
16
|
end
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
|
|
18
|
+
context 'on failure' do
|
|
19
|
+
should "redirect to login page" do
|
|
20
|
+
post 'create', :login=>'ant', :password=>'boom'
|
|
21
|
+
assert !assigns(:user_session).persisting?
|
|
22
|
+
assert_redirected_to login_path
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
should 'increment user login_attempt_count' do
|
|
26
|
+
assert_nil users(:ant).login_attempt_count
|
|
27
|
+
post 'create', :login=>'ant', :password=>'boom'
|
|
28
|
+
assert_equal 1, users(:ant).login_attempt_count
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
should 'set attempt datetime' do
|
|
32
|
+
a = Time.now.utc.to_i
|
|
33
|
+
assert_nil users(:ant).login_attempted_at
|
|
34
|
+
post 'create', :login=>'ant', :password=>'boom'
|
|
35
|
+
b = Time.now.utc.to_i
|
|
36
|
+
assert a <= users(:ant).login_attempted_at.to_i
|
|
37
|
+
assert b >= users(:ant).login_attempted_at.to_i
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context 'with a large attempt count' do
|
|
42
|
+
setup do
|
|
43
|
+
Zena::Db.set_attribute(users(:ant), 'login_attempt_count', 10)
|
|
44
|
+
Zena::Db.set_attribute(users(:ant), 'login_attempted_at', Time.now.utc)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
should 'refuse login' do
|
|
48
|
+
post 'create', :login => 'ant', :password => 'ant'
|
|
49
|
+
assert_redirected_to login_path
|
|
50
|
+
assert_equal 'You need to wait 0h 17m 4s before any new attempt (10 failed attempts).', flash[:error]
|
|
51
|
+
end
|
|
22
52
|
end
|
|
23
53
|
|
|
24
54
|
end
|
|
@@ -40,6 +70,11 @@ class UserSessionsControllerTest < Zena::Controller::TestCase
|
|
|
40
70
|
should "check if visitor is admin" do
|
|
41
71
|
assert visitor.is_admin?
|
|
42
72
|
end
|
|
73
|
+
|
|
74
|
+
should 'redirect to home on login' do
|
|
75
|
+
get :new
|
|
76
|
+
assert_redirected_to 'oo'
|
|
77
|
+
end
|
|
43
78
|
|
|
44
79
|
end
|
|
45
80
|
|
|
@@ -50,7 +85,7 @@ class UserSessionsControllerTest < Zena::Controller::TestCase
|
|
|
50
85
|
|
|
51
86
|
should 'not be allowed to login' do
|
|
52
87
|
post 'create', :login => 'ant', :password => 'ant'
|
|
53
|
-
assert !assigns(:user_session)
|
|
88
|
+
assert !assigns(:user_session)
|
|
54
89
|
assert_redirected_to login_path
|
|
55
90
|
end
|
|
56
91
|
end
|
|
@@ -29,9 +29,8 @@ class UsersControllerTest < Zena::Controller::TestCase
|
|
|
29
29
|
setup do
|
|
30
30
|
login(:lion)
|
|
31
31
|
# Make a bad admin layout
|
|
32
|
-
Version.connection.execute "UPDATE #{Version.table_name} SET properties = '{\"data\":{\"title\":\"foo\",\"text\":\"empty\"},\"json_class\":\"Property::Properties\"}' WHERE id = #{versions_id(:Node_admin_layout_zafu_en)}"
|
|
32
|
+
Version.connection.execute "UPDATE #{Version.table_name} SET properties = '{\"data\":{\"title\":\"foo\",\"text\":\"empty\",\"tkpath\":\"N\"},\"json_class\":\"Property::Properties\"}' WHERE id = #{versions_id(:Node_admin_layout_zafu_en)}"
|
|
33
33
|
without_files('test.host/zafu') do
|
|
34
|
-
get 'index'
|
|
35
34
|
get 'index'
|
|
36
35
|
end
|
|
37
36
|
end
|
|
@@ -11,7 +11,7 @@ class NavigationTest < Zena::Integration::TestCase
|
|
|
11
11
|
# 1. site forces authentication
|
|
12
12
|
Site.connection.execute "UPDATE sites SET authentication = 1 WHERE id = #{sites_id(:zena)}"
|
|
13
13
|
get 'http://test.host/'
|
|
14
|
-
assert_redirected_to 'http://test.host/login'
|
|
14
|
+
assert_redirected_to 'http://test.host/login?lang=en'
|
|
15
15
|
|
|
16
16
|
post 'http://test.host/session', :login=>'tiger', :password=>'tiger'
|
|
17
17
|
assert_redirected_to "http://test.host/"
|
|
@@ -31,7 +31,7 @@ class NavigationTest < Zena::Integration::TestCase
|
|
|
31
31
|
# 1. site forces authentication
|
|
32
32
|
Site.connection.execute "UPDATE sites SET authentication = 1 WHERE id = #{sites_id(:zena)}"
|
|
33
33
|
get 'http://test.host/en/textdocument53.css' # style_css
|
|
34
|
-
assert_redirected_to 'http://test.host/login'
|
|
34
|
+
assert_redirected_to 'http://test.host/login?lang=en'
|
|
35
35
|
|
|
36
36
|
post 'http://test.host/session', :login=>'tiger', :password=>'tiger'
|
|
37
37
|
assert_redirected_to "http://test.host/oo"
|
|
@@ -81,7 +81,7 @@ class NavigationTest < Zena::Integration::TestCase
|
|
|
81
81
|
reset!
|
|
82
82
|
get *subject
|
|
83
83
|
assert_response :redirect
|
|
84
|
-
assert_redirected_to 'http://ocean.host/login'
|
|
84
|
+
assert_redirected_to 'http://ocean.host/login?lang=en'
|
|
85
85
|
assert_equal users_id(:incognito), visitor.id
|
|
86
86
|
end
|
|
87
87
|
end # but invalid host
|
|
@@ -339,6 +339,24 @@ class NavigationTest < Zena::Integration::TestCase
|
|
|
339
339
|
end # with a mode
|
|
340
340
|
|
|
341
341
|
end # On a page with custom base
|
|
342
|
+
|
|
343
|
+
context 'on a site alias with custom base' do
|
|
344
|
+
setup do
|
|
345
|
+
login(:lion, 'alias.host')
|
|
346
|
+
# home = wiki
|
|
347
|
+
# create 'foo' with custom_base and 'bar' inside wiki
|
|
348
|
+
@foo = secure(Page) { Page.create(:parent_id => nodes_id(:wiki), :title => 'foo', :custom_base => true, :v_status => Zena::Status::Pub)}
|
|
349
|
+
@bar = secure(Page) { Page.create(:parent_id => @foo.id, :title => 'bar') }
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
should 'render page' do
|
|
353
|
+
get 'http://alias.host/fr/foo'
|
|
354
|
+
assert_response :success
|
|
355
|
+
get "http://alias.host/fr/foo/page#{@bar.zip}.html"
|
|
356
|
+
assert_response :success
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
|
|
342
360
|
|
|
343
361
|
def test_url_with_custom_base
|
|
344
362
|
get 'http://test.host/en/projects-list/Clean-Water-project'
|
|
@@ -516,7 +534,7 @@ class NavigationTest < Zena::Integration::TestCase
|
|
|
516
534
|
assert_redirected_to 'http://test.host/en'
|
|
517
535
|
assert_equal 'en', session[:lang]
|
|
518
536
|
get 'http://test.host/oo'
|
|
519
|
-
assert_redirected_to 'http://test.host/login'
|
|
537
|
+
assert_redirected_to 'http://test.host/login?lang=en'
|
|
520
538
|
post 'http://test.host/session', :login => 'ant', :password => 'ant'
|
|
521
539
|
assert_redirected_to 'http://test.host/oo'
|
|
522
540
|
# should not change session lang
|