typo 5.2.98 → 5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/sidebar_controller.rb +15 -3
- data/app/helpers/sidebar_helper.rb +9 -4
- data/app/models/feedback.rb +10 -2
- data/app/models/page_cache.rb +5 -1
- data/app/views/admin/blacklist/_blacklist_patterns.html.erb +2 -0
- data/app/views/admin/categories/new.html.erb +1 -1
- data/app/views/admin/content/_form.html.erb +3 -3
- data/app/views/admin/content/_simple_editor.html.erb +2 -0
- data/app/views/admin/content/_visual_editor.html.erb +2 -0
- data/app/views/admin/pages/_form.html.erb +5 -5
- data/app/views/admin/pages/_simple_editor.html.erb +2 -0
- data/app/views/admin/pages/_visual_editor.html.erb +2 -0
- data/app/views/articles/_comment_box.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +1 -1
- data/app/views/articles/read.html.erb +1 -1
- data/config/environment.rb +3 -2
- data/lib/tasks/release.rake +3 -4
- data/lib/typo_version.rb +1 -1
- data/public/stylesheets/administration.css +37 -2
- data/public/stylesheets/administration_rtl.css +316 -437
- data/vendor/actionwebservice/CHANGELOG +320 -0
- data/vendor/actionwebservice/MIT-LICENSE +21 -0
- data/vendor/actionwebservice/README +381 -0
- data/vendor/actionwebservice/Rakefile +173 -0
- data/vendor/actionwebservice/TODO +32 -0
- data/vendor/actionwebservice/examples/googlesearch/README +143 -0
- data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +50 -0
- data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +57 -0
- data/vendor/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +108 -0
- data/vendor/actionwebservice/examples/googlesearch/delegated/search_controller.rb +7 -0
- data/vendor/actionwebservice/examples/googlesearch/direct/google_search_api.rb +50 -0
- data/vendor/actionwebservice/examples/googlesearch/direct/search_controller.rb +58 -0
- data/vendor/actionwebservice/examples/metaWeblog/README +17 -0
- data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +60 -0
- data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +34 -0
- data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +67 -0
- data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +48 -0
- data/vendor/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +16 -0
- data/vendor/actionwebservice/generators/web_service/USAGE +28 -0
- data/vendor/actionwebservice/generators/web_service/templates/api_definition.rb +5 -0
- data/vendor/actionwebservice/generators/web_service/templates/controller.rb +8 -0
- data/vendor/actionwebservice/generators/web_service/templates/functional_test.rb +19 -0
- data/vendor/actionwebservice/generators/web_service/web_service_generator.rb +29 -0
- data/vendor/actionwebservice/lib/action_web_service.rb +66 -0
- data/vendor/actionwebservice/lib/action_web_service/api.rb +297 -0
- data/vendor/actionwebservice/lib/action_web_service/base.rb +38 -0
- data/vendor/actionwebservice/lib/action_web_service/casting.rb +144 -0
- data/vendor/actionwebservice/lib/action_web_service/client.rb +3 -0
- data/vendor/actionwebservice/lib/action_web_service/client/base.rb +28 -0
- data/vendor/actionwebservice/lib/action_web_service/client/soap_client.rb +113 -0
- data/vendor/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +58 -0
- data/vendor/actionwebservice/lib/action_web_service/container.rb +3 -0
- data/vendor/actionwebservice/lib/action_web_service/container/action_controller_container.rb +93 -0
- data/vendor/actionwebservice/lib/action_web_service/container/delegated_container.rb +86 -0
- data/vendor/actionwebservice/lib/action_web_service/container/direct_container.rb +69 -0
- data/vendor/actionwebservice/lib/action_web_service/dispatcher.rb +2 -0
- data/vendor/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +207 -0
- data/vendor/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +379 -0
- data/vendor/actionwebservice/lib/action_web_service/invocation.rb +202 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol.rb +4 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol/abstract.rb +112 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol/discovery.rb +37 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +176 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +242 -0
- data/vendor/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +122 -0
- data/vendor/actionwebservice/lib/action_web_service/scaffolding.rb +281 -0
- data/vendor/actionwebservice/lib/action_web_service/struct.rb +64 -0
- data/vendor/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +26 -0
- data/vendor/actionwebservice/lib/action_web_service/support/signature_types.rb +226 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/layout.html.erb +65 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/methods.html.erb +6 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.html.erb +29 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/result.html.erb +30 -0
- data/vendor/actionwebservice/lib/action_web_service/test_invoke.rb +110 -0
- data/vendor/actionwebservice/lib/action_web_service/version.rb +9 -0
- data/vendor/actionwebservice/lib/actionwebservice.rb +1 -0
- data/vendor/actionwebservice/setup.rb +1379 -0
- data/vendor/actionwebservice/test/abstract_client.rb +183 -0
- data/vendor/actionwebservice/test/abstract_dispatcher.rb +547 -0
- data/vendor/actionwebservice/test/abstract_unit.rb +33 -0
- data/vendor/actionwebservice/test/api_test.rb +102 -0
- data/vendor/actionwebservice/test/apis/auto_load_api.rb +3 -0
- data/vendor/actionwebservice/test/apis/broken_auto_load_api.rb +2 -0
- data/vendor/actionwebservice/test/base_test.rb +42 -0
- data/vendor/actionwebservice/test/casting_test.rb +86 -0
- data/vendor/actionwebservice/test/client_soap_test.rb +155 -0
- data/vendor/actionwebservice/test/client_xmlrpc_test.rb +153 -0
- data/vendor/actionwebservice/test/container_test.rb +73 -0
- data/vendor/actionwebservice/test/dispatcher_action_controller_soap_test.rb +137 -0
- data/vendor/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +59 -0
- data/vendor/actionwebservice/test/fixtures/db_definitions/mysql.sql +8 -0
- data/vendor/actionwebservice/test/fixtures/users.yml +12 -0
- data/vendor/actionwebservice/test/gencov +3 -0
- data/vendor/actionwebservice/test/invocation_test.rb +185 -0
- data/vendor/actionwebservice/test/run +6 -0
- data/vendor/actionwebservice/test/scaffolded_controller_test.rb +146 -0
- data/vendor/actionwebservice/test/struct_test.rb +52 -0
- data/vendor/actionwebservice/test/test_invoke_test.rb +112 -0
- data/vendor/gems/calendar_date_select-1.15/.specification +56 -0
- data/vendor/gems/calendar_date_select-1.15/History.txt +237 -0
- data/vendor/gems/calendar_date_select-1.15/MIT-LICENSE +20 -0
- data/vendor/gems/calendar_date_select-1.15/Manifest.txt +42 -0
- data/vendor/gems/calendar_date_select-1.15/Rakefile +31 -0
- data/vendor/gems/calendar_date_select-1.15/Readme.txt +16 -0
- data/vendor/gems/calendar_date_select-1.15/init.rb +1 -0
- data/vendor/gems/calendar_date_select-1.15/js_test/functional/cds_test.html +334 -0
- data/vendor/gems/calendar_date_select-1.15/js_test/prototype.js +4184 -0
- data/vendor/gems/calendar_date_select-1.15/js_test/test.css +40 -0
- data/vendor/gems/calendar_date_select-1.15/js_test/unit/cds_helper_methods.html +46 -0
- data/vendor/gems/calendar_date_select-1.15/js_test/unittest.js +564 -0
- data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select.rb +33 -0
- data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/calendar_date_select.rb +116 -0
- data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/form_helpers.rb +225 -0
- data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/includes_helper.rb +29 -0
- data/vendor/gems/calendar_date_select-1.15/public/blank_iframe.html +2 -0
- data/vendor/gems/calendar_date_select-1.15/public/images/calendar_date_select/calendar.gif +0 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/calendar_date_select.js +443 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_american.js +34 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_db.js +27 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_finnish.js +32 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_iso_date.js +46 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_italian.js +24 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/de.js +11 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/fr.js +10 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/pl.js +10 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/pt.js +11 -0
- data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/ru.js +10 -0
- data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/default.css +135 -0
- data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/red.css +135 -0
- data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/vendor/gems/calendar_date_select-1.15/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
- data/vendor/gems/calendar_date_select-1.15/spec/calendar_date_select/form_helpers_spec.rb +166 -0
- data/vendor/gems/calendar_date_select-1.15/spec/spec_helper.rb +26 -0
- data/vendor/gems/coderay-0.8.260/.specification +2 -1
- data/vendor/gems/htmlentities-4.0.0/.specification +68 -0
- data/vendor/gems/htmlentities-4.0.0/COPYING.txt +21 -0
- data/vendor/gems/htmlentities-4.0.0/History.txt +47 -0
- data/vendor/gems/htmlentities-4.0.0/README.txt +44 -0
- data/vendor/gems/htmlentities-4.0.0/lib/htmlentities.rb +165 -0
- data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/html4.rb +257 -0
- data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/legacy.rb +27 -0
- data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/string.rb +26 -0
- data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/xhtml1.rb +258 -0
- data/vendor/gems/htmlentities-4.0.0/test/entities_test.rb +206 -0
- data/vendor/gems/htmlentities-4.0.0/test/html4_test.rb +24 -0
- data/vendor/gems/htmlentities-4.0.0/test/legacy_test.rb +34 -0
- data/vendor/gems/htmlentities-4.0.0/test/roundtrip_test.rb +94 -0
- data/vendor/gems/htmlentities-4.0.0/test/string_test.rb +24 -0
- data/vendor/gems/htmlentities-4.0.0/test/test_all.rb +3 -0
- data/vendor/gems/htmlentities-4.0.0/test/xhtml1_test.rb +23 -0
- data/vendor/gems/json-1.1.3/.require_paths +4 -0
- data/vendor/gems/json-1.1.3/.specification +58 -0
- data/vendor/gems/json-1.1.3/CHANGES +93 -0
- data/vendor/gems/json-1.1.3/GPL +340 -0
- data/vendor/gems/json-1.1.3/README +78 -0
- data/vendor/gems/json-1.1.3/RUBY +58 -0
- data/vendor/gems/json-1.1.3/Rakefile +309 -0
- data/vendor/gems/json-1.1.3/TODO +1 -0
- data/vendor/gems/json-1.1.3/VERSION +1 -0
- data/vendor/gems/json-1.1.3/benchmarks/benchmark.txt +133 -0
- data/vendor/gems/json-1.1.3/benchmarks/benchmark_generator.rb +48 -0
- data/vendor/gems/json-1.1.3/benchmarks/benchmark_parser.rb +26 -0
- data/vendor/gems/json-1.1.3/benchmarks/benchmark_rails.rb +26 -0
- data/vendor/gems/json-1.1.3/bin/edit_json.rb +10 -0
- data/vendor/gems/json-1.1.3/bin/prettify_json.rb +76 -0
- data/vendor/gems/json-1.1.3/data/example.json +1 -0
- data/vendor/gems/json-1.1.3/data/index.html +38 -0
- data/vendor/gems/json-1.1.3/data/prototype.js +4184 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator.bundle +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/Makefile +149 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/extconf.rb +9 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.c +875 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.o +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.c +182 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.h +53 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.o +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser.bundle +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/Makefile +149 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/extconf.rb +9 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.c +1758 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.o +0 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.rl +638 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.c +154 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.h +58 -0
- data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.o +0 -0
- data/vendor/gems/json-1.1.3/install.rb +26 -0
- data/vendor/gems/json-1.1.3/lib/json.rb +235 -0
- data/vendor/gems/json-1.1.3/lib/json/Array.xpm +21 -0
- data/vendor/gems/json-1.1.3/lib/json/FalseClass.xpm +21 -0
- data/vendor/gems/json-1.1.3/lib/json/Hash.xpm +21 -0
- data/vendor/gems/json-1.1.3/lib/json/Key.xpm +73 -0
- data/vendor/gems/json-1.1.3/lib/json/NilClass.xpm +21 -0
- data/vendor/gems/json-1.1.3/lib/json/Numeric.xpm +28 -0
- data/vendor/gems/json-1.1.3/lib/json/String.xpm +96 -0
- data/vendor/gems/json-1.1.3/lib/json/TrueClass.xpm +21 -0
- data/vendor/gems/json-1.1.3/lib/json/add/core.rb +135 -0
- data/vendor/gems/json-1.1.3/lib/json/add/rails.rb +58 -0
- data/vendor/gems/json-1.1.3/lib/json/common.rb +354 -0
- data/vendor/gems/json-1.1.3/lib/json/editor.rb +1362 -0
- data/vendor/gems/json-1.1.3/lib/json/ext.rb +13 -0
- data/vendor/gems/json-1.1.3/lib/json/json.xpm +1499 -0
- data/vendor/gems/json-1.1.3/lib/json/pure.rb +75 -0
- data/vendor/gems/json-1.1.3/lib/json/pure/generator.rb +394 -0
- data/vendor/gems/json-1.1.3/lib/json/pure/parser.rb +259 -0
- data/vendor/gems/json-1.1.3/lib/json/version.rb +9 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail1.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail10.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail11.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail12.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail13.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail14.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail18.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail19.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail2.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail20.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail21.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail22.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail23.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail24.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail25.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail27.json +2 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail28.json +2 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail3.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail4.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail5.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail6.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail7.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail8.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/fail9.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass1.json +56 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass15.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass16.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass17.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass2.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass26.json +1 -0
- data/vendor/gems/json-1.1.3/tests/fixtures/pass3.json +6 -0
- data/vendor/gems/json-1.1.3/tests/runner.rb +25 -0
- data/vendor/gems/json-1.1.3/tests/test_json.rb +293 -0
- data/vendor/gems/json-1.1.3/tests/test_json_addition.rb +161 -0
- data/vendor/gems/json-1.1.3/tests/test_json_fixtures.rb +30 -0
- data/vendor/gems/json-1.1.3/tests/test_json_generate.rb +100 -0
- data/vendor/gems/json-1.1.3/tests/test_json_rails.rb +118 -0
- data/vendor/gems/json-1.1.3/tests/test_json_unicode.rb +61 -0
- data/vendor/gems/json-1.1.3/tools/fuzz.rb +140 -0
- data/vendor/gems/json-1.1.3/tools/server.rb +62 -0
- data/vendor/plugins/localization/bin/make_language.rb +2 -2
- data/vendor/plugins/localization/lib/localization.rb +2 -2
- data/vendor/plugins/will_paginate/CHANGELOG.rdoc +110 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +107 -0
- data/vendor/plugins/will_paginate/Rakefile +62 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +82 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +32 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +260 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +383 -0
- data/vendor/plugins/will_paginate/test/boot.rb +21 -0
- data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
- data/vendor/plugins/will_paginate/test/console +8 -0
- data/vendor/plugins/will_paginate/test/database.yml +22 -0
- data/vendor/plugins/will_paginate/test/finder_test.rb +476 -0
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
- data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +13 -0
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
- data/vendor/plugins/will_paginate/test/fixtures/projects.yml +6 -0
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
- data/vendor/plugins/will_paginate/test/fixtures/reply.rb +7 -0
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
- data/vendor/plugins/will_paginate/test/fixtures/topics.yml +30 -0
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
- data/vendor/plugins/will_paginate/test/fixtures/users.yml +35 -0
- data/vendor/plugins/will_paginate/test/helper.rb +37 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +36 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +73 -0
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
- data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +165 -0
- data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
- data/vendor/plugins/will_paginate/test/view_test.rb +363 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +22 -0
- data/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb +1 -1
- metadata +349 -16
- data/migrate.txt +0 -142
@@ -0,0 +1,20 @@
|
|
1
|
+
All portions Copyright (c) 2007 Tim Harper
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
History.txt
|
2
|
+
init.rb
|
3
|
+
js_test/functional/cds_test.html
|
4
|
+
js_test/prototype.js
|
5
|
+
js_test/test.css
|
6
|
+
js_test/unit/cds_helper_methods.html
|
7
|
+
js_test/unittest.js
|
8
|
+
lib/calendar_date_select/calendar_date_select.rb
|
9
|
+
lib/calendar_date_select/includes_helper.rb
|
10
|
+
lib/calendar_date_select/form_helpers.rb
|
11
|
+
lib/calendar_date_select.rb
|
12
|
+
Manifest.txt
|
13
|
+
MIT-LICENSE
|
14
|
+
public/blank_iframe.html
|
15
|
+
public/images/calendar_date_select/calendar.gif
|
16
|
+
public/javascripts/calendar_date_select/calendar_date_select.js
|
17
|
+
public/javascripts/calendar_date_select/format_american.js
|
18
|
+
public/javascripts/calendar_date_select/format_db.js
|
19
|
+
public/javascripts/calendar_date_select/format_euro_24hr.js
|
20
|
+
public/javascripts/calendar_date_select/format_euro_24hr_ymd.js
|
21
|
+
public/javascripts/calendar_date_select/format_finnish.js
|
22
|
+
public/javascripts/calendar_date_select/format_hyphen_ampm.js
|
23
|
+
public/javascripts/calendar_date_select/format_iso_date.js
|
24
|
+
public/javascripts/calendar_date_select/format_italian.js
|
25
|
+
public/javascripts/calendar_date_select/locale/de.js
|
26
|
+
public/javascripts/calendar_date_select/locale/fi.js
|
27
|
+
public/javascripts/calendar_date_select/locale/fr.js
|
28
|
+
public/javascripts/calendar_date_select/locale/pl.js
|
29
|
+
public/javascripts/calendar_date_select/locale/pt.js
|
30
|
+
public/javascripts/calendar_date_select/locale/ru.js
|
31
|
+
public/stylesheets/calendar_date_select/blue.css
|
32
|
+
public/stylesheets/calendar_date_select/default.css
|
33
|
+
public/stylesheets/calendar_date_select/plain.css
|
34
|
+
public/stylesheets/calendar_date_select/red.css
|
35
|
+
public/stylesheets/calendar_date_select/silver.css
|
36
|
+
Rakefile
|
37
|
+
Readme.txt
|
38
|
+
spec/
|
39
|
+
spec/calendar_date_select
|
40
|
+
spec/calendar_date_select/calendar_date_select_spec.rb
|
41
|
+
spec/calendar_date_select/form_helpers_spec.rb
|
42
|
+
spec/spec_helper.rb
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'hoe'
|
5
|
+
|
6
|
+
$: << File.dirname(__FILE__) + "/lib/"
|
7
|
+
require "activesupport"
|
8
|
+
require './lib/calendar_date_select.rb'
|
9
|
+
|
10
|
+
Hoe.new('calendar_date_select', CalendarDateSelect::VERSION) do |p|
|
11
|
+
p.rubyforge_name = 'cds'
|
12
|
+
p.developer('Tim Harper', 'tim c harper at gmail dot com')
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Set the current gem version in the code (VERSION=version)"
|
16
|
+
task :set_version do
|
17
|
+
["lib/calendar_date_select/calendar_date_select.rb", "public/javascripts/calendar_date_select/calendar_date_select.js"].each do |file|
|
18
|
+
abs_file = File.dirname(__FILE__) + "/" + file
|
19
|
+
src = File.read(abs_file);
|
20
|
+
src = src.map do |line|
|
21
|
+
case line
|
22
|
+
when /^ *VERSION/ then " VERSION = '#{ENV['VERSION']}'\n"
|
23
|
+
when /^\/\/ CalendarDateSelect version / then "// CalendarDateSelect version #{ENV['VERSION']} - a prototype based date picker\n"
|
24
|
+
else
|
25
|
+
line
|
26
|
+
end
|
27
|
+
end.join
|
28
|
+
File.open(abs_file, "wb") { |f| f << src }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
# vim: syntax=Ruby
|
@@ -0,0 +1,16 @@
|
|
1
|
+
= CalendarDateSelect
|
2
|
+
|
3
|
+
http://code.google.com/p/calendardateselect/
|
4
|
+
|
5
|
+
== Examples
|
6
|
+
|
7
|
+
"See a demo here":http://electronicholas.com/calendar
|
8
|
+
|
9
|
+
== Submitting patches
|
10
|
+
|
11
|
+
Please take care to do the following:
|
12
|
+
|
13
|
+
* Clean up your patch (don't send a patch bomb with a hundred features in one)
|
14
|
+
* Write test cases!
|
15
|
+
* As a general rule of thumb, think of ways to make things more general purpose than specific.
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/lib/calendar_date_select.rb"
|
@@ -0,0 +1,334 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>Calendar Date Select Test Cases</title>
|
7
|
+
<script src="../prototype.js" type="text/javascript"></script>
|
8
|
+
<script src="../unittest.js" type="text/javascript"></script>
|
9
|
+
<!-- other JavaScript includes -->
|
10
|
+
<script src="../../public/javascripts/calendar_date_select/calendar_date_select.js" type="text/javascript"></script>
|
11
|
+
|
12
|
+
<link rel="stylesheet" href="../../public/stylesheets/calendar_date_select/red.css" type="text/css" />
|
13
|
+
<link rel="stylesheet" href="../test.css" type="text/css" />
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
|
17
|
+
<!-- Log output -->
|
18
|
+
<div id="testlog"> </div>
|
19
|
+
|
20
|
+
<!-- here go any elements you do the testing on -->
|
21
|
+
<div id="cds_test_div">
|
22
|
+
<input type="text" id="cds_test" />
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<!-- Tests -->
|
26
|
+
<script type="text/javascript" language="javascript">
|
27
|
+
// <![CDATA[
|
28
|
+
new Test.Unit.Runner({
|
29
|
+
setup: function() { with(this){
|
30
|
+
$("cds_test").value="";
|
31
|
+
$("cds_test").disabled = false;
|
32
|
+
$("cds_test").readOnly = false;
|
33
|
+
}},
|
34
|
+
teardown: function() { with(this){
|
35
|
+
if (typeof(cds)!="undefined") assert(cds.closed,"all tests should close their calendar control");
|
36
|
+
Date.first_day_of_week = 0;
|
37
|
+
Date.weekdays = $w("S M T W T F S")
|
38
|
+
}},
|
39
|
+
testMixedTime_feedDateWithAndWithoutTime_shouldSetAccordingly: function() { with(this) {
|
40
|
+
$A(["January 2, 2007 5:00 pm", "January 2, 2007 0:00 pm"]).each(function(d) {
|
41
|
+
$("cds_test").value=d;
|
42
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
43
|
+
assertEqual(true, cds.use_time);
|
44
|
+
cds.close();
|
45
|
+
})
|
46
|
+
|
47
|
+
$("cds_test").value="January 2, 2007";
|
48
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
49
|
+
assertEqual(false, cds.use_time);
|
50
|
+
cds.close();
|
51
|
+
}},
|
52
|
+
testTodayNowButton_mixedMode_shouldSetUseTimeAccordingly: function() { with(this){
|
53
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
54
|
+
today_now = $$(".cds_buttons a[href=#]");
|
55
|
+
today_now[0].onclick();
|
56
|
+
assertEqual(false, cds.use_time, "when clicking today link");
|
57
|
+
|
58
|
+
today_now[1].onclick();
|
59
|
+
assertEqual(true, cds.use_time, "should have been true when clicking now link");
|
60
|
+
cds.close();
|
61
|
+
}},
|
62
|
+
test__selectMar_23_2008__shouldSelectCorrectDate: function() { with(this){
|
63
|
+
$("cds_test").value = "Mar 1, 2008"
|
64
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "true"});
|
65
|
+
cds.updateSelectedDate({month: 2 /*+1*/, day: 23, year: 2008})
|
66
|
+
|
67
|
+
assertEqual("23", $$('td.selected div').first().innerHTML);
|
68
|
+
cds.close();
|
69
|
+
}},
|
70
|
+
test_updateSelectedDate: function() { with(this){
|
71
|
+
$("cds_test").value = "January 1, 2007"
|
72
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
73
|
+
|
74
|
+
cds.use_time=true;
|
75
|
+
cds.updateSelectedDate({hour: ""})
|
76
|
+
assertEqual(false, cds.use_time, "when setting hour to ''");
|
77
|
+
|
78
|
+
cds.use_time=true;
|
79
|
+
cds.updateSelectedDate({minute: ""})
|
80
|
+
assertEqual(false, cds.use_time, "when setting minute to ''");
|
81
|
+
|
82
|
+
cds.use_time=false;
|
83
|
+
cds.updateSelectedDate({hour: 0})
|
84
|
+
assertEqual(true, cds.use_time, "when setting hour to 0");
|
85
|
+
|
86
|
+
cds.use_time=false;
|
87
|
+
cds.updateSelectedDate({minute: 0})
|
88
|
+
assertEqual(true, cds.use_time, "when setting minute to 0");
|
89
|
+
|
90
|
+
cds.close();
|
91
|
+
}},
|
92
|
+
test_navYear: function() { with(this){
|
93
|
+
$("cds_test").value = "January 1, 2007";
|
94
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
95
|
+
cds.navYear(1870);
|
96
|
+
assertEqual(2007, cds.selected_date.getFullYear());
|
97
|
+
assertEqual(1870, cds.date.getFullYear());
|
98
|
+
cds.close();
|
99
|
+
}},
|
100
|
+
test_navMonth: function() { with(this){
|
101
|
+
$("cds_test").value = "January 1, 2007";
|
102
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed"});
|
103
|
+
cds.navMonth(5);
|
104
|
+
assertEqual(0, cds.selected_date.getMonth());
|
105
|
+
assertEqual(5, cds.date.getMonth())
|
106
|
+
cds.close();
|
107
|
+
}},
|
108
|
+
test_callBacks: function() { with(this){
|
109
|
+
$("cds_test").up().build("div", {id: "global"});
|
110
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed",
|
111
|
+
before_show: function() { $("global").before_show_called = true},
|
112
|
+
after_show: function() { $("global").after_show_called = true},
|
113
|
+
before_close: function() { $("global").before_close_called = true},
|
114
|
+
after_close: function() { $("global").after_close_called = true},
|
115
|
+
after_navigate: function() { $("global").after_navigate_called = true},
|
116
|
+
onchange: function() { $("global").onchange_called = true},
|
117
|
+
});
|
118
|
+
cds.navMonth(1);
|
119
|
+
cds.navMonth(10);
|
120
|
+
cds.updateSelectedDate({month: 1, day: 3, year: 2007});
|
121
|
+
cds.close();
|
122
|
+
assert($('global').before_show_called, "before_show wasnt called");
|
123
|
+
assert($('global').after_show_called, "after_show wasnt called");
|
124
|
+
assert($('global').before_close_called, "before_close wasnt called");
|
125
|
+
assert($('global').after_close_called, "after_close wasnt called");
|
126
|
+
assert($('global').after_navigate_called, "after_navigate wasnt called");
|
127
|
+
assert($('global').onchange_called, "onchange wasnt called");
|
128
|
+
$("global").remove();
|
129
|
+
}},
|
130
|
+
test_disabledElement_cantUpdate: function() {with(this){
|
131
|
+
$("cds_test").value = "May 10, 2007";
|
132
|
+
$("cds_test").disabled = true;
|
133
|
+
cds = new CalendarDateSelect($("cds_test"));
|
134
|
+
|
135
|
+
runTest = function() {
|
136
|
+
cds.updateSelectedDate({day: 1, month:0, year: 2007});
|
137
|
+
assertEqual(10, cds.selected_date.getDate())
|
138
|
+
}
|
139
|
+
runTest();
|
140
|
+
$("cds_test").disabled = false;
|
141
|
+
$("cds_test").readOnly = true;
|
142
|
+
runTest();
|
143
|
+
|
144
|
+
$("cds_test").readOnly = false;
|
145
|
+
cds.close();
|
146
|
+
}},
|
147
|
+
test_readOnlyElement_forcePopup_shouldUpdate: function() {with(this){
|
148
|
+
$("cds_test").value = "May 10, 2007";
|
149
|
+
$("cds_test").readOnly = true;
|
150
|
+
cds = new CalendarDateSelect($("cds_test"), {popup: "force"});
|
151
|
+
|
152
|
+
cds.updateSelectedDate({day: 1, month:0, year: 2007});
|
153
|
+
assertEqual(1, cds.selected_date.getDate())
|
154
|
+
|
155
|
+
$("cds_test").readOnly = false;
|
156
|
+
cds.close();
|
157
|
+
}},
|
158
|
+
test_timePassed_notUsingTime_shouldIgnore: function() {with(this) {
|
159
|
+
$("cds_test").value = "May 10, 2007 5:00 pm";
|
160
|
+
cds = new CalendarDateSelect($("cds_test"), {time:false});
|
161
|
+
assert(cds.closeOnClick(), "should set close_on_click to true when not using time")
|
162
|
+
assertEqual(false, cds.use_time, "When parsing time");
|
163
|
+
cds.today();
|
164
|
+
assert(cds.closed, "should close when clicking today");
|
165
|
+
assert(!cds.use_time, "Should not use time when calling today");
|
166
|
+
|
167
|
+
cds = new CalendarDateSelect($("cds_test"), {time:false});
|
168
|
+
cds.updateSelectedDate({hours: 5, minutes:30}) // this will close the control
|
169
|
+
assertEqual(false, cds.use_time, "When setting hour/minute");
|
170
|
+
assert(cds.closed);
|
171
|
+
}},
|
172
|
+
test_setUseTime_true_notUsingTime_shouldIgnore: function() {with(this) {
|
173
|
+
$("cds_test").value = "May 10, 2007 5:00 pm";
|
174
|
+
cds = new CalendarDateSelect($("cds_test"), {time:false});
|
175
|
+
assertEqual(false, cds.use_time, "When parsing time");
|
176
|
+
cds.setUseTime(true); // this will close the control
|
177
|
+
assert(! cds.use_time, "After calling setUseTime(true)");
|
178
|
+
cds.close();
|
179
|
+
}},
|
180
|
+
test_setMinute_notOnInterval_usesFloor: function() {with(this){
|
181
|
+
$("cds_test").value = "May 10, 2007 5:25 pm";
|
182
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true});
|
183
|
+
cds.updateSelectedDate({hour: 1, minute: 4});
|
184
|
+
assertEqual(0, cds.selected_date.getMinutes());
|
185
|
+
assertEqual(1, cds.selected_date.getHours());
|
186
|
+
|
187
|
+
cds.close();
|
188
|
+
}},
|
189
|
+
// this checks for a safari 2 bug where safari parses "" as a date back in 1969
|
190
|
+
test_parseDate_blankInput_interpretsAsNotSelected: function() {with(this){
|
191
|
+
$("cds_test").value = " ";
|
192
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true});
|
193
|
+
assertEqual(new Date().getFullYear(), cds.selected_date.getFullYear());
|
194
|
+
assertEqual(new Date().getFullYear(), cds.date.getFullYear());
|
195
|
+
assert(! cds.selection_made)
|
196
|
+
cds.close();
|
197
|
+
}},
|
198
|
+
test_parseDate_timeTrue_noTimePassed_useTimeSetToTrueAnyway: function() {with(this){
|
199
|
+
$("cds_test").value = "December 1, 2007 ";
|
200
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true});
|
201
|
+
assert(cds.use_time)
|
202
|
+
cds.close();
|
203
|
+
}},
|
204
|
+
test_passDivElement__shouldUseChildInputForTargetElement: function() {with(this){
|
205
|
+
cds = new CalendarDateSelect($("cds_test_div"), {time:true});
|
206
|
+
assertEqual("INPUT", cds.target_element.nodeName)
|
207
|
+
cds.close();
|
208
|
+
}},
|
209
|
+
test__flexibleYearRange__datePassedWayBackWhen__shouldInitYearSelectAroundDate: function() {with(this){
|
210
|
+
$("cds_test").value = "July 4, 1776";
|
211
|
+
cds = new CalendarDateSelect($("cds_test_div"), {time:true});
|
212
|
+
assert(cds.flexibleYearRange(), " should have had a flexibleYearRange");
|
213
|
+
assert(cds.year_select.setValue(1776), "Should have allowed me to select 1776");
|
214
|
+
cds.close();
|
215
|
+
}},
|
216
|
+
test__nonflexibleYearRange__dateRangeAtEnds__shouldntAllowNavigationPassedBoundary: function() {with(this){
|
217
|
+
$("cds_test").value = "January 1, 2007";
|
218
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true, year_range: [2007, 2007]});
|
219
|
+
|
220
|
+
assert(! cds.navYear(2006), "should not allow year navigation outside of boundary");
|
221
|
+
assert(! cds.navYear(2008), "should not allow year navigation outside of boundary");
|
222
|
+
assert(! cds.navMonth(-1), "shouldnt allow me to go beyond boundary");
|
223
|
+
assert(! cds.navMonth(13), "shouldnt allow me to go beyond boundary");
|
224
|
+
assert(cds.navMonth(1), "should allow me to be in boundary");
|
225
|
+
assert(cds.navYear(2007), "should allow me to be in boundary");
|
226
|
+
cds.close();
|
227
|
+
}},
|
228
|
+
test__nonflexibleYearRange__shouldPopulateRange: function() {with(this){
|
229
|
+
$("cds_test").value = "January 1, 2007";
|
230
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true, year_range: [2007, 2007]});
|
231
|
+
assert(cds.year_select.setValue(2007), "should allow me to select 2007");
|
232
|
+
cds.close();
|
233
|
+
}},
|
234
|
+
test__nonflexibleYearRange__initializedWithDateOutsideOfRange__shouldShowNavDateAsClosestToOutsideYear: function() {with(this){
|
235
|
+
$("cds_test").value = "January 1, 1900";
|
236
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true, year_range: [1997, 2007]});
|
237
|
+
assertEqual(1997, cds.date.getFullYear(), "When going lesser than year_range");
|
238
|
+
cds.close();
|
239
|
+
|
240
|
+
$("cds_test").value = "January 1, 2010";
|
241
|
+
cds = new CalendarDateSelect($("cds_test"), {time:true, year_range: [1997, 2007]});
|
242
|
+
assertEqual(2007, cds.date.getFullYear(), "When going greater than year_range");
|
243
|
+
|
244
|
+
cds.close();
|
245
|
+
}},
|
246
|
+
test__nonflexibleYearRange__initializedWithDateInsideOfRange__shouldShowNavDateAsYear: function() {with(this){
|
247
|
+
$("cds_test").value = "January 1, 2005";
|
248
|
+
cds = new CalendarDateSelect($("cds_test"), {year_range: [1997, 2007]});
|
249
|
+
assertEqual(2005, cds.date.getFullYear(), "When going lesser than year_range");
|
250
|
+
cds.close();
|
251
|
+
}},
|
252
|
+
test__flexibleYearRange__goToBoundary__shouldRefreshRange: function() {with(this){
|
253
|
+
$("cds_test").value = "January 1, 2007";
|
254
|
+
cds = new CalendarDateSelect($("cds_test"), {year_range: 10});
|
255
|
+
cds.navYear(1997);
|
256
|
+
assert(cds.year_select.setValue(1987), "should have refreshed with 1997 as the center");
|
257
|
+
cds.navYear(2017);
|
258
|
+
assert(cds.year_select.setValue(2027), "should have refreshed with 2027 as the center");
|
259
|
+
cds.close();
|
260
|
+
}},
|
261
|
+
test__should_show_iframe_only_in_ie: function() {with(this){
|
262
|
+
cds = new CalendarDateSelect($("cds_test"));
|
263
|
+
|
264
|
+
if (navigator.appName=="Microsoft Internet Explorer")
|
265
|
+
assertEqual(1, $$('iframe.ie6_blocker').length)
|
266
|
+
else
|
267
|
+
assertEqual(0, $$('iframe.ie6_blocker').length)
|
268
|
+
|
269
|
+
cds.close();
|
270
|
+
}},
|
271
|
+
test__should_populate_minute_box_according_to_minute_interval: function() {with(this){
|
272
|
+
cds = new CalendarDateSelect($("cds_test"), {time: true, minute_interval: 10});
|
273
|
+
assert(cds.minute_select.setValue(0), "should allow me to select 0 minutes" );
|
274
|
+
assert(!cds.minute_select.setValue(5), "should NOT allow me to select 5 minutes");
|
275
|
+
assert(cds.minute_select.setValue(10), "should allow me to select 10 minutes" );
|
276
|
+
cds.close();
|
277
|
+
}},
|
278
|
+
test__shouldnt_leak_variables: function() {with (this) {
|
279
|
+
var vars = $w("padded2 compare_date str minute hour value e above e_dim e_top e_left matched e_bottom e_height c_pos c_left c_top c_height left_px top_px top_div header_div body_div buttons_div footer_div bottom_div days_tbody row_number cell_index weekday that pre_days use_time m y hover_date x d o")
|
280
|
+
vars.each(function(v) {eval(v + " = -100");});
|
281
|
+
|
282
|
+
cds = new CalendarDateSelect($("cds_test"), {time: true});
|
283
|
+
cds.navMonth(1);
|
284
|
+
cds.navYear(2);
|
285
|
+
cds.dayHover($$('.cds_body td').first());
|
286
|
+
cds.updateSelectedDate({day:1, month:1, year:2007});
|
287
|
+
cds.close();
|
288
|
+
|
289
|
+
vars.each(function(v) {
|
290
|
+
assert(-100 == eval(v), "Variable " + v + " was leaked");
|
291
|
+
});
|
292
|
+
}},
|
293
|
+
test__valid_date__shouldnt_allow_selection_of_invalid_dates_and_should_apply_css: function() {with (this) {
|
294
|
+
$('cds_test').value = "December 11, 2007";
|
295
|
+
cds = new CalendarDateSelect($("cds_test"), {valid_date_check: function(date) { return date < new Date("December 13, 2007")}, time: "mixed"});
|
296
|
+
assertEqual("December 11, 2007", $F('cds_test'));
|
297
|
+
cds.updateSelectedDate({day:13, month:12-1, year:2007});
|
298
|
+
assertEqual("December 11, 2007", $F('cds_test'), "Date should not have been allowed to be selected");
|
299
|
+
cds.updateSelectedDate({day:10, month:12-1, year:2007});
|
300
|
+
assertEqual("December 10, 2007", $F('cds_test'), "Date should not have been allowed to be selected");
|
301
|
+
|
302
|
+
day_12_element = $$('.calendar_date_select td')[17];
|
303
|
+
day_13_element = $$('.calendar_date_select td')[18];
|
304
|
+
assertEqual(12, day_12_element.day); // make sure we have th right one
|
305
|
+
assertEqual(13, day_13_element.day); // make sure we have th right one
|
306
|
+
assert( ! day_12_element.hasClassName("disabled"), "Day 12 shouldnt be disabled");
|
307
|
+
assert(day_13_element.hasClassName("disabled"), "Day 13 should be disabled");
|
308
|
+
|
309
|
+
cds.close();
|
310
|
+
}},
|
311
|
+
test__valid_date_check_is_nil__should_show_all_cells_as_enabled: function() {with (this) {
|
312
|
+
$('cds_test').value = "December 11, 2007";
|
313
|
+
cds = new CalendarDateSelect($("cds_test"));
|
314
|
+
|
315
|
+
$$('.calendar_date_select td').each(function(e){
|
316
|
+
assert( ! e.hasClassName("disabled"));
|
317
|
+
});
|
318
|
+
|
319
|
+
cds.close();
|
320
|
+
}},
|
321
|
+
test__should_pull_up_dec_07_when_first_day_of_week_is_1: function() {with (this) {
|
322
|
+
Date.first_day_of_week = 1;
|
323
|
+
Date.weekdays = $w("M T W T F S S");
|
324
|
+
$('cds_test').value = "December 1, 2007";
|
325
|
+
cds = new CalendarDateSelect($("cds_test"));
|
326
|
+
|
327
|
+
assertEqual(1, $$(".calendar_date_select").length);
|
328
|
+
cds.close();
|
329
|
+
}}
|
330
|
+
});
|
331
|
+
// ]]>
|
332
|
+
</script>
|
333
|
+
</body>
|
334
|
+
</html>
|