sproutcore 1.6.0.beta.3 → 1.6.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +33 -0
- data/Rakefile +213 -10
- data/VERSION.yml +1 -1
- data/lib/Buildfile +5 -1
- data/lib/buildtasks/manifest.rake +7 -1
- data/lib/frameworks/sproutcore/Buildfile +3 -2
- data/lib/frameworks/sproutcore/CHANGELOG.md +154 -1
- data/lib/frameworks/sproutcore/README.md +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +9 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +254 -207
- data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +243 -172
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controls/button.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +36 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +14 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +2 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +20 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +61 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +20 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +42 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controls/button.js +39 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +5 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +32 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +28 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +396 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/{system → views}/bindable_span.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +78 -51
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +233 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +15 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +66 -55
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/data_source.js +190 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +15 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +212 -182
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +14 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +23 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/alert.css +49 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/a_sample_image.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/apple-logo1.jpeg +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/iframe.html +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css +20 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/drag.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/icons.css +214 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/cap.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/downbutton.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-cancel-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-down-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-error-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-left-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-redo-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-right-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-tools-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-undo-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-up-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-bottom.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-center.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-top.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/track.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/upbutton.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +145 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu.css +10 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +88 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/modal.css +3 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +91 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/picker.css +37 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/progress.css +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/radio.css +11 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +121 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/separator.css +20 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split_divider.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/tab.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/toolbar.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/touch-scroller.css +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/well.css +65 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +114 -103
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +7 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +4 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +9 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/{panes → views}/select_button.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +35 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +15 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +55 -13
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/benchmark.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/blank.gif +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/bootstrap.rhtml +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/button_view.css +36 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/checkbox_view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/debug/control-test-pane.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/inline_editor.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +47 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/radio_view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/static_layout.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +130 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +0 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +6 -3
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +4 -73
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/ext/function.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/async.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/empty_state.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +7 -189
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +14 -78
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/debug/sequence_matcher.js +464 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +31 -11
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +6 -4
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +40 -6
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +22 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +44 -3
- data/lib/frameworks/sproutcore/frameworks/testing/core.js +61 -9
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/additions.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/runner.css +11 -2
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/testsuite.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +66 -27
- data/lib/frameworks/sproutcore/frameworks/testing/tests/spy_on.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/testing/tests/stub_method.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/core.css +24 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/fonts.css +39 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/reset.css +126 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/view.css +57 -0
- data/lib/frameworks/sproutcore/lib/index.rhtml +7 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +13 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +16 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/gen/app/templates/apps/@target_name@/Buildfile +1 -4
- data/lib/gen/app/templates/apps/@target_name@/core.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/main.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/theme.js +1 -4
- data/lib/gen/controller/templates/controllers/{@filename@.js → @filename@_controller.js} +1 -4
- data/lib/gen/controller/templates/tests/controllers/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/data-source/templates/data_sources/{@filename@.js → @filename@_data_source.js} +1 -4
- data/lib/gen/design/templates/resources/@filename@.js +1 -4
- data/lib/gen/framework/templates/frameworks/@target_name@/core.js +1 -4
- data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -4
- data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -4
- data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +2 -0
- data/lib/gen/html_project/templates/@filename@/Buildfile +1 -4
- data/lib/gen/html_project/templates/@filename@/README +1 -4
- data/lib/gen/language/templates/@filename@/strings.js +1 -4
- data/lib/gen/model/templates/fixtures/{@filename@.js → @filename@_fixtures.js} +2 -5
- data/lib/gen/model/templates/models/{@filename@.js → @filename@_model.js} +1 -4
- data/lib/gen/model/templates/tests/models/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/page/templates/pages/@target_name@/Buildfile +1 -4
- data/lib/gen/page/templates/pages/@target_name@/core.js +1 -4
- data/lib/gen/page/templates/pages/@target_name@/en.lproj/strings.js +1 -4
- data/lib/gen/page/templates/pages/@target_name@/resources/body.css +3 -1
- data/lib/gen/project/templates/@filename@/Buildfile +1 -4
- data/lib/gen/project/templates/@filename@/README +1 -5
- data/lib/gen/responder/templates/states/{@filename@.js → @filename@_state.js} +1 -4
- data/lib/gen/test/templates/tests/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/theme/templates/themes/@target_name@/resources/theme_styles.css +1 -5
- data/lib/gen/theme/templates/themes/@target_name@/theme.js +1 -4
- data/lib/gen/view/templates/tests/views/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/view/templates/views/{@filename@.js → @filename@_view.js} +1 -4
- data/lib/sproutcore.rb +4 -1
- data/lib/sproutcore/builders/handlebars.rb +1 -1
- data/lib/sproutcore/builders/module.rb +2 -2
- data/lib/sproutcore/helpers/static_helper.rb +4 -2
- data/lib/sproutcore/models/generator.rb +22 -0
- data/lib/sproutcore/models/manifest_entry.rb +1 -0
- data/lib/sproutcore/models/target.rb +4 -1
- data/lib/sproutcore/rack/builder.rb +3 -0
- data/lib/sproutcore/tools.rb +11 -11
- data/lib/sproutcore/tools/init.rb +10 -22
- data/lib/sproutcore/tools/manifest.rb +21 -22
- data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +21 -1
- data/spec/fixtures/ordered_entries/apps/template_style/a.js +0 -0
- data/spec/fixtures/ordered_entries/apps/template_style/template_style.js +0 -0
- data/spec/lib/buildfile_commands/build_task_spec.rb +1 -1
- data/spec/lib/tools/manifest_spec.rb +11 -0
- data/sproutcore.gemspec +2 -2
- data/vendor/chance/lib/chance/instance.rb +3 -1
- metadata +118 -74
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +0 -378
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +0 -57
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +0 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +0 -73
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +0 -916
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +0 -185
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +0 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +0 -101
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +0 -91
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +0 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +0 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +0 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +0 -132
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +0 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +0 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +0 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/well.css +0 -71
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +0 -40
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +0 -47
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +0 -146
- data/lib/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +0 -69
@@ -1252,9 +1252,9 @@ SC.CoreView.mixin(/** @scope SC.View.prototype */ {
|
|
1252
1252
|
*/
|
1253
1253
|
design: function() {
|
1254
1254
|
if (this.isDesign) {
|
1255
|
-
|
1255
|
+
// @if (debug)
|
1256
1256
|
SC.Logger.warn("SC.View#design called twice for %@.".fmt(this));
|
1257
|
-
|
1257
|
+
// @endif
|
1258
1258
|
return this;
|
1259
1259
|
}
|
1260
1260
|
|
@@ -1472,7 +1472,8 @@ SC.CoreView.unload = function() {
|
|
1472
1472
|
2. They act as first responders for incoming keyboard, mouse, and
|
1473
1473
|
touch events.
|
1474
1474
|
|
1475
|
-
|
1475
|
+
View Initialization
|
1476
|
+
====
|
1476
1477
|
|
1477
1478
|
When a view is setup, there are several methods you can override that
|
1478
1479
|
will be called at different times depending on how your view is created.
|
@@ -1,6 +1,7 @@
|
|
1
1
|
sc_require("views/view");
|
2
2
|
|
3
|
-
SC.View.reopen(
|
3
|
+
SC.View.reopen(
|
4
|
+
/** @scope SC.View.prototype */ {
|
4
5
|
// ..........................................................
|
5
6
|
// KEY RESPONDER
|
6
7
|
//
|
@@ -124,100 +125,265 @@ SC.View.reopen({
|
|
124
125
|
return ret ;
|
125
126
|
},
|
126
127
|
|
128
|
+
/**
|
129
|
+
The first child of this view for the purposes of tab ordering. If not
|
130
|
+
provided, the first element of childViews is used. Override this if
|
131
|
+
your view displays its child views in an order different from that
|
132
|
+
given in childViews.
|
133
|
+
|
134
|
+
@type SC.View
|
135
|
+
@default null
|
136
|
+
*/
|
137
|
+
firstKeyView: null,
|
138
|
+
|
139
|
+
/**
|
140
|
+
@private
|
141
|
+
|
142
|
+
Actually calculates the firstKeyView as described in firstKeyView.
|
143
|
+
|
144
|
+
@returns {SC.View}
|
145
|
+
*/
|
146
|
+
_getFirstKeyView: function() {
|
147
|
+
// if first was given, just return it
|
148
|
+
var firstKeyView = this.get('firstKeyView');
|
149
|
+
if(firstKeyView) return firstKeyView;
|
150
|
+
|
151
|
+
// otherwise return the first childView
|
152
|
+
var childViews = this.get('childViews');
|
153
|
+
if(childViews) return childViews[0];
|
154
|
+
},
|
155
|
+
|
156
|
+
/**
|
157
|
+
The last child of this view for the purposes of tab ordering. If not set, can be generated two different ways:
|
158
|
+
1. If firstKeyView is provided, it will be generated by starting from firstKeyView and traversing the childViews nextKeyView properties.
|
159
|
+
2. If firstKeyView is not provided, it will simply return the last element of childViews.
|
160
|
+
|
161
|
+
The first way is not very efficient, so if you provide firstKeyView you should also provide lastKeyView.
|
162
|
+
|
163
|
+
@type SC.View
|
164
|
+
@default null
|
165
|
+
*/
|
166
|
+
lastKeyView: null,
|
167
|
+
|
168
|
+
/**
|
169
|
+
@private
|
170
|
+
|
171
|
+
Actually calculates the lastKeyView as described in lastKeyView.
|
172
|
+
|
173
|
+
@returns {SC.View}
|
174
|
+
*/
|
175
|
+
_getLastKeyView: function() {
|
176
|
+
// if last was given, just return it
|
177
|
+
var lastKeyView = this.get('lastKeyView');
|
178
|
+
if(lastKeyView) return lastKeyView;
|
179
|
+
|
180
|
+
var view,
|
181
|
+
prev = this.get('firstKeyView');
|
182
|
+
|
183
|
+
// if first was given but not last, build by starting from first and
|
184
|
+
// traversing until we hit the end. this is obviously the least efficient
|
185
|
+
// way
|
186
|
+
if(prev) {
|
187
|
+
while(view = prev._getNextKeyView()) {
|
188
|
+
prev = view;
|
189
|
+
}
|
190
|
+
|
191
|
+
return prev;
|
192
|
+
}
|
193
|
+
|
194
|
+
// if neither was given, it's more efficient to just return the last
|
195
|
+
// childView
|
196
|
+
else {
|
197
|
+
var childViews = this.get('childViews');
|
198
|
+
|
199
|
+
if(childViews) return childViews[childViews.length - 1];
|
200
|
+
}
|
201
|
+
},
|
202
|
+
|
127
203
|
/**
|
128
204
|
Optionally points to the next key view that should gain focus when tabbing
|
129
205
|
through an interface. If this is not set, then the next key view will
|
130
|
-
be set automatically to the next
|
206
|
+
be set automatically to the next sibling as defined by its parent's
|
207
|
+
childViews property.
|
208
|
+
|
209
|
+
If any views define this, all of their siblings should define it as well,
|
210
|
+
otherwise undefined behavior may occur. Their parent view should also define
|
211
|
+
a firstKeyView.
|
212
|
+
|
213
|
+
This may also be set to a view that is not a sibling, but once again all
|
214
|
+
views in the chain must define it or undefined behavior will occur.
|
215
|
+
|
216
|
+
Likewise, any view that sets nextKeyView should also set previousKeyView.
|
217
|
+
|
218
|
+
@type SC.View
|
219
|
+
@default null
|
220
|
+
*/
|
221
|
+
|
222
|
+
nextKeyView: undefined,
|
223
|
+
|
224
|
+
/**
|
225
|
+
@private
|
226
|
+
|
227
|
+
Gets the next key view by checking if the user set it and otherwise just
|
228
|
+
getting the next by index in childViews.
|
229
|
+
|
230
|
+
@return {SC.View}
|
131
231
|
*/
|
132
|
-
|
232
|
+
_getNextKeyView: function() {
|
233
|
+
var pv = this.get('parentView'),
|
234
|
+
nextKeyView = this.get('nextKeyView');
|
235
|
+
|
236
|
+
// if the parent defines lastKeyView, it takes priority over this views
|
237
|
+
// nextKeyView
|
238
|
+
if(pv && pv.get('lastKeyView') === this) return null;
|
239
|
+
|
240
|
+
// if this view defines a nextKeyView, use it
|
241
|
+
if(nextKeyView !== undefined) return nextKeyView;
|
242
|
+
|
243
|
+
// otherwise generate one based on parent view's childViews
|
244
|
+
if(pv) {
|
245
|
+
var childViews = pv.get('childViews');
|
246
|
+
return childViews[childViews.indexOf(this) + 1];
|
247
|
+
}
|
248
|
+
},
|
133
249
|
|
134
250
|
/**
|
135
|
-
Computes the next valid key view
|
136
|
-
|
251
|
+
Computes the next valid key view. This is the next key view that
|
252
|
+
acceptsFirstResponder. Computed using depth first search. If the current view
|
253
|
+
is not valid, it will first traverse its children before trying siblings. If
|
254
|
+
the current view is the only valid view, the current view will be returned. Will
|
255
|
+
return null if no valid view can be found.
|
137
256
|
|
138
257
|
@property
|
139
258
|
@type SC.View
|
140
259
|
*/
|
141
260
|
nextValidKeyView: function() {
|
142
|
-
var
|
143
|
-
rootView = this.get('pane'), ret = this.get('nextKeyView');
|
261
|
+
var cur = this, next;
|
144
262
|
|
145
|
-
|
263
|
+
while(next !== this) {
|
264
|
+
next = null;
|
146
265
|
|
147
|
-
|
148
|
-
|
149
|
-
}
|
266
|
+
// only bother to check children if we are visible
|
267
|
+
if(cur.get('isVisibleInWindow')) next = cur._getFirstKeyView();
|
150
268
|
|
151
|
-
|
152
|
-
|
269
|
+
// if we have no children, check our sibling
|
270
|
+
if(!next) next = cur._getNextKeyView();
|
153
271
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
this.get('acceptsFirstResponder') && this.get('isVisibleInWindow')){
|
159
|
-
return this;
|
160
|
-
}
|
161
|
-
seen.push(this); // avoid cycles
|
162
|
-
|
163
|
-
// find next sibling
|
164
|
-
if (!ret) {
|
165
|
-
children = this.get('childViews');
|
166
|
-
for(i=0, childLen = children.length; i<childLen; i++){
|
167
|
-
child = children[i];
|
168
|
-
if(child._computeNextValidKeyView && child.get('isVisibleInWindow') && child.get('isVisible')){
|
169
|
-
ret = child._computeNextValidKeyView(currentView, seen);
|
170
|
-
}
|
171
|
-
if (ret) { return ret; }
|
272
|
+
// if we have no children or siblings, unroll up closest parent that has a
|
273
|
+
// next sibling
|
274
|
+
if(!next) while(cur = cur.get('parentView')) {
|
275
|
+
if(next = cur._getNextKeyView()) break;
|
172
276
|
}
|
173
|
-
|
277
|
+
|
278
|
+
// if no parents have a next sibling, start over from the beginning
|
279
|
+
if(!next) next = this.get('pane');
|
280
|
+
|
281
|
+
// if it's a valid firstResponder, we're done!
|
282
|
+
if(next.get('isVisibleInWindow') && next.get('acceptsFirstResponder')) return next;
|
283
|
+
|
284
|
+
// otherwise keep looking
|
285
|
+
cur = next;
|
174
286
|
}
|
175
|
-
|
176
|
-
|
287
|
+
|
288
|
+
// this will only happen if no views are visible and accept first responder
|
289
|
+
return null;
|
290
|
+
|
291
|
+
}.property('nextKeyView'),
|
177
292
|
|
178
293
|
/**
|
179
|
-
Optionally points to the previous key view that should gain focus when
|
180
|
-
|
181
|
-
|
294
|
+
Optionally points to the previous key view that should gain focus when tabbing
|
295
|
+
through an interface. If this is not set, then the previous key view will
|
296
|
+
be set automatically to the previous sibling as defined by its parent's
|
297
|
+
childViews property.
|
298
|
+
|
299
|
+
If any views define this, all of their siblings should define it as well,
|
300
|
+
otherwise undefined behavior may occur. Their parent view should also define
|
301
|
+
a lastKeyView.
|
302
|
+
|
303
|
+
This may also be set to a view that is not a sibling, but once again all
|
304
|
+
views in the chain must define it or undefined behavior will occur.
|
305
|
+
|
306
|
+
Likewise, any view that sets previousKeyView should also set nextKeyView.
|
307
|
+
|
308
|
+
@type SC.View
|
309
|
+
@default null
|
310
|
+
*/
|
311
|
+
previousKeyView: undefined,
|
312
|
+
|
313
|
+
/**
|
314
|
+
@private
|
315
|
+
|
316
|
+
Gets the previous key view by checking if the user set it and otherwise just
|
317
|
+
getting the previous by index in childViews.
|
318
|
+
|
319
|
+
@return {SC.View}
|
182
320
|
*/
|
183
|
-
|
321
|
+
_getPreviousKeyView: function() {
|
322
|
+
var pv = this.get('parentView'),
|
323
|
+
previousKeyView = this.get('previousKeyView');
|
324
|
+
|
325
|
+
// if the parent defines firstKeyView, it takes priority over this views
|
326
|
+
// previousKeyView
|
327
|
+
if(pv && pv.get('firstKeyView') === this) return null;
|
328
|
+
|
329
|
+
// if this view defines a previousKeyView, use it
|
330
|
+
if(previousKeyView !== undefined) return previousKeyView;
|
331
|
+
|
332
|
+
// otherwise generate one based on parent view's childViews
|
333
|
+
if(pv) {
|
334
|
+
var childViews = pv.get('childViews');
|
335
|
+
return childViews[childViews.indexOf(this) - 1];
|
336
|
+
}
|
337
|
+
},
|
184
338
|
|
185
339
|
/**
|
186
|
-
Computes the previous valid key view
|
187
|
-
|
340
|
+
Computes the previous valid key view. This is the previous key view that
|
341
|
+
acceptsFirstResponder. Traverse views in the opposite order from
|
342
|
+
nextValidKeyView. If the current view is the pane, tries deepest child. If the
|
343
|
+
current view has a previous view, tries its last child. If this view is the
|
344
|
+
first child, tries the parent. Will return null if no valid view can be
|
345
|
+
found.
|
188
346
|
|
189
347
|
@property
|
190
348
|
@type SC.View
|
191
349
|
*/
|
350
|
+
// TODO: clean this up
|
192
351
|
previousValidKeyView: function() {
|
193
|
-
var
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
352
|
+
var cur = this, prev;
|
353
|
+
|
354
|
+
while(prev !== this) {
|
355
|
+
// normally, just try to get previous view's last child
|
356
|
+
if(cur.get('parentView')) prev = cur._getPreviousKeyView();
|
357
|
+
|
358
|
+
// if we are the pane, get our own last child
|
359
|
+
else prev = cur;
|
360
|
+
|
361
|
+
// loop down to the last valid child
|
362
|
+
if(prev) {
|
363
|
+
do {
|
364
|
+
cur = prev;
|
365
|
+
prev = prev._getLastKeyView();
|
366
|
+
} while(prev && prev.get('isVisibleInWindow'));
|
367
|
+
|
368
|
+
// if we ended on a null, unroll to the last one
|
369
|
+
// we don't unroll if we ended on a hidden view because we need
|
370
|
+
// to traverse to its previous view next iteration
|
371
|
+
if(!prev) prev = cur;
|
372
|
+
}
|
198
373
|
|
199
|
-
|
200
|
-
|
201
|
-
children, i, child;
|
374
|
+
// if there is no previous view, traverse to the parent
|
375
|
+
else prev = cur.get('parentView');
|
202
376
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
// find next sibling
|
210
|
-
if (!ret) {
|
211
|
-
children = this.get('childViews');
|
212
|
-
for(i=children.length-1; 0<=i; i--){
|
213
|
-
child = children[i];
|
214
|
-
if(child._computePreviousValidKeyView && child.get('isVisibleInWindow') && child.get('isVisible')){
|
215
|
-
ret = child._computePreviousValidKeyView(currentView, seen);
|
216
|
-
}
|
217
|
-
if (ret) { return ret; }
|
218
|
-
}
|
219
|
-
ret = null;
|
377
|
+
// if the view is valid, return it
|
378
|
+
if(prev.get('isVisibleInWindow') && prev.get('acceptsFirstResponder')) return prev;
|
379
|
+
|
380
|
+
// otherwise, try to find its previous valid keyview
|
381
|
+
cur = prev;
|
220
382
|
}
|
221
|
-
|
222
|
-
|
383
|
+
|
384
|
+
// if none of the views accept first responder and we make it back to where
|
385
|
+
// we started, just return null
|
386
|
+
return null;
|
387
|
+
}.property('previousKeyView')
|
223
388
|
});
|
389
|
+
|
@@ -15,6 +15,12 @@
|
|
15
15
|
CoreTools = SC.Object.create( /** @scope CoreTools.prototype */ {
|
16
16
|
|
17
17
|
NAMESPACE: 'CoreTools',
|
18
|
-
VERSION: '1.0.0'
|
19
|
-
|
18
|
+
VERSION: '1.0.0',
|
19
|
+
|
20
|
+
attachUrlPrefix: function(url) {
|
21
|
+
if(url && SC.urlPrefix) {
|
22
|
+
url = SC.urlPrefix + url;
|
23
|
+
}
|
24
|
+
return url;
|
25
|
+
}
|
20
26
|
}) ;
|
@@ -41,7 +41,7 @@ CoreTools.DataSource = SC.DataSource.extend({
|
|
41
41
|
|
42
42
|
if (!query.get('isRemote')) return NO ;
|
43
43
|
|
44
|
-
SC.Request.getUrl('/sc/targets.json')
|
44
|
+
SC.Request.getUrl(CoreTools.attachUrlPrefix('/sc/targets.json'))
|
45
45
|
.set('isJSON', YES)
|
46
46
|
.notify(this, 'fetchTargetsDidComplete', { query: query, store: store })
|
47
47
|
.send();
|
@@ -34,7 +34,7 @@ CoreTools.Target = SC.Record.extend(
|
|
34
34
|
URL to use to load the app. If no an app, returns null
|
35
35
|
*/
|
36
36
|
appUrl: function() {
|
37
|
-
return (this.get('kind') === 'app') ? this.get('name') : null;
|
37
|
+
return (this.get('kind') === 'app') ? CoreTools.attachUrlPrefix(this.get('name')) : null;
|
38
38
|
}.property('kind', 'name').cacheable(),
|
39
39
|
|
40
40
|
/**
|
@@ -5,6 +5,12 @@
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
|
+
/**
|
9
|
+
Indicates a value has a mixed state of both on and off.
|
10
|
+
|
11
|
+
@property {String}
|
12
|
+
*/
|
13
|
+
SC.MIXED_STATE = '__MIXED__';
|
8
14
|
|
9
15
|
/** @class
|
10
16
|
|
@@ -327,20 +333,22 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
|
|
327
333
|
@returns {Boolean} YES if data source can handle keys
|
328
334
|
*/
|
329
335
|
commitRecords: function(store, createStoreKeys, updateStoreKeys, destroyStoreKeys, params) {
|
330
|
-
var
|
336
|
+
var uret, dret, ret;
|
331
337
|
if (createStoreKeys.length>0) {
|
332
|
-
|
338
|
+
ret = this.createRecords.call(this, store, createStoreKeys, params);
|
333
339
|
}
|
334
340
|
|
335
341
|
if (updateStoreKeys.length>0) {
|
336
342
|
uret = this.updateRecords.call(this, store, updateStoreKeys, params);
|
343
|
+
ret = SC.none(ret) ? uret : (ret === uret) ? ret : SC.MIXED_STATE;
|
337
344
|
}
|
338
345
|
|
339
346
|
if (destroyStoreKeys.length>0) {
|
340
347
|
dret = this.destroyRecords.call(this, store, destroyStoreKeys, params);
|
348
|
+
ret = SC.none(ret) ? dret : (ret === dret) ? ret : SC.MIXED_STATE;
|
341
349
|
}
|
342
350
|
|
343
|
-
return
|
351
|
+
return ret || NO;
|
344
352
|
},
|
345
353
|
|
346
354
|
/**
|
@@ -441,13 +449,12 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
|
|
441
449
|
invokes the named action for each store key. returns proper value
|
442
450
|
*/
|
443
451
|
_handleEach: function(store, storeKeys, action, ids, params) {
|
444
|
-
var len = storeKeys.length, idx, ret, cur,
|
445
|
-
if(!ids) ids = [];
|
452
|
+
var len = storeKeys.length, idx, ret, cur, idOrParams;
|
446
453
|
|
447
454
|
for(idx=0;idx<len;idx++) {
|
448
|
-
|
455
|
+
idOrParams = ids ? ids[idx] : params;
|
449
456
|
|
450
|
-
cur = action.call(this, store, storeKeys[idx],
|
457
|
+
cur = action.call(this, store, storeKeys[idx], idOrParams);
|
451
458
|
if (ret === undefined) {
|
452
459
|
ret = cur ;
|
453
460
|
} else if (ret === YES) {
|
@@ -456,7 +463,7 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
|
|
456
463
|
ret = (cur === NO) ? NO : SC.MIXED_STATE ;
|
457
464
|
}
|
458
465
|
}
|
459
|
-
return ret ? ret : null ;
|
466
|
+
return !SC.none(ret) ? ret : null ;
|
460
467
|
},
|
461
468
|
|
462
469
|
|