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
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
/** @class
|
|
9
9
|
|
|
10
|
-
A SliderView shows a horizontal slider control that you can use to set
|
|
10
|
+
A SliderView shows a horizontal slider control that you can use to set
|
|
11
11
|
variable values.
|
|
12
12
|
|
|
13
13
|
You can use a slider view much like you would any other control. Simply
|
|
14
|
-
set the value or content/contentValueKey to whatever value you want to
|
|
15
|
-
display. You can also set the maximumValue and minValue properties to
|
|
14
|
+
set the value or content/contentValueKey to whatever value you want to
|
|
15
|
+
display. You can also set the maximumValue and minValue properties to
|
|
16
16
|
determine the mapping of the control to its children.
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
@extends SC.View
|
|
19
19
|
@extends SC.Control
|
|
20
20
|
@since SproutCore 1.0
|
|
@@ -22,40 +22,40 @@
|
|
|
22
22
|
*/
|
|
23
23
|
SC.SliderView = SC.View.extend(SC.Control,
|
|
24
24
|
/** @scope SC.SliderView.prototype */ {
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
classNames: 'sc-slider-view',
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
The WAI-ARIA role for slider view. This property's value should not be
|
|
30
30
|
changed.
|
|
31
31
|
|
|
32
|
-
@
|
|
32
|
+
@type String
|
|
33
33
|
*/
|
|
34
34
|
ariaRole: 'slider',
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
Bind this to the current value of the progress bar. Note that by default
|
|
38
|
-
an empty value will disable the progress bar and a multiple value too make
|
|
37
|
+
Bind this to the current value of the progress bar. Note that by default
|
|
38
|
+
an empty value will disable the progress bar and a multiple value too make
|
|
39
39
|
it indeterminate.
|
|
40
40
|
*/
|
|
41
41
|
value: 0.50,
|
|
42
42
|
valueBindingDefault: SC.Binding.single().notEmpty(),
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
/**
|
|
45
45
|
The minimum value of the progress.
|
|
46
|
-
*/
|
|
46
|
+
*/
|
|
47
47
|
minimum: 0,
|
|
48
48
|
minimumBindingDefault: SC.Binding.single().notEmpty(),
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
Optionally specify the key used to extract the minimum progress value
|
|
51
|
+
Optionally specify the key used to extract the minimum progress value
|
|
52
52
|
from the content object. If this is set to null then the minimum value
|
|
53
53
|
will not be derived from the content object.
|
|
54
|
-
|
|
55
|
-
@
|
|
54
|
+
|
|
55
|
+
@type String
|
|
56
56
|
*/
|
|
57
57
|
contentMinimumKey: null,
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
/**
|
|
60
60
|
The maximum value of the progress bar.
|
|
61
61
|
*/
|
|
@@ -63,25 +63,25 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
63
63
|
maximumBindingDefault: SC.Binding.single().notEmpty(),
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
Optionally specify the key used to extract the maximum progress value
|
|
66
|
+
Optionally specify the key used to extract the maximum progress value
|
|
67
67
|
from the content object. If this is set to null then the maximum value
|
|
68
68
|
will not be derived from the content object.
|
|
69
|
-
|
|
70
|
-
@
|
|
69
|
+
|
|
70
|
+
@type String
|
|
71
71
|
*/
|
|
72
72
|
contentMaximumKey: null,
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
/**
|
|
75
75
|
Optionally set to the minimum step size allowed.
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
All values will be rounded to this step size when displayed.
|
|
78
78
|
*/
|
|
79
79
|
step: 0.1,
|
|
80
80
|
|
|
81
81
|
// ..........................................................
|
|
82
82
|
// INTERNAL PROPERTIES
|
|
83
|
-
//
|
|
84
|
-
|
|
83
|
+
//
|
|
84
|
+
|
|
85
85
|
displayProperties: ['displayValue', 'ariaValue', 'minimum', 'maximum', 'step', 'frame'],
|
|
86
86
|
|
|
87
87
|
/**
|
|
@@ -95,7 +95,7 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
95
95
|
// The name of the render delegate which is creating and maintaining
|
|
96
96
|
// the DOM associated with instances of this view
|
|
97
97
|
renderDelegateName: 'sliderRenderDelegate',
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
displayValue: function() {
|
|
100
100
|
var min = this.get('minimum'),
|
|
101
101
|
max = this.get('maximum'),
|
|
@@ -109,27 +109,27 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
109
109
|
if (!SC.none(step) && step !== 0) {
|
|
110
110
|
value = Math.round(value / step) * step;
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
// determine the percent across
|
|
114
114
|
if(value!==0) value = Math.floor((value - min) / (max - min) * 100);
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
return value;
|
|
117
117
|
}.property('value', 'minimum', 'maximum', 'step').cacheable(),
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
_isMouseDown: NO,
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
mouseDown: function(evt) {
|
|
122
|
-
if (!this.get('
|
|
122
|
+
if (!this.get('isEnabledInPane')) return YES; // nothing to do...
|
|
123
123
|
this.set('isActive', YES);
|
|
124
124
|
this._isMouseDown = YES ;
|
|
125
125
|
return this._triggerHandle(evt, YES);
|
|
126
126
|
},
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
// mouseDragged uses same technique as mouseDown.
|
|
129
|
-
mouseDragged: function(evt) {
|
|
130
|
-
return this._isMouseDown ? this._triggerHandle(evt) : YES;
|
|
129
|
+
mouseDragged: function(evt) {
|
|
130
|
+
return this._isMouseDown ? this._triggerHandle(evt) : YES;
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
// remove active class
|
|
134
134
|
mouseUp: function(evt) {
|
|
135
135
|
if (this._isMouseDown) this.set('isActive', NO);
|
|
@@ -137,9 +137,9 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
137
137
|
this._isMouseDown = NO;
|
|
138
138
|
return ret ;
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
mouseWheel: function(evt) {
|
|
142
|
-
if (!this.get('
|
|
142
|
+
if (!this.get('isEnabledInPane')) return YES;
|
|
143
143
|
var min = this.get('minimum'),
|
|
144
144
|
max = this.get('maximum'),
|
|
145
145
|
step = this.get('step'),
|
|
@@ -148,21 +148,21 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
148
148
|
if (newVal< min) this.setIfChanged('value', min);
|
|
149
149
|
else if (newVal> max) this.setIfChanged('value', max);
|
|
150
150
|
else this.setIfChanged('value', newVal);
|
|
151
|
-
return YES ;
|
|
151
|
+
return YES ;
|
|
152
152
|
},
|
|
153
|
-
|
|
153
|
+
|
|
154
154
|
touchStart: function(evt){
|
|
155
155
|
return this.mouseDown(evt);
|
|
156
156
|
},
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
touchEnd: function(evt){
|
|
159
159
|
return this.mouseUp(evt);
|
|
160
160
|
},
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
touchesDragged: function(evt){
|
|
163
163
|
return this.mouseDragged(evt);
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
/** @private
|
|
167
167
|
Updates the handle based on the mouse location of the handle in the
|
|
168
168
|
event.
|
|
@@ -171,63 +171,63 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
171
171
|
var width = this.get('frame').width,
|
|
172
172
|
min = this.get('minimum'), max=this.get('maximum'),
|
|
173
173
|
step = this.get('step'), v=this.get('value'), loc;
|
|
174
|
-
|
|
175
|
-
if(firstEvent){
|
|
174
|
+
|
|
175
|
+
if(firstEvent){
|
|
176
176
|
loc = this.convertFrameFromView({ x: evt.pageX }).x;
|
|
177
177
|
this._evtDiff = evt.pageX - loc;
|
|
178
178
|
}else{
|
|
179
179
|
loc = evt.pageX-this._evtDiff;
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
// convert to percentage
|
|
183
183
|
loc = Math.max(0, Math.min(loc / width, 1));
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
// if the location is NOT in the general vicinity of the slider, we assume
|
|
186
186
|
// that the mouse pointer or touch is in the center of where the knob should be.
|
|
187
187
|
// otherwise, if we are starting, we need to do extra to add an offset
|
|
188
188
|
if (firstEvent) {
|
|
189
189
|
var value = this.get("value");
|
|
190
190
|
value = (value - min) / (max - min);
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
// if the value and the loc are within 16px
|
|
193
193
|
if (Math.abs(value * width - loc * width) < 16) this._offset = value - loc;
|
|
194
194
|
else this._offset = 0;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
|
|
197
197
|
// add offset and constrain
|
|
198
198
|
loc = Math.max(0, Math.min(loc + this._offset, 1));
|
|
199
199
|
|
|
200
200
|
// convert to value using minimum/maximum then constrain to steps
|
|
201
201
|
loc = min + ((max-min)*loc);
|
|
202
202
|
if (step !== 0) loc = Math.round(loc / step) * step ;
|
|
203
|
-
|
|
203
|
+
|
|
204
204
|
// if changes by more than a rounding amount, set v.
|
|
205
205
|
if (Math.abs(v-loc)>=0.01) {
|
|
206
|
-
this.set('value', loc); // adjust
|
|
206
|
+
this.set('value', loc); // adjust
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
|
|
209
209
|
return YES ;
|
|
210
210
|
},
|
|
211
|
-
|
|
212
|
-
/** tied to the
|
|
211
|
+
|
|
212
|
+
/** tied to the isEnabledInPane state */
|
|
213
213
|
acceptsFirstResponder: function() {
|
|
214
|
-
if (SC.FOCUS_ALL_CONTROLS) { return this.get('
|
|
214
|
+
if (SC.FOCUS_ALL_CONTROLS) { return this.get('isEnabledInPane'); }
|
|
215
215
|
return NO;
|
|
216
|
-
}.property('
|
|
217
|
-
|
|
216
|
+
}.property('isEnabledInPane'),
|
|
217
|
+
|
|
218
218
|
keyDown: function(evt) {
|
|
219
219
|
// handle tab key
|
|
220
220
|
if (evt.which === 9 || evt.keyCode === 9) {
|
|
221
221
|
var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView');
|
|
222
222
|
if(view) view.becomeFirstResponder();
|
|
223
|
-
else evt.allowDefault();
|
|
223
|
+
else evt.allowDefault();
|
|
224
224
|
return YES ; // handled
|
|
225
225
|
}
|
|
226
226
|
if (evt.which >= 33 && evt.which <= 40){
|
|
227
227
|
var min = this.get('minimum'),max=this.get('maximum'),
|
|
228
228
|
step = this.get('step'),
|
|
229
229
|
size = max-min, val=0, calculateStep, current=this.get('value');
|
|
230
|
-
|
|
230
|
+
|
|
231
231
|
if (evt.which === 37 || evt.which === 38 || evt.which === 34 ){
|
|
232
232
|
if(step === 0){
|
|
233
233
|
if(size<100){
|
|
@@ -252,7 +252,7 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
252
252
|
}
|
|
253
253
|
}else{
|
|
254
254
|
val = current+step;
|
|
255
|
-
}
|
|
255
|
+
}
|
|
256
256
|
}
|
|
257
257
|
if (evt.which === 36){
|
|
258
258
|
val=max;
|
|
@@ -265,7 +265,7 @@ SC.SliderView = SC.View.extend(SC.Control,
|
|
|
265
265
|
evt.allowDefault();
|
|
266
266
|
return NO;
|
|
267
267
|
}
|
|
268
|
-
return YES;
|
|
268
|
+
return YES;
|
|
269
269
|
},
|
|
270
270
|
|
|
271
271
|
contentKeys: {
|
|
@@ -1,891 +1,961 @@
|
|
|
1
1
|
// ==========================================================================
|
|
2
2
|
// Project: SproutCore - JavaScript Application Framework
|
|
3
|
-
// Copyright: ©2006-
|
|
3
|
+
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors.
|
|
4
4
|
// Portions ©2008-2011 Apple Inc. All rights reserved.
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
|
6
6
|
// ==========================================================================
|
|
7
7
|
|
|
8
8
|
sc_require('views/split_divider');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
Prevents the view from getting resized when the SplitView is resized,
|
|
12
|
+
or the user resizes or moves an adjacent child view.
|
|
13
|
+
*/
|
|
14
|
+
SC.FIXED_SIZE = 'sc-fixed-size';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
Prevents the view from getting resized when the SplitView is resized
|
|
18
|
+
(unless the SplitView has resized all other views), but allows it to
|
|
19
|
+
be resized when the user resizes or moves an adjacent child view.
|
|
20
|
+
*/
|
|
21
|
+
SC.RESIZE_MANUAL = 'sc-manual-size';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
Allows the view to be resized when the SplitView is resized or due to
|
|
25
|
+
the user resizing or moving an adjacent child view.
|
|
26
|
+
*/
|
|
27
|
+
SC.RESIZE_AUTOMATIC = 'sc-automatic-resize';
|
|
28
|
+
|
|
13
29
|
|
|
14
30
|
/**
|
|
15
31
|
@class
|
|
16
32
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
optionally, a splitDividerView. You can also set various other properties
|
|
20
|
-
to control the minimum and maximum thickness allowed for the flexible views.
|
|
33
|
+
SC.SplitView arranges multiple views side-by-side or on top of each
|
|
34
|
+
other.
|
|
21
35
|
|
|
22
|
-
|
|
36
|
+
SplitView can resize its children to fit (the default behavior),
|
|
37
|
+
or resize itself to fit its children--allowing you to build column-
|
|
38
|
+
based file browsers and the like. As one child (a divider, most likely)
|
|
39
|
+
is moved, SplitView can move additional children to get them out of the way.
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
Setting Up SplitViews
|
|
42
|
+
=======================================
|
|
43
|
+
You can set up a split view like any other view in SproutCore:
|
|
25
44
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
SplitView.design({
|
|
46
|
+
childViews: 'leftPanel rightPanel'.w(),
|
|
47
|
+
|
|
48
|
+
leftPanel: SC.View.design(SC.SplitChild, {
|
|
49
|
+
minimumSize: 200
|
|
29
50
|
}),
|
|
30
51
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//
|
|
52
|
+
rightPanel: SC.View.design(SC.SplitChild, {
|
|
53
|
+
// it is usually the right panel you want to resize
|
|
54
|
+
// as the SplitView resizes:
|
|
55
|
+
autoResizeStyle: SC.RESIZE_AUTOMATIC
|
|
34
56
|
})
|
|
35
|
-
|
|
36
57
|
})
|
|
37
58
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
a delegate object.
|
|
59
|
+
Dividers
|
|
60
|
+
------------------------------------------
|
|
61
|
+
Dividers are automatically added between every child view.
|
|
62
|
+
|
|
63
|
+
You can specify what dividers to create in two ways:
|
|
44
64
|
|
|
45
|
-
|
|
46
|
-
clicking on a split divider view. When a view is collapsed, it's isVisible
|
|
47
|
-
property is set to NO and its space it removed from the view. Double
|
|
48
|
-
clicking on a divider again will restore a collapsed view. A user can also
|
|
49
|
-
start to drag the divider to show the collapsed view.
|
|
65
|
+
- Set splitDividerView to change the default divider view class to use.
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
- Override splitDividerViewBetween(splitView, view1, view2), either in
|
|
68
|
+
your subclass of SC.SplitView or in a delegate, and return the divider
|
|
69
|
+
view instance that should go between the two views.
|
|
54
70
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
As far as SplitView is concerned, dividers are actually just ordinary
|
|
72
|
+
child views. They usually have an autoResizeStyle of SC.FIXED_SIZE, and
|
|
73
|
+
usually mixin SC.SplitThumb to relay mouse and touch events to the SplitView.
|
|
74
|
+
To prevent adding dividers between dividers and views or dividers and dividers,
|
|
75
|
+
SC.SplitView marks all dividers with an isSplitDivider property.
|
|
60
76
|
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
If you do not want to use split dividers at all, or wish to set them up
|
|
78
|
+
manually in your childViews array, set splitDividerView to null.
|
|
63
79
|
|
|
64
80
|
@extends SC.View
|
|
65
|
-
@
|
|
66
|
-
@author Charles Jolley
|
|
67
|
-
@author Lawrence Pit
|
|
68
|
-
@author Erich Ocean
|
|
81
|
+
@author Alex Iskander
|
|
69
82
|
*/
|
|
70
|
-
SC.SplitView = SC.View.extend(
|
|
71
|
-
|
|
83
|
+
SC.SplitView = SC.View.extend({
|
|
84
|
+
/**@scope SC.SplitView.prototype*/
|
|
72
85
|
|
|
73
86
|
classNames: ['sc-split-view'],
|
|
74
87
|
|
|
75
|
-
|
|
88
|
+
childViews: ['topLeftView', 'bottomRightView'],
|
|
89
|
+
|
|
90
|
+
// used by the splitView computed property to find the nearest SplitView.
|
|
91
|
+
isSplitView: YES,
|
|
76
92
|
|
|
77
93
|
/**
|
|
78
|
-
|
|
94
|
+
* The type of view to create for the divider views. SC.SplitDividerView by default.
|
|
95
|
+
*
|
|
96
|
+
* Should be a class, not an instance.
|
|
97
|
+
*
|
|
98
|
+
* @type {SC.View}
|
|
79
99
|
*/
|
|
80
|
-
|
|
100
|
+
splitDividerView: SC.SplitDividerView,
|
|
81
101
|
|
|
82
102
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
* Determines whether the SplitView should lay out its children
|
|
104
|
+
* horizontally or vertically.
|
|
105
|
+
*
|
|
106
|
+
* Possible values:
|
|
107
|
+
*
|
|
108
|
+
* - SC.LAYOUT_HORIZONTAL: side-by-side
|
|
109
|
+
* - SC.LAYOUT_VERTICAL: on top of each other
|
|
110
|
+
*
|
|
111
|
+
* @type LayoutDirection
|
|
87
112
|
*/
|
|
88
113
|
layoutDirection: SC.LAYOUT_HORIZONTAL,
|
|
89
114
|
|
|
90
115
|
/**
|
|
91
|
-
|
|
116
|
+
* Determines whether the SplitView should attempt to resize its
|
|
117
|
+
* child views to fit within the SplitView's own frame (the default).
|
|
118
|
+
*
|
|
119
|
+
* If NO, the SplitView will decide its own size based on its children.
|
|
120
|
+
*
|
|
121
|
+
* @type Boolean
|
|
122
|
+
* @default YES
|
|
123
|
+
*/
|
|
124
|
+
shouldResizeChildrenToFit: YES,
|
|
92
125
|
|
|
93
|
-
|
|
94
|
-
|
|
126
|
+
/**
|
|
127
|
+
* The cursor of the child view currently being dragged (if any).
|
|
128
|
+
* This allows the cursor to be used even if the user drags "too far",
|
|
129
|
+
* past the child's own boundaries.
|
|
130
|
+
*
|
|
131
|
+
* @type {String}
|
|
95
132
|
*/
|
|
96
|
-
|
|
133
|
+
splitChildCursorStyle: null,
|
|
97
134
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
135
|
+
/**
|
|
136
|
+
@private
|
|
137
|
+
Only occurs during drag, which only happens after render, so we
|
|
138
|
+
update directly.
|
|
139
|
+
*/
|
|
140
|
+
_scsv_splitChildCursorDidChange: function() {
|
|
141
|
+
this.get('cursor').set('cursorStyle', this.get('splitChildCursorStyle'));
|
|
142
|
+
}.observes('splitChildCursorStyle'),
|
|
101
143
|
|
|
102
|
-
| SC.RESIZE_BOTTOM_RIGHT | (default) resizes bottomRightView |
|
|
103
|
-
| SC.RESIZE_TOP_LEFT | resized topLeftView |
|
|
104
144
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
145
|
+
// set up the SC.Cursor instance that this view and all the subviews
|
|
146
|
+
// will share.
|
|
147
|
+
init: function() {
|
|
148
|
+
this.cursor = SC.Cursor.create();
|
|
149
|
+
sc_super();
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
//
|
|
153
|
+
// RENDERING
|
|
154
|
+
// Things like layoutDirection must be rendered as class names.
|
|
155
|
+
// We delegate to a render delegate.
|
|
156
|
+
//
|
|
157
|
+
displayProperties: ['layoutDirection'],
|
|
158
|
+
renderDelegateName: 'splitRenderDelegate',
|
|
109
159
|
|
|
160
|
+
//
|
|
161
|
+
// UTILITIES
|
|
162
|
+
//
|
|
110
163
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
164
|
+
* @private
|
|
165
|
+
* Returns either the width or the height of the SplitView's frame,
|
|
166
|
+
* depending on the value of layoutDirection. If layoutDirection is
|
|
167
|
+
* SC.LAYOUT_HORIZONTAL, this will return the SplitView's width; otherwise,
|
|
168
|
+
* the SplitView's height.
|
|
169
|
+
*
|
|
170
|
+
* @property
|
|
171
|
+
* @type {Number}
|
|
172
|
+
*/
|
|
173
|
+
_frameSize: function(){
|
|
174
|
+
if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) {
|
|
175
|
+
return this.get('frame').width;
|
|
176
|
+
} else {
|
|
177
|
+
return this.get('frame').height;
|
|
178
|
+
}
|
|
179
|
+
}.property('frame', 'layoutDirection').cacheable(),
|
|
114
180
|
|
|
115
|
-
|
|
116
|
-
|
|
181
|
+
viewDidResize: function(orig) {
|
|
182
|
+
this.scheduleTiling();
|
|
183
|
+
orig();
|
|
184
|
+
}.enhance(),
|
|
117
185
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
defaultThickness: 0.5,
|
|
186
|
+
layoutDirectionDidChange: function() {
|
|
187
|
+
this.scheduleTiling();
|
|
188
|
+
}.observes('layoutDirection'),
|
|
122
189
|
|
|
190
|
+
//
|
|
191
|
+
// PUBLIC CHILD VIEW ADJUSTMENT API
|
|
192
|
+
//
|
|
123
193
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
194
|
+
* Attempts to adjust the position of a child view, such as a divider.
|
|
195
|
+
*
|
|
196
|
+
* The implementation for this may be overridden in the delegate method
|
|
197
|
+
* splitViewAdjustPositionForChild.
|
|
198
|
+
*
|
|
199
|
+
* You may use this method to automatically collapse the view by setting
|
|
200
|
+
* the view's position to the position of the next or previous view (accessible
|
|
201
|
+
* via the child's nextView and previousView properties and the
|
|
202
|
+
* getPositionForChild method).
|
|
203
|
+
*
|
|
204
|
+
* @param {SC.View} child The child to move.
|
|
205
|
+
* @param {Number} position The position to move the child to.
|
|
206
|
+
* @returns {Number} The position to which the child was actually moved.
|
|
128
207
|
*/
|
|
129
|
-
|
|
208
|
+
adjustPositionForChild: function(child, position){
|
|
209
|
+
return this.invokeDelegateMethod(this.get('delegate'), 'splitViewAdjustPositionForChild', this, child, position);
|
|
210
|
+
},
|
|
130
211
|
|
|
131
212
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
213
|
+
* Returns the position within the split view for a child view,
|
|
214
|
+
* such as a divider. This position is not necessarily identical
|
|
215
|
+
* to the view's actual layout 'left' or 'right'; that position could
|
|
216
|
+
* be offset--for instance, to give a larger grab area to the divider.
|
|
217
|
+
*
|
|
218
|
+
* The implementation for this is in the delegate method
|
|
219
|
+
* splitViewGetPositionForChild.
|
|
220
|
+
*
|
|
221
|
+
* @param {SC.View} child The child whose position to find.
|
|
222
|
+
* @returns {Number} The position.
|
|
136
223
|
*/
|
|
137
|
-
|
|
224
|
+
getPositionForChild: function(child){
|
|
225
|
+
return this.invokeDelegateMethod(this.get('delegate'), 'splitViewGetPositionForChild', this, child);
|
|
226
|
+
},
|
|
138
227
|
|
|
139
|
-
|
|
140
|
-
|
|
228
|
+
//
|
|
229
|
+
// CHILD VIEW MANAGEMENT
|
|
230
|
+
//
|
|
141
231
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
232
|
+
// When children are added and removed, we must re-run the setup process that
|
|
233
|
+
// sets the SplitView child properties such as nextView, previousView, etc.,
|
|
234
|
+
// and which adds dividers.
|
|
235
|
+
didAddChild: function() {
|
|
236
|
+
// we have to add a guard because _scsv_setupChildViews may add or remove
|
|
237
|
+
// dividers, causing this method to be called again uselessly.
|
|
238
|
+
// this is purely for performance. The guard goes here, rather than in
|
|
239
|
+
// setupChildViews, because of the invokeOnce.
|
|
240
|
+
if (this._scsv_settingUpChildViews) return;
|
|
241
|
+
this._scsv_settingUpChildViews = YES;
|
|
146
242
|
|
|
147
|
-
|
|
148
|
-
Sets maximum thickness of bottomRight view.
|
|
243
|
+
this.invokeOnce('_scsv_setupChildViews');
|
|
149
244
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
*/
|
|
153
|
-
bottomRightMaxThickness: null,
|
|
245
|
+
this._scsv_settingUpChildViews = NO;
|
|
246
|
+
},
|
|
154
247
|
|
|
155
|
-
|
|
156
|
-
|
|
248
|
+
didRemoveChild: function() {
|
|
249
|
+
// we have to add a guard because _scsv_setupChildViews may add or remove
|
|
250
|
+
// dividers, causing this method to be called again uselessly.
|
|
251
|
+
// this is purely for performance. The guard goes here, rather than in
|
|
252
|
+
// setupChildViews, because of the invokeOnce.
|
|
253
|
+
if (this._scsv_settingUpChildViews) return;
|
|
254
|
+
this._scsv_settingUpChildViews = YES;
|
|
157
255
|
|
|
158
|
-
|
|
159
|
-
@default null
|
|
160
|
-
*/
|
|
161
|
-
dividerThickness: null,
|
|
256
|
+
this.invokeOnce('_scsv_setupChildViews');
|
|
162
257
|
|
|
163
|
-
|
|
164
|
-
|
|
258
|
+
this._scsv_settingUpChildViews = NO;
|
|
259
|
+
},
|
|
165
260
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
*/
|
|
169
|
-
isSplitView: YES,
|
|
261
|
+
createChildViews: function() {
|
|
262
|
+
sc_super();
|
|
170
263
|
|
|
171
|
-
|
|
172
|
-
|
|
264
|
+
if (this._scsv_settingUpChildViews) return;
|
|
265
|
+
this._scsv_settingUpChildViews = YES;
|
|
173
266
|
|
|
174
|
-
|
|
175
|
-
@default SC.View
|
|
176
|
-
*/
|
|
177
|
-
topLeftView: SC.View,
|
|
267
|
+
this.invokeOnce('_scsv_setupChildViews');
|
|
178
268
|
|
|
179
|
-
|
|
180
|
-
|
|
269
|
+
this._scsv_settingUpChildViews = NO;
|
|
270
|
+
},
|
|
181
271
|
|
|
182
|
-
|
|
183
|
-
|
|
272
|
+
/**
|
|
273
|
+
* @private
|
|
274
|
+
* During initialization and whenever the child views change, SplitView needs
|
|
275
|
+
* to set some helper properties on the children and create any needed dividers.
|
|
276
|
+
*
|
|
277
|
+
* Note: If dividers are added, childViews changes, causing this to be called again;
|
|
278
|
+
* this is proper, because this updates the nextView, etc. properties appropriately.
|
|
279
|
+
*
|
|
280
|
+
* The helper properties are: previousView, nextView, viewIndex.
|
|
184
281
|
*/
|
|
185
|
-
|
|
282
|
+
_scsv_setupChildViews: function() {
|
|
283
|
+
var del = this.get('delegate'),
|
|
186
284
|
|
|
187
|
-
|
|
188
|
-
|
|
285
|
+
children = this.get('childViews').copy(), len = children.length, idx,
|
|
286
|
+
child, lastChild, lastNonDividerChild,
|
|
189
287
|
|
|
190
|
-
|
|
191
|
-
@default SC.View
|
|
192
|
-
*/
|
|
193
|
-
bottomRightView: SC.View,
|
|
288
|
+
oldDividers = this._scsv_dividers || {}, newDividers = {}, divider, dividerId;
|
|
194
289
|
|
|
195
|
-
|
|
196
|
-
|
|
290
|
+
// loop through all children, keeping track of the previous child
|
|
291
|
+
// as we loop using the lastChild variable.
|
|
292
|
+
for (idx = 0; idx < len; idx++) {
|
|
293
|
+
child = children[idx];
|
|
197
294
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
295
|
+
// do initial setup of things like autoResizeStyle:
|
|
296
|
+
if (!child.get('autoResizeStyle')) {
|
|
297
|
+
if (child.get('size') !== undefined) {
|
|
298
|
+
child.set('autoResizeStyle', SC.RESIZE_MANUAL);
|
|
299
|
+
} else {
|
|
300
|
+
child.set('autoResizeStyle', SC.RESIZE_AUTOMATIC);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
205
303
|
|
|
206
|
-
|
|
207
|
-
|
|
304
|
+
// we initialize the size first thing in case the size is empty (fill)
|
|
305
|
+
// if it is empty, the way we position the views would lead to inconsistent
|
|
306
|
+
// sizes. In addition, we will constrain all initial sizes so they'll be valid
|
|
307
|
+
// when/if we auto-resize them.
|
|
308
|
+
var size = this.invokeDelegateMethod(del, 'splitViewGetSizeForChild', this, child);
|
|
309
|
+
size = this.invokeDelegateMethod(del, 'splitViewConstrainSizeForChild', this, child, size);
|
|
310
|
+
this.invokeDelegateMethod(del, 'splitViewSetSizeForChild', this, child, size);
|
|
208
311
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
bottomRightThickness: function() {
|
|
213
|
-
var view = this.get('bottomRightView');
|
|
214
|
-
return view ? this.thicknessForView(view) : 0;
|
|
215
|
-
}.property('bottomRightView').cacheable(),
|
|
312
|
+
child.previousView = lastChild;
|
|
313
|
+
child.nextView = undefined;
|
|
314
|
+
child.viewIndex = idx;
|
|
216
315
|
|
|
217
|
-
|
|
218
|
-
|
|
316
|
+
if (lastChild) {
|
|
317
|
+
lastChild.nextView = child;
|
|
318
|
+
}
|
|
219
319
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
*/
|
|
223
|
-
thumbViewCursor: null,
|
|
320
|
+
if (lastNonDividerChild && !child.isSplitDivider) {
|
|
321
|
+
dividerId = SC.guidFor(lastNonDividerChild) + "-" + SC.guidFor(child);
|
|
224
322
|
|
|
225
|
-
|
|
226
|
-
Used by split divider to decide if the view can be collapsed.
|
|
323
|
+
divider = oldDividers[dividerId];
|
|
227
324
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
325
|
+
// if the previous view is a divider, but is not in our set of dividers,
|
|
326
|
+
// then it is manually created. If it is manually created, we should not
|
|
327
|
+
// create a new one.
|
|
328
|
+
if (!divider && !lastChild.isSplitDivider) {
|
|
329
|
+
divider = this.invokeDelegateMethod(del, 'splitViewDividerBetween', this, lastNonDividerChild, child);
|
|
330
|
+
}
|
|
234
331
|
|
|
235
|
-
|
|
236
|
-
|
|
332
|
+
if (divider) {
|
|
333
|
+
divider.isSplitDivider = YES;
|
|
334
|
+
newDividers[dividerId] = divider;
|
|
237
335
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
336
|
+
if (oldDividers[dividerId]) {
|
|
337
|
+
delete oldDividers[dividerId];
|
|
338
|
+
} else {
|
|
339
|
+
this.insertBefore(divider, child);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
lastChild = child;
|
|
346
|
+
if (!child.isSplitDivider) lastNonDividerChild = child;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// finally, remove all dividers that we didn't keep
|
|
350
|
+
for (dividerId in oldDividers) {
|
|
351
|
+
oldDividers[dividerId].destroy();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
this._scsv_dividers = newDividers;
|
|
355
|
+
|
|
356
|
+
// retile immediately.
|
|
357
|
+
this._scsv_tile();
|
|
245
358
|
},
|
|
246
359
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
360
|
+
//
|
|
361
|
+
// BASIC LAYOUT CODE
|
|
362
|
+
//
|
|
250
363
|
|
|
251
|
-
|
|
364
|
+
/**
|
|
365
|
+
Whether the SplitView needs to be re-laid out. You can change this by
|
|
366
|
+
calling scheduleTiling.
|
|
252
367
|
*/
|
|
253
|
-
|
|
254
|
-
var childViews = [],
|
|
255
|
-
views = ['topLeftView', 'dividerView', 'bottomRightView'],
|
|
256
|
-
l = views.length,
|
|
257
|
-
view, i;
|
|
258
|
-
|
|
259
|
-
for (i=0; i<l; ++i) {
|
|
260
|
-
if (view = this.get(views[i])) {
|
|
261
|
-
view = this[views[i]] = this.createChildView(view, {
|
|
262
|
-
layoutView: this,
|
|
263
|
-
rootElementPath: [i]
|
|
264
|
-
});
|
|
265
|
-
childViews.push(view);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
368
|
+
needsTiling: YES,
|
|
268
369
|
|
|
269
|
-
|
|
270
|
-
|
|
370
|
+
/**
|
|
371
|
+
Schedules a retile of the SplitView.
|
|
372
|
+
*/
|
|
373
|
+
scheduleTiling: function() {
|
|
374
|
+
this.set('needsTiling', YES);
|
|
375
|
+
this.invokeOnce('_scsv_tile');
|
|
271
376
|
},
|
|
272
377
|
|
|
273
|
-
|
|
274
|
-
|
|
378
|
+
tileIfNeeded: function() {
|
|
379
|
+
if (!this.get('needsTiling')) return;
|
|
380
|
+
this._scsv_tile();
|
|
381
|
+
},
|
|
275
382
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
383
|
+
/**
|
|
384
|
+
* @private
|
|
385
|
+
* Tiling is the simpler of two layout paths. Tiling lays out all of the
|
|
386
|
+
* children according to their size, and, if shouldResizeChildrenToFit is
|
|
387
|
+
* YES, attempts to resize the children to fit in the SplitView.
|
|
388
|
+
*
|
|
389
|
+
* It is called when the child views are initializing or have changed, and
|
|
390
|
+
* when the SplitView is resized.
|
|
391
|
+
*
|
|
279
392
|
*/
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
layout.bottom = 0;
|
|
304
|
-
|
|
305
|
-
switch (autoresizeBehavior) {
|
|
306
|
-
case SC.RESIZE_BOTH:
|
|
307
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
308
|
-
case SC.RESIZE_TOP_LEFT:
|
|
309
|
-
layout.right = bottomRightThickness + dividerThickness;
|
|
310
|
-
delete layout.width;
|
|
311
|
-
break;
|
|
312
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
313
|
-
delete layout.right;
|
|
314
|
-
delete layout.height;
|
|
315
|
-
layout.width = topLeftThickness;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
} else {
|
|
319
|
-
layout.top = 0;
|
|
320
|
-
layout.left = 0;
|
|
321
|
-
layout.right = 0;
|
|
322
|
-
|
|
323
|
-
switch (autoresizeBehavior) {
|
|
324
|
-
case SC.RESIZE_BOTH:
|
|
325
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
326
|
-
case SC.RESIZE_TOP_LEFT:
|
|
327
|
-
layout.bottom = bottomRightThickness + dividerThickness;
|
|
328
|
-
delete layout.height;
|
|
329
|
-
break;
|
|
330
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
331
|
-
layout.height = topLeftThickness;
|
|
332
|
-
delete layout.bottom;
|
|
333
|
-
delete layout.width;
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
topLeftView.set('layout', layout);
|
|
338
|
-
|
|
339
|
-
// split divider view
|
|
340
|
-
if (dividerView) {
|
|
341
|
-
layout = SC.clone(dividerView.get('layout'));
|
|
342
|
-
|
|
343
|
-
if (direction === SC.LAYOUT_HORIZONTAL) {
|
|
344
|
-
layout.width = dividerThickness;
|
|
345
|
-
layout.top = 0;
|
|
346
|
-
layout.bottom = 0;
|
|
347
|
-
delete layout.height;
|
|
348
|
-
|
|
349
|
-
switch (autoresizeBehavior) {
|
|
350
|
-
case SC.RESIZE_BOTH:
|
|
351
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
352
|
-
// delete layout.left ;
|
|
353
|
-
// delete layout.right ;
|
|
354
|
-
// layout.centerX = topLeftThickness + (dividerThickness / 2) ;
|
|
355
|
-
// delete layout.centerY ;
|
|
356
|
-
//break ;
|
|
357
|
-
case SC.RESIZE_TOP_LEFT:
|
|
358
|
-
layout.right = bottomRightThickness;
|
|
359
|
-
delete layout.left;
|
|
360
|
-
delete layout.centerX;
|
|
361
|
-
delete layout.centerY;
|
|
362
|
-
break;
|
|
363
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
364
|
-
layout.left = topLeftThickness;
|
|
365
|
-
delete layout.right;
|
|
366
|
-
delete layout.centerX;
|
|
367
|
-
delete layout.centerY;
|
|
368
|
-
break;
|
|
369
|
-
}
|
|
370
|
-
} else {
|
|
371
|
-
layout.height = dividerThickness;
|
|
372
|
-
layout.left = 0;
|
|
373
|
-
layout.right = 0;
|
|
374
|
-
delete layout.width;
|
|
375
|
-
|
|
376
|
-
switch (autoresizeBehavior) {
|
|
377
|
-
case SC.RESIZE_BOTH:
|
|
378
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
379
|
-
// delete layout.top ;
|
|
380
|
-
// delete layout.bottom ;
|
|
381
|
-
// delete layout.centerX ;
|
|
382
|
-
// layout.centerY = topLeftThickness + (dividerThickness / 2) ;
|
|
383
|
-
//break ;
|
|
384
|
-
case SC.RESIZE_TOP_LEFT:
|
|
385
|
-
layout.bottom = bottomRightThickness;
|
|
386
|
-
delete layout.top;
|
|
387
|
-
delete layout.centerX;
|
|
388
|
-
delete layout.centerY;
|
|
389
|
-
break ;
|
|
390
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
391
|
-
layout.top = topLeftThickness;
|
|
392
|
-
delete layout.bottom;
|
|
393
|
-
delete layout.centerX;
|
|
394
|
-
delete layout.centerY;
|
|
395
|
-
break ;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
dividerView.set('layout', layout);
|
|
393
|
+
_scsv_tile: function() {
|
|
394
|
+
var del = this.get('delegate');
|
|
395
|
+
|
|
396
|
+
// LOGIC:
|
|
397
|
+
//
|
|
398
|
+
// - Call splitViewLayoutChildren delegate method to position views and
|
|
399
|
+
// find total size.
|
|
400
|
+
//
|
|
401
|
+
// - If meant to automatically resize children to fit, run the
|
|
402
|
+
// splitViewResizeChildrenToFit delegate method.
|
|
403
|
+
//
|
|
404
|
+
// - Call splitViewLayoutChildren again if splitViewResizeChildrenToFit was called.
|
|
405
|
+
//
|
|
406
|
+
// - If not meant to automatically resize children to fit, change the SplitView
|
|
407
|
+
// size to match the total size of all children.
|
|
408
|
+
|
|
409
|
+
var size, frameSize = this.get('_frameSize');
|
|
410
|
+
|
|
411
|
+
size = this.invokeDelegateMethod(del, 'splitViewLayoutChildren', this);
|
|
412
|
+
|
|
413
|
+
if (this.get('shouldResizeChildrenToFit') && size !== frameSize) {
|
|
414
|
+
this.invokeDelegateMethod(del, 'splitViewResizeChildrenToFit', this, size);
|
|
415
|
+
size = this.invokeDelegateMethod(del, 'splitViewLayoutChildren', this);
|
|
399
416
|
}
|
|
400
417
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
if (direction === SC.LAYOUT_HORIZONTAL) {
|
|
407
|
-
layout.top = 0;
|
|
408
|
-
layout.bottom = 0;
|
|
409
|
-
layout.right = 0;
|
|
410
|
-
|
|
411
|
-
switch (autoresizeBehavior) {
|
|
412
|
-
case SC.RESIZE_BOTH:
|
|
413
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
414
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
415
|
-
layout.left = topLeftThickness + dividerThickness;
|
|
416
|
-
delete layout.width;
|
|
417
|
-
break;
|
|
418
|
-
case SC.RESIZE_TOP_LEFT:
|
|
419
|
-
layout.width = bottomRightThickness;
|
|
420
|
-
delete layout.left;
|
|
421
|
-
break;
|
|
422
|
-
}
|
|
423
|
-
} else {
|
|
424
|
-
layout.left = 0;
|
|
425
|
-
layout.right = 0;
|
|
426
|
-
layout.bottom = 0;
|
|
427
|
-
|
|
428
|
-
switch (autoresizeBehavior) {
|
|
429
|
-
case SC.RESIZE_BOTH:
|
|
430
|
-
throw "SC.RESIZE_BOTH is currently unsupported.";
|
|
431
|
-
case SC.RESIZE_BOTTOM_RIGHT:
|
|
432
|
-
layout.top = topLeftThickness + dividerThickness;
|
|
433
|
-
delete layout.height;
|
|
434
|
-
break;
|
|
435
|
-
case SC.RESIZE_TOP_LEFT:
|
|
436
|
-
delete layout.top;
|
|
437
|
-
layout.height = bottomRightThickness;
|
|
438
|
-
break;
|
|
418
|
+
if (!this.get('shouldResizeChildrenToFit')) {
|
|
419
|
+
if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) {
|
|
420
|
+
this.adjust('width', size);
|
|
421
|
+
} else {
|
|
422
|
+
this.adjust('height', size);
|
|
439
423
|
}
|
|
440
424
|
}
|
|
441
|
-
bottomRightView.set('layout', layout);
|
|
442
425
|
|
|
443
|
-
this
|
|
444
|
-
.notifyPropertyChange('topLeftThickness')
|
|
445
|
-
.notifyPropertyChange('bottomRightThickness');
|
|
426
|
+
this.set('needsTiling', NO);
|
|
446
427
|
},
|
|
447
428
|
|
|
448
|
-
/**
|
|
449
|
-
|
|
450
|
-
|
|
429
|
+
/**
|
|
430
|
+
* Lays out the children one next to each other or one on top of the other,
|
|
431
|
+
* based on their sizes. It returns the total size.
|
|
432
|
+
*
|
|
433
|
+
* You may override this method in a delegate.
|
|
434
|
+
*
|
|
435
|
+
* @param {SC.SplitView} splitView The SplitView whose children need layout.
|
|
436
|
+
* @returns {Number} The total size of all the SplitView's children.
|
|
437
|
+
*/
|
|
438
|
+
splitViewLayoutChildren: function(splitView) {
|
|
439
|
+
var del = this.get('delegate');
|
|
451
440
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
elem = this.$(),
|
|
455
|
-
desiredThickness = this.get('defaultThickness') ,
|
|
456
|
-
autoResizeBehavior = this.get('autoresizeBehavior'),
|
|
457
|
-
dividerThickness = this.get('dividerThickness'),
|
|
458
|
-
splitViewThickness;
|
|
441
|
+
var children = this.get('childViews'), len = children.length, idx,
|
|
442
|
+
child, pos = 0;
|
|
459
443
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
444
|
+
for (idx = 0; idx < len; idx++) {
|
|
445
|
+
child = children[idx];
|
|
463
446
|
|
|
464
|
-
|
|
447
|
+
this.invokeDelegateMethod(del, 'splitViewSetPositionForChild', this, children[idx], pos);
|
|
448
|
+
pos += this.invokeDelegateMethod(del, 'splitViewGetSizeForChild', this, children[idx]);
|
|
449
|
+
}
|
|
465
450
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
if (this._recalculateDivider === undefined && desiredThickness < 1) {
|
|
469
|
-
this._recalculateDivider = YES;
|
|
470
|
-
} else if (this._recalculateDivider) {
|
|
471
|
-
this._recalculateDivider = NO;
|
|
472
|
-
}
|
|
451
|
+
return pos;
|
|
452
|
+
},
|
|
473
453
|
|
|
474
|
-
|
|
475
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Attempts to resize the child views of the split view to fit in the SplitView's
|
|
456
|
+
* frame. So it may proportionally adjust the child views, the current size of the
|
|
457
|
+
* SplitView's content is passed.
|
|
458
|
+
*
|
|
459
|
+
* You may override this method in a delegate.
|
|
460
|
+
*
|
|
461
|
+
* @param {SC.SplitView} splitView The SC.SplitView whose children should be resized.
|
|
462
|
+
* @param {Number} contentSize The current not-yet-resized size of the SplitView's content.
|
|
463
|
+
*/
|
|
464
|
+
splitViewResizeChildrenToFit: function(splitView, contentSize) {
|
|
465
|
+
var del = this.get('delegate');
|
|
466
|
+
|
|
467
|
+
// LOGIC:
|
|
468
|
+
//
|
|
469
|
+
// - 1) Size auto-resizable children in proportion to their existing sizes to attempt
|
|
470
|
+
// to fit within the target size— auto-resizable views have autoResizeStyle set
|
|
471
|
+
// to SC.RESIZE_AUTOMATIC.
|
|
472
|
+
//
|
|
473
|
+
// - 2) Size non-auto-resizable children in proportion to their existing sizes—these
|
|
474
|
+
// views will _not_ have an autoResizeStyle of SC.RESIZE_AUTOMATIC.
|
|
475
|
+
//
|
|
476
|
+
|
|
477
|
+
var frameSize = this.get('_frameSize');
|
|
478
|
+
var children = this.get('childViews'), len = children.length, idx,
|
|
479
|
+
child, resizableSize = 0, nonResizableSize = 0, childSize;
|
|
480
|
+
|
|
481
|
+
// To do this sizing while keeping things proportionate, the total size of resizable
|
|
482
|
+
// views and the total size of non-auto-resizable views must be calculated independently.
|
|
483
|
+
for (idx = 0; idx < len; idx++) {
|
|
484
|
+
child = children[idx];
|
|
485
|
+
|
|
486
|
+
childSize = this.invokeDelegateMethod(del, 'splitViewGetSizeForChild', this, child);
|
|
487
|
+
|
|
488
|
+
if (this.invokeDelegateMethod(del, 'splitViewShouldResizeChildToFit', this, child)) {
|
|
489
|
+
resizableSize += childSize;
|
|
476
490
|
} else {
|
|
477
|
-
|
|
491
|
+
nonResizableSize += childSize;
|
|
478
492
|
}
|
|
493
|
+
}
|
|
479
494
|
|
|
480
|
-
|
|
481
|
-
if (SC.none(desiredThickness) || (desiredThickness > 0 && desiredThickness < 1)) {
|
|
482
|
-
desiredThickness = Math.floor((splitViewThickness - (dividerThickness)) * (desiredThickness || 0.5));
|
|
483
|
-
}
|
|
495
|
+
var runningSize = contentSize;
|
|
484
496
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
497
|
+
// we run through each twice: non-aggressively, then aggressively. This is controlled by providing
|
|
498
|
+
// a -1 for the outOfSize. This tells the resizing to not bother with proportions and just resize
|
|
499
|
+
// whatever it can.
|
|
500
|
+
runningSize = this._resizeChildrenForSize(runningSize, frameSize, YES, resizableSize);
|
|
501
|
+
runningSize = this._resizeChildrenForSize(runningSize, frameSize, YES, -1);
|
|
502
|
+
runningSize = this._resizeChildrenForSize(runningSize, frameSize, NO, nonResizableSize);
|
|
503
|
+
runningSize = this._resizeChildrenForSize(runningSize, frameSize, NO, -1);
|
|
504
|
+
},
|
|
490
505
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
506
|
+
/**
|
|
507
|
+
* @private
|
|
508
|
+
* Utility method used by splitViewResizeChildrenToFit to do the proportionate
|
|
509
|
+
* sizing of child views.
|
|
510
|
+
*
|
|
511
|
+
* @returns {Number} The new runningSize.
|
|
512
|
+
*/
|
|
513
|
+
_resizeChildrenForSize: function(runningSize, targetSize, useResizable, outOfSize) {
|
|
514
|
+
var del = this.get('delegate');
|
|
500
515
|
|
|
501
|
-
|
|
502
|
-
this._updateTopLeftThickness(0);
|
|
516
|
+
var children = this.get('childViews'), idx, len = children.length, child;
|
|
503
517
|
|
|
504
|
-
|
|
505
|
-
|
|
518
|
+
var diff = targetSize - runningSize;
|
|
519
|
+
for (idx = 0; idx < len; idx++) {
|
|
520
|
+
child = children[idx];
|
|
506
521
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
522
|
+
var originalChildSize = this.invokeDelegateMethod(del, 'splitViewGetSizeForChild', this, child),
|
|
523
|
+
size = originalChildSize;
|
|
510
524
|
|
|
511
|
-
|
|
512
|
-
|
|
525
|
+
var isResizable = this.invokeDelegateMethod(del, 'splitViewShouldResizeChildToFit', this, child);
|
|
526
|
+
if (isResizable === useResizable) {
|
|
527
|
+
// if outOfSize === -1 then we are aggressively resizing (not resizing proportionally)
|
|
528
|
+
if (outOfSize === -1) size += diff
|
|
529
|
+
else size += (size / outOfSize) * diff;
|
|
513
530
|
|
|
514
|
-
|
|
515
|
-
render: function(context, firstTime) {
|
|
516
|
-
sc_super();
|
|
531
|
+
size = Math.round(size);
|
|
517
532
|
|
|
518
|
-
|
|
533
|
+
size = this.invokeDelegateMethod(del, 'splitViewConstrainSizeForChild', this, child, size);
|
|
534
|
+
this.invokeDelegateMethod(del, 'splitViewSetSizeForChild', this, child, size);
|
|
519
535
|
|
|
520
|
-
if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) context.addClass('sc-horizontal');
|
|
521
|
-
else context.addClass('sc-vertical');
|
|
522
|
-
},
|
|
523
536
|
|
|
524
|
-
|
|
525
|
-
|
|
537
|
+
// we remove the original child size—but we don't add it back.
|
|
538
|
+
// we don't add it back because the load is no longer shared.
|
|
539
|
+
if (outOfSize !== -1) outOfSize -= originalChildSize;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// We modify the old size to account for our changes so we can keep a running diff
|
|
543
|
+
runningSize -= originalChildSize;
|
|
544
|
+
runningSize += size;
|
|
545
|
+
diff = targetSize - runningSize;
|
|
546
|
+
}
|
|
526
547
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
of the mouse. As a result, the position of your thumb view will also be updated.
|
|
548
|
+
return runningSize;
|
|
549
|
+
},
|
|
530
550
|
|
|
531
|
-
|
|
551
|
+
/**
|
|
552
|
+
* Determines whether the SplitView should attempt to resize the specified
|
|
553
|
+
* child view when the SplitView's size changes.
|
|
554
|
+
*
|
|
555
|
+
* You may override this method in a delegate.
|
|
556
|
+
*
|
|
557
|
+
* @param {SC.SplitView} splitView The SplitView that owns the child.
|
|
558
|
+
* @param {SC.View} child The child view.
|
|
559
|
+
* @returns {Boolean}
|
|
532
560
|
*/
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
responder.dragDidStart(this);
|
|
539
|
-
|
|
540
|
-
// cache for later
|
|
541
|
-
this._mouseDownX = evt.pageX;
|
|
542
|
-
this._mouseDownY = evt.pageY;
|
|
543
|
-
this._thumbView = thumbView;
|
|
544
|
-
this._topLeftView = this.get('topLeftView');
|
|
545
|
-
this._bottomRightView = this.get('bottomRightView');
|
|
546
|
-
this._topLeftViewThickness = this.thicknessForView(this.get('topLeftView'));
|
|
547
|
-
this._bottomRightThickness = this.thicknessForView(this.get('bottomRightView'));
|
|
548
|
-
this._dividerThickness = this.get('dividerThickness');
|
|
549
|
-
this._layoutDirection = this.get('layoutDirection');
|
|
550
|
-
|
|
551
|
-
this.beginLiveResize();
|
|
552
|
-
this._inLiveResize = YES;
|
|
553
|
-
|
|
554
|
-
return YES;
|
|
561
|
+
splitViewShouldResizeChildToFit: function(splitView, child) {
|
|
562
|
+
return (
|
|
563
|
+
this.get('shouldResizeChildrenToFit') &&
|
|
564
|
+
child.get('autoResizeStyle') === SC.RESIZE_AUTOMATIC
|
|
565
|
+
);
|
|
555
566
|
},
|
|
556
567
|
|
|
557
|
-
/**
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
568
|
+
/**
|
|
569
|
+
* Attempts to move a single child from its current position to
|
|
570
|
+
* a desired position.
|
|
571
|
+
*
|
|
572
|
+
* You may override the behavior on a delegate.
|
|
573
|
+
*
|
|
574
|
+
* @param {SC.SplitView} splitView The splitView whose child should be moved.
|
|
575
|
+
* @param {SC.View} child The child which should be moved.
|
|
576
|
+
* @param {Number} position The position to attempt to move the child to.
|
|
577
|
+
* @returns {Number} The final position of the child.
|
|
578
|
+
*/
|
|
579
|
+
splitViewAdjustPositionForChild: function(splitView, child, position) {
|
|
580
|
+
var del = this.get('delegate');
|
|
581
|
+
// Unlike tiling, the process of moving a child view is much more sophisticated.
|
|
582
|
+
//
|
|
583
|
+
// The basic sequence of events is simple:
|
|
584
|
+
//
|
|
585
|
+
// - resize previous child
|
|
586
|
+
// - resize the child itself to compensate for its movement if
|
|
587
|
+
// child.compensatesForMovement is YES.
|
|
588
|
+
// - adjust position of next child.
|
|
589
|
+
//
|
|
590
|
+
// As the process is recursive in both directions (resizing a child may attempt
|
|
591
|
+
// to move it if it cannot be resized further), adjusting one child view could
|
|
592
|
+
// affect many _if not all_ of the SplitView's children.
|
|
593
|
+
//
|
|
594
|
+
// For safety, sanity, and stability, the recursive chain-reactions only travel
|
|
595
|
+
// in one direction; for instance, resizing the previous view may attempt to adjust
|
|
596
|
+
// its position, but that adjustment will not propagate to views after it.
|
|
597
|
+
//
|
|
598
|
+
// This process, while powerful, has one complication: if you change a bunch of views
|
|
599
|
+
// before a view, and then _fail_ to move views after it, the views before must be
|
|
600
|
+
// moved back to their starting points. But if their positions were changed directly,
|
|
601
|
+
// this would be impossible.
|
|
602
|
+
//
|
|
603
|
+
// As such, the positions are not changed directly. Rather, the changes are written
|
|
604
|
+
// to a _plan_, and changes only committed once everything is finalized.
|
|
605
|
+
//
|
|
606
|
+
// splitViewAdjustPositionForChild is the entry point, and as such is responsible
|
|
607
|
+
// for triggering the creation of the plan, the needed modifications, and the
|
|
608
|
+
// finalizing of it.
|
|
609
|
+
var plan = this._scsv_createPlan();
|
|
610
|
+
var finalPosition = this._scsv_adjustPositionForChildInPlan(plan, child, position, child);
|
|
611
|
+
this._scsv_commitPlan(plan);
|
|
612
|
+
|
|
613
|
+
return finalPosition;
|
|
562
614
|
},
|
|
563
615
|
|
|
564
|
-
/**
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
616
|
+
/**
|
|
617
|
+
* @private
|
|
618
|
+
* Creates a plan in which to prepare changes to the SplitView's children.
|
|
619
|
+
*
|
|
620
|
+
* A plan is an array with the same number of elements as the SplitView has children.
|
|
621
|
+
* Each element is a hash containing these properties:
|
|
622
|
+
*
|
|
623
|
+
* - child: the view the hash represents
|
|
624
|
+
* - originalPosition: the position before the planning process
|
|
625
|
+
* - position: the planned new position.
|
|
626
|
+
* - originalSize: the size before the planning process
|
|
627
|
+
* - size: the planned new size.
|
|
628
|
+
*
|
|
629
|
+
* The repositioning and resizing logic can, at any time, reset part of the plan
|
|
630
|
+
* to its original state, allowing layout processes to be run non-destructively.
|
|
631
|
+
* In addition, storing the original positions and sizes is more performant
|
|
632
|
+
* than looking them up each time.
|
|
633
|
+
*
|
|
634
|
+
* @returns {Plan}
|
|
635
|
+
*/
|
|
636
|
+
_scsv_createPlan: function() {
|
|
637
|
+
var del = this.get('delegate'),
|
|
638
|
+
plan = [], children = this.get('childViews'), idx, len = children.length,
|
|
639
|
+
child, childPosition, childSize;
|
|
640
|
+
|
|
641
|
+
for (idx = 0; idx < len; idx++) {
|
|
642
|
+
child = children[idx];
|
|
643
|
+
childPosition = this.invokeDelegateMethod(del, 'splitViewGetPositionForChild', this, child);
|
|
644
|
+
childSize = this.invokeDelegateMethod(del, 'splitViewGetSizeForChild', this, child);
|
|
645
|
+
|
|
646
|
+
plan[idx] = {
|
|
647
|
+
child: child,
|
|
648
|
+
originalPosition: childPosition,
|
|
649
|
+
position: childPosition,
|
|
650
|
+
originalSize: childSize,
|
|
651
|
+
size: childSize
|
|
652
|
+
};
|
|
571
653
|
}
|
|
572
654
|
|
|
573
|
-
|
|
574
|
-
return NO;
|
|
655
|
+
return plan;
|
|
575
656
|
},
|
|
576
657
|
|
|
577
|
-
/**
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
658
|
+
/**
|
|
659
|
+
* @private
|
|
660
|
+
* Resets a range of the plan to its original settings.
|
|
661
|
+
*
|
|
662
|
+
* @param {Plan} plan The plan.
|
|
663
|
+
* @param {Number} first The first item in the range.
|
|
664
|
+
* @param {Number} last The last item in the range.
|
|
665
|
+
*/
|
|
666
|
+
_scsv_resetPlanRange: function(plan, first, last) {
|
|
667
|
+
for (var idx = first; idx <= last; idx++) {
|
|
668
|
+
plan[idx].position = plan[idx].originalPosition;
|
|
669
|
+
plan[idx].size = plan[idx].originalSize;
|
|
670
|
+
}
|
|
671
|
+
},
|
|
581
672
|
|
|
582
|
-
/**
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
673
|
+
/**
|
|
674
|
+
* @private
|
|
675
|
+
* Commits the changes specified in the plan to the child views.
|
|
676
|
+
*
|
|
677
|
+
* @param {Plan} plan The plan with the changes.
|
|
678
|
+
*/
|
|
679
|
+
_scsv_commitPlan: function(plan) {
|
|
680
|
+
var del = this.get('delegate'), len = plan.length, idx, item, end = 0;
|
|
586
681
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
682
|
+
for (idx = 0; idx < len; idx++) {
|
|
683
|
+
item = plan[idx];
|
|
684
|
+
if (item.size !== item.originalSize) {
|
|
685
|
+
this.invokeDelegateMethod(del, 'splitViewSetSizeForChild', this, item.child, item.size);
|
|
686
|
+
}
|
|
591
687
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
688
|
+
if (item.position !== item.originalPosition) {
|
|
689
|
+
this.invokeDelegateMethod(del, 'splitViewSetPositionForChild', this, item.child, item.position);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
end = item.position + item.size;
|
|
596
693
|
}
|
|
597
694
|
|
|
598
|
-
if (!isCollapsed) {
|
|
599
|
-
// remember thickness in it's uncollapsed state
|
|
600
|
-
this._uncollapsedThickness = this.thicknessForView(view);
|
|
601
|
-
// and collapse
|
|
602
|
-
// this.setThicknessForView(view, 0) ;
|
|
603
|
-
if (view === this._topLeftView) {
|
|
604
|
-
this._updateTopLeftThickness(this.topLeftThickness()*-1);
|
|
605
|
-
} else {
|
|
606
|
-
this._updateBottomRightThickness(this.bottomRightThickness()*-1);
|
|
607
|
-
}
|
|
608
695
|
|
|
609
|
-
|
|
610
|
-
if (
|
|
611
|
-
this.
|
|
612
|
-
}
|
|
613
|
-
} else {
|
|
614
|
-
// uncollapse to the last thickness in it's uncollapsed state
|
|
615
|
-
if (view === this._topLeftView) {
|
|
616
|
-
this._updateTopLeftThickness(this._uncollapsedThickness);
|
|
696
|
+
if (!this.get('shouldResizeChildrenToFit')) {
|
|
697
|
+
if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) {
|
|
698
|
+
this.adjust('width', end);
|
|
617
699
|
} else {
|
|
618
|
-
this.
|
|
700
|
+
this.adjust('height', end);
|
|
619
701
|
}
|
|
620
|
-
view._uncollapsedThickness = null;
|
|
621
702
|
}
|
|
622
|
-
this._setCursorStyle();
|
|
623
|
-
return true;
|
|
624
703
|
},
|
|
625
704
|
|
|
626
|
-
/**
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
705
|
+
/**
|
|
706
|
+
* Moves the specified child view as close as it can to the specified
|
|
707
|
+
* position, saving all changes this causes into the plan.
|
|
708
|
+
*
|
|
709
|
+
* The "directness" of the action also comes into play. An action is direct if:
|
|
710
|
+
*
|
|
711
|
+
* - The child being modified is the originating child (the one being dragged, most likely)
|
|
712
|
+
* - The child is being _positioned_ as is immediately _after_ the originating child.
|
|
713
|
+
* - The child is being _sized_ and is immediately _before_ the originating child.
|
|
714
|
+
*
|
|
715
|
+
* This means that direct actions modify the originating child or the border between
|
|
716
|
+
* it and a sibling. Some child views don't like to accept indirect actions, as the
|
|
717
|
+
* indirect actions may confuse or annoy users in some cases.
|
|
718
|
+
*
|
|
719
|
+
* @param {Plan} plan The plan write changes to (and get some data from).
|
|
720
|
+
* @param {SC.View} child The child to move.
|
|
721
|
+
* @param {Number} position The position to attempt to move the child to.
|
|
722
|
+
* @param {Boolean} source The child from which the attempt to adjust originated—used
|
|
723
|
+
* to determine directness.
|
|
724
|
+
*
|
|
725
|
+
* @returns {Number} The final position of the child.
|
|
726
|
+
*/
|
|
727
|
+
_scsv_adjustPositionForChildInPlan: function(plan, child, position, source) {
|
|
728
|
+
var del = this.get('delegate');
|
|
729
|
+
|
|
730
|
+
if (
|
|
731
|
+
!child.get('allowsIndirectAdjustments') &&
|
|
732
|
+
source !== child && source !== child.previousView
|
|
733
|
+
) {
|
|
734
|
+
return plan[child.viewIndex].position;
|
|
649
735
|
}
|
|
650
736
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
max = this.get('bottomRightMaxThickness');
|
|
656
|
-
min = this.get('bottomRightMinThickness');
|
|
657
|
-
bottomRightThickness = maxAvailable - thickness;
|
|
658
|
-
if (!SC.none(max)) {
|
|
659
|
-
bottomRightThickness = Math.min(max, bottomRightThickness);
|
|
737
|
+
// since the process is recursive, we need to prevent the processing from
|
|
738
|
+
// coming back in this direction.
|
|
739
|
+
if (child._splitViewIsAdjusting) {
|
|
740
|
+
return plan[child.viewIndex].position;
|
|
660
741
|
}
|
|
661
|
-
|
|
662
|
-
|
|
742
|
+
|
|
743
|
+
child._splitViewIsAdjusting = YES;
|
|
744
|
+
|
|
745
|
+
//
|
|
746
|
+
// STEP 1: attept to resize the previous child.
|
|
747
|
+
//
|
|
748
|
+
var previousChild = child.previousView, nextChild = child.nextView,
|
|
749
|
+
previousChildPosition, previousChildSize,
|
|
750
|
+
nextChildPosition, nextChildSize,
|
|
751
|
+
size = plan[child.viewIndex].size;
|
|
752
|
+
|
|
753
|
+
if (previousChild && !previousChild._splitViewIsAdjusting) {
|
|
754
|
+
// we determine the size we would like it to be by subtracting its position
|
|
755
|
+
// from the position _we_ would like to have.
|
|
756
|
+
previousChildPosition = plan[previousChild.viewIndex].position;
|
|
757
|
+
previousChildSize = position - previousChildPosition;
|
|
758
|
+
|
|
759
|
+
previousChildSize = this._scsv_adjustSizeForChildInPlan(
|
|
760
|
+
plan, previousChild, previousChildSize, source
|
|
761
|
+
);
|
|
762
|
+
|
|
763
|
+
// the child may not have resized/moved itself all the way, so we will
|
|
764
|
+
// recalculate the target position based on how much it _was_ able to.
|
|
765
|
+
position = previousChildPosition + previousChildSize;
|
|
766
|
+
} else if (!previousChild) {
|
|
767
|
+
// if there is no previous child view, then this is the first view and
|
|
768
|
+
// as such _must_ be at 0.
|
|
769
|
+
position = 0;
|
|
663
770
|
}
|
|
664
|
-
thickness = maxAvailable - bottomRightThickness;
|
|
665
771
|
|
|
666
|
-
//
|
|
667
|
-
|
|
668
|
-
|
|
772
|
+
// further steps deal with children _after_ this one; these steps should
|
|
773
|
+
// not be performed if those children are already being taken care of.
|
|
774
|
+
if (nextChild && nextChild._splitViewIsAdjusting) {
|
|
775
|
+
child._splitViewIsAdjusting = NO;
|
|
776
|
+
plan[child.viewIndex].position = position;
|
|
777
|
+
return position;
|
|
778
|
+
}
|
|
669
779
|
|
|
670
|
-
// cannot be more than what's available
|
|
671
|
-
thickness = Math.min(thickness, maxAvailable);
|
|
672
780
|
|
|
673
|
-
//
|
|
674
|
-
|
|
781
|
+
//
|
|
782
|
+
// STEP 2: attempt to resize this view to avoid moving the next one.
|
|
783
|
+
// Only occurs if the view's settings tell it to compensate _and_ there is a
|
|
784
|
+
// next view to compensate for, or we are resizing to fit and there _is no_ next child.
|
|
785
|
+
//
|
|
786
|
+
if (child.get('compensatesForMovement') && nextChild) {
|
|
787
|
+
nextChildPosition = plan[nextChild.viewIndex].position;
|
|
788
|
+
size = this._scsv_adjustSizeForChildInPlan(plan, child, nextChildPosition - position);
|
|
789
|
+
} else if (!nextChild && this.get('shouldResizeChildrenToFit')) {
|
|
790
|
+
nextChildPosition = this.get('_frameSize');
|
|
791
|
+
size = this._scsv_adjustSizeForChildInPlan(plan, child, nextChildPosition - position);
|
|
792
|
+
position = nextChildPosition - size;
|
|
793
|
+
}
|
|
675
794
|
|
|
676
|
-
|
|
677
|
-
if (
|
|
678
|
-
|
|
679
|
-
|
|
795
|
+
// STEP 3: attempt to move the next child to account for movement of this one.
|
|
796
|
+
if (nextChild) {
|
|
797
|
+
nextChildPosition = position + size;
|
|
798
|
+
nextChildPosition = this._scsv_adjustPositionForChildInPlan(plan, nextChild, nextChildPosition, source);
|
|
799
|
+
}
|
|
680
800
|
|
|
681
|
-
if
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
801
|
+
// if we were unable to position the next child, or there is no next
|
|
802
|
+
// child but we need to resize children to fit, we have to undo some
|
|
803
|
+
// of our previous work.
|
|
804
|
+
if (nextChildPosition && position !== nextChildPosition - size) {
|
|
805
|
+
position = nextChildPosition - size;
|
|
806
|
+
|
|
807
|
+
// then, for whatever is left, we again resize the previous view, after throwing
|
|
808
|
+
// away the previous calculations.
|
|
809
|
+
if (previousChild && !previousChild._splitViewIsAdjusting) {
|
|
810
|
+
this._scsv_resetPlanRange(plan, 0, previousChild.viewIndex);
|
|
811
|
+
previousChildSize = position - plan[previousChild.viewIndex].position;
|
|
812
|
+
this._scsv_adjustSizeForChildInPlan(plan, previousChild, previousChildSize, child);
|
|
687
813
|
}
|
|
688
|
-
} else if (proposedThickness >= brCollapseAtThickness && this.canCollapseView(bottomRightView)) {
|
|
689
|
-
// want to collapse bottom/right, check if this doesn't violate the max thickness of top/left
|
|
690
|
-
max = topLeftView.get('maxThickness');
|
|
691
|
-
if (!max || (minAvailable + maxAvailable) <= max) {
|
|
692
|
-
// collapse bottom/right view, even if it has a minThickness
|
|
693
|
-
thickness = maxAvailable;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
814
|
|
|
697
|
-
|
|
698
|
-
if (thickness != this.thicknessForView(topLeftView)) {
|
|
699
|
-
this._desiredTopLeftThickness = thickness;
|
|
815
|
+
}
|
|
700
816
|
|
|
701
|
-
// un-collapse if needed.
|
|
702
|
-
topLeftView.set('isCollapsed', thickness === 0);
|
|
703
|
-
bottomRightView.set('isCollapsed', thickness >= maxAvailable);
|
|
704
817
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
818
|
+
plan[child.viewIndex].position = position;
|
|
819
|
+
child._splitViewIsAdjusting = NO;
|
|
820
|
+
return position;
|
|
708
821
|
},
|
|
709
822
|
|
|
823
|
+
_scsv_adjustSizeForChildInPlan: function(plan, child, size, source) {
|
|
824
|
+
var del = this.get('delegate');
|
|
710
825
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
minAvailable = this._dividerThickness,
|
|
718
|
-
maxAvailable = 0,
|
|
719
|
-
proposedThickness = this._topLeftViewThickness + offset,
|
|
720
|
-
direction = this._layoutDirection,
|
|
721
|
-
bottomRightCanCollapse = this.canCollapseView(bottomRightView),
|
|
722
|
-
thickness = proposedThickness,
|
|
723
|
-
// constrain to thickness set on top/left
|
|
724
|
-
max = this.get('topLeftMaxThickness'),
|
|
725
|
-
min = this.get('topLeftMinThickness'),
|
|
726
|
-
bottomRightThickness, tlCollapseAtThickness, brCollapseAtThickness;
|
|
727
|
-
|
|
728
|
-
if (!topLeftView.get("isCollapsed")) maxAvailable += topLeftViewThickness;
|
|
729
|
-
if (!bottomRightView.get("isCollapsed")) maxAvailable += bottomRightViewThickness;
|
|
730
|
-
|
|
731
|
-
if (!SC.none(max)) thickness = Math.min(max, thickness);
|
|
732
|
-
if (!SC.none(min)) thickness = Math.max(min, thickness);
|
|
733
|
-
|
|
734
|
-
// constrain to thickness set on bottom/right
|
|
735
|
-
max = this.get('bottomRightMaxThickness');
|
|
736
|
-
min = this.get('bottomRightMinThickness');
|
|
737
|
-
bottomRightThickness = maxAvailable - thickness ;
|
|
738
|
-
if (!SC.none(max)) bottomRightThickness = Math.min(max, bottomRightThickness);
|
|
739
|
-
if (!SC.none(min)) bottomRightThickness = Math.max(min, bottomRightThickness);
|
|
740
|
-
thickness = maxAvailable - bottomRightThickness;
|
|
741
|
-
|
|
742
|
-
// constrain to thickness determined by delegate.
|
|
743
|
-
thickness = this.invokeDelegateMethod(this.delegate, 'splitViewConstrainThickness', this, topLeftView, thickness);
|
|
744
|
-
|
|
745
|
-
// cannot be more than what's available
|
|
746
|
-
thickness = Math.min(thickness, maxAvailable);
|
|
747
|
-
|
|
748
|
-
// cannot be less than zero
|
|
749
|
-
thickness = Math.max(0, thickness);
|
|
750
|
-
|
|
751
|
-
tlCollapseAtThickness = topLeftView.get('collapseAtThickness');
|
|
752
|
-
if (!tlCollapseAtThickness) tlCollapseAtThickness = 0;
|
|
753
|
-
brCollapseAtThickness = bottomRightView.get('collapseAtThickness');
|
|
754
|
-
brCollapseAtThickness = SC.none(brCollapseAtThickness) ? maxAvailable : (maxAvailable - brCollapseAtThickness);
|
|
755
|
-
|
|
756
|
-
if ((proposedThickness <= tlCollapseAtThickness) && this.canCollapseView(topLeftView)) {
|
|
757
|
-
// want to collapse top/left, check if this doesn't violate the max thickness of bottom/right
|
|
758
|
-
max = bottomRightView.get('maxThickness');
|
|
759
|
-
if (!max || (minAvailable + maxAvailable) <= max) {
|
|
760
|
-
// collapse top/left view, even if it has a minThickness
|
|
761
|
-
thickness = 0;
|
|
762
|
-
}
|
|
763
|
-
} else if (proposedThickness >= brCollapseAtThickness && this.canCollapseView(bottomRightView)) {
|
|
764
|
-
// want to collapse bottom/right, check if this doesn't violate the max thickness of top/left
|
|
765
|
-
max = topLeftView.get('maxThickness');
|
|
766
|
-
if (!max || (minAvailable + maxAvailable) <= max) {
|
|
767
|
-
// collapse bottom/right view, even if it has a minThickness
|
|
768
|
-
thickness = maxAvailable;
|
|
769
|
-
}
|
|
826
|
+
if (
|
|
827
|
+
source &&
|
|
828
|
+
!child.get('allowsIndirectAdjustments') &&
|
|
829
|
+
source !== child && source !== child.nextView && source !== child.previousView
|
|
830
|
+
) {
|
|
831
|
+
return plan[child.viewIndex].size;
|
|
770
832
|
}
|
|
771
833
|
|
|
772
|
-
//
|
|
773
|
-
|
|
774
|
-
this._desiredTopLeftThickness = thickness;
|
|
834
|
+
// First, see if resizing alone will do the job.
|
|
835
|
+
var actualSize = this.invokeDelegateMethod(del, 'splitViewConstrainSizeForChild', this, child, size);
|
|
775
836
|
|
|
776
|
-
|
|
777
|
-
topLeftView.set('isCollapsed', thickness === 0);
|
|
778
|
-
bottomRightView.set('isCollapsed', thickness >= maxAvailable);
|
|
837
|
+
plan[child.viewIndex].size = actualSize;
|
|
779
838
|
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
839
|
+
if (size === actualSize) return size;
|
|
840
|
+
|
|
841
|
+
// if not, attempt to move the view.
|
|
842
|
+
var currentPosition = plan[child.viewIndex].position,
|
|
843
|
+
targetPosition = currentPosition + size - actualSize;
|
|
844
|
+
|
|
845
|
+
var position = this._scsv_adjustPositionForChildInPlan(plan, child, targetPosition, source);
|
|
846
|
+
|
|
847
|
+
// the result is the new right edge minus the old left edge—that is,
|
|
848
|
+
// the size we can pretend we are for the caller, now that we have
|
|
849
|
+
// resized some other views.
|
|
850
|
+
return position + actualSize - currentPosition;
|
|
783
851
|
},
|
|
784
852
|
|
|
785
853
|
/**
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
854
|
+
* Returns a view instance to be used as a divider between two other views,
|
|
855
|
+
* or null if no divider should be used.
|
|
856
|
+
*
|
|
857
|
+
* The value of the 'splitDividerView' property will be instantiated. The default
|
|
858
|
+
* value of this property is 'SC.SplitDividerView'. If the value is null or undefined,
|
|
859
|
+
* null will be returned, and the SplitView will not automatically create dividers.
|
|
860
|
+
*
|
|
861
|
+
* You may override this method in a delegate.
|
|
862
|
+
*
|
|
863
|
+
* @param {SC.SplitView} splitView The split view that is hte parent of the
|
|
864
|
+
* two views.
|
|
865
|
+
* @param {SC.View} view1 The first view.
|
|
866
|
+
* @param {SC.View} view2 The second view.
|
|
867
|
+
* @returns {SC.View} The view instance to use as a divider.
|
|
790
868
|
*/
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
bottomRightView = this._bottomRightView,
|
|
794
|
-
thumbViewCursor = this.get('thumbViewCursor'),
|
|
795
|
-
// updates the cursor of the thumb view that called
|
|
796
|
-
// mouseDownInThumbView() to reflect the status of the drag
|
|
797
|
-
tlThickness = this.thicknessForView(topLeftView),
|
|
798
|
-
brThickness = this.thicknessForView(bottomRightView),
|
|
799
|
-
dV = this.get('dividerView');
|
|
800
|
-
this._layoutDirection = this.get('layoutDirection');
|
|
801
|
-
if (topLeftView.get('isCollapsed') ||
|
|
802
|
-
tlThickness === this.get("topLeftMinThickness") ||
|
|
803
|
-
brThickness == this.get("bottomRightMaxThickness")) {
|
|
804
|
-
thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "e-resize" : "s-resize");
|
|
805
|
-
} else if (bottomRightView.get('isCollapsed') ||
|
|
806
|
-
tlThickness === this.get("topLeftMaxThickness") ||
|
|
807
|
-
brThickness == this.get("bottomRightMinThickness")) {
|
|
808
|
-
thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "w-resize" : "n-resize");
|
|
809
|
-
} else {
|
|
810
|
-
if(SC.browser.isIE) {
|
|
811
|
-
thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "e-resize" : "n-resize");
|
|
812
|
-
}
|
|
813
|
-
else {
|
|
814
|
-
thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "ew-resize" : "ns-resize");
|
|
815
|
-
}
|
|
816
|
-
}
|
|
869
|
+
splitViewDividerBetween: function(splitView, view1, view2){
|
|
870
|
+
if (!this.get('splitDividerView')) return null;
|
|
817
871
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
}.observes('layoutDirection'),
|
|
872
|
+
return this.get('splitDividerView').create();
|
|
873
|
+
},
|
|
821
874
|
|
|
822
875
|
/**
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
876
|
+
* Returns the current position for the specified child.
|
|
877
|
+
*
|
|
878
|
+
* You may override this in a delegate.
|
|
879
|
+
*
|
|
880
|
+
* @param {SC.SplitView} splitView The SplitView which owns the child.
|
|
881
|
+
* @param {SC.View} child The child.
|
|
882
|
+
* @returns Number
|
|
883
|
+
*/
|
|
884
|
+
splitViewGetPositionForChild: function(splitView, child) {
|
|
885
|
+
return child.get('position');
|
|
886
|
+
},
|
|
828
887
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
888
|
+
/**
|
|
889
|
+
* Sets the position for the specified child.
|
|
890
|
+
*
|
|
891
|
+
* You may override this in a delegate.
|
|
892
|
+
*
|
|
893
|
+
* @param {SC.SplitView} splitView The SplitView which owns the child.
|
|
894
|
+
* @param {SC.View} child The child.
|
|
895
|
+
* @param {Number} position The position to move the child to.
|
|
832
896
|
*/
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
if (view.get('canCollapse') === NO) return NO;
|
|
836
|
-
return YES;
|
|
897
|
+
splitViewSetPositionForChild: function(splitView, child, position) {
|
|
898
|
+
child.set('position', position);
|
|
837
899
|
},
|
|
838
900
|
|
|
839
901
|
/**
|
|
840
|
-
|
|
902
|
+
* Returns the current size for the specified child.
|
|
903
|
+
*
|
|
904
|
+
* You may override this in a delegate.
|
|
905
|
+
*
|
|
906
|
+
* @param {SC.SplitView} splitView The SplitView which owns the child.
|
|
907
|
+
* @param {SC.View} child The child.
|
|
908
|
+
* @returns Number
|
|
909
|
+
*/
|
|
910
|
+
splitViewGetSizeForChild: function(splitView, child) {
|
|
911
|
+
var size = child.get('size');
|
|
912
|
+
if (SC.none(size)) return 100;
|
|
841
913
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
visible area.
|
|
914
|
+
return size;
|
|
915
|
+
},
|
|
845
916
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
917
|
+
/**
|
|
918
|
+
* Sets the size for the specified child.
|
|
919
|
+
*
|
|
920
|
+
* You may override this in a delegate.
|
|
921
|
+
*
|
|
922
|
+
* @param {SC.SplitView} splitView The SplitView which owns the child.
|
|
923
|
+
* @param {SC.View} child The child.
|
|
924
|
+
* @param {Number} position The size to give the child.
|
|
850
925
|
*/
|
|
851
|
-
|
|
852
|
-
|
|
926
|
+
splitViewSetSizeForChild: function(splitView, child, size) {
|
|
927
|
+
child.set('size', size);
|
|
853
928
|
},
|
|
854
929
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
930
|
+
/**
|
|
931
|
+
* Returns the nearest valid size to a proposed size for a child view.
|
|
932
|
+
* By default, constrains the size to the range specified by the child's
|
|
933
|
+
* minimumSize and maximumSize properties, and returns 0 if the child
|
|
934
|
+
* has canCollapse set and the size is less than the child's collapseAtSize.
|
|
935
|
+
*
|
|
936
|
+
* You may override this in a delegate.
|
|
937
|
+
*
|
|
938
|
+
* @param {SC.SplitView} splitView The SplitView which owns the child.
|
|
939
|
+
* @param {SC.View} child The child.
|
|
940
|
+
* @param {Number} position The proposed size for the child.
|
|
941
|
+
* @returns Number
|
|
867
942
|
*/
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
.notifyPropertyChange('bottomRightThickness');
|
|
873
|
-
}.observes('layout')
|
|
943
|
+
splitViewConstrainSizeForChild: function(splitView, child, size) {
|
|
944
|
+
if (child.get('autoResizeStyle') === SC.FIXED_SIZE) {
|
|
945
|
+
return this.invokeDelegateMethod(this.get('delegate'), 'splitViewGetSizeForChild', this, child);
|
|
946
|
+
}
|
|
874
947
|
|
|
875
|
-
|
|
948
|
+
if (child.get('canCollapse')) {
|
|
949
|
+
var collapseAtSize = child.get('collapseAtSize');
|
|
950
|
+
if (collapseAtSize && size < collapseAtSize) return 0;
|
|
951
|
+
}
|
|
876
952
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
/** @scope SC.View.prototype */ {
|
|
953
|
+
var minSize = child.get('minimumSize') || 0;
|
|
954
|
+
if (minSize !== undefined && minSize !== null) size = Math.max(minSize, size);
|
|
880
955
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
@type SC.SplitView
|
|
884
|
-
*/
|
|
885
|
-
splitView: function() {
|
|
886
|
-
var view = this ;
|
|
887
|
-
while (view && !view.isSplitView) view = view.get('parentView') ;
|
|
888
|
-
return view ;
|
|
889
|
-
}.property('parentView').cacheable()
|
|
890
|
-
});
|
|
956
|
+
var maxSize = child.get('maximumSize');
|
|
957
|
+
if (maxSize !== undefined && maxSize !== null) size = Math.min(maxSize, size);
|
|
891
958
|
|
|
959
|
+
return size;
|
|
960
|
+
}
|
|
961
|
+
});
|