spade 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +14 -0
- data/.gitmodules +15 -0
- data/.rspec +1 -0
- data/Buildfile +18 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +34 -0
- data/README.md +148 -0
- data/Rakefile +9 -0
- data/bin/spade +7 -0
- data/examples/format-app/lib/hello.coffee +1 -0
- data/examples/format-app/lib/main.js +6 -0
- data/examples/format-app/package.json +10 -0
- data/examples/format-app/resources/README.txt +1 -0
- data/examples/format-app/resources/config.json +3 -0
- data/examples/path-test/lib/hello.js +1 -0
- data/examples/path-test/lib/main.js +1 -0
- data/examples/path-test/package.json +5 -0
- data/examples/sc-app/index.html +13 -0
- data/examples/sc-app/lib/main.js +24 -0
- data/examples/sc-app/package.json +8 -0
- data/examples/single-file.js +22 -0
- data/examples/todos/index.html +11 -0
- data/examples/todos/lib/main.js +10 -0
- data/examples/todos/lib/todos.js +93 -0
- data/examples/todos/package.json +10 -0
- data/examples/todos/resources/stylesheets/todos.css +162 -0
- data/examples/todos/resources/templates/todos.handlebars +31 -0
- data/examples/web-app/README.md +83 -0
- data/examples/web-app/index.html +12 -0
- data/examples/web-app/lib/main.js +3 -0
- data/examples/web-app/package.json +6 -0
- data/examples/web-app/tests.html +12 -0
- data/examples/web-app/tests/ct-example-test.js +39 -0
- data/examples/web-app/tests/qunit-test.js +23 -0
- data/lib/index.js +14 -0
- data/lib/node/loader.js +145 -0
- data/lib/node/sandbox.js +34 -0
- data/lib/spade.js +1099 -0
- data/lib/spade.rb +52 -0
- data/lib/spade/bundle.rb +156 -0
- data/lib/spade/cli.rb +14 -0
- data/lib/spade/cli/base.rb +325 -0
- data/lib/spade/cli/owner.rb +45 -0
- data/lib/spade/compiler.rb +34 -0
- data/lib/spade/console.rb +39 -0
- data/lib/spade/context.rb +116 -0
- data/lib/spade/credentials.rb +36 -0
- data/lib/spade/environment.rb +35 -0
- data/lib/spade/exports.rb +71 -0
- data/lib/spade/loader.rb +243 -0
- data/lib/spade/local.rb +53 -0
- data/lib/spade/package.rb +143 -0
- data/lib/spade/reactor.rb +159 -0
- data/lib/spade/remote.rb +75 -0
- data/lib/spade/repository.rb +18 -0
- data/lib/spade/server.rb +54 -0
- data/lib/spade/shell.rb +36 -0
- data/lib/spade/version.rb +3 -0
- data/package.json +27 -0
- data/packages/coffee-script/.gitignore +8 -0
- data/packages/coffee-script/.npmignore +11 -0
- data/packages/coffee-script/Cakefile +229 -0
- data/packages/coffee-script/LICENSE +22 -0
- data/packages/coffee-script/README +47 -0
- data/packages/coffee-script/Rakefile +78 -0
- data/packages/coffee-script/bin/cake +7 -0
- data/packages/coffee-script/bin/coffee +7 -0
- data/packages/coffee-script/documentation/coffee/aliases.coffee +11 -0
- data/packages/coffee-script/documentation/coffee/array_comprehensions.coffee +2 -0
- data/packages/coffee-script/documentation/coffee/block_comment.coffee +6 -0
- data/packages/coffee-script/documentation/coffee/cake_tasks.coffee +9 -0
- data/packages/coffee-script/documentation/coffee/classes.coffee +25 -0
- data/packages/coffee-script/documentation/coffee/comparisons.coffee +5 -0
- data/packages/coffee-script/documentation/coffee/conditionals.coffee +13 -0
- data/packages/coffee-script/documentation/coffee/default_args.coffee +8 -0
- data/packages/coffee-script/documentation/coffee/do.coffee +4 -0
- data/packages/coffee-script/documentation/coffee/embedded.coffee +5 -0
- data/packages/coffee-script/documentation/coffee/existence.coffee +10 -0
- data/packages/coffee-script/documentation/coffee/expressions.coffee +9 -0
- data/packages/coffee-script/documentation/coffee/expressions_assignment.coffee +3 -0
- data/packages/coffee-script/documentation/coffee/expressions_comprehension.coffee +3 -0
- data/packages/coffee-script/documentation/coffee/expressions_try.coffee +7 -0
- data/packages/coffee-script/documentation/coffee/fat_arrow.coffee +6 -0
- data/packages/coffee-script/documentation/coffee/functions.coffee +2 -0
- data/packages/coffee-script/documentation/coffee/heredocs.coffee +7 -0
- data/packages/coffee-script/documentation/coffee/heregexes.coffee +11 -0
- data/packages/coffee-script/documentation/coffee/interpolation.coffee +6 -0
- data/packages/coffee-script/documentation/coffee/multiple_return_values.coffee +7 -0
- data/packages/coffee-script/documentation/coffee/object_comprehensions.coffee +4 -0
- data/packages/coffee-script/documentation/coffee/object_extraction.coffee +13 -0
- data/packages/coffee-script/documentation/coffee/objects_and_arrays.coffee +19 -0
- data/packages/coffee-script/documentation/coffee/objects_reserved.coffee +5 -0
- data/packages/coffee-script/documentation/coffee/overview.coffee +28 -0
- data/packages/coffee-script/documentation/coffee/parallel_assignment.coffee +6 -0
- data/packages/coffee-script/documentation/coffee/patterns_and_splats.coffee +7 -0
- data/packages/coffee-script/documentation/coffee/prototypes.coffee +3 -0
- data/packages/coffee-script/documentation/coffee/range_comprehensions.coffee +2 -0
- data/packages/coffee-script/documentation/coffee/scope.coffee +5 -0
- data/packages/coffee-script/documentation/coffee/slices.coffee +7 -0
- data/packages/coffee-script/documentation/coffee/soaks.coffee +1 -0
- data/packages/coffee-script/documentation/coffee/splats.coffee +27 -0
- data/packages/coffee-script/documentation/coffee/splices.coffee +5 -0
- data/packages/coffee-script/documentation/coffee/strings.coffee +8 -0
- data/packages/coffee-script/documentation/coffee/switch.coffee +10 -0
- data/packages/coffee-script/documentation/coffee/try.coffee +8 -0
- data/packages/coffee-script/documentation/coffee/while.coffee +10 -0
- data/packages/coffee-script/documentation/css/docs.css +374 -0
- data/packages/coffee-script/documentation/css/idle.css +64 -0
- data/packages/coffee-script/documentation/docs/browser.html +25 -0
- data/packages/coffee-script/documentation/docs/cake.html +43 -0
- data/packages/coffee-script/documentation/docs/coffee-script.html +51 -0
- data/packages/coffee-script/documentation/docs/command.html +161 -0
- data/packages/coffee-script/documentation/docs/docco.css +186 -0
- data/packages/coffee-script/documentation/docs/grammar.html +399 -0
- data/packages/coffee-script/documentation/docs/helpers.html +31 -0
- data/packages/coffee-script/documentation/docs/index.html +3 -0
- data/packages/coffee-script/documentation/docs/lexer.html +490 -0
- data/packages/coffee-script/documentation/docs/nodes.html +1338 -0
- data/packages/coffee-script/documentation/docs/optparse.html +78 -0
- data/packages/coffee-script/documentation/docs/repl.html +24 -0
- data/packages/coffee-script/documentation/docs/rewriter.html +251 -0
- data/packages/coffee-script/documentation/docs/scope.html +54 -0
- data/packages/coffee-script/documentation/docs/underscore.html +295 -0
- data/packages/coffee-script/documentation/images/background.png +0 -0
- data/packages/coffee-script/documentation/images/banding.png +0 -0
- data/packages/coffee-script/documentation/images/button_bg.png +0 -0
- data/packages/coffee-script/documentation/images/button_bg_dark.gif +0 -0
- data/packages/coffee-script/documentation/images/button_bg_green.gif +0 -0
- data/packages/coffee-script/documentation/images/favicon.ico +0 -0
- data/packages/coffee-script/documentation/images/logo.png +0 -0
- data/packages/coffee-script/documentation/images/screenshadow.png +0 -0
- data/packages/coffee-script/documentation/index.html.erb +1607 -0
- data/packages/coffee-script/documentation/js/aliases.js +17 -0
- data/packages/coffee-script/documentation/js/array_comprehensions.js +6 -0
- data/packages/coffee-script/documentation/js/block_comment.js +4 -0
- data/packages/coffee-script/documentation/js/cake_tasks.js +10 -0
- data/packages/coffee-script/documentation/js/classes.js +44 -0
- data/packages/coffee-script/documentation/js/comparisons.js +3 -0
- data/packages/coffee-script/documentation/js/conditionals.js +12 -0
- data/packages/coffee-script/documentation/js/default_args.js +7 -0
- data/packages/coffee-script/documentation/js/do.js +10 -0
- data/packages/coffee-script/documentation/js/embedded.js +4 -0
- data/packages/coffee-script/documentation/js/existence.js +6 -0
- data/packages/coffee-script/documentation/js/expressions.js +15 -0
- data/packages/coffee-script/documentation/js/expressions_assignment.js +2 -0
- data/packages/coffee-script/documentation/js/expressions_comprehension.js +9 -0
- data/packages/coffee-script/documentation/js/expressions_try.js +7 -0
- data/packages/coffee-script/documentation/js/fat_arrow.js +9 -0
- data/packages/coffee-script/documentation/js/functions.js +7 -0
- data/packages/coffee-script/documentation/js/heredocs.js +2 -0
- data/packages/coffee-script/documentation/js/heregexes.js +2 -0
- data/packages/coffee-script/documentation/js/interpolation.js +4 -0
- data/packages/coffee-script/documentation/js/multiple_return_values.js +5 -0
- data/packages/coffee-script/documentation/js/object_comprehensions.js +15 -0
- data/packages/coffee-script/documentation/js/object_extraction.js +10 -0
- data/packages/coffee-script/documentation/js/objects_and_arrays.js +17 -0
- data/packages/coffee-script/documentation/js/objects_reserved.js +4 -0
- data/packages/coffee-script/documentation/js/overview.js +35 -0
- data/packages/coffee-script/documentation/js/parallel_assignment.js +4 -0
- data/packages/coffee-script/documentation/js/patterns_and_splats.js +4 -0
- data/packages/coffee-script/documentation/js/prototypes.js +3 -0
- data/packages/coffee-script/documentation/js/range_comprehensions.js +9 -0
- data/packages/coffee-script/documentation/js/scope.js +8 -0
- data/packages/coffee-script/documentation/js/slices.js +4 -0
- data/packages/coffee-script/documentation/js/soaks.js +2 -0
- data/packages/coffee-script/documentation/js/splats.js +15 -0
- data/packages/coffee-script/documentation/js/splices.js +3 -0
- data/packages/coffee-script/documentation/js/strings.js +2 -0
- data/packages/coffee-script/documentation/js/switch.js +23 -0
- data/packages/coffee-script/documentation/js/try.js +8 -0
- data/packages/coffee-script/documentation/js/while.js +18 -0
- data/packages/coffee-script/documentation/vendor/jquery-1.4.2.js +6240 -0
- data/packages/coffee-script/examples/beautiful_code/binary_search.coffee +16 -0
- data/packages/coffee-script/examples/beautiful_code/quicksort_runtime.coffee +13 -0
- data/packages/coffee-script/examples/beautiful_code/regular_expression_matcher.coffee +34 -0
- data/packages/coffee-script/examples/blocks.coffee +54 -0
- data/packages/coffee-script/examples/code.coffee +167 -0
- data/packages/coffee-script/examples/computer_science/README +4 -0
- data/packages/coffee-script/examples/computer_science/binary_search.coffee +25 -0
- data/packages/coffee-script/examples/computer_science/bubble_sort.coffee +11 -0
- data/packages/coffee-script/examples/computer_science/linked_list.coffee +108 -0
- data/packages/coffee-script/examples/computer_science/luhn_algorithm.coffee +36 -0
- data/packages/coffee-script/examples/computer_science/merge_sort.coffee +19 -0
- data/packages/coffee-script/examples/computer_science/selection_sort.coffee +23 -0
- data/packages/coffee-script/examples/poignant.coffee +181 -0
- data/packages/coffee-script/examples/potion.coffee +206 -0
- data/packages/coffee-script/examples/underscore.coffee +682 -0
- data/packages/coffee-script/examples/web_server.coffee +12 -0
- data/packages/coffee-script/extras/EXTRAS +7 -0
- data/packages/coffee-script/extras/coffee-script.js +8 -0
- data/packages/coffee-script/extras/jsl.conf +44 -0
- data/packages/coffee-script/index.html +2515 -0
- data/packages/coffee-script/lib/browser.js +52 -0
- data/packages/coffee-script/lib/cake.js +76 -0
- data/packages/coffee-script/lib/coffee-script.js +82 -0
- data/packages/coffee-script/lib/command.js +263 -0
- data/packages/coffee-script/lib/grammar.js +581 -0
- data/packages/coffee-script/lib/helpers.js +66 -0
- data/packages/coffee-script/lib/index.js +8 -0
- data/packages/coffee-script/lib/lexer.js +633 -0
- data/packages/coffee-script/lib/nodes.js +2165 -0
- data/packages/coffee-script/lib/optparse.js +111 -0
- data/packages/coffee-script/lib/parser.js +649 -0
- data/packages/coffee-script/lib/repl.js +42 -0
- data/packages/coffee-script/lib/rewriter.js +353 -0
- data/packages/coffee-script/lib/scope.js +120 -0
- data/packages/coffee-script/lib/spade-format.js +45 -0
- data/packages/coffee-script/package.json +26 -0
- data/packages/coffee-script/src/browser.coffee +43 -0
- data/packages/coffee-script/src/cake.coffee +69 -0
- data/packages/coffee-script/src/coffee-script.coffee +92 -0
- data/packages/coffee-script/src/command.coffee +214 -0
- data/packages/coffee-script/src/grammar.coffee +590 -0
- data/packages/coffee-script/src/helpers.coffee +56 -0
- data/packages/coffee-script/src/index.coffee +2 -0
- data/packages/coffee-script/src/lexer.coffee +653 -0
- data/packages/coffee-script/src/nodes.coffee +1754 -0
- data/packages/coffee-script/src/optparse.coffee +99 -0
- data/packages/coffee-script/src/repl.coffee +42 -0
- data/packages/coffee-script/src/rewriter.coffee +326 -0
- data/packages/coffee-script/src/scope.coffee +94 -0
- data/packages/coffee-script/test/arguments.coffee +127 -0
- data/packages/coffee-script/test/assignment.coffee +98 -0
- data/packages/coffee-script/test/break.coffee +18 -0
- data/packages/coffee-script/test/comments.coffee +201 -0
- data/packages/coffee-script/test/conditionals.coffee +181 -0
- data/packages/coffee-script/test/exception_handling.coffee +90 -0
- data/packages/coffee-script/test/helpers.coffee +96 -0
- data/packages/coffee-script/test/importing.coffee +18 -0
- data/packages/coffee-script/test/operators.coffee +225 -0
- data/packages/coffee-script/test/ranges_slices_and_splices.coffee +186 -0
- data/packages/coffee-script/test/regular_expressions.coffee +56 -0
- data/packages/coffee-script/test/test.html +123 -0
- data/packages/coffee-script/test/test_chaining.coffee +77 -0
- data/packages/coffee-script/test/test_classes.coffee +372 -0
- data/packages/coffee-script/test/test_compilation.coffee +26 -0
- data/packages/coffee-script/test/test_comprehensions.coffee +318 -0
- data/packages/coffee-script/test/test_existence.coffee +165 -0
- data/packages/coffee-script/test/test_functions.coffee +379 -0
- data/packages/coffee-script/test/test_heredocs.coffee +111 -0
- data/packages/coffee-script/test/test_literals.coffee +270 -0
- data/packages/coffee-script/test/test_option_parser.coffee +27 -0
- data/packages/coffee-script/test/test_pattern_matching.coffee +162 -0
- data/packages/coffee-script/test/test_returns.coffee +63 -0
- data/packages/coffee-script/test/test_splats.coffee +102 -0
- data/packages/coffee-script/test/test_strings.coffee +118 -0
- data/packages/coffee-script/test/test_switch.coffee +103 -0
- data/packages/coffee-script/test/test_while.coffee +71 -0
- data/packages/core-test/.gitignore +2 -0
- data/packages/core-test/Buildfile +15 -0
- data/packages/core-test/CHANGELOG.md +24 -0
- data/packages/core-test/__preamble__.js +34 -0
- data/packages/core-test/bin/cot +3 -0
- data/packages/core-test/lib/assert.js +306 -0
- data/packages/core-test/lib/cli.js +258 -0
- data/packages/core-test/lib/core.js +311 -0
- data/packages/core-test/lib/loggers/browser.js +390 -0
- data/packages/core-test/lib/loggers/console.js +235 -0
- data/packages/core-test/lib/loggers/default.js +272 -0
- data/packages/core-test/lib/loggers/dummy.js +168 -0
- data/packages/core-test/lib/main.js +22 -0
- data/packages/core-test/lib/private/jquery.js +6079 -0
- data/packages/core-test/lib/qunit.js +159 -0
- data/packages/core-test/lib/runner.js +65 -0
- data/packages/core-test/lib/spec.js +302 -0
- data/packages/core-test/lib/sync.js +64 -0
- data/packages/core-test/lib/system/dump.js +208 -0
- data/packages/core-test/lib/system/equiv.js +199 -0
- data/packages/core-test/lib/system/ext.js +62 -0
- data/packages/core-test/lib/system/module.js +162 -0
- data/packages/core-test/lib/system/plan.js +223 -0
- data/packages/core-test/lib/system/stub.js +98 -0
- data/packages/core-test/lib/system/test.js +373 -0
- data/packages/core-test/lib/test.js +69 -0
- data/packages/core-test/lib/utils.js +256 -0
- data/packages/core-test/package.json +10 -0
- data/packages/core-test/resources/additions.css +8 -0
- data/packages/core-test/resources/runner.css +177 -0
- data/packages/core-test/tests/apis/commonjs-test.js +102 -0
- data/packages/core-test/tests/apis/core-test.js +154 -0
- data/packages/core-test/tests/apis/qunit-test.js +244 -0
- data/packages/core-test/tests/apis/spec-test.js +344 -0
- data/packages/core-test/tests/system/equiv/qunit-test.js +1400 -0
- data/packages/core-test/tests/system/test/assert-test.js +86 -0
- data/packages/core-test/tests/system/test/error-test.js +62 -0
- data/packages/core-test/tests/system/test/schedule-test.js +210 -0
- data/packages/core-test/tests/utils/fmt-test.js +24 -0
- data/packages/handlebars/Gemfile +4 -0
- data/packages/handlebars/README.markdown +205 -0
- data/packages/handlebars/Rakefile +65 -0
- data/packages/handlebars/lib/handlebars.js +19 -0
- data/packages/handlebars/lib/handlebars/ast.js +88 -0
- data/packages/handlebars/lib/handlebars/compiler.js +116 -0
- data/packages/handlebars/lib/handlebars/debug.js +25 -0
- data/packages/handlebars/lib/handlebars/printer.js +114 -0
- data/packages/handlebars/lib/handlebars/runtime.js +280 -0
- data/packages/handlebars/lib/handlebars/utils.js +61 -0
- data/packages/handlebars/lib/handlebars/visitor.js +14 -0
- data/packages/handlebars/lib/handlebars/vm.js +634 -0
- data/packages/handlebars/spec/acceptance_spec.rb +100 -0
- data/packages/handlebars/spec/parser_spec.rb +181 -0
- data/packages/handlebars/spec/qunit_spec.js +497 -0
- data/packages/handlebars/spec/spec_helper.rb +107 -0
- data/packages/handlebars/spec/tokenizer_spec.rb +145 -0
- data/packages/handlebars/src/handlebars.l +27 -0
- data/packages/handlebars/src/handlebars.yy +79 -0
- data/packages/handlebars/test.js +56 -0
- data/packages/ivory/LICENSE.txt +1 -0
- data/packages/ivory/README.md +19 -0
- data/packages/ivory/lib/buffer.js +111 -0
- data/packages/ivory/lib/events.js +137 -0
- data/packages/ivory/lib/fs.js +266 -0
- data/packages/ivory/lib/main.js +13 -0
- data/packages/ivory/lib/path.js +158 -0
- data/packages/ivory/lib/ruby/buffer.rb +145 -0
- data/packages/ivory/lib/ruby/constants.rb +585 -0
- data/packages/ivory/lib/ruby/events.rb +32 -0
- data/packages/ivory/lib/ruby/fs.rb +245 -0
- data/packages/ivory/lib/ruby/process.rb +28 -0
- data/packages/ivory/lib/stream.js +115 -0
- data/packages/ivory/lib/util.js +414 -0
- data/packages/ivory/package.json +11 -0
- data/packages/jquery-core/lib/main.js +897 -0
- data/packages/jquery-core/package.json +9 -0
- data/packages/jquery/main.js +7179 -0
- data/packages/jquery/package.json +10 -0
- data/packages/json/lib/main.js +14 -0
- data/packages/json/package.json +8 -0
- data/packages/lproj/README.md +77 -0
- data/packages/lproj/examples/demo-app/en.lproj/localized.strings +2 -0
- data/packages/lproj/examples/demo-app/fr.lproj/localized.strings +3 -0
- data/packages/lproj/examples/demo-app/index.html +8 -0
- data/packages/lproj/examples/demo-app/lib/main.js +7 -0
- data/packages/lproj/examples/demo-app/package.json +9 -0
- data/packages/lproj/lib/main.js +78 -0
- data/packages/lproj/lib/strings-format.js +6 -0
- data/packages/lproj/package.json +9 -0
- data/packages/optparse/README.md +161 -0
- data/packages/optparse/TODO +1 -0
- data/packages/optparse/examples/browser-test.html +75 -0
- data/packages/optparse/examples/nodejs-test.js +90 -0
- data/packages/optparse/lib/optparse.js +309 -0
- data/packages/optparse/package.json +13 -0
- data/packages/optparse/seed.yml +5 -0
- data/packages/sproutcore-bootstrap/lib/main.js +11 -0
- data/packages/sproutcore-bootstrap/package.json +15 -0
- data/packages/sproutcore-corefoundation/lib/main.js +66 -0
- data/packages/sproutcore-corefoundation/lib/tests.js +74 -0
- data/packages/sproutcore-corefoundation/package.json +27 -0
- data/packages/sproutcore-corefoundation/tests.html +12 -0
- data/packages/sproutcore-datastore/lib/main.js +23 -0
- data/packages/sproutcore-datastore/package.json +16 -0
- data/packages/sproutcore-datetime/lib/main.js +6 -0
- data/packages/sproutcore-datetime/package.json +16 -0
- data/packages/sproutcore-handlebars/lib/handlebars.js +5 -0
- data/packages/sproutcore-handlebars/lib/main.js +15 -0
- data/packages/sproutcore-handlebars/package.json +17 -0
- data/packages/sproutcore-jquery/lib/main.js +10 -0
- data/packages/sproutcore-jquery/package.json +12 -0
- data/packages/sproutcore-preprocessor/bin/chance +64 -0
- data/packages/sproutcore-preprocessor/lib/css.js +21 -0
- data/packages/sproutcore-preprocessor/lib/main.js +1 -0
- data/packages/sproutcore-preprocessor/lib/preprocessor.js +12 -0
- data/packages/sproutcore-preprocessor/lib/sc_static.js +9 -0
- data/packages/sproutcore-preprocessor/package.json +18 -0
- data/packages/sproutcore-runtime/lib/main.js +37 -0
- data/packages/sproutcore-runtime/package.json +21 -0
- data/packages/text/lib/main.js +8 -0
- data/packages/text/package.json +9 -0
- data/packages/web-file/README.md +7 -0
- data/packages/web-file/lib/errors.js +32 -0
- data/packages/web-file/lib/file-reader.js +10 -0
- data/packages/web-file/lib/file-system.js +234 -0
- data/packages/web-file/lib/file-writer.js +10 -0
- data/packages/web-file/lib/file.js +9 -0
- data/packages/web-file/lib/main.js +34 -0
- data/packages/web-file/lib/platform.js +25 -0
- data/packages/web-file/lib/ruby/file.rb +252 -0
- data/packages/web-file/lib/ruby/file_reader.rb +69 -0
- data/packages/web-file/lib/ruby/file_system.rb +134 -0
- data/packages/web-file/lib/ruby/file_writer.rb +78 -0
- data/packages/web-file/package.json +12 -0
- data/packages/web-typed-array/README.md +7 -0
- data/packages/web-typed-array/lib/array-buffer-view.js +9 -0
- data/packages/web-typed-array/lib/array-buffer.js +7 -0
- data/packages/web-typed-array/lib/main.js +33 -0
- data/packages/web-typed-array/lib/platform.js +20 -0
- data/packages/web-typed-array/lib/ruby/array_buffer.rb +31 -0
- data/packages/web-typed-array/lib/ruby/array_buffer_view.rb +130 -0
- data/packages/web-typed-array/lib/ruby/typed_array.rb +133 -0
- data/packages/web-typed-array/lib/typed-array.js +26 -0
- data/packages/web-typed-array/package.json +9 -0
- data/spade.gemspec +30 -0
- data/spec/cli/build_spec.rb +59 -0
- data/spec/cli/install_spec.rb +106 -0
- data/spec/cli/installed_spec.rb +55 -0
- data/spec/cli/list_spec.rb +75 -0
- data/spec/cli/login_spec.rb +76 -0
- data/spec/cli/owner_spec.rb +115 -0
- data/spec/cli/push_spec.rb +74 -0
- data/spec/cli/uninstall_spec.rb +58 -0
- data/spec/cli/unpack_spec.rb +73 -0
- data/spec/credentials_spec.rb +24 -0
- data/spec/fixtures/coffee/bin/cake +0 -0
- data/spec/fixtures/coffee/bin/coffee +0 -0
- data/spec/fixtures/coffee/lib/coffee.js +0 -0
- data/spec/fixtures/coffee/lib/coffee.png +0 -0
- data/spec/fixtures/coffee/lib/coffee/base.js +0 -0
- data/spec/fixtures/coffee/lib/coffee/mocha/chai.js +0 -0
- data/spec/fixtures/coffee/qunit/coffee/test.js +0 -0
- data/spec/fixtures/coffee/qunit/test.js +0 -0
- data/spec/fixtures/coffee/qunit/test.log +0 -0
- data/spec/fixtures/package.json +25 -0
- data/spec/gauntlet_spec.rb +30 -0
- data/spec/javascript/async-test.js +123 -0
- data/spec/javascript/compiler/javascript.js +13 -0
- data/spec/javascript/compiler/ruby.js +14 -0
- data/spec/javascript/loader-test.js +64 -0
- data/spec/javascript/normalize-test.js +59 -0
- data/spec/javascript/packages-test.js +44 -0
- data/spec/javascript/relative-require-test.js +72 -0
- data/spec/javascript/require-test.js +56 -0
- data/spec/javascript/sandbox/compile.js +37 -0
- data/spec/javascript/sandbox/creation.js +44 -0
- data/spec/javascript/sandbox/format.js +79 -0
- data/spec/javascript/sandbox/misc.js +57 -0
- data/spec/javascript/sandbox/preprocessor.js +81 -0
- data/spec/javascript/sandbox/require.js +48 -0
- data/spec/javascript/sandbox/run-command.js +21 -0
- data/spec/javascript/spade/externs.js +14 -0
- data/spec/javascript/spade/load-factory.js +15 -0
- data/spec/javascript/spade/misc.js +23 -0
- data/spec/javascript/spade/ready.js +12 -0
- data/spec/javascript/spade/register.js +13 -0
- data/spec/javascript_spec.rb +7 -0
- data/spec/package_spec.rb +257 -0
- data/spec/spec_helper.rb +30 -0
- data/spec/support/cli.rb +94 -0
- data/spec/support/core_test.rb +52 -0
- data/spec/support/fake.rb +42 -0
- data/spec/support/fake_gem_server.rb +50 -0
- data/spec/support/fake_gemcutter.rb +29 -0
- data/spec/support/matchers.rb +31 -0
- data/spec/support/path.rb +54 -0
- data/sproutcore/.gitignore +13 -0
- data/sproutcore/Buildfile +112 -0
- data/sproutcore/CHANGELOG.md +232 -0
- data/sproutcore/README.md +68 -0
- data/sproutcore/apps/docs/core.js +27 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Preview.pdf +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/data.plist +14378 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image10.png +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image11.png +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image13.png +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image14.png +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image8.png +0 -0
- data/sproutcore/apps/docs/design/Doc Viewer.graffle/image9.tiff +0 -0
- data/sproutcore/apps/docs/english.lproj/loading.rhtml +9 -0
- data/sproutcore/apps/docs/english.lproj/main_page.js +22 -0
- data/sproutcore/apps/docs/english.lproj/strings.js +15 -0
- data/sproutcore/apps/docs/main.js +30 -0
- data/sproutcore/apps/greenhouse/README +18 -0
- data/sproutcore/apps/greenhouse/TODO +56 -0
- data/sproutcore/apps/greenhouse/beautify.js +1058 -0
- data/sproutcore/apps/greenhouse/controllers/design.js +20 -0
- data/sproutcore/apps/greenhouse/controllers/file.js +35 -0
- data/sproutcore/apps/greenhouse/controllers/files.js +40 -0
- data/sproutcore/apps/greenhouse/controllers/layout.js +53 -0
- data/sproutcore/apps/greenhouse/controllers/library.js +194 -0
- data/sproutcore/apps/greenhouse/controllers/page.js +18 -0
- data/sproutcore/apps/greenhouse/controllers/property.js +19 -0
- data/sproutcore/apps/greenhouse/controllers/property_editor.js +17 -0
- data/sproutcore/apps/greenhouse/controllers/target.js +20 -0
- data/sproutcore/apps/greenhouse/controllers/targets.js +43 -0
- data/sproutcore/apps/greenhouse/controllers/view_configs.js +100 -0
- data/sproutcore/apps/greenhouse/core.js +65 -0
- data/sproutcore/apps/greenhouse/core_file.js +124 -0
- data/sproutcore/apps/greenhouse/data_source.js +250 -0
- data/sproutcore/apps/greenhouse/english.lproj/app_page.js +399 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/app-selector.css +107 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/button.css +314 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/dock.css +90 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/general.css +51 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/main-page.css +93 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/menu.css +49 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/modal.css +41 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/picker.css +195 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/search.css +60 -0
- data/sproutcore/apps/greenhouse/english.lproj/css/text-field.css +67 -0
- data/sproutcore/apps/greenhouse/english.lproj/dialogs.js +303 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/sproutcore/apps/greenhouse/english.lproj/inspectors.js +365 -0
- data/sproutcore/apps/greenhouse/english.lproj/loading.rhtml +9 -0
- data/sproutcore/apps/greenhouse/english.lproj/main_page.js +95 -0
- data/sproutcore/apps/greenhouse/english.lproj/strings.js +93 -0
- data/sproutcore/apps/greenhouse/fixtures/file.js +35 -0
- data/sproutcore/apps/greenhouse/main.js +28 -0
- data/sproutcore/apps/greenhouse/mixins/drop_down.js +97 -0
- data/sproutcore/apps/greenhouse/models/design.js +26 -0
- data/sproutcore/apps/greenhouse/models/dir.js +93 -0
- data/sproutcore/apps/greenhouse/models/file.js +51 -0
- data/sproutcore/apps/greenhouse/models/target.js +82 -0
- data/sproutcore/apps/greenhouse/models/view_config.js +49 -0
- data/sproutcore/apps/greenhouse/resources/test_page.js +37 -0
- data/sproutcore/apps/greenhouse/states/inspector.js +152 -0
- data/sproutcore/apps/greenhouse/states/library.js +142 -0
- data/sproutcore/apps/greenhouse/states/main.js +283 -0
- data/sproutcore/apps/greenhouse/states/modals.js +299 -0
- data/sproutcore/apps/greenhouse/states/ready.js +235 -0
- data/sproutcore/apps/greenhouse/tests/controllers/design.js +15 -0
- data/sproutcore/apps/greenhouse/tests/controllers/designs.js +15 -0
- data/sproutcore/apps/greenhouse/tests/controllers/file.js +15 -0
- data/sproutcore/apps/greenhouse/tests/controllers/files.js +15 -0
- data/sproutcore/apps/greenhouse/tests/models/file.js +15 -0
- data/sproutcore/apps/greenhouse/tests/models/view_config.js +15 -0
- data/sproutcore/apps/greenhouse/tests/views/list_item.js +16 -0
- data/sproutcore/apps/greenhouse/tests/views/plist_item.js +20 -0
- data/sproutcore/apps/greenhouse/theme.js +25 -0
- data/sproutcore/apps/greenhouse/views/anchor.js +277 -0
- data/sproutcore/apps/greenhouse/views/application_list_item.js +19 -0
- data/sproutcore/apps/greenhouse/views/event_blocker.js +32 -0
- data/sproutcore/apps/greenhouse/views/label_designer.js +16 -0
- data/sproutcore/apps/greenhouse/views/list_item.js +42 -0
- data/sproutcore/apps/greenhouse/views/plist_item.js +178 -0
- data/sproutcore/apps/greenhouse/views/simple_button.js +157 -0
- data/sproutcore/apps/greenhouse/views/tear_off_picker.js +56 -0
- data/sproutcore/apps/greenhouse/views/web.js +44 -0
- data/sproutcore/apps/test_controls/Buildfile +0 -0
- data/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/sproutcore/apps/test_controls/controllers/category.js +36 -0
- data/sproutcore/apps/test_controls/core.js +29 -0
- data/sproutcore/apps/test_controls/main.js +14 -0
- data/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
- data/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
- data/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/sproutcore/apps/test_controls/resources/main_page.css +60 -0
- data/sproutcore/apps/test_controls/resources/main_page.js +145 -0
- data/sproutcore/apps/test_controls/resources/progress_page.js +32 -0
- data/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
- data/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
- data/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
- data/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
- data/sproutcore/apps/test_controls/theme.js +34 -0
- data/sproutcore/apps/tests/controllers/detail.js +25 -0
- data/sproutcore/apps/tests/controllers/source.js +29 -0
- data/sproutcore/apps/tests/controllers/target.js +26 -0
- data/sproutcore/apps/tests/controllers/targets.js +86 -0
- data/sproutcore/apps/tests/controllers/tests.js +33 -0
- data/sproutcore/apps/tests/core.js +133 -0
- data/sproutcore/apps/tests/english.lproj/loading.rhtml +9 -0
- data/sproutcore/apps/tests/english.lproj/main_page.css +48 -0
- data/sproutcore/apps/tests/english.lproj/main_page.js +233 -0
- data/sproutcore/apps/tests/english.lproj/strings.js +26 -0
- data/sproutcore/apps/tests/main.js +27 -0
- data/sproutcore/apps/tests/states/no_targets.js +26 -0
- data/sproutcore/apps/tests/states/ready.js +56 -0
- data/sproutcore/apps/tests/states/ready_detail.js +41 -0
- data/sproutcore/apps/tests/states/ready_empty.js +48 -0
- data/sproutcore/apps/tests/states/ready_list.js +41 -0
- data/sproutcore/apps/tests/states/ready_loading.js +44 -0
- data/sproutcore/apps/tests/states/ready_no_tests.js +31 -0
- data/sproutcore/apps/tests/states/start.js +39 -0
- data/sproutcore/apps/tests/tests/controllers/detail.js +15 -0
- data/sproutcore/apps/tests/tests/controllers/source.js +15 -0
- data/sproutcore/apps/tests/tests/controllers/target.js +15 -0
- data/sproutcore/apps/tests/tests/controllers/targets.js +15 -0
- data/sproutcore/apps/tests/tests/controllers/tests.js +15 -0
- data/sproutcore/apps/tests/tests/models/target.js +15 -0
- data/sproutcore/apps/tests/tests/models/test.js +15 -0
- data/sproutcore/apps/tests/tests/views/offset_checkbox.js +15 -0
- data/sproutcore/apps/tests/views/offset_checkbox.js +26 -0
- data/sproutcore/apps/welcome/controllers/targets.js +56 -0
- data/sproutcore/apps/welcome/core.js +30 -0
- data/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/sproutcore/apps/welcome/english.lproj/loading.rhtml +10 -0
- data/sproutcore/apps/welcome/english.lproj/main_page.css +25 -0
- data/sproutcore/apps/welcome/english.lproj/main_page.js +67 -0
- data/sproutcore/apps/welcome/english.lproj/strings.js +15 -0
- data/sproutcore/apps/welcome/main.js +19 -0
- data/sproutcore/apps/welcome/tests/controllers/targets.js +15 -0
- data/sproutcore/design/CollectionView State Charts.graffle +4848 -0
- data/sproutcore/design/Design Charts.graffle +16845 -0
- data/sproutcore/design/Record State Table.numbers +0 -0
- data/sproutcore/design/SproutCore Datastore Design.graffle/QuickLook/Preview.pdf +0 -0
- data/sproutcore/design/SproutCore Datastore Design.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/sproutcore/design/SproutCore Datastore Design.graffle/data.plist +19588 -0
- data/sproutcore/design/SproutCore Datastore Design.graffle/image8.png +0 -0
- data/sproutcore/design/SproutCore Design Template.graffle/QuickLook/Preview.pdf +0 -0
- data/sproutcore/design/SproutCore Design Template.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/sproutcore/design/SproutCore Design Template.graffle/data.plist +1452 -0
- data/sproutcore/design/SproutCore Design Template.graffle/image8.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/QuickLook/Preview.pdf +0 -0
- data/sproutcore/design/TestRunner Design.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/sproutcore/design/TestRunner Design.graffle/data.plist +24187 -0
- data/sproutcore/design/TestRunner Design.graffle/image10.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image11.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image13.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image15.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image16.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image17.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image18.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image19.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image22.tiff +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image23.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image24.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image25.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image30.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image31.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image8.png +0 -0
- data/sproutcore/design/TestRunner Design.graffle/image9.png +0 -0
- data/sproutcore/design/greenhouse-statechart.graffle +9025 -0
- data/sproutcore/design/greenhouse-statechart.pdf +0 -0
- data/sproutcore/design/iphone-webapp-loading.psd +0 -0
- data/sproutcore/frameworks/animation/Buildfile +3 -0
- data/sproutcore/frameworks/animation/LICENSE +25 -0
- data/sproutcore/frameworks/animation/README.md +79 -0
- data/sproutcore/frameworks/animation/core.js +1206 -0
- data/sproutcore/frameworks/animation/tests/core.js +152 -0
- data/sproutcore/frameworks/bootstrap/README +9 -0
- data/sproutcore/frameworks/bootstrap/core.js +7 -0
- data/sproutcore/frameworks/bootstrap/setup_body_class_names.js +10 -0
- data/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/sproutcore/frameworks/bootstrap/system/browser.js +65 -0
- data/sproutcore/frameworks/bootstrap/system/loader.js +50 -0
- data/sproutcore/frameworks/bootstrap/tests/system/browser.js +187 -0
- data/sproutcore/frameworks/core_foundation/.greenhouseconf +33 -0
- data/sproutcore/frameworks/core_foundation/controllers/array.js +498 -0
- data/sproutcore/frameworks/core_foundation/controllers/controller.js +44 -0
- data/sproutcore/frameworks/core_foundation/controllers/object.js +342 -0
- data/sproutcore/frameworks/core_foundation/core.js +201 -0
- data/sproutcore/frameworks/core_foundation/ext/object.js +83 -0
- data/sproutcore/frameworks/core_foundation/ext/run_loop.js +163 -0
- data/sproutcore/frameworks/core_foundation/mixins/delegate_support.js +110 -0
- data/sproutcore/frameworks/core_foundation/mixins/responder_context.js +269 -0
- data/sproutcore/frameworks/core_foundation/mixins/selection_support.js +250 -0
- data/sproutcore/frameworks/core_foundation/mixins/string.js +163 -0
- data/sproutcore/frameworks/core_foundation/panes/keyboard.js +68 -0
- data/sproutcore/frameworks/core_foundation/panes/layout.js +108 -0
- data/sproutcore/frameworks/core_foundation/panes/main.js +52 -0
- data/sproutcore/frameworks/core_foundation/panes/manipulation.js +27 -0
- data/sproutcore/frameworks/core_foundation/panes/pane.js +672 -0
- data/sproutcore/frameworks/core_foundation/panes/template.js +24 -0
- data/sproutcore/frameworks/core_foundation/panes/visibility.js +11 -0
- data/sproutcore/frameworks/core_foundation/protocols/observable_protocol.js +40 -0
- data/sproutcore/frameworks/core_foundation/protocols/sparse_array_delegate.js +131 -0
- data/sproutcore/frameworks/core_foundation/resources/core.css +371 -0
- data/sproutcore/frameworks/core_foundation/resources/view.css +57 -0
- data/sproutcore/frameworks/core_foundation/system/application.js +35 -0
- data/sproutcore/frameworks/core_foundation/system/browser.js +36 -0
- data/sproutcore/frameworks/core_foundation/system/builder.js +210 -0
- data/sproutcore/frameworks/core_foundation/system/core_query.js +141 -0
- data/sproutcore/frameworks/core_foundation/system/cursor.js +131 -0
- data/sproutcore/frameworks/core_foundation/system/device.js +210 -0
- data/sproutcore/frameworks/core_foundation/system/event.js +914 -0
- data/sproutcore/frameworks/core_foundation/system/json.js +515 -0
- data/sproutcore/frameworks/core_foundation/system/locale.js +293 -0
- data/sproutcore/frameworks/core_foundation/system/page.js +108 -0
- data/sproutcore/frameworks/core_foundation/system/platform.js +399 -0
- data/sproutcore/frameworks/core_foundation/system/ready.js +77 -0
- data/sproutcore/frameworks/core_foundation/system/render_context.js +1063 -0
- data/sproutcore/frameworks/core_foundation/system/responder.js +124 -0
- data/sproutcore/frameworks/core_foundation/system/root_responder.js +2173 -0
- data/sproutcore/frameworks/core_foundation/system/selection_set.js +695 -0
- data/sproutcore/frameworks/core_foundation/system/sparse_array.js +393 -0
- data/sproutcore/frameworks/core_foundation/system/theme.js +316 -0
- data/sproutcore/frameworks/core_foundation/system/timer.js +553 -0
- data/sproutcore/frameworks/core_foundation/system/utils.js +151 -0
- data/sproutcore/frameworks/core_foundation/system/utils/rect.js +98 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +218 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/array/enum_case.js +206 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/array/null_case.js +64 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +344 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/array/single_case.js +136 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/object/empty_case.js +82 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/object/multiple_case.js +111 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/object/single_case.js +193 -0
- data/sproutcore/frameworks/core_foundation/tests/controllers/object/single_enumerable_case.js +265 -0
- data/sproutcore/frameworks/core_foundation/tests/mixins/responder_context.js +75 -0
- data/sproutcore/frameworks/core_foundation/tests/mixins/string.js +55 -0
- data/sproutcore/frameworks/core_foundation/tests/panes/template.js +14 -0
- data/sproutcore/frameworks/core_foundation/tests/system/builder.js +42 -0
- data/sproutcore/frameworks/core_foundation/tests/system/core_query/within.js +65 -0
- data/sproutcore/frameworks/core_foundation/tests/system/json.js +14 -0
- data/sproutcore/frameworks/core_foundation/tests/system/locale.js +134 -0
- data/sproutcore/frameworks/core_foundation/tests/system/ready/done.js +32 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/begin.js +47 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/element.js +44 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +124 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/get.js +51 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +50 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js +28 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +177 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +109 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/init.js +55 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/join.js +28 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/push_text.js +74 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/tag.js +46 -0
- data/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +218 -0
- data/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeKeyPane.js +124 -0
- data/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMainPane.js +68 -0
- data/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMenuPane.js +48 -0
- data/sproutcore/frameworks/core_foundation/tests/system/root_responder/root_responder.js +101 -0
- data/sproutcore/frameworks/core_foundation/tests/system/root_responder/targetForAction.js +288 -0
- data/sproutcore/frameworks/core_foundation/tests/system/selection_set/add.js +92 -0
- data/sproutcore/frameworks/core_foundation/tests/system/selection_set/copy.js +17 -0
- data/sproutcore/frameworks/core_foundation/tests/system/selection_set/indexSetForSource.js +98 -0
- data/sproutcore/frameworks/core_foundation/tests/system/selection_set/isEqual.js +60 -0
- data/sproutcore/frameworks/core_foundation/tests/system/selection_set/remove.js +111 -0
- data/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +194 -0
- data/sproutcore/frameworks/core_foundation/tests/system/theme.js +77 -0
- data/sproutcore/frameworks/core_foundation/tests/system/timer/invalidate.js +38 -0
- data/sproutcore/frameworks/core_foundation/tests/system/timer/invokeLater.js +203 -0
- data/sproutcore/frameworks/core_foundation/tests/system/timer/isPaused.js +71 -0
- data/sproutcore/frameworks/core_foundation/tests/system/timer/performAction.js +69 -0
- data/sproutcore/frameworks/core_foundation/tests/system/timer/schedule.js +170 -0
- data/sproutcore/frameworks/core_foundation/tests/system/utils/normalizeURL.js +18 -0
- data/sproutcore/frameworks/core_foundation/tests/system/utils/offset.js +271 -0
- data/sproutcore/frameworks/core_foundation/tests/system/utils/rect.js +99 -0
- data/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +43 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +218 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +20 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +148 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +133 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +31 -0
- data/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +206 -0
- data/sproutcore/frameworks/core_foundation/tests/views/template/checkbox_support.js +32 -0
- data/sproutcore/frameworks/core_foundation/tests/views/template/text_field_support.js +73 -0
- data/sproutcore/frameworks/core_foundation/tests/views/template_view/collection.js +111 -0
- data/sproutcore/frameworks/core_foundation/tests/views/template_view/core.js +100 -0
- data/sproutcore/frameworks/core_foundation/tests/views/template_view/handlebars.js +580 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +376 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/build.js +85 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/build_children.js +89 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +117 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +248 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/convertLayouts.js +145 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +132 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +97 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +83 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +51 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +50 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/init.js +50 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +217 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +79 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +116 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +22 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +150 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +162 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +180 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +735 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +67 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +203 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +189 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/render.js +125 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +163 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/replaceChild.js +29 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/static_layout.js +21 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/theme.js +43 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +148 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +213 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/view.js +64 -0
- data/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +202 -0
- data/sproutcore/frameworks/core_foundation/views/template.js +77 -0
- data/sproutcore/frameworks/core_foundation/views/template/checkbox_support.js +20 -0
- data/sproutcore/frameworks/core_foundation/views/template/collection.js +106 -0
- data/sproutcore/frameworks/core_foundation/views/template/text_field_support.js +35 -0
- data/sproutcore/frameworks/core_foundation/views/view.js +1458 -0
- data/sproutcore/frameworks/core_foundation/views/view/animation.js +181 -0
- data/sproutcore/frameworks/core_foundation/views/view/base.js +1 -0
- data/sproutcore/frameworks/core_foundation/views/view/cursor.js +48 -0
- data/sproutcore/frameworks/core_foundation/views/view/enabled.js +57 -0
- data/sproutcore/frameworks/core_foundation/views/view/keyboard.js +223 -0
- data/sproutcore/frameworks/core_foundation/views/view/layout.js +1087 -0
- data/sproutcore/frameworks/core_foundation/views/view/layout_style.js +618 -0
- data/sproutcore/frameworks/core_foundation/views/view/manipulation.js +426 -0
- data/sproutcore/frameworks/core_foundation/views/view/theming.js +362 -0
- data/sproutcore/frameworks/core_foundation/views/view/touch.js +67 -0
- data/sproutcore/frameworks/core_foundation/views/view/visibility.js +118 -0
- data/sproutcore/frameworks/core_tools/core.js +20 -0
- data/sproutcore/frameworks/core_tools/data_source.js +99 -0
- data/sproutcore/frameworks/core_tools/english.lproj/strings.js +15 -0
- data/sproutcore/frameworks/core_tools/fixtures/target.js +87 -0
- data/sproutcore/frameworks/core_tools/fixtures/test.js +44 -0
- data/sproutcore/frameworks/core_tools/models/target.js +108 -0
- data/sproutcore/frameworks/core_tools/models/test.js +48 -0
- data/sproutcore/frameworks/datastore/core.js +8 -0
- data/sproutcore/frameworks/datastore/data_sources/cascade.js +180 -0
- data/sproutcore/frameworks/datastore/data_sources/data_source.js +583 -0
- data/sproutcore/frameworks/datastore/data_sources/fixtures.js +393 -0
- data/sproutcore/frameworks/datastore/debug/json.js +71 -0
- data/sproutcore/frameworks/datastore/debug/standard_setup.js +96 -0
- data/sproutcore/frameworks/datastore/fixtures/author_fixtures.js +2503 -0
- data/sproutcore/frameworks/datastore/fixtures/sample.js +17 -0
- data/sproutcore/frameworks/datastore/models/child_attribute.js +96 -0
- data/sproutcore/frameworks/datastore/models/children_attribute.js +75 -0
- data/sproutcore/frameworks/datastore/models/fetched_attribute.js +100 -0
- data/sproutcore/frameworks/datastore/models/many_attribute.js +154 -0
- data/sproutcore/frameworks/datastore/models/record.js +1318 -0
- data/sproutcore/frameworks/datastore/models/record_attribute.js +567 -0
- data/sproutcore/frameworks/datastore/models/single_attribute.js +159 -0
- data/sproutcore/frameworks/datastore/system/child_array.js +222 -0
- data/sproutcore/frameworks/datastore/system/many_array.js +418 -0
- data/sproutcore/frameworks/datastore/system/nested_store.js +609 -0
- data/sproutcore/frameworks/datastore/system/query.js +1599 -0
- data/sproutcore/frameworks/datastore/system/record_array.js +710 -0
- data/sproutcore/frameworks/datastore/system/store.js +2860 -0
- data/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +133 -0
- data/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +122 -0
- data/sproutcore/frameworks/datastore/tests/integration/contact_model.js +131 -0
- data/sproutcore/frameworks/datastore/tests/integration/cyclical_relationship.js +119 -0
- data/sproutcore/frameworks/datastore/tests/integration/mail_model.js +91 -0
- data/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +56 -0
- data/sproutcore/frameworks/datastore/tests/models/datetime_recordattribute.js +73 -0
- data/sproutcore/frameworks/datastore/tests/models/many_attribute.js +423 -0
- data/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +180 -0
- data/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +309 -0
- data/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +363 -0
- data/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +421 -0
- data/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +304 -0
- data/sproutcore/frameworks/datastore/tests/models/record/core_methods.js +55 -0
- data/sproutcore/frameworks/datastore/tests/models/record/destroy.js +92 -0
- data/sproutcore/frameworks/datastore/tests/models/record/error_methods.js +56 -0
- data/sproutcore/frameworks/datastore/tests/models/record/normalize.js +336 -0
- data/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +53 -0
- data/sproutcore/frameworks/datastore/tests/models/record/refresh.js +48 -0
- data/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +170 -0
- data/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +66 -0
- data/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +112 -0
- data/sproutcore/frameworks/datastore/tests/models/record_attribute.js +252 -0
- data/sproutcore/frameworks/datastore/tests/models/single_attribute.js +284 -0
- data/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +204 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +180 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +173 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +158 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/core_methods.js +70 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +113 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +102 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +180 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +126 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +163 -0
- data/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +166 -0
- data/sproutcore/frameworks/datastore/tests/system/query/builders.js +219 -0
- data/sproutcore/frameworks/datastore/tests/system/query/compare.js +144 -0
- data/sproutcore/frameworks/datastore/tests/system/query/contains.js +131 -0
- data/sproutcore/frameworks/datastore/tests/system/query/containsRecordTypes.js +81 -0
- data/sproutcore/frameworks/datastore/tests/system/query/copy.js +30 -0
- data/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +197 -0
- data/sproutcore/frameworks/datastore/tests/system/query/evaluation_of_records.js +92 -0
- data/sproutcore/frameworks/datastore/tests/system/query/expandedRecordTypes.js +64 -0
- data/sproutcore/frameworks/datastore/tests/system/query/parse.js +216 -0
- data/sproutcore/frameworks/datastore/tests/system/query/queryWithScope.js +57 -0
- data/sproutcore/frameworks/datastore/tests/system/query/record_type_is.js +47 -0
- data/sproutcore/frameworks/datastore/tests/system/query/registered_comparisons.js +70 -0
- data/sproutcore/frameworks/datastore/tests/system/query/registered_query_extensions.js +71 -0
- data/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +177 -0
- data/sproutcore/frameworks/datastore/tests/system/record_array/error_methods.js +50 -0
- data/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +214 -0
- data/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +54 -0
- data/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +137 -0
- data/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +221 -0
- data/sproutcore/frameworks/datastore/tests/system/store/core_methods.js +156 -0
- data/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +76 -0
- data/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +157 -0
- data/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +278 -0
- data/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +110 -0
- data/sproutcore/frameworks/datastore/tests/system/store/error_methods.js +62 -0
- data/sproutcore/frameworks/datastore/tests/system/store/find.js +530 -0
- data/sproutcore/frameworks/datastore/tests/system/store/init.js +23 -0
- data/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +64 -0
- data/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +61 -0
- data/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +74 -0
- data/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +74 -0
- data/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +76 -0
- data/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +144 -0
- data/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +200 -0
- data/sproutcore/frameworks/datastore/tests/system/store/unloadRecords.js +41 -0
- data/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +125 -0
- data/sproutcore/frameworks/datetime/resources/strings.js +14 -0
- data/sproutcore/frameworks/datetime/system/datetime.js +1111 -0
- data/sproutcore/frameworks/datetime/tests/system/datetime.js +383 -0
- data/sproutcore/frameworks/debug/core.js +114 -0
- data/sproutcore/frameworks/debug/invoke_once_last_debugging.js +259 -0
- data/sproutcore/frameworks/designer/coders/design.js +20 -0
- data/sproutcore/frameworks/designer/coders/object.js +347 -0
- data/sproutcore/frameworks/designer/controllers/controllers.js +16 -0
- data/sproutcore/frameworks/designer/controllers/design.js +37 -0
- data/sproutcore/frameworks/designer/controllers/designs.js +133 -0
- data/sproutcore/frameworks/designer/controllers/page_design.js +170 -0
- data/sproutcore/frameworks/designer/controllers/page_files.js +22 -0
- data/sproutcore/frameworks/designer/core.js +26 -0
- data/sproutcore/frameworks/designer/css/css_rule.js +22 -0
- data/sproutcore/frameworks/designer/css/css_style.js +29 -0
- data/sproutcore/frameworks/designer/css/css_style_sheet.js +201 -0
- data/sproutcore/frameworks/designer/designers/button.js +21 -0
- data/sproutcore/frameworks/designer/designers/label.js +16 -0
- data/sproutcore/frameworks/designer/designers/object_designer.js +296 -0
- data/sproutcore/frameworks/designer/designers/tab.js +18 -0
- data/sproutcore/frameworks/designer/designers/text_field.js +15 -0
- data/sproutcore/frameworks/designer/designers/view_designer.js +1267 -0
- data/sproutcore/frameworks/designer/english.lproj/css/designer.css +96 -0
- data/sproutcore/frameworks/designer/english.lproj/design_page.js +55 -0
- data/sproutcore/frameworks/designer/english.lproj/high_light.css +10 -0
- data/sproutcore/frameworks/designer/english.lproj/images/controller.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/dock-bg.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/dock-item-bg.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/dock-item-divider.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/main-bg.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/page.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/pane.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/images/view.png +0 -0
- data/sproutcore/frameworks/designer/english.lproj/selection_handles.css +58 -0
- data/sproutcore/frameworks/designer/ext/binding.js +33 -0
- data/sproutcore/frameworks/designer/ext/object.js +26 -0
- data/sproutcore/frameworks/designer/ext/page.js +58 -0
- data/sproutcore/frameworks/designer/ext/view.js +27 -0
- data/sproutcore/frameworks/designer/mixins/button.js +11 -0
- data/sproutcore/frameworks/designer/mixins/snap_lines.js +221 -0
- data/sproutcore/frameworks/designer/tests/coders/page.js +54 -0
- data/sproutcore/frameworks/designer/tests/designers/view_designer.js +47 -0
- data/sproutcore/frameworks/designer/views/designer_drop_target.js +144 -0
- data/sproutcore/frameworks/designer/views/drawing.js +219 -0
- data/sproutcore/frameworks/designer/views/high_light.js +66 -0
- data/sproutcore/frameworks/designer/views/page_item_view.js +130 -0
- data/sproutcore/frameworks/designer/views/selection_handles.js +78 -0
- data/sproutcore/frameworks/desktop/.greenhouseconf +218 -0
- data/sproutcore/frameworks/desktop/core.js +18 -0
- data/sproutcore/frameworks/desktop/debug/drag.js +41 -0
- data/sproutcore/frameworks/desktop/english.lproj/alert.css +56 -0
- data/sproutcore/frameworks/desktop/english.lproj/debug/a_sample_image.jpg +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/debug/apple-logo1.jpeg +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/debug/iframe.html +23 -0
- data/sproutcore/frameworks/desktop/english.lproj/disclosure.css +74 -0
- data/sproutcore/frameworks/desktop/english.lproj/drag.css +7 -0
- data/sproutcore/frameworks/desktop/english.lproj/icons.css +943 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/cap.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/downbutton.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/thumb-bottom.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/thumb-center.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/thumb-top.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/track.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/images/upbutton.png +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/list_item.css +185 -0
- data/sproutcore/frameworks/desktop/english.lproj/menu.css +12 -0
- data/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +109 -0
- data/sproutcore/frameworks/desktop/english.lproj/modal.css +9 -0
- data/sproutcore/frameworks/desktop/english.lproj/panel.css +91 -0
- data/sproutcore/frameworks/desktop/english.lproj/picker.css +35 -0
- data/sproutcore/frameworks/desktop/english.lproj/progress.css +33 -0
- data/sproutcore/frameworks/desktop/english.lproj/radio.css +10 -0
- data/sproutcore/frameworks/desktop/english.lproj/segmented.css +132 -0
- data/sproutcore/frameworks/desktop/english.lproj/separator.css +19 -0
- data/sproutcore/frameworks/desktop/english.lproj/slider.css +66 -0
- data/sproutcore/frameworks/desktop/english.lproj/split.css +0 -0
- data/sproutcore/frameworks/desktop/english.lproj/split_divider.css +6 -0
- data/sproutcore/frameworks/desktop/english.lproj/strings.js +14 -0
- data/sproutcore/frameworks/desktop/english.lproj/tab.css +7 -0
- data/sproutcore/frameworks/desktop/english.lproj/toolbar.css +5 -0
- data/sproutcore/frameworks/desktop/english.lproj/touch-scroller.css +196 -0
- data/sproutcore/frameworks/desktop/english.lproj/well.css +71 -0
- data/sproutcore/frameworks/desktop/mixins/border.js +151 -0
- data/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +694 -0
- data/sproutcore/frameworks/desktop/mixins/collection_group.js +22 -0
- data/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +95 -0
- data/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +295 -0
- data/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/sproutcore/frameworks/desktop/mixins/scrollable.js +253 -0
- data/sproutcore/frameworks/desktop/panes/alert.js +457 -0
- data/sproutcore/frameworks/desktop/panes/menu.js +1141 -0
- data/sproutcore/frameworks/desktop/panes/modal.js +71 -0
- data/sproutcore/frameworks/desktop/panes/palette.js +74 -0
- data/sproutcore/frameworks/desktop/panes/panel.js +207 -0
- data/sproutcore/frameworks/desktop/panes/picker.js +796 -0
- data/sproutcore/frameworks/desktop/panes/select_button.js +895 -0
- data/sproutcore/frameworks/desktop/panes/sheet.js +214 -0
- data/sproutcore/frameworks/desktop/protocols/drag_data_source.js +39 -0
- data/sproutcore/frameworks/desktop/protocols/drag_source.js +81 -0
- data/sproutcore/frameworks/desktop/protocols/drop_target.js +175 -0
- data/sproutcore/frameworks/desktop/protocols/responder.js +299 -0
- data/sproutcore/frameworks/desktop/render_delegates/button.js +105 -0
- data/sproutcore/frameworks/desktop/render_delegates/checkbox.js +100 -0
- data/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
- data/sproutcore/frameworks/desktop/render_delegates/disclosure.js +69 -0
- data/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
- data/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
- data/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
- data/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
- data/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
- data/sproutcore/frameworks/desktop/render_delegates/progress.js +187 -0
- data/sproutcore/frameworks/desktop/render_delegates/radio.js +95 -0
- data/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
- data/sproutcore/frameworks/desktop/render_delegates/segment.js +55 -0
- data/sproutcore/frameworks/desktop/render_delegates/segmented.js +77 -0
- data/sproutcore/frameworks/desktop/render_delegates/slider.js +58 -0
- data/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
- data/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
- data/sproutcore/frameworks/desktop/render_delegates/well.js +27 -0
- data/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/sproutcore/frameworks/desktop/system/drag.js +974 -0
- data/sproutcore/frameworks/desktop/system/key_bindings.js +40 -0
- data/sproutcore/frameworks/desktop/system/undo_manager.js +187 -0
- data/sproutcore/frameworks/desktop/tests/integration/dialog.js +48 -0
- data/sproutcore/frameworks/desktop/tests/mixins/border.js +97 -0
- data/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +158 -0
- data/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +135 -0
- data/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +258 -0
- data/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +35 -0
- data/sproutcore/frameworks/desktop/tests/panes/pane_page.js +41 -0
- data/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +83 -0
- data/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +92 -0
- data/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +194 -0
- data/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +220 -0
- data/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +44 -0
- data/sproutcore/frameworks/desktop/tests/views/button/methods.js +166 -0
- data/sproutcore/frameworks/desktop/tests/views/button/ui.js +236 -0
- data/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +126 -0
- data/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +124 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/content.js +249 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/deleteSelection.js +82 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/deselect.js +215 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/displayProperties.js +31 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +300 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/layerIdFor.js +65 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/length.js +88 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +240 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/nowShowing.js +121 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/reload.js +177 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/select.js +240 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js +205 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +211 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/selection.js +141 -0
- data/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +188 -0
- data/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +76 -0
- data/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +456 -0
- data/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +104 -0
- data/sproutcore/frameworks/desktop/tests/views/grid/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/grid/ui.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
- data/sproutcore/frameworks/desktop/tests/views/list/render.js +92 -0
- data/sproutcore/frameworks/desktop/tests/views/list/rowDelegate.js +183 -0
- data/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +133 -0
- data/sproutcore/frameworks/desktop/tests/views/list/rowOffsetForContentIndex.js +131 -0
- data/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +130 -0
- data/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +56 -0
- data/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +205 -0
- data/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +127 -0
- data/sproutcore/frameworks/desktop/tests/views/list_item.js +396 -0
- data/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +46 -0
- data/sproutcore/frameworks/desktop/tests/views/progress/methods.js +128 -0
- data/sproutcore/frameworks/desktop/tests/views/progress/ui.js +421 -0
- data/sproutcore/frameworks/desktop/tests/views/radio/methods.js +119 -0
- data/sproutcore/frameworks/desktop/tests/views/radio/ui.js +349 -0
- data/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +143 -0
- data/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +162 -0
- data/sproutcore/frameworks/desktop/tests/views/scroller.js +118 -0
- data/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +108 -0
- data/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +457 -0
- data/sproutcore/frameworks/desktop/tests/views/select/methods.js +144 -0
- data/sproutcore/frameworks/desktop/tests/views/select/ui.js +224 -0
- data/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +163 -0
- data/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +117 -0
- data/sproutcore/frameworks/desktop/tests/views/separator.js +44 -0
- data/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/split/methods.js +60 -0
- data/sproutcore/frameworks/desktop/tests/views/split/ui.js +59 -0
- data/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +238 -0
- data/sproutcore/frameworks/desktop/tests/views/static_content.js +46 -0
- data/sproutcore/frameworks/desktop/tests/views/tab/methods.js +54 -0
- data/sproutcore/frameworks/desktop/tests/views/tab/ui.js +92 -0
- data/sproutcore/frameworks/desktop/tests/views/toolbar/method.js +33 -0
- data/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +29 -0
- data/sproutcore/frameworks/desktop/tests/views/web/methods.js +10 -0
- data/sproutcore/frameworks/desktop/tests/views/web/ui.js +110 -0
- data/sproutcore/frameworks/desktop/tests/views/well/ui.js +54 -0
- data/sproutcore/frameworks/desktop/views/button.js +564 -0
- data/sproutcore/frameworks/desktop/views/checkbox.js +110 -0
- data/sproutcore/frameworks/desktop/views/collection.js +3090 -0
- data/sproutcore/frameworks/desktop/views/date_field.js +319 -0
- data/sproutcore/frameworks/desktop/views/disclosure.js +68 -0
- data/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/sproutcore/frameworks/desktop/views/grid.js +207 -0
- data/sproutcore/frameworks/desktop/views/image_button.js +74 -0
- data/sproutcore/frameworks/desktop/views/list.js +637 -0
- data/sproutcore/frameworks/desktop/views/list_item.js +923 -0
- data/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
- data/sproutcore/frameworks/desktop/views/menu_item.js +704 -0
- data/sproutcore/frameworks/desktop/views/menu_scroll.js +615 -0
- data/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/sproutcore/frameworks/desktop/views/popup_button.js +299 -0
- data/sproutcore/frameworks/desktop/views/progress.js +197 -0
- data/sproutcore/frameworks/desktop/views/radio.js +347 -0
- data/sproutcore/frameworks/desktop/views/scene.js +204 -0
- data/sproutcore/frameworks/desktop/views/scroll.js +1824 -0
- data/sproutcore/frameworks/desktop/views/scroller.js +917 -0
- data/sproutcore/frameworks/desktop/views/segment.js +104 -0
- data/sproutcore/frameworks/desktop/views/segmented.js +1002 -0
- data/sproutcore/frameworks/desktop/views/select.js +809 -0
- data/sproutcore/frameworks/desktop/views/select_field.js +344 -0
- data/sproutcore/frameworks/desktop/views/separator.js +36 -0
- data/sproutcore/frameworks/desktop/views/slider.js +291 -0
- data/sproutcore/frameworks/desktop/views/source_list.js +49 -0
- data/sproutcore/frameworks/desktop/views/source_list_group.js +169 -0
- data/sproutcore/frameworks/desktop/views/split.js +891 -0
- data/sproutcore/frameworks/desktop/views/split_divider.js +52 -0
- data/sproutcore/frameworks/desktop/views/stacked.js +110 -0
- data/sproutcore/frameworks/desktop/views/static_content.js +134 -0
- data/sproutcore/frameworks/desktop/views/tab.js +186 -0
- data/sproutcore/frameworks/desktop/views/thumb.js +53 -0
- data/sproutcore/frameworks/desktop/views/toolbar.js +88 -0
- data/sproutcore/frameworks/desktop/views/web.js +87 -0
- data/sproutcore/frameworks/desktop/views/well.js +65 -0
- data/sproutcore/frameworks/desktop/views/workspace.js +251 -0
- data/sproutcore/frameworks/documentation/core.js +0 -0
- data/sproutcore/frameworks/experimental/README.md +23 -0
- data/sproutcore/frameworks/experimental/frameworks/device_motion/README.md +11 -0
- data/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +215 -0
- data/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +67 -0
- data/sproutcore/frameworks/experimental/frameworks/polymorphism/README.md +34 -0
- data/sproutcore/frameworks/experimental/frameworks/polymorphism/models/polymorphic_single_attribute.js +183 -0
- data/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +23 -0
- data/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphic/single.js +124 -0
- data/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
- data/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
- data/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
- data/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
- data/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/sproutcore/frameworks/forms/views/form.js +282 -0
- data/sproutcore/frameworks/forms/views/form_row.js +183 -0
- data/sproutcore/frameworks/foundation/.greenhouseconf +35 -0
- data/sproutcore/frameworks/foundation/TESTING +46 -0
- data/sproutcore/frameworks/foundation/controllers/tree.js +127 -0
- data/sproutcore/frameworks/foundation/core.js +0 -0
- data/sproutcore/frameworks/foundation/debug/control_test_pane.js +191 -0
- data/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/sproutcore/frameworks/foundation/english.lproj/blank.gif +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +67 -0
- data/sproutcore/frameworks/foundation/english.lproj/button_view.css +40 -0
- data/sproutcore/frameworks/foundation/english.lproj/debug/control-test-pane.css +9 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-logo.png +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.jpg +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.png +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.jpg +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.png +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup.png +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/sproutcore/frameworks/foundation/english.lproj/inline_editor.css +12 -0
- data/sproutcore/frameworks/foundation/english.lproj/label.css +47 -0
- data/sproutcore/frameworks/foundation/english.lproj/static_layout.css +5 -0
- data/sproutcore/frameworks/foundation/english.lproj/text_field.css +146 -0
- data/sproutcore/frameworks/foundation/fixtures/file_exists.json +1 -0
- data/sproutcore/frameworks/foundation/fixtures/malformed.json +11 -0
- data/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
- data/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
- data/sproutcore/frameworks/foundation/license.js +28 -0
- data/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
- data/sproutcore/frameworks/foundation/mixins/auto_resize.js +233 -0
- data/sproutcore/frameworks/foundation/mixins/button.js +360 -0
- data/sproutcore/frameworks/foundation/mixins/collection_content.js +178 -0
- data/sproutcore/frameworks/foundation/mixins/content_display.js +114 -0
- data/sproutcore/frameworks/foundation/mixins/control.js +422 -0
- data/sproutcore/frameworks/foundation/mixins/editable.js +158 -0
- data/sproutcore/frameworks/foundation/mixins/flowed_layout.js +628 -0
- data/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
- data/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
- data/sproutcore/frameworks/foundation/mixins/inline_text_field.js +589 -0
- data/sproutcore/frameworks/foundation/mixins/inner_frame.js +184 -0
- data/sproutcore/frameworks/foundation/mixins/static_layout.js +77 -0
- data/sproutcore/frameworks/foundation/mixins/string.js +391 -0
- data/sproutcore/frameworks/foundation/mixins/tree_item_content.js +160 -0
- data/sproutcore/frameworks/foundation/mixins/validatable.js +189 -0
- data/sproutcore/frameworks/foundation/private/tree_item_observer.js +914 -0
- data/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +110 -0
- data/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
- data/sproutcore/frameworks/foundation/render_delegates/label.js +139 -0
- data/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
- data/sproutcore/frameworks/foundation/system/benchmark.js +718 -0
- data/sproutcore/frameworks/foundation/system/chance.js +64 -0
- data/sproutcore/frameworks/foundation/system/cookie.js +171 -0
- data/sproutcore/frameworks/foundation/system/core_query.js +56 -0
- data/sproutcore/frameworks/foundation/system/exception_handler.js +88 -0
- data/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/sproutcore/frameworks/foundation/system/image_queue.js +433 -0
- data/sproutcore/frameworks/foundation/system/math.js +57 -0
- data/sproutcore/frameworks/foundation/system/module.js +583 -0
- data/sproutcore/frameworks/foundation/system/request.js +596 -0
- data/sproutcore/frameworks/foundation/system/response.js +550 -0
- data/sproutcore/frameworks/foundation/system/routes.js +519 -0
- data/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
- data/sproutcore/frameworks/foundation/system/task_queue.js +153 -0
- data/sproutcore/frameworks/foundation/system/text_selection.js +103 -0
- data/sproutcore/frameworks/foundation/system/time.js +473 -0
- data/sproutcore/frameworks/foundation/system/user_defaults.js +392 -0
- data/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
- data/sproutcore/frameworks/foundation/system/utils/misc.js +137 -0
- data/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
- data/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
- data/sproutcore/frameworks/foundation/tasks/preload_bundle.js +41 -0
- data/sproutcore/frameworks/foundation/tasks/task.js +17 -0
- data/sproutcore/frameworks/foundation/tests/controllers/tree/outline_case.js +108 -0
- data/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +340 -0
- data/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +10 -0
- data/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +113 -0
- data/sproutcore/frameworks/foundation/tests/integration/creating_views.js +118 -0
- data/sproutcore/frameworks/foundation/tests/mixins/button/content.js +195 -0
- data/sproutcore/frameworks/foundation/tests/mixins/button/displayProperties.js +89 -0
- data/sproutcore/frameworks/foundation/tests/mixins/button/keyEquivalents.js +57 -0
- data/sproutcore/frameworks/foundation/tests/mixins/button/ui.js +69 -0
- data/sproutcore/frameworks/foundation/tests/mixins/content_display.js +51 -0
- data/sproutcore/frameworks/foundation/tests/mixins/control/content.js +168 -0
- data/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +89 -0
- data/sproutcore/frameworks/foundation/tests/mixins/editable/ui.js +44 -0
- data/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js +52 -0
- data/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +238 -0
- data/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/ui.js +64 -0
- data/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +144 -0
- data/sproutcore/frameworks/foundation/tests/mixins/string.js +28 -0
- data/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +74 -0
- data/sproutcore/frameworks/foundation/tests/private/tree_item_observer/flat_case.js +325 -0
- data/sproutcore/frameworks/foundation/tests/private/tree_item_observer/group_case.js +718 -0
- data/sproutcore/frameworks/foundation/tests/private/tree_item_observer/outline_case.js +484 -0
- data/sproutcore/frameworks/foundation/tests/system/cookie.js +179 -0
- data/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +59 -0
- data/sproutcore/frameworks/foundation/tests/system/math.js +39 -0
- data/sproutcore/frameworks/foundation/tests/system/request.js +273 -0
- data/sproutcore/frameworks/foundation/tests/system/routes.js +356 -0
- data/sproutcore/frameworks/foundation/tests/system/task_queue.js +43 -0
- data/sproutcore/frameworks/foundation/tests/system/user_defaults.js +24 -0
- data/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +235 -0
- data/sproutcore/frameworks/foundation/tests/system/utils/range.js +62 -0
- data/sproutcore/frameworks/foundation/tests/validators/credit_card.js +35 -0
- data/sproutcore/frameworks/foundation/tests/validators/date.js +26 -0
- data/sproutcore/frameworks/foundation/tests/validators/not_empty.js +56 -0
- data/sproutcore/frameworks/foundation/tests/validators/number.js +47 -0
- data/sproutcore/frameworks/foundation/tests/validators/password.js +13 -0
- data/sproutcore/frameworks/foundation/tests/validators/validator.js +20 -0
- data/sproutcore/frameworks/foundation/tests/views/container/methods.js +18 -0
- data/sproutcore/frameworks/foundation/tests/views/container/ui.js +145 -0
- data/sproutcore/frameworks/foundation/tests/views/image/ui.js +492 -0
- data/sproutcore/frameworks/foundation/tests/views/label/ui.js +179 -0
- data/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +87 -0
- data/sproutcore/frameworks/foundation/tests/views/text_field/nextValidKeyView.js +110 -0
- data/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +577 -0
- data/sproutcore/frameworks/foundation/validators/credit_card.js +125 -0
- data/sproutcore/frameworks/foundation/validators/date.js +52 -0
- data/sproutcore/frameworks/foundation/validators/date_time.js +48 -0
- data/sproutcore/frameworks/foundation/validators/email.js +45 -0
- data/sproutcore/frameworks/foundation/validators/not_empty.js +37 -0
- data/sproutcore/frameworks/foundation/validators/number.js +99 -0
- data/sproutcore/frameworks/foundation/validators/password.js +86 -0
- data/sproutcore/frameworks/foundation/validators/positive_integer.js +84 -0
- data/sproutcore/frameworks/foundation/validators/validator.js +326 -0
- data/sproutcore/frameworks/foundation/views/container.js +140 -0
- data/sproutcore/frameworks/foundation/views/field.js +337 -0
- data/sproutcore/frameworks/foundation/views/image.js +381 -0
- data/sproutcore/frameworks/foundation/views/label.js +219 -0
- data/sproutcore/frameworks/foundation/views/text_field.js +1073 -0
- data/sproutcore/frameworks/handlebars/extensions.js +44 -0
- data/sproutcore/frameworks/handlebars/extensions/bind.js +156 -0
- data/sproutcore/frameworks/handlebars/extensions/collection.js +75 -0
- data/sproutcore/frameworks/handlebars/extensions/localization.js +5 -0
- data/sproutcore/frameworks/handlebars/extensions/view.js +115 -0
- data/sproutcore/frameworks/handlebars/handlebars.js +1401 -0
- data/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
- data/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
- data/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
- data/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/sproutcore/frameworks/media/.greenhouseconf +29 -0
- data/sproutcore/frameworks/media/resources/controls.png +0 -0
- data/sproutcore/frameworks/media/resources/playeras3.fla +0 -0
- data/sproutcore/frameworks/media/resources/video.css +124 -0
- data/sproutcore/frameworks/media/resources/videoCanvas.swf +0 -0
- data/sproutcore/frameworks/media/views/audio.js +741 -0
- data/sproutcore/frameworks/media/views/controls.js +88 -0
- data/sproutcore/frameworks/media/views/media_slider.js +243 -0
- data/sproutcore/frameworks/media/views/mini_controls.js +63 -0
- data/sproutcore/frameworks/media/views/simple_controls.js +54 -0
- data/sproutcore/frameworks/media/views/video.js +832 -0
- data/sproutcore/frameworks/mini/license.js +29 -0
- data/sproutcore/frameworks/runtime/README +12 -0
- data/sproutcore/frameworks/runtime/core.js +1102 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array.js +14 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +397 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/indexOf.js +33 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/insertAt.js +121 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/objectAt.js +34 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/popObject.js +50 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/pushObject.js +46 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +371 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/removeAt.js +100 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/removeObject.js +49 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/replace.js +94 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/shiftObject.js +50 -0
- data/sproutcore/frameworks/runtime/debug/test_suites/array/unshiftObject.js +47 -0
- data/sproutcore/frameworks/runtime/license.js +29 -0
- data/sproutcore/frameworks/runtime/mixins/array.js +658 -0
- data/sproutcore/frameworks/runtime/mixins/comparable.js +45 -0
- data/sproutcore/frameworks/runtime/mixins/copyable.js +72 -0
- data/sproutcore/frameworks/runtime/mixins/enumerable.js +1426 -0
- data/sproutcore/frameworks/runtime/mixins/freezable.js +110 -0
- data/sproutcore/frameworks/runtime/mixins/observable.js +1408 -0
- data/sproutcore/frameworks/runtime/private/chain_observer.js +178 -0
- data/sproutcore/frameworks/runtime/private/observer_queue.js +178 -0
- data/sproutcore/frameworks/runtime/private/observer_set.js +123 -0
- data/sproutcore/frameworks/runtime/system/binding.js +1000 -0
- data/sproutcore/frameworks/runtime/system/enumerator.js +107 -0
- data/sproutcore/frameworks/runtime/system/error.js +157 -0
- data/sproutcore/frameworks/runtime/system/index_set.js +1199 -0
- data/sproutcore/frameworks/runtime/system/logger.js +1582 -0
- data/sproutcore/frameworks/runtime/system/object.js +947 -0
- data/sproutcore/frameworks/runtime/system/range_observer.js +270 -0
- data/sproutcore/frameworks/runtime/system/run_loop.js +308 -0
- data/sproutcore/frameworks/runtime/system/set.js +536 -0
- data/sproutcore/frameworks/runtime/tests/core/IsEqual.js +30 -0
- data/sproutcore/frameworks/runtime/tests/core/beget.js +23 -0
- data/sproutcore/frameworks/runtime/tests/core/clone.js +108 -0
- data/sproutcore/frameworks/runtime/tests/core/compare.js +44 -0
- data/sproutcore/frameworks/runtime/tests/core/console.js +16 -0
- data/sproutcore/frameworks/runtime/tests/core/guidFor.js +109 -0
- data/sproutcore/frameworks/runtime/tests/core/inspect.js +27 -0
- data/sproutcore/frameworks/runtime/tests/core/itemType.js +71 -0
- data/sproutcore/frameworks/runtime/tests/core/keys.js +20 -0
- data/sproutcore/frameworks/runtime/tests/core/makeArray.js +44 -0
- data/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +19 -0
- data/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +37 -0
- data/sproutcore/frameworks/runtime/tests/mixins/array.js +59 -0
- data/sproutcore/frameworks/runtime/tests/mixins/comparable.js +44 -0
- data/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +658 -0
- data/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +37 -0
- data/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +733 -0
- data/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +155 -0
- data/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +79 -0
- data/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +81 -0
- data/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +55 -0
- data/sproutcore/frameworks/runtime/tests/system/binding.js +395 -0
- data/sproutcore/frameworks/runtime/tests/system/error.js +53 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/add.js +212 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/addEach.js +49 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/clone.js +43 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/contains.js +74 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/create.js +42 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/indexAfter.js +38 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/indexBefore.js +38 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/intersects.js +74 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/max.js +40 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/min.js +50 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/rangeStartForIndex.js +36 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +189 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/removeEach.js +49 -0
- data/sproutcore/frameworks/runtime/tests/system/index_set/without.js +89 -0
- data/sproutcore/frameworks/runtime/tests/system/logger.js +260 -0
- data/sproutcore/frameworks/runtime/tests/system/object/base.js +195 -0
- data/sproutcore/frameworks/runtime/tests/system/object/bindings.js +374 -0
- data/sproutcore/frameworks/runtime/tests/system/object/concatenated_properties.js +71 -0
- data/sproutcore/frameworks/runtime/tests/system/object/enhance.js +177 -0
- data/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
- data/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +59 -0
- data/sproutcore/frameworks/runtime/tests/system/range_observer/destroy.js +75 -0
- data/sproutcore/frameworks/runtime/tests/system/range_observer/objectPropertyDidChange.js +117 -0
- data/sproutcore/frameworks/runtime/tests/system/range_observer/rangeDidChange.js +110 -0
- data/sproutcore/frameworks/runtime/tests/system/range_observer/update.js +65 -0
- data/sproutcore/frameworks/runtime/tests/system/run_loop.js +120 -0
- data/sproutcore/frameworks/runtime/tests/system/set.js +318 -0
- data/sproutcore/frameworks/statechart/core.js +5 -0
- data/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
- data/sproutcore/frameworks/statechart/system/state.js +713 -0
- data/sproutcore/frameworks/statechart/system/statechart.js +951 -0
- data/sproutcore/frameworks/statechart/tests/async.js +94 -0
- data/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
- data/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
- data/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
- data/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
- data/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
- data/sproutcore/frameworks/table/mixins/table_delegate.js +41 -0
- data/sproutcore/frameworks/table/system/table_column.js +125 -0
- data/sproutcore/frameworks/table/views/table.js +440 -0
- data/sproutcore/frameworks/table/views/table_cell.js +63 -0
- data/sproutcore/frameworks/table/views/table_head.js +158 -0
- data/sproutcore/frameworks/table/views/table_header.js +214 -0
- data/sproutcore/frameworks/table/views/table_row.js +155 -0
- data/sproutcore/frameworks/testing/core.js +196 -0
- data/sproutcore/frameworks/testing/english.lproj/additions.css +8 -0
- data/sproutcore/frameworks/testing/english.lproj/runner.css +128 -0
- data/sproutcore/frameworks/testing/english.lproj/testsuite.css +136 -0
- data/sproutcore/frameworks/testing/extras.js +17 -0
- data/sproutcore/frameworks/testing/jquery.js +3559 -0
- data/sproutcore/frameworks/testing/qunit.js +827 -0
- data/sproutcore/frameworks/testing/system/dump.js +205 -0
- data/sproutcore/frameworks/testing/system/equiv.js +201 -0
- data/sproutcore/frameworks/testing/system/plan.js +703 -0
- data/sproutcore/frameworks/testing/system/runner.js +220 -0
- data/sproutcore/frameworks/testing/system/suite.js +228 -0
- data/sproutcore/frameworks/testing/utils.js +62 -0
- data/sproutcore/lib/index.rhtml +164 -0
- data/sproutcore/license.js +31 -0
- data/sproutcore/themes/ace/designs/dark.png +0 -0
- data/sproutcore/themes/ace/designs/dark.psd +0 -0
- data/sproutcore/themes/ace/designs/light.png +0 -0
- data/sproutcore/themes/ace/designs/light.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/panel/pointers.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
- data/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
- data/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
- data/sproutcore/themes/ace/resources/body.css +13 -0
- data/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/18px/button.css +33 -0
- data/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/button.css +98 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/button.css +78 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/44px/button.css +39 -0
- data/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/ace/button.css +36 -0
- data/sproutcore/themes/ace/resources/button/button.js +75 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/button.css +93 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/button.css +72 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
- data/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
- data/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
- data/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
- data/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
- data/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
- data/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
- data/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
- data/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
- data/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
- data/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
- data/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
- data/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
- data/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
- data/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
- data/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
- data/sproutcore/themes/ace/resources/imagebutton/ace/imagebutton.css +11 -0
- data/sproutcore/themes/ace/resources/loading.css +50 -0
- data/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
- data/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
- data/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
- data/sproutcore/themes/ace/resources/menu/down.png +0 -0
- data/sproutcore/themes/ace/resources/menu/menu.css +75 -0
- data/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/sproutcore/themes/ace/resources/menu/up.png +0 -0
- data/sproutcore/themes/ace/resources/pane/pane.css +3 -0
- data/sproutcore/themes/ace/resources/panel/panel.css +13 -0
- data/sproutcore/themes/ace/resources/panel/panel.js +20 -0
- data/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/sproutcore/themes/ace/resources/picker/ace/picker.css +41 -0
- data/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
- data/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
- data/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
- data/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
- data/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
- data/sproutcore/themes/ace/resources/progress/progress.js +78 -0
- data/sproutcore/themes/ace/resources/radio/radio.css +63 -0
- data/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
- data/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
- data/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
- data/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
- data/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
- data/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
- data/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
- data/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
- data/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
- data/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
- data/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
- data/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
- data/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
- data/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
- data/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
- data/sproutcore/themes/ace/resources/segmented/segmented.css +83 -0
- data/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
- data/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
- data/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
- data/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
- data/sproutcore/themes/ace/resources/slider/ace/slider.css +7 -0
- data/sproutcore/themes/ace/resources/slider/ace/slider.js +56 -0
- data/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/sproutcore/themes/ace/resources/split/split.css +5 -0
- data/sproutcore/themes/ace/resources/tab/tab.css +3 -0
- data/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
- data/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
- data/sproutcore/themes/ace/resources/well/well.css +7 -0
- data/sproutcore/themes/ace/resources/well/well.js +17 -0
- data/sproutcore/themes/ace/theme.js +14 -0
- data/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +69 -0
- data/sproutcore/themes/empty_theme/theme.js +16 -0
- data/sproutcore/themes/iphone_theme/english.lproj/button.css +41 -0
- data/sproutcore/themes/iphone_theme/english.lproj/core.css +8 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/backButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/blueButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/cancel.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/grayButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/leftButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/listArrow.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/listArrowSel.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/listGroup.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/loading.gif +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/pinstripes.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/rightButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/selection.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/thumb.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/toggle.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/toggleOn.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/toolButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/toolbar.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/images/whiteButton.png +0 -0
- data/sproutcore/themes/iphone_theme/english.lproj/strings.js +15 -0
- data/sproutcore/themes/standard_theme/Source/Panel.drawit/Data +0 -0
- data/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Preview.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/SproutCore Theme Buttons.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/Data +0 -0
- data/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Preview.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/10.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/100.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/102.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/110.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/120.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/127.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/18.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/19.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/2.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/24.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/26.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/27.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/28.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/29.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/30.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/31.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/33.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/37.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/41.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/16/99.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/10.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/100.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/102.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/110.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/120.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/127.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/18.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/19.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/2.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/24.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/26.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/27.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/28.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/29.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/30.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/31.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/33.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/37.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/41.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/24/99.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/10.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/100.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/102.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/110.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/120.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/127.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/18.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/19.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/2.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/24.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/26.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/27.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/28.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/29.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/30.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/31.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/33.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/37.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/41.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/32/99.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/48/10.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/48/18.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/48/19.png +0 -0
- data/sproutcore/themes/standard_theme/Source/icons/48/2.png +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/Data +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Preview.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/Data +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Preview.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x-2.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/sc-theme-sprite.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/sc-theme-ysprite.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/shared-icons.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/sproutcore-logo.psd +0 -0
- data/sproutcore/themes/standard_theme/Source/sticky-note.psd +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/button.css +399 -0
- data/sproutcore/themes/standard_theme/english.lproj/checkbox.css +78 -0
- data/sproutcore/themes/standard_theme/english.lproj/collection.css +135 -0
- data/sproutcore/themes/standard_theme/english.lproj/core.css +76 -0
- data/sproutcore/themes/standard_theme/english.lproj/disclosure.css +57 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/icons/mini_222222.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/icons/mini_454545.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/icons/mini_888888.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/icons/mini_ffffff.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/panels/sprite-x.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/panels/sprite-y.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-repeat-x.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-repeat-y.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-sprite.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-repeat-x.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-ysprite.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/images/sc-toolbar-view.png +0 -0
- data/sproutcore/themes/standard_theme/english.lproj/label.css +11 -0
- data/sproutcore/themes/standard_theme/english.lproj/list_item.css +82 -0
- data/sproutcore/themes/standard_theme/english.lproj/menu.css +20 -0
- data/sproutcore/themes/standard_theme/english.lproj/menu_item_view.css +36 -0
- data/sproutcore/themes/standard_theme/english.lproj/pane.css +18 -0
- data/sproutcore/themes/standard_theme/english.lproj/panel.css +33 -0
- data/sproutcore/themes/standard_theme/english.lproj/picker.css +17 -0
- data/sproutcore/themes/standard_theme/english.lproj/progress.css +27 -0
- data/sproutcore/themes/standard_theme/english.lproj/radio.css +125 -0
- data/sproutcore/themes/standard_theme/english.lproj/scroller.css +159 -0
- data/sproutcore/themes/standard_theme/english.lproj/segmented.css +270 -0
- data/sproutcore/themes/standard_theme/english.lproj/slider.css +94 -0
- data/sproutcore/themes/standard_theme/english.lproj/split_view.css +11 -0
- data/sproutcore/themes/standard_theme/english.lproj/tab.css +14 -0
- data/sproutcore/themes/standard_theme/english.lproj/table.css +14 -0
- data/sproutcore/themes/standard_theme/english.lproj/text_field.css +5 -0
- data/sproutcore/themes/standard_theme/english.lproj/toolbar.css +7 -0
- data/sproutcore/themes/standard_theme/english.lproj/well.css +36 -0
- data/test-spade.html +8 -0
- metadata +2111 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2010 Apple Inc. and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals module ok equals same test MyApp */
|
7
|
+
|
8
|
+
|
9
|
+
var store, storeKey1, storeKey2, storeKey3, storeKey4, storeKey5, storeKey6;
|
10
|
+
var storeKey7, storeKey8, json, json1, json2, json3, json4, json5, json6 ;
|
11
|
+
var json7, json8;
|
12
|
+
|
13
|
+
module("SC.Store#retrieveRecord", {
|
14
|
+
setup: function() {
|
15
|
+
|
16
|
+
store = SC.Store.create();
|
17
|
+
|
18
|
+
json1 = {
|
19
|
+
guid: "retrieveGUID1",
|
20
|
+
string: "string",
|
21
|
+
number: 23,
|
22
|
+
bool: YES
|
23
|
+
};
|
24
|
+
json2 = {
|
25
|
+
guid: "retrieveGUID2",
|
26
|
+
string: "string",
|
27
|
+
number: 23,
|
28
|
+
bool: YES
|
29
|
+
};
|
30
|
+
json3 = {
|
31
|
+
guid: "retrieveGUID3",
|
32
|
+
string: "string",
|
33
|
+
number: 23,
|
34
|
+
bool: YES
|
35
|
+
};
|
36
|
+
json4 = {
|
37
|
+
guid: "retrieveGUID4",
|
38
|
+
string: "string",
|
39
|
+
number: 23,
|
40
|
+
bool: YES
|
41
|
+
};
|
42
|
+
json5 = {
|
43
|
+
guid: "retrieveGUID5",
|
44
|
+
string: "string",
|
45
|
+
number: 23,
|
46
|
+
bool: YES
|
47
|
+
};
|
48
|
+
json6 = {
|
49
|
+
guid: "retrieveGUID6",
|
50
|
+
string: "string",
|
51
|
+
number: 23,
|
52
|
+
bool: YES
|
53
|
+
};
|
54
|
+
json7 = {
|
55
|
+
guid: "retrieveGUID7",
|
56
|
+
string: "string",
|
57
|
+
number: 23,
|
58
|
+
bool: YES
|
59
|
+
};
|
60
|
+
json8 = {
|
61
|
+
guid: "retrieveGUID8",
|
62
|
+
string: "string",
|
63
|
+
number: 23,
|
64
|
+
bool: YES
|
65
|
+
};
|
66
|
+
|
67
|
+
storeKey1 = SC.Store.generateStoreKey();
|
68
|
+
store.writeDataHash(storeKey1, json1, SC.Record.EMPTY);
|
69
|
+
storeKey2 = SC.Store.generateStoreKey();
|
70
|
+
store.writeDataHash(storeKey2, json2, SC.Record.ERROR);
|
71
|
+
storeKey3 = SC.Store.generateStoreKey();
|
72
|
+
store.writeDataHash(storeKey3, json3, SC.Record.DESTROYED_CLEAN);
|
73
|
+
storeKey4 = SC.Store.generateStoreKey();
|
74
|
+
store.writeDataHash(storeKey4, json4, SC.Record.BUSY_DESTROYING);
|
75
|
+
storeKey5 = SC.Store.generateStoreKey();
|
76
|
+
store.writeDataHash(storeKey5, json5, SC.Record.BUSY_CREATING);
|
77
|
+
storeKey6 = SC.Store.generateStoreKey();
|
78
|
+
store.writeDataHash(storeKey6, json6, SC.Record.BUSY_COMMITTING);
|
79
|
+
storeKey7 = SC.Store.generateStoreKey();
|
80
|
+
store.writeDataHash(storeKey7, json7, SC.Record.DESTROYED_DIRTY);
|
81
|
+
storeKey8 = SC.Store.generateStoreKey();
|
82
|
+
store.writeDataHash(storeKey8, json8, SC.Record.READY_CLEAN);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
|
86
|
+
function testStates(canLoad) {
|
87
|
+
var msg, status;
|
88
|
+
|
89
|
+
SC.RunLoop.begin();
|
90
|
+
|
91
|
+
store.retrieveRecord(undefined, undefined, storeKey1, YES);
|
92
|
+
status = store.readStatus( storeKey1);
|
93
|
+
if (canLoad) {
|
94
|
+
equals(status, SC.Record.BUSY_LOADING, "the status should have changed to BUSY_LOADING");
|
95
|
+
} else {
|
96
|
+
equals(status, SC.Record.ERROR, "the status should remain empty");
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
store.retrieveRecord(undefined, undefined, storeKey2, YES);
|
101
|
+
status = store.readStatus( storeKey2);
|
102
|
+
if (canLoad) {
|
103
|
+
equals(status, SC.Record.BUSY_LOADING, "the status should have changed to BUSY_LOADING");
|
104
|
+
} else {
|
105
|
+
equals(status, SC.Record.ERROR, "the status should become empty");
|
106
|
+
}
|
107
|
+
|
108
|
+
store.retrieveRecord(undefined, undefined, storeKey3, YES);
|
109
|
+
status = store.readStatus( storeKey3);
|
110
|
+
if (canLoad) {
|
111
|
+
equals(status, SC.Record.BUSY_LOADING, "the status should have changed to BUSY_LOADING");
|
112
|
+
} else {
|
113
|
+
equals(status, SC.Record.ERROR, "the status should become empty");
|
114
|
+
}
|
115
|
+
|
116
|
+
try{
|
117
|
+
store.retrieveRecord(undefined, undefined, storeKey4, YES);
|
118
|
+
msg='';
|
119
|
+
}catch(error1){
|
120
|
+
msg=error1.message;
|
121
|
+
}
|
122
|
+
equals(msg, SC.Record.BUSY_ERROR.message, "should throw error");
|
123
|
+
|
124
|
+
try{
|
125
|
+
store.retrieveRecord(undefined, undefined, storeKey5, YES);
|
126
|
+
msg='';
|
127
|
+
}catch(error2){
|
128
|
+
msg=error2.message;
|
129
|
+
}
|
130
|
+
equals(msg, SC.Record.BUSY_ERROR.message, "should throw error");
|
131
|
+
|
132
|
+
try{
|
133
|
+
store.retrieveRecord(undefined, undefined, storeKey6, YES);
|
134
|
+
msg='';
|
135
|
+
}catch(error3){
|
136
|
+
msg=error3.message;
|
137
|
+
}
|
138
|
+
equals(msg, SC.Record.BUSY_ERROR.message, "should throw error");
|
139
|
+
|
140
|
+
try{
|
141
|
+
store.retrieveRecord(undefined, undefined, storeKey7, YES);
|
142
|
+
msg='';
|
143
|
+
}catch(error4){
|
144
|
+
msg=error4.message;
|
145
|
+
}
|
146
|
+
equals(msg, SC.Record.BAD_STATE_ERROR.message, "should throw error");
|
147
|
+
|
148
|
+
|
149
|
+
store.retrieveRecord(undefined, undefined, storeKey8, YES);
|
150
|
+
status = store.readStatus( storeKey8);
|
151
|
+
if (canLoad) {
|
152
|
+
ok(SC.Record.BUSY_REFRESH | (status & 0x03), "the status changed to BUSY_REFRESH.");
|
153
|
+
} else {
|
154
|
+
equals(status, SC.Record.READY_CLEAN, "the status should remain ready clean");
|
155
|
+
}
|
156
|
+
|
157
|
+
SC.RunLoop.end();
|
158
|
+
}
|
159
|
+
|
160
|
+
test("Retrieve a record without a data source", function() {
|
161
|
+
testStates(NO);
|
162
|
+
});
|
163
|
+
|
164
|
+
test("Retrieve a record without a working data source and check for different errors and states", function() {
|
165
|
+
// build a fake data source that claims to NOT handle retrieval
|
166
|
+
var source = SC.DataSource.create({
|
167
|
+
retrieveRecords: function() { return NO ; }
|
168
|
+
});
|
169
|
+
store.set('dataSource', source);
|
170
|
+
|
171
|
+
testStates(NO);
|
172
|
+
|
173
|
+
});
|
174
|
+
|
175
|
+
test("Retrieve a record with working data source and check for different errors and states", function() {
|
176
|
+
// build a fake data source that claims to handle retrieval
|
177
|
+
var source = SC.DataSource.create({
|
178
|
+
retrieveRecords: function() { return YES ; }
|
179
|
+
});
|
180
|
+
store.set('dataSource', source);
|
181
|
+
|
182
|
+
testStates(YES);
|
183
|
+
|
184
|
+
});
|
185
|
+
|
186
|
+
test("Retrieve a record with callback", function() {
|
187
|
+
// build a fake data source that claims to handle retrieval
|
188
|
+
var source = SC.DataSource.create({
|
189
|
+
retrieveRecords: function() { return YES ; }
|
190
|
+
});
|
191
|
+
store.set('dataSource', source);
|
192
|
+
var callback = NO;
|
193
|
+
store.retrieveRecord(undefined, undefined, storeKey1, YES, function(){callback = YES;});
|
194
|
+
|
195
|
+
ok(store._callback_queue[storeKey1], "The callback exists in the queue");
|
196
|
+
|
197
|
+
store.dataSourceDidComplete(storeKey1);
|
198
|
+
|
199
|
+
ok(callback, "Callback did fire");
|
200
|
+
});
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2010 Apple Inc. and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
|
7
|
+
var store, TestRecord;
|
8
|
+
|
9
|
+
module("SC.Store#unloadRecords", {
|
10
|
+
setup: function() {
|
11
|
+
TestRecord = SC.Record.extend({
|
12
|
+
name: SC.Record.attr(String)
|
13
|
+
});
|
14
|
+
|
15
|
+
SC.RunLoop.begin();
|
16
|
+
|
17
|
+
store = SC.Store.create();
|
18
|
+
|
19
|
+
store.createRecord(TestRecord, {
|
20
|
+
name: 'Foo'
|
21
|
+
});
|
22
|
+
|
23
|
+
store.createRecord(TestRecord, {
|
24
|
+
name: 'Bar'
|
25
|
+
});
|
26
|
+
|
27
|
+
store.createRecord(TestRecord, {
|
28
|
+
name: 'Baz'
|
29
|
+
});
|
30
|
+
|
31
|
+
SC.RunLoop.end();
|
32
|
+
}
|
33
|
+
});
|
34
|
+
|
35
|
+
test("Unload all records of a record type", function() {
|
36
|
+
var records = store.find(TestRecord);
|
37
|
+
equals(records.get('length'), 3, "Store starts with 3 records loaded");
|
38
|
+
store.unloadRecords(TestRecord);
|
39
|
+
records = store.find(TestRecord);
|
40
|
+
equals(records.get('length'), 0, "Number of TestRecord records left");
|
41
|
+
});
|
@@ -0,0 +1,125 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2010 Apple Inc. and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals module ok equals same test MyApp */
|
7
|
+
|
8
|
+
// NOTE: The test below are based on the Data Hashes state chart. This models
|
9
|
+
// the "write" event in the NestedStore portion of the diagram.
|
10
|
+
|
11
|
+
var store, child, storeKey, json;
|
12
|
+
module("SC.Store#writeDataHash", {
|
13
|
+
setup: function() {
|
14
|
+
store = SC.Store.create();
|
15
|
+
|
16
|
+
json = {
|
17
|
+
string: "string",
|
18
|
+
number: 23,
|
19
|
+
bool: YES
|
20
|
+
};
|
21
|
+
|
22
|
+
storeKey = SC.Store.generateStoreKey();
|
23
|
+
child = store.chain(); // test multiple levels deep
|
24
|
+
}
|
25
|
+
});
|
26
|
+
|
27
|
+
// ..........................................................
|
28
|
+
// BASIC STATE TRANSITIONS
|
29
|
+
//
|
30
|
+
|
31
|
+
// The transition from each base state performs the same operation, so just
|
32
|
+
// run the same test on each state.
|
33
|
+
function testWriteDataHash() {
|
34
|
+
var oldrev = store.revisions[storeKey];
|
35
|
+
|
36
|
+
// perform test
|
37
|
+
var json2 = { foo: "bar" };
|
38
|
+
equals(store.writeDataHash(storeKey, json2, SC.Record.READY_NEW), store, 'should return receiver');
|
39
|
+
|
40
|
+
// verify
|
41
|
+
equals(store.storeKeyEditState(storeKey), SC.Store.EDITABLE, 'new edit state should be editable');
|
42
|
+
|
43
|
+
equals(store.readDataHash(storeKey), json2, 'should have new json data hash');
|
44
|
+
equals(store.readStatus(storeKey), SC.Record.READY_NEW, 'should have new status');
|
45
|
+
|
46
|
+
equals(store.revisions[storeKey], oldrev, 'should not change revision');
|
47
|
+
if (!SC.none(oldrev)) {
|
48
|
+
ok(store.revisions.hasOwnProperty(storeKey), 'should clone reference to revision');
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
test("edit state=LOCKED - also writes a NEW hash", function() {
|
54
|
+
|
55
|
+
// test preconditions
|
56
|
+
equals(store.storeKeyEditState(storeKey), SC.Store.LOCKED, 'precond - edit state should be locked');
|
57
|
+
|
58
|
+
testWriteDataHash();
|
59
|
+
});
|
60
|
+
|
61
|
+
test("edit state=EDITABLE - also overwrites an EXISTING hash", function() {
|
62
|
+
|
63
|
+
// test preconditions
|
64
|
+
store.writeDataHash(storeKey, { foo: "bar" });
|
65
|
+
equals(store.storeKeyEditState(storeKey), SC.Store.EDITABLE, 'precond - edit state should be editable');
|
66
|
+
|
67
|
+
testWriteDataHash();
|
68
|
+
|
69
|
+
});
|
70
|
+
|
71
|
+
// ..........................................................
|
72
|
+
// PROPOGATING TO NESTED STORES
|
73
|
+
//
|
74
|
+
|
75
|
+
test("change should propogate to child if child edit state = INHERITED", function() {
|
76
|
+
|
77
|
+
// verify preconditions
|
78
|
+
equals(child.storeKeyEditState(storeKey), SC.Store.INHERITED, 'precond - child edit state should be INHERITED');
|
79
|
+
|
80
|
+
// perform change
|
81
|
+
var json2 = { version: 2 };
|
82
|
+
store.writeDataHash(storeKey, json2, SC.Record.READY_NEW);
|
83
|
+
|
84
|
+
// verify
|
85
|
+
same(child.readDataHash(storeKey), json2, 'child should pick up change');
|
86
|
+
equals(child.readStatus(storeKey), SC.Record.READY_NEW, 'child should pick up new status');
|
87
|
+
});
|
88
|
+
|
89
|
+
|
90
|
+
function testLockedOrEditableChild() {
|
91
|
+
// perform change
|
92
|
+
var json2 = { version: 2 };
|
93
|
+
store.writeDataHash(storeKey, json2, SC.Record.READY_NEW);
|
94
|
+
|
95
|
+
// verify
|
96
|
+
same(child.readDataHash(storeKey), json, 'child should NOT pick up change');
|
97
|
+
equals(child.readStatus(storeKey), SC.Record.READY_CLEAN, 'child should pick up new status');
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
test("change should not propogate to child if child edit state = LOCKED", function() {
|
102
|
+
store.writeDataHash(storeKey, json, SC.Record.READY_CLEAN);
|
103
|
+
store.editables = null ; // clear to simulate locked mode.
|
104
|
+
|
105
|
+
// verify preconditions
|
106
|
+
child.readDataHash(storeKey);
|
107
|
+
equals(child.storeKeyEditState(storeKey), SC.Store.LOCKED, 'precond - child edit state should be LOCKED');
|
108
|
+
|
109
|
+
testLockedOrEditableChild();
|
110
|
+
});
|
111
|
+
|
112
|
+
test("change should not propogate to child if child edit state = EDITABLE", function() {
|
113
|
+
store.writeDataHash(storeKey, json, SC.Record.READY_CLEAN);
|
114
|
+
store.editables = null ; // clear to simulate locked mode.
|
115
|
+
|
116
|
+
// verify preconditions
|
117
|
+
child.readEditableDataHash(storeKey);
|
118
|
+
equals(child.storeKeyEditState(storeKey), SC.Store.EDITABLE, 'precond - child edit state should be EDITABLE');
|
119
|
+
|
120
|
+
testLockedOrEditableChild();
|
121
|
+
});
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
SC.stringsFor('English', {
|
9
|
+
'_SC.DateTime.dayNames': 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday',
|
10
|
+
'_SC.DateTime.abbreviatedDayNames': 'Sun Mon Tue Wed Thu Fri Sat',
|
11
|
+
'_SC.DateTime.monthNames': 'January February March April May June July August September October November December',
|
12
|
+
'_SC.DateTime.abbreviatedMonthNames': 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'
|
13
|
+
}) ;
|
14
|
+
|
@@ -0,0 +1,1111 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
/**
|
9
|
+
Standard error thrown by SC.Scanner when it runs out of bounds
|
10
|
+
|
11
|
+
@property {Error}
|
12
|
+
*/
|
13
|
+
SC.SCANNER_OUT_OF_BOUNDS_ERROR = new Error("Out of bounds.");
|
14
|
+
|
15
|
+
/**
|
16
|
+
Standard error thrown by SC.Scanner when you pass a value not an integer.
|
17
|
+
|
18
|
+
@property {Error}
|
19
|
+
*/
|
20
|
+
SC.SCANNER_INT_ERROR = new Error("Not an int.");
|
21
|
+
|
22
|
+
/**
|
23
|
+
Standard error thrown by SC.SCanner when it cannot find a string to skip.
|
24
|
+
|
25
|
+
@property {Error}
|
26
|
+
*/
|
27
|
+
SC.SCANNER_SKIP_ERROR = new Error("Did not find the string to skip.");
|
28
|
+
|
29
|
+
/**
|
30
|
+
Standard error thrown by SC.Scanner when it can any kind a string in the
|
31
|
+
matching array.
|
32
|
+
*/
|
33
|
+
SC.SCANNER_SCAN_ARRAY_ERROR = new Error("Did not find any string of the given array to scan.");
|
34
|
+
|
35
|
+
/**
|
36
|
+
Standard error thrown when trying to compare two dates in different
|
37
|
+
timezones.
|
38
|
+
|
39
|
+
@property {Error}
|
40
|
+
*/
|
41
|
+
SC.DATETIME_COMPAREDATE_TIMEZONE_ERROR = new Error("Can't compare the dates of two DateTimes that don't have the same timezone.");
|
42
|
+
|
43
|
+
/**
|
44
|
+
Standard ISO8601 date format
|
45
|
+
|
46
|
+
@property {String}
|
47
|
+
*/
|
48
|
+
SC.DATETIME_ISO8601 = '%Y-%m-%dT%H:%M:%S%Z';
|
49
|
+
|
50
|
+
|
51
|
+
/** @class
|
52
|
+
|
53
|
+
A Scanner reads a string and interprets the characters into numbers. You
|
54
|
+
assign the scanner's string on initialization and the scanner progresses
|
55
|
+
through the characters of that string from beginning to end as you request
|
56
|
+
items.
|
57
|
+
|
58
|
+
Scanners are used by DateTime to convert strings into DateTime objects.
|
59
|
+
|
60
|
+
@extends SC.Object
|
61
|
+
@since SproutCore 1.0
|
62
|
+
@author Martin Ottenwaelter
|
63
|
+
*/
|
64
|
+
SC.Scanner = SC.Object.extend(
|
65
|
+
/** @scope SC.Scanner.prototype */ {
|
66
|
+
|
67
|
+
/**
|
68
|
+
The string to scan. You usually pass it to the create method:
|
69
|
+
|
70
|
+
{{{
|
71
|
+
SC.Scanner.create({string: 'May, 8th'});
|
72
|
+
}}}
|
73
|
+
|
74
|
+
@property
|
75
|
+
@type {String}
|
76
|
+
*/
|
77
|
+
string: null,
|
78
|
+
|
79
|
+
/**
|
80
|
+
The current scan location. It is incremented by the scanner as the
|
81
|
+
characters are processed.
|
82
|
+
The default is 0: the beginning of the string.
|
83
|
+
|
84
|
+
@property
|
85
|
+
@type {integer}
|
86
|
+
*/
|
87
|
+
scanLocation: 0,
|
88
|
+
|
89
|
+
/**
|
90
|
+
Reads some characters from the string, and increments the scan location
|
91
|
+
accordingly.
|
92
|
+
|
93
|
+
@param {integer} len the amount of characters to read
|
94
|
+
@throws {SC.SCANNER_OUT_OF_BOUNDS_ERROR} if asked to read too many characters
|
95
|
+
@returns {String} the characters
|
96
|
+
*/
|
97
|
+
scan: function(len) {
|
98
|
+
if (this.scanLocation + len > this.length) throw SC.SCANNER_OUT_OF_BOUNDS_ERROR;
|
99
|
+
var str = this.string.substr(this.scanLocation, len);
|
100
|
+
this.scanLocation += len;
|
101
|
+
return str;
|
102
|
+
},
|
103
|
+
|
104
|
+
/**
|
105
|
+
Reads some characters from the string and interprets it as an integer.
|
106
|
+
|
107
|
+
@param {integer} min_len the minimum amount of characters to read
|
108
|
+
@param {integer} max_len optionally the maximum amount of characters to read (defaults to the minimum)
|
109
|
+
@throws {SC.SCANNER_INT_ERROR} if asked to read non numeric characters
|
110
|
+
@returns {integer} the scanned integer
|
111
|
+
*/
|
112
|
+
scanInt: function(min_len, max_len) {
|
113
|
+
if (max_len === undefined) max_len = min_len;
|
114
|
+
var str = this.scan(max_len);
|
115
|
+
var re = new RegExp("^\\d{" + min_len + "," + max_len + "}");
|
116
|
+
var match = str.match(re);
|
117
|
+
if (!match) throw SC.SCANNER_INT_ERROR;
|
118
|
+
if (match[0].length < max_len) {
|
119
|
+
this.scanLocation += match[0].length - max_len;
|
120
|
+
}
|
121
|
+
return parseInt(match[0], 10);
|
122
|
+
},
|
123
|
+
|
124
|
+
/**
|
125
|
+
Attempts to skip a given string.
|
126
|
+
|
127
|
+
@param {String} str the string to skip
|
128
|
+
@throws {SC.SCANNER_SKIP_ERROR} if the given string could not be scanned
|
129
|
+
@returns {Boolean} YES if the given string was successfully scanned
|
130
|
+
*/
|
131
|
+
skipString: function(str) {
|
132
|
+
if (this.scan(str.length) !== str) throw SC.SCANNER_SKIP_ERROR;
|
133
|
+
return YES;
|
134
|
+
},
|
135
|
+
|
136
|
+
/**
|
137
|
+
Attempts to scan any string in a given array.
|
138
|
+
|
139
|
+
@param {Array} ary the array of strings to scan
|
140
|
+
@throws {SC.SCANNER_SCAN_ARRAY_ERROR} if no string of the given array is found
|
141
|
+
@returns {integer} the index of the scanned string of the given array
|
142
|
+
*/
|
143
|
+
scanArray: function(ary) {
|
144
|
+
for (var i = 0, len = ary.length; i < len; i++) {
|
145
|
+
if (this.scan(ary[i].length) === ary[i]) {
|
146
|
+
return i;
|
147
|
+
}
|
148
|
+
this.scanLocation -= ary[i].length;
|
149
|
+
}
|
150
|
+
throw SC.SCANNER_SCAN_ARRAY_ERROR;
|
151
|
+
}
|
152
|
+
|
153
|
+
});
|
154
|
+
|
155
|
+
|
156
|
+
/** @class
|
157
|
+
|
158
|
+
A class representation of a date and time. It's basically a wrapper around
|
159
|
+
the Date javascript object, KVO friendly and with common date/time
|
160
|
+
manipulation methods.
|
161
|
+
|
162
|
+
This object differs from the standard JS Date object, however, in that it
|
163
|
+
supports time zones other than UTC and that local to the machine on which
|
164
|
+
it is running. Any time zone can be specified when creating an SC.DateTime
|
165
|
+
object, e.g
|
166
|
+
|
167
|
+
// Creates a DateTime representing 5am in Washington, DC and 10am in London
|
168
|
+
var d = SC.DateTime.create({ hour: 5, timezone: 300 }); // -5 hours from UTC
|
169
|
+
var e = SC.DateTime.create({ hour: 10, timezone: 0 }); // same time, specified in UTC
|
170
|
+
|
171
|
+
and it is true that d.isEqual(e).
|
172
|
+
|
173
|
+
The time zone specified upon creation is permanent, and any calls to get() on that
|
174
|
+
instance will return values expressed in that time zone. So,
|
175
|
+
|
176
|
+
d.get('hour') returns 5.
|
177
|
+
e.get('hour') returns 10.
|
178
|
+
|
179
|
+
but
|
180
|
+
|
181
|
+
d.get('milliseconds') === e.get('milliseconds') is true, since they are technically the same position in time.
|
182
|
+
|
183
|
+
@extends SC.Object
|
184
|
+
@extends SC.Freezable
|
185
|
+
@extends SC.Copyable
|
186
|
+
@author Martin Ottenwaelter
|
187
|
+
@author Jonathan Lewis
|
188
|
+
@author Josh Holt
|
189
|
+
@since SproutCore 1.0
|
190
|
+
*/
|
191
|
+
SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
192
|
+
/** @scope SC.DateTime.prototype */ {
|
193
|
+
|
194
|
+
/** @private
|
195
|
+
Internal representation of a date: the number of milliseconds
|
196
|
+
since January, 1st 1970 00:00:00.0 UTC.
|
197
|
+
|
198
|
+
@property
|
199
|
+
@type {Integer}
|
200
|
+
*/
|
201
|
+
_ms: 0,
|
202
|
+
|
203
|
+
/** @read-only
|
204
|
+
The offset, in minutes, between UTC and the object's timezone.
|
205
|
+
All calls to get() will use this time zone to translate date/time
|
206
|
+
values into the zone specified here.
|
207
|
+
|
208
|
+
@property
|
209
|
+
@type {Integer}
|
210
|
+
*/
|
211
|
+
timezone: 0,
|
212
|
+
|
213
|
+
/**
|
214
|
+
A DateTime instance is frozen by default for better performance.
|
215
|
+
|
216
|
+
@property
|
217
|
+
@type {Boolean}
|
218
|
+
*/
|
219
|
+
isFrozen: YES,
|
220
|
+
|
221
|
+
/**
|
222
|
+
Returns a new DateTime object where one or more of the elements have been
|
223
|
+
changed according to the options parameter. The time options (hour,
|
224
|
+
minute, sec, usec) reset cascadingly, so if only the hour is passed, then
|
225
|
+
minute, sec, and usec is set to 0. If the hour and minute is passed, then
|
226
|
+
sec and usec is set to 0.
|
227
|
+
|
228
|
+
(Parts copied from the Ruby On Rails documentation)
|
229
|
+
|
230
|
+
If a time zone is passed in the options hash, all dates and times are assumed
|
231
|
+
to be local to it, and the returned DateTime instance has that time zone. If
|
232
|
+
none is passed, it defaults to SC.DateTime.timezone.
|
233
|
+
|
234
|
+
Note that passing only a time zone does not affect the actual milliseconds since
|
235
|
+
Jan 1, 1970, only the time zone in which it is expressed when displayed.
|
236
|
+
|
237
|
+
@see SC.DateTime#create for the list of options you can pass
|
238
|
+
@returns {DateTime} copy of receiver
|
239
|
+
*/
|
240
|
+
adjust: function(options, resetCascadingly) {
|
241
|
+
var timezone;
|
242
|
+
|
243
|
+
options = options ? SC.clone(options) : {};
|
244
|
+
timezone = (options.timezone !== undefined) ? options.timezone : (this.timezone !== undefined) ? this.timezone : 0;
|
245
|
+
|
246
|
+
return this.constructor._adjust(options, this._ms, timezone, resetCascadingly)._createFromCurrentState();
|
247
|
+
},
|
248
|
+
|
249
|
+
/**
|
250
|
+
Returns a new DateTime object advanced according the the given parameters.
|
251
|
+
Don't use floating point values, it might give unpredicatble results.
|
252
|
+
|
253
|
+
@see SC.DateTime#create for the list of options you can pass
|
254
|
+
@param {Hash} options the amount of date/time to advance the receiver
|
255
|
+
@returns {DateTime} copy of the receiver
|
256
|
+
*/
|
257
|
+
advance: function(options) {
|
258
|
+
return this.constructor._advance(options, this._ms, this.timezone)._createFromCurrentState();
|
259
|
+
},
|
260
|
+
|
261
|
+
/**
|
262
|
+
Generic getter.
|
263
|
+
|
264
|
+
The properties you can get are:
|
265
|
+
- 'year'
|
266
|
+
- 'month' (January is 1, contrary to JavaScript Dates for which January is 0)
|
267
|
+
- 'day'
|
268
|
+
- 'dayOfWeek' (Sunday is 0)
|
269
|
+
- 'hour'
|
270
|
+
- 'minute'
|
271
|
+
- 'second'
|
272
|
+
- 'millisecond'
|
273
|
+
- 'milliseconds', the number of milliseconds since
|
274
|
+
January, 1st 1970 00:00:00.0 UTC
|
275
|
+
- 'isLeapYear', a boolean value indicating whether the receiver's year
|
276
|
+
is a leap year
|
277
|
+
- 'daysInMonth', the number of days of the receiver's current month
|
278
|
+
- 'dayOfYear', January 1st is 1, December 31th is 365 for a common year
|
279
|
+
- 'week' or 'week1', the week number of the current year, starting with
|
280
|
+
the first Sunday as the first day of the first week (00..53)
|
281
|
+
- 'week0', the week number of the current year, starting with
|
282
|
+
the first Monday as the first day of the first week (00..53)
|
283
|
+
- 'lastMonday', 'lastTuesday', etc., 'nextMonday', 'nextTuesday', etc.,
|
284
|
+
the date of the last or next weekday in comparison to the receiver.
|
285
|
+
|
286
|
+
@param {String} key the property name to get
|
287
|
+
@return the value asked for
|
288
|
+
*/
|
289
|
+
unknownProperty: function(key) {
|
290
|
+
return this.constructor._get(key, this._ms, this.timezone);
|
291
|
+
},
|
292
|
+
|
293
|
+
/**
|
294
|
+
Formats the receiver according to the given format string. Should behave
|
295
|
+
like the C strftime function.
|
296
|
+
|
297
|
+
The format parameter can contain the following characters:
|
298
|
+
- %a - The abbreviated weekday name (``Sun'')
|
299
|
+
- %A - The full weekday name (``Sunday'')
|
300
|
+
- %b - The abbreviated month name (``Jan'')
|
301
|
+
- %B - The full month name (``January'')
|
302
|
+
- %c - The preferred local date and time representation
|
303
|
+
- %d - Day of the month (01..31)
|
304
|
+
- %D - Day of the month (0..31)
|
305
|
+
- %h - Hour of the day, 24-hour clock (0..23)
|
306
|
+
- %H - Hour of the day, 24-hour clock (00..23)
|
307
|
+
- %i - Hour of the day, 12-hour clock (1..12)
|
308
|
+
- %I - Hour of the day, 12-hour clock (01..12)
|
309
|
+
- %j - Day of the year (001..366)
|
310
|
+
- %m - Month of the year (01..12)
|
311
|
+
- %M - Minute of the hour (00..59)
|
312
|
+
- %p - Meridian indicator (``AM'' or ``PM'')
|
313
|
+
- %S - Second of the minute (00..60)
|
314
|
+
- %s - Milliseconds of the second (000..999)
|
315
|
+
- %U - Week number of the current year,
|
316
|
+
starting with the first Sunday as the first
|
317
|
+
day of the first week (00..53)
|
318
|
+
- %W - Week number of the current year,
|
319
|
+
starting with the first Monday as the first
|
320
|
+
day of the first week (00..53)
|
321
|
+
- %w - Day of the week (Sunday is 0, 0..6)
|
322
|
+
- %x - Preferred representation for the date alone, no time
|
323
|
+
- %X - Preferred representation for the time alone, no date
|
324
|
+
- %y - Year without a century (00..99)
|
325
|
+
- %Y - Year with century
|
326
|
+
- %Z - Time zone (ISO 8601 formatted)
|
327
|
+
- %% - Literal ``%'' character
|
328
|
+
|
329
|
+
@param {String} format the format string
|
330
|
+
@return {String} the formatted string
|
331
|
+
*/
|
332
|
+
toFormattedString: function(fmt) {
|
333
|
+
return this.constructor._toFormattedString(fmt, this._ms, this.timezone);
|
334
|
+
},
|
335
|
+
|
336
|
+
/**
|
337
|
+
Formats the receiver according ISO 8601 standard. It is equivalent to
|
338
|
+
calling toFormattedString with the '%Y-%m-%dT%H:%M:%S%Z' format string.
|
339
|
+
|
340
|
+
@return {String} the formatted string
|
341
|
+
*/
|
342
|
+
toISO8601: function(){
|
343
|
+
return this.constructor._toFormattedString(SC.DATETIME_ISO8601, this._ms, this.timezone);
|
344
|
+
},
|
345
|
+
|
346
|
+
/** @private
|
347
|
+
Creates a string representation of the receiver.
|
348
|
+
(Debuggers call all the time the toString method. Because of the way
|
349
|
+
DateTime is designed, calling SC.DateTime._toFormattedString would
|
350
|
+
have a nasty side effect. We shouldn't therefore call any of SC.DateTime's
|
351
|
+
methods from toString)
|
352
|
+
|
353
|
+
@returns {String}
|
354
|
+
*/
|
355
|
+
toString: function() {
|
356
|
+
return "UTC: " +
|
357
|
+
new Date(this._ms).toUTCString() +
|
358
|
+
", timezone: " +
|
359
|
+
this.timezone;
|
360
|
+
},
|
361
|
+
|
362
|
+
/**
|
363
|
+
Returns YES if the passed DateTime is equal to the receiver, ie: if their
|
364
|
+
number of milliseconds since January, 1st 1970 00:00:00.0 UTC are equal.
|
365
|
+
This is the preferred method for testing equality.
|
366
|
+
|
367
|
+
@see SC.DateTime#compare
|
368
|
+
@param {SC.DateTime} aDateTime the DateTime to compare to
|
369
|
+
@returns {Boolean}
|
370
|
+
*/
|
371
|
+
isEqual: function(aDateTime) {
|
372
|
+
return SC.DateTime.compare(this, aDateTime) === 0;
|
373
|
+
},
|
374
|
+
|
375
|
+
/**
|
376
|
+
Returns a copy of the receiver. Because of the way DateTime is designed,
|
377
|
+
it just returns the receiver.
|
378
|
+
|
379
|
+
@returns {DateTime}
|
380
|
+
*/
|
381
|
+
copy: function() {
|
382
|
+
return this;
|
383
|
+
},
|
384
|
+
|
385
|
+
/**
|
386
|
+
Returns a copy of the receiver with the timezone set to the passed
|
387
|
+
timezone. The returned value is equal to the receiver (ie SC.Compare
|
388
|
+
returns 0), it is just the timezone representation that changes.
|
389
|
+
|
390
|
+
If you don't pass any argument, the target timezone is assumed to be 0,
|
391
|
+
ie UTC.
|
392
|
+
|
393
|
+
Note that this method does not change the underlying position in time,
|
394
|
+
but only the time zone in which it is displayed. In other words, the underlying
|
395
|
+
number of milliseconds since Jan 1, 1970 does not change.
|
396
|
+
|
397
|
+
@return {DateTime}
|
398
|
+
*/
|
399
|
+
toTimezone: function(timezone) {
|
400
|
+
if (timezone === undefined) timezone = 0;
|
401
|
+
return this.advance({ timezone: timezone - this.timezone });
|
402
|
+
}
|
403
|
+
|
404
|
+
});
|
405
|
+
|
406
|
+
// Class Methods
|
407
|
+
SC.DateTime.mixin(SC.Comparable,
|
408
|
+
/** @scope SC.DateTime */ {
|
409
|
+
|
410
|
+
/**
|
411
|
+
The default format (ISO 8601) in which DateTimes are stored in a record.
|
412
|
+
Change this value if your backend sends and receives dates in another
|
413
|
+
format.
|
414
|
+
|
415
|
+
This value can also be customized on a per-attribute basis with the format
|
416
|
+
property. For example:
|
417
|
+
SC.Record.attr(SC.DateTime, { format: '%d/%m/%Y %H:%M:%S' })
|
418
|
+
|
419
|
+
@property
|
420
|
+
@type {String}
|
421
|
+
*/
|
422
|
+
recordFormat: SC.DATETIME_ISO8601,
|
423
|
+
|
424
|
+
/**
|
425
|
+
The localized day names. Add the key '_SC.DateTime.dayNames' and its value
|
426
|
+
to your strings.js file to add support for another language than English.
|
427
|
+
|
428
|
+
@property
|
429
|
+
@type {Array}
|
430
|
+
*/
|
431
|
+
dayNames: '_SC.DateTime.dayNames'.loc().w(),
|
432
|
+
|
433
|
+
/** @private
|
434
|
+
The English day names used for the 'lastMonday',
|
435
|
+
'nextTuesday', etc., getters.
|
436
|
+
|
437
|
+
@property
|
438
|
+
@type {Array}
|
439
|
+
*/
|
440
|
+
_englishDayNames: 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.w(),
|
441
|
+
|
442
|
+
/**
|
443
|
+
The localized abbreviated day names. Add the key
|
444
|
+
'_SC.DateTime.abbreviatedDayNames' and its value to your strings.js
|
445
|
+
file to add support for another language than English.
|
446
|
+
|
447
|
+
@property
|
448
|
+
@type {Array}
|
449
|
+
*/
|
450
|
+
abbreviatedDayNames: '_SC.DateTime.abbreviatedDayNames'.loc().w(),
|
451
|
+
|
452
|
+
/**
|
453
|
+
The localized month names. Add the key '_SC.DateTime.monthNames' and its
|
454
|
+
value to your strings.js file to add support for another language than
|
455
|
+
English.
|
456
|
+
|
457
|
+
@property
|
458
|
+
@type {Array}
|
459
|
+
*/
|
460
|
+
monthNames: '_SC.DateTime.monthNames'.loc().w(),
|
461
|
+
|
462
|
+
/**
|
463
|
+
The localized abbreviated month names. Add the key
|
464
|
+
'_SC.DateTime.abbreviatedMonthNames' and its value to your strings.js
|
465
|
+
file to add support for another language than English.
|
466
|
+
|
467
|
+
@property
|
468
|
+
@type {Array}
|
469
|
+
*/
|
470
|
+
abbreviatedMonthNames: '_SC.DateTime.abbreviatedMonthNames'.loc().w(),
|
471
|
+
|
472
|
+
/** @private
|
473
|
+
The unique internal Date object used to make computations. Better
|
474
|
+
performance is obtained by having only one Date object for the whole
|
475
|
+
application and manipulating it with setTime() and getTime().
|
476
|
+
|
477
|
+
Note that since this is used for internal calculations across many
|
478
|
+
DateTime instances, it is not guaranteed to store the date/time that
|
479
|
+
any one DateTime instance represents. So it might be that
|
480
|
+
|
481
|
+
this._date.getTime() !== this._ms
|
482
|
+
|
483
|
+
Be sure to set it before using for internal calculations if necessary.
|
484
|
+
|
485
|
+
@property
|
486
|
+
@type {Date}
|
487
|
+
*/
|
488
|
+
_date: new Date(),
|
489
|
+
|
490
|
+
/** @private
|
491
|
+
The offset, in minutes, between UTC and the currently manipulated
|
492
|
+
DateTime instance.
|
493
|
+
|
494
|
+
@property
|
495
|
+
@type {Integer}
|
496
|
+
*/
|
497
|
+
_tz: 0,
|
498
|
+
|
499
|
+
/**
|
500
|
+
The offset, in minutes, between UTC and the local system time. This
|
501
|
+
property is computed at loading time and should never be changed.
|
502
|
+
|
503
|
+
@property
|
504
|
+
@type {Integer}
|
505
|
+
*/
|
506
|
+
timezone: new Date().getTimezoneOffset(),
|
507
|
+
|
508
|
+
/** @private
|
509
|
+
A cache of SC.DateTime instances. If you attempt to create a SC.DateTime
|
510
|
+
instance that has already been created, then it will return the cached
|
511
|
+
value.
|
512
|
+
|
513
|
+
@property
|
514
|
+
@type {Array}
|
515
|
+
*/
|
516
|
+
_dt_cache: {},
|
517
|
+
|
518
|
+
/** @private
|
519
|
+
The index of the lastest cached value. Used with _DT_CACHE_MAX_LENGTH to
|
520
|
+
limit the size of the cache.
|
521
|
+
|
522
|
+
@property
|
523
|
+
@type {Integer}
|
524
|
+
*/
|
525
|
+
_dt_cache_index: -1,
|
526
|
+
|
527
|
+
/** @private
|
528
|
+
The maximum length of _dt_cache. If this limit is reached, then the cache
|
529
|
+
is overwritten, starting with the oldest element.
|
530
|
+
|
531
|
+
@property
|
532
|
+
@type {Integer}
|
533
|
+
*/
|
534
|
+
_DT_CACHE_MAX_LENGTH: 1000,
|
535
|
+
|
536
|
+
/** @private
|
537
|
+
Both args are optional, but will only overwrite _date and _tz if defined.
|
538
|
+
This method does not affect the DateTime instance's actual time, but simply
|
539
|
+
initializes the one _date instance to a time relevant for a calculation.
|
540
|
+
(this._date is just a resource optimization)
|
541
|
+
|
542
|
+
This is mainly used as a way to store a recursion starting state during
|
543
|
+
internal calculations.
|
544
|
+
|
545
|
+
'milliseconds' is time since Jan 1, 1970.
|
546
|
+
'timezone' is the current time zone we want to be working in internally.
|
547
|
+
|
548
|
+
Returns a hash of the previous milliseconds and time zone in case they
|
549
|
+
are wanted for later restoration.
|
550
|
+
*/
|
551
|
+
_setCalcState: function(ms, timezone) {
|
552
|
+
var previous = {
|
553
|
+
milliseconds: this._date.getTime(),
|
554
|
+
timezone: this._tz
|
555
|
+
};
|
556
|
+
|
557
|
+
if (ms !== undefined) this._date.setTime(ms);
|
558
|
+
if (timezone !== undefined) this._tz = timezone;
|
559
|
+
|
560
|
+
return previous;
|
561
|
+
},
|
562
|
+
|
563
|
+
/**
|
564
|
+
By this time, any time zone setting on 'hash' will be ignored.
|
565
|
+
'timezone' will be used, or the last this._tz.
|
566
|
+
*/
|
567
|
+
_setCalcStateFromHash: function(hash, timezone) {
|
568
|
+
var tz = (timezone !== undefined) ? timezone : this._tz; // use the last-known time zone if necessary
|
569
|
+
var ms = this._toMilliseconds(hash, this._ms, tz); // convert the hash (local to specified time zone) to milliseconds (in UTC)
|
570
|
+
return this._setCalcState(ms, tz); // now call the one we really wanted
|
571
|
+
},
|
572
|
+
|
573
|
+
/** @private
|
574
|
+
@see SC.DateTime#unknownProperty
|
575
|
+
*/
|
576
|
+
_get: function(key, start, timezone) {
|
577
|
+
var ms, tz, doy, m, y, firstDayOfWeek, dayOfWeek, dayOfYear, prefix, suffix;
|
578
|
+
var currentWeekday, targetWeekday;
|
579
|
+
var d = this._date;
|
580
|
+
var originalTime, v = null;
|
581
|
+
|
582
|
+
// Set up an absolute date/time using the given milliseconds since Jan 1, 1970.
|
583
|
+
// Only do it if we're given a time value, though, otherwise we want to use the
|
584
|
+
// last one we had because this _get() method is recursive.
|
585
|
+
//
|
586
|
+
// Note that because these private time calc methods are recursive, and because all DateTime instances
|
587
|
+
// share an internal this._date and this._tz state for doing calculations, methods
|
588
|
+
// that modify this._date or this._tz should restore the last state before exiting
|
589
|
+
// to avoid obscure calculation bugs. So we save the original state here, and restore
|
590
|
+
// it before returning at the end.
|
591
|
+
originalTime = this._setCalcState(start, timezone); // save so we can restore it to how it was before we got here
|
592
|
+
|
593
|
+
// Check this first because it is an absolute value -- no tweaks necessary when calling for milliseconds
|
594
|
+
if (key === 'milliseconds') {
|
595
|
+
v = d.getTime();
|
596
|
+
}
|
597
|
+
else if (key === 'timezone') {
|
598
|
+
v = this._tz;
|
599
|
+
}
|
600
|
+
|
601
|
+
// 'nextWeekday' or 'lastWeekday'.
|
602
|
+
// We want to do this calculation in local time, before shifting UTC below.
|
603
|
+
if (v === null) {
|
604
|
+
prefix = key.slice(0, 4);
|
605
|
+
suffix = key.slice(4);
|
606
|
+
if (prefix === 'last' || prefix === 'next') {
|
607
|
+
currentWeekday = this._get('dayOfWeek', start, timezone);
|
608
|
+
targetWeekday = this._englishDayNames.indexOf(suffix);
|
609
|
+
if (targetWeekday >= 0) {
|
610
|
+
var delta = targetWeekday - currentWeekday;
|
611
|
+
if (prefix === 'last' && delta >= 0) delta -= 7;
|
612
|
+
if (prefix === 'next' && delta < 0) delta += 7;
|
613
|
+
this._advance({ day: delta }, start, timezone);
|
614
|
+
v = this._createFromCurrentState();
|
615
|
+
}
|
616
|
+
}
|
617
|
+
}
|
618
|
+
|
619
|
+
if (v === null) {
|
620
|
+
// need to adjust for alternate display time zone.
|
621
|
+
// Before calculating, we need to get everything into a common time zone to
|
622
|
+
// negate the effects of local machine time (so we can use all the 'getUTC...() methods on Date).
|
623
|
+
if (timezone !== undefined) {
|
624
|
+
this._setCalcState(d.getTime() - (timezone * 60000), 0); // make this instance's time zone the new UTC temporarily
|
625
|
+
}
|
626
|
+
|
627
|
+
// simple keys
|
628
|
+
switch (key) {
|
629
|
+
case 'year':
|
630
|
+
v = d.getUTCFullYear(); //TODO: investigate why some libraries do getFullYear().toString() or getFullYear()+""
|
631
|
+
break;
|
632
|
+
case 'month':
|
633
|
+
v = d.getUTCMonth()+1; // January is 0 in JavaScript
|
634
|
+
break;
|
635
|
+
case 'day':
|
636
|
+
v = d.getUTCDate();
|
637
|
+
break;
|
638
|
+
case 'dayOfWeek':
|
639
|
+
v = d.getUTCDay();
|
640
|
+
break;
|
641
|
+
case 'hour':
|
642
|
+
v = d.getUTCHours();
|
643
|
+
break;
|
644
|
+
case 'minute':
|
645
|
+
v = d.getUTCMinutes();
|
646
|
+
break;
|
647
|
+
case 'second':
|
648
|
+
v = d.getUTCSeconds();
|
649
|
+
break;
|
650
|
+
case 'millisecond':
|
651
|
+
v = d.getUTCMilliseconds();
|
652
|
+
break;
|
653
|
+
}
|
654
|
+
|
655
|
+
// isLeapYear
|
656
|
+
if ((v === null) && (key === 'isLeapYear')) {
|
657
|
+
y = this._get('year');
|
658
|
+
v = (y%4 === 0 && y%100 !== 0) || y%400 === 0;
|
659
|
+
}
|
660
|
+
|
661
|
+
// daysInMonth
|
662
|
+
if ((v === null) && (key === 'daysInMonth')) {
|
663
|
+
switch (this._get('month')) {
|
664
|
+
case 4:
|
665
|
+
case 6:
|
666
|
+
case 9:
|
667
|
+
case 11:
|
668
|
+
v = 30;
|
669
|
+
break;
|
670
|
+
case 2:
|
671
|
+
v = this._get('isLeapYear') ? 29 : 28;
|
672
|
+
break;
|
673
|
+
default:
|
674
|
+
v = 31;
|
675
|
+
break;
|
676
|
+
}
|
677
|
+
}
|
678
|
+
|
679
|
+
// dayOfYear
|
680
|
+
if ((v === null) && (key === 'dayOfYear')) {
|
681
|
+
ms = d.getTime(); // save time
|
682
|
+
doy = this._get('day');
|
683
|
+
this._setCalcStateFromHash({ day: 1 });
|
684
|
+
for (m = this._get('month') - 1; m > 0; m--) {
|
685
|
+
this._setCalcStateFromHash({ month: m });
|
686
|
+
doy += this._get('daysInMonth');
|
687
|
+
}
|
688
|
+
d.setTime(ms); // restore time
|
689
|
+
v = doy;
|
690
|
+
}
|
691
|
+
|
692
|
+
// week, week0 or week1
|
693
|
+
if ((v === null) && (key.slice(0, 4) === 'week')) {
|
694
|
+
// firstDayOfWeek should be 0 (Sunday) or 1 (Monday)
|
695
|
+
firstDayOfWeek = key.length === 4 ? 1 : parseInt(key.slice('4'), 10);
|
696
|
+
dayOfWeek = this._get('dayOfWeek');
|
697
|
+
dayOfYear = this._get('dayOfYear') - 1;
|
698
|
+
if (firstDayOfWeek === 0) {
|
699
|
+
v = parseInt((dayOfYear - dayOfWeek + 7) / 7, 10);
|
700
|
+
}
|
701
|
+
else {
|
702
|
+
v = parseInt((dayOfYear - (dayOfWeek - 1 + 7) % 7 + 7) / 7, 10);
|
703
|
+
}
|
704
|
+
}
|
705
|
+
}
|
706
|
+
|
707
|
+
// restore the internal calculation state in case someone else was in the
|
708
|
+
// middle of a calculation (we might be recursing).
|
709
|
+
this._setCalcState(originalTime.milliseconds, originalTime.timezone);
|
710
|
+
|
711
|
+
return v;
|
712
|
+
},
|
713
|
+
|
714
|
+
/**
|
715
|
+
Sets the internal calculation state to something specified.
|
716
|
+
*/
|
717
|
+
_adjust: function(options, start, timezone, resetCascadingly) {
|
718
|
+
var opts = options ? SC.clone(options) : {};
|
719
|
+
var ms = this._toMilliseconds(options, start, timezone, resetCascadingly);
|
720
|
+
this._setCalcState(ms, timezone);
|
721
|
+
return this; // for chaining
|
722
|
+
},
|
723
|
+
|
724
|
+
/** @private
|
725
|
+
@see SC.DateTime#advance
|
726
|
+
*/
|
727
|
+
_advance: function(options, start, timezone) {
|
728
|
+
var opts = options ? SC.clone(options) : {};
|
729
|
+
var tz;
|
730
|
+
|
731
|
+
for (var key in opts) {
|
732
|
+
opts[key] += this._get(key, start, timezone);
|
733
|
+
}
|
734
|
+
|
735
|
+
// The time zone can be advanced by a delta as well, so try to use the
|
736
|
+
// new value if there is one.
|
737
|
+
tz = (opts.timezone !== undefined) ? opts.timezone : timezone; // watch out for zero, which is acceptable as a time zone
|
738
|
+
|
739
|
+
return this._adjust(opts, start, tz, NO);
|
740
|
+
},
|
741
|
+
|
742
|
+
/* @private
|
743
|
+
Converts a standard date/time options hash to an integer representing that position
|
744
|
+
in time relative to Jan 1, 1970
|
745
|
+
*/
|
746
|
+
_toMilliseconds: function(options, start, timezone, resetCascadingly) {
|
747
|
+
var opts = options ? SC.clone(options) : {};
|
748
|
+
var d = this._date;
|
749
|
+
var previousMilliseconds = d.getTime(); // rather than create a new Date object, we'll reuse the instance we have for calculations, then restore it
|
750
|
+
var ms, tz;
|
751
|
+
|
752
|
+
// Initialize our internal for-calculations Date object to our current date/time.
|
753
|
+
// Note that this object was created in the local machine time zone, so when we set
|
754
|
+
// its params later, it will be assuming these values to be in the same time zone as it is.
|
755
|
+
// It's ok for start to be null, in which case we'll just keep whatever we had in 'd' before.
|
756
|
+
if (!SC.none(start)) {
|
757
|
+
d.setTime(start); // using milliseconds here specifies an absolute location in time, regardless of time zone, so that's nice
|
758
|
+
}
|
759
|
+
|
760
|
+
// We have to get all time expressions, both in 'options' (assume to be in time zone 'timezone')
|
761
|
+
// and in 'd', to the same time zone before we can any calculations correctly. So because the Date object provides
|
762
|
+
// a suite of UTC getters and setters, we'll temporarily redefine 'timezone' as our new
|
763
|
+
// 'UTC', so we don't have to worry about local machine time. We do this by subtracting
|
764
|
+
// milliseconds for the time zone offset. Then we'll do all our calculations, then convert
|
765
|
+
// it back to real UTC.
|
766
|
+
|
767
|
+
// (Zero time zone is considered a valid value.)
|
768
|
+
tz = (timezone !== undefined) ? timezone : (this.timezone !== undefined) ? this.timezone : 0;
|
769
|
+
d.setTime(d.getTime() - (tz * 60000)); // redefine 'UTC' to establish a new local absolute so we can use all the 'getUTC...()' Date methods
|
770
|
+
|
771
|
+
// the time options (hour, minute, sec, millisecond)
|
772
|
+
// reset cascadingly (see documentation)
|
773
|
+
if (resetCascadingly === undefined || resetCascadingly === YES) {
|
774
|
+
if ( !SC.none(opts.hour) && SC.none(opts.minute)) {
|
775
|
+
opts.minute = 0;
|
776
|
+
}
|
777
|
+
if (!(SC.none(opts.hour) && SC.none(opts.minute))
|
778
|
+
&& SC.none(opts.second)) {
|
779
|
+
opts.second = 0;
|
780
|
+
}
|
781
|
+
if (!(SC.none(opts.hour) && SC.none(opts.minute) && SC.none(opts.second))
|
782
|
+
&& SC.none(opts.millisecond)) {
|
783
|
+
opts.millisecond = 0;
|
784
|
+
}
|
785
|
+
}
|
786
|
+
|
787
|
+
// Get the current values for any not provided in the options hash.
|
788
|
+
// Since everything is in 'UTC' now, use the UTC accessors. We do this because,
|
789
|
+
// according to javascript Date spec, you have to set year, month, and day together
|
790
|
+
// if you're setting any one of them. So we'll use the provided Date.UTC() method
|
791
|
+
// to get milliseconds, and we need to get any missing values first...
|
792
|
+
if (SC.none(opts.year)) opts.year = d.getUTCFullYear();
|
793
|
+
if (SC.none(opts.month)) opts.month = d.getUTCMonth() + 1; // January is 0 in JavaScript
|
794
|
+
if (SC.none(opts.day)) opts.day = d.getUTCDate();
|
795
|
+
if (SC.none(opts.hour)) opts.hour = d.getUTCHours();
|
796
|
+
if (SC.none(opts.minute)) opts.minute = d.getUTCMinutes();
|
797
|
+
if (SC.none(opts.second)) opts.second = d.getUTCSeconds();
|
798
|
+
if (SC.none(opts.millisecond)) opts.millisecond = d.getUTCMilliseconds();
|
799
|
+
|
800
|
+
// Ask the JS Date to calculate milliseconds for us (still in redefined UTC). It
|
801
|
+
// is best to set them all together because, for example, a day value means different things
|
802
|
+
// to the JS Date object depending on which month or year it is. It can now handle that stuff
|
803
|
+
// internally as it's made to do.
|
804
|
+
ms = Date.UTC(opts.year, opts.month - 1, opts.day, opts.hour, opts.minute, opts.second, opts.millisecond);
|
805
|
+
|
806
|
+
// Now that we've done all our calculations in a common time zone, add back the offset
|
807
|
+
// to move back to real UTC.
|
808
|
+
d.setTime(ms + (tz * 60000));
|
809
|
+
ms = d.getTime(); // now get the corrected milliseconds value
|
810
|
+
|
811
|
+
// Restore what was there previously before leaving in case someone called this method
|
812
|
+
// in the middle of another calculation.
|
813
|
+
d.setTime(previousMilliseconds);
|
814
|
+
|
815
|
+
return ms;
|
816
|
+
},
|
817
|
+
|
818
|
+
/**
|
819
|
+
Returns a new DateTime object advanced according the the given parameters.
|
820
|
+
The parameters can be:
|
821
|
+
- none, to create a DateTime instance initialized to the current
|
822
|
+
date and time in the local timezone,
|
823
|
+
- a integer, the number of milliseconds since
|
824
|
+
January, 1st 1970 00:00:00.0 UTC
|
825
|
+
- a options hash that can contain any of the following properties: year,
|
826
|
+
month, day, hour, minute, second, millisecond, timezone
|
827
|
+
|
828
|
+
Note that if you attempt to create a SC.DateTime instance that has already
|
829
|
+
been created, then, for performance reasons, a cached value may be
|
830
|
+
returned.
|
831
|
+
|
832
|
+
The timezone option is the offset, in minutes, between UTC and local time.
|
833
|
+
If you don't pass a timezone option, the date object is created in the
|
834
|
+
local timezone. If you want to create a UTC+2 (CEST) date, for example,
|
835
|
+
then you should pass a timezone of -120.
|
836
|
+
|
837
|
+
@param options one of the three kind of parameters descibed above
|
838
|
+
@returns {DateTime} the DateTime instance that corresponds to the
|
839
|
+
passed parameters, possibly fetched from cache
|
840
|
+
*/
|
841
|
+
create: function() {
|
842
|
+
var arg = arguments.length === 0 ? {} : arguments[0];
|
843
|
+
var timezone;
|
844
|
+
|
845
|
+
// if simply milliseconds since Jan 1, 1970 are given, just use those
|
846
|
+
if (SC.typeOf(arg) === SC.T_NUMBER) {
|
847
|
+
arg = { milliseconds: arg };
|
848
|
+
}
|
849
|
+
|
850
|
+
// Default to local machine time zone if none is given
|
851
|
+
timezone = (arg.timezone !== undefined) ? arg.timezone : this.timezone;
|
852
|
+
if (timezone === undefined) timezone = 0;
|
853
|
+
|
854
|
+
// Desired case: create with milliseconds if we have them.
|
855
|
+
// If we don't, convert what we have to milliseconds and recurse.
|
856
|
+
if (!SC.none(arg.milliseconds)) {
|
857
|
+
|
858
|
+
// quick implementation of a FIFO set for the cache
|
859
|
+
var key = 'nu' + arg.milliseconds + timezone, cache = this._dt_cache;
|
860
|
+
var ret = cache[key];
|
861
|
+
if (!ret) {
|
862
|
+
var previousKey, idx = this._dt_cache_index, C = this;
|
863
|
+
ret = cache[key] = new C([{ _ms: arg.milliseconds, timezone: timezone }]);
|
864
|
+
idx = this._dt_cache_index = (idx + 1) % this._DT_CACHE_MAX_LENGTH;
|
865
|
+
previousKey = cache[idx];
|
866
|
+
if (previousKey !== undefined && cache[previousKey]) delete cache[previousKey];
|
867
|
+
cache[idx] = key;
|
868
|
+
}
|
869
|
+
return ret;
|
870
|
+
}
|
871
|
+
// otherwise, convert what we have to milliseconds and try again
|
872
|
+
else {
|
873
|
+
var now = new Date();
|
874
|
+
|
875
|
+
return this.create({ // recursive call with new arguments
|
876
|
+
milliseconds: this._toMilliseconds(arg, now.getTime(), timezone, arg.resetCascadingly),
|
877
|
+
timezone: timezone
|
878
|
+
});
|
879
|
+
}
|
880
|
+
},
|
881
|
+
|
882
|
+
/** @private
|
883
|
+
Calls the create() method with the current internal _date value.
|
884
|
+
|
885
|
+
@return {DateTime} the DateTime instance returned by create()
|
886
|
+
*/
|
887
|
+
_createFromCurrentState: function() {
|
888
|
+
return this.create({
|
889
|
+
milliseconds: this._date.getTime(),
|
890
|
+
timezone: this._tz
|
891
|
+
});
|
892
|
+
},
|
893
|
+
|
894
|
+
/**
|
895
|
+
Returns a DateTime object created from a given string parsed with a given
|
896
|
+
format. Returns null if the parsing fails.
|
897
|
+
|
898
|
+
@see SC.DateTime#toFormattedString for a description of the format parameter
|
899
|
+
@param {String} str the string to parse
|
900
|
+
@param {String} fmt the format to parse the string with
|
901
|
+
@returns {DateTime} the DateTime corresponding to the string parameter
|
902
|
+
*/
|
903
|
+
parse: function(str, fmt) {
|
904
|
+
// Declared as an object not a literal since in some browsers the literal
|
905
|
+
// retains state across function calls
|
906
|
+
var re = new RegExp('(?:%([aAbBcdDhHIjmMpsSUWwxXyYZ%])|(.))', "g");
|
907
|
+
var d, parts, opts = {}, check = {}, scanner = SC.Scanner.create({string: str});
|
908
|
+
|
909
|
+
if (SC.none(fmt)) fmt = SC.DATETIME_ISO8601;
|
910
|
+
|
911
|
+
try {
|
912
|
+
while ((parts = re.exec(fmt)) !== null) {
|
913
|
+
switch(parts[1]) {
|
914
|
+
case 'a': check.dayOfWeek = scanner.scanArray(this.abbreviatedDayNames); break;
|
915
|
+
case 'A': check.dayOfWeek = scanner.scanArray(this.dayNames); break;
|
916
|
+
case 'b': opts.month = scanner.scanArray(this.abbreviatedMonthNames) + 1; break;
|
917
|
+
case 'B': opts.month = scanner.scanArray(this.monthNames) + 1; break;
|
918
|
+
case 'c': throw "%c is not implemented";
|
919
|
+
case 'd':
|
920
|
+
case 'D': opts.day = scanner.scanInt(1, 2); break;
|
921
|
+
case 'h':
|
922
|
+
case 'H': opts.hour = scanner.scanInt(1, 2); break;
|
923
|
+
case 'I': opts.hour = scanner.scanInt(1, 2); break;
|
924
|
+
case 'j': throw "%j is not implemented";
|
925
|
+
case 'm': opts.month = scanner.scanInt(1, 2); break;
|
926
|
+
case 'M': opts.minute = scanner.scanInt(1, 2); break;
|
927
|
+
case 'p': opts.meridian = scanner.scanArray(['AM', 'PM']); break;
|
928
|
+
case 'S': opts.second = scanner.scanInt(1, 2); break;
|
929
|
+
case 's': opts.millisecond = scanner.scanInt(1, 3); break;
|
930
|
+
case 'U': throw "%U is not implemented";
|
931
|
+
case 'W': throw "%W is not implemented";
|
932
|
+
case 'w': throw "%w is not implemented";
|
933
|
+
case 'x': throw "%x is not implemented";
|
934
|
+
case 'X': throw "%X is not implemented";
|
935
|
+
case 'y': opts.year = scanner.scanInt(2); opts.year += (opts.year > 70 ? 1900 : 2000); break;
|
936
|
+
case 'Y': opts.year = scanner.scanInt(4); break;
|
937
|
+
case 'Z':
|
938
|
+
var modifier = scanner.scan(1);
|
939
|
+
if (modifier === 'Z') {
|
940
|
+
opts.timezone = 0;
|
941
|
+
} else if (modifier === '+' || modifier === '-' ) {
|
942
|
+
var h = scanner.scanInt(2);
|
943
|
+
if (scanner.scan(1) !== ':') scanner.scan(-1);
|
944
|
+
var m = scanner.scanInt(2);
|
945
|
+
opts.timezone = (modifier === '+' ? -1 : 1) * (h*60 + m);
|
946
|
+
}
|
947
|
+
break;
|
948
|
+
case '%': scanner.skipString('%'); break;
|
949
|
+
default: scanner.skipString(parts[0]); break;
|
950
|
+
}
|
951
|
+
}
|
952
|
+
} catch (e) {
|
953
|
+
SC.Logger.log('SC.DateTime.createFromString ' + e.toString());
|
954
|
+
return null;
|
955
|
+
}
|
956
|
+
|
957
|
+
if (!SC.none(opts.meridian) && !SC.none(opts.hour)) {
|
958
|
+
if (opts.meridian === 1) opts.hour = (opts.hour + 12) % 24;
|
959
|
+
delete opts.meridian;
|
960
|
+
}
|
961
|
+
|
962
|
+
d = SC.DateTime.create(opts);
|
963
|
+
|
964
|
+
if (!SC.none(check.dayOfWeek) && d.get('dayOfWeek') !== check.dayOfWeek) {
|
965
|
+
return null;
|
966
|
+
}
|
967
|
+
|
968
|
+
return d;
|
969
|
+
},
|
970
|
+
|
971
|
+
/** @private
|
972
|
+
Converts the x parameter into a string padded with 0s so that the string’s
|
973
|
+
length is at least equal to the len parameter.
|
974
|
+
|
975
|
+
@param x the object to convert to a string
|
976
|
+
@param {Integer} the minimum length of the returned string
|
977
|
+
@returns {String} the padded string
|
978
|
+
*/
|
979
|
+
_pad: function(x, len) {
|
980
|
+
var str = '' + x;
|
981
|
+
if (len === undefined) len = 2;
|
982
|
+
while (str.length < len) str = '0' + str;
|
983
|
+
return str;
|
984
|
+
},
|
985
|
+
|
986
|
+
/** @private
|
987
|
+
@see SC.DateTime#_toFormattedString
|
988
|
+
*/
|
989
|
+
__toFormattedString: function(part, start, timezone) {
|
990
|
+
var hour, offset;
|
991
|
+
|
992
|
+
// Note: all calls to _get() here should include only one
|
993
|
+
// argument, since _get() is built for recursion and behaves differently
|
994
|
+
// if arguments 2 and 3 are included.
|
995
|
+
//
|
996
|
+
// This method is simply a helper for this._toFormattedString() (one underscore);
|
997
|
+
// this is only called from there, and _toFormattedString() has already
|
998
|
+
// set up the appropriate internal date/time/timezone state for it.
|
999
|
+
|
1000
|
+
switch(part[1]) {
|
1001
|
+
case 'a': return this.abbreviatedDayNames[this._get('dayOfWeek')];
|
1002
|
+
case 'A': return this.dayNames[this._get('dayOfWeek')];
|
1003
|
+
case 'b': return this.abbreviatedMonthNames[this._get('month')-1];
|
1004
|
+
case 'B': return this.monthNames[this._get('month')-1];
|
1005
|
+
case 'c': return this._date.toString();
|
1006
|
+
case 'd': return this._pad(this._get('day'));
|
1007
|
+
case 'D': return this._get('day');
|
1008
|
+
case 'h': return this._get('hour');
|
1009
|
+
case 'H': return this._pad(this._get('hour'));
|
1010
|
+
case 'i':
|
1011
|
+
hour = this._get('hour');
|
1012
|
+
return (hour === 12 || hour === 0) ? 12 : (hour + 12) % 12;
|
1013
|
+
case 'I':
|
1014
|
+
hour = this._get('hour');
|
1015
|
+
return this._pad((hour === 12 || hour === 0) ? 12 : (hour + 12) % 12);
|
1016
|
+
case 'j': return this._pad(this._get('dayOfYear'), 3);
|
1017
|
+
case 'm': return this._pad(this._get('month'));
|
1018
|
+
case 'M': return this._pad(this._get('minute'));
|
1019
|
+
case 'p': return this._get('hour') > 11 ? 'PM' : 'AM';
|
1020
|
+
case 'S': return this._pad(this._get('second'));
|
1021
|
+
case 's': return this._pad(this._get('millisecond'), 3);
|
1022
|
+
case 'u': return this._pad(this._get('utc')); //utc
|
1023
|
+
case 'U': return this._pad(this._get('week0'));
|
1024
|
+
case 'W': return this._pad(this._get('week1'));
|
1025
|
+
case 'w': return this._get('dayOfWeek');
|
1026
|
+
case 'x': return this._date.toDateString();
|
1027
|
+
case 'X': return this._date.toTimeString();
|
1028
|
+
case 'y': return this._pad(this._get('year') % 100);
|
1029
|
+
case 'Y': return this._get('year');
|
1030
|
+
case 'Z':
|
1031
|
+
offset = -1 * timezone;
|
1032
|
+
return (offset >= 0 ? '+' : '-')
|
1033
|
+
+ this._pad(parseInt(Math.abs(offset)/60, 10))
|
1034
|
+
+ ':'
|
1035
|
+
+ this._pad(Math.abs(offset)%60);
|
1036
|
+
case '%': return '%';
|
1037
|
+
}
|
1038
|
+
},
|
1039
|
+
|
1040
|
+
/** @private
|
1041
|
+
@see SC.DateTime#toFormattedString
|
1042
|
+
*/
|
1043
|
+
_toFormattedString: function(format, start, timezone) {
|
1044
|
+
var that = this;
|
1045
|
+
var tz = (timezone !== undefined) ? timezone : (this.timezone !== undefined) ? this.timezone : 0;
|
1046
|
+
|
1047
|
+
// need to move into local time zone for these calculations
|
1048
|
+
this._setCalcState(start - (timezone * 60000), 0); // so simulate a shifted 'UTC' time
|
1049
|
+
|
1050
|
+
return format.replace(/\%([aAbBcdDhHiIjmMpsSUWwxXyYZ\%])/g, function() {
|
1051
|
+
var v = that.__toFormattedString.call(that, arguments, start, timezone);
|
1052
|
+
return v;
|
1053
|
+
});
|
1054
|
+
},
|
1055
|
+
|
1056
|
+
/**
|
1057
|
+
This will tell you which of the two passed DateTime is greater than the
|
1058
|
+
other, by comparing if their number of milliseconds since
|
1059
|
+
January, 1st 1970 00:00:00.0 UTC.
|
1060
|
+
|
1061
|
+
@param {SC.DateTime} a the first DateTime instance
|
1062
|
+
@param {SC.DateTime} b the second DateTime instance
|
1063
|
+
@returns {Integer} -1 if a < b,
|
1064
|
+
+1 if a > b,
|
1065
|
+
0 if a == b
|
1066
|
+
*/
|
1067
|
+
compare: function(a, b) {
|
1068
|
+
var ma = a.get('milliseconds');
|
1069
|
+
var mb = b.get('milliseconds');
|
1070
|
+
return ma < mb ? -1 : ma === mb ? 0 : 1;
|
1071
|
+
},
|
1072
|
+
|
1073
|
+
/**
|
1074
|
+
This will tell you which of the two passed DateTime is greater than the
|
1075
|
+
other, by only comparing the date parts of the passed objects. Only dates
|
1076
|
+
with the same timezone can be compared.
|
1077
|
+
|
1078
|
+
@param {SC.DateTime} a the first DateTime instance
|
1079
|
+
@param {SC.DateTime} b the second DateTime instance
|
1080
|
+
@returns {Integer} -1 if a < b,
|
1081
|
+
+1 if a > b,
|
1082
|
+
0 if a == b
|
1083
|
+
@throws {SC.DATETIME_COMPAREDATE_TIMEZONE_ERROR} if the passed arguments
|
1084
|
+
don't have the same timezone
|
1085
|
+
*/
|
1086
|
+
compareDate: function(a, b) {
|
1087
|
+
if (a.get('timezone') !== b.get('timezone')) throw SC.DATETIME_COMPAREDATE_TIMEZONE_ERROR;
|
1088
|
+
var ma = a.adjust({hour: 0}).get('milliseconds');
|
1089
|
+
var mb = b.adjust({hour: 0}).get('milliseconds');
|
1090
|
+
return ma < mb ? -1 : ma === mb ? 0 : 1;
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
});
|
1094
|
+
|
1095
|
+
/**
|
1096
|
+
Adds a transform to format the DateTime value to a String value according
|
1097
|
+
to the passed format string.
|
1098
|
+
|
1099
|
+
{{
|
1100
|
+
valueBinding: SC.Binding.dateTime('%Y-%m-%d %H:%M:%S')
|
1101
|
+
.from('MyApp.myController.myDateTime');
|
1102
|
+
}}
|
1103
|
+
|
1104
|
+
@param {String} format format string
|
1105
|
+
@returns {SC.Binding} this
|
1106
|
+
*/
|
1107
|
+
SC.Binding.dateTime = function(format) {
|
1108
|
+
return this.transform(function(value, binding) {
|
1109
|
+
return value ? value.toFormattedString(format) : null;
|
1110
|
+
});
|
1111
|
+
};
|