sproutcore 1.5.0 → 1.6.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.mailmap +32 -0
- data/CHANGELOG +8 -1
- data/Rakefile +16 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +0 -5
- data/bin/sc-build-number +0 -5
- data/bin/sc-docs +0 -5
- data/bin/sc-gen +0 -5
- data/bin/sc-init +0 -5
- data/bin/sc-manifest +0 -5
- data/bin/sc-server +0 -5
- data/bin/sproutcore +0 -5
- data/lib/frameworks/sproutcore/Buildfile +3 -3
- data/lib/frameworks/sproutcore/CHANGELOG.md +13 -0
- data/lib/frameworks/sproutcore/README.md +77 -7
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +1 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +23 -21
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/delegate_support.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +1 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +29 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +20 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +49 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +19 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +38 -41
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +7 -82
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +12 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/array_observers.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/debug/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +33 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +24 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +51 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +29 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +35 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +61 -50
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +9 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +6 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +2 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/coders/object.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/designs.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_files.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style_sheet.js +7 -9
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/object_designer.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/view_designer.js +37 -37
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/object.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/page.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/view.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/snap_lines.js +7 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/designer_drop_target.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/drawing.js +49 -42
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/high_light.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/page_item_view.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/english.lproj/default_styles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/english.lproj/strings.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/mixins/edit_mode.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/mixins/emptiness.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/render_delegates/form.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/render_delegates/form_row.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_checkbox_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_label.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_radio_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_row.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/tests/views/form_text_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/views/form.js +13 -14
- data/lib/frameworks/sproutcore/frameworks/{forms → experimental/frameworks/forms}/views/form_row.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/system/image_queue.js +8 -12
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +28 -34
- data/lib/frameworks/sproutcore/frameworks/{foundation → routing}/system/routes.js +31 -47
- data/lib/frameworks/sproutcore/frameworks/{foundation → routing}/tests/system/routes.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +15 -21
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js +23 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/contains.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/intersects.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +66 -133
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +68 -139
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/testing/system/suite.js +23 -29
- data/lib/frameworks/sproutcore/lib/index.rhtml +5 -2
- data/lib/sproutcore/builders/minify.rb +5 -5
- data/lib/sproutcore/helpers/minifier.rb +6 -10
- data/lib/sproutcore/models/target.rb +2 -2
- data/lib/sproutcore/rack/proxy.rb +8 -7
- data/lib/sproutcore/tools.rb +16 -5
- data/lib/sproutcore.rb +2 -9
- data/spec/lib/builders/html_spec.rb +5 -5
- data/sproutcore.gemspec +11 -5
- data/vendor/chance/lib/chance.rb +4 -2
- data/{lib/sproutcore/vendor → vendor}/jsdoc/README.txt +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Chain.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Dumper.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Hash.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Link.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Namespace.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Opt.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Reflection.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/String.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame/Testrun.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/frame.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/handlers/FOODOC.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/handlers/XMLDOC/DomReader.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/handlers/XMLDOC/XMLDoc.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/handlers/XMLDOC/XMLParse.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/handlers/XMLDOC.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/DocComment.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/DocTag.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/JsDoc.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/JsPlate.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Lang.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Parser.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/PluginManager.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Symbol.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/SymbolSet.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/TextStream.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Token.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/TokenReader.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/TokenStream.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Util.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC/Walker.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/lib/JSDOC.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/main.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/commentSrcJson.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/frameworkPrototype.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/functionCall.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/publishSrcHilite.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/sproutcoreTags.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/symbolLink.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/tagParamConfig.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/plugins/tagSynonyms.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/run.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/t/TestDoc.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/t/runner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/addon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/anon_inner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/augments.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/augments2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/borrows.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/borrows2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/config.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/constructs.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/encoding.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/encoding_other.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/functions_anon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/functions_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/global.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/globals.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/ignore.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/inner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/jsdoc_test.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/lend.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/memberof.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/memberof_constructor.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/name.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/namespace_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/nocode.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/oblit_anon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/overview.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/param_inline.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/params_optional.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/prototype.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/prototype_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/prototype_oblit.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/prototype_oblit_constructor.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/public.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/shared.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/shared2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/shortcuts.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/static_this.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/synonyms.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/tosource.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test/variable_redefine.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/app/test.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/changes.txt +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/conf/sample.conf +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/java/build.xml +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/java/build_1.4.xml +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/java/classes/js.jar +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/java/src/JsDebugRun.java +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/java/src/JsRun.java +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/jsdebug.jar +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/jsrun.jar +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/t/TestDoc.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/t/runner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/addon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/anon_inner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/augments.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/augments2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/borrows.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/borrows2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/config.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/constructs.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/encoding.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/encoding_other.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/functions_anon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/functions_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/global.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/globals.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/ignore.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/inner.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/jsdoc_test.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/lend.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/memberof.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/memberof_constructor.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/name.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/namespace_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/nocode.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/oblit_anon.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/overview.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/param_inline.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/params_optional.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/prototype.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/prototype_nested.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/prototype_oblit.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/prototype_oblit_constructor.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/public.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/shared.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/shared2.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/shortcuts.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/static_this.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/synonyms.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/tosource.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test/variable_redefine.js +0 -0
- data/{lib/sproutcore/vendor → vendor}/jsdoc/test.js +0 -0
- data/vendor/sproutcore/{src/SCCompiler/lib/yuicompressor-2.4.4.jar → lib/yuicompressor-2.4.6.jar} +0 -0
- metadata +176 -202
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +0 -148
- data/lib/sproutcore/vendor/github_gem_lint.rb +0 -22
- data/vendor/sproutcore/SCCompiler.jar +0 -0
- data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/lib/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/build.xml +0 -74
- data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/manifest.mf +0 -3
- data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +0 -894
- data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +0 -8
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +0 -10
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +0 -4
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +0 -90
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +0 -15
- data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +0 -348
data/.mailmap
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
Peter Bergström <pbergstr@mac.com> Peter Bergstrom <pbergstr@Peters-Pewter-2.local>
|
2
|
+
Peter Bergström <pbergstr@mac.com> Peter Bergstrom <pbergstr@galactica.apple.com>
|
3
|
+
Peter Bergström <pbergstr@mac.com> Peter Bergstrom <peter@blackbird.local>
|
4
|
+
|
5
|
+
Tom Dale <tom@sproutcore.com> <tdale@apple.com>
|
6
|
+
Tom Dale <tom@sproutcore.com> <tomdale@67-218-102-24.cust.layer42.net>
|
7
|
+
Tom Dale <tom@sproutcore.com> <tomdale@67-218-106-215.cust.layer42.net>
|
8
|
+
Tom Dale <tom@sproutcore.com> <tomdale@67-218-106-59.cust.layer42.net>
|
9
|
+
Tom Dale <tom@sproutcore.com> <tomdale@Tom-Dales-MacBook-Pro.local>
|
10
|
+
Tom Dale <tom@sproutcore.com> <tomdale@Tom-Dales-iMac.local>
|
11
|
+
Tom Dale <tom@sproutcore.com> <tomdale@da0602a-dhcp123.apple.com>
|
12
|
+
|
13
|
+
Tanner Donovan <ttdonovan@gmail.com> <tdonovan@collectivedata.com>
|
14
|
+
Tanner Donovan <ttdonovan@gmail.com>
|
15
|
+
|
16
|
+
Charles Jolley <charles@sproutcore.com> <charles@Acme-Labs.local>
|
17
|
+
Charles Jolley <charles@sproutcore.com> <charles@sproutit.com>
|
18
|
+
|
19
|
+
William Kakes <wkakes@apple.com> <bkakes@funke.apple.com>
|
20
|
+
|
21
|
+
Yehuda Katz <wycats@gmail.com> wycats <wycats@gmail.com>
|
22
|
+
|
23
|
+
Jason Ketterman <ketterman@apple.com> <jason.ketterman@me.com>
|
24
|
+
|
25
|
+
Juan Pinzon <juanpin@me.com> <juanpin@Juan-Pinzons-MacBook-Pro.local>
|
26
|
+
Juan Pinzon <juanpin@me.com> juanpin <juanpin@mac.com>
|
27
|
+
|
28
|
+
Majd Taby <taby@apple.com> taby <taby@apple.com>
|
29
|
+
|
30
|
+
Onar Vikingstad <vikingstad@apple.com> <onar@Onars-Apple-MacBook.local>
|
31
|
+
Onar Vikingstad <vikingstad@apple.com> <onar@onarvikingstad.apple.com>
|
32
|
+
Onar Vikingstad <vikingstad@apple.com> <onar@vg0602g-dhcp168.apple.com>
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
*SproutCore 1.6.0.beta.1 (May 8, 2011)*
|
2
|
+
|
3
|
+
* Better dependencies for Windows
|
4
|
+
* Proxy improvements when sending DELETE requests
|
5
|
+
* Fixed processing of GIFs and JPEGs
|
6
|
+
* Uses newer version of Thin
|
7
|
+
* Uses newer version of YUI Compressor
|
8
|
+
|
1
9
|
*SproutCore 1.5.0 (April 19, 2011)*
|
2
10
|
|
3
11
|
* Fixed description for init, docs and gen tasks
|
@@ -10,7 +18,6 @@
|
|
10
18
|
|
11
19
|
* Fixed a compatibility issue with Windows environments
|
12
20
|
|
13
|
-
|
14
21
|
*SproutCore 1.5.0.rc.1 (April 1, 2011)*
|
15
22
|
|
16
23
|
* Made it possible to share index.html across multiple languages vs. duplicating it for each.
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require File.expand_path("../lib/sproutcore/version", __FILE__)
|
2
|
+
|
1
3
|
desc "Information for setup"
|
2
4
|
task :default do
|
3
5
|
|
@@ -42,3 +44,17 @@ begin
|
|
42
44
|
rescue LoadError
|
43
45
|
puts "RSpec is not installed. Please install if you want to run tests."
|
44
46
|
end
|
47
|
+
|
48
|
+
begin
|
49
|
+
require 'packager/rake_task'
|
50
|
+
|
51
|
+
Packager::RakeTask.new(:pkg) do |t|
|
52
|
+
t.version = SproutCore::VERSION
|
53
|
+
t.domain = "sproutcore.com"
|
54
|
+
t.package_name = "SproutCore"
|
55
|
+
t.bin_files = Dir['bin/*'].map{|p| File.basename(p) }
|
56
|
+
t.resource_files = ["vendor", "VERSION.yml"]
|
57
|
+
end
|
58
|
+
rescue LoadError
|
59
|
+
puts "`gem install packager` for packaging tasks"
|
60
|
+
end
|
data/VERSION.yml
CHANGED
data/bin/sc-build
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-build from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke 'build'
|
data/bin/sc-build-number
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-build-number from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke :build_number
|
data/bin/sc-docs
CHANGED
@@ -7,11 +7,6 @@
|
|
7
7
|
# and contributors
|
8
8
|
# ===========================================================================
|
9
9
|
|
10
|
-
if caller.empty?
|
11
|
-
puts "FATAL: You need to invoke sc-docs from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
12
|
-
exit
|
13
|
-
end
|
14
|
-
|
15
10
|
require "sproutcore"
|
16
11
|
|
17
12
|
SC::Tools.invoke :docs
|
data/bin/sc-gen
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-gen from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke 'gen'
|
data/bin/sc-init
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-init from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke 'init'
|
data/bin/sc-manifest
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-manifest from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke :manifest
|
data/bin/sc-server
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sc-server from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.invoke 'server'
|
data/bin/sproutcore
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# and contributors
|
7
7
|
# ===========================================================================
|
8
8
|
|
9
|
-
if caller.empty?
|
10
|
-
puts "FATAL: You need to invoke sproutcore from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
|
14
9
|
require "sproutcore"
|
15
10
|
|
16
11
|
SC::Tools.start
|
@@ -34,7 +34,8 @@ config :'datetime/core', :required => [:runtime]
|
|
34
34
|
config :datetime, :required => [:'datetime/core']
|
35
35
|
config :core_foundation, :required => [:runtime, :handlebars]
|
36
36
|
config :'datetime/localized', :required => [:core_foundation]
|
37
|
-
config :
|
37
|
+
config :routing, :required => [:core_foundation]
|
38
|
+
config :foundation, :required => [:routing, :core_foundation, :datetime, :'datetime/localized', :ajax]
|
38
39
|
config :datastore, :required => [:runtime, :datetime]
|
39
40
|
config :desktop, :required => [:foundation]
|
40
41
|
config :media, :required => [:desktop]
|
@@ -45,7 +46,6 @@ config :ajax, :required => [:runtime, :core_foundation]
|
|
45
46
|
config :sproutcore, :required => [:desktop, :datastore]
|
46
47
|
config :mini, :required => [:runtime, :datastore]
|
47
48
|
config :animation, :required => :foundation
|
48
|
-
config :forms, :required => :desktop
|
49
49
|
|
50
50
|
config :qunit, :required => []
|
51
51
|
config :testing, :required => [:jquery], :test_required => [], :debug_required => []
|
@@ -84,7 +84,7 @@ config :ace,
|
|
84
84
|
|
85
85
|
# CONFIGURE APPS
|
86
86
|
config :core_tools, :required => [
|
87
|
-
:desktop, :datastore, :animation,
|
87
|
+
:desktop, :datastore, :animation, "sproutcore/experimental/forms",
|
88
88
|
"sproutcore/ace", "sproutcore/experimental/split_view"
|
89
89
|
]
|
90
90
|
|
@@ -1,4 +1,17 @@
|
|
1
1
|
|
2
|
+
CHANGE LOG FOR 1.6
|
3
|
+
==================
|
4
|
+
|
5
|
+
1.6.0.beta.1
|
6
|
+
------------
|
7
|
+
* Bugfixes to synchronization between SproutCore RecordArray/ManyArray/ChildArray and TemplateCollectionView
|
8
|
+
* Moved forms to experimental framework
|
9
|
+
* Moved routing into its own framework
|
10
|
+
* Improved ability to use table elements in Handlebars templates
|
11
|
+
* CSS and cross-browser fixes for built-in controls
|
12
|
+
* Significantly cleaned up in-line documentation
|
13
|
+
|
14
|
+
|
2
15
|
CHANGE LOG FOR 1.5
|
3
16
|
==================
|
4
17
|
|
@@ -14,7 +14,7 @@ information.
|
|
14
14
|
http://www.sproutcore.com/
|
15
15
|
|
16
16
|
If you would like to contact the authors, you can reach the current maintainer
|
17
|
-
at <charles@
|
17
|
+
at <charles@sproutcore.com>
|
18
18
|
|
19
19
|
## Contributors
|
20
20
|
|
@@ -23,40 +23,110 @@ developers. Special thanks to the following developers who contributed lots of
|
|
23
23
|
code and ideas:
|
24
24
|
|
25
25
|
- Alex Iskander
|
26
|
-
-
|
26
|
+
- Alex Johnson
|
27
|
+
- Andreas Cederström
|
28
|
+
- Andrew Dupont
|
29
|
+
- Asko Soukka
|
30
|
+
- Benedikt Böhm
|
31
|
+
- Brandon Blatnick
|
32
|
+
- Brandon Dimcheff
|
27
33
|
- Brian Cully
|
34
|
+
- Brian Mitchell
|
35
|
+
- Brian Moore
|
36
|
+
- Bruz Marzolf
|
28
37
|
- Charles Jolley
|
38
|
+
- Charlie Lai
|
29
39
|
- Chris Hyle
|
40
|
+
- Christopher M Pieper
|
41
|
+
- Christopher Swasey
|
30
42
|
- Colin Campbell
|
31
43
|
- Cortland Klein
|
32
44
|
- Devin Torres
|
45
|
+
- Devon Govett
|
46
|
+
- Emrys Ingersoll
|
47
|
+
- Eric Kidd
|
33
48
|
- Erich Ocean
|
34
49
|
- Evin Grano
|
50
|
+
- Ganesh J
|
51
|
+
- Gareth Townsend
|
35
52
|
- Geoffrey Donaldson
|
53
|
+
- Gregory Moeck
|
54
|
+
- Hemanth Kumar
|
36
55
|
- James A. Rosen
|
37
56
|
- James Austin
|
57
|
+
- James F. Herdman
|
58
|
+
- James Ribar
|
38
59
|
- Jason Ketterman
|
60
|
+
- Jim Benton
|
61
|
+
- Jiří Zajpt
|
62
|
+
- Joe Gaudet
|
39
63
|
- Jonathan Lewis
|
40
64
|
- Joshua Dickens
|
65
|
+
- Joshua Holt
|
66
|
+
- Joubert Nel
|
41
67
|
- Juan Pinzon
|
68
|
+
- Julian Viereck
|
69
|
+
- Konstantin Bender
|
70
|
+
- Lauri Fjallstrom
|
71
|
+
- Lawrence Pit
|
72
|
+
- Levi McCallum
|
73
|
+
- Luke Burton
|
42
74
|
- Majd Taby
|
75
|
+
- Martin Häcker
|
76
|
+
- Martin Ottenwaelter
|
77
|
+
- Matt Smith
|
78
|
+
- Matthew Grantham
|
43
79
|
- Matthias Loitsch
|
44
|
-
- Martin Ottenwaelter
|
45
80
|
- Maurits Lamers
|
81
|
+
- Michael Cohen
|
82
|
+
- Michael Harris
|
83
|
+
- Michael Rykov
|
84
|
+
- Michal Kurgan
|
46
85
|
- Mike Ball
|
47
86
|
- Mike Subelsky
|
87
|
+
- Mitch Oliver
|
88
|
+
- Mitchell Rivera
|
48
89
|
- Mohammed Ashik
|
90
|
+
- Mohammed Taher
|
91
|
+
- Nathan Baxter
|
92
|
+
- Nicolas Badia
|
93
|
+
- Nirumal Thomas
|
94
|
+
- Nitin Gupta
|
49
95
|
- Onar Vikingstad
|
50
|
-
-
|
96
|
+
- Patrick Walton
|
97
|
+
- Paul Lambert
|
98
|
+
- Peter Bergström
|
51
99
|
- Peter Wagenet
|
52
|
-
-
|
53
|
-
-
|
100
|
+
- Piotr Steininger
|
101
|
+
- Ray Bodenhorn
|
102
|
+
- Rich Harrison
|
103
|
+
- Richard Klancer
|
104
|
+
- Rick Russell
|
105
|
+
- Rob Linton
|
106
|
+
- Robert Buchholz
|
107
|
+
- Ryan Mudryk
|
108
|
+
- Ryan Nielsen
|
109
|
+
- Santhakumar Murugaiyan
|
110
|
+
- Sean Eidemiller
|
111
|
+
- Sergey Ukustov
|
112
|
+
- Steven Tate
|
54
113
|
- Sudarshan Bhat
|
114
|
+
- Suvajit Gupta
|
55
115
|
- Tanner Donovan
|
56
116
|
- Teresa Tsui
|
57
|
-
- Thomas
|
117
|
+
- Thomas Balthazar
|
118
|
+
- Thomas Bartelmess
|
119
|
+
- Thomas Bradford
|
120
|
+
- Thomas Lang
|
121
|
+
- Tim Evans
|
58
122
|
- Tom Dale
|
123
|
+
- Tomasz Mazur
|
59
124
|
- Trek Glowacki
|
125
|
+
- Tyler Keating
|
126
|
+
- Vincent Fiano
|
127
|
+
- William Kakes
|
128
|
+
- Yehuda Katz
|
129
|
+
- Yogesh Kumar
|
60
130
|
|
61
131
|
## Acknowledgements
|
62
132
|
|
@@ -63,8 +63,6 @@ isAsynchronous: YES,
|
|
63
63
|
init: function() {
|
64
64
|
sc_super();
|
65
65
|
this.header('X-Requested-With', 'XMLHttpRequest');
|
66
|
-
//TODO: we need to have the SC version in a SC variable.
|
67
|
-
//For now I'm harcoding the variable.
|
68
66
|
this.header('X-SproutCore-Version', SC.VERSION);
|
69
67
|
},
|
70
68
|
|
@@ -188,8 +188,9 @@ SC.Animatable = {
|
|
188
188
|
Adds support for some style properties to adjust.
|
189
189
|
|
190
190
|
These added properties are currently:
|
191
|
-
|
192
|
-
|
191
|
+
|
192
|
+
- opacity.
|
193
|
+
- display.
|
193
194
|
|
194
195
|
This is a complete rewrite of adjust. Its performance can probably be boosted. Do it!
|
195
196
|
*/
|
@@ -206,7 +206,7 @@ SC._detectBrowser = function(userAgent, language) {
|
|
206
206
|
@type String
|
207
207
|
@default 'unknown'
|
208
208
|
*/
|
209
|
-
browser.current = browser.msie ? 'msie' : browser.mozilla ? 'mozilla' : browser.chrome ? 'chrome' : browser.safari ? 'safari' : browser.opera ? 'opera' : browser.mobileSafari ? 'mobile-safari' : 'unknown';
|
209
|
+
browser.current = browser.msie ? 'msie' : browser.mozilla ? 'mozilla' : browser.chrome ? 'chrome' : browser.safari ? 'safari' : browser.opera ? 'opera' : browser.mobileSafari ? 'mobile-safari' : browser.android ? 'android' : 'unknown';
|
210
210
|
return browser;
|
211
211
|
};
|
212
212
|
|
@@ -410,6 +410,7 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
|
|
410
410
|
_scac_arrayContentDidChange: function(start, removed, added) {
|
411
411
|
this.arrayContentDidChange(start, removed, added);
|
412
412
|
var addedObjects = this.slice(start, start+added);
|
413
|
+
this._scac_cached = NO;
|
413
414
|
this.setupEnumerablePropertyChains(addedObjects);
|
414
415
|
this.updateSelectionAfterContentChange();
|
415
416
|
},
|
@@ -490,23 +491,6 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
|
|
490
491
|
this.updateSelectionAfterContentChange();
|
491
492
|
}.observes('content'),
|
492
493
|
|
493
|
-
/**
|
494
|
-
@private
|
495
|
-
|
496
|
-
Forward enumerable content observer notifications to enumerable observers
|
497
|
-
on the array controller.
|
498
|
-
|
499
|
-
Since our content may be bound to another object, and that binding will not
|
500
|
-
update until the end of the run loop, we buffer up all enumerable changes
|
501
|
-
and play them back at the end of the run loop, once bindings have fired.
|
502
|
-
|
503
|
-
@param {Array} addedObjects the array of objects that were added
|
504
|
-
@param {Array} removedObject the array of objects that were removed
|
505
|
-
@param {Number} start the index at which the positions occurred
|
506
|
-
*/
|
507
|
-
_scac_enumerableContentDidChange: function(addedObjects, removedObjects, start) {
|
508
|
-
},
|
509
|
-
|
510
494
|
/** @private
|
511
495
|
Whenever enumerable content changes, need to regenerate the
|
512
496
|
observableContent and notify that the range has changed.
|
@@ -15,7 +15,7 @@
|
|
15
15
|
In general you will not use this class, but you can use a subclass such
|
16
16
|
as ObjectController, TreeController, or ArrayController.
|
17
17
|
|
18
|
-
|
18
|
+
## EDITING CONTEXTS
|
19
19
|
|
20
20
|
One major function of a controller is to mediate between changes in the
|
21
21
|
UI and changes in the model. In particular, you usually do not want
|
@@ -18,15 +18,15 @@ sc_require('controllers/controller') ;
|
|
18
18
|
object controller one time for all of your views and then swap out the
|
19
19
|
content as needed.
|
20
20
|
|
21
|
-
|
21
|
+
## Working with Arrays
|
22
22
|
|
23
23
|
An ObjectController can accept both arrays and single objects as content.
|
24
24
|
If the content is an array, the ObjectController will do its best to treat
|
25
25
|
the array as a single object. For example, if you set the content of an
|
26
26
|
ObjectController to an array of Contact records and then call:
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
contactController.get('name');
|
29
|
+
|
30
30
|
The controller will check the name property of each Contact in the array.
|
31
31
|
If the value of the property for each Contact is the same, that value will
|
32
32
|
be returned. If the any values are different, then an array will be
|
@@ -41,7 +41,7 @@ sc_require('controllers/controller') ;
|
|
41
41
|
setup your bindings so that they will convert the content to a single object
|
42
42
|
like so:
|
43
43
|
|
44
|
-
|
44
|
+
contentBinding: SC.Binding.single('MyApp.listController.selection') ;
|
45
45
|
|
46
46
|
This will ensure that your content property is always a single object
|
47
47
|
instead of an array.
|
@@ -1,9 +1,12 @@
|
|
1
|
+
/*globals Handlebars */
|
2
|
+
|
1
3
|
sc_require('ext/handlebars');
|
2
4
|
|
3
5
|
Handlebars.registerHelper('collection', function(path, options) {
|
4
6
|
var fn = options.fn;
|
5
7
|
var data = options.data;
|
6
8
|
var inverse = options.inverse;
|
9
|
+
var hash = options.hash;
|
7
10
|
var collectionClass, collectionObject;
|
8
11
|
|
9
12
|
collectionClass = path ? SC.objectForPropertyPath(path) : SC.TemplateCollectionView;
|
@@ -13,34 +16,33 @@ Handlebars.registerHelper('collection', function(path, options) {
|
|
13
16
|
}
|
14
17
|
//@ endif
|
15
18
|
|
16
|
-
var
|
19
|
+
var extensions = {};
|
20
|
+
|
21
|
+
if (hash) {
|
22
|
+
var itemHash = {}, match;
|
17
23
|
|
18
|
-
|
19
|
-
|
20
|
-
|
24
|
+
for (var prop in hash) {
|
25
|
+
if (hash.hasOwnProperty(prop)) {
|
26
|
+
match = prop.match(/^item(.)(.*)$/);
|
21
27
|
|
22
|
-
|
23
|
-
|
24
|
-
|
28
|
+
if(match) {
|
29
|
+
itemHash[match[1].toLowerCase() + match[2]] = hash[prop];
|
30
|
+
delete hash[prop];
|
31
|
+
}
|
25
32
|
}
|
26
33
|
}
|
27
|
-
}
|
28
34
|
|
29
|
-
|
30
|
-
|
35
|
+
extensions = SC.clone(hash);
|
36
|
+
extensions.itemViewOptions = itemHash;
|
37
|
+
}
|
31
38
|
|
32
|
-
|
33
|
-
|
34
|
-
inverseTemplate: inverse,
|
35
|
-
itemViewOptions: itemHash
|
36
|
-
});
|
39
|
+
if (fn) { extensions.itemViewTemplate = fn; }
|
40
|
+
if (inverse) { extensions.inverseTemplate = inverse; }
|
37
41
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
collectionObject = collectionClass;
|
43
|
-
}
|
42
|
+
if(collectionClass.isClass) {
|
43
|
+
collectionObject = collectionClass.extend(extensions);
|
44
|
+
} else {
|
45
|
+
collectionObject = SC.mixin(collectionClass, extensions);
|
44
46
|
}
|
45
47
|
|
46
48
|
options.fn = function() { return ""; };
|
@@ -18,7 +18,7 @@
|
|
18
18
|
The methods provided by this mixin make it easier to implement this pattern
|
19
19
|
but they are not required to support delegates.
|
20
20
|
|
21
|
-
|
21
|
+
## The Pattern
|
22
22
|
|
23
23
|
The delegate design pattern typically means that you provide a property,
|
24
24
|
usually ending in "delegate", that can be set to another object in the
|
@@ -24,7 +24,7 @@ SC.MIXED_STATE = '__MIXED__' ;
|
|
24
24
|
Usually you will not work directly with the SC.Pane class, but with one of
|
25
25
|
its subclasses such as SC.MainPane, SC.Panel, or SC.PopupPane.
|
26
26
|
|
27
|
-
|
27
|
+
## Showing a Pane
|
28
28
|
|
29
29
|
To make a pane visible, you need to add it to your HTML document. The
|
30
30
|
simplest way to do this is to call the append() method:
|
@@ -47,7 +47,7 @@ SC.MIXED_STATE = '__MIXED__' ;
|
|
47
47
|
resize with the window if needed, relaying resize notifications to children
|
48
48
|
as well.
|
49
49
|
|
50
|
-
|
50
|
+
## Hiding a Pane
|
51
51
|
|
52
52
|
When you are finished with a pane, you can hide the pane by calling the
|
53
53
|
remove() method. This method will actually remove the Pane from the
|
@@ -61,7 +61,7 @@ SC.MIXED_STATE = '__MIXED__' ;
|
|
61
61
|
You can readd a pane to the document again any time in the future by using
|
62
62
|
any of the insertion methods defined in the previous section.
|
63
63
|
|
64
|
-
|
64
|
+
## Receiving Events
|
65
65
|
|
66
66
|
Your pane and its child views will automatically receive any mouse or touch
|
67
67
|
events as long as it is on the screen. To receive keyboard events, however,
|
@@ -19,11 +19,11 @@ SC.NO_ORIENTATION = 'desktop'; // value 'desktop' for backwards compatibility
|
|
19
19
|
orientation and if the device is offline, as well as observe when they change
|
20
20
|
state.
|
21
21
|
|
22
|
-
|
22
|
+
## Orientation
|
23
23
|
When a touch device changes orientation, the orientation property will be
|
24
24
|
set accordingly which you can observe
|
25
25
|
|
26
|
-
|
26
|
+
## Offline support
|
27
27
|
In order to build a good offline-capable web application, you need to know
|
28
28
|
when your app has gone offline so you can for instance queue your server
|
29
29
|
requests for a later time or provide a specific UI/message.
|
@@ -195,10 +195,10 @@ SC.mixin(SC.Event, /** @scope SC.Event */ {
|
|
195
195
|
relevant event occurs on the named element. This method supports a
|
196
196
|
variety of handler types, depending on the kind of support you need.
|
197
197
|
|
198
|
-
|
198
|
+
## Simple Function Handlers
|
199
|
+
|
200
|
+
SC.Event.add(anElement, "click", myClickHandler) ;
|
199
201
|
|
200
|
-
SC.Event.add(anElement, "click", myClickHandler) ;
|
201
|
-
|
202
202
|
The most basic type of handler you can pass is a function. This function
|
203
203
|
will be executed everytime an event of the type you specify occurs on the
|
204
204
|
named element. You can optionally pass an additional context object which
|
@@ -209,24 +209,24 @@ SC.mixin(SC.Event, /** @scope SC.Event */ {
|
|
209
209
|
|
210
210
|
The click handler for this method must have a method signature like:
|
211
211
|
|
212
|
-
|
213
|
-
|
214
|
-
h2. Method Invocations
|
212
|
+
function(event) { return YES|NO; }
|
215
213
|
|
216
|
-
|
217
|
-
|
214
|
+
## Method Invocations
|
215
|
+
|
216
|
+
SC.Event.add(anElement, "click", myObject, myObject.aMethod) ;
|
217
|
+
|
218
218
|
Optionally you can specify a target object and a method on the object to
|
219
219
|
be invoked when the event occurs. This will invoke the method function
|
220
220
|
with the target object you pass as "this". The method should have a
|
221
221
|
signature like:
|
222
222
|
|
223
|
-
|
224
|
-
|
223
|
+
function(event, targetElement) { return YES|NO; }
|
224
|
+
|
225
225
|
Like function handlers, you can pass an additional context data paramater
|
226
226
|
that will be included on the event in the event.data property.
|
227
|
-
|
228
|
-
h2. Handler Return Values
|
229
227
|
|
228
|
+
## Handler Return Values
|
229
|
+
|
230
230
|
Both handler functions should return YES if you want the event to
|
231
231
|
continue to propagate and NO if you want it to stop. Returning NO will
|
232
232
|
both stop bubbling of the event and will prevent any default action
|
@@ -234,7 +234,7 @@ SC.mixin(SC.Event, /** @scope SC.Event */ {
|
|
234
234
|
by calling the stopPropagation() or preventDefault() methods on the event
|
235
235
|
itself, returning YES from your method.
|
236
236
|
|
237
|
-
|
237
|
+
## Limitations
|
238
238
|
|
239
239
|
Although SproutCore's event implementation is based on jQuery, it is
|
240
240
|
much simpler in design. Notably, it does not support namespaced events
|
@@ -315,7 +315,7 @@ SC.mixin(SC.Event, /** @scope SC.Event */ {
|
|
315
315
|
and element, then all handlers for all events on that element will be
|
316
316
|
removed.
|
317
317
|
|
318
|
-
|
318
|
+
## Limitations
|
319
319
|
|
320
320
|
Although SproutCore's event implementation is based on jQuery, it is
|
321
321
|
much simpler in design. Notably, it does not support namespaced events
|
@@ -523,8 +523,8 @@ SC.mixin(SC.Event, /** @scope SC.Event */ {
|
|
523
523
|
be the element the event occurred on, so you should always call this
|
524
524
|
method like:
|
525
525
|
|
526
|
-
|
527
|
-
|
526
|
+
SC.Event.handle.call(element, event) ;
|
527
|
+
|
528
528
|
Note that like other parts of this library, the handle function does not
|
529
529
|
support namespaces.
|
530
530
|
|