sproutcore 1.6.0.beta.3-x86-mingw32 → 1.6.0.rc.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +150 -106
- 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
@@ -274,3 +274,32 @@ test("Timeouts - Status listener callback", function() {
|
|
274
274
|
}, 500);
|
275
275
|
});
|
276
276
|
|
277
|
+
test("Test Multiple listeners per single status response", function() {
|
278
|
+
|
279
|
+
|
280
|
+
var numResponses = 0;
|
281
|
+
var response;
|
282
|
+
|
283
|
+
expect(4);
|
284
|
+
|
285
|
+
request.notify(200, this, function(response) {
|
286
|
+
numResponses++;
|
287
|
+
ok(true, "Receieved a response");
|
288
|
+
|
289
|
+
if (numResponses === 2) window.start();
|
290
|
+
});
|
291
|
+
|
292
|
+
request.notify(200, this, function(response) {
|
293
|
+
numResponses++;
|
294
|
+
ok(true, "Receieved a response");
|
295
|
+
|
296
|
+
if (numResponses === 2) window.start();
|
297
|
+
});
|
298
|
+
|
299
|
+
response = request.send();
|
300
|
+
ok(response !== null, 'request.send() should return a response object');
|
301
|
+
ok(response.get('status')<0, 'response should still not have a return code since this should be async');
|
302
|
+
|
303
|
+
stop() ; // stops the test runner - wait for response
|
304
|
+
});
|
305
|
+
|
@@ -448,6 +448,8 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
|
|
448
448
|
}
|
449
449
|
|
450
450
|
lastContent.removeObserver('status', this, sfunc);
|
451
|
+
|
452
|
+
this.teardownEnumerablePropertyChains(lastContent);
|
451
453
|
}
|
452
454
|
|
453
455
|
// save new cached values
|
@@ -480,6 +482,8 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
|
|
480
482
|
// Observer for changes to the status property, in case this is an
|
481
483
|
// SC.Record or SC.RecordArray.
|
482
484
|
content.addObserver('status', this, sfunc);
|
485
|
+
|
486
|
+
this.setupEnumerablePropertyChains(content);
|
483
487
|
} else {
|
484
488
|
newlen = SC.none(content) ? 0 : 1;
|
485
489
|
}
|
@@ -487,6 +491,7 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
|
|
487
491
|
// finally, notify enumerable content has changed.
|
488
492
|
this._scac_length = newlen;
|
489
493
|
this._scac_contentStatusDidChange();
|
494
|
+
|
490
495
|
this.arrayContentDidChange(0, 0, newlen);
|
491
496
|
this.updateSelectionAfterContentChange();
|
492
497
|
}.observes('content'),
|
@@ -20,13 +20,18 @@ SC.Button = SC.TemplateView.extend({
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
|
23
|
+
rootResponder: function() {
|
24
|
+
var pane = this.get('pane');
|
25
|
+
return pane.get('rootResponder');
|
26
|
+
}.property('pane').cacheable(),
|
27
|
+
|
23
28
|
// Setting isActive to false will remove 'is-active' from our
|
24
29
|
// layer's class names.
|
25
30
|
mouseUp: function(event) {
|
26
31
|
if (this.get('isActive')) {
|
27
32
|
var action = this.get('action'),
|
28
33
|
target = this.get('target') || null,
|
29
|
-
rootResponder = this.
|
34
|
+
rootResponder = this.get('rootResponder');
|
30
35
|
|
31
36
|
if (action && rootResponder) {
|
32
37
|
rootResponder.sendAction(action, target, this, this.get('pane'), null, this);
|
@@ -46,4 +51,3 @@ SC.Button = SC.TemplateView.extend({
|
|
46
51
|
this.mouseUp(touch);
|
47
52
|
}
|
48
53
|
});
|
49
|
-
|
@@ -54,20 +54,28 @@ sc_require('ext/handlebars');
|
|
54
54
|
previousContext: this
|
55
55
|
});
|
56
56
|
|
57
|
+
var observer, invoker;
|
58
|
+
|
57
59
|
view.get('childViews').push(bindView);
|
58
60
|
|
59
|
-
|
60
|
-
// tells the SC._BindableSpan to re-render.
|
61
|
-
this.addObserver(property, this, function observer() {
|
61
|
+
observer = function() {
|
62
62
|
if (bindView.get('layer')) {
|
63
63
|
bindView.rerender();
|
64
64
|
} else {
|
65
65
|
// If no layer can be found, we can assume somewhere
|
66
66
|
// above it has been re-rendered, so remove the
|
67
67
|
// observer.
|
68
|
-
this.removeObserver(property,
|
68
|
+
this.removeObserver(property, invoker);
|
69
69
|
}
|
70
|
-
}
|
70
|
+
};
|
71
|
+
|
72
|
+
invoker = function() {
|
73
|
+
this.invokeOnce(observer);
|
74
|
+
};
|
75
|
+
|
76
|
+
// Observe the given property on the context and
|
77
|
+
// tells the SC._BindableSpan to re-render.
|
78
|
+
this.addObserver(property, invoker);
|
71
79
|
|
72
80
|
var context = bindView.renderContext(bindView.get('tagName'));
|
73
81
|
bindView.renderToContext(context);
|
@@ -142,10 +150,9 @@ Handlebars.registerHelper('bindAttr', function(options) {
|
|
142
150
|
var property = attrs[attr];
|
143
151
|
var value = this.getPath(property);
|
144
152
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
this.addObserver(property, function observer() {
|
153
|
+
var observer, invoker;
|
154
|
+
|
155
|
+
observer = function observer() {
|
149
156
|
var result = this.getPath(property);
|
150
157
|
var elem = view.$("[data-handlebars-id='" + dataId + "']");
|
151
158
|
|
@@ -154,7 +161,7 @@ Handlebars.registerHelper('bindAttr', function(options) {
|
|
154
161
|
// In that case, we can assume the template has been re-rendered
|
155
162
|
// and we need to clean up the observer.
|
156
163
|
if (elem.length === 0) {
|
157
|
-
this.removeObserver(property,
|
164
|
+
this.removeObserver(property, invoker);
|
158
165
|
return;
|
159
166
|
}
|
160
167
|
|
@@ -170,7 +177,16 @@ Handlebars.registerHelper('bindAttr', function(options) {
|
|
170
177
|
} else {
|
171
178
|
elem.attr(attr, result);
|
172
179
|
}
|
173
|
-
}
|
180
|
+
};
|
181
|
+
|
182
|
+
invoker = function() {
|
183
|
+
this.invokeOnce(observer);
|
184
|
+
};
|
185
|
+
|
186
|
+
// Add an observer to the view for when the property changes.
|
187
|
+
// When the observer fires, find the element using the
|
188
|
+
// unique data id and update the attribute to the new value.
|
189
|
+
this.addObserver(property, invoker);
|
174
190
|
|
175
191
|
// Use the attribute's name as the value when it is YES
|
176
192
|
if (value === YES) {
|
@@ -246,9 +262,11 @@ SC.Handlebars.bindClasses = function(context, classBindings, view, id) {
|
|
246
262
|
// the property changes.
|
247
263
|
var oldClass;
|
248
264
|
|
265
|
+
var observer, invoker;
|
266
|
+
|
249
267
|
// Set up an observer on the context. If the property changes, toggle the
|
250
268
|
// class name.
|
251
|
-
|
269
|
+
observer = function() {
|
252
270
|
// Get the current value of the property
|
253
271
|
newClass = classStringForProperty(property);
|
254
272
|
elem = id ? view.$("[data-handlebars-id='" + id + "']") : view.$();
|
@@ -256,7 +274,7 @@ SC.Handlebars.bindClasses = function(context, classBindings, view, id) {
|
|
256
274
|
// If we can't find the element anymore, a parent template has been
|
257
275
|
// re-rendered and we've been nuked. Remove the observer.
|
258
276
|
if (elem.length === 0) {
|
259
|
-
context.removeObserver(property,
|
277
|
+
context.removeObserver(property, invoker);
|
260
278
|
} else {
|
261
279
|
// If we had previously added a class to the element, remove it.
|
262
280
|
if (oldClass) {
|
@@ -274,7 +292,11 @@ SC.Handlebars.bindClasses = function(context, classBindings, view, id) {
|
|
274
292
|
}
|
275
293
|
};
|
276
294
|
|
277
|
-
|
295
|
+
invoker = function() {
|
296
|
+
this.invokeOnce(observer);
|
297
|
+
};
|
298
|
+
|
299
|
+
context.addObserver(property, invoker);
|
278
300
|
|
279
301
|
// We've already setup the observer; now we just need to figure out the correct
|
280
302
|
// behavior right now on the first pass through.
|
@@ -10,11 +10,11 @@ Handlebars.registerHelper('collection', function(path, options) {
|
|
10
10
|
var collectionClass, collectionObject;
|
11
11
|
|
12
12
|
collectionClass = path ? SC.objectForPropertyPath(path) : SC.TemplateCollectionView;
|
13
|
-
|
13
|
+
// @if (debug)
|
14
14
|
if (!collectionClass) {
|
15
15
|
throw "%@ #collection: Could not find %@".fmt(data.view, path);
|
16
16
|
}
|
17
|
-
|
17
|
+
// @endif
|
18
18
|
|
19
19
|
var extensions = {};
|
20
20
|
|
@@ -51,7 +51,7 @@ Handlebars.registerHelper('collection', function(path, options) {
|
|
51
51
|
});
|
52
52
|
|
53
53
|
Handlebars.registerHelper('each', function(path, options) {
|
54
|
-
options.hash.contentBinding = SC.Binding.from('*'+path, this);
|
54
|
+
options.hash.contentBinding = SC.Binding.from('*'+path, this).oneWay();
|
55
55
|
options.hash.itemContextProperty = 'content';
|
56
56
|
return Handlebars.helpers.collection.call(this, null, options);
|
57
57
|
});
|
@@ -249,44 +249,43 @@ SC.Pane = SC.View.extend(SC.ResponderContext,
|
|
249
249
|
@param {Event} evt that cause this to become first responder
|
250
250
|
@returns {SC.Pane} receiver
|
251
251
|
*/
|
252
|
-
makeFirstResponder: function(view, evt) {
|
252
|
+
makeFirstResponder: function(original, view, evt) {
|
253
|
+
// firstResponder should never be null
|
254
|
+
if(!view) view = this;
|
255
|
+
|
253
256
|
var current=this.get('firstResponder'), isKeyPane=this.get('isKeyPane');
|
254
257
|
if (current === view) return this ; // nothing to do
|
255
258
|
if (SC.platform.touch && view && view.kindOf(SC.TextFieldView) && !view.get('focused')) return this;
|
256
259
|
|
257
|
-
// notify current of firstResponder change
|
258
|
-
if (current) current.willLoseFirstResponder(current, evt);
|
259
|
-
|
260
260
|
// if we are currently key pane, then notify key views of change also
|
261
261
|
if (isKeyPane) {
|
262
262
|
if (current) { current.tryToPerform('willLoseKeyResponderTo', view); }
|
263
263
|
if (view) { view.tryToPerform('willBecomeKeyResponderFrom', current); }
|
264
264
|
}
|
265
265
|
|
266
|
-
// change setting
|
267
266
|
if (current) {
|
268
|
-
current.beginPropertyChanges()
|
269
|
-
|
270
|
-
.endPropertyChanges();
|
267
|
+
current.beginPropertyChanges();
|
268
|
+
current.set('isKeyResponder', NO);
|
271
269
|
}
|
272
270
|
|
273
|
-
this.set('firstResponder', view) ;
|
274
|
-
|
275
271
|
if (view) {
|
276
|
-
view.beginPropertyChanges()
|
277
|
-
|
278
|
-
.endPropertyChanges();
|
272
|
+
view.beginPropertyChanges();
|
273
|
+
view.set('isKeyResponder', isKeyPane);
|
279
274
|
}
|
280
275
|
|
276
|
+
original(view, evt);
|
277
|
+
|
278
|
+
if(current) current.endPropertyChanges();
|
279
|
+
if(view) view.endPropertyChanges();
|
280
|
+
|
281
281
|
// and notify again if needed.
|
282
282
|
if (isKeyPane) {
|
283
283
|
if (view) { view.tryToPerform('didBecomeKeyResponderFrom', current); }
|
284
284
|
if (current) { current.tryToPerform('didLoseKeyResponderTo', view); }
|
285
285
|
}
|
286
286
|
|
287
|
-
if (view) view.didBecomeFirstResponder(view);
|
288
287
|
return this ;
|
289
|
-
},
|
288
|
+
}.enhance(),
|
290
289
|
|
291
290
|
/**
|
292
291
|
Called just before the pane loses it's keyPane status. This will notify
|
@@ -16,26 +16,26 @@
|
|
16
16
|
})
|
17
17
|
}
|
18
18
|
*/
|
19
|
-
SC.TemplatePane = SC.Object.extend({
|
20
|
-
touchStart: function(touch) {
|
21
|
-
touch.allowDefault();
|
22
|
-
},
|
23
|
-
|
24
|
-
touchesDragged: function(evt, touches) {
|
25
|
-
evt.allowDefault();
|
26
|
-
},
|
27
|
-
|
28
|
-
touchEnd: function(touch) {
|
29
|
-
touch.allowDefault();
|
30
|
-
}
|
31
|
-
});
|
19
|
+
SC.TemplatePane = SC.Object.extend({});
|
32
20
|
|
33
21
|
SC.mixin(SC.TemplatePane, {
|
34
22
|
append: function(attrs) {
|
35
23
|
var pane = SC.MainPane.extend({
|
36
24
|
childViews: ['contentView'],
|
37
25
|
|
38
|
-
contentView: SC.TemplateView.design(attrs)
|
26
|
+
contentView: SC.TemplateView.design(attrs),
|
27
|
+
|
28
|
+
touchStart: function(touch) {
|
29
|
+
touch.allowDefault();
|
30
|
+
},
|
31
|
+
|
32
|
+
touchesDragged: function(evt, touches) {
|
33
|
+
evt.allowDefault();
|
34
|
+
},
|
35
|
+
|
36
|
+
touchEnd: function(touch) {
|
37
|
+
touch.allowDefault();
|
38
|
+
}
|
39
39
|
});
|
40
40
|
|
41
41
|
return pane.create().append();
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
/** @class
|
9
9
|
|
10
|
-
The root object for a SproutCore application.
|
11
|
-
single SC.Application instance as your root namespace.
|
10
|
+
The root object for a SproutCore application. Usually you will create a
|
11
|
+
single SC.Application instance as your root namespace. SC.Application is
|
12
12
|
required if you intend to use SC.Responder to route events.
|
13
13
|
|
14
14
|
## Example
|
@@ -19,11 +19,6 @@
|
|
19
19
|
// add other useful properties here
|
20
20
|
});
|
21
21
|
|
22
|
-
## Sending Events
|
23
|
-
|
24
|
-
You can send actions and events down an application-level responder chain
|
25
|
-
by
|
26
|
-
|
27
22
|
@extends SC.ResponderContext
|
28
23
|
@since SproutCore 1.0
|
29
24
|
*/
|
@@ -76,14 +76,14 @@ SC.Event = function(originalEvent) {
|
|
76
76
|
if (!this.which && this.button) {
|
77
77
|
this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) ));
|
78
78
|
}
|
79
|
-
|
79
|
+
|
80
80
|
// Normalize wheel delta values for mousewheel events
|
81
81
|
if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll' || this.type === 'MozMousePixelScroll') {
|
82
82
|
var deltaMultiplier = SC.Event.MOUSE_WHEEL_MULTIPLIER,
|
83
83
|
version = parseFloat(SC.browser.version);
|
84
84
|
|
85
85
|
// normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari
|
86
|
-
if (SC.browser.webkit && originalEvent.wheelDelta!==undefined) {
|
86
|
+
if (SC.browser.webkit && originalEvent.wheelDelta !== undefined) {
|
87
87
|
this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX);
|
88
88
|
this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0);
|
89
89
|
this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0);
|
@@ -102,7 +102,7 @@ SC.Event = function(originalEvent) {
|
|
102
102
|
|
103
103
|
// handle all other legacy browser
|
104
104
|
} else {
|
105
|
-
this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ;
|
105
|
+
this.wheelDelta = this.wheelDeltaY = SC.browser.msie || SC.browser.opera ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ;
|
106
106
|
this.wheelDeltaX = 0 ;
|
107
107
|
}
|
108
108
|
|
@@ -109,9 +109,9 @@ SC.platform = SC.Object.create({
|
|
109
109
|
simulateTouchEvents: function() {
|
110
110
|
// Touch events are supported natively, no need for this.
|
111
111
|
if (this.touch) {
|
112
|
-
|
112
|
+
// @if (debug)
|
113
113
|
SC.Logger.info("Can't simulate touch events in an environment that supports them.");
|
114
|
-
|
114
|
+
// @endif
|
115
115
|
return;
|
116
116
|
}
|
117
117
|
|
@@ -18,7 +18,8 @@ SC.CAPTURE_BACKSPACE_KEY = NO ;
|
|
18
18
|
RootResponder directly. Instead you will work with Pane objects, which
|
19
19
|
register themselves with the RootResponder as needed to receive events.
|
20
20
|
|
21
|
-
|
21
|
+
RootResponder and Platforms
|
22
|
+
---
|
22
23
|
|
23
24
|
RootResponder contains core functionality common among the different web
|
24
25
|
platforms. You will likely be working with a subclass of RootResponder that
|
@@ -27,7 +28,8 @@ SC.CAPTURE_BACKSPACE_KEY = NO ;
|
|
27
28
|
The correct instance of RootResponder is detected at runtime and loaded
|
28
29
|
transparently.
|
29
30
|
|
30
|
-
|
31
|
+
Event Types
|
32
|
+
---
|
31
33
|
|
32
34
|
RootResponders can route four types of events:
|
33
35
|
|
@@ -46,7 +48,8 @@ SC.CAPTURE_BACKSPACE_KEY = NO ;
|
|
46
48
|
explicit target, or allow the action to traverse the hierarchy until a
|
47
49
|
view is found that handles it.
|
48
50
|
*/
|
49
|
-
SC.RootResponder = SC.Object.extend(
|
51
|
+
SC.RootResponder = SC.Object.extend(
|
52
|
+
/** @scope SC.RootResponder.prototype */{
|
50
53
|
|
51
54
|
/**
|
52
55
|
Contains a list of all panes currently visible on screen. Everytime a
|
@@ -68,7 +71,7 @@ SC.RootResponder = SC.Object.extend({
|
|
68
71
|
// MAIN PANE
|
69
72
|
//
|
70
73
|
|
71
|
-
/**
|
74
|
+
/**
|
72
75
|
The main pane. This pane receives shortcuts and actions if the
|
73
76
|
focusedPane does not respond to them. There can be only one main pane.
|
74
77
|
You can swap main panes by calling makeMainPane() here.
|
@@ -76,6 +79,8 @@ SC.RootResponder = SC.Object.extend({
|
|
76
79
|
Usually you will not need to edit the main pane directly. Instead, you
|
77
80
|
should use a MainPane subclass, which will automatically make itself main
|
78
81
|
when you append it to the document.
|
82
|
+
|
83
|
+
@type SC.MainPane
|
79
84
|
*/
|
80
85
|
mainPane: null,
|
81
86
|
|
@@ -89,7 +94,7 @@ SC.RootResponder = SC.Object.extend({
|
|
89
94
|
document body. That will be handled by the Pane itself.
|
90
95
|
|
91
96
|
@param {SC.Pane} pane
|
92
|
-
@returns {SC.RootResponder}
|
97
|
+
@returns {SC.RootResponder}
|
93
98
|
*/
|
94
99
|
makeMainPane: function(pane) {
|
95
100
|
var currentMain = this.get('mainPane') ;
|
@@ -682,18 +687,19 @@ SC.RootResponder = SC.Object.extend({
|
|
682
687
|
}
|
683
688
|
SC.Event.add(document, mousewheel, this, this.mousewheel);
|
684
689
|
|
685
|
-
// If the browser is identifying itself as a touch-enabled browser, but
|
686
|
-
// touch events are not present, assume this is a desktop browser doing
|
687
|
-
// user agent spoofing and simulate touch events automatically.
|
688
|
-
if (SC.browser && SC.platform && SC.browser.mobileSafari && !SC.platform.touch) {
|
689
|
-
SC.platform.simulateTouchEvents();
|
690
|
-
}
|
691
|
-
|
692
690
|
// do some initial set
|
693
691
|
this.set('currentWindowSize', this.computeWindowSize()) ;
|
694
692
|
this.focus(); // assume the window is focused when you load.
|
695
693
|
|
696
694
|
if (SC.browser.mobileSafari) {
|
695
|
+
|
696
|
+
// If the browser is identifying itself as a touch-enabled browser, but
|
697
|
+
// touch events are not present, assume this is a desktop browser doing
|
698
|
+
// user agent spoofing and simulate touch events automatically.
|
699
|
+
if (SC.platform && !SC.platform.touch) {
|
700
|
+
SC.platform.simulateTouchEvents();
|
701
|
+
}
|
702
|
+
|
697
703
|
// Monkey patch RunLoop if we're in MobileSafari
|
698
704
|
var f = SC.RunLoop.prototype.endRunLoop, patch;
|
699
705
|
|
@@ -1707,6 +1713,7 @@ SC.RootResponder = SC.Object.extend({
|
|
1707
1713
|
mousedown: function(evt) {
|
1708
1714
|
if (SC.platform.touch) {
|
1709
1715
|
evt.allowDefault();
|
1716
|
+
this._lastMouseDownCustomHandling = YES;
|
1710
1717
|
return YES;
|
1711
1718
|
}
|
1712
1719
|
|
@@ -1764,6 +1771,7 @@ SC.RootResponder = SC.Object.extend({
|
|
1764
1771
|
mouseup: function(evt) {
|
1765
1772
|
if (SC.platform.touch) {
|
1766
1773
|
evt.allowDefault();
|
1774
|
+
this._lastMouseUpCustomHandling = YES;
|
1767
1775
|
return YES;
|
1768
1776
|
}
|
1769
1777
|
|