sproutcore 1.9.2 → 1.10.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +12 -9
- data/bin/sc-build-number +12 -9
- data/bin/sc-docs +12 -15
- data/bin/sc-gen +12 -9
- data/bin/sc-init +12 -9
- data/bin/sc-manifest +12 -9
- data/bin/sc-server +12 -9
- data/bin/sproutcore +12 -9
- data/lib/frameworks/sproutcore/Buildfile +14 -17
- data/lib/frameworks/sproutcore/CHANGELOG.md +214 -3
- data/lib/frameworks/sproutcore/README.md +4 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/Buildfile +13 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps/greenhouse/README → apps/greenhouse/README.md} +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/TODO +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/beautify.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/design.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/file.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/files.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/layout.js +9 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/library.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/page.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property_editor.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/targets.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/view_configs.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core_file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/data_source.js +42 -42
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/app_page.js +45 -45
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/app-selector.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/button.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/dock.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/general.css +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/icons.css +5 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/main-page.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/menu.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/modal.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/picker.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/search.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/text-field.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/dialogs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/images/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/inspectors.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/loading.rhtml +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/main_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/strings.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/fixtures/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/main.js +5 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/mixins/drop_down.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/design.js +4 -4
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/dir.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/file.js +7 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/target.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/view_config.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/resources/test_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/inspector.js +11 -11
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/library.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/main.js +26 -25
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/modals.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/ready.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/designs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/list_item.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/plist_item.js +1 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/theme.js +6 -6
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/anchor.js +43 -43
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/application_list_item.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/event_blocker.js +7 -7
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/label_designer.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/list_item.js +8 -8
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/plist_item.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/simple_button.js +31 -31
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/tear_off_picker.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/web.js +5 -5
- data/lib/frameworks/sproutcore/apps/media_examples/core.js +5 -6
- data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +16 -17
- data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +17 -18
- data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +18 -19
- data/lib/frameworks/sproutcore/apps/showcase/Buildfile +2 -2
- data/lib/frameworks/sproutcore/apps/showcase/README +1 -1
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +27 -7
- data/lib/frameworks/sproutcore/apps/showcase/core.js +6 -4
- data/lib/frameworks/sproutcore/apps/showcase/main.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/patch.diff +529 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +35 -16
- data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +195 -10
- data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/theme.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +10 -9
- data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +15 -6
- data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +5 -4
- data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +5 -5
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +15 -15
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/styles.css +3 -0
- data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +11 -11
- data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +6 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +28 -33
- data/lib/frameworks/sproutcore/apps/tests/controllers/{detail.js → test.js} +14 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +11 -15
- data/lib/frameworks/sproutcore/apps/tests/core.js +8 -113
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +9 -19
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +81 -92
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +3 -1
- data/lib/frameworks/sproutcore/apps/tests/main.js +8 -13
- data/lib/frameworks/sproutcore/apps/tests/statechart.js +268 -0
- data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +4 -4
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +16 -16
- data/lib/frameworks/sproutcore/apps/welcome/core.js +9 -9
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +22 -25
- data/lib/frameworks/sproutcore/apps/welcome/main.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +21 -7
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +35 -2
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +142 -75
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js +283 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js +284 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +64 -65
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +10 -25
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +12 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +53 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +30 -24
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +44 -40
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +105 -176
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/view_transition_protocol.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +225 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +54 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +86 -71
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +283 -120
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +653 -435
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +49 -42
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +422 -396
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +37 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/platform.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +4 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +18 -30
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +78 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +31 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +47 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +32 -31
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +23 -22
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +17 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +626 -211
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/border_frame_test.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +22 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/childViewLayout_test.js +27 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +10 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +17 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroy.js +60 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +19 -26
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +14 -13
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +341 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +26 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +28 -68
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +35 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +93 -78
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +62 -64
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +69 -18
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +26 -21
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +129 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +436 -238
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +38 -44
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +14 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +29 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceAllChildren_test.js +229 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +33 -95
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +87 -39
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +684 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +767 -625
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +4 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +645 -77
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +218 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +648 -321
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +326 -534
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +120 -126
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +1526 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +18 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +12 -94
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +43 -27
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/icons.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +90 -90
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +74 -48
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +187 -253
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +49 -9
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +236 -127
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/instance_management.js +107 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +42 -17
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +20 -15
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +205 -92
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +61 -25
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +39 -9
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +45 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/tests/system/datetime.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/design.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/controllers.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/design.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/designs.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_design.js +44 -44
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_files.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_rule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style_sheet.js +37 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/label.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/object_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/tab.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/text_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/view_designer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/css/designer.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/design_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/high_light.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/controller.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/page.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/pane.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/view.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/selection_handles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/binding.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/snap_lines.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/coders/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/designers/view_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/designer_drop_target.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/drawing.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/high_light.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/page_item_view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/selection_handles.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +51 -51
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_child.js +63 -52
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_thumb.js +64 -59
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +113 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +182 -203
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +51 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +513 -307
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +69 -217
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +31 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +15 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +2 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +25 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +29 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +19 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +14 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split_divider.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/modal.css +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +24 -98
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +446 -442
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +42 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +26 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +11 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +27 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +11 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +9 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +15 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/{mixins → views/collection}/collection_fast_path.js +18 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +46 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +101 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +26 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +89 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +27 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +32 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +6 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +103 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +76 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +91 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +2 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +70 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +10 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +37 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +18 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +115 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +37 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +194 -182
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +18 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +5 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/children.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/dividers.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +341 -45
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_child.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_thumb.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +6 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +49 -52
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +23 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +47 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +887 -740
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +68 -55
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +8 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +189 -167
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +55 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +145 -146
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +66 -66
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +40 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +203 -200
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +11 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +6 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +87 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +192 -179
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +64 -64
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +56 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +784 -714
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +21 -39
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +45 -41
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +4 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +9 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +40 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +62 -50
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +0 -9
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +46 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/render_delegates/desktop_scroller.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/tests/scroll/ui.js +38 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +26 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/test-image.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +63 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +60 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +72 -72
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +142 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +36 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/swap_transition_protocol.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +54 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +23 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +21 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-256.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-32.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-512.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-64.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/app_cache.js +412 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +11 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +33 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +49 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +29 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +8 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/app_cache_test.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +0 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +40 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +143 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +187 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +6 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +51 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_bounce_transition.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_smooth_transition.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_spring_transition.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/bounce_transition.js +211 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/fade_transition.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/pop_transition.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/scale_transition.js +54 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/slide_transition.js +140 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/spring_transition.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_dissolve_transition.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_push_transition.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +483 -95
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +65 -65
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +111 -100
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +30 -222
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +38 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +74 -62
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-1.8.3-patched.js +9485 -0
- data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +18 -17
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +10 -11
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +32 -21
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +72 -53
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +164 -156
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +145 -140
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +393 -370
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1045 -999
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +41 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +10 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +275 -205
- data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +229 -193
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +186 -188
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +138 -65
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +4 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +112 -23
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +71 -18
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +97 -57
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/infinite.js +184 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +63 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +73 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +100 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +449 -422
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +612 -562
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +115 -62
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +145 -64
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/respond_to_event.js +17 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +30 -30
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +34 -34
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/collection.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/view.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/panes/template.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/views/bindable_span.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +15 -21
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +35 -35
- data/lib/frameworks/sproutcore/scripts/run_sc_server_master.sh +34 -0
- data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +606 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +3 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +18 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +34 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +7 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +6 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +7 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +37 -37
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +12 -12
- data/lib/sproutcore/helpers/static_helper.rb +35 -27
- data/sproutcore.gemspec +1 -0
- metadata +529 -451
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +0 -55
- data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +0 -29
- data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +0 -28
- data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +0 -22
- data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +0 -51
- data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +0 -26
- data/lib/frameworks/sproutcore/apps/tests/states/ready.js +0 -56
- data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +0 -48
- data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +0 -44
- data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +0 -31
- data/lib/frameworks/sproutcore/apps/tests/states/start.js +0 -39
- data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +0 -3
- data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +0 -25
- data/lib/frameworks/sproutcore/frameworks/animation/README.md +0 -79
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +0 -1208
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +0 -152
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +0 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +0 -203
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +0 -213
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +0 -163
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +0 -97
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +0 -312
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +0 -961
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +0 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +0 -27
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +0 -394
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -8981
- data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +0 -40
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
@@ -18,107 +18,114 @@
|
|
18
18
|
SC.Responder = SC.Object.extend( /** @scope SC.Responder.prototype */ {
|
19
19
|
|
20
20
|
isResponder: YES,
|
21
|
-
|
21
|
+
|
22
22
|
/** @property
|
23
|
-
The pane this responder belongs to. This is used to determine where you
|
23
|
+
The pane this responder belongs to. This is used to determine where you
|
24
24
|
belong to in the responder chain. Normally you should leave this property
|
25
25
|
set to null.
|
26
26
|
*/
|
27
27
|
pane: null,
|
28
|
-
|
28
|
+
|
29
29
|
/** @property
|
30
|
-
The app this responder belongs to. For non-user-interface responder
|
30
|
+
The app this responder belongs to. For non-user-interface responder
|
31
31
|
chains, this is used to determine the context. Usually this
|
32
32
|
is the property you will want to work with.
|
33
33
|
*/
|
34
34
|
responderContext: null,
|
35
|
-
|
35
|
+
|
36
36
|
/** @property
|
37
|
-
This is the nextResponder in the responder chain. If the receiver does
|
38
|
-
not implement a particular event handler, it will bubble to the next
|
37
|
+
This is the nextResponder in the responder chain. If the receiver does
|
38
|
+
not implement a particular event handler, it will bubble to the next
|
39
39
|
responder.
|
40
|
-
|
40
|
+
|
41
41
|
This can point to an object directly or it can be a string, in which case
|
42
42
|
the path will be resolved from the responderContext root.
|
43
43
|
*/
|
44
44
|
nextResponder: null,
|
45
|
-
|
46
|
-
/** @property
|
47
|
-
YES if the view is currently first responder. This property is always
|
45
|
+
|
46
|
+
/** @property
|
47
|
+
YES if the view is currently first responder. This property is always
|
48
48
|
edited by the pane during its makeFirstResponder() method.
|
49
49
|
*/
|
50
50
|
isFirstResponder: NO,
|
51
|
-
|
51
|
+
|
52
52
|
/** @property
|
53
|
-
|
53
|
+
|
54
54
|
YES the responder is somewhere in the responder chain. This currently
|
55
55
|
only works when used with a ResponderContext.
|
56
|
-
|
56
|
+
|
57
57
|
@type {Boolean}
|
58
58
|
*/
|
59
|
-
hasFirstResponder: NO,
|
60
|
-
|
59
|
+
hasFirstResponder: NO,
|
60
|
+
|
61
61
|
/** @property
|
62
62
|
Set to YES if your view is willing to accept first responder status. This is used when calculating key responder loop.
|
63
63
|
*/
|
64
64
|
acceptsFirstResponder: YES,
|
65
|
-
|
65
|
+
|
66
66
|
becomingFirstResponder: NO,
|
67
|
-
|
68
|
-
/**
|
69
|
-
Call this method on your view or responder to make it become first
|
67
|
+
|
68
|
+
/**
|
69
|
+
Call this method on your view or responder to make it become first
|
70
70
|
responder.
|
71
|
-
|
71
|
+
|
72
72
|
@returns {SC.Responder} receiver
|
73
73
|
*/
|
74
|
-
becomeFirstResponder: function() {
|
74
|
+
becomeFirstResponder: function () {
|
75
75
|
var pane = this.get('pane') || this.get('responderContext') ||
|
76
76
|
this.pane();
|
77
77
|
if (pane && this.get('acceptsFirstResponder')) {
|
78
78
|
if (pane.get('firstResponder') !== this) pane.makeFirstResponder(this);
|
79
|
-
}
|
80
|
-
return this
|
79
|
+
}
|
80
|
+
return this;
|
81
81
|
},
|
82
|
-
|
82
|
+
|
83
83
|
/**
|
84
|
-
Call this method on your view or responder to resign your first responder
|
85
|
-
status. Normally this is not necessary since you will lose first responder
|
84
|
+
Call this method on your view or responder to resign your first responder
|
85
|
+
status. Normally this is not necessary since you will lose first responder
|
86
86
|
status automatically when another view becomes first responder.
|
87
|
-
|
87
|
+
|
88
88
|
@param {Event} the original event that caused this method to be called
|
89
89
|
@returns {SC.Responder} receiver
|
90
90
|
*/
|
91
|
-
resignFirstResponder: function(evt) {
|
91
|
+
resignFirstResponder: function (evt) {
|
92
92
|
var pane = this.get('pane') || this.get('responderContext');
|
93
93
|
if (pane && (pane.get('firstResponder') === this)) {
|
94
94
|
pane.makeFirstResponder(null, evt);
|
95
95
|
}
|
96
|
-
return YES;
|
96
|
+
return YES;
|
97
97
|
},
|
98
98
|
|
99
99
|
/**
|
100
100
|
Called just before the responder or any of its subresponder's are about to
|
101
101
|
lose their first responder status. The passed responder is the responder
|
102
|
-
that is about to lose its status.
|
103
|
-
|
104
|
-
Override this method to provide any standard teardown when the first
|
102
|
+
that is about to lose its status.
|
103
|
+
|
104
|
+
Override this method to provide any standard teardown when the first
|
105
105
|
responder changes.
|
106
|
-
|
106
|
+
|
107
107
|
@param {SC.Responder} responder the responder that is about to change
|
108
108
|
@returns {void}
|
109
109
|
*/
|
110
|
-
willLoseFirstResponder: function(responder) {},
|
111
|
-
|
110
|
+
willLoseFirstResponder: function (responder) {},
|
111
|
+
|
112
112
|
/**
|
113
|
-
Called just after the responder or any of its subresponder's becomes a
|
114
|
-
first responder.
|
115
|
-
|
116
|
-
Override this method to provide any standard setup when the first
|
113
|
+
Called just after the responder or any of its subresponder's becomes a
|
114
|
+
first responder.
|
115
|
+
|
116
|
+
Override this method to provide any standard setup when the first
|
117
117
|
responder changes.
|
118
|
-
|
118
|
+
|
119
119
|
@param {SC.Responder} responder the responder that changed
|
120
120
|
@returns {void}
|
121
121
|
*/
|
122
|
-
didBecomeFirstResponder: function(responder) {}
|
122
|
+
didBecomeFirstResponder: function (responder) {},
|
123
|
+
|
124
|
+
/** SC.Object.prototype.destroy */
|
125
|
+
destroy: function () {
|
126
|
+
this.resignFirstResponder();
|
127
|
+
|
128
|
+
sc_super();
|
129
|
+
}
|
123
130
|
|
124
131
|
});
|
@@ -9,7 +9,7 @@ sc_require('system/ready');
|
|
9
9
|
sc_require('system/platform');
|
10
10
|
|
11
11
|
/** Set to NO to leave the backspace key under the control of the browser.*/
|
12
|
-
SC.CAPTURE_BACKSPACE_KEY = NO
|
12
|
+
SC.CAPTURE_BACKSPACE_KEY = NO;
|
13
13
|
|
14
14
|
/** @class
|
15
15
|
|
@@ -57,14 +57,9 @@ SC.RootResponder = SC.Object.extend(
|
|
57
57
|
*/
|
58
58
|
panes: null,
|
59
59
|
|
60
|
-
init: function() {
|
60
|
+
init: function () {
|
61
61
|
sc_super();
|
62
62
|
this.panes = SC.Set.create();
|
63
|
-
|
64
|
-
if (SC.platform.supportsCSSTransitions) {
|
65
|
-
this[SC.platform.cssPrefix+'TransitionEnd'] = this.transitionEnd;
|
66
|
-
this['transitionend'] = this.transitionEnd;
|
67
|
-
}
|
68
63
|
},
|
69
64
|
|
70
65
|
// .......................................................
|
@@ -96,24 +91,24 @@ SC.RootResponder = SC.Object.extend(
|
|
96
91
|
@param {SC.Pane} pane
|
97
92
|
@returns {SC.RootResponder}
|
98
93
|
*/
|
99
|
-
makeMainPane: function(pane) {
|
100
|
-
var currentMain = this.get('mainPane')
|
101
|
-
if (currentMain === pane) return this
|
94
|
+
makeMainPane: function (pane) {
|
95
|
+
var currentMain = this.get('mainPane');
|
96
|
+
if (currentMain === pane) return this; // nothing to do
|
102
97
|
|
103
|
-
this.beginPropertyChanges()
|
98
|
+
this.beginPropertyChanges();
|
104
99
|
|
105
100
|
// change key focus if needed.
|
106
|
-
if (this.get('keyPane') === currentMain) this.makeKeyPane(pane)
|
101
|
+
if (this.get('keyPane') === currentMain) this.makeKeyPane(pane);
|
107
102
|
|
108
103
|
// change setting
|
109
|
-
this.set('mainPane', pane)
|
104
|
+
this.set('mainPane', pane);
|
110
105
|
|
111
106
|
// notify panes. This will allow them to remove themselves.
|
112
|
-
if (currentMain) currentMain.blurMainTo(pane)
|
113
|
-
if (pane) pane.focusMainFrom(currentMain)
|
107
|
+
if (currentMain) currentMain.blurMainTo(pane);
|
108
|
+
if (pane) pane.focusMainFrom(currentMain);
|
114
109
|
|
115
|
-
this.endPropertyChanges()
|
116
|
-
return this
|
110
|
+
this.endPropertyChanges();
|
111
|
+
return this;
|
117
112
|
},
|
118
113
|
|
119
114
|
// ..........................................................
|
@@ -141,7 +136,7 @@ SC.RootResponder = SC.Object.extend(
|
|
141
136
|
@param {SC.MenuPane} pane
|
142
137
|
@returns {SC.RootResponder} receiver
|
143
138
|
*/
|
144
|
-
makeMenuPane: function(pane) {
|
139
|
+
makeMenuPane: function (pane) {
|
145
140
|
// Does the specified pane accept being the menu pane? If not, there's
|
146
141
|
// nothing to do.
|
147
142
|
if (pane && !pane.get('acceptsMenuPane')) {
|
@@ -185,51 +180,50 @@ SC.RootResponder = SC.Object.extend(
|
|
185
180
|
@param {SC.Pane} pane
|
186
181
|
@returns {SC.RootResponder} receiver
|
187
182
|
*/
|
188
|
-
makeKeyPane: function(pane) {
|
183
|
+
makeKeyPane: function (pane) {
|
189
184
|
// Was a pane specified?
|
190
|
-
var newKeyPane, previousKeyPane, previousKeyPanes
|
185
|
+
var newKeyPane, previousKeyPane, previousKeyPanes;
|
191
186
|
|
192
187
|
if (pane) {
|
193
188
|
// Does the specified pane accept being the key pane? If not, there's
|
194
189
|
// nothing to do.
|
195
190
|
if (!pane.get('acceptsKeyPane')) {
|
196
|
-
return this
|
191
|
+
return this;
|
197
192
|
}
|
198
193
|
else {
|
199
194
|
// It does accept key pane status? Then push the current keyPane to
|
200
195
|
// the top of the stack and make the specified pane the new keyPane.
|
201
196
|
// First, though, do a sanity-check to make sure it's not already the
|
202
197
|
// key pane, in which case we have nothing to do.
|
203
|
-
previousKeyPane = this.get('keyPane')
|
198
|
+
previousKeyPane = this.get('keyPane');
|
204
199
|
if (previousKeyPane === pane) {
|
205
|
-
return this
|
200
|
+
return this;
|
206
201
|
}
|
207
202
|
else {
|
208
203
|
if (previousKeyPane) {
|
209
|
-
previousKeyPanes = this.get('previousKeyPanes')
|
210
|
-
previousKeyPanes.push(previousKeyPane)
|
204
|
+
previousKeyPanes = this.get('previousKeyPanes');
|
205
|
+
previousKeyPanes.push(previousKeyPane);
|
211
206
|
}
|
212
207
|
|
213
|
-
newKeyPane = pane
|
208
|
+
newKeyPane = pane;
|
214
209
|
}
|
215
210
|
}
|
216
|
-
}
|
217
|
-
else {
|
211
|
+
} else {
|
218
212
|
// No pane was specified? Then pop the previous key pane off the top of
|
219
213
|
// the stack and make it the new key pane, assuming that it's still
|
220
214
|
// attached and accepts key pane (its value for acceptsKeyPane might
|
221
215
|
// have changed in the meantime). Otherwise, we'll keep going up the
|
222
216
|
// stack.
|
223
|
-
previousKeyPane = this.get('keyPane')
|
224
|
-
previousKeyPanes = this.get('previousKeyPanes')
|
217
|
+
previousKeyPane = this.get('keyPane');
|
218
|
+
previousKeyPanes = this.get('previousKeyPanes');
|
225
219
|
|
226
|
-
newKeyPane = null
|
220
|
+
newKeyPane = null;
|
227
221
|
var candidate;
|
228
222
|
while (previousKeyPanes.length > 0) {
|
229
223
|
candidate = previousKeyPanes.pop();
|
230
224
|
if (candidate.get('isPaneAttached') && candidate.get('acceptsKeyPane')) {
|
231
|
-
newKeyPane = candidate
|
232
|
-
break
|
225
|
+
newKeyPane = candidate;
|
226
|
+
break;
|
233
227
|
}
|
234
228
|
}
|
235
229
|
}
|
@@ -238,20 +232,20 @@ SC.RootResponder = SC.Object.extend(
|
|
238
232
|
// If we found an appropriate candidate, make it the new key pane.
|
239
233
|
// Otherwise, make the main pane the key pane (if it accepts it).
|
240
234
|
if (!newKeyPane) {
|
241
|
-
var mainPane = this.get('mainPane')
|
242
|
-
if (mainPane && mainPane.get('acceptsKeyPane')) newKeyPane = mainPane
|
235
|
+
var mainPane = this.get('mainPane');
|
236
|
+
if (mainPane && mainPane.get('acceptsKeyPane')) newKeyPane = mainPane;
|
243
237
|
}
|
244
238
|
|
245
239
|
// now notify old and new key views of change after edit
|
246
|
-
if (previousKeyPane) previousKeyPane.willLoseKeyPaneTo(newKeyPane)
|
247
|
-
if (newKeyPane) newKeyPane.willBecomeKeyPaneFrom(previousKeyPane)
|
240
|
+
if (previousKeyPane) previousKeyPane.willLoseKeyPaneTo(newKeyPane);
|
241
|
+
if (newKeyPane) newKeyPane.willBecomeKeyPaneFrom(previousKeyPane);
|
248
242
|
|
249
|
-
this.set('keyPane', newKeyPane)
|
243
|
+
this.set('keyPane', newKeyPane);
|
250
244
|
|
251
|
-
if (newKeyPane) newKeyPane.didBecomeKeyPaneFrom(previousKeyPane)
|
252
|
-
if (previousKeyPane) previousKeyPane.didLoseKeyPaneTo(newKeyPane)
|
245
|
+
if (newKeyPane) newKeyPane.didBecomeKeyPaneFrom(previousKeyPane);
|
246
|
+
if (previousKeyPane) previousKeyPane.didLoseKeyPaneTo(newKeyPane);
|
253
247
|
|
254
|
-
return this
|
248
|
+
return this;
|
255
249
|
},
|
256
250
|
|
257
251
|
// ..........................................................
|
@@ -270,61 +264,63 @@ SC.RootResponder = SC.Object.extend(
|
|
270
264
|
|
271
265
|
@returns Rect
|
272
266
|
*/
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
}
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
}
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
}
|
300
|
-
|
301
|
-
|
267
|
+
computeWindowSize: function () {
|
268
|
+
var size, bod, docElement;
|
269
|
+
if (!this._bod || !this._docElement) {
|
270
|
+
bod = document.body;
|
271
|
+
docElement = document.documentElement;
|
272
|
+
this._bod = bod;
|
273
|
+
this._docElement = docElement;
|
274
|
+
} else {
|
275
|
+
bod = this._bod;
|
276
|
+
docElement = this._docElement;
|
277
|
+
}
|
278
|
+
|
279
|
+
if (window.innerHeight) {
|
280
|
+
size = {
|
281
|
+
width: window.innerWidth,
|
282
|
+
height: window.innerHeight
|
283
|
+
};
|
284
|
+
} else if (docElement && docElement.clientHeight) {
|
285
|
+
size = {
|
286
|
+
width: docElement.clientWidth,
|
287
|
+
height: docElement.clientHeight
|
288
|
+
};
|
289
|
+
} else if (bod) {
|
290
|
+
size = {
|
291
|
+
width: bod.clientWidth,
|
292
|
+
height: bod.clientHeight
|
293
|
+
};
|
294
|
+
}
|
295
|
+
return size;
|
296
|
+
},
|
302
297
|
|
303
298
|
/**
|
304
299
|
On window resize, notifies panes of the change.
|
305
300
|
|
306
301
|
@returns {Boolean}
|
307
302
|
*/
|
308
|
-
resize: function() {
|
303
|
+
resize: function () {
|
309
304
|
this._resize();
|
310
|
-
|
305
|
+
|
311
306
|
return YES; //always allow normal processing to continue.
|
312
307
|
},
|
313
308
|
|
314
|
-
_resize: function() {
|
309
|
+
_resize: function () {
|
315
310
|
// calculate new window size...
|
316
311
|
var newSize = this.computeWindowSize(), oldSize = this.get('currentWindowSize');
|
317
312
|
this.set('currentWindowSize', newSize); // update size
|
318
313
|
|
319
314
|
if (!SC.rectsEqual(newSize, oldSize)) {
|
315
|
+
|
320
316
|
//Notify orientation change. This is faster than waiting for the orientation
|
321
317
|
//change event.
|
322
318
|
SC.device.windowSizeDidChange(newSize);
|
323
319
|
|
324
320
|
// notify panes
|
325
321
|
if (this.panes) {
|
326
|
-
SC.run(function() {
|
327
|
-
this.panes.invoke('windowSizeDidChange', oldSize, newSize)
|
322
|
+
SC.run(function () {
|
323
|
+
this.panes.invoke('windowSizeDidChange', oldSize, newSize);
|
328
324
|
}, this);
|
329
325
|
}
|
330
326
|
}
|
@@ -344,46 +340,46 @@ SC.RootResponder = SC.Object.extend(
|
|
344
340
|
Handle window focus. Change hasFocus and add sc-focus CSS class
|
345
341
|
(removing sc-blur). Also notify panes.
|
346
342
|
*/
|
347
|
-
focus: function(evt) {
|
348
|
-
|
343
|
+
focus: function (evt) {
|
349
344
|
if (!this.get('hasFocus')) {
|
350
345
|
SC.$('body').addClass('sc-focus').removeClass('sc-blur');
|
351
346
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
347
|
+
SC.run(function () {
|
348
|
+
// If the app is getting focus again set the first responder to the first
|
349
|
+
// valid firstResponder view in the view's tree
|
350
|
+
if (!SC.TABBING_ONLY_INSIDE_DOCUMENT && !SC.browser.isIE8OrLower) {
|
351
|
+
var keyPane = SC.RootResponder.responder.get('keyPane');
|
352
|
+
if (keyPane) {
|
353
|
+
var nextValidKeyView = keyPane.get('nextValidKeyView');
|
354
|
+
if (nextValidKeyView) keyPane.makeFirstResponder(nextValidKeyView);
|
355
|
+
}
|
359
356
|
}
|
360
|
-
}
|
361
357
|
|
362
|
-
SC.run(function() {
|
363
358
|
this.set('hasFocus', YES);
|
364
359
|
}, this);
|
365
360
|
}
|
366
|
-
|
361
|
+
|
362
|
+
return YES; // allow default
|
367
363
|
},
|
368
364
|
|
369
365
|
/**
|
370
366
|
Handle window focus event for IE. Listening to the focus event is not
|
371
367
|
reliable as per every focus event you receive you immediately get a blur
|
372
|
-
event (Only on IE of course
|
368
|
+
event (Only on IE of course;)
|
373
369
|
*/
|
374
|
-
focusin: function(evt) {
|
375
|
-
if(this._focusTimeout) clearTimeout(this._focusTimeout);
|
370
|
+
focusin: function (evt) {
|
371
|
+
if (this._focusTimeout) clearTimeout(this._focusTimeout);
|
376
372
|
this.focus(evt);
|
377
373
|
},
|
378
374
|
|
379
375
|
/**
|
380
376
|
Handle window blur event for IE. Listening to the focus event is not
|
381
377
|
reliable as per every focus event you receive you immediately get a blur
|
382
|
-
event (Only on IE of course
|
378
|
+
event (Only on IE of course;)
|
383
379
|
*/
|
384
|
-
focusout: function(evt) {
|
380
|
+
focusout: function (evt) {
|
385
381
|
var that = this;
|
386
|
-
this._focusTimeout = setTimeout(function(){that.blur(evt);}, 300);
|
382
|
+
this._focusTimeout = setTimeout(function () { that.blur(evt); }, 300);
|
387
383
|
},
|
388
384
|
|
389
385
|
|
@@ -391,20 +387,20 @@ SC.RootResponder = SC.Object.extend(
|
|
391
387
|
Handle window focus. Change hasFocus and add sc-focus CSS class (removing
|
392
388
|
sc-blur). Also notify panes.
|
393
389
|
*/
|
394
|
-
blur: function(evt) {
|
390
|
+
blur: function (evt) {
|
395
391
|
if (this.get('hasFocus')) {
|
396
392
|
SC.$('body').addClass('sc-blur').removeClass('sc-focus');
|
397
393
|
|
398
|
-
SC.run(function() {
|
394
|
+
SC.run(function () {
|
399
395
|
this.set('hasFocus', NO);
|
400
396
|
}, this);
|
401
397
|
}
|
402
|
-
return YES
|
398
|
+
return YES; // allow default
|
403
399
|
},
|
404
400
|
|
405
|
-
dragDidStart: function(drag) {
|
406
|
-
this._mouseDownView = drag
|
407
|
-
this._drag = drag
|
401
|
+
dragDidStart: function (drag) {
|
402
|
+
this._mouseDownView = drag;
|
403
|
+
this._drag = drag;
|
408
404
|
},
|
409
405
|
|
410
406
|
// .......................................................
|
@@ -440,8 +436,8 @@ SC.RootResponder = SC.Object.extend(
|
|
440
436
|
@returns {Boolean} YES if action was performed, NO otherwise
|
441
437
|
@test in targetForAction
|
442
438
|
*/
|
443
|
-
sendAction: function(
|
444
|
-
target = this.targetForAction(action, target, sender, pane, firstResponder)
|
439
|
+
sendAction: function (action, target, sender, pane, context, firstResponder) {
|
440
|
+
target = this.targetForAction(action, target, sender, pane, firstResponder);
|
445
441
|
|
446
442
|
// HACK: If the target is a ResponderContext, forward the action.
|
447
443
|
if (target && target.isResponderContext) {
|
@@ -449,14 +445,14 @@ SC.RootResponder = SC.Object.extend(
|
|
449
445
|
} else return target && target.tryToPerform(action, sender);
|
450
446
|
},
|
451
447
|
|
452
|
-
_responderFor: function(target, methodName, firstResponder) {
|
448
|
+
_responderFor: function (target, methodName, firstResponder) {
|
453
449
|
var defaultResponder = target ? target.get('defaultResponder') : null;
|
454
450
|
|
455
451
|
if (target) {
|
456
452
|
target = firstResponder || target.get('firstResponder') || target;
|
457
453
|
do {
|
458
|
-
if (target.respondsTo(methodName)) return target
|
459
|
-
} while ((target = target.get('nextResponder')))
|
454
|
+
if (target.respondsTo(methodName)) return target;
|
455
|
+
} while ((target = target.get('nextResponder')));
|
460
456
|
}
|
461
457
|
|
462
458
|
// HACK: Eventually we need to normalize the sendAction() method between
|
@@ -493,11 +489,11 @@ SC.RootResponder = SC.Object.extend(
|
|
493
489
|
@param {firstResponder} a first responder to use
|
494
490
|
@returns {Object} target object or null if none found
|
495
491
|
*/
|
496
|
-
targetForAction: function(methodName, target, sender, pane, firstResponder) {
|
492
|
+
targetForAction: function (methodName, target, sender, pane, firstResponder) {
|
497
493
|
|
498
494
|
// 1. no action, no target...
|
499
495
|
if (!methodName || (SC.typeOf(methodName) !== SC.T_STRING)) {
|
500
|
-
return null
|
496
|
+
return null;
|
501
497
|
}
|
502
498
|
|
503
499
|
// 2. an explicit target was passed...
|
@@ -509,13 +505,13 @@ SC.RootResponder = SC.Object.extend(
|
|
509
505
|
|
510
506
|
if (target && !target.isResponderContext) {
|
511
507
|
if (target.respondsTo && !target.respondsTo(methodName)) {
|
512
|
-
target = null
|
508
|
+
target = null;
|
513
509
|
} else if (SC.typeOf(target[methodName]) !== SC.T_FUNCTION) {
|
514
|
-
target = null
|
510
|
+
target = null;
|
515
511
|
}
|
516
512
|
}
|
517
513
|
|
518
|
-
return target
|
514
|
+
return target;
|
519
515
|
}
|
520
516
|
|
521
517
|
// 3. an explicit pane was passed...
|
@@ -526,32 +522,32 @@ SC.RootResponder = SC.Object.extend(
|
|
526
522
|
|
527
523
|
// 4. no target or pane passed... try to find target in the active panes
|
528
524
|
// and the defaultResponder
|
529
|
-
var keyPane = this.get('keyPane'), mainPane = this.get('mainPane')
|
525
|
+
var keyPane = this.get('keyPane'), mainPane = this.get('mainPane');
|
530
526
|
|
531
527
|
// ...check key and main panes first
|
532
528
|
if (keyPane && (keyPane !== pane)) {
|
533
|
-
target = this._responderFor(keyPane, methodName)
|
529
|
+
target = this._responderFor(keyPane, methodName);
|
534
530
|
}
|
535
531
|
if (!target && mainPane && (mainPane !== keyPane)) {
|
536
|
-
target = this._responderFor(mainPane, methodName)
|
532
|
+
target = this._responderFor(mainPane, methodName);
|
537
533
|
}
|
538
534
|
|
539
535
|
// ...still no target? check the defaultResponder...
|
540
536
|
if (!target && (target = this.get('defaultResponder'))) {
|
541
537
|
if (SC.typeOf(target) === SC.T_STRING) {
|
542
|
-
target = SC.objectForPropertyPath(target)
|
543
|
-
if (target) this.set('defaultResponder', target)
|
538
|
+
target = SC.objectForPropertyPath(target);
|
539
|
+
if (target) this.set('defaultResponder', target); // cache if found
|
544
540
|
}
|
545
541
|
if (target && !target.isResponderContext) {
|
546
542
|
if (target.respondsTo && !target.respondsTo(methodName)) {
|
547
|
-
target = null
|
543
|
+
target = null;
|
548
544
|
} else if (SC.typeOf(target[methodName]) !== SC.T_FUNCTION) {
|
549
|
-
target = null
|
545
|
+
target = null;
|
550
546
|
}
|
551
547
|
}
|
552
548
|
}
|
553
549
|
|
554
|
-
return target
|
550
|
+
return target;
|
555
551
|
},
|
556
552
|
|
557
553
|
/**
|
@@ -561,8 +557,8 @@ SC.RootResponder = SC.Object.extend(
|
|
561
557
|
@param {SC.Event} evt
|
562
558
|
@returns {SC.View} view instance or null
|
563
559
|
*/
|
564
|
-
targetViewForEvent: function(evt) {
|
565
|
-
return evt.target ? SC.$(evt.target).view()[0] : null
|
560
|
+
targetViewForEvent: function (evt) {
|
561
|
+
return evt.target ? SC.$(evt.target).view()[0] : null;
|
566
562
|
},
|
567
563
|
|
568
564
|
/**
|
@@ -579,19 +575,19 @@ SC.RootResponder = SC.Object.extend(
|
|
579
575
|
@param {Object} target
|
580
576
|
@returns {Object} object that handled the event or null if not handled
|
581
577
|
*/
|
582
|
-
sendEvent: function(action, evt, target) {
|
583
|
-
var pane, ret
|
578
|
+
sendEvent: function (action, evt, target) {
|
579
|
+
var pane, ret;
|
584
580
|
|
585
|
-
SC.run(function() {
|
581
|
+
SC.run(function () {
|
586
582
|
// get the target pane
|
587
|
-
if (target) pane = target.get('pane')
|
588
|
-
else pane = this.get('menuPane') || this.get('keyPane') || this.get('mainPane')
|
583
|
+
if (target) pane = target.get('pane');
|
584
|
+
else pane = this.get('menuPane') || this.get('keyPane') || this.get('mainPane');
|
589
585
|
|
590
586
|
// if we found a valid pane, send the event to it
|
591
|
-
ret = (pane) ? pane.sendEvent(action, evt, target) : null
|
587
|
+
ret = (pane) ? pane.sendEvent(action, evt, target) : null;
|
592
588
|
}, this);
|
593
589
|
|
594
|
-
return ret
|
590
|
+
return ret;
|
595
591
|
},
|
596
592
|
|
597
593
|
// .......................................................
|
@@ -611,14 +607,16 @@ SC.RootResponder = SC.Object.extend(
|
|
611
607
|
@param {Boolean} useCapture
|
612
608
|
@returns {SC.RootResponder} receiver
|
613
609
|
*/
|
614
|
-
listenFor: function(keyNames, target, receiver, useCapture) {
|
610
|
+
listenFor: function (keyNames, target, receiver, useCapture) {
|
615
611
|
receiver = receiver ? receiver : this;
|
616
|
-
keyNames.forEach(
|
617
|
-
var method = receiver[keyName]
|
618
|
-
if (method) SC.Event.add(target, keyName, receiver, method, null, useCapture)
|
619
|
-
},this)
|
620
|
-
|
621
|
-
|
612
|
+
keyNames.forEach(function (keyName) {
|
613
|
+
var method = receiver[keyName];
|
614
|
+
if (method) SC.Event.add(target, keyName, receiver, method, null, useCapture);
|
615
|
+
}, this);
|
616
|
+
|
617
|
+
target = null;
|
618
|
+
|
619
|
+
return receiver;
|
622
620
|
},
|
623
621
|
|
624
622
|
/**
|
@@ -628,7 +626,7 @@ SC.RootResponder = SC.Object.extend(
|
|
628
626
|
|
629
627
|
@returns {void}
|
630
628
|
*/
|
631
|
-
setup: function() {
|
629
|
+
setup: function () {
|
632
630
|
// handle touch events
|
633
631
|
this.listenFor(['touchstart', 'touchmove', 'touchend', 'touchcancel'], document);
|
634
632
|
|
@@ -636,23 +634,31 @@ SC.RootResponder = SC.Object.extend(
|
|
636
634
|
this.listenFor(['keydown', 'keyup', 'beforedeactivate', 'mousedown', 'mouseup', 'click', 'dblclick', 'mousemove', 'selectstart', 'contextmenu'], document)
|
637
635
|
.listenFor(['resize'], window);
|
638
636
|
|
639
|
-
if(SC.browser.isIE8OrLower) this.listenFor(['focusin', 'focusout'], document);
|
637
|
+
if (SC.browser.isIE8OrLower) this.listenFor(['focusin', 'focusout'], document);
|
640
638
|
else this.listenFor(['focus', 'blur'], window);
|
641
639
|
|
642
|
-
//
|
643
|
-
this.listenFor(['webkitAnimationStart', 'webkitAnimationIteration', 'webkitAnimationEnd'], document);
|
644
|
-
|
645
|
-
// CSS Transitions
|
640
|
+
// CSS Transitions (tested asynchronously)
|
646
641
|
if (SC.platform.supportsCSSTransitions) {
|
647
|
-
|
642
|
+
// Ensure that the callback name used maps to our implemented function name.
|
643
|
+
this[SC.platform.transitionendEventName] = this.transitionend;
|
644
|
+
this.listenFor([SC.platform.transitionendEventName], document);
|
645
|
+
}
|
646
|
+
|
647
|
+
// CSS Animations (tested asynchronously)
|
648
|
+
if (SC.platform.supportsCSSAnimations) {
|
649
|
+
// Ensure that the callback name used maps to our implemented function name.
|
650
|
+
this[SC.platform.animationstartEventName] = this.animationstart;
|
651
|
+
this[SC.platform.animationendEventName] = this.animationend;
|
652
|
+
this[SC.platform.animationiterationEventName] = this.animationiteration;
|
653
|
+
this.listenFor([SC.platform.animationstartEventName, SC.platform.animationendEventName, SC.platform.animationiterationEventName], document);
|
648
654
|
}
|
649
655
|
|
650
656
|
// handle special case for keypress- you can't use normal listener to block
|
651
657
|
// the backspace key on Mozilla
|
652
658
|
if (this.keypress) {
|
653
659
|
if (SC.CAPTURE_BACKSPACE_KEY && SC.browser.isMozilla) {
|
654
|
-
var responder = this
|
655
|
-
document.onkeypress = function(e) {
|
660
|
+
var responder = this;
|
661
|
+
document.onkeypress = function (e) {
|
656
662
|
e = SC.Event.normalizeEvent(e);
|
657
663
|
return responder.keypress.call(responder, e);
|
658
664
|
};
|
@@ -664,18 +670,19 @@ SC.RootResponder = SC.Object.extend(
|
|
664
670
|
}
|
665
671
|
|
666
672
|
// handle these two events specially in IE
|
667
|
-
['drag', 'selectstart'].forEach(function(keyName) {
|
668
|
-
var method = this[keyName]
|
673
|
+
['drag', 'selectstart'].forEach(function (keyName) {
|
674
|
+
var method = this[keyName];
|
669
675
|
if (method) {
|
670
676
|
if (SC.browser.isIE) {
|
671
|
-
var responder = this
|
672
|
-
|
677
|
+
var responder = this;
|
678
|
+
|
679
|
+
document.body['on' + keyName] = function (e) {
|
673
680
|
// return method.call(responder, SC.Event.normalizeEvent(e));
|
674
681
|
return method.call(responder, SC.Event.normalizeEvent(event || window.event)); // this is IE :(
|
675
682
|
};
|
676
683
|
|
677
684
|
// be sure to cleanup memory leaks
|
678
|
-
|
685
|
+
SC.Event.add(window, 'unload', this, function () {
|
679
686
|
document.body['on' + keyName] = null;
|
680
687
|
});
|
681
688
|
|
@@ -703,7 +710,7 @@ SC.RootResponder = SC.Object.extend(
|
|
703
710
|
SC.Event.add(document, mousewheel, this, this.mousewheel);
|
704
711
|
|
705
712
|
// do some initial set
|
706
|
-
this.set('currentWindowSize', this.computeWindowSize())
|
713
|
+
this.set('currentWindowSize', this.computeWindowSize());
|
707
714
|
|
708
715
|
// TODO: Is this workaround still valid?
|
709
716
|
if (SC.browser.os === SC.OS.ios && SC.browser.name === SC.BROWSER.safari) {
|
@@ -718,7 +725,7 @@ SC.RootResponder = SC.Object.extend(
|
|
718
725
|
// Monkey patch RunLoop if we're in MobileSafari
|
719
726
|
var f = SC.RunLoop.prototype.endRunLoop, patch;
|
720
727
|
|
721
|
-
patch = function() {
|
728
|
+
patch = function () {
|
722
729
|
// Call original endRunLoop implementation.
|
723
730
|
if (f) f.apply(this, arguments);
|
724
731
|
|
@@ -728,7 +735,7 @@ SC.RootResponder = SC.Object.extend(
|
|
728
735
|
// end of every runloop, check to see if the target of any touches has been removed
|
729
736
|
// from the DOM. If so, we re-append it to the DOM and hide it. We then mark the target
|
730
737
|
// as having been moved, and it is de-allocated in the corresponding touchend event.
|
731
|
-
var touches = SC.RootResponder.responder._touches, touch, elem, target,
|
738
|
+
var touches = SC.RootResponder.responder._touches, touch, elem, target, found = NO;
|
732
739
|
if (touches) {
|
733
740
|
// Iterate through the touches we're currently tracking
|
734
741
|
for (touch in touches) {
|
@@ -806,7 +813,7 @@ SC.RootResponder = SC.Object.extend(
|
|
806
813
|
When views receive a touch event, they have the option to subscribe to it.
|
807
814
|
They are then mapped to touch events and vice-versa. This returns touches mapped to the view.
|
808
815
|
*/
|
809
|
-
touchesForView: function(view) {
|
816
|
+
touchesForView: function (view) {
|
810
817
|
if (this._touchedViews[SC.guidFor(view)]) {
|
811
818
|
return this._touchedViews[SC.guidFor(view)].touches;
|
812
819
|
}
|
@@ -818,8 +825,9 @@ SC.RootResponder = SC.Object.extend(
|
|
818
825
|
|
819
826
|
This is useful for implementing scaling.
|
820
827
|
*/
|
821
|
-
averagedTouchesForView: function(view, added) {
|
822
|
-
var
|
828
|
+
averagedTouchesForView: function (view, added) {
|
829
|
+
var len,
|
830
|
+
t = this.touchesForView(view),
|
823
831
|
|
824
832
|
// cache per view to avoid gc
|
825
833
|
averaged = view._scrr_averagedTouches || (view._scrr_averagedTouches = {});
|
@@ -837,8 +845,9 @@ SC.RootResponder = SC.Object.extend(
|
|
837
845
|
|
838
846
|
// copy touches into array
|
839
847
|
if (t) {
|
840
|
-
var i
|
841
|
-
|
848
|
+
var i;
|
849
|
+
len = t.length;
|
850
|
+
for (i = 0; i < len; i++) {
|
842
851
|
touches.push(t[i]);
|
843
852
|
}
|
844
853
|
}
|
@@ -854,7 +863,8 @@ SC.RootResponder = SC.Object.extend(
|
|
854
863
|
// first, add
|
855
864
|
for (idx = 0; idx < len; idx++) {
|
856
865
|
touch = touches[idx];
|
857
|
-
ax += touch.pageX;
|
866
|
+
ax += touch.pageX;
|
867
|
+
ay += touch.pageY;
|
858
868
|
}
|
859
869
|
|
860
870
|
// now, average
|
@@ -885,9 +895,9 @@ SC.RootResponder = SC.Object.extend(
|
|
885
895
|
return averaged;
|
886
896
|
},
|
887
897
|
|
888
|
-
assignTouch: function(touch, view) {
|
898
|
+
assignTouch: function (touch, view) {
|
889
899
|
// sanity-check
|
890
|
-
if (touch.hasEnded) throw "Attempt to assign a touch that is already finished.";
|
900
|
+
if (touch.hasEnded) throw new Error("Attempt to assign a touch that is already finished.");
|
891
901
|
|
892
902
|
// unassign from old view if necessary
|
893
903
|
if (touch.view === view) return;
|
@@ -911,7 +921,7 @@ SC.RootResponder = SC.Object.extend(
|
|
911
921
|
this._touchedViews[SC.guidFor(view)].touchCount++;
|
912
922
|
},
|
913
923
|
|
914
|
-
unassignTouch: function(touch) {
|
924
|
+
unassignTouch: function (touch) {
|
915
925
|
// find view entry
|
916
926
|
var view, viewEntry;
|
917
927
|
|
@@ -935,7 +945,7 @@ SC.RootResponder = SC.Object.extend(
|
|
935
945
|
touch.view = undefined;
|
936
946
|
},
|
937
947
|
|
938
|
-
_flushQueuedTouchResponder: function(){
|
948
|
+
_flushQueuedTouchResponder: function () {
|
939
949
|
if (this._queuedTouchResponder) {
|
940
950
|
var queued = this._queuedTouchResponder;
|
941
951
|
this._queuedTouchResponder = null;
|
@@ -987,7 +997,7 @@ SC.RootResponder = SC.Object.extend(
|
|
987
997
|
makeTouchResponder is called with an event object. However, it usually triggers custom touchStart/touchCancelled
|
988
998
|
events on the views. The event object is passed so that functions such as stopPropagation may be called.
|
989
999
|
*/
|
990
|
-
makeTouchResponder: function(touch, responder, shouldStack, upViewChain) {
|
1000
|
+
makeTouchResponder: function (touch, responder, shouldStack, upViewChain) {
|
991
1001
|
|
992
1002
|
// In certain cases (SC.Gesture being one), we have to call makeTouchResponder
|
993
1003
|
// from inside makeTouchResponder so we queue it up here.
|
@@ -1013,8 +1023,8 @@ SC.RootResponder = SC.Object.extend(
|
|
1013
1023
|
// send touchStart
|
1014
1024
|
// get the target pane
|
1015
1025
|
var pane;
|
1016
|
-
if (responder) pane = responder.get('pane')
|
1017
|
-
else pane = this.get('keyPane') || this.get('mainPane')
|
1026
|
+
if (responder) pane = responder.get('pane');
|
1027
|
+
else pane = this.get('keyPane') || this.get('mainPane');
|
1018
1028
|
|
1019
1029
|
// if the responder is not already in the stack...
|
1020
1030
|
|
@@ -1023,7 +1033,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1023
1033
|
if (upViewChain) {
|
1024
1034
|
// if we found a valid pane, send the event to it
|
1025
1035
|
try {
|
1026
|
-
responder = (pane) ? pane.sendEvent("touchStart", touch, responder) : null
|
1036
|
+
responder = (pane) ? pane.sendEvent("touchStart", touch, responder) : null;
|
1027
1037
|
} catch (e) {
|
1028
1038
|
SC.Logger.error("Error in touchStart: " + e);
|
1029
1039
|
responder = null;
|
@@ -1105,15 +1115,17 @@ SC.RootResponder = SC.Object.extend(
|
|
1105
1115
|
|
1106
1116
|
If shouldStack is YES, the previous responder will be kept so that it may be returned to later.
|
1107
1117
|
*/
|
1108
|
-
captureTouch: function(touch, startingPoint, shouldStack) {
|
1118
|
+
captureTouch: function (touch, startingPoint, shouldStack) {
|
1109
1119
|
if (!startingPoint) startingPoint = this;
|
1110
1120
|
|
1111
1121
|
var target = touch.targetView, view = target,
|
1112
1122
|
chain = [], idx, len;
|
1113
1123
|
|
1124
|
+
//@if (debug)
|
1114
1125
|
if (SC.LOG_TOUCH_EVENTS) {
|
1115
1126
|
SC.Logger.info(' -- Received one touch on %@'.fmt(target.toString()));
|
1116
1127
|
}
|
1128
|
+
//@endif
|
1117
1129
|
// work up the chain until we get the root
|
1118
1130
|
while (view && (view !== startingPoint)) {
|
1119
1131
|
chain.unshift(view);
|
@@ -1123,11 +1135,15 @@ SC.RootResponder = SC.Object.extend(
|
|
1123
1135
|
// work down the chain
|
1124
1136
|
for (len = chain.length, idx = 0; idx < len; idx++) {
|
1125
1137
|
view = chain[idx];
|
1138
|
+
//@if (debug)
|
1126
1139
|
if (SC.LOG_TOUCH_EVENTS) SC.Logger.info(' -- Checking %@ for captureTouch response…'.fmt(view.toString()));
|
1140
|
+
//@endif
|
1127
1141
|
|
1128
1142
|
// see if it captured the touch
|
1129
1143
|
if (view.tryToPerform('captureTouch', touch)) {
|
1144
|
+
//@if (debug)
|
1130
1145
|
if (SC.LOG_TOUCH_EVENTS) SC.Logger.info(' -- Making %@ touch responder because it returns YES to captureTouch'.fmt(view.toString()));
|
1146
|
+
//@endif
|
1131
1147
|
|
1132
1148
|
// if so, make it the touch's responder
|
1133
1149
|
this.makeTouchResponder(touch, view, shouldStack, YES); // triggers touchStart/Cancel/etc. event.
|
@@ -1135,7 +1151,10 @@ SC.RootResponder = SC.Object.extend(
|
|
1135
1151
|
}
|
1136
1152
|
}
|
1137
1153
|
|
1154
|
+
//@if (debug)
|
1138
1155
|
if (SC.LOG_TOUCH_EVENTS) SC.Logger.info(" -- Didn't find a view that returned YES to captureTouch, so we're calling touchStart");
|
1156
|
+
//@endif
|
1157
|
+
|
1139
1158
|
// if we did not capture the touch (obviously we didn't)
|
1140
1159
|
// we need to figure out what view _will_
|
1141
1160
|
// Thankfully, makeTouchResponder does exactly that: starts at the view it is supplied and keeps calling startTouch
|
@@ -1146,7 +1165,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1146
1165
|
Artificially calls endTouch for any touch which is no longer present. This is necessary because
|
1147
1166
|
_sometimes_, WebKit ends up not sending endtouch.
|
1148
1167
|
*/
|
1149
|
-
endMissingTouches: function(presentTouches) {
|
1168
|
+
endMissingTouches: function (presentTouches) {
|
1150
1169
|
var idx, len = presentTouches.length, map = {}, end = [];
|
1151
1170
|
|
1152
1171
|
// make a map of what touches _are_ present
|
@@ -1173,7 +1192,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1173
1192
|
touchEnd, touchCancelled, etc. A re-dispatch (through recapture or makeTouchResponder) will terminate
|
1174
1193
|
the process; it would have to be restarted separately, through touch.end().
|
1175
1194
|
*/
|
1176
|
-
endTouch: function(touchEntry, action, evt) {
|
1195
|
+
endTouch: function (touchEntry, action, evt) {
|
1177
1196
|
if (!action) { action = "touchEnd"; }
|
1178
1197
|
|
1179
1198
|
var responderIdx, responders, responder, originalResponder;
|
@@ -1206,7 +1225,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1206
1225
|
@private
|
1207
1226
|
"Finishes" a touch. That is, it eradicates it from our touch entries and removes all responder, etc. properties.
|
1208
1227
|
*/
|
1209
|
-
finishTouch: function(touch) {
|
1228
|
+
finishTouch: function (touch) {
|
1210
1229
|
var elem;
|
1211
1230
|
|
1212
1231
|
// ensure the touch is indeed unassigned.
|
@@ -1248,22 +1267,22 @@ SC.RootResponder = SC.Object.extend(
|
|
1248
1267
|
@param {Event} evt the event
|
1249
1268
|
@returns {Boolean}
|
1250
1269
|
*/
|
1251
|
-
touchstart: function(evt) {
|
1270
|
+
touchstart: function (evt) {
|
1252
1271
|
// Starting iOS5 touch events are handled by textfields.
|
1253
1272
|
// As a workaround just let the browser to use the default behavior.
|
1254
|
-
if(this.ignoreTouchHandle(evt)) return YES;
|
1273
|
+
if (this.ignoreTouchHandle(evt)) return YES;
|
1255
1274
|
|
1256
1275
|
|
1257
1276
|
var hidingTouchIntercept = NO;
|
1258
1277
|
|
1259
|
-
SC.run(function() {
|
1278
|
+
SC.run(function () {
|
1260
1279
|
// sometimes WebKit is a bit... iffy:
|
1261
1280
|
this.endMissingTouches(evt.touches);
|
1262
1281
|
|
1263
1282
|
// as you were...
|
1264
1283
|
// loop through changed touches, calling touchStart, etc.
|
1265
1284
|
var idx, touches = evt.changedTouches, len = touches.length,
|
1266
|
-
|
1285
|
+
touch, touchEntry;
|
1267
1286
|
|
1268
1287
|
// prepare event for touch mapping.
|
1269
1288
|
evt.touchContext = this;
|
@@ -1316,16 +1335,16 @@ SC.RootResponder = SC.Object.extend(
|
|
1316
1335
|
@private
|
1317
1336
|
used to keep track of when a specific type of touch event was last handled, to see if it needs to be re-handled
|
1318
1337
|
*/
|
1319
|
-
touchmove: function(evt) {
|
1338
|
+
touchmove: function (evt) {
|
1320
1339
|
// Starting iOS5 touch events are handled by textfields.
|
1321
1340
|
// As a workaround just let the browser to use the default behavior.
|
1322
|
-
if(this.ignoreTouchHandle(evt)) return YES;
|
1341
|
+
if (this.ignoreTouchHandle(evt)) return YES;
|
1323
1342
|
|
1324
|
-
SC.run(function() {
|
1343
|
+
SC.run(function () {
|
1325
1344
|
// pretty much all we gotta do is update touches, and figure out which views need updating.
|
1326
1345
|
var touches = evt.changedTouches, touch, touchEntry,
|
1327
1346
|
idx, len = touches.length, view, changedTouches, viewTouches, firstTouch,
|
1328
|
-
changedViews = {},
|
1347
|
+
changedViews = {}, guid, hidingTouchIntercept = NO;
|
1329
1348
|
|
1330
1349
|
if (this._drag) {
|
1331
1350
|
touch = SC.Touch.create(evt.changedTouches[0], this);
|
@@ -1412,19 +1431,17 @@ SC.RootResponder = SC.Object.extend(
|
|
1412
1431
|
return evt.hasCustomEventHandling;
|
1413
1432
|
},
|
1414
1433
|
|
1415
|
-
touchend: function(evt) {
|
1434
|
+
touchend: function (evt) {
|
1416
1435
|
var hidesTouchIntercept = NO;
|
1417
1436
|
|
1418
1437
|
// Starting iOS5 touch events are handled by textfields.
|
1419
1438
|
// As a workaround just let the browser to use the default behavior.
|
1420
|
-
if(this.ignoreTouchHandle(evt)) return YES;
|
1439
|
+
if (this.ignoreTouchHandle(evt)) return YES;
|
1421
1440
|
|
1422
|
-
SC.run(function() {
|
1441
|
+
SC.run(function () {
|
1423
1442
|
var touches = evt.changedTouches, touch, touchEntry,
|
1424
1443
|
idx, len = touches.length,
|
1425
|
-
|
1426
|
-
action = evt.isCancel ? "touchCancelled" : "touchEnd", a,
|
1427
|
-
responderIdx, responders, responder;
|
1444
|
+
action = evt.isCancel ? "touchCancelled" : "touchEnd";
|
1428
1445
|
|
1429
1446
|
for (idx = 0; idx < len; idx++) {
|
1430
1447
|
//get touch+entry
|
@@ -1446,15 +1463,17 @@ SC.RootResponder = SC.Object.extend(
|
|
1446
1463
|
touchEntry.type = 'touchend';
|
1447
1464
|
touchEntry.event = evt;
|
1448
1465
|
|
1466
|
+
//@if (debug)
|
1449
1467
|
if (SC.LOG_TOUCH_EVENTS) SC.Logger.info('-- Received touch end');
|
1468
|
+
//@endif
|
1450
1469
|
if (touchEntry.hidesTouchIntercept) {
|
1451
1470
|
touchEntry.unhideTouchIntercept();
|
1452
1471
|
hidesTouchIntercept = YES;
|
1453
1472
|
}
|
1454
1473
|
|
1455
1474
|
if (this._drag) {
|
1456
|
-
this._drag.tryToPerform('mouseUp', touch)
|
1457
|
-
this._drag = null
|
1475
|
+
this._drag.tryToPerform('mouseUp', touch);
|
1476
|
+
this._drag = null;
|
1458
1477
|
}
|
1459
1478
|
|
1460
1479
|
// unassign
|
@@ -1476,7 +1495,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1476
1495
|
Handle touch cancel event. Works just like cancelling a touch for any other reason.
|
1477
1496
|
touchend handles it as a special case (sending cancel instead of end if needed).
|
1478
1497
|
*/
|
1479
|
-
touchcancel: function(evt) {
|
1498
|
+
touchcancel: function (evt) {
|
1480
1499
|
evt.isCancel = YES;
|
1481
1500
|
this.touchend(evt);
|
1482
1501
|
},
|
@@ -1485,10 +1504,10 @@ SC.RootResponder = SC.Object.extend(
|
|
1485
1504
|
Ignore Touch events on textfields and links. starting iOS 5 textfields
|
1486
1505
|
get touch events. Textfields just need to get the default focus action.
|
1487
1506
|
*/
|
1488
|
-
ignoreTouchHandle: function(evt) {
|
1489
|
-
if(SC.browser.isMobileSafari){
|
1507
|
+
ignoreTouchHandle: function (evt) {
|
1508
|
+
if (SC.browser.isMobileSafari) {
|
1490
1509
|
var tag = evt.target.tagName;
|
1491
|
-
if(tag==="INPUT" || tag==="TEXTAREA" || tag==="A" || tag==="SELECT"){
|
1510
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "A" || tag === "SELECT") {
|
1492
1511
|
evt.allowDefault();
|
1493
1512
|
return YES;
|
1494
1513
|
}
|
@@ -1509,8 +1528,8 @@ SC.RootResponder = SC.Object.extend(
|
|
1509
1528
|
|
1510
1529
|
@returns {Object} Object that handled evet or null
|
1511
1530
|
*/
|
1512
|
-
attemptKeyEquivalent: function(evt) {
|
1513
|
-
var ret = null
|
1531
|
+
attemptKeyEquivalent: function (evt) {
|
1532
|
+
var ret = null;
|
1514
1533
|
|
1515
1534
|
// keystring is a method name representing the keys pressed (i.e
|
1516
1535
|
// 'alt_shift_escape')
|
@@ -1524,24 +1543,24 @@ SC.RootResponder = SC.Object.extend(
|
|
1524
1543
|
mainPane = this.get('mainPane');
|
1525
1544
|
|
1526
1545
|
if (menuPane) {
|
1527
|
-
ret = menuPane.performKeyEquivalent(keystring, evt)
|
1546
|
+
ret = menuPane.performKeyEquivalent(keystring, evt);
|
1528
1547
|
if (ret) return ret;
|
1529
1548
|
}
|
1530
1549
|
|
1531
1550
|
// Try the keyPane. If it's modal, then try the equivalent there but on
|
1532
1551
|
// nobody else.
|
1533
1552
|
if (keyPane) {
|
1534
|
-
ret = keyPane.performKeyEquivalent(keystring, evt)
|
1535
|
-
if (ret || keyPane.get('isModal')) return ret
|
1553
|
+
ret = keyPane.performKeyEquivalent(keystring, evt);
|
1554
|
+
if (ret || keyPane.get('isModal')) return ret;
|
1536
1555
|
}
|
1537
1556
|
|
1538
1557
|
// if not, then try the main pane
|
1539
|
-
if (!ret && mainPane && (mainPane!==keyPane)) {
|
1558
|
+
if (!ret && mainPane && (mainPane !== keyPane)) {
|
1540
1559
|
ret = mainPane.performKeyEquivalent(keystring, evt);
|
1541
|
-
if (ret || mainPane.get('isModal')) return ret
|
1560
|
+
if (ret || mainPane.get('isModal')) return ret;
|
1542
1561
|
}
|
1543
1562
|
|
1544
|
-
return ret
|
1563
|
+
return ret;
|
1545
1564
|
},
|
1546
1565
|
|
1547
1566
|
_lastModifiers: null,
|
@@ -1551,18 +1570,29 @@ SC.RootResponder = SC.Object.extend(
|
|
1551
1570
|
We turn this into a flagsChanged keyboard event. Normally this does not
|
1552
1571
|
stop the normal browser behavior.
|
1553
1572
|
*/
|
1554
|
-
_handleModifierChanges: function(evt) {
|
1573
|
+
_handleModifierChanges: function (evt) {
|
1555
1574
|
// if the modifier keys have changed, then notify the first responder.
|
1556
1575
|
var m;
|
1557
1576
|
m = this._lastModifiers = (this._lastModifiers || { alt: false, ctrl: false, shift: false });
|
1558
1577
|
|
1559
1578
|
var changed = false;
|
1560
|
-
if (evt.altKey !== m.alt) {
|
1561
|
-
|
1562
|
-
|
1579
|
+
if (evt.altKey !== m.alt) {
|
1580
|
+
m.alt = evt.altKey;
|
1581
|
+
changed = true;
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
if (evt.ctrlKey !== m.ctrl) {
|
1585
|
+
m.ctrl = evt.ctrlKey;
|
1586
|
+
changed = true;
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
if (evt.shiftKey !== m.shift) {
|
1590
|
+
m.shift = evt.shiftKey;
|
1591
|
+
changed = true;
|
1592
|
+
}
|
1563
1593
|
evt.modifiers = m; // save on event
|
1564
1594
|
|
1565
|
-
return (changed) ? (this.sendEvent('flagsChanged', evt) ? evt.hasCustomEventHandling : YES) : YES
|
1595
|
+
return (changed) ? (this.sendEvent('flagsChanged', evt) ? evt.hasCustomEventHandling : YES) : YES;
|
1566
1596
|
},
|
1567
1597
|
|
1568
1598
|
/** @private
|
@@ -1570,7 +1600,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1570
1600
|
kinds of events are processed as keyboard shortcuts. If no shortcut
|
1571
1601
|
handles the event, then it will be sent as a regular keyDown event.
|
1572
1602
|
*/
|
1573
|
-
_isFunctionOrNonPrintableKey: function(evt) {
|
1603
|
+
_isFunctionOrNonPrintableKey: function (evt) {
|
1574
1604
|
return !!(evt.altKey || evt.ctrlKey || evt.metaKey || ((evt.charCode !== evt.which) && SC.FUNCTION_KEYS[evt.which]));
|
1575
1605
|
},
|
1576
1606
|
|
@@ -1578,7 +1608,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1578
1608
|
Determines if the event simply reflects a modifier key change. These
|
1579
1609
|
events may generate a flagsChanged event, but are otherwise ignored.
|
1580
1610
|
*/
|
1581
|
-
_isModifierKey: function(evt) {
|
1611
|
+
_isModifierKey: function (evt) {
|
1582
1612
|
return !!SC.MODIFIER_KEYS[evt.charCode];
|
1583
1613
|
},
|
1584
1614
|
|
@@ -1595,16 +1625,16 @@ SC.RootResponder = SC.Object.extend(
|
|
1595
1625
|
https://developer.mozilla.org/en/DOM/KeyboardEvent
|
1596
1626
|
http://msdn.microsoft.com/library/ff974342.aspx
|
1597
1627
|
*/
|
1598
|
-
keydown: function(evt) {
|
1628
|
+
keydown: function (evt) {
|
1599
1629
|
if (SC.none(evt)) return YES;
|
1600
1630
|
var keyCode = evt.keyCode;
|
1601
|
-
if(SC.browser.isMozilla && evt.keyCode===9){
|
1602
|
-
this.keydownCounter=1;
|
1631
|
+
if (SC.browser.isMozilla && evt.keyCode === 9) {
|
1632
|
+
this.keydownCounter = 1;
|
1603
1633
|
}
|
1604
1634
|
// Fix for IME input (japanese, mandarin).
|
1605
1635
|
// If the KeyCode is 229 wait for the keyup and
|
1606
1636
|
// trigger a keyDown if it is is enter onKeyup.
|
1607
|
-
if (keyCode===229){
|
1637
|
+
if (keyCode === 229) {
|
1608
1638
|
this._IMEInputON = YES;
|
1609
1639
|
return this.sendEvent('keyDown', evt);
|
1610
1640
|
}
|
@@ -1619,7 +1649,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1619
1649
|
}
|
1620
1650
|
|
1621
1651
|
// Firefox does NOT handle delete here...
|
1622
|
-
if (SC.browser.isMozilla && (evt.which === 8)) return true
|
1652
|
+
if (SC.browser.isMozilla && (evt.which === 8)) return true;
|
1623
1653
|
|
1624
1654
|
// modifier keys are handled separately by the 'flagsChanged' event
|
1625
1655
|
// send event for modifier key changes, but only stop processing if this
|
@@ -1633,28 +1663,30 @@ SC.RootResponder = SC.Object.extend(
|
|
1633
1663
|
// if this is a function or non-printable key, try to use this as a key
|
1634
1664
|
// equivalent. Otherwise, send as a keyDown event so that the focused
|
1635
1665
|
// responder can do something useful with the event.
|
1636
|
-
ret = YES
|
1666
|
+
ret = YES;
|
1637
1667
|
if (this._isFunctionOrNonPrintableKey(evt)) {
|
1638
1668
|
// otherwise, send as keyDown event. If no one was interested in this
|
1639
1669
|
// keyDown event (probably the case), just let the browser do its own
|
1640
1670
|
// processing.
|
1641
1671
|
|
1642
1672
|
// Arrow keys are handled in keypress for firefox
|
1643
|
-
if (keyCode>=37 && keyCode<=40 && SC.browser.isMozilla) return YES;
|
1673
|
+
if (keyCode >= 37 && keyCode <= 40 && SC.browser.isMozilla) return YES;
|
1644
1674
|
|
1645
1675
|
|
1646
|
-
ret = this.sendEvent('keyDown', evt)
|
1676
|
+
ret = this.sendEvent('keyDown', evt);
|
1647
1677
|
|
1648
1678
|
// attempt key equivalent if key not handled
|
1649
1679
|
if (!ret) {
|
1650
|
-
|
1680
|
+
SC.run(function () {
|
1681
|
+
ret = !this.attemptKeyEquivalent(evt);
|
1682
|
+
}, this);
|
1651
1683
|
} else {
|
1652
|
-
ret = evt.hasCustomEventHandling
|
1653
|
-
if (ret) forceBlock = NO
|
1684
|
+
ret = evt.hasCustomEventHandling;
|
1685
|
+
if (ret) forceBlock = NO; // code asked explicitly to let delete go
|
1654
1686
|
}
|
1655
1687
|
}
|
1656
1688
|
|
1657
|
-
return forceBlock ? NO : ret
|
1689
|
+
return forceBlock ? NO : ret;
|
1658
1690
|
},
|
1659
1691
|
|
1660
1692
|
/** @private
|
@@ -1665,39 +1697,41 @@ SC.RootResponder = SC.Object.extend(
|
|
1665
1697
|
Normally ignore any function or non-printable key events. Otherwise, just
|
1666
1698
|
trigger a keyDown.
|
1667
1699
|
*/
|
1668
|
-
keypress: function(evt) {
|
1700
|
+
keypress: function (evt) {
|
1669
1701
|
var ret,
|
1670
1702
|
keyCode = evt.keyCode,
|
1671
1703
|
isFirefox = SC.browser.isMozilla;
|
1672
1704
|
|
1673
|
-
if(isFirefox && evt.keyCode===9){
|
1705
|
+
if (isFirefox && evt.keyCode === 9) {
|
1674
1706
|
this.keydownCounter++;
|
1675
|
-
if(this.keydownCounter==2) return YES;
|
1707
|
+
if (this.keydownCounter == 2) return YES;
|
1676
1708
|
}
|
1677
1709
|
// delete is handled in keydown() for most browsers
|
1678
1710
|
if (isFirefox && (evt.which === 8)) {
|
1679
1711
|
//get the keycode and set it for which.
|
1680
1712
|
evt.which = keyCode;
|
1681
1713
|
ret = this.sendEvent('keyDown', evt);
|
1682
|
-
return ret ? (SC.allowsBackspaceToPreviousPage || evt.hasCustomEventHandling) : YES
|
1714
|
+
return ret ? (SC.allowsBackspaceToPreviousPage || evt.hasCustomEventHandling) : YES;
|
1683
1715
|
|
1684
1716
|
// normal processing. send keyDown for printable keys...
|
1685
1717
|
//there is a special case for arrow key repeating of events in FF.
|
1686
1718
|
} else {
|
1687
1719
|
var isFirefoxArrowKeys = (keyCode >= 37 && keyCode <= 40 && isFirefox),
|
1688
|
-
charCode
|
1689
|
-
|
1720
|
+
charCode = evt.charCode;
|
1721
|
+
|
1722
|
+
if ((charCode !== undefined && charCode === 0 && evt.keyCode !== 9) && !isFirefoxArrowKeys) return YES;
|
1690
1723
|
if (isFirefoxArrowKeys) evt.which = keyCode;
|
1691
1724
|
|
1692
1725
|
// we only want to rethrow if this is a printable key so that we don't
|
1693
1726
|
// duplicate the event sent in keydown when a modifier key is pressed
|
1694
|
-
if(isFirefoxArrowKeys || !this._isFunctionOrNonPrintableKey(evt)) return this.sendEvent('keyDown', evt) ? evt.hasCustomEventHandling:YES;
|
1727
|
+
if (isFirefoxArrowKeys || !this._isFunctionOrNonPrintableKey(evt)) return this.sendEvent('keyDown', evt) ? evt.hasCustomEventHandling:YES;
|
1695
1728
|
}
|
1696
1729
|
},
|
1697
1730
|
|
1698
|
-
keyup: function(evt) {
|
1731
|
+
keyup: function (evt) {
|
1699
1732
|
// to end the simulation of keypress in firefox set the _ffevt to null
|
1700
|
-
if(this._ffevt) this._ffevt=null;
|
1733
|
+
if (this._ffevt) this._ffevt = null;
|
1734
|
+
|
1701
1735
|
// modifier keys are handled separately by the 'flagsChanged' event
|
1702
1736
|
// send event for modifier key changes, but only stop processing if this is only a modifier change
|
1703
1737
|
var ret = this._handleModifierChanges(evt);
|
@@ -1705,7 +1739,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1705
1739
|
// Fix for IME input (japanese, mandarin).
|
1706
1740
|
// If the KeyCode is 229 wait for the keyup and
|
1707
1741
|
// trigger a keyDown if it is is enter onKeyup.
|
1708
|
-
if (this._IMEInputON && evt.keyCode===13){
|
1742
|
+
if (this._IMEInputON && evt.keyCode === 13) {
|
1709
1743
|
evt.isIMEInput = YES;
|
1710
1744
|
this.sendEvent('keyDown', evt);
|
1711
1745
|
this._IMEInputON = NO;
|
@@ -1722,9 +1756,9 @@ SC.RootResponder = SC.Object.extend(
|
|
1722
1756
|
want to avoid this. Think of an autocomplete menu, you want to click on
|
1723
1757
|
the menu but don't loose focus.
|
1724
1758
|
*/
|
1725
|
-
beforedeactivate: function(evt) {
|
1759
|
+
beforedeactivate: function (evt) {
|
1726
1760
|
var toElement = evt.toElement;
|
1727
|
-
if (toElement && toElement.tagName && toElement.tagName!=="IFRAME") {
|
1761
|
+
if (toElement && toElement.tagName && toElement.tagName !== "IFRAME") {
|
1728
1762
|
var view = SC.$(toElement).view()[0];
|
1729
1763
|
//The following line is necessary to allow/block text selection for IE,
|
1730
1764
|
// in combination with the selectstart event.
|
@@ -1737,9 +1771,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1737
1771
|
// MOUSE HANDLING
|
1738
1772
|
//
|
1739
1773
|
|
1740
|
-
mousedown: function(evt) {
|
1741
|
-
var fr;
|
1742
|
-
|
1774
|
+
mousedown: function (evt) {
|
1743
1775
|
if (SC.platform.touch) {
|
1744
1776
|
evt.allowDefault();
|
1745
1777
|
this._lastMouseDownCustomHandling = YES;
|
@@ -1749,37 +1781,25 @@ SC.RootResponder = SC.Object.extend(
|
|
1749
1781
|
// First, save the click count. The click count resets if the mouse down
|
1750
1782
|
// event occurs more than 250 ms later than the mouse up event or more
|
1751
1783
|
// than 8 pixels away from the mouse down event.
|
1752
|
-
this._clickCount += 1
|
1753
|
-
if (!this._lastMouseUpAt || ((Date.now()-this._lastMouseUpAt) > 250)) {
|
1754
|
-
this._clickCount = 1
|
1784
|
+
this._clickCount += 1;
|
1785
|
+
if (!this._lastMouseUpAt || ((Date.now() - this._lastMouseUpAt) > 250)) {
|
1786
|
+
this._clickCount = 1;
|
1755
1787
|
} else {
|
1756
1788
|
var deltaX = this._lastMouseDownX - evt.clientX,
|
1757
1789
|
deltaY = this._lastMouseDownY - evt.clientY,
|
1758
|
-
distance = Math.sqrt(deltaX*deltaX + deltaY*deltaY)
|
1759
|
-
|
1790
|
+
distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
1791
|
+
|
1792
|
+
if (distance > 8.0) this._clickCount = 1;
|
1760
1793
|
}
|
1761
|
-
evt.clickCount = this._clickCount
|
1794
|
+
evt.clickCount = this._clickCount;
|
1762
1795
|
|
1763
|
-
this._lastMouseDownX = evt.clientX
|
1764
|
-
this._lastMouseDownY = evt.clientY
|
1796
|
+
this._lastMouseDownX = evt.clientX;
|
1797
|
+
this._lastMouseDownY = evt.clientY;
|
1765
1798
|
|
1766
1799
|
var view = this.targetViewForEvent(evt);
|
1767
1800
|
|
1768
|
-
|
1769
|
-
|
1770
|
-
// focus unless you click on a list, another textfield or an special
|
1771
|
-
// view/control.
|
1772
|
-
|
1773
|
-
if(view) fr=view.getPath('pane.firstResponder');
|
1774
|
-
|
1775
|
-
// some fields like SC.InlineTextFieldView need to blur on any click, even
|
1776
|
-
// if it's not on a control that can be focused
|
1777
|
-
// TODO: remove this when focus behavior is improved
|
1778
|
-
if(fr && fr.get('blurOnMouseDown') && fr!==view){
|
1779
|
-
fr.resignFirstResponder(evt);
|
1780
|
-
}
|
1781
|
-
view = this._mouseDownView = this.sendEvent('mouseDown', evt, view) ;
|
1782
|
-
if (view && view.respondsTo('mouseDragged')) this._mouseCanDrag = YES ;
|
1801
|
+
view = this._mouseDownView = this.sendEvent('mouseDown', evt, view);
|
1802
|
+
if (view && view.respondsTo('mouseDragged')) this._mouseCanDrag = YES;
|
1783
1803
|
|
1784
1804
|
// Determine if any views took responsibility for the
|
1785
1805
|
// event. If so, save that information so we can prevent
|
@@ -1797,63 +1817,69 @@ SC.RootResponder = SC.Object.extend(
|
|
1797
1817
|
implemented, then no mouseUp event will be sent, but a click will be
|
1798
1818
|
sent.
|
1799
1819
|
*/
|
1800
|
-
mouseup: function(evt) {
|
1801
|
-
var clickOrDoubleClickDidTrigger=NO
|
1820
|
+
mouseup: function (evt) {
|
1821
|
+
var clickOrDoubleClickDidTrigger = NO,
|
1822
|
+
dragView = this._drag,
|
1823
|
+
handler = null;
|
1824
|
+
|
1802
1825
|
if (SC.platform.touch) {
|
1803
1826
|
evt.allowDefault();
|
1804
1827
|
this._lastMouseUpCustomHandling = YES;
|
1805
1828
|
return YES;
|
1806
1829
|
}
|
1807
1830
|
|
1808
|
-
if (
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1831
|
+
if (dragView) {
|
1832
|
+
SC.run(function () {
|
1833
|
+
dragView.tryToPerform('mouseUp', evt);
|
1834
|
+
});
|
1835
|
+
} else {
|
1812
1836
|
|
1813
|
-
|
1837
|
+
var view = this._mouseDownView,
|
1814
1838
|
targetView = this.targetViewForEvent(evt);
|
1815
1839
|
|
1816
|
-
|
1817
|
-
|
1840
|
+
// record click count.
|
1841
|
+
evt.clickCount = this._clickCount;
|
1818
1842
|
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1843
|
+
// attempt the mouseup call only if there's a target.
|
1844
|
+
// don't want a mouseup going to anyone unless they handled the mousedown...
|
1845
|
+
if (view) {
|
1846
|
+
handler = this.sendEvent('mouseUp', evt, view);
|
1823
1847
|
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1848
|
+
// try doubleClick
|
1849
|
+
if (!handler && (this._clickCount === 2)) {
|
1850
|
+
handler = this.sendEvent('doubleClick', evt, view);
|
1851
|
+
clickOrDoubleClickDidTrigger = YES;
|
1852
|
+
}
|
1829
1853
|
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1854
|
+
// try single click
|
1855
|
+
if (!handler) {
|
1856
|
+
handler = this.sendEvent('click', evt, view);
|
1857
|
+
clickOrDoubleClickDidTrigger = YES;
|
1858
|
+
}
|
1834
1859
|
}
|
1835
|
-
}
|
1836
1860
|
|
1837
|
-
|
1838
|
-
|
1861
|
+
// try whoever's under the mouse if we haven't handle the mouse up yet
|
1862
|
+
if (!handler && !clickOrDoubleClickDidTrigger) {
|
1839
1863
|
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1864
|
+
// try doubleClick
|
1865
|
+
if (this._clickCount === 2) {
|
1866
|
+
handler = this.sendEvent('doubleClick', evt, targetView);
|
1867
|
+
}
|
1844
1868
|
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1869
|
+
// try singleClick
|
1870
|
+
if (!handler) {
|
1871
|
+
handler = this.sendEvent('click', evt, targetView);
|
1872
|
+
}
|
1848
1873
|
}
|
1849
1874
|
}
|
1850
1875
|
|
1851
1876
|
// cleanup
|
1852
|
-
this._mouseCanDrag = NO;
|
1877
|
+
this._mouseCanDrag = NO;
|
1878
|
+
this._mouseDownView = this._drag = null;
|
1853
1879
|
|
1854
1880
|
// Save timestamp of mouseup at last possible moment.
|
1855
1881
|
// (This is used to calculate double click events)
|
1856
|
-
this._lastMouseUpAt = Date.now()
|
1882
|
+
this._lastMouseUpAt = Date.now();
|
1857
1883
|
|
1858
1884
|
// Determine if any views took responsibility for the
|
1859
1885
|
// event. If so, save that information so we can prevent
|
@@ -1874,7 +1900,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1874
1900
|
@param {Event} evt the click event
|
1875
1901
|
@returns {Boolean} whether the event should be propagated to the browser
|
1876
1902
|
*/
|
1877
|
-
click: function(evt) {
|
1903
|
+
click: function (evt) {
|
1878
1904
|
if (!this._lastMouseUpCustomHandling || !this._lastMouseDownCustomHandling) {
|
1879
1905
|
evt.preventDefault();
|
1880
1906
|
evt.stopPropagation();
|
@@ -1884,7 +1910,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1884
1910
|
return YES;
|
1885
1911
|
},
|
1886
1912
|
|
1887
|
-
dblclick: function(evt){
|
1913
|
+
dblclick: function (evt) {
|
1888
1914
|
if (SC.browser.isIE8OrLower) {
|
1889
1915
|
this._clickCount = 2;
|
1890
1916
|
// this._onmouseup(evt);
|
@@ -1892,11 +1918,11 @@ SC.RootResponder = SC.Object.extend(
|
|
1892
1918
|
}
|
1893
1919
|
},
|
1894
1920
|
|
1895
|
-
mousewheel: function(evt) {
|
1896
|
-
var view = this.targetViewForEvent(evt)
|
1897
|
-
|
1921
|
+
mousewheel: function (evt) {
|
1922
|
+
var view = this.targetViewForEvent(evt),
|
1923
|
+
handler = this.sendEvent('mouseWheel', evt, view);
|
1898
1924
|
|
1899
|
-
return (handler) ? evt.hasCustomEventHandling : YES
|
1925
|
+
return (handler) ? evt.hasCustomEventHandling : YES;
|
1900
1926
|
},
|
1901
1927
|
|
1902
1928
|
_lastHovered: null,
|
@@ -1910,7 +1936,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1910
1936
|
If there is a target mouseDown view, then mouse moved events will also
|
1911
1937
|
trigger calls to mouseDragged.
|
1912
1938
|
*/
|
1913
|
-
mousemove: function(evt) {
|
1939
|
+
mousemove: function (evt) {
|
1914
1940
|
if (SC.platform.touch) {
|
1915
1941
|
evt.allowDefault();
|
1916
1942
|
return YES;
|
@@ -1925,71 +1951,67 @@ SC.RootResponder = SC.Object.extend(
|
|
1925
1951
|
this._lastMoveX = evt.clientX;
|
1926
1952
|
this._lastMoveY = evt.clientY;
|
1927
1953
|
|
1928
|
-
SC.run(function() {
|
1954
|
+
SC.run(function () {
|
1955
|
+
var dragView = this._drag;
|
1956
|
+
|
1929
1957
|
// make sure the view gets focus no matter what. FF is inconsistent
|
1930
1958
|
// about this.
|
1931
1959
|
// this.focus();
|
1932
1960
|
// only do mouse[Moved|Entered|Exited|Dragged] if not in a drag session
|
1933
1961
|
// drags send their own events, e.g. drag[Moved|Entered|Exited]
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
}
|
1988
|
-
else {
|
1989
|
-
this._mouseDownView.tryToPerform('mouseDragged', evt);
|
1990
|
-
}
|
1991
|
-
}
|
1992
|
-
}
|
1962
|
+
if (dragView) {
|
1963
|
+
//IE triggers mousemove at the same time as mousedown
|
1964
|
+
if (SC.browser.isIE) {
|
1965
|
+
if (this._lastMouseDownX !== evt.clientX || this._lastMouseDownY !== evt.clientY) {
|
1966
|
+
dragView.tryToPerform('mouseDragged', evt);
|
1967
|
+
}
|
1968
|
+
} else {
|
1969
|
+
dragView.tryToPerform('mouseDragged', evt);
|
1970
|
+
}
|
1971
|
+
} else {
|
1972
|
+
var lh = this._lastHovered || [], nh = [], loc, len,
|
1973
|
+
view = this.targetViewForEvent(evt);
|
1974
|
+
|
1975
|
+
// first collect all the responding view starting with the
|
1976
|
+
// target view from the given mouse move event
|
1977
|
+
while (view && (view !== this)) {
|
1978
|
+
nh.push(view);
|
1979
|
+
view = view.get('nextResponder');
|
1980
|
+
}
|
1981
|
+
// next exit views that are no longer part of the
|
1982
|
+
// responding chain
|
1983
|
+
for (loc = 0, len = lh.length; loc < len; loc++) {
|
1984
|
+
view = lh[loc];
|
1985
|
+
if (nh.indexOf(view) === -1) {
|
1986
|
+
view.tryToPerform('mouseExited', evt);
|
1987
|
+
}
|
1988
|
+
}
|
1989
|
+
// finally, either perform mouse moved or mouse entered depending on
|
1990
|
+
// whether a responding view was or was not part of the last
|
1991
|
+
// hovered views
|
1992
|
+
for (loc = 0, len = nh.length; loc < len; loc++) {
|
1993
|
+
view = nh[loc];
|
1994
|
+
if (lh.indexOf(view) !== -1) {
|
1995
|
+
view.tryToPerform('mouseMoved', evt);
|
1996
|
+
} else {
|
1997
|
+
view.tryToPerform('mouseEntered', evt);
|
1998
|
+
}
|
1999
|
+
}
|
2000
|
+
// Keep track of the view that were last hovered
|
2001
|
+
this._lastHovered = nh;
|
2002
|
+
// also, if a mouseDownView exists, call the mouseDragged action, if
|
2003
|
+
// it exists.
|
2004
|
+
if (this._mouseDownView) {
|
2005
|
+
if (SC.browser.isIE) {
|
2006
|
+
if (this._lastMouseDownX !== evt.clientX && this._lastMouseDownY !== evt.clientY) {
|
2007
|
+
this._mouseDownView.tryToPerform('mouseDragged', evt);
|
2008
|
+
}
|
2009
|
+
}
|
2010
|
+
else {
|
2011
|
+
this._mouseDownView.tryToPerform('mouseDragged', evt);
|
2012
|
+
}
|
2013
|
+
}
|
2014
|
+
}
|
1993
2015
|
}, this);
|
1994
2016
|
},
|
1995
2017
|
|
@@ -2000,24 +2022,24 @@ SC.RootResponder = SC.Object.extend(
|
|
2000
2022
|
|
2001
2023
|
_mouseCanDrag: YES,
|
2002
2024
|
|
2003
|
-
selectstart: function(evt) {
|
2025
|
+
selectstart: function (evt) {
|
2004
2026
|
var targetView = this.targetViewForEvent(evt),
|
2005
2027
|
result = this.sendEvent('selectStart', evt, targetView);
|
2006
2028
|
|
2007
2029
|
// If the target view implements mouseDragged, then we want to ignore the
|
2008
2030
|
// 'selectstart' event.
|
2009
2031
|
if (targetView && targetView.respondsTo('mouseDragged')) {
|
2010
|
-
return (result !==null ? YES: NO) && !this._mouseCanDrag;
|
2011
|
-
}
|
2012
|
-
|
2013
|
-
return (result !==null ? YES: NO);
|
2032
|
+
return (result !== null ? YES : NO) && !this._mouseCanDrag;
|
2033
|
+
} else {
|
2034
|
+
return (result !== null ? YES : NO);
|
2014
2035
|
}
|
2015
2036
|
},
|
2016
2037
|
|
2017
|
-
drag: function() { return false; },
|
2038
|
+
drag: function () { return false; },
|
2018
2039
|
|
2019
|
-
contextmenu: function(evt) {
|
2020
|
-
var view = this.targetViewForEvent(evt)
|
2040
|
+
contextmenu: function (evt) {
|
2041
|
+
var view = this.targetViewForEvent(evt),
|
2042
|
+
ret;
|
2021
2043
|
|
2022
2044
|
// Determine if any views took responsibility for the event.
|
2023
2045
|
view = this.sendEvent('contextMenu', evt, view);
|
@@ -2029,48 +2051,52 @@ SC.RootResponder = SC.Object.extend(
|
|
2029
2051
|
// ..........................................................
|
2030
2052
|
// ANIMATION HANDLING
|
2031
2053
|
//
|
2032
|
-
|
2054
|
+
animationstart: function (evt) {
|
2055
|
+
var view;
|
2033
2056
|
try {
|
2034
|
-
|
2035
|
-
this.sendEvent('animationDidStart', evt, view)
|
2057
|
+
view = this.targetViewForEvent(evt);
|
2058
|
+
this.sendEvent('animationDidStart', evt, view);
|
2036
2059
|
} catch (e) {
|
2037
|
-
SC.Logger.warn('Exception during animationDidStart: %@'.fmt(e))
|
2060
|
+
SC.Logger.warn('Exception during animationDidStart: %@'.fmt(e));
|
2038
2061
|
throw e;
|
2039
2062
|
}
|
2040
2063
|
|
2041
2064
|
return view ? evt.hasCustomEventHandling : YES;
|
2042
2065
|
},
|
2043
2066
|
|
2044
|
-
|
2067
|
+
animationiteration: function (evt) {
|
2068
|
+
var view;
|
2045
2069
|
try {
|
2046
|
-
|
2047
|
-
this.sendEvent('animationDidIterate', evt, view)
|
2070
|
+
view = this.targetViewForEvent(evt);
|
2071
|
+
this.sendEvent('animationDidIterate', evt, view);
|
2048
2072
|
} catch (e) {
|
2049
|
-
SC.Logger.warn('Exception during animationDidIterate: %@'.fmt(e))
|
2073
|
+
SC.Logger.warn('Exception during animationDidIterate: %@'.fmt(e));
|
2050
2074
|
throw e;
|
2051
2075
|
}
|
2052
2076
|
|
2053
2077
|
return view ? evt.hasCustomEventHandling : YES;
|
2054
2078
|
},
|
2055
2079
|
|
2056
|
-
|
2080
|
+
animationend: function (evt) {
|
2081
|
+
var view;
|
2057
2082
|
try {
|
2058
|
-
|
2059
|
-
this.sendEvent('animationDidEnd', evt, view)
|
2083
|
+
view = this.targetViewForEvent(evt);
|
2084
|
+
this.sendEvent('animationDidEnd', evt, view);
|
2060
2085
|
} catch (e) {
|
2061
|
-
SC.Logger.warn('Exception during animationDidEnd: %@'.fmt(e))
|
2086
|
+
SC.Logger.warn('Exception during animationDidEnd: %@'.fmt(e));
|
2062
2087
|
throw e;
|
2063
2088
|
}
|
2064
2089
|
|
2065
2090
|
return view ? evt.hasCustomEventHandling : YES;
|
2066
2091
|
},
|
2067
2092
|
|
2068
|
-
|
2093
|
+
transitionend: function (evt) {
|
2094
|
+
var view;
|
2069
2095
|
try {
|
2070
|
-
|
2071
|
-
this.sendEvent('transitionDidEnd', evt, view)
|
2096
|
+
view = this.targetViewForEvent(evt);
|
2097
|
+
this.sendEvent('transitionDidEnd', evt, view);
|
2072
2098
|
} catch (e) {
|
2073
|
-
SC.Logger.warn('Exception during transitionDidEnd: %@'.fmt(e))
|
2099
|
+
SC.Logger.warn('Exception during transitionDidEnd: %@'.fmt(e));
|
2074
2100
|
throw e;
|
2075
2101
|
}
|
2076
2102
|
|
@@ -2085,7 +2111,7 @@ SC.RootResponder = SC.Object.extend(
|
|
2085
2111
|
|
2086
2112
|
Views receive touchStart and touchEnd.
|
2087
2113
|
*/
|
2088
|
-
SC.Touch = function(touch, touchContext) {
|
2114
|
+
SC.Touch = function (touch, touchContext) {
|
2089
2115
|
// get the raw target view (we'll refine later)
|
2090
2116
|
this.touchContext = touchContext;
|
2091
2117
|
this.identifier = touch.identifier; // for now, our internal id is WebKit's id.
|
@@ -2126,10 +2152,10 @@ SC.Touch = function(touch, touchContext) {
|
|
2126
2152
|
SC.Touch.prototype = {
|
2127
2153
|
/**@scope SC.Touch.prototype*/
|
2128
2154
|
|
2129
|
-
unhideTouchIntercept: function() {
|
2155
|
+
unhideTouchIntercept: function () {
|
2130
2156
|
var intercept = this.hidesTouchIntercept;
|
2131
2157
|
if (intercept) {
|
2132
|
-
setTimeout(function() { intercept.style.webkitTransform = "translate3d(0px,0px,0px)"; }, 500);
|
2158
|
+
setTimeout(function () { intercept.style.webkitTransform = "translate3d(0px,0px,0px)"; }, 500);
|
2133
2159
|
}
|
2134
2160
|
},
|
2135
2161
|
|
@@ -2137,29 +2163,29 @@ SC.Touch.prototype = {
|
|
2137
2163
|
Indicates that you want to allow the normal default behavior. Sets
|
2138
2164
|
the hasCustomEventHandling property to YES but does not cancel the event.
|
2139
2165
|
*/
|
2140
|
-
allowDefault: function() {
|
2141
|
-
if (this.event) this.event.hasCustomEventHandling = YES
|
2166
|
+
allowDefault: function () {
|
2167
|
+
if (this.event) this.event.hasCustomEventHandling = YES;
|
2142
2168
|
},
|
2143
2169
|
|
2144
2170
|
/**
|
2145
2171
|
If the touch is associated with an event, prevents default action on the event.
|
2146
2172
|
*/
|
2147
|
-
preventDefault: function() {
|
2173
|
+
preventDefault: function () {
|
2148
2174
|
if (this.event) this.event.preventDefault();
|
2149
2175
|
},
|
2150
2176
|
|
2151
|
-
stopPropagation: function() {
|
2177
|
+
stopPropagation: function () {
|
2152
2178
|
if (this.event) this.event.stopPropagation();
|
2153
2179
|
},
|
2154
2180
|
|
2155
|
-
stop: function() {
|
2181
|
+
stop: function () {
|
2156
2182
|
if (this.event) this.event.stop();
|
2157
2183
|
},
|
2158
2184
|
|
2159
2185
|
/**
|
2160
2186
|
Removes from and calls touchEnd on the touch responder.
|
2161
2187
|
*/
|
2162
|
-
end: function() {
|
2188
|
+
end: function () {
|
2163
2189
|
this.touchContext.endTouch(this);
|
2164
2190
|
},
|
2165
2191
|
|
@@ -2168,7 +2194,7 @@ SC.Touch.prototype = {
|
|
2168
2194
|
the current responder will be saved so that the next responder may
|
2169
2195
|
return to it.
|
2170
2196
|
*/
|
2171
|
-
makeTouchResponder: function(responder, shouldStack, upViewChain) {
|
2197
|
+
makeTouchResponder: function (responder, shouldStack, upViewChain) {
|
2172
2198
|
this.touchContext.makeTouchResponder(this, responder, shouldStack, upViewChain);
|
2173
2199
|
},
|
2174
2200
|
|
@@ -2178,7 +2204,7 @@ SC.Touch.prototype = {
|
|
2178
2204
|
up to the startingPoint, and finds either a view that returns YES to captureTouch() or
|
2179
2205
|
touchStart().
|
2180
2206
|
*/
|
2181
|
-
captureTouch: function(startingPoint, shouldStack) {
|
2207
|
+
captureTouch: function (startingPoint, shouldStack) {
|
2182
2208
|
this.touchContext.captureTouch(this, startingPoint, shouldStack);
|
2183
2209
|
},
|
2184
2210
|
|
@@ -2186,14 +2212,14 @@ SC.Touch.prototype = {
|
|
2186
2212
|
Returns all touches for a specified view. Put as a convenience on the touch itself; this method
|
2187
2213
|
is also available on the event.
|
2188
2214
|
*/
|
2189
|
-
touchesForView: function(view) {
|
2215
|
+
touchesForView: function (view) {
|
2190
2216
|
return this.touchContext.touchesForView(view);
|
2191
2217
|
},
|
2192
2218
|
|
2193
2219
|
/**
|
2194
2220
|
Same as touchesForView, but sounds better for responders.
|
2195
2221
|
*/
|
2196
|
-
touchesForResponder: function(responder) {
|
2222
|
+
touchesForResponder: function (responder) {
|
2197
2223
|
return this.touchContext.touchesForView(responder);
|
2198
2224
|
},
|
2199
2225
|
|
@@ -2203,13 +2229,13 @@ SC.Touch.prototype = {
|
|
2203
2229
|
addSelf adds this touch to the set being considered. This is useful from touchStart. If
|
2204
2230
|
you use it from anywhere else, it will make this touch be used twice--so use caution.
|
2205
2231
|
*/
|
2206
|
-
averagedTouchesForView: function(view, addSelf) {
|
2232
|
+
averagedTouchesForView: function (view, addSelf) {
|
2207
2233
|
return this.touchContext.averagedTouchesForView(view, (addSelf ? this : null));
|
2208
2234
|
}
|
2209
2235
|
};
|
2210
2236
|
|
2211
2237
|
SC.mixin(SC.Touch, {
|
2212
|
-
create: function(touch, touchContext) {
|
2238
|
+
create: function (touch, touchContext) {
|
2213
2239
|
return new SC.Touch(touch, touchContext);
|
2214
2240
|
}
|
2215
2241
|
});
|
@@ -2218,8 +2244,8 @@ SC.mixin(SC.Touch, {
|
|
2218
2244
|
Invoked when the document is ready, but before main is called. Creates
|
2219
2245
|
an instance and sets up event listeners as needed.
|
2220
2246
|
*/
|
2221
|
-
SC.ready(SC.RootResponder, SC.RootResponder.ready = function() {
|
2247
|
+
SC.ready(SC.RootResponder, SC.RootResponder.ready = function () {
|
2222
2248
|
var r;
|
2223
|
-
r = SC.RootResponder.responder = SC.RootResponder.create()
|
2224
|
-
r.setup()
|
2249
|
+
r = SC.RootResponder.responder = SC.RootResponder.create();
|
2250
|
+
r.setup();
|
2225
2251
|
});
|