sproutcore 1.9.2 → 1.10.0.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
SC.BaseTheme.segmentRenderDelegate = SC.RenderDelegate.create({
|
|
14
14
|
className: 'segment',
|
|
15
15
|
|
|
16
|
-
render: function(dataSource, context) {
|
|
16
|
+
render: function (dataSource, context) {
|
|
17
17
|
var theme = dataSource.get('theme'),
|
|
18
18
|
buttonDelegate,
|
|
19
19
|
classes;
|
|
@@ -24,7 +24,7 @@ SC.BaseTheme.segmentRenderDelegate = SC.RenderDelegate.create({
|
|
|
24
24
|
'sc-middle-segment': dataSource.get('isMiddleSegment'),
|
|
25
25
|
'sc-last-segment': dataSource.get('isLastSegment'),
|
|
26
26
|
'sc-overflow-segment': dataSource.get('isOverflowSegment'),
|
|
27
|
-
'vertical': dataSource.get('layoutDirection') !== SC.LAYOUT_HORIZONTAL
|
|
27
|
+
'vertical': dataSource.get('layoutDirection') !== SC.LAYOUT_HORIZONTAL
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
if (!SC.none(dataSource.get('index'))) classes['sc-segment-' + dataSource.get('index')] = YES;
|
|
@@ -35,7 +35,7 @@ SC.BaseTheme.segmentRenderDelegate = SC.RenderDelegate.create({
|
|
|
35
35
|
buttonDelegate.render(dataSource, context);
|
|
36
36
|
},
|
|
37
37
|
|
|
38
|
-
update: function(dataSource, jquery) {
|
|
38
|
+
update: function (dataSource, jquery) {
|
|
39
39
|
var theme = dataSource.get('theme'),
|
|
40
40
|
buttonDelegate,
|
|
41
41
|
classes = {};
|
|
@@ -52,7 +52,7 @@ SC.BaseTheme.segmentRenderDelegate = SC.RenderDelegate.create({
|
|
|
52
52
|
jquery.setClass(classes);
|
|
53
53
|
|
|
54
54
|
// Use the SC.ButtonView render delegate for the current theme to update the segment as a button
|
|
55
|
-
buttonDelegate = theme
|
|
55
|
+
buttonDelegate = theme.buttonRenderDelegate;
|
|
56
56
|
buttonDelegate.update(dataSource, jquery);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -29,11 +29,11 @@ SC.BaseTheme.sliderRenderDelegate = SC.RenderDelegate.create({
|
|
|
29
29
|
valueNow = dataSource.get('ariaValue');
|
|
30
30
|
|
|
31
31
|
//addressing accessibility
|
|
32
|
-
context.
|
|
33
|
-
context.
|
|
34
|
-
context.
|
|
35
|
-
if(valueMin !== 0 || valueMax !== 100) context.
|
|
36
|
-
context.
|
|
32
|
+
context.setAttr('aria-valuemax', valueMax);
|
|
33
|
+
context.setAttr('aria-valuemin', valueMin);
|
|
34
|
+
context.setAttr('aria-valuenow', valueNow);
|
|
35
|
+
if(valueMin !== 0 || valueMax !== 100) context.setAttr('aria-valuetext', valueNow);
|
|
36
|
+
context.setAttr('aria-orientation', 'horizontal');
|
|
37
37
|
|
|
38
38
|
context = context.begin('span').addClass('track');
|
|
39
39
|
this.includeSlices(dataSource, context, SC.THREE_SLICE);
|
|
File without changes
|
|
File without changes
|
|
@@ -1,128 +1,54 @@
|
|
|
1
1
|
.sc-segmented-view {
|
|
2
2
|
display: block;
|
|
3
3
|
white-space: nowrap;
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
/* The entire SegmentedView is disabled. */
|
|
6
|
+
&.disabled {
|
|
7
|
+
.sc-segment-view {
|
|
8
|
+
background: #FFF;
|
|
9
|
+
color: #999;
|
|
10
|
+
|
|
11
|
+
&.sel {
|
|
12
|
+
background: #EEE;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
5
16
|
|
|
6
17
|
img.icon {
|
|
7
18
|
position: relative;
|
|
8
|
-
vertical-align: middle;
|
|
9
19
|
}
|
|
10
20
|
|
|
21
|
+
/* Style for an individual segment. */
|
|
11
22
|
.sc-segment-view {
|
|
12
|
-
|
|
23
|
+
background: #DDD;
|
|
13
24
|
color: black;
|
|
14
25
|
display: inline-block;
|
|
15
|
-
height: 22px;
|
|
16
|
-
line-height: 22px;
|
|
17
26
|
position: relative;
|
|
18
27
|
text-align: center;
|
|
19
|
-
text-decoration: none;
|
|
20
|
-
text-shadow: #b0b0b0 0px 1px 0px;
|
|
21
|
-
top: 0;
|
|
22
28
|
|
|
23
29
|
&:focus {
|
|
24
30
|
outline: none;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
|
-
&.
|
|
28
|
-
|
|
29
|
-
padding-right: 10px;
|
|
30
|
-
background: #DDDDDD;
|
|
31
|
-
.sc-button-inner {
|
|
32
|
-
padding-right: 10px;
|
|
33
|
-
}
|
|
34
|
-
.active,
|
|
35
|
-
.sel {
|
|
36
|
-
background: #999999;
|
|
37
|
-
}
|
|
33
|
+
&.active, &.sel {
|
|
34
|
+
background: #999;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
&.
|
|
41
|
-
|
|
42
|
-
border:none;
|
|
43
|
-
background: #DDDDDD;
|
|
44
|
-
.sc-button-inner {
|
|
45
|
-
padding-left: 10px;
|
|
46
|
-
}
|
|
47
|
-
.active,
|
|
48
|
-
.sel {
|
|
49
|
-
background: #999999;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.sc-middle-segment .sc-button-inner {
|
|
54
|
-
padding-left: 10px;
|
|
55
|
-
padding-right: 10px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.sc-button-inner {
|
|
59
|
-
background: #DDDDDD;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.sel .sc-button-inner {
|
|
63
|
-
background: #999999;
|
|
64
|
-
text-shadow: #909090 0px 1px 0px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.active .sc-button-inner {
|
|
68
|
-
background: #999999;
|
|
69
|
-
text-shadow: #909090 0px 1px 0px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.vertical {
|
|
73
|
-
display: block;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&.disabled .sc-button-inner {
|
|
77
|
-
background: #FFFFFF;
|
|
37
|
+
&.disabled {
|
|
38
|
+
background: #FFF;
|
|
78
39
|
color: #999;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&.sc-first-segment.disabled {
|
|
82
|
-
background: #FFFFFF;
|
|
83
|
-
.sel.disabled {
|
|
84
|
-
background: #FFFFFF;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
40
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.sel.disabled {
|
|
91
|
-
background: #FFFFFF;
|
|
41
|
+
&.sel {
|
|
42
|
+
background: #EEE;
|
|
92
43
|
}
|
|
93
44
|
}
|
|
94
45
|
|
|
95
|
-
&.sel
|
|
96
|
-
background: #
|
|
46
|
+
&.sel.active {
|
|
47
|
+
background: #888;
|
|
97
48
|
}
|
|
98
|
-
}
|
|
99
|
-
.sc-button-inner {
|
|
100
|
-
display: block;
|
|
101
|
-
min-width: 20px;
|
|
102
|
-
min-height: 22px;
|
|
103
|
-
}
|
|
104
49
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
background: #FFFFFF;
|
|
108
|
-
color: #999;
|
|
109
|
-
}
|
|
110
|
-
.sc-segment-view{
|
|
111
|
-
&.sc-first-segment {
|
|
112
|
-
background: #FFFFFF;
|
|
113
|
-
.sel {
|
|
114
|
-
background: #FFFFFF;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
&.sc-last-segment {
|
|
118
|
-
background: #FFFFFF;
|
|
119
|
-
&.sel {
|
|
120
|
-
background: #FFFFFF;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
&.sel .sc-button-inner {
|
|
124
|
-
background: #FFFFFF;
|
|
125
|
-
}
|
|
50
|
+
&.vertical {
|
|
51
|
+
display: block;
|
|
126
52
|
}
|
|
127
53
|
}
|
|
128
54
|
}
|
|
@@ -45,23 +45,23 @@ SC.View.reopen(
|
|
|
45
45
|
/** @scope SC.View.prototype */ {
|
|
46
46
|
|
|
47
47
|
/** @private */
|
|
48
|
-
init: function(original) {
|
|
48
|
+
init: function (original) {
|
|
49
49
|
original();
|
|
50
50
|
|
|
51
51
|
// register for drags
|
|
52
|
-
if (this.get('isDropTarget')) { SC.Drag.addDropTarget(this)
|
|
52
|
+
if (this.get('isDropTarget')) { SC.Drag.addDropTarget(this); }
|
|
53
53
|
|
|
54
54
|
// register scroll views for autoscroll during drags
|
|
55
|
-
if (this.get('isScrollable')) { SC.Drag.addScrollableView(this)
|
|
55
|
+
if (this.get('isScrollable')) { SC.Drag.addScrollableView(this); }
|
|
56
56
|
}.enhance(),
|
|
57
57
|
|
|
58
58
|
/** @private */
|
|
59
|
-
destroy: function(original) {
|
|
59
|
+
destroy: function (original) {
|
|
60
60
|
// unregister for drags
|
|
61
|
-
if (this.get('isDropTarget')) { SC.Drag.removeDropTarget(this)
|
|
61
|
+
if (this.get('isDropTarget')) { SC.Drag.removeDropTarget(this); }
|
|
62
62
|
|
|
63
63
|
// unregister for autoscroll during drags
|
|
64
|
-
if (this.get('isScrollable')) { SC.Drag.removeScrollableView(this)
|
|
64
|
+
if (this.get('isScrollable')) { SC.Drag.removeScrollableView(this); }
|
|
65
65
|
|
|
66
66
|
return original();
|
|
67
67
|
}.enhance()
|
|
@@ -69,101 +69,101 @@ SC.View.reopen(
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
@class
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
An instance of this object is created whenever a drag occurs. The instance
|
|
74
74
|
manages the mouse/touch events and coordinating with droppable targets until the
|
|
75
|
-
user releases the mouse button.
|
|
76
|
-
|
|
75
|
+
user releases the mouse button.
|
|
76
|
+
|
|
77
77
|
To initiate a drag, you should call `SC.Drag.start()` with the options below
|
|
78
78
|
specified in a hash. Pass the ones you need to get the drag you want:
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
- `event` -- *(req)* The mouse event/touch that triggered the drag. This will be used
|
|
81
81
|
to position the element.
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
- `source` -- *(req)* The drag source object that should be consulted during
|
|
84
|
-
the drag operations. This is usually the container view that initiated
|
|
84
|
+
the drag operations. This is usually the container view that initiated
|
|
85
85
|
the drag.
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
- `dragView` -- Optional view that will be used as the source image for the
|
|
88
88
|
drag. The drag operation will clone the DOM elements for this view and
|
|
89
89
|
parent them under the drag pane, which has the class name `sc-ghost-view`.
|
|
90
90
|
The drag view is not moved from its original location during a drag.
|
|
91
91
|
If the dragView is not provided, the source is used as dragView.
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
- `ghost` -- `YES` | `NO` If `NO`, the drag view image will show, but the source
|
|
94
94
|
`dragView` will not be hidden. Set to `YES` to make it appear that the
|
|
95
95
|
`dragView` itself is being dragged around.
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
- `slideBack` -- `YES` | `NO` If `YES` and the drag operation is cancelled, the
|
|
98
98
|
`dragView` will slide back to its source origin.
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
- `origin` -- If passed, this will be used as the origin point for the
|
|
101
|
-
ghostView when it slides back. You normally do not need to pass this
|
|
101
|
+
ghostView when it slides back. You normally do not need to pass this
|
|
102
102
|
unless the ghost view does not appear in the main UI.
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
- `data` -- Optional hash of data types and values. You can use this to pass
|
|
105
105
|
a static set of data instead of providing a dataSource. If you provide
|
|
106
106
|
a dataSource, it will be used instead.
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
- `dataSource` -- Optional object that will provide the data for the drag to
|
|
109
|
-
be consumed by the drop target. If you do not pass this parameter or the
|
|
110
|
-
data hash, then the source object will be used if it implements the
|
|
109
|
+
be consumed by the drop target. If you do not pass this parameter or the
|
|
110
|
+
data hash, then the source object will be used if it implements the
|
|
111
111
|
SC.DragDataSource protocol.
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
- `anchorView` -- if you pass this optional view, then the drag will only be
|
|
114
|
-
allowed to happen within this view. The ghostView will actually be added
|
|
115
|
-
as a child of this view during the drag. Normally the anchorView is the
|
|
114
|
+
allowed to happen within this view. The ghostView will actually be added
|
|
115
|
+
as a child of this view during the drag. Normally the anchorView is the
|
|
116
116
|
window.
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
@extends SC.Object
|
|
119
119
|
*/
|
|
120
120
|
SC.Drag = SC.Object.extend(
|
|
121
121
|
/** @scope SC.Drag.prototype */ {
|
|
122
|
-
|
|
122
|
+
|
|
123
123
|
/**
|
|
124
124
|
The source object used to coordinate this drag.
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
@readOnly
|
|
127
127
|
@type SC.DragSource
|
|
128
128
|
*/
|
|
129
129
|
source: null,
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
/**
|
|
132
132
|
The view actually dragged around the screen. This is created automatically
|
|
133
133
|
from the dragView.
|
|
134
|
-
|
|
134
|
+
|
|
135
135
|
@readOnly
|
|
136
136
|
@type SC.View
|
|
137
137
|
*/
|
|
138
138
|
ghostView: null,
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
/**
|
|
141
141
|
If `YES`, then the `ghostView` will acts like a cursor and attach directly
|
|
142
142
|
to the mouse/touch location.
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
@readOnly
|
|
145
145
|
@type Boolean
|
|
146
146
|
*/
|
|
147
147
|
ghostActsLikeCursor: NO,
|
|
148
|
-
|
|
149
|
-
/**
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
150
|
The view that was used as the source of the `ghostView`.
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
The drag view is not moved from its original location during a drag.
|
|
153
|
-
Instead, the DOM content of the view is cloned and managed by the
|
|
154
|
-
ghostView. If you want to visually indicate that the view is being
|
|
153
|
+
Instead, the DOM content of the view is cloned and managed by the
|
|
154
|
+
ghostView. If you want to visually indicate that the view is being
|
|
155
155
|
moved, you should set ghost to `YES`.
|
|
156
156
|
If dragView is not provided the source is used instead.
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
@readOnly
|
|
159
159
|
@type SC.View
|
|
160
160
|
*/
|
|
161
161
|
dragView: null,
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
/**
|
|
164
164
|
If `YES`, the `dragView` is automatically hidden while dragging around the
|
|
165
165
|
ghost.
|
|
166
|
-
|
|
166
|
+
|
|
167
167
|
@readOnly
|
|
168
168
|
@type Boolean
|
|
169
169
|
*/
|
|
@@ -175,12 +175,12 @@ SC.Drag = SC.Object.extend(
|
|
|
175
175
|
|
|
176
176
|
@type Boolean
|
|
177
177
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
sourceIsDraggable: YES,
|
|
179
|
+
|
|
180
180
|
/**
|
|
181
181
|
If `YES`, then the `ghostView` will slide back to its original location if
|
|
182
182
|
drag is cancelled.
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
@type Boolean
|
|
185
185
|
*/
|
|
186
186
|
slideBack: YES,
|
|
@@ -188,149 +188,149 @@ SC.Drag = SC.Object.extend(
|
|
|
188
188
|
/**
|
|
189
189
|
The origin to slide back to in the coordinate of the `dragView`'s
|
|
190
190
|
containerView.
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
@type Point
|
|
193
193
|
*/
|
|
194
194
|
ghostOffset: { x: 0, y: 0 },
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
/**
|
|
197
|
-
The current location of the mouse pointer in window coordinates. This is
|
|
198
|
-
updated as long as the mouse button is pressed or touch is active. Drop targets are
|
|
197
|
+
The current location of the mouse pointer in window coordinates. This is
|
|
198
|
+
updated as long as the mouse button is pressed or touch is active. Drop targets are
|
|
199
199
|
encouraged to update this property in their `dragUpdated()` method
|
|
200
200
|
implementations.
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
The ghostView will be positioned at this location.
|
|
203
|
-
|
|
203
|
+
|
|
204
204
|
@type Point
|
|
205
205
|
*/
|
|
206
206
|
location: {},
|
|
207
|
-
|
|
207
|
+
|
|
208
208
|
// ..........................................
|
|
209
209
|
// DRAG DATA
|
|
210
210
|
//
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
/**
|
|
213
213
|
Data types supported by this drag operation.
|
|
214
|
-
|
|
215
|
-
Returns an array of data types supported by the drag source. This may be
|
|
214
|
+
|
|
215
|
+
Returns an array of data types supported by the drag source. This may be
|
|
216
216
|
generated dynamically depending on the data source.
|
|
217
|
-
|
|
217
|
+
|
|
218
218
|
If you are implementing a drag source, you will need to provide these data
|
|
219
219
|
types so that drop targets can detect if they can accept your drag data.
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
If you are implementing a drop target, you should inspect this property
|
|
222
222
|
on your `dragEntered()` and `prepareForDragOperation()` methods to determine
|
|
223
223
|
if you can handle any of the data types offered up by the drag source.
|
|
224
|
-
|
|
224
|
+
|
|
225
225
|
@type Array
|
|
226
226
|
*/
|
|
227
|
-
dataTypes: function() {
|
|
227
|
+
dataTypes: function () {
|
|
228
228
|
// first try to use the data source.
|
|
229
|
-
if (this.dataSource) return this.dataSource.get('dragDataTypes') || []
|
|
230
|
-
|
|
229
|
+
if (this.dataSource) return this.dataSource.get('dragDataTypes') || [];
|
|
230
|
+
|
|
231
231
|
// if that fails, get the keys from the data hash.
|
|
232
|
-
var hash = this.data
|
|
232
|
+
var hash = this.data;
|
|
233
233
|
if (hash) {
|
|
234
234
|
var ret = [];
|
|
235
235
|
for (var key in hash) {
|
|
236
|
-
if (hash.hasOwnProperty(key)) ret.push(key)
|
|
236
|
+
if (hash.hasOwnProperty(key)) ret.push(key);
|
|
237
237
|
}
|
|
238
|
-
return ret
|
|
239
|
-
}
|
|
240
|
-
|
|
238
|
+
return ret;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
241
|
// if that fails, then check to see if the source object is a dataSource.
|
|
242
|
-
var source = this.get('source')
|
|
243
|
-
if (source && source.dragDataTypes) return source.get('dragDataTypes') || []
|
|
244
|
-
|
|
242
|
+
var source = this.get('source');
|
|
243
|
+
if (source && source.dragDataTypes) return source.get('dragDataTypes') || [];
|
|
244
|
+
|
|
245
245
|
// no data types found. :(
|
|
246
|
-
return []
|
|
246
|
+
return [];
|
|
247
247
|
}.property().cacheable(),
|
|
248
|
-
|
|
248
|
+
|
|
249
249
|
/**
|
|
250
250
|
Checks for a named data type in the drag.
|
|
251
|
-
|
|
251
|
+
|
|
252
252
|
@param {String} dataType the data type
|
|
253
253
|
@returns {Boolean} YES if data type is present in dataTypes array.
|
|
254
254
|
*/
|
|
255
|
-
hasDataType: function(dataType) {
|
|
256
|
-
return (this.get('dataTypes').indexOf(dataType) >= 0)
|
|
255
|
+
hasDataType: function (dataType) {
|
|
256
|
+
return (this.get('dataTypes').indexOf(dataType) >= 0);
|
|
257
257
|
},
|
|
258
|
-
|
|
258
|
+
|
|
259
259
|
/**
|
|
260
260
|
Retrieve the data for the specified `dataType` from the drag source.
|
|
261
|
-
|
|
261
|
+
|
|
262
262
|
Drop targets can use this method during their `performDragOperation()`
|
|
263
263
|
method to retrieve the actual data provided by the drag data source. This
|
|
264
264
|
data may be generated dynamically depending on the data source.
|
|
265
|
-
|
|
265
|
+
|
|
266
266
|
@param {Object} dataType data type you want to retrieve. Should be one of
|
|
267
267
|
the values returned in the dataTypes property
|
|
268
268
|
@returns {Object} The generated data.
|
|
269
269
|
*/
|
|
270
|
-
dataForType: function(dataType) {
|
|
270
|
+
dataForType: function (dataType) {
|
|
271
271
|
// first try to use the data Source.
|
|
272
272
|
if (this.dataSource) {
|
|
273
|
-
return this.dataSource.dragDataForType(this, dataType)
|
|
274
|
-
|
|
273
|
+
return this.dataSource.dragDataForType(this, dataType);
|
|
274
|
+
|
|
275
275
|
// then try to use the data hash.
|
|
276
276
|
} else if (this.data) {
|
|
277
277
|
return this.data[dataType];
|
|
278
|
-
|
|
278
|
+
|
|
279
279
|
// if all else fails, check to see if the source object is a data source.
|
|
280
280
|
} else {
|
|
281
|
-
var source = this.get('source')
|
|
281
|
+
var source = this.get('source');
|
|
282
282
|
if (source && SC.typeOf(source.dragDataForType) === SC.T_FUNCTION) {
|
|
283
|
-
return source.dragDataForType(this, dataType)
|
|
284
|
-
|
|
283
|
+
return source.dragDataForType(this, dataType);
|
|
284
|
+
|
|
285
285
|
// no data source found. :(
|
|
286
|
-
} else return null
|
|
286
|
+
} else return null;
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
|
-
|
|
289
|
+
|
|
290
290
|
/**
|
|
291
291
|
Optional object used to provide the data for the drag.
|
|
292
|
-
|
|
292
|
+
|
|
293
293
|
Drag source can designate a `dataSource` object to generate the data for
|
|
294
|
-
a drag dynamically. The data source can and often is the drag source
|
|
295
|
-
object itself.
|
|
296
|
-
|
|
294
|
+
a drag dynamically. The data source can and often is the drag source
|
|
295
|
+
object itself.
|
|
296
|
+
|
|
297
297
|
Data Source objects must comply with the `SC.DragDataSource` interface. If
|
|
298
|
-
you do not want to implement this interface, you can provide the data
|
|
298
|
+
you do not want to implement this interface, you can provide the data
|
|
299
299
|
directly with the data property.
|
|
300
|
-
|
|
301
|
-
If you are implementing a drop target, use the dataTypes property and
|
|
300
|
+
|
|
301
|
+
If you are implementing a drop target, use the dataTypes property and
|
|
302
302
|
`dataForTypes()` method to access data instead of working directly with
|
|
303
303
|
these properties.
|
|
304
|
-
|
|
304
|
+
|
|
305
305
|
@readOnly
|
|
306
306
|
@type SC.DragDataSource
|
|
307
307
|
*/
|
|
308
308
|
dataSource: null,
|
|
309
|
-
|
|
309
|
+
|
|
310
310
|
/**
|
|
311
311
|
Optional hash of data. Used if no dataSource was provided.
|
|
312
|
-
|
|
313
|
-
Drag sources can provide a hash of data when the drag begins instead of
|
|
312
|
+
|
|
313
|
+
Drag sources can provide a hash of data when the drag begins instead of
|
|
314
314
|
specifying an actual dataSource. The data is stored in this property.
|
|
315
|
-
If you are implementing a drop target, use the dataTypes property and
|
|
315
|
+
If you are implementing a drop target, use the dataTypes property and
|
|
316
316
|
`dataForTypes()` method to access data instead of working directly with
|
|
317
317
|
these properties.
|
|
318
|
-
|
|
318
|
+
|
|
319
319
|
@readOnly
|
|
320
320
|
@type Hash
|
|
321
321
|
*/
|
|
322
322
|
data: null,
|
|
323
|
-
|
|
323
|
+
|
|
324
324
|
/**
|
|
325
325
|
Returns the currently allowed `dragOperations` for the drag. This will be
|
|
326
|
-
set just before any callbacks are invoked on a drop target. The drag
|
|
326
|
+
set just before any callbacks are invoked on a drop target. The drag
|
|
327
327
|
source is given an opportunity to set these operations.
|
|
328
|
-
|
|
328
|
+
|
|
329
329
|
@readOnly
|
|
330
330
|
@type Number
|
|
331
331
|
*/
|
|
332
332
|
allowedDragOperations: SC.DRAG_ANY,
|
|
333
|
-
|
|
333
|
+
|
|
334
334
|
/** @private required by autoscroll */
|
|
335
335
|
_dragInProgress: YES,
|
|
336
336
|
|
|
@@ -343,63 +343,63 @@ SC.Drag = SC.Object.extend(
|
|
|
343
343
|
/** @private
|
|
344
344
|
This will actually start the drag process. Called by SC.Drag.start().
|
|
345
345
|
*/
|
|
346
|
-
startDrag: function() {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
var evt = this.event
|
|
353
|
-
|
|
346
|
+
startDrag: function () {
|
|
347
|
+
if (this.get('sourceIsDraggable')) {
|
|
348
|
+
// create the ghost view
|
|
349
|
+
this._createGhostView();
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
var evt = this.event;
|
|
353
|
+
|
|
354
354
|
// compute the ghost offset from the original start location
|
|
355
|
-
|
|
356
|
-
var loc = { x: evt.pageX, y: evt.pageY }
|
|
357
|
-
this.set('location', loc)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
var source = this.source
|
|
396
|
-
if (source && source.dragDidBegin) source.dragDidBegin(this, loc)
|
|
397
|
-
|
|
355
|
+
|
|
356
|
+
var loc = { x: evt.pageX, y: evt.pageY };
|
|
357
|
+
this.set('location', loc);
|
|
358
|
+
|
|
359
|
+
if (this.get('sourceIsDraggable')) {
|
|
360
|
+
var dv = this._getDragView();
|
|
361
|
+
var pv = dv.get('parentView');
|
|
362
|
+
|
|
363
|
+
// convert to global coordinates
|
|
364
|
+
var origin = pv ? pv.convertFrameToView(dv.get('frame'), null) : dv.get('frame');
|
|
365
|
+
|
|
366
|
+
if (this.get('ghost')) {
|
|
367
|
+
// Hide the dragView
|
|
368
|
+
this._dragViewWasVisible = dv.get('isVisible');
|
|
369
|
+
dv.set('isVisible', NO);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (this.ghostActsLikeCursor) this.ghostOffset = { x: 14, y: 14 };
|
|
373
|
+
else this.ghostOffset = { x: (loc.x - origin.x), y: (loc.y - origin.y) };
|
|
374
|
+
|
|
375
|
+
// position the ghost view
|
|
376
|
+
if (!this._ghostViewHidden) this._positionGhostView(evt);
|
|
377
|
+
|
|
378
|
+
if (evt.makeTouchResponder) {
|
|
379
|
+
// Should use invokeLater if I can figure it out
|
|
380
|
+
var self = this;
|
|
381
|
+
SC.Timer.schedule({
|
|
382
|
+
target: evt,
|
|
383
|
+
action: function () {
|
|
384
|
+
if (!evt.hasEnded) evt.makeTouchResponder(self, YES);
|
|
385
|
+
},
|
|
386
|
+
interval: 1
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
// notify root responder that a drag is in process
|
|
391
|
+
this.ghostView.rootResponder.dragDidStart(this, evt);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
var source = this.source;
|
|
396
|
+
if (source && source.dragDidBegin) source.dragDidBegin(this, loc);
|
|
397
|
+
|
|
398
398
|
// let all drop targets know that a drag has started
|
|
399
|
-
var ary = this._dropTargets()
|
|
400
|
-
|
|
401
|
-
for (var idx=0, len=ary.length; idx<len; idx++) {
|
|
402
|
-
ary[idx].tryToPerform('dragStarted', this, evt)
|
|
399
|
+
var ary = this._dropTargets();
|
|
400
|
+
|
|
401
|
+
for (var idx = 0, len = ary.length; idx < len; idx++) {
|
|
402
|
+
ary[idx].tryToPerform('dragStarted', this, evt);
|
|
403
403
|
}
|
|
404
404
|
},
|
|
405
405
|
|
|
@@ -412,20 +412,20 @@ SC.Drag = SC.Object.extend(
|
|
|
412
412
|
This is called by RootResponder's keyup method when the user presses
|
|
413
413
|
escape and a drag is in progress.
|
|
414
414
|
*/
|
|
415
|
-
cancelDrag: function() {
|
|
415
|
+
cancelDrag: function () {
|
|
416
416
|
var target = this._lastTarget,
|
|
417
417
|
loc = this.get('location');
|
|
418
418
|
|
|
419
419
|
if (target && target.dragExited) target.dragExited(this, this._lastMouseDraggedEvent);
|
|
420
420
|
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
if (this.get('sourceIsDraggable')) {
|
|
422
|
+
this._destroyGhostView();
|
|
423
423
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
if (this.get('ghost')) {
|
|
425
|
+
if (this._dragViewWasVisible) this._getDragView().set('isVisible', YES);
|
|
426
|
+
this._dragViewWasVisible = null;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
429
|
|
|
430
430
|
var source = this.source;
|
|
431
431
|
if (source && source.dragDidEnd) source.dragDidEnd(this, loc, SC.DRAG_NONE);
|
|
@@ -433,13 +433,13 @@ SC.Drag = SC.Object.extend(
|
|
|
433
433
|
this._lastTarget = null;
|
|
434
434
|
this._dragInProgress = NO;
|
|
435
435
|
},
|
|
436
|
-
|
|
436
|
+
|
|
437
437
|
// ..........................................
|
|
438
438
|
// PRIVATE PROPERTIES AND METHODS
|
|
439
439
|
//
|
|
440
440
|
|
|
441
441
|
/** @private */
|
|
442
|
-
touchStart: function(evt) {
|
|
442
|
+
touchStart: function (evt) {
|
|
443
443
|
return YES;
|
|
444
444
|
},
|
|
445
445
|
|
|
@@ -448,141 +448,134 @@ SC.Drag = SC.Object.extend(
|
|
|
448
448
|
position of the ghost image, then it looks for a current drop target and
|
|
449
449
|
notifies it.
|
|
450
450
|
*/
|
|
451
|
-
mouseDragged: function(evt) {
|
|
452
|
-
var scrolled = this._autoscroll(evt)
|
|
453
|
-
var loc = this.get('location')
|
|
451
|
+
mouseDragged: function (evt) {
|
|
452
|
+
var scrolled = this._autoscroll(evt);
|
|
453
|
+
var loc = this.get('location');
|
|
454
454
|
if (!scrolled && (evt.pageX === loc.x) && (evt.pageY === loc.y)) {
|
|
455
|
-
return
|
|
456
|
-
}
|
|
455
|
+
return; // quickly ignore duplicate calls
|
|
456
|
+
}
|
|
457
457
|
|
|
458
458
|
// save the new location to avoid duplicate mouseDragged event processing
|
|
459
459
|
loc = { x: evt.pageX, y: evt.pageY };
|
|
460
|
-
this.set('location', loc)
|
|
460
|
+
this.set('location', loc);
|
|
461
461
|
this._lastMouseDraggedEvent = evt;
|
|
462
|
-
|
|
462
|
+
|
|
463
463
|
// STEP 1: Determine the deepest drop target that allows an operation.
|
|
464
|
-
// if the drop target selected the last time this method was called
|
|
465
|
-
// differs from the deepest target found, then go up the chain until we
|
|
464
|
+
// if the drop target selected the last time this method was called
|
|
465
|
+
// differs from the deepest target found, then go up the chain until we
|
|
466
466
|
// either hit the last one or find one that will allow a drag operation
|
|
467
|
-
var source = this.source
|
|
468
|
-
var last = this._lastTarget
|
|
469
|
-
var target = this._findDropTarget(evt)
|
|
470
|
-
var op = SC.DRAG_NONE
|
|
471
|
-
|
|
467
|
+
var source = this.source;
|
|
468
|
+
var last = this._lastTarget;
|
|
469
|
+
var target = this._findDropTarget(evt); // deepest drop target
|
|
470
|
+
var op = SC.DRAG_NONE;
|
|
471
|
+
|
|
472
472
|
while (target && (target !== last) && (op === SC.DRAG_NONE)) {
|
|
473
|
-
// make sure the drag source will permit a drop operation on the named
|
|
473
|
+
// make sure the drag source will permit a drop operation on the named
|
|
474
474
|
// target
|
|
475
475
|
if (target && source && source.dragSourceOperationMaskFor) {
|
|
476
|
-
op = source.dragSourceOperationMaskFor(this, target)
|
|
477
|
-
} else op = SC.DRAG_ANY
|
|
478
|
-
|
|
476
|
+
op = source.dragSourceOperationMaskFor(this, target);
|
|
477
|
+
} else op = SC.DRAG_ANY; // assume drops are allowed
|
|
478
|
+
|
|
479
479
|
// now, let's see if the target will accept the drag
|
|
480
480
|
if ((op !== SC.DRAG_NONE) && target && target.computeDragOperations) {
|
|
481
|
-
op = op & target.computeDragOperations(this, evt, op)
|
|
482
|
-
} else op = SC.DRAG_NONE
|
|
483
|
-
|
|
484
|
-
this.allowedDragOperations = op
|
|
485
|
-
|
|
481
|
+
op = op & target.computeDragOperations(this, evt, op);
|
|
482
|
+
} else op = SC.DRAG_NONE; // assume drops AREN'T allowed
|
|
483
|
+
|
|
484
|
+
this.allowedDragOperations = op;
|
|
485
|
+
|
|
486
486
|
// if DRAG_NONE, then look for the next parent that is a drop zone
|
|
487
|
-
if (op === SC.DRAG_NONE) target = this._findNextDropTarget(target)
|
|
487
|
+
if (op === SC.DRAG_NONE) target = this._findNextDropTarget(target);
|
|
488
488
|
}
|
|
489
|
-
|
|
489
|
+
|
|
490
490
|
// STEP 2: Refocus the drop target if needed
|
|
491
491
|
if (target !== last) {
|
|
492
|
-
if (last && last.dragExited) last.dragExited(this, evt)
|
|
493
|
-
|
|
492
|
+
if (last && last.dragExited) last.dragExited(this, evt);
|
|
493
|
+
|
|
494
494
|
if (target) {
|
|
495
|
-
if (target.dragEntered) target.dragEntered(this, evt)
|
|
496
|
-
if (target.dragUpdated) target.dragUpdated(this, evt)
|
|
495
|
+
if (target.dragEntered) target.dragEntered(this, evt);
|
|
496
|
+
if (target.dragUpdated) target.dragUpdated(this, evt);
|
|
497
497
|
}
|
|
498
|
-
|
|
499
|
-
this._lastTarget = target
|
|
498
|
+
|
|
499
|
+
this._lastTarget = target;
|
|
500
500
|
} else {
|
|
501
|
-
if (target && target.dragUpdated) target.dragUpdated(this, evt)
|
|
501
|
+
if (target && target.dragUpdated) target.dragUpdated(this, evt);
|
|
502
502
|
}
|
|
503
|
-
|
|
503
|
+
|
|
504
504
|
// notify source that the drag moved
|
|
505
|
-
if (source && source.dragDidMove) source.dragDidMove(this, loc)
|
|
506
|
-
|
|
505
|
+
if (source && source.dragDidMove) source.dragDidMove(this, loc);
|
|
506
|
+
|
|
507
507
|
// reposition the ghostView
|
|
508
|
-
if(this.get('sourceIsDraggable') && !this._ghostViewHidden) this._positionGhostView(evt)
|
|
508
|
+
if (this.get('sourceIsDraggable') && !this._ghostViewHidden) this._positionGhostView(evt);
|
|
509
509
|
},
|
|
510
510
|
|
|
511
|
-
touchesDragged: function(evt){
|
|
511
|
+
touchesDragged: function (evt) {
|
|
512
512
|
this.mouseDragged(evt);
|
|
513
513
|
},
|
|
514
514
|
|
|
515
515
|
/**
|
|
516
516
|
@private
|
|
517
|
-
|
|
517
|
+
|
|
518
518
|
Called when the mouse is released. Performs any necessary cleanup and
|
|
519
519
|
executes the drop target protocol to try to complete the drag operation.
|
|
520
520
|
*/
|
|
521
|
-
mouseUp: function(evt) {
|
|
521
|
+
mouseUp: function (evt) {
|
|
522
522
|
var loc = { x: evt.pageX, y: evt.pageY },
|
|
523
|
-
target = this._lastTarget,
|
|
523
|
+
target = this._lastTarget,
|
|
524
524
|
op = this.allowedDragOperations;
|
|
525
|
-
|
|
525
|
+
|
|
526
526
|
this.set('location', loc);
|
|
527
|
-
|
|
527
|
+
|
|
528
528
|
// try to have the drop target perform the drop...
|
|
529
529
|
try {
|
|
530
530
|
if (target && target.acceptDragOperation && target.acceptDragOperation(this, op)) {
|
|
531
|
-
op = target.performDragOperation ? target.performDragOperation(this, op) : SC.DRAG_NONE
|
|
531
|
+
op = target.performDragOperation ? target.performDragOperation(this, op) : SC.DRAG_NONE;
|
|
532
532
|
} else {
|
|
533
533
|
op = SC.DRAG_NONE;
|
|
534
534
|
}
|
|
535
535
|
} catch (e) {
|
|
536
|
-
SC.Logger.error('Exception in SC.Drag.mouseUp(acceptDragOperation|performDragOperation): %@'.fmt(e))
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
try {
|
|
540
|
-
// notify last drop target that the drag exited, to allow it to cleanup
|
|
541
|
-
if (target && target.dragExited) target.dragExited(this, evt) ;
|
|
542
|
-
} catch (ex) {
|
|
543
|
-
SC.Logger.error('Exception in SC.Drag.mouseUp(target.dragExited): %@'.fmt(ex)) ;
|
|
536
|
+
SC.Logger.error('Exception in SC.Drag.mouseUp(acceptDragOperation|performDragOperation): %@'.fmt(e));
|
|
544
537
|
}
|
|
545
|
-
|
|
538
|
+
|
|
546
539
|
// notify all drop targets that the drag ended
|
|
547
|
-
var ary = this._dropTargets()
|
|
548
|
-
for (var idx=0, len=ary.length; idx<len; idx++) {
|
|
540
|
+
var ary = this._dropTargets();
|
|
541
|
+
for (var idx = 0, len = ary.length; idx < len; idx++) {
|
|
549
542
|
try {
|
|
550
|
-
ary[idx].tryToPerform('dragEnded', this, evt)
|
|
543
|
+
ary[idx].tryToPerform('dragEnded', this, evt);
|
|
551
544
|
} catch (ex2) {
|
|
552
|
-
SC.Logger.error('Exception in SC.Drag.mouseUp(dragEnded on %@): %@'.fmt(ary[idx], ex2))
|
|
545
|
+
SC.Logger.error('Exception in SC.Drag.mouseUp(dragEnded on %@): %@'.fmt(ary[idx], ex2));
|
|
553
546
|
}
|
|
554
547
|
}
|
|
555
548
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
549
|
+
if (this.get('sourceIsDraggable')) {
|
|
550
|
+
// destroy the ghost view
|
|
551
|
+
this._destroyGhostView();
|
|
559
552
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
553
|
+
if (this.get('ghost')) {
|
|
554
|
+
// Show the dragView if it was hidden.
|
|
555
|
+
if (this._dragViewWasVisible) this._getDragView().set('isVisible', YES);
|
|
556
|
+
this._dragViewWasVisible = null;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
566
559
|
|
|
567
560
|
// notify the source that everything has completed
|
|
568
|
-
var source = this.source
|
|
569
|
-
if (source && source.dragDidEnd) source.dragDidEnd(this, loc, op)
|
|
570
|
-
|
|
571
|
-
this._lastTarget = null
|
|
572
|
-
this._dragInProgress = NO
|
|
561
|
+
var source = this.source;
|
|
562
|
+
if (source && source.dragDidEnd) source.dragDidEnd(this, loc, op);
|
|
563
|
+
|
|
564
|
+
this._lastTarget = null;
|
|
565
|
+
this._dragInProgress = NO; // required by autoscroll (invoked by a timer)
|
|
573
566
|
},
|
|
574
567
|
|
|
575
568
|
/** @private */
|
|
576
|
-
touchEnd: function(evt){
|
|
569
|
+
touchEnd: function (evt) {
|
|
577
570
|
this.mouseUp(evt);
|
|
578
571
|
},
|
|
579
572
|
|
|
580
573
|
/** @private
|
|
581
574
|
Returns the dragView. If it is not set, the source is returned.
|
|
582
575
|
*/
|
|
583
|
-
_getDragView: function() {
|
|
576
|
+
_getDragView: function () {
|
|
584
577
|
if (!this.dragView) {
|
|
585
|
-
if (!this.source || !this.source.isView) throw "Source can't be used as dragView, because it's not a view.";
|
|
578
|
+
if (!this.source || !this.source.isView) throw new Error("Source can't be used as dragView, because it's not a view.");
|
|
586
579
|
this.dragView = this.source;
|
|
587
580
|
}
|
|
588
581
|
return this.dragView;
|
|
@@ -591,61 +584,72 @@ SC.Drag = SC.Object.extend(
|
|
|
591
584
|
/** @private
|
|
592
585
|
This will create the ghostView and add it to the document.
|
|
593
586
|
*/
|
|
594
|
-
_createGhostView: function() {
|
|
587
|
+
_createGhostView: function () {
|
|
595
588
|
var that = this,
|
|
596
589
|
dragView = this._getDragView(),
|
|
597
|
-
frame = dragView.get('
|
|
598
|
-
|
|
599
|
-
|
|
590
|
+
frame = dragView.get('borderFrame'),
|
|
591
|
+
layout = dragView.get('layout'),
|
|
592
|
+
ghostLayout, view;
|
|
593
|
+
|
|
594
|
+
// Create a fixed layout for the ghost view.
|
|
595
|
+
ghostLayout = { top: frame.y, left: frame.x, width: frame.width, height: frame.height };
|
|
596
|
+
|
|
600
597
|
view = this.ghostView = SC.Pane.create({
|
|
601
|
-
classNames:['sc-ghost-view'],
|
|
602
|
-
layout:
|
|
598
|
+
classNames: ['sc-ghost-view'],
|
|
599
|
+
layout: ghostLayout,
|
|
603
600
|
owner: this,
|
|
604
|
-
|
|
601
|
+
wantsAcceleratedLayer: dragView.get('wantsAcceleratedLayer'),
|
|
602
|
+
|
|
603
|
+
didCreateLayer: function () {
|
|
605
604
|
if (dragView) {
|
|
606
|
-
var layer = dragView.get('layer')
|
|
605
|
+
var layer = dragView.get('layer');
|
|
607
606
|
if (layer) {
|
|
608
|
-
layer = layer.cloneNode(true)
|
|
607
|
+
layer = layer.cloneNode(true);
|
|
608
|
+
|
|
609
609
|
// Make sure the layer we put in the ghostView wrapper is not displaced.
|
|
610
|
-
layer.style.top = "0px"
|
|
611
|
-
layer.style.left = "0px"
|
|
612
|
-
|
|
610
|
+
layer.style.top = "0px";
|
|
611
|
+
layer.style.left = "0px";
|
|
612
|
+
layer.style.bottom = "0px";
|
|
613
|
+
layer.style.right = "0px";
|
|
614
|
+
this.get('layer').appendChild(layer);
|
|
613
615
|
}
|
|
614
616
|
}
|
|
615
617
|
}
|
|
616
618
|
});
|
|
617
|
-
|
|
618
|
-
view.append()
|
|
619
|
+
|
|
620
|
+
view.append(); // add to window
|
|
619
621
|
},
|
|
620
|
-
|
|
622
|
+
|
|
621
623
|
/** @private
|
|
622
624
|
Positions the ghost view underneath the mouse/touch with the initial offset
|
|
623
625
|
recorded by when the drag started.
|
|
624
626
|
*/
|
|
625
|
-
_positionGhostView: function(evt) {
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
627
|
+
_positionGhostView: function (evt) {
|
|
628
|
+
var ghostView = this.ghostView,
|
|
629
|
+
loc;
|
|
630
|
+
|
|
631
|
+
if (ghostView) {
|
|
632
|
+
loc = this.get('location');
|
|
633
|
+
|
|
634
|
+
loc.x -= this.ghostOffset.x;
|
|
635
|
+
loc.y -= this.ghostOffset.y;
|
|
636
|
+
ghostView.adjust({ top: loc.y, left: loc.x });
|
|
633
637
|
}
|
|
634
638
|
},
|
|
635
|
-
|
|
639
|
+
|
|
636
640
|
/** @private
|
|
637
641
|
YES if the ghostView has been manually hidden.
|
|
638
|
-
|
|
642
|
+
|
|
639
643
|
@type Boolean
|
|
640
644
|
@default NO
|
|
641
645
|
*/
|
|
642
646
|
_ghostViewHidden: NO,
|
|
643
|
-
|
|
647
|
+
|
|
644
648
|
/**
|
|
645
649
|
Hide the ghostView.
|
|
646
650
|
*/
|
|
647
|
-
hideGhostView: function() {
|
|
648
|
-
if(this.ghostView && !this._ghostViewHidden) {
|
|
651
|
+
hideGhostView: function () {
|
|
652
|
+
if (this.ghostView && !this._ghostViewHidden) {
|
|
649
653
|
this.ghostView.remove();
|
|
650
654
|
this._ghostViewHidden = YES;
|
|
651
655
|
}
|
|
@@ -654,144 +658,144 @@ SC.Drag = SC.Object.extend(
|
|
|
654
658
|
/**
|
|
655
659
|
Unhide the ghostView.
|
|
656
660
|
*/
|
|
657
|
-
unhideGhostView: function() {
|
|
658
|
-
if(this._ghostViewHidden) {
|
|
661
|
+
unhideGhostView: function () {
|
|
662
|
+
if (this._ghostViewHidden) {
|
|
659
663
|
this._ghostViewHidden = NO;
|
|
660
664
|
this._createGhostView();
|
|
661
665
|
}
|
|
662
666
|
},
|
|
663
|
-
|
|
667
|
+
|
|
664
668
|
/** @private */
|
|
665
|
-
_destroyGhostView: function() {
|
|
669
|
+
_destroyGhostView: function () {
|
|
666
670
|
if (this.ghostView) {
|
|
667
|
-
this.ghostView.remove()
|
|
668
|
-
this.ghostView = null
|
|
671
|
+
this.ghostView.remove();
|
|
672
|
+
this.ghostView = null; // this will allow the GC to collect it.
|
|
669
673
|
this._ghostViewHidden = NO;
|
|
670
674
|
}
|
|
671
675
|
},
|
|
672
|
-
|
|
676
|
+
|
|
673
677
|
/** @private
|
|
674
678
|
Return an array of drop targets, sorted with any nested drop targets
|
|
675
679
|
at the top of the array. The first time this method is called during
|
|
676
|
-
a drag, it will reconstruct this array using the current set of
|
|
680
|
+
a drag, it will reconstruct this array using the current set of
|
|
677
681
|
drop targets. Afterwards it uses the cached set until the drop
|
|
678
682
|
completes.
|
|
679
|
-
|
|
683
|
+
|
|
680
684
|
This means that if you change the view hierarchy of your drop targets
|
|
681
685
|
during a drag, it will probably be wrong.
|
|
682
686
|
*/
|
|
683
|
-
_dropTargets: function() {
|
|
684
|
-
if (this._cachedDropTargets) return this._cachedDropTargets
|
|
685
|
-
|
|
687
|
+
_dropTargets: function () {
|
|
688
|
+
if (this._cachedDropTargets) return this._cachedDropTargets;
|
|
689
|
+
|
|
686
690
|
// build array of drop targets
|
|
687
|
-
var ret = []
|
|
688
|
-
var hash = SC.Drag._dropTargets
|
|
691
|
+
var ret = [];
|
|
692
|
+
var hash = SC.Drag._dropTargets;
|
|
689
693
|
for (var key in hash) {
|
|
690
|
-
if (hash.hasOwnProperty(key)) ret.push(hash[key])
|
|
694
|
+
if (hash.hasOwnProperty(key)) ret.push(hash[key]);
|
|
691
695
|
}
|
|
692
|
-
|
|
693
|
-
// views must be sorted so that drop targets with the deepest nesting
|
|
696
|
+
|
|
697
|
+
// views must be sorted so that drop targets with the deepest nesting
|
|
694
698
|
// levels appear first in the array. The getDepthFor().
|
|
695
|
-
var depth = {}
|
|
696
|
-
var dropTargets = SC.Drag._dropTargets
|
|
697
|
-
var getDepthFor = function(x) {
|
|
698
|
-
if (!x) return 0
|
|
699
|
+
var depth = {};
|
|
700
|
+
var dropTargets = SC.Drag._dropTargets;
|
|
701
|
+
var getDepthFor = function (x) {
|
|
702
|
+
if (!x) return 0;
|
|
699
703
|
var guid = SC.guidFor(x);
|
|
700
704
|
var ret = depth[guid];
|
|
701
705
|
if (!ret) {
|
|
702
|
-
ret = 1
|
|
706
|
+
ret = 1;
|
|
703
707
|
while (x = x.get('parentView')) {
|
|
704
|
-
if (dropTargets[SC.guidFor(x)] !== undefined) ret = ret+1
|
|
705
|
-
if(x.isPane && x.isMainPane) ret = ret+10000; // Arbitrary value always have the main pain on top
|
|
708
|
+
if (dropTargets[SC.guidFor(x)] !== undefined) ret = ret + 1;
|
|
709
|
+
if (x.isPane && x.isMainPane) ret = ret + 10000; // Arbitrary value always have the main pain on top
|
|
706
710
|
}
|
|
707
|
-
depth[guid] = ret
|
|
711
|
+
depth[guid] = ret;
|
|
708
712
|
}
|
|
709
|
-
return ret
|
|
710
|
-
}
|
|
711
|
-
|
|
713
|
+
return ret;
|
|
714
|
+
};
|
|
715
|
+
|
|
712
716
|
// sort array of drop targets
|
|
713
|
-
ret.sort(function(a,b) {
|
|
714
|
-
if (a===b) return 0;
|
|
715
|
-
a = getDepthFor(a)
|
|
716
|
-
b = getDepthFor(b)
|
|
717
|
-
return (a > b) ? -1 : 1
|
|
718
|
-
})
|
|
719
|
-
|
|
720
|
-
this._cachedDropTargets = ret
|
|
721
|
-
return ret
|
|
717
|
+
ret.sort(function (a, b) {
|
|
718
|
+
if (a === b) return 0;
|
|
719
|
+
a = getDepthFor(a);
|
|
720
|
+
b = getDepthFor(b);
|
|
721
|
+
return (a > b) ? -1 : 1;
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
this._cachedDropTargets = ret;
|
|
725
|
+
return ret;
|
|
722
726
|
},
|
|
723
|
-
|
|
727
|
+
|
|
724
728
|
/** @private
|
|
725
|
-
This will search through the drop targets, looking for one in the target
|
|
729
|
+
This will search through the drop targets, looking for one in the target
|
|
726
730
|
area.
|
|
727
731
|
*/
|
|
728
|
-
_findDropTarget: function(evt) {
|
|
729
|
-
var loc = { x: evt.pageX, y: evt.pageY }
|
|
730
|
-
|
|
731
|
-
var target, frame
|
|
732
|
-
var ary = this._dropTargets()
|
|
733
|
-
for (var idx=0, len=ary.length; idx<len; idx++) {
|
|
734
|
-
target = ary[idx]
|
|
735
|
-
|
|
732
|
+
_findDropTarget: function (evt) {
|
|
733
|
+
var loc = { x: evt.pageX, y: evt.pageY };
|
|
734
|
+
|
|
735
|
+
var target, frame;
|
|
736
|
+
var ary = this._dropTargets();
|
|
737
|
+
for (var idx = 0, len = ary.length; idx < len; idx++) {
|
|
738
|
+
target = ary[idx];
|
|
739
|
+
|
|
736
740
|
// If the target is not visible, it is not valid.
|
|
737
|
-
if (!target.get('isVisibleInWindow')) continue
|
|
738
|
-
|
|
741
|
+
if (!target.get('isVisibleInWindow')) continue;
|
|
742
|
+
|
|
739
743
|
// get clippingFrame, converted to the pane.
|
|
740
|
-
frame = target.convertFrameToView(target.get('clippingFrame'), null)
|
|
741
|
-
|
|
744
|
+
frame = target.convertFrameToView(target.get('clippingFrame'), null);
|
|
745
|
+
|
|
742
746
|
// check to see if loc is inside. If so, then make this the drop target
|
|
743
747
|
// unless there is a drop target and the current one is not deeper.
|
|
744
748
|
if (SC.pointInRect(loc, frame)) return target;
|
|
745
|
-
}
|
|
746
|
-
return null
|
|
749
|
+
}
|
|
750
|
+
return null;
|
|
747
751
|
},
|
|
748
|
-
|
|
752
|
+
|
|
749
753
|
/** @private
|
|
750
|
-
Search the parent nodes of the target to find another view matching the
|
|
754
|
+
Search the parent nodes of the target to find another view matching the
|
|
751
755
|
drop target. Returns null if no matching target is found.
|
|
752
756
|
*/
|
|
753
|
-
_findNextDropTarget: function(target) {
|
|
754
|
-
var dropTargets = SC.Drag._dropTargets
|
|
757
|
+
_findNextDropTarget: function (target) {
|
|
758
|
+
var dropTargets = SC.Drag._dropTargets;
|
|
755
759
|
while (target = target.get('parentView')) {
|
|
756
|
-
if (dropTargets[SC.guidFor(target)]) return target
|
|
760
|
+
if (dropTargets[SC.guidFor(target)]) return target;
|
|
757
761
|
}
|
|
758
|
-
return null
|
|
762
|
+
return null;
|
|
759
763
|
},
|
|
760
|
-
|
|
764
|
+
|
|
761
765
|
// ............................................
|
|
762
766
|
// AUTOSCROLLING
|
|
763
767
|
//
|
|
764
|
-
|
|
768
|
+
|
|
765
769
|
/** @private
|
|
766
770
|
Performs auto-scrolling for the drag. This will only do anything if
|
|
767
771
|
the user keeps the mouse/touch within a few pixels of one location for a little
|
|
768
772
|
while.
|
|
769
|
-
|
|
773
|
+
|
|
770
774
|
Returns YES if a scroll was performed.
|
|
771
775
|
*/
|
|
772
|
-
_autoscroll: function(evt) {
|
|
773
|
-
if (!evt) evt = this._lastAutoscrollEvent
|
|
774
|
-
|
|
776
|
+
_autoscroll: function (evt) {
|
|
777
|
+
if (!evt) evt = this._lastAutoscrollEvent;
|
|
778
|
+
|
|
775
779
|
// If drag has ended, exit
|
|
776
780
|
if (!this._dragInProgress) return NO;
|
|
777
|
-
|
|
778
|
-
// STEP 1: Find the first view that we can actually scroll. This view
|
|
781
|
+
|
|
782
|
+
// STEP 1: Find the first view that we can actually scroll. This view
|
|
779
783
|
// must be:
|
|
780
784
|
// - scrollable
|
|
781
785
|
// - the mouse pointer or touch must be within a scrolling hot zone
|
|
782
|
-
// - there must be room left to scroll in that direction.
|
|
783
|
-
|
|
786
|
+
// - there must be room left to scroll in that direction.
|
|
787
|
+
|
|
784
788
|
// NOTE: an event is passed only when called from mouseDragged
|
|
785
789
|
var loc = evt ? { x: evt.pageX, y: evt.pageY } : this.get('location'),
|
|
786
790
|
view = this._findScrollableView(loc),
|
|
787
791
|
scrollableView = null, // become final view when found
|
|
788
792
|
vscroll, hscroll, min, max, edge, container, f;
|
|
789
|
-
|
|
790
|
-
// hscroll and vscroll will become either 1 or -1 to indicate scroll
|
|
793
|
+
|
|
794
|
+
// hscroll and vscroll will become either 1 or -1 to indicate scroll
|
|
791
795
|
// direction or 0 for no scroll.
|
|
792
|
-
|
|
796
|
+
|
|
793
797
|
while (view && !scrollableView) {
|
|
794
|
-
|
|
798
|
+
|
|
795
799
|
// quick check...can we scroll this view right now?
|
|
796
800
|
vscroll = view.get('canScrollVertical') ? 1 : 0;
|
|
797
801
|
hscroll = view.get('canScrollHorizontal') ? 1 : 0;
|
|
@@ -800,219 +804,219 @@ SC.Drag = SC.Object.extend(
|
|
|
800
804
|
if (vscroll || hscroll) {
|
|
801
805
|
container = view.get('containerView');
|
|
802
806
|
if (container) {
|
|
803
|
-
f = view.convertFrameToView(container.get('frame'),null);
|
|
807
|
+
f = view.convertFrameToView(container.get('frame'), null);
|
|
804
808
|
} else {
|
|
805
|
-
vscroll = hscroll = 0
|
|
809
|
+
vscroll = hscroll = 0; // can't autoscroll this mother
|
|
806
810
|
}
|
|
807
811
|
}
|
|
808
812
|
|
|
809
813
|
// handle vertical direction
|
|
810
814
|
if (vscroll) {
|
|
811
|
-
|
|
815
|
+
|
|
812
816
|
// bottom hotzone?
|
|
813
|
-
max = SC.maxY(f);
|
|
814
|
-
min = max - SC.DRAG_AUTOSCROLL_ZONE_THICKNESS
|
|
815
|
-
if (loc.y >= min && loc.y <= max) vscroll = 1
|
|
817
|
+
max = SC.maxY(f);
|
|
818
|
+
min = max - SC.DRAG_AUTOSCROLL_ZONE_THICKNESS;
|
|
819
|
+
if (loc.y >= min && loc.y <= max) vscroll = 1;
|
|
816
820
|
else {
|
|
817
821
|
// how about top
|
|
818
|
-
min = SC.minY(f);
|
|
819
|
-
max = min + SC.DRAG_AUTOSCROLL_ZONE_THICKNESS
|
|
820
|
-
if (loc.y >= min && loc.y <= max) vscroll = -1
|
|
821
|
-
else vscroll = 0
|
|
822
|
+
min = SC.minY(f);
|
|
823
|
+
max = min + SC.DRAG_AUTOSCROLL_ZONE_THICKNESS;
|
|
824
|
+
if (loc.y >= min && loc.y <= max) vscroll = -1;
|
|
825
|
+
else vscroll = 0; // can't scroll vertical
|
|
822
826
|
}
|
|
823
827
|
}
|
|
824
828
|
|
|
825
829
|
// handle horizontal direction
|
|
826
830
|
if (hscroll) {
|
|
827
|
-
|
|
831
|
+
|
|
828
832
|
// bottom hotzone?
|
|
829
|
-
max = SC.maxX(f);
|
|
830
|
-
min = max - SC.DRAG_AUTOSCROLL_ZONE_THICKNESS
|
|
831
|
-
if (loc.x >= min && loc.x <= max) hscroll = 1
|
|
833
|
+
max = SC.maxX(f);
|
|
834
|
+
min = max - SC.DRAG_AUTOSCROLL_ZONE_THICKNESS;
|
|
835
|
+
if (loc.x >= min && loc.x <= max) hscroll = 1;
|
|
832
836
|
else {
|
|
833
837
|
// how about top
|
|
834
|
-
min = SC.minX(f);
|
|
835
|
-
max = min + SC.DRAG_AUTOSCROLL_ZONE_THICKNESS
|
|
836
|
-
if (loc.x >= min && loc.x <= max) hscroll = -1
|
|
837
|
-
else hscroll = 0
|
|
838
|
+
min = SC.minX(f);
|
|
839
|
+
max = min + SC.DRAG_AUTOSCROLL_ZONE_THICKNESS;
|
|
840
|
+
if (loc.x >= min && loc.x <= max) hscroll = -1;
|
|
841
|
+
else hscroll = 0; // can't scroll vertical
|
|
838
842
|
}
|
|
839
843
|
}
|
|
840
|
-
|
|
844
|
+
|
|
841
845
|
// if we can scroll, then set this.
|
|
842
|
-
if (vscroll || hscroll) scrollableView = view
|
|
843
|
-
else view = this._findNextScrollableView(view)
|
|
846
|
+
if (vscroll || hscroll) scrollableView = view;
|
|
847
|
+
else view = this._findNextScrollableView(view);
|
|
844
848
|
}
|
|
845
|
-
|
|
846
|
-
// STEP 2: Only scroll if the user remains within the hot-zone for a
|
|
849
|
+
|
|
850
|
+
// STEP 2: Only scroll if the user remains within the hot-zone for a
|
|
847
851
|
// period of time
|
|
848
852
|
if (scrollableView && (this._lastScrollableView === scrollableView)) {
|
|
849
853
|
if ((Date.now() - this._hotzoneStartTime) > 100) {
|
|
850
|
-
this._horizontalScrollAmount *= 1.05
|
|
851
|
-
this._verticalScrollAmount *= 1.05
|
|
854
|
+
this._horizontalScrollAmount *= 1.05;
|
|
855
|
+
this._verticalScrollAmount *= 1.05; // accelerate scroll
|
|
852
856
|
}
|
|
853
|
-
|
|
857
|
+
|
|
854
858
|
// otherwise, reset everything and disallow scroll
|
|
855
859
|
} else {
|
|
856
|
-
this._lastScrollableView = scrollableView
|
|
857
|
-
this._horizontalScrollAmount = 15
|
|
858
|
-
this._verticalScrollAmount = 15
|
|
859
|
-
this._hotzoneStartTime = (scrollableView) ? Date.now() : null
|
|
860
|
-
hscroll = vscroll = 0
|
|
860
|
+
this._lastScrollableView = scrollableView;
|
|
861
|
+
this._horizontalScrollAmount = 15;
|
|
862
|
+
this._verticalScrollAmount = 15;
|
|
863
|
+
this._hotzoneStartTime = (scrollableView) ? Date.now() : null;
|
|
864
|
+
hscroll = vscroll = 0;
|
|
861
865
|
}
|
|
862
|
-
|
|
866
|
+
|
|
863
867
|
// STEP 3: Scroll!
|
|
864
868
|
if (scrollableView && (hscroll || vscroll)) {
|
|
865
|
-
var scroll = {
|
|
869
|
+
var scroll = {
|
|
866
870
|
x: hscroll * this._horizontalScrollAmount,
|
|
867
|
-
y: vscroll * this._verticalScrollAmount
|
|
868
|
-
}
|
|
869
|
-
scrollableView.scrollBy(scroll)
|
|
871
|
+
y: vscroll * this._verticalScrollAmount
|
|
872
|
+
};
|
|
873
|
+
scrollableView.scrollBy(scroll);
|
|
870
874
|
}
|
|
871
|
-
|
|
875
|
+
|
|
872
876
|
// If a scrollable view was found, then check later
|
|
873
877
|
if (scrollableView) {
|
|
874
878
|
if (evt) {
|
|
875
879
|
this._lastAutoscrollEvent = { pageX: evt.pageX, pageY: evt.pageY };
|
|
876
880
|
}
|
|
877
881
|
this.invokeLater(this._autoscroll, 100, null);
|
|
878
|
-
return YES
|
|
882
|
+
return YES;
|
|
879
883
|
} else {
|
|
880
884
|
this._lastAutoscrollEvent = null;
|
|
881
|
-
return NO
|
|
885
|
+
return NO;
|
|
882
886
|
}
|
|
883
887
|
},
|
|
884
|
-
|
|
888
|
+
|
|
885
889
|
/** @private
|
|
886
|
-
Returns an array of scrollable views, sorted with nested scrollable views
|
|
887
|
-
at the top of the array. The first time this method is called during a
|
|
888
|
-
drag, it will reconstruct this array using the current state of scrollable
|
|
890
|
+
Returns an array of scrollable views, sorted with nested scrollable views
|
|
891
|
+
at the top of the array. The first time this method is called during a
|
|
892
|
+
drag, it will reconstruct this array using the current state of scrollable
|
|
889
893
|
views. Afterwards it uses the cached set until the drop completes.
|
|
890
894
|
*/
|
|
891
|
-
_scrollableViews: function() {
|
|
892
|
-
if (this._cachedScrollableView) return this._cachedScrollableView
|
|
893
|
-
|
|
895
|
+
_scrollableViews: function () {
|
|
896
|
+
if (this._cachedScrollableView) return this._cachedScrollableView;
|
|
897
|
+
|
|
894
898
|
// build array of scrollable views
|
|
895
|
-
var ret = []
|
|
896
|
-
var hash = SC.Drag._scrollableViews
|
|
899
|
+
var ret = [];
|
|
900
|
+
var hash = SC.Drag._scrollableViews;
|
|
897
901
|
for (var key in hash) {
|
|
898
|
-
if (hash.hasOwnProperty(key)) ret.push(hash[key])
|
|
902
|
+
if (hash.hasOwnProperty(key)) ret.push(hash[key]);
|
|
899
903
|
}
|
|
900
|
-
|
|
904
|
+
|
|
901
905
|
// now resort. This custom function will sort nested scrollable views
|
|
902
906
|
// at the start of the list.
|
|
903
|
-
ret = ret.sort(function(a,b) {
|
|
907
|
+
ret = ret.sort(function (a, b) {
|
|
904
908
|
var view = a;
|
|
905
909
|
while (view = view.get('parentView')) {
|
|
906
|
-
if (b === view) return -1
|
|
910
|
+
if (b === view) return -1;
|
|
907
911
|
}
|
|
908
|
-
return 1;
|
|
909
|
-
})
|
|
910
|
-
|
|
911
|
-
this._cachedScrollableView = ret
|
|
912
|
-
return ret
|
|
912
|
+
return 1;
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
this._cachedScrollableView = ret;
|
|
916
|
+
return ret;
|
|
913
917
|
},
|
|
914
|
-
|
|
918
|
+
|
|
915
919
|
/** @private
|
|
916
|
-
This will search through the scrollable views, looking for one in the
|
|
920
|
+
This will search through the scrollable views, looking for one in the
|
|
917
921
|
target area.
|
|
918
922
|
*/
|
|
919
|
-
_findScrollableView: function(loc) {
|
|
923
|
+
_findScrollableView: function (loc) {
|
|
920
924
|
var ary = this._scrollableViews(),
|
|
921
925
|
len = ary ? ary.length : 0,
|
|
922
926
|
target, frame, idx;
|
|
923
|
-
|
|
924
|
-
for (idx=0; idx<len; idx++) {
|
|
925
|
-
target = ary[idx]
|
|
926
|
-
|
|
927
|
-
if (!target.get('isVisibleInWindow')) continue
|
|
928
|
-
|
|
927
|
+
|
|
928
|
+
for (idx = 0; idx < len; idx++) {
|
|
929
|
+
target = ary[idx];
|
|
930
|
+
|
|
931
|
+
if (!target.get('isVisibleInWindow')) continue;
|
|
932
|
+
|
|
929
933
|
// get clippingFrame, converted to the pane
|
|
930
|
-
frame = target.convertFrameToView(target.get('clippingFrame'), null)
|
|
931
|
-
|
|
934
|
+
frame = target.convertFrameToView(target.get('clippingFrame'), null);
|
|
935
|
+
|
|
932
936
|
// check to see if loc is inside
|
|
933
937
|
if (SC.pointInRect(loc, frame)) return target;
|
|
934
|
-
}
|
|
935
|
-
return null
|
|
938
|
+
}
|
|
939
|
+
return null;
|
|
936
940
|
},
|
|
937
|
-
|
|
941
|
+
|
|
938
942
|
/** @private
|
|
939
943
|
Search the parent nodes of the target to find another scrollable view.
|
|
940
944
|
return null if none is found.
|
|
941
945
|
*/
|
|
942
|
-
_findNextScrollableView: function(view) {
|
|
943
|
-
var scrollableViews = SC.Drag._scrollableViews
|
|
946
|
+
_findNextScrollableView: function (view) {
|
|
947
|
+
var scrollableViews = SC.Drag._scrollableViews;
|
|
944
948
|
while (view = view.get('parentView')) {
|
|
945
|
-
if (scrollableViews[SC.guidFor(view)]) return view
|
|
949
|
+
if (scrollableViews[SC.guidFor(view)]) return view;
|
|
946
950
|
}
|
|
947
|
-
return null
|
|
948
|
-
}
|
|
949
|
-
|
|
951
|
+
return null;
|
|
952
|
+
}
|
|
953
|
+
|
|
950
954
|
});
|
|
951
955
|
|
|
952
956
|
SC.Drag.mixin(
|
|
953
957
|
/** @scope SC.Drag */ {
|
|
954
|
-
|
|
955
|
-
/**
|
|
958
|
+
|
|
959
|
+
/**
|
|
956
960
|
This is the method you use to initiate a new drag. See class documentation
|
|
957
961
|
for more info on the options taken by this method.
|
|
958
|
-
|
|
962
|
+
|
|
959
963
|
@params {Hash} ops a hash of options. See documentation above.
|
|
960
964
|
*/
|
|
961
|
-
start: function(ops) {
|
|
962
|
-
var ret = this.create(ops)
|
|
963
|
-
ret.startDrag()
|
|
964
|
-
return ret
|
|
965
|
+
start: function (ops) {
|
|
966
|
+
var ret = this.create(ops);
|
|
967
|
+
ret.startDrag();
|
|
968
|
+
return ret;
|
|
965
969
|
},
|
|
966
|
-
|
|
970
|
+
|
|
967
971
|
/** @private */
|
|
968
972
|
_dropTargets: {},
|
|
969
|
-
|
|
973
|
+
|
|
970
974
|
/** @private */
|
|
971
975
|
_scrollableViews: {},
|
|
972
|
-
|
|
976
|
+
|
|
973
977
|
/**
|
|
974
978
|
Register the view object as a drop target.
|
|
975
|
-
|
|
979
|
+
|
|
976
980
|
This method is called automatically whenever a view is created with the
|
|
977
981
|
isDropTarget property set to `YES`. You generally will not need to call it
|
|
978
982
|
yourself.
|
|
979
|
-
|
|
983
|
+
|
|
980
984
|
@param {SC.View} target a view implementing the SC.DropTarget protocol
|
|
981
985
|
*/
|
|
982
|
-
addDropTarget: function(target) {
|
|
986
|
+
addDropTarget: function (target) {
|
|
983
987
|
this._dropTargets[SC.guidFor(target)] = target;
|
|
984
988
|
},
|
|
985
|
-
|
|
989
|
+
|
|
986
990
|
/**
|
|
987
991
|
Unregister the view object as a drop target.
|
|
988
|
-
|
|
989
|
-
This method is called automatically whenever a view is removed from the
|
|
992
|
+
|
|
993
|
+
This method is called automatically whenever a view is removed from the
|
|
990
994
|
hierarchy. You generally will not need to call it yourself.
|
|
991
|
-
|
|
995
|
+
|
|
992
996
|
@param {SC.View} target A previously registered drop target
|
|
993
997
|
*/
|
|
994
|
-
removeDropTarget: function(target) {
|
|
998
|
+
removeDropTarget: function (target) {
|
|
995
999
|
delete this._dropTargets[SC.guidFor(target)];
|
|
996
1000
|
},
|
|
997
|
-
|
|
1001
|
+
|
|
998
1002
|
/**
|
|
999
|
-
Register the view object as a scrollable view. These views will
|
|
1003
|
+
Register the view object as a scrollable view. These views will
|
|
1000
1004
|
auto-scroll during a drag.
|
|
1001
|
-
|
|
1005
|
+
|
|
1002
1006
|
@param {SC.View} target The view that should be auto-scrolled
|
|
1003
1007
|
*/
|
|
1004
|
-
addScrollableView: function(target) {
|
|
1008
|
+
addScrollableView: function (target) {
|
|
1005
1009
|
this._scrollableViews[SC.guidFor(target)] = target;
|
|
1006
1010
|
},
|
|
1007
|
-
|
|
1011
|
+
|
|
1008
1012
|
/**
|
|
1009
1013
|
Remove the view object as a scrollable view. These views will auto-scroll
|
|
1010
1014
|
during a drag.
|
|
1011
|
-
|
|
1015
|
+
|
|
1012
1016
|
@param {SC.View} target A previously registered scrollable view
|
|
1013
1017
|
*/
|
|
1014
|
-
removeScrollableView: function(target) {
|
|
1018
|
+
removeScrollableView: function (target) {
|
|
1015
1019
|
delete this._scrollableViews[SC.guidFor(target)];
|
|
1016
1020
|
}
|
|
1017
|
-
|
|
1021
|
+
|
|
1018
1022
|
});
|