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,45 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore Costello - Property Observing Library
|
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
|
+
@namespace
|
10
|
+
|
11
|
+
Implements some standard methods for comparing objects. Add this mixin to
|
12
|
+
any class you create that can compare its instances.
|
13
|
+
|
14
|
+
You should implement the compare() method.
|
15
|
+
|
16
|
+
@since SproutCore 1.0
|
17
|
+
*/
|
18
|
+
SC.Comparable = {
|
19
|
+
|
20
|
+
/**
|
21
|
+
walk like a duck. Indicates that the object can be compared.
|
22
|
+
|
23
|
+
@type Boolean
|
24
|
+
*/
|
25
|
+
isComparable: YES,
|
26
|
+
|
27
|
+
/**
|
28
|
+
Override to return the result of the comparison of the two parameters. The
|
29
|
+
compare method should return
|
30
|
+
-1 if a < b
|
31
|
+
0 if a == b
|
32
|
+
1 if a > b
|
33
|
+
|
34
|
+
Default implementation raises
|
35
|
+
an exception.
|
36
|
+
|
37
|
+
@param a {Object} the first object to compare
|
38
|
+
@param b {Object} the second object to compare
|
39
|
+
@returns {Integer} the result of the comparison
|
40
|
+
*/
|
41
|
+
compare: function(a, b) {
|
42
|
+
throw "%@.compare() is not implemented".fmt(this.toString());
|
43
|
+
}
|
44
|
+
|
45
|
+
};
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore Costello - Property Observing Library
|
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
|
+
@namespace
|
10
|
+
|
11
|
+
Impelements some standard methods for copying an object. Add this mixin to
|
12
|
+
any object you create that can create a copy of itself. This mixin is
|
13
|
+
added automatically to the built-in array.
|
14
|
+
|
15
|
+
You should generally implement the copy() method to return a copy of the
|
16
|
+
receiver.
|
17
|
+
|
18
|
+
Note that frozenCopy() will only work if you also implement SC.Freezable.
|
19
|
+
|
20
|
+
@since SproutCore 1.0
|
21
|
+
*/
|
22
|
+
SC.Copyable = {
|
23
|
+
|
24
|
+
/**
|
25
|
+
Walk like a duck. Indicates that the object can be copied.
|
26
|
+
|
27
|
+
@type Boolean
|
28
|
+
*/
|
29
|
+
isCopyable: YES,
|
30
|
+
|
31
|
+
/**
|
32
|
+
Override to return a copy of the receiver. Default implementation raises
|
33
|
+
an exception.
|
34
|
+
|
35
|
+
@param deep {Boolean} if true, a deep copy of the object should be made
|
36
|
+
@returns {Object} copy of receiver
|
37
|
+
*/
|
38
|
+
copy: function(deep) {
|
39
|
+
throw "%@.copy() is not implemented";
|
40
|
+
},
|
41
|
+
|
42
|
+
/**
|
43
|
+
If the object implements SC.Freezable, then this will return a new copy
|
44
|
+
if the object is not frozen and the receiver if the object is frozen.
|
45
|
+
|
46
|
+
Raises an exception if you try to call this method on a object that does
|
47
|
+
not support freezing.
|
48
|
+
|
49
|
+
You should use this method whenever you want a copy of a freezable object
|
50
|
+
since a freezable object can simply return itself without actually
|
51
|
+
consuming more memory.
|
52
|
+
|
53
|
+
@returns {Object} copy of receiver or receiver
|
54
|
+
*/
|
55
|
+
frozenCopy: function() {
|
56
|
+
var isFrozen = this.get ? this.get('isFrozen') : this.isFrozen;
|
57
|
+
if (isFrozen === YES) return this;
|
58
|
+
else if (isFrozen === undefined) throw "%@ does not support freezing".fmt(this);
|
59
|
+
else return this.copy().freeze();
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
// Make Array copyable
|
64
|
+
SC.mixin(Array.prototype, SC.Copyable);
|
65
|
+
Array.prototype.copy = function(deep) {
|
66
|
+
var ret = this.slice(), idx;
|
67
|
+
if (deep) {
|
68
|
+
idx = ret.length;
|
69
|
+
while (idx--) ret[idx] = SC.copy(ret[idx], true);
|
70
|
+
}
|
71
|
+
return ret;
|
72
|
+
}
|
@@ -0,0 +1,1426 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore Costello - Property Observing Library
|
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_require('core') ;
|
9
|
+
sc_require('system/enumerator');
|
10
|
+
|
11
|
+
/*globals Prototype */
|
12
|
+
|
13
|
+
/**
|
14
|
+
@namespace
|
15
|
+
|
16
|
+
This mixin defines the common interface implemented by enumerable objects
|
17
|
+
in SproutCore. Most of these methods follow the standard Array iteration
|
18
|
+
API defined up to JavaScript 1.8 (excluding language-specific features that
|
19
|
+
cannot be emulated in older versions of JavaScript).
|
20
|
+
|
21
|
+
This mixin is applied automatically to the Array class on page load, so you
|
22
|
+
can use any of these methods on simple arrays. If Array already implements
|
23
|
+
one of these methods, the mixin will not override them.
|
24
|
+
|
25
|
+
h3. Writing Your Own Enumerable
|
26
|
+
|
27
|
+
To make your own custom class enumerable, you need two items:
|
28
|
+
|
29
|
+
1. You must have a length property. This property should change whenever
|
30
|
+
the number of items in your enumerable object changes. If you using this
|
31
|
+
with an SC.Object subclass, you should be sure to change the length
|
32
|
+
property using set().
|
33
|
+
|
34
|
+
2. If you must implement nextObject(). See documentation.
|
35
|
+
|
36
|
+
Once you have these two methods implement, apply the SC.Enumerable mixin
|
37
|
+
to your class and you will be able to enumerate the contents of your object
|
38
|
+
like any other collection.
|
39
|
+
|
40
|
+
h3. Using SproutCore Enumeration with Other Libraries
|
41
|
+
|
42
|
+
Many other libraries provide some kind of iterator or enumeration like
|
43
|
+
facility. This is often where the most common API conflicts occur.
|
44
|
+
SproutCore's API is designed to be as friendly as possible with other
|
45
|
+
libraries by implementing only methods that mostly correspond to the
|
46
|
+
JavaScript 1.8 API.
|
47
|
+
|
48
|
+
@since SproutCore 1.0
|
49
|
+
*/
|
50
|
+
SC.Enumerable = {
|
51
|
+
|
52
|
+
/**
|
53
|
+
Walk like a duck.
|
54
|
+
|
55
|
+
@property {Boolean}
|
56
|
+
*/
|
57
|
+
isEnumerable: YES,
|
58
|
+
|
59
|
+
/**
|
60
|
+
Implement this method to make your class enumerable.
|
61
|
+
|
62
|
+
This method will be call repeatedly during enumeration. The index value
|
63
|
+
will always begin with 0 and increment monotonically. You don't have to
|
64
|
+
rely on the index value to determine what object to return, but you should
|
65
|
+
always check the value and start from the beginning when you see the
|
66
|
+
requested index is 0.
|
67
|
+
|
68
|
+
The previousObject is the object that was returned from the last call
|
69
|
+
to nextObject for the current iteration. This is a useful way to
|
70
|
+
manage iteration if you are tracing a linked list, for example.
|
71
|
+
|
72
|
+
Finally the context paramter will always contain a hash you can use as
|
73
|
+
a "scratchpad" to maintain any other state you need in order to iterate
|
74
|
+
properly. The context object is reused and is not reset between
|
75
|
+
iterations so make sure you setup the context with a fresh state whenever
|
76
|
+
the index parameter is 0.
|
77
|
+
|
78
|
+
Generally iterators will continue to call nextObject until the index
|
79
|
+
reaches the your current length-1. If you run out of data before this
|
80
|
+
time for some reason, you should simply return undefined.
|
81
|
+
|
82
|
+
The default impementation of this method simply looks up the index.
|
83
|
+
This works great on any Array-like objects.
|
84
|
+
|
85
|
+
@param index {Number} the current index of the iteration
|
86
|
+
@param previousObject {Object} the value returned by the last call to nextObject.
|
87
|
+
@param context {Object} a context object you can use to maintain state.
|
88
|
+
@returns {Object} the next object in the iteration or undefined
|
89
|
+
*/
|
90
|
+
nextObject: function(index, previousObject, context) {
|
91
|
+
return this.objectAt ? this.objectAt(index) : this[index] ;
|
92
|
+
},
|
93
|
+
|
94
|
+
/**
|
95
|
+
Helper method returns the first object from a collection. This is usually
|
96
|
+
used by bindings and other parts of the framework to extract a single
|
97
|
+
object if the enumerable contains only one item.
|
98
|
+
|
99
|
+
If you override this method, you should implement it so that it will
|
100
|
+
always return the same value each time it is called. If your enumerable
|
101
|
+
contains only one object, this method should always return that object.
|
102
|
+
If your enumerable is empty, this method should return undefined.
|
103
|
+
|
104
|
+
@returns {Object} the object or undefined
|
105
|
+
*/
|
106
|
+
firstObject: function() {
|
107
|
+
if (this.get('length')===0) return undefined ;
|
108
|
+
if (this.objectAt) return this.objectAt(0); // support arrays out of box
|
109
|
+
|
110
|
+
// handle generic enumerables
|
111
|
+
var context = SC.Enumerator._popContext(), ret;
|
112
|
+
ret = this.nextObject(0, null, context);
|
113
|
+
context = SC.Enumerator._pushContext(context);
|
114
|
+
return ret ;
|
115
|
+
}.property(),
|
116
|
+
|
117
|
+
/**
|
118
|
+
Helper method returns the last object from a collection.
|
119
|
+
|
120
|
+
@returns {Object} the object or undefined
|
121
|
+
*/
|
122
|
+
lastObject: function() {
|
123
|
+
var len = this.get('length');
|
124
|
+
if (len===0) return undefined ;
|
125
|
+
if (this.objectAt) return this.objectAt(len-1); // support arrays out of box
|
126
|
+
}.property(),
|
127
|
+
|
128
|
+
/**
|
129
|
+
Returns a new enumerator for this object. See SC.Enumerator for
|
130
|
+
documentation on how to use this object. Enumeration is an alternative
|
131
|
+
to using one of the other iterators described here.
|
132
|
+
|
133
|
+
@returns {SC.Enumerator} an enumerator for the receiver
|
134
|
+
*/
|
135
|
+
enumerator: function() { return SC.Enumerator.create(this); },
|
136
|
+
|
137
|
+
/**
|
138
|
+
Iterates through the enumerable, calling the passed function on each
|
139
|
+
item. This method corresponds to the forEach() method defined in
|
140
|
+
JavaScript 1.6.
|
141
|
+
|
142
|
+
The callback method you provide should have the following signature (all
|
143
|
+
parameters are optional):
|
144
|
+
|
145
|
+
{{{
|
146
|
+
function(item, index, enumerable) ;
|
147
|
+
}}}
|
148
|
+
|
149
|
+
- *item* is the current item in the iteration.
|
150
|
+
- *index* is the current index in the iteration
|
151
|
+
- *enumerable* is the enumerable object itself.
|
152
|
+
|
153
|
+
Note that in addition to a callback, you can also pass an optional target
|
154
|
+
object that will be set as "this" on the context. This is a good way
|
155
|
+
to give your iterator function access to the current object.
|
156
|
+
|
157
|
+
@params callback {Function} the callback to execute
|
158
|
+
@params target {Object} the target object to use
|
159
|
+
@returns {Object} this
|
160
|
+
*/
|
161
|
+
forEach: function(callback, target) {
|
162
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
163
|
+
var len = this.get ? this.get('length') : this.length ;
|
164
|
+
if (target === undefined) target = null;
|
165
|
+
|
166
|
+
var last = null ;
|
167
|
+
var context = SC.Enumerator._popContext();
|
168
|
+
for(var idx=0;idx<len;idx++) {
|
169
|
+
var next = this.nextObject(idx, last, context) ;
|
170
|
+
callback.call(target, next, idx, this);
|
171
|
+
last = next ;
|
172
|
+
}
|
173
|
+
last = null ;
|
174
|
+
context = SC.Enumerator._pushContext(context);
|
175
|
+
return this ;
|
176
|
+
},
|
177
|
+
|
178
|
+
/**
|
179
|
+
Retrieves the named value on each member object. This is more efficient
|
180
|
+
than using one of the wrapper methods defined here. Objects that
|
181
|
+
implement SC.Observable will use the get() method, otherwise the property
|
182
|
+
will be accessed directly.
|
183
|
+
|
184
|
+
@param {String} key the key to retrieve
|
185
|
+
@returns {Array} extracted values
|
186
|
+
*/
|
187
|
+
getEach: function(key) {
|
188
|
+
return this.map(function(next) {
|
189
|
+
return next ? (next.get ? next.get(key) : next[key]) : null;
|
190
|
+
}, this);
|
191
|
+
},
|
192
|
+
|
193
|
+
/**
|
194
|
+
Sets the value on the named property for each member. This is more
|
195
|
+
efficient than using other methods defined on this helper. If the object
|
196
|
+
implements SC.Observable, the value will be changed to set(), otherwise
|
197
|
+
it will be set directly. null objects are skipped.
|
198
|
+
|
199
|
+
@param {String} key the key to set
|
200
|
+
@param {Object} value the object to set
|
201
|
+
@returns {Object} receiver
|
202
|
+
*/
|
203
|
+
setEach: function(key, value) {
|
204
|
+
this.forEach(function(next) {
|
205
|
+
if (next) {
|
206
|
+
if (next.set) next.set(key, value) ;
|
207
|
+
else next[key] = value ;
|
208
|
+
}
|
209
|
+
}, this);
|
210
|
+
return this ;
|
211
|
+
},
|
212
|
+
|
213
|
+
/**
|
214
|
+
Maps all of the items in the enumeration to another value, returning
|
215
|
+
a new array. This method corresponds to map() defined in JavaScript 1.6.
|
216
|
+
|
217
|
+
The callback method you provide should have the following signature (all
|
218
|
+
parameters are optional):
|
219
|
+
|
220
|
+
{{{
|
221
|
+
function(item, index, enumerable) ;
|
222
|
+
}}}
|
223
|
+
|
224
|
+
- *item* is the current item in the iteration.
|
225
|
+
- *index* is the current index in the iteration
|
226
|
+
- *enumerable* is the enumerable object itself.
|
227
|
+
|
228
|
+
It should return the mapped value.
|
229
|
+
|
230
|
+
Note that in addition to a callback, you can also pass an optional target
|
231
|
+
object that will be set as "this" on the context. This is a good way
|
232
|
+
to give your iterator function access to the current object.
|
233
|
+
|
234
|
+
@params callback {Function} the callback to execute
|
235
|
+
@params target {Object} the target object to use
|
236
|
+
@returns {Array} The mapped array.
|
237
|
+
*/
|
238
|
+
map: function(callback, target) {
|
239
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
240
|
+
var len = this.get ? this.get('length') : this.length ;
|
241
|
+
if (target === undefined) target = null;
|
242
|
+
|
243
|
+
var ret = [];
|
244
|
+
var last = null ;
|
245
|
+
var context = SC.Enumerator._popContext();
|
246
|
+
for(var idx=0;idx<len;idx++) {
|
247
|
+
var next = this.nextObject(idx, last, context) ;
|
248
|
+
ret[idx] = callback.call(target, next, idx, this) ;
|
249
|
+
last = next ;
|
250
|
+
}
|
251
|
+
last = null ;
|
252
|
+
context = SC.Enumerator._pushContext(context);
|
253
|
+
return ret ;
|
254
|
+
},
|
255
|
+
|
256
|
+
/**
|
257
|
+
Similar to map, this specialized function returns the value of the named
|
258
|
+
property on all items in the enumeration.
|
259
|
+
|
260
|
+
@params key {String} name of the property
|
261
|
+
@returns {Array} The mapped array.
|
262
|
+
*/
|
263
|
+
mapProperty: function(key) {
|
264
|
+
return this.map(function(next) {
|
265
|
+
return next ? (next.get ? next.get(key) : next[key]) : null;
|
266
|
+
});
|
267
|
+
},
|
268
|
+
|
269
|
+
/**
|
270
|
+
Returns an array with all of the items in the enumeration that the passed
|
271
|
+
function returns YES for. This method corresponds to filter() defined in
|
272
|
+
JavaScript 1.6.
|
273
|
+
|
274
|
+
The callback method you provide should have the following signature (all
|
275
|
+
parameters are optional):
|
276
|
+
|
277
|
+
{{{
|
278
|
+
function(item, index, enumerable) ;
|
279
|
+
}}}
|
280
|
+
|
281
|
+
- *item* is the current item in the iteration.
|
282
|
+
- *index* is the current index in the iteration
|
283
|
+
- *enumerable* is the enumerable object itself.
|
284
|
+
|
285
|
+
It should return the YES to include the item in the results, NO otherwise.
|
286
|
+
|
287
|
+
Note that in addition to a callback, you can also pass an optional target
|
288
|
+
object that will be set as "this" on the context. This is a good way
|
289
|
+
to give your iterator function access to the current object.
|
290
|
+
|
291
|
+
@params callback {Function} the callback to execute
|
292
|
+
@params target {Object} the target object to use
|
293
|
+
@returns {Array} A filtered array.
|
294
|
+
*/
|
295
|
+
filter: function(callback, target) {
|
296
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
297
|
+
var len = this.get ? this.get('length') : this.length ;
|
298
|
+
if (target === undefined) target = null;
|
299
|
+
|
300
|
+
var ret = [];
|
301
|
+
var last = null ;
|
302
|
+
var context = SC.Enumerator._popContext();
|
303
|
+
for(var idx=0;idx<len;idx++) {
|
304
|
+
var next = this.nextObject(idx, last, context) ;
|
305
|
+
if(callback.call(target, next, idx, this)) ret.push(next) ;
|
306
|
+
last = next ;
|
307
|
+
}
|
308
|
+
last = null ;
|
309
|
+
context = SC.Enumerator._pushContext(context);
|
310
|
+
return ret ;
|
311
|
+
},
|
312
|
+
|
313
|
+
/**
|
314
|
+
Returns an array sorted by the value of the passed key parameters.
|
315
|
+
null objects will be sorted first. You can pass either an array of keys
|
316
|
+
or multiple parameters which will act as key names
|
317
|
+
|
318
|
+
@param {String} key one or more key names
|
319
|
+
@returns {Array}
|
320
|
+
*/
|
321
|
+
sortProperty: function(key) {
|
322
|
+
var keys = (typeof key === SC.T_STRING) ? arguments : key,
|
323
|
+
len = keys.length,
|
324
|
+
src;
|
325
|
+
|
326
|
+
// get the src array to sort
|
327
|
+
if (this instanceof Array) src = this;
|
328
|
+
else {
|
329
|
+
src = [];
|
330
|
+
this.forEach(function(i) { src.push(i); });
|
331
|
+
}
|
332
|
+
|
333
|
+
if (!src) return [];
|
334
|
+
return src.sort(function(a,b) {
|
335
|
+
var idx, key, aValue, bValue, ret = 0;
|
336
|
+
|
337
|
+
for(idx=0;ret===0 && idx<len;idx++) {
|
338
|
+
key = keys[idx];
|
339
|
+
aValue = a ? (a.get ? a.get(key) : a[key]) : null;
|
340
|
+
bValue = b ? (b.get ? b.get(key) : b[key]) : null;
|
341
|
+
ret = SC.compare(aValue, bValue);
|
342
|
+
}
|
343
|
+
return ret ;
|
344
|
+
});
|
345
|
+
},
|
346
|
+
|
347
|
+
|
348
|
+
/**
|
349
|
+
Returns an array with just the items with the matched property. You
|
350
|
+
can pass an optional second argument with the target value. Otherwise
|
351
|
+
this will match any property that evaluates to true.
|
352
|
+
|
353
|
+
@params key {String} the property to test
|
354
|
+
@param value {String} optional value to test against.
|
355
|
+
@returns {Array} filtered array
|
356
|
+
*/
|
357
|
+
filterProperty: function(key, value) {
|
358
|
+
var len = this.get ? this.get('length') : this.length ;
|
359
|
+
var ret = [];
|
360
|
+
var last = null ;
|
361
|
+
var context = SC.Enumerator._popContext();
|
362
|
+
for(var idx=0;idx<len;idx++) {
|
363
|
+
var next = this.nextObject(idx, last, context) ;
|
364
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
365
|
+
var matched = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
366
|
+
if (matched) ret.push(next) ;
|
367
|
+
last = next ;
|
368
|
+
}
|
369
|
+
last = null ;
|
370
|
+
context = SC.Enumerator._pushContext(context);
|
371
|
+
return ret ;
|
372
|
+
},
|
373
|
+
|
374
|
+
/**
|
375
|
+
Returns the first item in the array for which the callback returns YES.
|
376
|
+
This method works similar to the filter() method defined in JavaScript 1.6
|
377
|
+
except that it will stop working on the array once a match is found.
|
378
|
+
|
379
|
+
The callback method you provide should have the following signature (all
|
380
|
+
parameters are optional):
|
381
|
+
|
382
|
+
{{{
|
383
|
+
function(item, index, enumerable) ;
|
384
|
+
}}}
|
385
|
+
|
386
|
+
- *item* is the current item in the iteration.
|
387
|
+
- *index* is the current index in the iteration
|
388
|
+
- *enumerable* is the enumerable object itself.
|
389
|
+
|
390
|
+
It should return the YES to include the item in the results, NO otherwise.
|
391
|
+
|
392
|
+
Note that in addition to a callback, you can also pass an optional target
|
393
|
+
object that will be set as "this" on the context. This is a good way
|
394
|
+
to give your iterator function access to the current object.
|
395
|
+
|
396
|
+
@params callback {Function} the callback to execute
|
397
|
+
@params target {Object} the target object to use
|
398
|
+
@returns {Object} Found item or null.
|
399
|
+
*/
|
400
|
+
find: function(callback, target) {
|
401
|
+
var len = this.get ? this.get('length') : this.length ;
|
402
|
+
if (target === undefined) target = null;
|
403
|
+
|
404
|
+
var last = null, next, found = NO, ret = null ;
|
405
|
+
var context = SC.Enumerator._popContext();
|
406
|
+
for(var idx=0;idx<len && !found;idx++) {
|
407
|
+
next = this.nextObject(idx, last, context) ;
|
408
|
+
if (found = callback.call(target, next, idx, this)) ret = next ;
|
409
|
+
last = next ;
|
410
|
+
}
|
411
|
+
next = last = null ;
|
412
|
+
context = SC.Enumerator._pushContext(context);
|
413
|
+
return ret ;
|
414
|
+
},
|
415
|
+
|
416
|
+
/**
|
417
|
+
Returns an the first item with a property matching the passed value. You
|
418
|
+
can pass an optional second argument with the target value. Otherwise
|
419
|
+
this will match any property that evaluates to true.
|
420
|
+
|
421
|
+
This method works much like the more generic find() method.
|
422
|
+
|
423
|
+
@params key {String} the property to test
|
424
|
+
@param value {String} optional value to test against.
|
425
|
+
@returns {Object} found item or null
|
426
|
+
*/
|
427
|
+
findProperty: function(key, value) {
|
428
|
+
var len = this.get ? this.get('length') : this.length ;
|
429
|
+
var found = NO, ret = null, last = null, next, cur ;
|
430
|
+
var context = SC.Enumerator._popContext();
|
431
|
+
for(var idx=0;idx<len && !found;idx++) {
|
432
|
+
next = this.nextObject(idx, last, context) ;
|
433
|
+
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
434
|
+
found = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
435
|
+
if (found) ret = next ;
|
436
|
+
last = next ;
|
437
|
+
}
|
438
|
+
last = next = null ;
|
439
|
+
context = SC.Enumerator._pushContext(context);
|
440
|
+
return ret ;
|
441
|
+
},
|
442
|
+
|
443
|
+
/**
|
444
|
+
Returns YES if the passed function returns YES for every item in the
|
445
|
+
enumeration. This corresponds with the every() method in JavaScript 1.6.
|
446
|
+
|
447
|
+
The callback method you provide should have the following signature (all
|
448
|
+
parameters are optional):
|
449
|
+
|
450
|
+
{{{
|
451
|
+
function(item, index, enumerable) ;
|
452
|
+
}}}
|
453
|
+
|
454
|
+
- *item* is the current item in the iteration.
|
455
|
+
- *index* is the current index in the iteration
|
456
|
+
- *enumerable* is the enumerable object itself.
|
457
|
+
|
458
|
+
It should return the YES or NO.
|
459
|
+
|
460
|
+
Note that in addition to a callback, you can also pass an optional target
|
461
|
+
object that will be set as "this" on the context. This is a good way
|
462
|
+
to give your iterator function access to the current object.
|
463
|
+
|
464
|
+
h4. Example Usage
|
465
|
+
|
466
|
+
{{{
|
467
|
+
if (people.every(isEngineer)) { Paychecks.addBigBonus(); }
|
468
|
+
}}}
|
469
|
+
|
470
|
+
@params callback {Function} the callback to execute
|
471
|
+
@params target {Object} the target object to use
|
472
|
+
@returns {Boolean}
|
473
|
+
*/
|
474
|
+
every: function(callback, target) {
|
475
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
476
|
+
var len = this.get ? this.get('length') : this.length ;
|
477
|
+
if (target === undefined) target = null;
|
478
|
+
|
479
|
+
var ret = YES;
|
480
|
+
var last = null ;
|
481
|
+
var context = SC.Enumerator._popContext();
|
482
|
+
for(var idx=0;ret && (idx<len);idx++) {
|
483
|
+
var next = this.nextObject(idx, last, context) ;
|
484
|
+
if(!callback.call(target, next, idx, this)) ret = NO ;
|
485
|
+
last = next ;
|
486
|
+
}
|
487
|
+
last = null ;
|
488
|
+
context = SC.Enumerator._pushContext(context);
|
489
|
+
return ret ;
|
490
|
+
},
|
491
|
+
|
492
|
+
/**
|
493
|
+
Returns YES if the passed property resolves to true for all items in the
|
494
|
+
enumerable. This method is often simpler/faster than using a callback.
|
495
|
+
|
496
|
+
@params key {String} the property to test
|
497
|
+
@param value {String} optional value to test against.
|
498
|
+
@returns {Array} filtered array
|
499
|
+
*/
|
500
|
+
everyProperty: function(key, value) {
|
501
|
+
var len = this.get ? this.get('length') : this.length ;
|
502
|
+
var ret = YES;
|
503
|
+
var last = null ;
|
504
|
+
var context = SC.Enumerator._popContext();
|
505
|
+
for(var idx=0;ret && (idx<len);idx++) {
|
506
|
+
var next = this.nextObject(idx, last, context) ;
|
507
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
508
|
+
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
509
|
+
last = next ;
|
510
|
+
}
|
511
|
+
last = null ;
|
512
|
+
context = SC.Enumerator._pushContext(context);
|
513
|
+
return ret ;
|
514
|
+
},
|
515
|
+
|
516
|
+
|
517
|
+
/**
|
518
|
+
Returns YES if the passed function returns true for any item in the
|
519
|
+
enumeration. This corresponds with the every() method in JavaScript 1.6.
|
520
|
+
|
521
|
+
The callback method you provide should have the following signature (all
|
522
|
+
parameters are optional):
|
523
|
+
|
524
|
+
{{{
|
525
|
+
function(item, index, enumerable) ;
|
526
|
+
}}}
|
527
|
+
|
528
|
+
- *item* is the current item in the iteration.
|
529
|
+
- *index* is the current index in the iteration
|
530
|
+
- *enumerable* is the enumerable object itself.
|
531
|
+
|
532
|
+
It should return the YES to include the item in the results, NO otherwise.
|
533
|
+
|
534
|
+
Note that in addition to a callback, you can also pass an optional target
|
535
|
+
object that will be set as "this" on the context. This is a good way
|
536
|
+
to give your iterator function access to the current object.
|
537
|
+
|
538
|
+
h4. Usage Example
|
539
|
+
|
540
|
+
{{{
|
541
|
+
if (people.some(isManager)) { Paychecks.addBiggerBonus(); }
|
542
|
+
}}}
|
543
|
+
|
544
|
+
@params callback {Function} the callback to execute
|
545
|
+
@params target {Object} the target object to use
|
546
|
+
@returns {Array} A filtered array.
|
547
|
+
*/
|
548
|
+
some: function(callback, target) {
|
549
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
550
|
+
var len = this.get ? this.get('length') : this.length ;
|
551
|
+
if (target === undefined) target = null;
|
552
|
+
|
553
|
+
var ret = NO;
|
554
|
+
var last = null ;
|
555
|
+
var context = SC.Enumerator._popContext();
|
556
|
+
for(var idx=0;(!ret) && (idx<len);idx++) {
|
557
|
+
var next = this.nextObject(idx, last, context) ;
|
558
|
+
if(callback.call(target, next, idx, this)) ret = YES ;
|
559
|
+
last = next ;
|
560
|
+
}
|
561
|
+
last = null ;
|
562
|
+
context = SC.Enumerator._pushContext(context);
|
563
|
+
return ret ;
|
564
|
+
},
|
565
|
+
|
566
|
+
/**
|
567
|
+
Returns YES if the passed property resolves to true for any item in the
|
568
|
+
enumerable. This method is often simpler/faster than using a callback.
|
569
|
+
|
570
|
+
@params key {String} the property to test
|
571
|
+
@param value {String} optional value to test against.
|
572
|
+
@returns {Boolean} YES
|
573
|
+
*/
|
574
|
+
someProperty: function(key, value) {
|
575
|
+
var len = this.get ? this.get('length') : this.length ;
|
576
|
+
var ret = NO;
|
577
|
+
var last = null ;
|
578
|
+
var context = SC.Enumerator._popContext();
|
579
|
+
for(var idx=0; !ret && (idx<len); idx++) {
|
580
|
+
var next = this.nextObject(idx, last, context) ;
|
581
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
582
|
+
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
583
|
+
last = next ;
|
584
|
+
}
|
585
|
+
last = null ;
|
586
|
+
context = SC.Enumerator._pushContext(context);
|
587
|
+
return ret ; // return the invert
|
588
|
+
},
|
589
|
+
|
590
|
+
/**
|
591
|
+
This will combine the values of the enumerator into a single value. It
|
592
|
+
is a useful way to collect a summary value from an enumeration. This
|
593
|
+
corresponds to the reduce() method defined in JavaScript 1.8.
|
594
|
+
|
595
|
+
The callback method you provide should have the following signature (all
|
596
|
+
parameters are optional):
|
597
|
+
|
598
|
+
{{{
|
599
|
+
function(previousValue, item, index, enumerable) ;
|
600
|
+
}}}
|
601
|
+
|
602
|
+
- *previousValue* is the value returned by the last call to the iterator.
|
603
|
+
- *item* is the current item in the iteration.
|
604
|
+
- *index* is the current index in the iteration
|
605
|
+
- *enumerable* is the enumerable object itself.
|
606
|
+
|
607
|
+
Return the new cumulative value.
|
608
|
+
|
609
|
+
In addition to the callback you can also pass an initialValue. An error
|
610
|
+
will be raised if you do not pass an initial value and the enumerator is
|
611
|
+
empty.
|
612
|
+
|
613
|
+
Note that unlike the other methods, this method does not allow you to
|
614
|
+
pass a target object to set as this for the callback. It's part of the
|
615
|
+
spec. Sorry.
|
616
|
+
|
617
|
+
@params callback {Function} the callback to execute
|
618
|
+
@params initialValue {Object} initial value for the reduce
|
619
|
+
@params reducerProperty {String} internal use only. May not be available.
|
620
|
+
@returns {Array} A filtered array.
|
621
|
+
*/
|
622
|
+
reduce: function(callback, initialValue, reducerProperty) {
|
623
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
624
|
+
var len = this.get ? this.get('length') : this.length ;
|
625
|
+
|
626
|
+
// no value to return if no initial value & empty
|
627
|
+
if (len===0 && initialValue === undefined) throw new TypeError();
|
628
|
+
|
629
|
+
var ret = initialValue;
|
630
|
+
var last = null ;
|
631
|
+
var context = SC.Enumerator._popContext();
|
632
|
+
for(var idx=0;idx<len;idx++) {
|
633
|
+
var next = this.nextObject(idx, last, context) ;
|
634
|
+
|
635
|
+
// while ret is still undefined, just set the first value we get as ret.
|
636
|
+
// this is not the ideal behavior actually but it matches the FireFox
|
637
|
+
// implementation... :(
|
638
|
+
if (next !== null) {
|
639
|
+
if (ret === undefined) {
|
640
|
+
ret = next ;
|
641
|
+
} else {
|
642
|
+
ret = callback.call(null, ret, next, idx, this, reducerProperty);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
last = next ;
|
646
|
+
}
|
647
|
+
last = null ;
|
648
|
+
context = SC.Enumerator._pushContext(context);
|
649
|
+
|
650
|
+
// uh oh...we never found a value!
|
651
|
+
if (ret === undefined) throw new TypeError() ;
|
652
|
+
return ret ;
|
653
|
+
},
|
654
|
+
|
655
|
+
/**
|
656
|
+
Invokes the named method on every object in the receiver that
|
657
|
+
implements it. This method corresponds to the implementation in
|
658
|
+
Prototype 1.6.
|
659
|
+
|
660
|
+
@param methodName {String} the name of the method
|
661
|
+
@param args {Object...} optional arguments to pass as well.
|
662
|
+
@returns {Array} return values from calling invoke.
|
663
|
+
*/
|
664
|
+
invoke: function(methodName) {
|
665
|
+
var len = this.get ? this.get('length') : this.length ;
|
666
|
+
if (len <= 0) return [] ; // nothing to invoke....
|
667
|
+
|
668
|
+
var idx;
|
669
|
+
|
670
|
+
// collect the arguments
|
671
|
+
var args = [] ;
|
672
|
+
var alen = arguments.length ;
|
673
|
+
if (alen > 1) {
|
674
|
+
for(idx=1;idx<alen;idx++) args.push(arguments[idx]) ;
|
675
|
+
}
|
676
|
+
|
677
|
+
// call invoke
|
678
|
+
var ret = [] ;
|
679
|
+
var last = null ;
|
680
|
+
var context = SC.Enumerator._popContext();
|
681
|
+
for(idx=0;idx<len;idx++) {
|
682
|
+
var next = this.nextObject(idx, last, context) ;
|
683
|
+
var method = next ? next[methodName] : null ;
|
684
|
+
if (method) ret[idx] = method.apply(next, args) ;
|
685
|
+
last = next ;
|
686
|
+
}
|
687
|
+
last = null ;
|
688
|
+
context = SC.Enumerator._pushContext(context);
|
689
|
+
return ret ;
|
690
|
+
},
|
691
|
+
|
692
|
+
/**
|
693
|
+
Invokes the passed method and optional arguments on the receiver elements
|
694
|
+
as long as the methods return value matches the target value. This is
|
695
|
+
a useful way to attempt to apply changes to a collection of objects unless
|
696
|
+
or until one fails.
|
697
|
+
|
698
|
+
@param targetValue {Object} the target return value
|
699
|
+
@param methodName {String} the name of the method
|
700
|
+
@param args {Object...} optional arguments to pass as well.
|
701
|
+
@returns {Array} return values from calling invoke.
|
702
|
+
*/
|
703
|
+
invokeWhile: function(targetValue, methodName) {
|
704
|
+
var len = this.get ? this.get('length') : this.length ;
|
705
|
+
if (len <= 0) return null; // nothing to invoke....
|
706
|
+
|
707
|
+
var idx;
|
708
|
+
|
709
|
+
// collect the arguments
|
710
|
+
var args = [] ;
|
711
|
+
var alen = arguments.length ;
|
712
|
+
if (alen > 2) {
|
713
|
+
for(idx=2;idx<alen;idx++) args.push(arguments[idx]) ;
|
714
|
+
}
|
715
|
+
|
716
|
+
// call invoke
|
717
|
+
var ret = targetValue ;
|
718
|
+
var last = null ;
|
719
|
+
var context = SC.Enumerator._popContext();
|
720
|
+
for(idx=0;(ret === targetValue) && (idx<len);idx++) {
|
721
|
+
var next = this.nextObject(idx, last, context) ;
|
722
|
+
var method = next ? next[methodName] : null ;
|
723
|
+
if (method) ret = method.apply(next, args) ;
|
724
|
+
last = next ;
|
725
|
+
}
|
726
|
+
last = null ;
|
727
|
+
context = SC.Enumerator._pushContext(context);
|
728
|
+
return ret ;
|
729
|
+
},
|
730
|
+
|
731
|
+
/**
|
732
|
+
Simply converts the enumerable into a genuine array. The order, of
|
733
|
+
course, is not gauranteed. Corresponds to the method implemented by
|
734
|
+
Prototype.
|
735
|
+
|
736
|
+
@returns {Array} the enumerable as an array.
|
737
|
+
*/
|
738
|
+
toArray: function() {
|
739
|
+
var ret = [];
|
740
|
+
this.forEach(function(o) { ret.push(o); }, this);
|
741
|
+
return ret ;
|
742
|
+
},
|
743
|
+
|
744
|
+
/**
|
745
|
+
Converts an enumerable into a matrix, with inner arrays grouped based
|
746
|
+
on a particular property of the elements of the enumerable.
|
747
|
+
|
748
|
+
@params key {String} the property to test
|
749
|
+
@returns {Array} matrix of arrays
|
750
|
+
*/
|
751
|
+
groupBy: function(key){
|
752
|
+
var len = this.get ? this.get('length') : this.length,
|
753
|
+
ret = [],
|
754
|
+
last = null,
|
755
|
+
context = SC.Enumerator._popContext(),
|
756
|
+
grouped = [],
|
757
|
+
keyValues = [],
|
758
|
+
idx, next, cur;
|
759
|
+
|
760
|
+
for(idx=0;idx<len;idx++) {
|
761
|
+
next = this.nextObject(idx, last, context) ;
|
762
|
+
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
763
|
+
if(SC.none(grouped[cur])) {
|
764
|
+
grouped[cur] = []; keyValues.push(cur);
|
765
|
+
}
|
766
|
+
grouped[cur].push(next);
|
767
|
+
last = next;
|
768
|
+
}
|
769
|
+
last = null;
|
770
|
+
context = SC.Enumerator._pushContext(context);
|
771
|
+
|
772
|
+
for(idx=0,len=keyValues.length; idx < len; idx++){
|
773
|
+
ret.push(grouped[keyValues[idx]]);
|
774
|
+
}
|
775
|
+
return ret ;
|
776
|
+
}
|
777
|
+
|
778
|
+
} ;
|
779
|
+
|
780
|
+
// Build in a separate function to avoid unintential leaks through closures...
|
781
|
+
SC._buildReducerFor = function(reducerKey, reducerProperty) {
|
782
|
+
return function(key, value) {
|
783
|
+
var reducer = this[reducerKey] ;
|
784
|
+
if (SC.typeOf(reducer) !== SC.T_FUNCTION) {
|
785
|
+
return this.unknownProperty ? this.unknownProperty(key, value) : null;
|
786
|
+
} else {
|
787
|
+
// Invoke the reduce method defined in enumerable instead of using the
|
788
|
+
// one implemented in the receiver. The receiver might be a native
|
789
|
+
// implementation that does not support reducerProperty.
|
790
|
+
var ret = SC.Enumerable.reduce.call(this, reducer, null, reducerProperty) ;
|
791
|
+
return ret ;
|
792
|
+
}
|
793
|
+
}.property('[]') ;
|
794
|
+
};
|
795
|
+
|
796
|
+
SC.Reducers = /** @lends SC.Enumerable */ {
|
797
|
+
/**
|
798
|
+
This property will trigger anytime the enumerable's content changes.
|
799
|
+
You can observe this property to be notified of changes to the enumerables
|
800
|
+
content.
|
801
|
+
|
802
|
+
For plain enumerables, this property is read only. SC.Array overrides
|
803
|
+
this method.
|
804
|
+
|
805
|
+
@property {SC.Array}
|
806
|
+
*/
|
807
|
+
'[]': function(key, value) { return this ; }.property(),
|
808
|
+
|
809
|
+
/**
|
810
|
+
Invoke this method when the contents of your enumerable has changed.
|
811
|
+
This will notify any observers watching for content changes. If your are
|
812
|
+
implementing an ordered enumerable (such as an array), also pass the
|
813
|
+
start and end values where the content changed so that it can be used to
|
814
|
+
notify range observers.
|
815
|
+
|
816
|
+
@param {Number} start optional start offset for the content change
|
817
|
+
@param {Number} length optional length of change
|
818
|
+
@param {Number} delta if you added or removed objects, the delta change
|
819
|
+
@param {Array} addedObjects the objects that were added
|
820
|
+
@param {Array} removedObjects the objects that were removed
|
821
|
+
@returns {Object} receiver
|
822
|
+
*/
|
823
|
+
enumerableContentDidChange: function(start, length, delta, addedObjects, removedObjects) {
|
824
|
+
this._setupEnumerableObservers(addedObjects, removedObjects);
|
825
|
+
this.notifyPropertyChange('[]') ;
|
826
|
+
|
827
|
+
return this ;
|
828
|
+
},
|
829
|
+
|
830
|
+
/**
|
831
|
+
@private
|
832
|
+
|
833
|
+
Clones a segment of an observer chain and applies it
|
834
|
+
to an element of this Enumerable.
|
835
|
+
|
836
|
+
@param {SC._ChainObserver} chainObserver the chain segment to begin from
|
837
|
+
*/
|
838
|
+
_resumeChainObservingForItemWithChainObserver: function(item, chainObserver) {
|
839
|
+
var observer = SC.clone(chainObserver.next);
|
840
|
+
var key = observer.property;
|
841
|
+
|
842
|
+
// The chain observer should create new observers on the child object
|
843
|
+
observer.object = item;
|
844
|
+
item.addObserver(key, observer, observer.propertyDidChange);
|
845
|
+
|
846
|
+
// if we're in the initial chained observer setup phase, add the tail
|
847
|
+
// of the current observer segment to the list of tracked tails.
|
848
|
+
if(chainObserver.root.tails) {
|
849
|
+
chainObserver.root.tails.pushObject(observer.tail());
|
850
|
+
}
|
851
|
+
|
852
|
+
observer.propertyDidChange();
|
853
|
+
|
854
|
+
// Maintain a list of observers on the item so we can remove them
|
855
|
+
// if it is removed from the enumerable.
|
856
|
+
item._kvo_for(SC.keyFor('_kvo_enumerable_observers', key)).push(observer);
|
857
|
+
},
|
858
|
+
|
859
|
+
/**
|
860
|
+
@private
|
861
|
+
|
862
|
+
When enumerable content has changed, remove enumerable observers from
|
863
|
+
items that are no longer in the enumerable, and add observers to newly
|
864
|
+
added items.
|
865
|
+
|
866
|
+
@param {Array} addedObjects the array of objects that have been added
|
867
|
+
@param {Array} removedObjects the array of objects that have been removed
|
868
|
+
*/
|
869
|
+
_setupEnumerableObservers: function(addedObjects, removedObjects) {
|
870
|
+
if (!addedObjects) { addedObjects = this; }
|
871
|
+
if (!removedObjects) { removedObjects = []; }
|
872
|
+
|
873
|
+
var observedKeys = this._kvo_for('_kvo_enumerable_observed_keys', SC.CoreSet);
|
874
|
+
var kvoKey;
|
875
|
+
|
876
|
+
// Only setup and teardown enumerable observers if we have keys to observe
|
877
|
+
if (observedKeys.get('length') > 0) {
|
878
|
+
// Loop through removed objects and remove any enumerable observers that
|
879
|
+
// belong to them.
|
880
|
+
removedObjects.forEach(function(item) {
|
881
|
+
item._kvo_for('_kvo_enumerable_observers').forEach(function(observer) {
|
882
|
+
// Remove the observer if it is pointing at this enumerable.
|
883
|
+
// If the observer belongs to another enumerable, just ignore it.
|
884
|
+
if (observer.object === this) {
|
885
|
+
item.removeObserver(observer.key, observer, observer.propertyDidChange);
|
886
|
+
}
|
887
|
+
});
|
888
|
+
});
|
889
|
+
|
890
|
+
// added and resume the chain observer.
|
891
|
+
observedKeys.forEach(function(key) {
|
892
|
+
kvoKey = SC.keyFor('_kvo_enumerable_observers', key);
|
893
|
+
|
894
|
+
var lastObserver;
|
895
|
+
|
896
|
+
// Get all original ChainObservers associated with the key
|
897
|
+
this._kvo_for(kvoKey).forEach(function(observer) {
|
898
|
+
// if there are no added objects or removed objects, this
|
899
|
+
// object is a proxy (like ArrayController), which does
|
900
|
+
// not currently receive the added or removed objects.
|
901
|
+
// As a result, walk down to the last element of the
|
902
|
+
// chain and trigger its propertyDidChange, which will
|
903
|
+
// invalidate anything listening.
|
904
|
+
if(!addedObjects.get('length') && !removedObjects.get('length')) {
|
905
|
+
lastObserver = observer;
|
906
|
+
while(lastObserver.next) { lastObserver = lastObserver.next; }
|
907
|
+
lastObserver.propertyDidChange();
|
908
|
+
} else {
|
909
|
+
addedObjects.forEach(function(item) {
|
910
|
+
this._resumeChainObservingForItemWithChainObserver(item, observer);
|
911
|
+
}, this);
|
912
|
+
}
|
913
|
+
}, this);
|
914
|
+
}, this);
|
915
|
+
}
|
916
|
+
},
|
917
|
+
|
918
|
+
/**
|
919
|
+
@private
|
920
|
+
|
921
|
+
Adds an enumerable observer. Enumerable observers are able to
|
922
|
+
propagate chain observers to each member item in the enumerable,
|
923
|
+
so that the observer is fired whenever a single item changes.
|
924
|
+
|
925
|
+
You should never call this method directly. Instead, you should
|
926
|
+
call addObserver() with the special '[]' property in the path.
|
927
|
+
|
928
|
+
For example, if you wanted to observe changes to each item's isDone
|
929
|
+
property, you could call:
|
930
|
+
|
931
|
+
arrayController.addObserver('[].isDone');
|
932
|
+
*/
|
933
|
+
addEnumerableObserver: function(key, target, action) {
|
934
|
+
// Add the key to a set so we know what we are observing
|
935
|
+
this._kvo_for('_kvo_enumerable_observed_keys', SC.CoreSet).push(key);
|
936
|
+
|
937
|
+
// Add the passed ChainObserver to an ObserverSet for that key
|
938
|
+
var kvoKey = SC.keyFor('_kvo_enumerable_observers', key);
|
939
|
+
this._kvo_for(kvoKey).push(target);
|
940
|
+
|
941
|
+
// set up chained observers on the initial content
|
942
|
+
this._setupEnumerableObservers(this);
|
943
|
+
},
|
944
|
+
|
945
|
+
/**
|
946
|
+
Call this method from your unknownProperty() handler to implement
|
947
|
+
automatic reduced properties. A reduced property is a property that
|
948
|
+
collects its contents dynamically from your array contents. Reduced
|
949
|
+
properties always begin with "@". Getting this property will call
|
950
|
+
reduce() on your array with the function matching the key name as the
|
951
|
+
processor.
|
952
|
+
|
953
|
+
The return value of this will be either the return value from the
|
954
|
+
reduced property or undefined, which means this key is not a reduced
|
955
|
+
property. You can call this at the top of your unknownProperty handler
|
956
|
+
like so:
|
957
|
+
|
958
|
+
{{{
|
959
|
+
unknownProperty: function(key, value) {
|
960
|
+
var ret = this.handleReduceProperty(key, value) ;
|
961
|
+
if (ret === undefined) {
|
962
|
+
// process like normal
|
963
|
+
}
|
964
|
+
}
|
965
|
+
}}}
|
966
|
+
|
967
|
+
@param {String} key
|
968
|
+
the reduce property key
|
969
|
+
|
970
|
+
@param {Object} value
|
971
|
+
a value or undefined.
|
972
|
+
|
973
|
+
@param {Boolean} generateProperty
|
974
|
+
only set to false if you do not want an optimized computed property
|
975
|
+
handler generated for this. Not common.
|
976
|
+
|
977
|
+
@returns {Object} the reduced property or undefined
|
978
|
+
*/
|
979
|
+
reducedProperty: function(key, value, generateProperty) {
|
980
|
+
|
981
|
+
if (!key || typeof key !== SC.T_STRING || key.charAt(0) !== '@') return undefined ; // not a reduced property
|
982
|
+
|
983
|
+
// get the reducer key and the reducer
|
984
|
+
var matches = key.match(/^@([^(]*)(\(([^)]*)\))?$/) ;
|
985
|
+
if (!matches || matches.length < 2) return undefined ; // no match
|
986
|
+
|
987
|
+
var reducerKey = matches[1]; // = 'max' if key = '@max(balance)'
|
988
|
+
var reducerProperty = matches[3] ; // = 'balance' if key = '@max(balance)'
|
989
|
+
reducerKey = "reduce" + reducerKey.slice(0,1).toUpperCase() + reducerKey.slice(1);
|
990
|
+
var reducer = this[reducerKey] ;
|
991
|
+
|
992
|
+
// if there is no reduce function defined for this key, then we can't
|
993
|
+
// build a reducer for it.
|
994
|
+
if (SC.typeOf(reducer) !== SC.T_FUNCTION) return undefined;
|
995
|
+
|
996
|
+
// if we can't generate the property, just run reduce
|
997
|
+
if (generateProperty === NO) {
|
998
|
+
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty) ;
|
999
|
+
}
|
1000
|
+
|
1001
|
+
// ok, found the reducer. Let's build the computed property and install
|
1002
|
+
var func = SC._buildReducerFor(reducerKey, reducerProperty);
|
1003
|
+
var p = this.constructor.prototype ;
|
1004
|
+
|
1005
|
+
if (p) {
|
1006
|
+
p[key] = func ;
|
1007
|
+
|
1008
|
+
// add the function to the properties array so that new instances
|
1009
|
+
// will have their dependent key registered.
|
1010
|
+
var props = p._properties || [] ;
|
1011
|
+
props.push(key) ;
|
1012
|
+
p._properties = props ;
|
1013
|
+
this.registerDependentKey(key, '[]') ;
|
1014
|
+
}
|
1015
|
+
|
1016
|
+
// and reduce anyway...
|
1017
|
+
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty) ;
|
1018
|
+
},
|
1019
|
+
|
1020
|
+
/**
|
1021
|
+
Reducer for @max reduced property.
|
1022
|
+
*/
|
1023
|
+
reduceMax: function(previousValue, item, index, e, reducerProperty) {
|
1024
|
+
if (reducerProperty && item) {
|
1025
|
+
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
1026
|
+
}
|
1027
|
+
if (previousValue === null) return item ;
|
1028
|
+
return (item > previousValue) ? item : previousValue ;
|
1029
|
+
},
|
1030
|
+
|
1031
|
+
/**
|
1032
|
+
Reducer for @maxObject reduced property.
|
1033
|
+
*/
|
1034
|
+
reduceMaxObject: function(previousItem, item, index, e, reducerProperty) {
|
1035
|
+
|
1036
|
+
// get the value for both the previous and current item. If no
|
1037
|
+
// reducerProperty was supplied, use the items themselves.
|
1038
|
+
var previousValue = previousItem, itemValue = item ;
|
1039
|
+
if (reducerProperty) {
|
1040
|
+
if (item) {
|
1041
|
+
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty] ;
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
if (previousItem) {
|
1045
|
+
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty] ;
|
1046
|
+
}
|
1047
|
+
}
|
1048
|
+
if (previousValue === null) return item ;
|
1049
|
+
return (itemValue > previousValue) ? item : previousItem ;
|
1050
|
+
},
|
1051
|
+
|
1052
|
+
/**
|
1053
|
+
Reducer for @min reduced property.
|
1054
|
+
*/
|
1055
|
+
reduceMin: function(previousValue, item, index, e, reducerProperty) {
|
1056
|
+
if (reducerProperty && item) {
|
1057
|
+
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
1058
|
+
}
|
1059
|
+
if (previousValue === null) return item ;
|
1060
|
+
return (item < previousValue) ? item : previousValue ;
|
1061
|
+
},
|
1062
|
+
|
1063
|
+
/**
|
1064
|
+
Reducer for @maxObject reduced property.
|
1065
|
+
*/
|
1066
|
+
reduceMinObject: function(previousItem, item, index, e, reducerProperty) {
|
1067
|
+
|
1068
|
+
// get the value for both the previous and current item. If no
|
1069
|
+
// reducerProperty was supplied, use the items themselves.
|
1070
|
+
var previousValue = previousItem, itemValue = item ;
|
1071
|
+
if (reducerProperty) {
|
1072
|
+
if (item) {
|
1073
|
+
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty] ;
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
if (previousItem) {
|
1077
|
+
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty] ;
|
1078
|
+
}
|
1079
|
+
}
|
1080
|
+
if (previousValue === null) return item ;
|
1081
|
+
return (itemValue < previousValue) ? item : previousItem ;
|
1082
|
+
},
|
1083
|
+
|
1084
|
+
/**
|
1085
|
+
Reducer for @average reduced property.
|
1086
|
+
*/
|
1087
|
+
reduceAverage: function(previousValue, item, index, e, reducerProperty) {
|
1088
|
+
if (reducerProperty && item) {
|
1089
|
+
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
1090
|
+
}
|
1091
|
+
var ret = (previousValue || 0) + item ;
|
1092
|
+
var len = e.get ? e.get('length') : e.length;
|
1093
|
+
if (index >= len-1) ret = ret / len; //avg after last item.
|
1094
|
+
return ret ;
|
1095
|
+
},
|
1096
|
+
|
1097
|
+
/**
|
1098
|
+
Reducer for @sum reduced property.
|
1099
|
+
*/
|
1100
|
+
reduceSum: function(previousValue, item, index, e, reducerProperty) {
|
1101
|
+
if (reducerProperty && item) {
|
1102
|
+
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
1103
|
+
}
|
1104
|
+
return (previousValue === null) ? item : previousValue + item ;
|
1105
|
+
}
|
1106
|
+
} ;
|
1107
|
+
|
1108
|
+
// Apply reducers...
|
1109
|
+
SC.mixin(SC.Enumerable, SC.Reducers) ;
|
1110
|
+
SC.mixin(Array.prototype, SC.Reducers) ;
|
1111
|
+
Array.prototype.isEnumerable = YES ;
|
1112
|
+
|
1113
|
+
// ......................................................
|
1114
|
+
// ARRAY SUPPORT
|
1115
|
+
//
|
1116
|
+
|
1117
|
+
// Implement the same enhancements on Array. We use specialized methods
|
1118
|
+
// because working with arrays are so common.
|
1119
|
+
(function() {
|
1120
|
+
|
1121
|
+
// These methods will be applied even if they already exist b/c we do it
|
1122
|
+
// better.
|
1123
|
+
var alwaysMixin = {
|
1124
|
+
|
1125
|
+
// this is supported so you can get an enumerator. The rest of the
|
1126
|
+
// methods do not use this just to squeeze every last ounce of perf as
|
1127
|
+
// possible.
|
1128
|
+
nextObject: SC.Enumerable.nextObject,
|
1129
|
+
enumerator: SC.Enumerable.enumerator,
|
1130
|
+
firstObject: SC.Enumerable.firstObject,
|
1131
|
+
lastObject: SC.Enumerable.lastObject,
|
1132
|
+
sortProperty: SC.Enumerable.sortProperty,
|
1133
|
+
|
1134
|
+
// see above...
|
1135
|
+
mapProperty: function(key) {
|
1136
|
+
var len = this.length ;
|
1137
|
+
var ret = [];
|
1138
|
+
for(var idx=0;idx<len;idx++) {
|
1139
|
+
var next = this[idx] ;
|
1140
|
+
ret[idx] = next ? (next.get ? next.get(key) : next[key]) : null;
|
1141
|
+
}
|
1142
|
+
return ret ;
|
1143
|
+
},
|
1144
|
+
|
1145
|
+
filterProperty: function(key, value) {
|
1146
|
+
var len = this.length ;
|
1147
|
+
var ret = [];
|
1148
|
+
for(var idx=0;idx<len;idx++) {
|
1149
|
+
var next = this[idx] ;
|
1150
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
1151
|
+
var matched = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
1152
|
+
if (matched) ret.push(next) ;
|
1153
|
+
}
|
1154
|
+
return ret ;
|
1155
|
+
},
|
1156
|
+
|
1157
|
+
//returns a matrix
|
1158
|
+
groupBy: function(key) {
|
1159
|
+
var len = this.length,
|
1160
|
+
ret = [],
|
1161
|
+
grouped = [],
|
1162
|
+
keyValues = [],
|
1163
|
+
idx, next, cur;
|
1164
|
+
|
1165
|
+
for(idx=0;idx<len;idx++) {
|
1166
|
+
next = this[idx] ;
|
1167
|
+
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
1168
|
+
if(SC.none(grouped[cur])){ grouped[cur] = []; keyValues.push(cur); }
|
1169
|
+
grouped[cur].push(next);
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
for(idx=0,len=keyValues.length; idx < len; idx++){
|
1173
|
+
ret.push(grouped[keyValues[idx]]);
|
1174
|
+
}
|
1175
|
+
return ret ;
|
1176
|
+
},
|
1177
|
+
|
1178
|
+
find: function(callback, target) {
|
1179
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1180
|
+
var len = this.length ;
|
1181
|
+
if (target === undefined) target = null;
|
1182
|
+
|
1183
|
+
var next, ret = null, found = NO;
|
1184
|
+
for(var idx=0;idx<len && !found;idx++) {
|
1185
|
+
next = this[idx] ;
|
1186
|
+
if(found = callback.call(target, next, idx, this)) ret = next ;
|
1187
|
+
}
|
1188
|
+
next = null;
|
1189
|
+
return ret ;
|
1190
|
+
},
|
1191
|
+
|
1192
|
+
findProperty: function(key, value) {
|
1193
|
+
var len = this.length ;
|
1194
|
+
var next, cur, found=NO, ret=null;
|
1195
|
+
for(var idx=0;idx<len && !found;idx++) {
|
1196
|
+
cur = (next=this[idx]) ? (next.get ? next.get(key): next[key]):null;
|
1197
|
+
found = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
1198
|
+
if (found) ret = next ;
|
1199
|
+
}
|
1200
|
+
next=null;
|
1201
|
+
return ret ;
|
1202
|
+
},
|
1203
|
+
|
1204
|
+
everyProperty: function(key, value) {
|
1205
|
+
var len = this.length ;
|
1206
|
+
var ret = YES;
|
1207
|
+
for(var idx=0;ret && (idx<len);idx++) {
|
1208
|
+
var next = this[idx] ;
|
1209
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
1210
|
+
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
1211
|
+
}
|
1212
|
+
return ret ;
|
1213
|
+
},
|
1214
|
+
|
1215
|
+
someProperty: function(key, value) {
|
1216
|
+
var len = this.length ;
|
1217
|
+
var ret = NO;
|
1218
|
+
for(var idx=0; !ret && (idx<len); idx++) {
|
1219
|
+
var next = this[idx] ;
|
1220
|
+
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
1221
|
+
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
1222
|
+
}
|
1223
|
+
return ret ; // return the invert
|
1224
|
+
},
|
1225
|
+
|
1226
|
+
invoke: function(methodName) {
|
1227
|
+
var len = this.length ;
|
1228
|
+
if (len <= 0) return [] ; // nothing to invoke....
|
1229
|
+
|
1230
|
+
var idx;
|
1231
|
+
|
1232
|
+
// collect the arguments
|
1233
|
+
var args = [] ;
|
1234
|
+
var alen = arguments.length ;
|
1235
|
+
if (alen > 1) {
|
1236
|
+
for(idx=1;idx<alen;idx++) args.push(arguments[idx]) ;
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
// call invoke
|
1240
|
+
var ret = [] ;
|
1241
|
+
for(idx=0;idx<len;idx++) {
|
1242
|
+
var next = this[idx] ;
|
1243
|
+
var method = next ? next[methodName] : null ;
|
1244
|
+
if (method) ret[idx] = method.apply(next, args) ;
|
1245
|
+
}
|
1246
|
+
return ret ;
|
1247
|
+
},
|
1248
|
+
|
1249
|
+
invokeWhile: function(targetValue, methodName) {
|
1250
|
+
var len = this.length ;
|
1251
|
+
if (len <= 0) return null ; // nothing to invoke....
|
1252
|
+
|
1253
|
+
var idx;
|
1254
|
+
|
1255
|
+
// collect the arguments
|
1256
|
+
var args = [] ;
|
1257
|
+
var alen = arguments.length ;
|
1258
|
+
if (alen > 2) {
|
1259
|
+
for(idx=2;idx<alen;idx++) args.push(arguments[idx]) ;
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
// call invoke
|
1263
|
+
var ret = targetValue ;
|
1264
|
+
for(idx=0;(ret === targetValue) && (idx<len);idx++) {
|
1265
|
+
var next = this[idx] ;
|
1266
|
+
var method = next ? next[methodName] : null ;
|
1267
|
+
if (method) ret = method.apply(next, args) ;
|
1268
|
+
}
|
1269
|
+
return ret ;
|
1270
|
+
},
|
1271
|
+
|
1272
|
+
toArray: function() {
|
1273
|
+
var len = this.length ;
|
1274
|
+
if (len <= 0) return [] ; // nothing to invoke....
|
1275
|
+
|
1276
|
+
// call invoke
|
1277
|
+
var ret = [] ;
|
1278
|
+
for(var idx=0;idx<len;idx++) {
|
1279
|
+
var next = this[idx] ;
|
1280
|
+
ret.push(next) ;
|
1281
|
+
}
|
1282
|
+
return ret ;
|
1283
|
+
},
|
1284
|
+
|
1285
|
+
getEach: function(key) {
|
1286
|
+
var ret = [];
|
1287
|
+
var len = this.length ;
|
1288
|
+
for(var idx=0;idx<len;idx++) {
|
1289
|
+
var obj = this[idx];
|
1290
|
+
ret[idx] = obj ? (obj.get ? obj.get(key) : obj[key]) : null;
|
1291
|
+
}
|
1292
|
+
return ret ;
|
1293
|
+
},
|
1294
|
+
|
1295
|
+
setEach: function(key, value) {
|
1296
|
+
var len = this.length;
|
1297
|
+
for(var idx=0;idx<len;idx++) {
|
1298
|
+
var obj = this[idx];
|
1299
|
+
if (obj) {
|
1300
|
+
if (obj.set) {
|
1301
|
+
obj.set(key, value);
|
1302
|
+
} else obj[key] = value ;
|
1303
|
+
}
|
1304
|
+
}
|
1305
|
+
return this ;
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
};
|
1309
|
+
|
1310
|
+
// These methods will only be applied if they are not already defined b/c
|
1311
|
+
// the browser is probably getting it.
|
1312
|
+
var mixinIfMissing = {
|
1313
|
+
|
1314
|
+
// QUESTION: The lack of DRY is burning my eyes [YK]
|
1315
|
+
forEach: function(callback, target) {
|
1316
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1317
|
+
|
1318
|
+
// QUESTION: Is this necessary?
|
1319
|
+
if (target === undefined) target = null;
|
1320
|
+
|
1321
|
+
for(var i=0, l=this.length; i<l; i++) {
|
1322
|
+
var next = this[i] ;
|
1323
|
+
callback.call(target, next, i, this);
|
1324
|
+
}
|
1325
|
+
return this ;
|
1326
|
+
},
|
1327
|
+
|
1328
|
+
map: function(callback, target) {
|
1329
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1330
|
+
|
1331
|
+
if (target === undefined) target = null;
|
1332
|
+
|
1333
|
+
var ret = [];
|
1334
|
+
for(var i=0, l=this.length; i<l; i++) {
|
1335
|
+
var next = this[i] ;
|
1336
|
+
ret[i] = callback.call(target, next, i, this) ;
|
1337
|
+
}
|
1338
|
+
return ret ;
|
1339
|
+
},
|
1340
|
+
|
1341
|
+
filter: function(callback, target) {
|
1342
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1343
|
+
|
1344
|
+
if (target === undefined) target = null;
|
1345
|
+
|
1346
|
+
var ret = [];
|
1347
|
+
for(var i=0, l=this.length; i<l; i++) {
|
1348
|
+
var next = this[i] ;
|
1349
|
+
if(callback.call(target, next, i, this)) ret.push(next) ;
|
1350
|
+
}
|
1351
|
+
return ret ;
|
1352
|
+
},
|
1353
|
+
|
1354
|
+
every: function(callback, target) {
|
1355
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1356
|
+
var len = this.length ;
|
1357
|
+
if (target === undefined) target = null;
|
1358
|
+
|
1359
|
+
var ret = YES;
|
1360
|
+
for(var idx=0;ret && (idx<len);idx++) {
|
1361
|
+
var next = this[idx] ;
|
1362
|
+
if(!callback.call(target, next, idx, this)) ret = NO ;
|
1363
|
+
}
|
1364
|
+
return ret ;
|
1365
|
+
},
|
1366
|
+
|
1367
|
+
some: function(callback, target) {
|
1368
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1369
|
+
var len = this.length ;
|
1370
|
+
if (target === undefined) target = null;
|
1371
|
+
|
1372
|
+
var ret = NO;
|
1373
|
+
for(var idx=0;(!ret) && (idx<len);idx++) {
|
1374
|
+
var next = this[idx] ;
|
1375
|
+
if(callback.call(target, next, idx, this)) ret = YES ;
|
1376
|
+
}
|
1377
|
+
return ret ;
|
1378
|
+
},
|
1379
|
+
|
1380
|
+
reduce: function(callback, initialValue, reducerProperty) {
|
1381
|
+
if (typeof callback !== "function") throw new TypeError() ;
|
1382
|
+
var len = this.length ;
|
1383
|
+
|
1384
|
+
// no value to return if no initial value & empty
|
1385
|
+
if (len===0 && initialValue === undefined) throw new TypeError();
|
1386
|
+
|
1387
|
+
var ret = initialValue;
|
1388
|
+
for(var idx=0;idx<len;idx++) {
|
1389
|
+
var next = this[idx] ;
|
1390
|
+
|
1391
|
+
// while ret is still undefined, just set the first value we get as
|
1392
|
+
// ret. this is not the ideal behavior actually but it matches the
|
1393
|
+
// FireFox implementation... :(
|
1394
|
+
if (next !== null) {
|
1395
|
+
if (ret === undefined) {
|
1396
|
+
ret = next ;
|
1397
|
+
} else {
|
1398
|
+
ret = callback.call(null, ret, next, idx, this, reducerProperty);
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
}
|
1402
|
+
|
1403
|
+
// uh oh...we never found a value!
|
1404
|
+
if (ret === undefined) throw new TypeError() ;
|
1405
|
+
return ret ;
|
1406
|
+
}
|
1407
|
+
};
|
1408
|
+
|
1409
|
+
// Apply methods if missing...
|
1410
|
+
for(var key in mixinIfMissing) {
|
1411
|
+
if (!mixinIfMissing.hasOwnProperty(key)) continue ;
|
1412
|
+
|
1413
|
+
// The mixinIfMissing methods should be applied if they are not defined.
|
1414
|
+
// If Prototype 1.6 is included, some of these methods will be defined
|
1415
|
+
// already, but we want to override them anyway in this special case
|
1416
|
+
// because our version is faster and functionally identitical.
|
1417
|
+
if (!Array.prototype[key] || ((typeof Prototype === 'object') && Prototype.Version.match(/^1\.6/))) {
|
1418
|
+
Array.prototype[key] = mixinIfMissing[key] ;
|
1419
|
+
}
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
// Apply other methods...
|
1423
|
+
SC.mixin(Array.prototype, alwaysMixin) ;
|
1424
|
+
|
1425
|
+
})() ;
|
1426
|
+
|