sproutcore 1.9.2 → 1.10.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +12 -9
- data/bin/sc-build-number +12 -9
- data/bin/sc-docs +12 -15
- data/bin/sc-gen +12 -9
- data/bin/sc-init +12 -9
- data/bin/sc-manifest +12 -9
- data/bin/sc-server +12 -9
- data/bin/sproutcore +12 -9
- data/lib/frameworks/sproutcore/Buildfile +14 -17
- data/lib/frameworks/sproutcore/CHANGELOG.md +214 -3
- data/lib/frameworks/sproutcore/README.md +4 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/Buildfile +13 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps/greenhouse/README → apps/greenhouse/README.md} +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/TODO +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/beautify.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/design.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/file.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/files.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/layout.js +9 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/library.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/page.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property_editor.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/targets.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/view_configs.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core_file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/data_source.js +42 -42
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/app_page.js +45 -45
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/app-selector.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/button.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/dock.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/general.css +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/icons.css +5 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/main-page.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/menu.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/modal.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/picker.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/search.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/text-field.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/dialogs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/images/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/inspectors.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/loading.rhtml +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/main_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/strings.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/fixtures/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/main.js +5 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/mixins/drop_down.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/design.js +4 -4
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/dir.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/file.js +7 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/target.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/view_config.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/resources/test_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/inspector.js +11 -11
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/library.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/main.js +26 -25
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/modals.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/ready.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/designs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/list_item.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/plist_item.js +1 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/theme.js +6 -6
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/anchor.js +43 -43
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/application_list_item.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/event_blocker.js +7 -7
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/label_designer.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/list_item.js +8 -8
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/plist_item.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/simple_button.js +31 -31
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/tear_off_picker.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/web.js +5 -5
- data/lib/frameworks/sproutcore/apps/media_examples/core.js +5 -6
- data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +16 -17
- data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +17 -18
- data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +18 -19
- data/lib/frameworks/sproutcore/apps/showcase/Buildfile +2 -2
- data/lib/frameworks/sproutcore/apps/showcase/README +1 -1
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +27 -7
- data/lib/frameworks/sproutcore/apps/showcase/core.js +6 -4
- data/lib/frameworks/sproutcore/apps/showcase/main.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/patch.diff +529 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +35 -16
- data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +195 -10
- data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/theme.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +10 -9
- data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +15 -6
- data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +5 -4
- data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +5 -5
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +15 -15
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/styles.css +3 -0
- data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +11 -11
- data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +6 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +28 -33
- data/lib/frameworks/sproutcore/apps/tests/controllers/{detail.js → test.js} +14 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +11 -15
- data/lib/frameworks/sproutcore/apps/tests/core.js +8 -113
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +9 -19
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +81 -92
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +3 -1
- data/lib/frameworks/sproutcore/apps/tests/main.js +8 -13
- data/lib/frameworks/sproutcore/apps/tests/statechart.js +268 -0
- data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +4 -4
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +16 -16
- data/lib/frameworks/sproutcore/apps/welcome/core.js +9 -9
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +22 -25
- data/lib/frameworks/sproutcore/apps/welcome/main.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +21 -7
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +35 -2
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +142 -75
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js +283 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js +284 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +64 -65
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +10 -25
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +12 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +53 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +30 -24
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +44 -40
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +105 -176
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/view_transition_protocol.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +225 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +54 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +86 -71
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +283 -120
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +653 -435
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +49 -42
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +422 -396
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +37 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/platform.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +4 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +18 -30
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +78 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +31 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +47 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +32 -31
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +23 -22
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +17 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +626 -211
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/border_frame_test.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +22 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/childViewLayout_test.js +27 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +10 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +17 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroy.js +60 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +19 -26
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +14 -13
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +341 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +26 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +28 -68
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +35 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +93 -78
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +62 -64
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +69 -18
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +26 -21
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +129 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +436 -238
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +38 -44
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +14 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +29 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceAllChildren_test.js +229 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +33 -95
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +87 -39
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +684 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +767 -625
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +4 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +645 -77
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +218 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +648 -321
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +326 -534
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +120 -126
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +1526 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +18 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +12 -94
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +43 -27
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/icons.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +90 -90
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +74 -48
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +187 -253
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +49 -9
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +236 -127
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/instance_management.js +107 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +42 -17
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +20 -15
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +205 -92
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +61 -25
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +39 -9
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +45 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/tests/system/datetime.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/design.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/controllers.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/design.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/designs.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_design.js +44 -44
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_files.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_rule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style_sheet.js +37 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/label.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/object_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/tab.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/text_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/view_designer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/css/designer.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/design_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/high_light.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/controller.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/page.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/pane.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/view.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/selection_handles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/binding.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/snap_lines.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/coders/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/designers/view_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/designer_drop_target.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/drawing.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/high_light.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/page_item_view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/selection_handles.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +51 -51
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_child.js +63 -52
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_thumb.js +64 -59
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +113 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +182 -203
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +51 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +513 -307
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +69 -217
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +31 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +15 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +2 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +25 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +29 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +19 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +14 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split_divider.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/modal.css +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +24 -98
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +446 -442
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +42 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +26 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +11 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +27 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +11 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +9 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +15 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/{mixins → views/collection}/collection_fast_path.js +18 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +46 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +101 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +26 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +89 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +27 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +32 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +6 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +103 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +76 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +91 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +2 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +70 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +10 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +37 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +18 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +115 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +37 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +194 -182
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +18 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +5 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/children.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/dividers.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +341 -45
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_child.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_thumb.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +6 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +49 -52
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +23 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +47 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +887 -740
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +68 -55
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +8 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +189 -167
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +55 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +145 -146
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +66 -66
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +40 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +203 -200
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +11 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +6 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +87 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +192 -179
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +64 -64
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +56 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +784 -714
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +21 -39
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +45 -41
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +4 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +9 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +40 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +62 -50
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +0 -9
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +46 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/render_delegates/desktop_scroller.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/tests/scroll/ui.js +38 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +26 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/test-image.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +63 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +60 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +72 -72
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +142 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +36 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/swap_transition_protocol.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +54 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +23 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +21 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-256.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-32.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-512.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-64.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/app_cache.js +412 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +11 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +33 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +49 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +29 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +8 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/app_cache_test.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +0 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +40 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +143 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +187 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +6 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +51 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_bounce_transition.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_smooth_transition.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_spring_transition.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/bounce_transition.js +211 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/fade_transition.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/pop_transition.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/scale_transition.js +54 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/slide_transition.js +140 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/spring_transition.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_dissolve_transition.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_push_transition.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +483 -95
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +65 -65
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +111 -100
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +30 -222
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +38 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +74 -62
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-1.8.3-patched.js +9485 -0
- data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +18 -17
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +10 -11
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +32 -21
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +72 -53
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +164 -156
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +145 -140
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +393 -370
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1045 -999
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +41 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +10 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +275 -205
- data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +229 -193
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +186 -188
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +138 -65
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +4 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +112 -23
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +71 -18
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +97 -57
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/infinite.js +184 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +63 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +73 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +100 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +449 -422
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +612 -562
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +115 -62
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +145 -64
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/respond_to_event.js +17 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +30 -30
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +34 -34
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/collection.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/view.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/panes/template.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/views/bindable_span.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +15 -21
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +35 -35
- data/lib/frameworks/sproutcore/scripts/run_sc_server_master.sh +34 -0
- data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +606 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +3 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +18 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +34 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +7 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +6 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +7 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +37 -37
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +12 -12
- data/lib/sproutcore/helpers/static_helper.rb +35 -27
- data/sproutcore.gemspec +1 -0
- metadata +529 -451
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +0 -55
- data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +0 -29
- data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +0 -28
- data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +0 -22
- data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +0 -51
- data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +0 -26
- data/lib/frameworks/sproutcore/apps/tests/states/ready.js +0 -56
- data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +0 -48
- data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +0 -44
- data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +0 -31
- data/lib/frameworks/sproutcore/apps/tests/states/start.js +0 -39
- data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +0 -3
- data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +0 -25
- data/lib/frameworks/sproutcore/frameworks/animation/README.md +0 -79
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +0 -1208
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +0 -152
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +0 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +0 -203
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +0 -213
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +0 -163
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +0 -97
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +0 -312
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +0 -961
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +0 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +0 -27
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +0 -394
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -8981
- data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +0 -40
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
@@ -4,14 +4,22 @@ SC.View.reopen(
|
|
4
4
|
/** @scope SC.View.prototype */{
|
5
5
|
|
6
6
|
/**
|
7
|
-
This code exists to make it possible to pool SC.Views.
|
7
|
+
This code exists to make it possible to pool SC.Views.
|
8
8
|
*/
|
9
9
|
_lastLayerId: null,
|
10
10
|
|
11
|
+
/** @private */
|
12
|
+
init: function (original) {
|
13
|
+
original();
|
14
|
+
|
15
|
+
// Set up the cached layerId if it has been set on create.
|
16
|
+
this._lastLayerId = this.get('layerId');
|
17
|
+
}.enhance(),
|
18
|
+
|
11
19
|
/**
|
12
20
|
Handles changes in the layer id.
|
13
21
|
*/
|
14
|
-
layerIdDidChange: function() {
|
22
|
+
layerIdDidChange: function () {
|
15
23
|
var layer = this.get('layer'),
|
16
24
|
lid = this.get('layerId'),
|
17
25
|
lastId = this._lastLayerId;
|
@@ -33,59 +41,7 @@ SC.View.reopen(
|
|
33
41
|
}
|
34
42
|
}.observes("layerId"),
|
35
43
|
|
36
|
-
|
37
|
-
This method is called whenever the receiver's parentView has changed.
|
38
|
-
The default implementation of this method marks the view's display
|
39
|
-
location as dirty so that it will update at the end of the run loop.
|
40
|
-
|
41
|
-
You will not usually need to override or call this method yourself, though
|
42
|
-
if you manually patch the parentView hierarchy for some reason, you should
|
43
|
-
call this method to notify the view that it's parentView has changed.
|
44
|
-
|
45
|
-
@returns {SC.View} receiver
|
46
|
-
*/
|
47
|
-
parentViewDidChange: function() {
|
48
|
-
this.recomputeIsVisibleInWindow() ;
|
49
|
-
|
50
|
-
this.resetBuildState();
|
51
|
-
this.set('layerLocationNeedsUpdate', YES) ;
|
52
|
-
this.invokeOnce(this.updateLayerLocationIfNeeded) ;
|
53
|
-
|
54
|
-
// We also need to iterate down through the view hierarchy and invalidate
|
55
|
-
// all our child view's caches for 'pane', since it could have changed.
|
56
|
-
//
|
57
|
-
// Note: In theory we could try to avoid this invalidation if we
|
58
|
-
// do this only in cases where we "know" the 'pane' value might
|
59
|
-
// have changed, but those cases are few and far between.
|
60
|
-
|
61
|
-
this._invalidatePaneCacheForSelfAndAllChildViews();
|
62
|
-
|
63
|
-
return this ;
|
64
|
-
},
|
65
|
-
|
66
|
-
/** @private
|
67
|
-
We want to cache the 'pane' property, but it's impossible for us to
|
68
|
-
declare a dependence on all properties that can affect the value. (For
|
69
|
-
example, if our grandparent gets attached to a new pane, our pane will
|
70
|
-
have changed.) So when there's the potential for the pane changing, we
|
71
|
-
need to invalidate the caches for all our child views, and their child
|
72
|
-
views, and so on.
|
73
|
-
*/
|
74
|
-
_invalidatePaneCacheForSelfAndAllChildViews: function () {
|
75
|
-
var childView, childViews = this.get('childViews'),
|
76
|
-
len = childViews.length, idx ;
|
77
|
-
|
78
|
-
this.notifyPropertyChange('pane');
|
79
|
-
|
80
|
-
for (idx=0; idx<len; ++idx) {
|
81
|
-
childView = childViews[idx];
|
82
|
-
if (childView._invalidatePaneCacheForSelfAndAllChildViews) {
|
83
|
-
childView._invalidatePaneCacheForSelfAndAllChildViews();
|
84
|
-
}
|
85
|
-
}
|
86
|
-
},
|
87
|
-
|
88
|
-
// ..........................................................
|
44
|
+
// ------------------------------------------------------------------------
|
89
45
|
// LAYER LOCATION
|
90
46
|
//
|
91
47
|
|
@@ -104,27 +60,12 @@ SC.View.reopen(
|
|
104
60
|
@param {SC.View} beforeView
|
105
61
|
@returns {SC.View} the receiver
|
106
62
|
*/
|
107
|
-
insertBefore: function(view, beforeView) {
|
63
|
+
insertBefore: function (view, beforeView) {
|
108
64
|
view.beginPropertyChanges(); // limit notifications
|
109
65
|
|
110
|
-
//
|
111
|
-
if (view.
|
112
|
-
|
113
|
-
if (view.willAddToParent) { view.willAddToParent(this, beforeView) ; }
|
114
|
-
|
115
|
-
// set parentView of child
|
116
|
-
view.set('parentView', this);
|
117
|
-
|
118
|
-
// add to childView's array.
|
119
|
-
var idx, childViews = this.get('childViews') ;
|
120
|
-
if (childViews.needsClone) { this.set(childViews = []); }
|
121
|
-
idx = (beforeView) ? childViews.indexOf(beforeView) : childViews.length;
|
122
|
-
if (idx<0) { idx = childViews.length ; }
|
123
|
-
childViews.insertAt(idx, view) ;
|
124
|
-
|
125
|
-
// The DOM will need some fixing up, note this on the view.
|
126
|
-
if(view.parentViewDidChange) view.parentViewDidChange();
|
127
|
-
if(view.layoutDidChange) view.layoutDidChange();
|
66
|
+
// Reset any views that are already building in or out.
|
67
|
+
if (view.resetBuildState) { view.resetBuildState(); }
|
68
|
+
view._doAdopt(this, beforeView);
|
128
69
|
|
129
70
|
view.endPropertyChanges();
|
130
71
|
|
@@ -132,39 +73,29 @@ SC.View.reopen(
|
|
132
73
|
// doesn't complete until the end of the RunLoop
|
133
74
|
// There may be better ways to do this than with invokeLast,
|
134
75
|
// but it's the best I can do for now - PDW
|
135
|
-
this.invokeLast(function(){
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
});
|
76
|
+
// this.invokeLast(function () {
|
77
|
+
// var pane = view.get('pane');
|
78
|
+
// if (pane && pane.get('isPaneAttached')) {
|
79
|
+
// view._notifyDidAppendToDocument();
|
80
|
+
// }
|
81
|
+
// });
|
141
82
|
|
142
|
-
|
143
|
-
// are added immediately. Hence notify views immediately.
|
144
|
-
if (this.didAddChild) { this.didAddChild(view, beforeView) ; }
|
145
|
-
if (view.didAddToParent) { view.didAddToParent(this, beforeView) ; }
|
146
|
-
|
147
|
-
return this ;
|
83
|
+
return this;
|
148
84
|
},
|
149
85
|
|
150
|
-
removeChild: function(original, view) {
|
86
|
+
removeChild: function (original, view) {
|
151
87
|
if (!view) { return this; } // nothing to do
|
152
88
|
if (view.parentView !== this) {
|
153
|
-
throw "%@.removeChild(%@) must belong to parent".fmt(this,view);
|
89
|
+
throw new Error("%@.removeChild(%@) must belong to parent".fmt(this, view));
|
154
90
|
}
|
91
|
+
|
155
92
|
// notify views
|
156
|
-
|
157
|
-
if (
|
93
|
+
// TODO: Deprecate these notifications.
|
94
|
+
if (view.willRemoveFromParent) { view.willRemoveFromParent(); }
|
95
|
+
if (this.willRemoveChild) { this.willRemoveChild(view); }
|
158
96
|
|
159
97
|
original(view);
|
160
98
|
|
161
|
-
// The DOM will need some fixing up, note this on the view.
|
162
|
-
if(view.parentViewDidChange) view.parentViewDidChange() ;
|
163
|
-
|
164
|
-
// notify views
|
165
|
-
if (this.didRemoveChild) { this.didRemoveChild(view); }
|
166
|
-
if (view.didRemoveFromParent) { view.didRemoveFromParent(this) ; }
|
167
|
-
|
168
99
|
return this;
|
169
100
|
}.enhance(),
|
170
101
|
|
@@ -180,13 +111,13 @@ SC.View.reopen(
|
|
180
111
|
@param view {SC.View} the view to remove from the DOM.
|
181
112
|
@returns {SC.View} the receiver
|
182
113
|
*/
|
183
|
-
replaceChild: function(view, oldView) {
|
114
|
+
replaceChild: function (view, oldView) {
|
184
115
|
// suspend notifications
|
185
116
|
view.beginPropertyChanges();
|
186
117
|
oldView.beginPropertyChanges();
|
187
118
|
this.beginPropertyChanges();
|
188
119
|
|
189
|
-
this.insertBefore(view,oldView).removeChild(oldView)
|
120
|
+
this.insertBefore(view, oldView).removeChild(oldView);
|
190
121
|
|
191
122
|
// resume notifications
|
192
123
|
this.endPropertyChanges();
|
@@ -200,19 +131,52 @@ SC.View.reopen(
|
|
200
131
|
Replaces the current array of child views with the new array of child
|
201
132
|
views.
|
202
133
|
|
203
|
-
|
134
|
+
This will remove *and* destroy all of the existing child views and their
|
135
|
+
layers.
|
136
|
+
|
137
|
+
Warning: The new array must be made of *child* views (i.e. created using
|
138
|
+
this.createChildView() on the parent).
|
139
|
+
|
140
|
+
@param {Array} newChildViews Child views you want to add
|
204
141
|
@returns {SC.View} receiver
|
205
142
|
*/
|
206
|
-
replaceAllChildren: function(
|
207
|
-
var len = views.get('length'), idx;
|
208
|
-
|
143
|
+
replaceAllChildren: function (newChildViews) {
|
209
144
|
this.beginPropertyChanges();
|
210
|
-
|
211
|
-
|
212
|
-
this.
|
145
|
+
|
146
|
+
// If rendered, destroy our layer so we can re-render.
|
147
|
+
// if (this.get('_isRendered')) {
|
148
|
+
// var layer = this.get('layer');
|
149
|
+
|
150
|
+
// // If attached, detach and track our parent node so we can re-attach.
|
151
|
+
// if (this.get('isAttached')) {
|
152
|
+
// // We don't allow for transitioning out at this time.
|
153
|
+
// // TODO: support transition out of child views.
|
154
|
+
// this._doDetach(true);
|
155
|
+
// }
|
156
|
+
|
157
|
+
// // Destroy our layer in one move.
|
158
|
+
// this.destroyLayer();
|
159
|
+
// }
|
160
|
+
|
161
|
+
// Remove the current child views.
|
162
|
+
// We aren't rendered at this point so it bypasses the optimization in
|
163
|
+
// removeAllChildren that would recreate the layer. We would rather add the
|
164
|
+
// new childViews before recreating the layer.
|
165
|
+
this.removeAllChildren(true);
|
166
|
+
|
167
|
+
// Add the new children.
|
168
|
+
for (var i = 0, len = newChildViews.get('length'); i < len; i++) {
|
169
|
+
this.appendChild(newChildViews.objectAt(i));
|
170
|
+
}
|
171
|
+
|
172
|
+
// We were rendered previously.
|
173
|
+
// if (layer) {
|
174
|
+
// // Recreate our layer (now empty).
|
175
|
+
// this.createLayer();
|
176
|
+
// }
|
213
177
|
this.endPropertyChanges();
|
214
178
|
|
215
|
-
return this
|
179
|
+
return this;
|
216
180
|
},
|
217
181
|
|
218
182
|
/**
|
@@ -222,19 +186,21 @@ SC.View.reopen(
|
|
222
186
|
@param view {SC.View} the view to insert
|
223
187
|
@returns {SC.View} the receiver
|
224
188
|
*/
|
225
|
-
appendChild: function(view) {
|
189
|
+
appendChild: function (view) {
|
226
190
|
return this.insertBefore(view, null);
|
227
191
|
},
|
228
192
|
|
229
|
-
|
230
|
-
|
231
|
-
|
193
|
+
// ------------------------------------------------------------------------
|
194
|
+
// BUILDING IN/OUT
|
195
|
+
//
|
232
196
|
|
233
197
|
/**
|
234
198
|
Call this to append a child while building it in. If the child is not
|
235
199
|
buildable, this is the same as calling appendChild.
|
200
|
+
|
201
|
+
@deprecated Version 1.10
|
236
202
|
*/
|
237
|
-
buildInChild: function(view) {
|
203
|
+
buildInChild: function (view) {
|
238
204
|
view.willBuildInToView(this);
|
239
205
|
this.appendChild(view);
|
240
206
|
view.buildInToView(this);
|
@@ -243,47 +209,64 @@ SC.View.reopen(
|
|
243
209
|
/**
|
244
210
|
Call to remove a child after building it out. If the child is not buildable,
|
245
211
|
this will simply call removeChild.
|
212
|
+
|
213
|
+
@deprecated Version 1.10
|
246
214
|
*/
|
247
|
-
buildOutChild: function(view) {
|
215
|
+
buildOutChild: function (view) {
|
248
216
|
view.buildOutFromView(this);
|
249
217
|
},
|
250
218
|
|
251
219
|
/**
|
252
220
|
Called by child view when build in finishes. By default, does nothing.
|
253
221
|
|
222
|
+
@deprecated Version 1.10
|
254
223
|
*/
|
255
|
-
buildInDidFinishFor: function(child) {
|
224
|
+
buildInDidFinishFor: function (child) {
|
256
225
|
},
|
257
226
|
|
258
227
|
/**
|
259
228
|
@private
|
260
229
|
Called by child view when build out finishes. By default removes the child view.
|
261
230
|
*/
|
262
|
-
buildOutDidFinishFor: function(child) {
|
231
|
+
buildOutDidFinishFor: function (child) {
|
263
232
|
this.removeChild(child);
|
264
233
|
},
|
265
234
|
|
266
235
|
/**
|
267
236
|
Whether the view is currently building in.
|
237
|
+
|
238
|
+
@deprecated Version 1.10
|
268
239
|
*/
|
269
240
|
isBuildingIn: NO,
|
270
241
|
|
271
242
|
/**
|
272
243
|
Whether the view is currently building out.
|
244
|
+
|
245
|
+
@deprecated Version 1.10
|
273
246
|
*/
|
274
247
|
isBuildingOut: NO,
|
275
248
|
|
276
249
|
/**
|
277
250
|
Implement this, and call didFinishBuildIn when you are done.
|
251
|
+
|
252
|
+
@deprecated Version 1.10
|
278
253
|
*/
|
279
|
-
buildIn: function() {
|
254
|
+
buildIn: function () {
|
255
|
+
//@if(debug)
|
256
|
+
SC.warn("The SC.View build methods have been deprecated in favor of the transition plugins. To build in a view, please provide a transitionIn plugin (many are pre-built in SproutCore) and to build out a view, please provide a transitionOut plugin.");
|
257
|
+
//@endif
|
280
258
|
this.buildInDidFinish();
|
281
259
|
},
|
282
260
|
|
283
261
|
/**
|
284
262
|
Implement this, and call didFinishBuildOut when you are done.
|
263
|
+
|
264
|
+
@deprecated Version 1.10
|
285
265
|
*/
|
286
|
-
buildOut: function() {
|
266
|
+
buildOut: function () {
|
267
|
+
//@if(debug)
|
268
|
+
SC.warn("The SC.View build methods have been deprecated in favor of the transition plugins. To build in a view, please provide a transitionIn plugin (many are pre-built in SproutCore) and to build out a view, please provide a transitionOut plugin.");
|
269
|
+
//@endif
|
287
270
|
this.buildOutDidFinish();
|
288
271
|
},
|
289
272
|
|
@@ -291,8 +274,9 @@ SC.View.reopen(
|
|
291
274
|
This should reset (without animation) any internal states; sometimes called before.
|
292
275
|
|
293
276
|
It is usually called before a build in, by the parent view.
|
277
|
+
@deprecated Version 1.10
|
294
278
|
*/
|
295
|
-
resetBuild: function() {
|
279
|
+
resetBuild: function () {
|
296
280
|
|
297
281
|
},
|
298
282
|
|
@@ -302,8 +286,10 @@ SC.View.reopen(
|
|
302
286
|
anything.
|
303
287
|
|
304
288
|
This is basically called whenever build in happens.
|
289
|
+
|
290
|
+
@deprecated Version 1.10
|
305
291
|
*/
|
306
|
-
buildOutDidCancel: function() {
|
292
|
+
buildOutDidCancel: function () {
|
307
293
|
|
308
294
|
},
|
309
295
|
|
@@ -314,15 +300,19 @@ SC.View.reopen(
|
|
314
300
|
If build in was cancelled, it means build out is probably happening.
|
315
301
|
So, any timers or anything you had going, you can cancel.
|
316
302
|
Then buildOut will happen.
|
303
|
+
|
304
|
+
@deprecated Version 1.10
|
317
305
|
*/
|
318
|
-
buildInDidCancel: function() {
|
306
|
+
buildInDidCancel: function () {
|
319
307
|
|
320
308
|
},
|
321
309
|
|
322
310
|
/**
|
323
311
|
Call this when you have built in.
|
312
|
+
|
313
|
+
@deprecated Version 1.10
|
324
314
|
*/
|
325
|
-
buildInDidFinish: function() {
|
315
|
+
buildInDidFinish: function () {
|
326
316
|
this.isBuildingIn = NO;
|
327
317
|
this._buildingInTo.buildInDidFinishFor(this);
|
328
318
|
this._buildingInTo = null;
|
@@ -330,8 +320,10 @@ SC.View.reopen(
|
|
330
320
|
|
331
321
|
/**
|
332
322
|
Call this when you have finished building out.
|
323
|
+
|
324
|
+
@deprecated Version 1.10
|
333
325
|
*/
|
334
|
-
buildOutDidFinish: function() {
|
326
|
+
buildOutDidFinish: function () {
|
335
327
|
this.isBuildingOut = NO;
|
336
328
|
this._buildingOutFrom.buildOutDidFinishFor(this);
|
337
329
|
this._buildingOutFrom = null;
|
@@ -339,8 +331,10 @@ SC.View.reopen(
|
|
339
331
|
|
340
332
|
/**
|
341
333
|
Usually called by parentViewDidChange, this resets the build state (calling resetBuild in the process).
|
334
|
+
|
335
|
+
@deprecated Version 1.10
|
342
336
|
*/
|
343
|
-
resetBuildState: function() {
|
337
|
+
resetBuildState: function () {
|
344
338
|
if (this.isBuildingIn) {
|
345
339
|
this.buildInDidCancel();
|
346
340
|
this.isBuildingIn = NO;
|
@@ -365,7 +359,7 @@ SC.View.reopen(
|
|
365
359
|
|
366
360
|
Mostly, this cancels any build out _before_ the view is removed through parent change.
|
367
361
|
*/
|
368
|
-
willBuildInToView: function(view) {
|
362
|
+
willBuildInToView: function (view) {
|
369
363
|
// stop any current build outs (and if we need to, we also need to build in again)
|
370
364
|
if (this.isBuildingOut) {
|
371
365
|
this.buildOutDidCancel();
|
@@ -376,7 +370,7 @@ SC.View.reopen(
|
|
376
370
|
@private (semi)
|
377
371
|
Called by building parent view's buildInChild method.
|
378
372
|
*/
|
379
|
-
buildInToView: function(view) {
|
373
|
+
buildInToView: function (view) {
|
380
374
|
// if we are already building in, do nothing.
|
381
375
|
if (this.isBuildingIn) { return; }
|
382
376
|
|
@@ -392,7 +386,7 @@ SC.View.reopen(
|
|
392
386
|
|
393
387
|
The supplied view should always be the parent view.
|
394
388
|
*/
|
395
|
-
buildOutFromView: function(view) {
|
389
|
+
buildOutFromView: function (view) {
|
396
390
|
// if we are already building out, do nothing.
|
397
391
|
if (this.isBuildingOut) { return; }
|
398
392
|
|
@@ -0,0 +1,1526 @@
|
|
1
|
+
sc_require("views/view/base");
|
2
|
+
|
3
|
+
|
4
|
+
SC.CoreView.mixin(
|
5
|
+
/** @scope SC.CoreView */ {
|
6
|
+
|
7
|
+
/**
|
8
|
+
The view has been rendered.
|
9
|
+
|
10
|
+
Use a logical AND (single `&`) to test rendered status. For example,
|
11
|
+
|
12
|
+
view.get('viewState') & SC.CoreView.IS_RENDERED
|
13
|
+
|
14
|
+
@static
|
15
|
+
@constant
|
16
|
+
*/
|
17
|
+
IS_RENDERED: 0x0100, // 256
|
18
|
+
|
19
|
+
/**
|
20
|
+
The view has been attached.
|
21
|
+
|
22
|
+
Use a logical AND (single `&`) to test attached status. For example,
|
23
|
+
|
24
|
+
view.get('viewState') & SC.CoreView.IS_ATTACHED
|
25
|
+
|
26
|
+
@static
|
27
|
+
@constant
|
28
|
+
*/
|
29
|
+
IS_ATTACHED: 0x0080, // 128
|
30
|
+
|
31
|
+
/**
|
32
|
+
The view is visible in the display.
|
33
|
+
|
34
|
+
Use a logical AND (single `&`) to test shown status. For example,
|
35
|
+
|
36
|
+
view.get('viewState') & SC.CoreView.IS_SHOWN
|
37
|
+
|
38
|
+
@static
|
39
|
+
@constant
|
40
|
+
*/
|
41
|
+
IS_SHOWN: 0x0040, // 64
|
42
|
+
|
43
|
+
/**
|
44
|
+
The view is invisible in the display.
|
45
|
+
|
46
|
+
Use a logical AND (single `&`) to test hidden status. For example,
|
47
|
+
|
48
|
+
view.get('viewState') & SC.CoreView.IS_HIDDEN
|
49
|
+
|
50
|
+
@static
|
51
|
+
@constant
|
52
|
+
*/
|
53
|
+
IS_HIDDEN: 0x0020, // 32
|
54
|
+
|
55
|
+
/**
|
56
|
+
The view has been created, but has not been rendered or attached.
|
57
|
+
|
58
|
+
@static
|
59
|
+
@constant
|
60
|
+
*/
|
61
|
+
UNRENDERED: 0x0200, // 512
|
62
|
+
|
63
|
+
/**
|
64
|
+
The view has been created and rendered, but has not been attached
|
65
|
+
(i.e. appended to the document).
|
66
|
+
|
67
|
+
@static
|
68
|
+
@constant
|
69
|
+
*/
|
70
|
+
UNATTACHED: 0x0300, // 768
|
71
|
+
|
72
|
+
/**
|
73
|
+
The view has been created and rendered, but an ancestor is not attached.
|
74
|
+
|
75
|
+
@static
|
76
|
+
@constant
|
77
|
+
*/
|
78
|
+
UNATTACHED_BY_PARENT: 0x0301, // 769
|
79
|
+
|
80
|
+
/**
|
81
|
+
The view has been created, rendered and attached and is visible in the
|
82
|
+
display.
|
83
|
+
|
84
|
+
@static
|
85
|
+
@constant
|
86
|
+
*/
|
87
|
+
ATTACHED_SHOWN: 0x03C0, // 960
|
88
|
+
|
89
|
+
/**
|
90
|
+
The view has been created, rendered and attached, but is not visible in the
|
91
|
+
display.
|
92
|
+
|
93
|
+
Test with & SC.CoreView.IS_HIDDEN
|
94
|
+
@static
|
95
|
+
@constant
|
96
|
+
*/
|
97
|
+
ATTACHED_HIDDEN: 0x03A0, // 928
|
98
|
+
|
99
|
+
/**
|
100
|
+
The view has been created, rendered and attached, but is not visible in the
|
101
|
+
display due to being hidden by a parent view.
|
102
|
+
|
103
|
+
@static
|
104
|
+
@constant
|
105
|
+
*/
|
106
|
+
ATTACHED_HIDDEN_BY_PARENT: 0x03A1, // 929
|
107
|
+
|
108
|
+
/**
|
109
|
+
The view has been created, rendered and attached and is visible in the
|
110
|
+
display. It is currently transitioning according to the transitionIn
|
111
|
+
property before being fully shown (i.e ATTACHED_SHOWN).
|
112
|
+
|
113
|
+
@static
|
114
|
+
@constant
|
115
|
+
*/
|
116
|
+
ATTACHED_BUILDING_IN: 0x03C1, // 961
|
117
|
+
|
118
|
+
/**
|
119
|
+
The view has been created, rendered and attached. It is currently
|
120
|
+
transitioning according to the transitionOut property before being
|
121
|
+
detached (i.e. removed from the document).
|
122
|
+
|
123
|
+
@static
|
124
|
+
@constant
|
125
|
+
*/
|
126
|
+
ATTACHED_BUILDING_OUT: 0x0381, // 897
|
127
|
+
|
128
|
+
/**
|
129
|
+
The view has been created, rendered and attached. It is currently
|
130
|
+
transitioning according to the transitionOut property before being
|
131
|
+
detached (i.e. removed from the document) because a parent view is
|
132
|
+
being detached.
|
133
|
+
|
134
|
+
@static
|
135
|
+
@constant
|
136
|
+
*/
|
137
|
+
ATTACHED_BUILDING_OUT_BY_PARENT: 0x0382, // 898
|
138
|
+
|
139
|
+
/**
|
140
|
+
The view has been created, rendered and attached and is visible in the
|
141
|
+
display. It is currently transitioning according to the transitionShow
|
142
|
+
property before being fully shown (i.e ATTACHED_SHOWN).
|
143
|
+
|
144
|
+
@static
|
145
|
+
@constant
|
146
|
+
*/
|
147
|
+
ATTACHED_SHOWING: 0x03C2, // 962
|
148
|
+
|
149
|
+
/**
|
150
|
+
The view has been created, rendered and attached. It is currently
|
151
|
+
transitioning according to the transitionHide property before being fully
|
152
|
+
hidden.
|
153
|
+
|
154
|
+
@static
|
155
|
+
@constant
|
156
|
+
*/
|
157
|
+
ATTACHED_HIDING: 0x03A2 // 930
|
158
|
+
|
159
|
+
});
|
160
|
+
|
161
|
+
|
162
|
+
SC.CoreView.reopen(
|
163
|
+
/** @scope SC.CoreView.prototype */ {
|
164
|
+
|
165
|
+
// ------------------------------------------------------------------------
|
166
|
+
// Properties
|
167
|
+
//
|
168
|
+
|
169
|
+
/**
|
170
|
+
The current state of the view as managed by its internal statechart.
|
171
|
+
|
172
|
+
In order to optimize the behavior of SC.View, such as only observing display
|
173
|
+
properties when in a rendered state or queueing updates when in a non-shown
|
174
|
+
state, SC.View includes a simple internal statechart that maintains the
|
175
|
+
current state of the view.
|
176
|
+
|
177
|
+
Views have several possible states:
|
178
|
+
|
179
|
+
* SC.CoreView.UNRENDERED
|
180
|
+
* SC.CoreView.UNATTACHED
|
181
|
+
* SC.CoreView.UNATTACHED_BY_PARENT
|
182
|
+
* SC.CoreView.ATTACHED_SHOWING
|
183
|
+
* SC.CoreView.ATTACHED_SHOWN
|
184
|
+
* SC.CoreView.ATTACHED_HIDING
|
185
|
+
* SC.CoreView.ATTACHED_HIDDEN
|
186
|
+
* SC.CoreView.ATTACHED_HIDDEN_BY_PARENT
|
187
|
+
* SC.CoreView.ATTACHED_BUILDING_IN
|
188
|
+
* SC.CoreView.ATTACHED_BUILDING_OUT
|
189
|
+
* SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT
|
190
|
+
|
191
|
+
@type String
|
192
|
+
@default SC.CoreView.UNRENDERED
|
193
|
+
@readonly
|
194
|
+
*/
|
195
|
+
viewState: SC.CoreView.UNRENDERED,
|
196
|
+
|
197
|
+
/**
|
198
|
+
Whether the view's layer is attached to the document or not.
|
199
|
+
|
200
|
+
When the view's layer is attached to the document, this value will be true.
|
201
|
+
|
202
|
+
@field
|
203
|
+
@type Boolean
|
204
|
+
@default false
|
205
|
+
@readonly
|
206
|
+
*/
|
207
|
+
isAttached: function () {
|
208
|
+
var state = this.get('viewState');
|
209
|
+
return state & SC.CoreView.IS_ATTACHED;
|
210
|
+
}.property('viewState').cacheable(),
|
211
|
+
|
212
|
+
/** @private
|
213
|
+
Whether the view's layer exists or not.
|
214
|
+
|
215
|
+
When the view's layer is created, this value will be true. This includes
|
216
|
+
the unattached view state and all of the attached states.
|
217
|
+
|
218
|
+
@field
|
219
|
+
@type Boolean
|
220
|
+
@default false
|
221
|
+
@readonly
|
222
|
+
*/
|
223
|
+
// NOTE: This property is of little value, so it's private in case we decide to toss it.
|
224
|
+
_isRendered: function () {
|
225
|
+
return this.get('viewState') !== SC.CoreView.UNRENDERED;
|
226
|
+
}.property('viewState').cacheable(),
|
227
|
+
|
228
|
+
/**
|
229
|
+
Whether the view is fully or becoming shown or not.
|
230
|
+
|
231
|
+
When the view is shown in the window, this value will be true. Note that
|
232
|
+
if the view is transitioning out or hiding, this value will still be true.
|
233
|
+
|
234
|
+
This is not necessarily the same as `isVisible` although the two properties
|
235
|
+
are related. For instance, it's possible to set `isVisible` to `true` and
|
236
|
+
still have `isVisibleInWindow` be `false` or vice versa due to the
|
237
|
+
`isVisibleInWindow` state of the view's parent view. Therefore,
|
238
|
+
`isVisibleInWindow` represents the actual visible state of the view and
|
239
|
+
`isVisible` is used to attempt to alter that state.
|
240
|
+
|
241
|
+
@field
|
242
|
+
@type Boolean
|
243
|
+
@default false
|
244
|
+
@readonly
|
245
|
+
*/
|
246
|
+
isVisibleInWindow: function () {
|
247
|
+
var state = this.get('viewState');
|
248
|
+
return state & SC.CoreView.IS_ATTACHED &&
|
249
|
+
state !== SC.CoreView.ATTACHED_HIDDEN &&
|
250
|
+
state !== SC.CoreView.ATTACHED_HIDDEN_BY_PARENT;
|
251
|
+
}.property('viewState').cacheable(),
|
252
|
+
|
253
|
+
// ------------------------------------------------------------------------
|
254
|
+
// Actions (Locked down to the proper state)
|
255
|
+
//
|
256
|
+
|
257
|
+
|
258
|
+
/** @private Adopt this view action. */
|
259
|
+
_doAdopt: function (parentView, beforeView) {
|
260
|
+
var curParentView = this.get('parentView'),
|
261
|
+
handled = true;
|
262
|
+
|
263
|
+
if (curParentView && curParentView !== parentView) {
|
264
|
+
//@if(debug)
|
265
|
+
// This should be avoided, because using the same view instance without explicitly orphaning it first is a dangerous practice.
|
266
|
+
SC.warn("Developer Warning: You should not adopt the view, %@, to a new parent without removing it from its old parent first.".fmt(this));
|
267
|
+
//@endif
|
268
|
+
|
269
|
+
// Force orphaning the view.
|
270
|
+
this._doOrphan();
|
271
|
+
curParentView = false;
|
272
|
+
}
|
273
|
+
|
274
|
+
// You can adopt childViews that have you set as their parent (i.e. created
|
275
|
+
// with createChildView()), but have not yet been fully adopted.
|
276
|
+
if (!curParentView || this.get('childViews').indexOf(this) < 0) {
|
277
|
+
var idx,
|
278
|
+
childViews = parentView.get('childViews'),
|
279
|
+
parentViewState = parentView.get('viewState'),
|
280
|
+
parentNode, nextNode, nextView, siblings;
|
281
|
+
|
282
|
+
// Send notifications.
|
283
|
+
if (parentView.willAddChild) { parentView.willAddChild(this, beforeView); }
|
284
|
+
if (this.willAddToParent) { this.willAddToParent(parentView, beforeView); }
|
285
|
+
|
286
|
+
// Set parentView.
|
287
|
+
this.set('parentView', parentView);
|
288
|
+
|
289
|
+
// Add to the new parent's childViews array.
|
290
|
+
if (childViews.needsClone) { parentView.set(childViews = []); }
|
291
|
+
idx = (beforeView) ? childViews.indexOf(beforeView) : childViews.length;
|
292
|
+
if (idx < 0) { idx = childViews.length; }
|
293
|
+
childViews.insertAt(idx, this);
|
294
|
+
|
295
|
+
// Notify adopted (on self and all child views).
|
296
|
+
this._adopted();
|
297
|
+
|
298
|
+
|
299
|
+
switch (this.get('viewState')) {
|
300
|
+
case SC.CoreView.UNRENDERED:
|
301
|
+
switch (parentViewState) {
|
302
|
+
case SC.CoreView.UNRENDERED:
|
303
|
+
break;
|
304
|
+
default:
|
305
|
+
// Bypass the unrendered state for adopted views.
|
306
|
+
this._doRender();
|
307
|
+
}
|
308
|
+
break;
|
309
|
+
case SC.CoreView.UNATTACHED:
|
310
|
+
switch (parentViewState) {
|
311
|
+
case SC.CoreView.UNRENDERED:
|
312
|
+
// Bring the child view down to the state of the parent.
|
313
|
+
this._doDestroyLayer();
|
314
|
+
break;
|
315
|
+
default:
|
316
|
+
parentNode = parentView.get('containerLayer');
|
317
|
+
siblings = parentView.get('childViews');
|
318
|
+
nextView = siblings.objectAt(siblings.indexOf(this) + 1);
|
319
|
+
nextNode = (nextView) ? nextView.get('layer') : null;
|
320
|
+
|
321
|
+
this._doAttach(parentNode, nextNode);
|
322
|
+
}
|
323
|
+
break;
|
324
|
+
default: // ATTACHED_X
|
325
|
+
switch (parentViewState) {
|
326
|
+
case SC.CoreView.UNRENDERED:
|
327
|
+
// Bring the child view down to the state of the parent.
|
328
|
+
this._doDestroyLayer();
|
329
|
+
break;
|
330
|
+
default:
|
331
|
+
parentNode = parentView.get('containerLayer');
|
332
|
+
siblings = parentView.get('childViews');
|
333
|
+
nextView = siblings.objectAt(siblings.indexOf(this) + 1);
|
334
|
+
nextNode = (nextView) ? nextView.get('layer') : null;
|
335
|
+
|
336
|
+
this._doAttach(parentNode, nextNode);
|
337
|
+
}
|
338
|
+
}
|
339
|
+
|
340
|
+
// Notify.
|
341
|
+
if (parentView.didAddChild) { parentView.didAddChild(this, beforeView); }
|
342
|
+
if (this.didAddToParent) { this.didAddToParent(parentView, beforeView); }
|
343
|
+
} else {
|
344
|
+
handled = false;
|
345
|
+
}
|
346
|
+
|
347
|
+
return handled;
|
348
|
+
},
|
349
|
+
|
350
|
+
/** @private Attach this view action. */
|
351
|
+
_doAttach: function (parentNode, nextNode) {
|
352
|
+
var state = this.get('viewState'),
|
353
|
+
transitionIn = this.get('transitionIn'),
|
354
|
+
parentView;
|
355
|
+
|
356
|
+
switch (state) {
|
357
|
+
case SC.CoreView.ATTACHED_HIDING: // FAST PATH!
|
358
|
+
case SC.CoreView.ATTACHED_HIDDEN: // FAST PATH!
|
359
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT: // FAST PATH!
|
360
|
+
case SC.CoreView.ATTACHED_BUILDING_IN: // FAST PATH!
|
361
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT: // FAST PATH!
|
362
|
+
case SC.CoreView.ATTACHED_SHOWING: // FAST PATH!
|
363
|
+
case SC.CoreView.ATTACHED_SHOWN: // FAST PATH!
|
364
|
+
//@if(debug)
|
365
|
+
// This should be avoided, because moving the view layer without explicitly removing it first is a dangerous practice.
|
366
|
+
SC.warn("Developer Warning: You can not attach the view, %@, to a new node without properly detaching it first.".fmt(this));
|
367
|
+
//@endif
|
368
|
+
return false;
|
369
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
370
|
+
//@if(debug)
|
371
|
+
SC.warn("Developer Warning: You can not attach the child view, %@, directly.".fmt(this));
|
372
|
+
//@endif
|
373
|
+
return false;
|
374
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
375
|
+
return false;
|
376
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
377
|
+
// If already building out, we need to cancel and possibly build in.
|
378
|
+
this._callOnChildViews('_parentDidCancelBuildOut');
|
379
|
+
|
380
|
+
// Remove the shared building out count if it exists.
|
381
|
+
delete this._buildingOutCount;
|
382
|
+
|
383
|
+
// Note: We can be in ATTACHED_BUILDING_OUT state without a transition out while we wait for child views.
|
384
|
+
if (this.get('transitionOut')) {
|
385
|
+
if (transitionIn) {
|
386
|
+
this._transitionIn();
|
387
|
+
|
388
|
+
// Route.
|
389
|
+
this._gotoAttachedBuildingInState();
|
390
|
+
} else {
|
391
|
+
// Route first!
|
392
|
+
this._gotoAttachedShownState();
|
393
|
+
|
394
|
+
this._cancelTransition();
|
395
|
+
}
|
396
|
+
} else {
|
397
|
+
|
398
|
+
// Route.
|
399
|
+
this._gotoAttachedShownState();
|
400
|
+
}
|
401
|
+
|
402
|
+
break;
|
403
|
+
case SC.CoreView.UNATTACHED:
|
404
|
+
var node = this.get('layer');
|
405
|
+
|
406
|
+
this._executeQueuedUpdates();
|
407
|
+
|
408
|
+
// Attach to parentNode
|
409
|
+
// IE doesn't support insertBefore(blah, undefined) in version IE9.
|
410
|
+
parentNode.insertBefore(node, nextNode || null);
|
411
|
+
|
412
|
+
parentView = this.get('parentView');
|
413
|
+
if (!parentView || (parentView && parentView.get('isAttached'))) {
|
414
|
+
// Notify.
|
415
|
+
this._notifyAttached();
|
416
|
+
|
417
|
+
// Route.
|
418
|
+
this._routeOnAttached();
|
419
|
+
|
420
|
+
// Give child views a chance to notify and update state.
|
421
|
+
this._callOnChildViews('_parentDidAppendToDocument');
|
422
|
+
} else {
|
423
|
+
// Route.
|
424
|
+
this._gotoUnattachedByParentState();
|
425
|
+
}
|
426
|
+
break;
|
427
|
+
default:
|
428
|
+
}
|
429
|
+
|
430
|
+
return true;
|
431
|
+
},
|
432
|
+
|
433
|
+
/** @private Destroy the layer of this view action. */
|
434
|
+
_doDestroyLayer: function () {
|
435
|
+
var handled = true;
|
436
|
+
|
437
|
+
if (this.get('_isRendered') && !this.get('isAttached')) {
|
438
|
+
// Remove our reference to the layer (our self and all our child views).
|
439
|
+
this._executeDoDestroyLayer();
|
440
|
+
this._callOnChildViews('_executeDoDestroyLayer');
|
441
|
+
} else {
|
442
|
+
handled = false;
|
443
|
+
}
|
444
|
+
|
445
|
+
return handled;
|
446
|
+
},
|
447
|
+
|
448
|
+
/** @private Detach this view action. */
|
449
|
+
_doDetach: function (immediately) {
|
450
|
+
var state = this.get('viewState'),
|
451
|
+
transitionOut = this.get('transitionOut');
|
452
|
+
|
453
|
+
switch (state) {
|
454
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
455
|
+
case SC.CoreView.UNATTACHED: // FAST PATH!
|
456
|
+
return false;
|
457
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT: // FAST PATH!
|
458
|
+
if (immediately) {
|
459
|
+
// Don't wait for the build out to complete.
|
460
|
+
this._cancelTransition();
|
461
|
+
|
462
|
+
// Detach immediately.
|
463
|
+
this._executeDoDetach();
|
464
|
+
} else {
|
465
|
+
// TODO: take ownership of the building out of self and all childviews. Super edge case stuff here..
|
466
|
+
this._gotoAttachedBuildingOutState();
|
467
|
+
}
|
468
|
+
|
469
|
+
// Don't try to notify or run transition out code again.
|
470
|
+
return true;
|
471
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT: // FAST PATH!
|
472
|
+
// If already building out, only cancel if immediately is set.
|
473
|
+
if (immediately) {
|
474
|
+
this._cancelTransition();
|
475
|
+
|
476
|
+
// Detach immediately.
|
477
|
+
this._executeDoDetach();
|
478
|
+
}
|
479
|
+
|
480
|
+
// Don't try to notify or run transition out code again.
|
481
|
+
return true;
|
482
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
483
|
+
case SC.CoreView.ATTACHED_HIDDEN:
|
484
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
485
|
+
// No need to transition out, since we're hidden.
|
486
|
+
immediately = true;
|
487
|
+
break;
|
488
|
+
case SC.CoreView.ATTACHED_HIDING:
|
489
|
+
if (immediately || !transitionOut) {
|
490
|
+
this._cancelTransition();
|
491
|
+
}
|
492
|
+
break;
|
493
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
494
|
+
if (immediately || !transitionOut) {
|
495
|
+
this._cancelTransition();
|
496
|
+
}
|
497
|
+
break;
|
498
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
499
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
500
|
+
break;
|
501
|
+
default:
|
502
|
+
}
|
503
|
+
|
504
|
+
// Notify.
|
505
|
+
this._notifyDetaching();
|
506
|
+
|
507
|
+
if (immediately) {
|
508
|
+
// Detach immediately.
|
509
|
+
this._executeDoDetach();
|
510
|
+
} else {
|
511
|
+
// In order to allow the removal of a parent to be delayed by children's
|
512
|
+
// transitions, we track which views are building out and finish
|
513
|
+
// only when they're all done.
|
514
|
+
this._buildingOutCount = 0;
|
515
|
+
|
516
|
+
// Tell all the child views so that any with a transitionOut may run it.
|
517
|
+
this._callOnChildViews('_parentWillBuildOutFromDocument', this);
|
518
|
+
|
519
|
+
if (transitionOut) {
|
520
|
+
this._transitionOut(this);
|
521
|
+
|
522
|
+
// Route.
|
523
|
+
this._gotoAttachedBuildingOutState();
|
524
|
+
} else if (this._buildingOutCount > 0) {
|
525
|
+
// Some children are building out, we will have to wait for them.
|
526
|
+
this._gotoAttachedBuildingOutState();
|
527
|
+
} else {
|
528
|
+
delete this._buildingOutCount;
|
529
|
+
|
530
|
+
// Detach immediately.
|
531
|
+
this._executeDoDetach();
|
532
|
+
}
|
533
|
+
}
|
534
|
+
|
535
|
+
return true;
|
536
|
+
},
|
537
|
+
|
538
|
+
/** @private Hide this view action. */
|
539
|
+
_doHide: function () {
|
540
|
+
var state = this.get('viewState'),
|
541
|
+
transitionHide = this.get('transitionHide');
|
542
|
+
|
543
|
+
switch (state) {
|
544
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
545
|
+
case SC.CoreView.ATTACHED_HIDDEN: // FAST PATH!
|
546
|
+
case SC.CoreView.ATTACHED_HIDING: // FAST PATH!
|
547
|
+
return false;
|
548
|
+
case SC.CoreView.UNATTACHED: // FAST PATH!
|
549
|
+
case SC.CoreView.UNATTACHED_BY_PARENT: // FAST PATH!
|
550
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT: // FAST PATH!
|
551
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT: // FAST PATH!
|
552
|
+
// Queue the visibility update for the next time we display.
|
553
|
+
this._visibleStyleNeedsUpdate = true;
|
554
|
+
|
555
|
+
return true;
|
556
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT: // FAST PATH!
|
557
|
+
// Note that visibility update is NOT conditional for this state.
|
558
|
+
this._doUpdateVisibleStyle();
|
559
|
+
|
560
|
+
this._gotoAttachedHiddenState();
|
561
|
+
|
562
|
+
return true;
|
563
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
564
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
565
|
+
if (!transitionHide) {
|
566
|
+
this._cancelTransition();
|
567
|
+
}
|
568
|
+
break;
|
569
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
570
|
+
break;
|
571
|
+
default:
|
572
|
+
}
|
573
|
+
|
574
|
+
// Notify will hide.
|
575
|
+
if (this.willHideInDocument) { this.willHideInDocument(); }
|
576
|
+
|
577
|
+
if (transitionHide) {
|
578
|
+
this._transitionHide();
|
579
|
+
|
580
|
+
// Route.
|
581
|
+
this._gotoAttachedHidingState();
|
582
|
+
} else {
|
583
|
+
// Clear out any child views that are still transitioning before we hide.
|
584
|
+
this._callOnChildViews('_parentWillHideInDocument');
|
585
|
+
|
586
|
+
// Note that visibility update is NOT conditional for this state.
|
587
|
+
this.invokeOnce(this._doUpdateVisibleStyle);
|
588
|
+
|
589
|
+
// Notify.
|
590
|
+
if (this.didHideInDocument) { this.didHideInDocument(); }
|
591
|
+
|
592
|
+
this._callOnChildViews('_parentDidHideInDocument');
|
593
|
+
|
594
|
+
// Route.
|
595
|
+
this._gotoAttachedHiddenState();
|
596
|
+
}
|
597
|
+
|
598
|
+
return true;
|
599
|
+
},
|
600
|
+
|
601
|
+
/** @private Orphan this view action. */
|
602
|
+
_doOrphan: function () {
|
603
|
+
var parentView = this.get('parentView'),
|
604
|
+
handled = true;
|
605
|
+
|
606
|
+
if (parentView) {
|
607
|
+
var childViews = parentView.get('childViews'),
|
608
|
+
idx = childViews.indexOf(this);
|
609
|
+
|
610
|
+
// Completely remove the view from its parent.
|
611
|
+
this.set('parentView', null);
|
612
|
+
|
613
|
+
// Remove view from old parent's childViews array.
|
614
|
+
if (idx >= 0) { childViews.removeAt(idx); }
|
615
|
+
|
616
|
+
// Notify orphaned.
|
617
|
+
this._orphaned(parentView);
|
618
|
+
} else {
|
619
|
+
handled = false;
|
620
|
+
}
|
621
|
+
|
622
|
+
return handled;
|
623
|
+
},
|
624
|
+
|
625
|
+
/** @private Render this view action. */
|
626
|
+
|
627
|
+
_doRender: function () {
|
628
|
+
var state = this.get('viewState');
|
629
|
+
|
630
|
+
switch (state) {
|
631
|
+
case SC.CoreView.ATTACHED_SHOWING: // FAST PATHS!
|
632
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
633
|
+
case SC.CoreView.ATTACHED_HIDING:
|
634
|
+
case SC.CoreView.ATTACHED_HIDDEN:
|
635
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
636
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
637
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
638
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
639
|
+
case SC.CoreView.UNATTACHED:
|
640
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
641
|
+
return false;
|
642
|
+
case SC.CoreView.UNRENDERED:
|
643
|
+
// Render the layer.
|
644
|
+
var context = this.renderContext(this.get('tagName'));
|
645
|
+
|
646
|
+
this.renderToContext(context);
|
647
|
+
this.set('layer', context.element());
|
648
|
+
|
649
|
+
// Route.
|
650
|
+
this._gotoUnattachedState();
|
651
|
+
|
652
|
+
// Notify rendered (on self and all child views).
|
653
|
+
this._rendered();
|
654
|
+
this._callOnChildViews('_parentDidRender');
|
655
|
+
|
656
|
+
// Bypass the unattached state for adopted views.
|
657
|
+
var parentView = this.get('parentView');
|
658
|
+
if (parentView && parentView.get('_isRendered')) {
|
659
|
+
var parentNode = parentView.get('containerLayer'),
|
660
|
+
siblings = parentView.get('childViews'),
|
661
|
+
nextView = siblings.objectAt(siblings.indexOf(this) + 1),
|
662
|
+
nextNode = (nextView) ? nextView.get('layer') : null;
|
663
|
+
|
664
|
+
// Attach to parentNode
|
665
|
+
// IE doesn't support insertBefore(blah, undefined) in version IE9.
|
666
|
+
// parentNode.insertBefore(node, nextNode || null);
|
667
|
+
this._doAttach(parentNode, nextNode);
|
668
|
+
}
|
669
|
+
|
670
|
+
return true;
|
671
|
+
}
|
672
|
+
},
|
673
|
+
|
674
|
+
/** @private Show this view action. */
|
675
|
+
_doShow: function () {
|
676
|
+
var state = this.get('viewState'),
|
677
|
+
parentView = this.get('parentView'),
|
678
|
+
// Views without a parent are not limited by a parent's current state.
|
679
|
+
isParentShown = parentView ? parentView.get('viewState') & SC.CoreView.IS_SHOWN : true,
|
680
|
+
transitionShow = this.get('transitionShow');
|
681
|
+
|
682
|
+
switch (state) {
|
683
|
+
case SC.CoreView.ATTACHED_SHOWN: // FAST PATH!
|
684
|
+
case SC.CoreView.ATTACHED_SHOWING: // FAST PATH!
|
685
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT: // FAST PATH!
|
686
|
+
case SC.CoreView.ATTACHED_BUILDING_IN: // FAST PATH!
|
687
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT: // FAST PATH!
|
688
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT: // FAST PATH!
|
689
|
+
return false;
|
690
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
691
|
+
case SC.CoreView.UNATTACHED: // FAST PATH!
|
692
|
+
case SC.CoreView.UNATTACHED_BY_PARENT: // FAST PATH!
|
693
|
+
// Queue the visibility update for the next time we display.
|
694
|
+
this._visibleStyleNeedsUpdate = true;
|
695
|
+
return true;
|
696
|
+
case SC.CoreView.ATTACHED_HIDDEN:
|
697
|
+
if (isParentShown) {
|
698
|
+
// Update before showing (note that visibility update is NOT conditional for this state).
|
699
|
+
this._doUpdateVisibleStyle();
|
700
|
+
|
701
|
+
// Notify will show.
|
702
|
+
this._callOnChildViews('_parentWillShowInDocument');
|
703
|
+
|
704
|
+
if (this.willShowInDocument) { this.willShowInDocument(); }
|
705
|
+
} else {
|
706
|
+
// Queue the visibility update for the next time we display.
|
707
|
+
this._visibleStyleNeedsUpdate = true;
|
708
|
+
|
709
|
+
// Route.
|
710
|
+
this._gotoAttachedHiddenByParentState();
|
711
|
+
|
712
|
+
return true;
|
713
|
+
}
|
714
|
+
break;
|
715
|
+
case SC.CoreView.ATTACHED_HIDING:
|
716
|
+
if (!transitionShow) {
|
717
|
+
this._cancelTransition();
|
718
|
+
}
|
719
|
+
break;
|
720
|
+
default:
|
721
|
+
}
|
722
|
+
|
723
|
+
this._executeQueuedUpdates();
|
724
|
+
|
725
|
+
if (transitionShow) {
|
726
|
+
this._transitionShow();
|
727
|
+
|
728
|
+
// Route.
|
729
|
+
this._gotoAttachedShowingState();
|
730
|
+
} else {
|
731
|
+
// Notify.
|
732
|
+
if (this.didShowInDocument) { this.didShowInDocument(); }
|
733
|
+
this._callOnChildViews('_parentDidShowInDocument');
|
734
|
+
|
735
|
+
// Route.
|
736
|
+
this._gotoAttachedShownState();
|
737
|
+
}
|
738
|
+
|
739
|
+
return true;
|
740
|
+
},
|
741
|
+
|
742
|
+
/** @private Update this view's contents action. */
|
743
|
+
_doUpdateContent: function (force) {
|
744
|
+
var isVisibleInWindow = this.get('isVisibleInWindow'),
|
745
|
+
handled = true;
|
746
|
+
|
747
|
+
// Legacy.
|
748
|
+
this.set('layerNeedsUpdate', true);
|
749
|
+
|
750
|
+
if (this.get('_isRendered')) {
|
751
|
+
if (isVisibleInWindow || force) {
|
752
|
+
// Only in the visible states do we allow updates without being forced.
|
753
|
+
this._executeDoUpdateContent();
|
754
|
+
} else {
|
755
|
+
// Otherwise mark the view as needing an update when we enter a shown state again.
|
756
|
+
this._contentNeedsUpdate = true;
|
757
|
+
}
|
758
|
+
} else {
|
759
|
+
handled = false;
|
760
|
+
}
|
761
|
+
|
762
|
+
return handled;
|
763
|
+
},
|
764
|
+
|
765
|
+
// ------------------------------------------------------------------------
|
766
|
+
// Events
|
767
|
+
//
|
768
|
+
|
769
|
+
/**
|
770
|
+
This method is called by transition plugins when the incoming or showing
|
771
|
+
transition completes. You should only use this method if implementing a
|
772
|
+
custom transition plugin.
|
773
|
+
|
774
|
+
@param {SC.ViewTransitionProtocol} transition The transition plugin used.
|
775
|
+
@param {Object} options The original options used. One of transitionShowOptions or transitionInOptions.
|
776
|
+
*/
|
777
|
+
didTransitionIn: function () {
|
778
|
+
var state = this.get('viewState');
|
779
|
+
|
780
|
+
if (state === SC.CoreView.ATTACHED_SHOWING ||
|
781
|
+
state === SC.CoreView.ATTACHED_BUILDING_IN) {
|
782
|
+
this._teardownTransition();
|
783
|
+
|
784
|
+
// Notify.
|
785
|
+
if (this.didShowInDocument) { this.didShowInDocument(); }
|
786
|
+
|
787
|
+
if (state === SC.CoreView.ATTACHED_SHOWING) {
|
788
|
+
this._callOnChildViews('_parentDidShowInDocument');
|
789
|
+
}
|
790
|
+
|
791
|
+
// Route.
|
792
|
+
this._gotoAttachedShownState();
|
793
|
+
}
|
794
|
+
},
|
795
|
+
|
796
|
+
/**
|
797
|
+
This method is called by transition plugins when the outgoing or hiding
|
798
|
+
transition completes. You should only use this method if implementing a
|
799
|
+
custom transition plugin.
|
800
|
+
|
801
|
+
@param {SC.ViewTransitionProtocol} transition The transition plugin used.
|
802
|
+
@param {Object} options The original options used. One of transitionHideOptions or transitionOutOptions.
|
803
|
+
*/
|
804
|
+
didTransitionOut: function () {
|
805
|
+
var state = this.get('viewState');
|
806
|
+
|
807
|
+
if (state === SC.CoreView.ATTACHED_BUILDING_OUT) {
|
808
|
+
this._teardownTransition();
|
809
|
+
|
810
|
+
this._executeDoDetach();
|
811
|
+
} else if (state === SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT) {
|
812
|
+
var owningView = this._owningView;
|
813
|
+
// We can't clean up the transition until the parent is done. For
|
814
|
+
// example, a fast child build out inside of a slow parent build out.
|
815
|
+
owningView._buildingOutCount--;
|
816
|
+
|
817
|
+
if (owningView._buildingOutCount === 0) {
|
818
|
+
owningView._executeDoDetach();
|
819
|
+
|
820
|
+
// Clean up.
|
821
|
+
delete this._owningView;
|
822
|
+
}
|
823
|
+
} else if (state === SC.CoreView.ATTACHED_HIDING) {
|
824
|
+
this._teardownTransition();
|
825
|
+
|
826
|
+
// Clear out any child views that are transitioning before we hide.
|
827
|
+
this._callOnChildViews('_parentWillHideInDocument');
|
828
|
+
|
829
|
+
// Note that visibility update is NOT conditional for this state.
|
830
|
+
this._doUpdateVisibleStyle();
|
831
|
+
|
832
|
+
// Notify.
|
833
|
+
if (this.didHideInDocument) { this.didHideInDocument(); }
|
834
|
+
|
835
|
+
this._callOnChildViews('_parentDidHideInDocument');
|
836
|
+
|
837
|
+
// Route.
|
838
|
+
this._gotoAttachedHiddenState();
|
839
|
+
}
|
840
|
+
},
|
841
|
+
|
842
|
+
/** @private The 'adopted' event. */
|
843
|
+
_adopted: function () {
|
844
|
+
// This has been moved to the _notifyAttached event.
|
845
|
+
// this.notifyPropertyChange('frame');
|
846
|
+
},
|
847
|
+
|
848
|
+
/** @private The 'orphaned' event. */
|
849
|
+
_orphaned: function (oldParentView) {
|
850
|
+
// Notify.
|
851
|
+
if (oldParentView.didRemoveChild) { oldParentView.didRemoveChild(this); }
|
852
|
+
if (this.didRemoveFromParent) { this.didRemoveFromParent(oldParentView); }
|
853
|
+
},
|
854
|
+
|
855
|
+
/** @private The 'rendered' event. */
|
856
|
+
_rendered: function () {
|
857
|
+
var displayProperties,
|
858
|
+
len, idx,
|
859
|
+
mixins = this.didCreateLayerMixin;
|
860
|
+
|
861
|
+
// Register display property observers.
|
862
|
+
displayProperties = this.get('displayProperties');
|
863
|
+
for (idx = 0, len = displayProperties.length; idx < len; idx++) {
|
864
|
+
this.addObserver(displayProperties[idx], this, this.displayDidChange);
|
865
|
+
}
|
866
|
+
|
867
|
+
// TODO: we should be able to fix this with states
|
868
|
+
// if (this.get('useStaticLayout')) this.viewDidResize();
|
869
|
+
|
870
|
+
// Send notice that the layer was created.
|
871
|
+
if (this.didCreateLayer) { this.didCreateLayer(); }
|
872
|
+
if (mixins) {
|
873
|
+
len = mixins.length;
|
874
|
+
for (idx = 0; idx < len; ++idx) {
|
875
|
+
mixins[idx].call(this);
|
876
|
+
}
|
877
|
+
}
|
878
|
+
|
879
|
+
// var childView, childViews = this.get('childViews');
|
880
|
+
// for (var i = childViews.length - 1; i >= 0; i--) {
|
881
|
+
// childView = childViews[i];
|
882
|
+
|
883
|
+
// // We allow missing childViews in the array so ignore them.
|
884
|
+
// if (!childView) { continue; }
|
885
|
+
|
886
|
+
// A parent view creating a layer might result in the creation of a
|
887
|
+
// child view's DOM node being created via a render context without
|
888
|
+
// createLayer() being invoked on the child. In such cases, if anyone
|
889
|
+
// had requested 'layer' and it was cached as null, we need to
|
890
|
+
// invalidate it.
|
891
|
+
// TODO: we should be able to fix this with states
|
892
|
+
// childView.notifyPropertyChange('layer');
|
893
|
+
|
894
|
+
// A strange case, that a childView's frame won't be correct before
|
895
|
+
// we have a layer, if the childView doesn't have a fixed layout
|
896
|
+
// and we are using static layout.
|
897
|
+
// TODO: we should be able to fix this with states
|
898
|
+
// if (this.get('useStaticLayout')) {
|
899
|
+
// if (!childView.get('isFixedLayout')) { childView.viewDidResize(); }
|
900
|
+
// }
|
901
|
+
|
902
|
+
// childView._rendered();
|
903
|
+
// }
|
904
|
+
|
905
|
+
// Begin observing isVisible & isFirstResponder.
|
906
|
+
this.addObserver('isVisible', this, this._isVisibleDidChange);
|
907
|
+
this.addObserver('isFirstResponder', this, this._isFirstResponderDidChange);
|
908
|
+
},
|
909
|
+
|
910
|
+
// ------------------------------------------------------------------------
|
911
|
+
// States
|
912
|
+
//
|
913
|
+
|
914
|
+
/** @private */
|
915
|
+
_gotoAttachedBuildingInState: function () {
|
916
|
+
// Update the state.
|
917
|
+
this.set('viewState', SC.CoreView.ATTACHED_BUILDING_IN);
|
918
|
+
},
|
919
|
+
|
920
|
+
/** @private */
|
921
|
+
_gotoAttachedBuildingOutState: function () {
|
922
|
+
// Update the state.
|
923
|
+
this.set('viewState', SC.CoreView.ATTACHED_BUILDING_OUT);
|
924
|
+
},
|
925
|
+
|
926
|
+
/** @private */
|
927
|
+
_gotoAttachedBuildingOutByParentState: function () {
|
928
|
+
// Update the state.
|
929
|
+
this.set('viewState', SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT);
|
930
|
+
},
|
931
|
+
|
932
|
+
/** @private */
|
933
|
+
_gotoAttachedHiddenState: function () {
|
934
|
+
// Update the state.
|
935
|
+
this.set('viewState', SC.CoreView.ATTACHED_HIDDEN);
|
936
|
+
},
|
937
|
+
|
938
|
+
/** @private */
|
939
|
+
_gotoAttachedHiddenByParentState: function () {
|
940
|
+
// Update the state.
|
941
|
+
this.set('viewState', SC.CoreView.ATTACHED_HIDDEN_BY_PARENT);
|
942
|
+
},
|
943
|
+
|
944
|
+
/** @private */
|
945
|
+
_gotoAttachedHidingState: function () {
|
946
|
+
// Update the state.
|
947
|
+
this.set('viewState', SC.CoreView.ATTACHED_HIDING);
|
948
|
+
},
|
949
|
+
|
950
|
+
/** @private */
|
951
|
+
_gotoAttachedShowingState: function () {
|
952
|
+
// Update the state.
|
953
|
+
this.set('viewState', SC.CoreView.ATTACHED_SHOWING);
|
954
|
+
},
|
955
|
+
|
956
|
+
/** @private */
|
957
|
+
_gotoAttachedShownState: function () {
|
958
|
+
// Update the state.
|
959
|
+
this.set('viewState', SC.CoreView.ATTACHED_SHOWN);
|
960
|
+
},
|
961
|
+
|
962
|
+
/** @private */
|
963
|
+
_gotoUnattachedState: function () {
|
964
|
+
// Update the state.
|
965
|
+
this.set('viewState', SC.CoreView.UNATTACHED);
|
966
|
+
},
|
967
|
+
|
968
|
+
/** @private */
|
969
|
+
_gotoUnattachedByParentState: function () {
|
970
|
+
// Update the state.
|
971
|
+
this.set('viewState', SC.CoreView.UNATTACHED_BY_PARENT);
|
972
|
+
},
|
973
|
+
|
974
|
+
/** @private */
|
975
|
+
_gotoUnrenderedState: function () {
|
976
|
+
// Update the state.
|
977
|
+
this.set('viewState', SC.CoreView.UNRENDERED);
|
978
|
+
},
|
979
|
+
|
980
|
+
// ------------------------------------------------------------------------
|
981
|
+
// Methods
|
982
|
+
//
|
983
|
+
|
984
|
+
/** @private Clear building in transition. */
|
985
|
+
_cancelTransition: function () {
|
986
|
+
// Cancel conflicting transitions.
|
987
|
+
this.cancelAnimation();
|
988
|
+
this._teardownTransition();
|
989
|
+
},
|
990
|
+
|
991
|
+
/** @private */
|
992
|
+
_doUpdateVisibleStyle: function () {
|
993
|
+
var isVisible = this.get('isVisible');
|
994
|
+
|
995
|
+
this.$().toggleClass('sc-hidden', !isVisible);
|
996
|
+
this.$().attr('aria-hidden', isVisible ? null : true);
|
997
|
+
|
998
|
+
// Reset that an update is required.
|
999
|
+
this._visibleStyleNeedsUpdate = false;
|
1000
|
+
},
|
1001
|
+
|
1002
|
+
/** @private */
|
1003
|
+
_executeDoDestroyLayer: function () {
|
1004
|
+
var displayProperties,
|
1005
|
+
idx, len,
|
1006
|
+
mixins;
|
1007
|
+
|
1008
|
+
// Notify.
|
1009
|
+
if (this.willDestroyLayer) { this.willDestroyLayer(); }
|
1010
|
+
|
1011
|
+
mixins = this.willDestroyLayerMixin;
|
1012
|
+
if (mixins) {
|
1013
|
+
len = mixins.length;
|
1014
|
+
for (idx = 0; idx < len; ++idx) {
|
1015
|
+
mixins[idx].call(this);
|
1016
|
+
}
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
// Remove the layer reference.
|
1020
|
+
this.set('layer', null);
|
1021
|
+
|
1022
|
+
// Unregister display property observers.
|
1023
|
+
displayProperties = this.get('displayProperties');
|
1024
|
+
for (idx = 0, len = displayProperties.length; idx < len; idx++) {
|
1025
|
+
this.removeObserver(displayProperties[idx], this, this.displayDidChange);
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
// Stop observing isVisible & isFirstResponder.
|
1029
|
+
this.removeObserver('isVisible', this, this._isVisibleDidChange);
|
1030
|
+
this.removeObserver('isFirstResponder', this, this._isFirstResponderDidChange);
|
1031
|
+
|
1032
|
+
// Route.
|
1033
|
+
this._gotoUnrenderedState();
|
1034
|
+
},
|
1035
|
+
|
1036
|
+
/** @private Detach the view. */
|
1037
|
+
_executeDoDetach: function () {
|
1038
|
+
// Give child views a chance to clean up any transitions and to notify.
|
1039
|
+
this._callOnChildViews('_parentWillRemoveFromDocument');
|
1040
|
+
|
1041
|
+
// Detach the layer.
|
1042
|
+
var node = this.get('layer');
|
1043
|
+
node.parentNode.removeChild(node);
|
1044
|
+
|
1045
|
+
// Notify.
|
1046
|
+
this._notifyDetached();
|
1047
|
+
|
1048
|
+
// Give child views a chance to clean up any transitions and to notify.
|
1049
|
+
this._callOnChildViews('_parentDidRemoveFromDocument');
|
1050
|
+
|
1051
|
+
// Route.
|
1052
|
+
this._gotoUnattachedState();
|
1053
|
+
},
|
1054
|
+
|
1055
|
+
/** @private */
|
1056
|
+
_executeDoUpdateContent: function () {
|
1057
|
+
var mixins = this.renderMixin,
|
1058
|
+
context = this.renderContext(this.get('layer'));
|
1059
|
+
|
1060
|
+
// If there is no update method, fallback to calling render with extra
|
1061
|
+
// firstTime argument set to false.
|
1062
|
+
if (!this.update) {
|
1063
|
+
this.render(context, false);
|
1064
|
+
} else {
|
1065
|
+
this.update(context.$());
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
// Call renderMixin methods.
|
1069
|
+
if (mixins) {
|
1070
|
+
var len = mixins.length;
|
1071
|
+
for (var idx = 0; idx < len; ++idx) {
|
1072
|
+
mixins[idx].call(this, context, false);
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
// Call applyAttributesToContext so that subclasses that override it can
|
1077
|
+
// insert further attributes.
|
1078
|
+
this.applyAttributesToContext(context);
|
1079
|
+
|
1080
|
+
context.update();
|
1081
|
+
|
1082
|
+
// Legacy.
|
1083
|
+
this.set('layerNeedsUpdate', false);
|
1084
|
+
|
1085
|
+
// Reset that an update is required.
|
1086
|
+
this._contentNeedsUpdate = false;
|
1087
|
+
|
1088
|
+
// Notify.
|
1089
|
+
this.notifyPropertyChange('layer');
|
1090
|
+
if (this.didUpdateLayer) { this.didUpdateLayer(); }
|
1091
|
+
|
1092
|
+
if (this.designer && this.designer.viewDidUpdateLayer) {
|
1093
|
+
this.designer.viewDidUpdateLayer(); //let the designer know
|
1094
|
+
}
|
1095
|
+
},
|
1096
|
+
|
1097
|
+
/** @private */
|
1098
|
+
_executeQueuedUpdates: function () {
|
1099
|
+
|
1100
|
+
// Update visibility style if necessary.
|
1101
|
+
if (this._visibleStyleNeedsUpdate) {
|
1102
|
+
this._doUpdateVisibleStyle();
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
// Update the content of the layer if necessary.
|
1106
|
+
if (this._contentNeedsUpdate) {
|
1107
|
+
this._executeDoUpdateContent();
|
1108
|
+
}
|
1109
|
+
},
|
1110
|
+
|
1111
|
+
/** @private
|
1112
|
+
Marks the view as needing a visibility update if the isVisible property
|
1113
|
+
changes.
|
1114
|
+
|
1115
|
+
This observer is connected when the view is attached and is disconnected
|
1116
|
+
when the view is detached.
|
1117
|
+
*/
|
1118
|
+
_isVisibleDidChange: function () {
|
1119
|
+
if (this.get('isVisible')) {
|
1120
|
+
this._doShow();
|
1121
|
+
} else {
|
1122
|
+
this._doHide();
|
1123
|
+
}
|
1124
|
+
},
|
1125
|
+
|
1126
|
+
/** @private
|
1127
|
+
Adds the 'focus' class to the view.
|
1128
|
+
|
1129
|
+
This observer is connected when the view is attached and is disconnected
|
1130
|
+
when the view is detached.
|
1131
|
+
*/
|
1132
|
+
_isFirstResponderDidChange: function () {
|
1133
|
+
var isFirstResponder = this.get('isFirstResponder');
|
1134
|
+
|
1135
|
+
this.$().toggleClass('focus', isFirstResponder);
|
1136
|
+
},
|
1137
|
+
|
1138
|
+
/** @private Notify on attached. */
|
1139
|
+
_notifyAttached: function () {
|
1140
|
+
// If we don't have the layout module then we don't know the frame until appended to the document.
|
1141
|
+
this.notifyPropertyChange('frame');
|
1142
|
+
|
1143
|
+
// Notify.
|
1144
|
+
if (this.didAppendToDocument) { this.didAppendToDocument(); }
|
1145
|
+
},
|
1146
|
+
|
1147
|
+
/** @private Notify on detaching. */
|
1148
|
+
_notifyDetaching: function () {
|
1149
|
+
if (this.willRemoveFromDocument) { this.willRemoveFromDocument(); }
|
1150
|
+
},
|
1151
|
+
|
1152
|
+
/** @private Notify on detached. */
|
1153
|
+
_notifyDetached: function () {
|
1154
|
+
},
|
1155
|
+
|
1156
|
+
/** @private Routes according to parent did append. */
|
1157
|
+
_parentDidAppendToDocument: function () {
|
1158
|
+
// Run any queued updates.
|
1159
|
+
this._executeQueuedUpdates();
|
1160
|
+
|
1161
|
+
this._notifyAttached();
|
1162
|
+
this._routeOnAttached();
|
1163
|
+
},
|
1164
|
+
|
1165
|
+
/** @private Updates according to parent did cancel build out. */
|
1166
|
+
_parentDidCancelBuildOut: function () {
|
1167
|
+
var state = this.get('viewState'),
|
1168
|
+
transitionIn = this.get('transitionIn');
|
1169
|
+
|
1170
|
+
if (state === SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT) {
|
1171
|
+
if (transitionIn) {
|
1172
|
+
this._transitionIn();
|
1173
|
+
|
1174
|
+
// Route.
|
1175
|
+
this._gotoAttachedBuildingInState();
|
1176
|
+
} else {
|
1177
|
+
this._cancelTransition();
|
1178
|
+
|
1179
|
+
// Route.
|
1180
|
+
this._gotoAttachedShownState();
|
1181
|
+
}
|
1182
|
+
} else if (state === SC.CoreView.ATTACHED_BUILDING_OUT || state &
|
1183
|
+
SC.CoreView.IS_HIDDEN) {
|
1184
|
+
// There's no need to continue to further child views.
|
1185
|
+
return false;
|
1186
|
+
}
|
1187
|
+
},
|
1188
|
+
|
1189
|
+
/** @private Updates according to parent did render. */
|
1190
|
+
_parentDidRender: function () {
|
1191
|
+
// Notify rendered.
|
1192
|
+
this._rendered();
|
1193
|
+
|
1194
|
+
// Route
|
1195
|
+
this._gotoUnattachedByParentState();
|
1196
|
+
},
|
1197
|
+
|
1198
|
+
/** @private Starts building out view if appropriate. */
|
1199
|
+
_parentWillBuildOutFromDocument: function (owningView) {
|
1200
|
+
var state = this.get('viewState'),
|
1201
|
+
transitionOut = this.get('transitionOut');
|
1202
|
+
|
1203
|
+
switch (state) {
|
1204
|
+
case SC.CoreView.UNRENDERED:
|
1205
|
+
case SC.CoreView.UNATTACHED:
|
1206
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
1207
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
1208
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
1209
|
+
// There's no need to continue to further child views.
|
1210
|
+
return false;
|
1211
|
+
case SC.CoreView.ATTACHED_HIDDEN:
|
1212
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
1213
|
+
case SC.CoreView.ATTACHED_HIDING:
|
1214
|
+
// Notify.
|
1215
|
+
this._notifyDetaching();
|
1216
|
+
|
1217
|
+
return false;
|
1218
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
1219
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
1220
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
1221
|
+
// Notify.
|
1222
|
+
this._notifyDetaching();
|
1223
|
+
|
1224
|
+
if (transitionOut) {
|
1225
|
+
this._owningView = owningView;
|
1226
|
+
this._transitionOut(owningView);
|
1227
|
+
|
1228
|
+
// Route.
|
1229
|
+
this._gotoAttachedBuildingOutByParentState();
|
1230
|
+
}
|
1231
|
+
return true;
|
1232
|
+
default:
|
1233
|
+
}
|
1234
|
+
},
|
1235
|
+
|
1236
|
+
/** @private Clean up before parent is detached. */
|
1237
|
+
_parentWillRemoveFromDocument: function () {
|
1238
|
+
var state = this.get('viewState');
|
1239
|
+
|
1240
|
+
switch (state) {
|
1241
|
+
case SC.CoreView.UNRENDERED:
|
1242
|
+
case SC.CoreView.UNATTACHED:
|
1243
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
1244
|
+
// There's no need to continue to further child views.
|
1245
|
+
return false;
|
1246
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
1247
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
1248
|
+
case SC.CoreView.ATTACHED_HIDING:
|
1249
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
1250
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
1251
|
+
this._cancelTransition();
|
1252
|
+
break;
|
1253
|
+
case SC.CoreView.ATTACHED_HIDDEN:
|
1254
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
1255
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
1256
|
+
break;
|
1257
|
+
default:
|
1258
|
+
// Attached and not in a transitionary state.
|
1259
|
+
}
|
1260
|
+
},
|
1261
|
+
|
1262
|
+
/** @private Routes according to parent did detach. */
|
1263
|
+
_parentDidRemoveFromDocument: function () {
|
1264
|
+
var state = this.get('viewState');
|
1265
|
+
|
1266
|
+
if (state & SC.CoreView.IS_ATTACHED) {
|
1267
|
+
this._notifyDetached();
|
1268
|
+
this._gotoUnattachedByParentState();
|
1269
|
+
} else {
|
1270
|
+
// There's no need to continue to further child views.
|
1271
|
+
return false;
|
1272
|
+
}
|
1273
|
+
},
|
1274
|
+
|
1275
|
+
/** @private Routes according to parent did hide. */
|
1276
|
+
_parentDidHideInDocument: function () {
|
1277
|
+
var state = this.get('viewState');
|
1278
|
+
|
1279
|
+
switch (state) {
|
1280
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
1281
|
+
case SC.CoreView.UNATTACHED: // FAST PATH!
|
1282
|
+
case SC.CoreView.UNATTACHED_BY_PARENT:
|
1283
|
+
case SC.CoreView.ATTACHED_HIDING:
|
1284
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
1285
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
1286
|
+
case SC.CoreView.ATTACHED_HIDDEN: // FAST PATH!
|
1287
|
+
case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
1288
|
+
// There's no need to continue to further child views.
|
1289
|
+
return false;
|
1290
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
1291
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
1292
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
1293
|
+
break;
|
1294
|
+
default:
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
// Notify.
|
1298
|
+
if (this.didHideInDocument) { this.didHideInDocument(); }
|
1299
|
+
|
1300
|
+
// Route.
|
1301
|
+
this._gotoAttachedHiddenByParentState();
|
1302
|
+
},
|
1303
|
+
|
1304
|
+
/** @private Routes according to parent will hide. */
|
1305
|
+
_parentWillHideInDocument: function () {
|
1306
|
+
var state = this.get('viewState');
|
1307
|
+
|
1308
|
+
switch (state) {
|
1309
|
+
case SC.CoreView.UNRENDERED: // FAST PATH!
|
1310
|
+
case SC.CoreView.UNATTACHED: // FAST PATH!
|
1311
|
+
// case SC.CoreView.UNATTACHED_BY_PARENT:
|
1312
|
+
case SC.CoreView.ATTACHED_HIDDEN: // FAST PATH!
|
1313
|
+
// case SC.CoreView.ATTACHED_HIDDEN_BY_PARENT:
|
1314
|
+
// There's no need to continue to further child views.
|
1315
|
+
return false;
|
1316
|
+
case SC.CoreView.ATTACHED_HIDING: // FAST PATH!
|
1317
|
+
// Clear out any child views that are transitioning before we hide.
|
1318
|
+
this._callOnChildViews('_parentWillHideInDocument');
|
1319
|
+
|
1320
|
+
this._cancelTransition();
|
1321
|
+
|
1322
|
+
// We didn't quite hide in time so indicate that visibility needs update next time we display.
|
1323
|
+
this._visibleStyleNeedsUpdate = true;
|
1324
|
+
|
1325
|
+
// Route.
|
1326
|
+
this._gotoAttachedHiddenState();
|
1327
|
+
|
1328
|
+
return false;
|
1329
|
+
case SC.CoreView.ATTACHED_BUILDING_IN: // FAST PATH!
|
1330
|
+
case SC.CoreView.ATTACHED_SHOWING: // FAST PATH!
|
1331
|
+
this._cancelTransition();
|
1332
|
+
break;
|
1333
|
+
// case SC.CoreView.ATTACHED_BUILDING_OUT:
|
1334
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
1335
|
+
this._cancelTransition();
|
1336
|
+
break;
|
1337
|
+
case SC.CoreView.ATTACHED_SHOWN:
|
1338
|
+
break;
|
1339
|
+
default:
|
1340
|
+
// Attached and not in a transitionary state.
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
// Notify.
|
1344
|
+
if (this.willHideInDocument) { this.willHideInDocument(); }
|
1345
|
+
},
|
1346
|
+
|
1347
|
+
/** @private Routes according to parent did show. */
|
1348
|
+
_parentDidShowInDocument: function () {
|
1349
|
+
var state = this.get('viewState');
|
1350
|
+
|
1351
|
+
if (state === SC.CoreView.ATTACHED_HIDDEN_BY_PARENT) {
|
1352
|
+
// Route.
|
1353
|
+
this._gotoAttachedShownState();
|
1354
|
+
|
1355
|
+
// Notify.
|
1356
|
+
if (this.didShowInDocument) { this.didShowInDocument(); }
|
1357
|
+
} else {
|
1358
|
+
// There's no need to continue to further child views.
|
1359
|
+
return false;
|
1360
|
+
}
|
1361
|
+
},
|
1362
|
+
|
1363
|
+
/** @private Prepares according to parent will show. */
|
1364
|
+
_parentWillShowInDocument: function () {
|
1365
|
+
var state = this.get('viewState');
|
1366
|
+
|
1367
|
+
if (state === SC.CoreView.ATTACHED_HIDDEN_BY_PARENT) {
|
1368
|
+
this._executeQueuedUpdates();
|
1369
|
+
|
1370
|
+
// Notify.
|
1371
|
+
if (this.willShowInDocument) { this.willShowInDocument(); }
|
1372
|
+
} else {
|
1373
|
+
// There's no need to continue to further child views.
|
1374
|
+
return false;
|
1375
|
+
}
|
1376
|
+
},
|
1377
|
+
|
1378
|
+
/** @private */
|
1379
|
+
_setupTransition: function () {
|
1380
|
+
// Prepare for a transition.
|
1381
|
+
this._preTransitionLayout = SC.clone(this.get('layout'));
|
1382
|
+
this._preTransitionFrame = this.get('borderFrame');
|
1383
|
+
},
|
1384
|
+
|
1385
|
+
/** @private */
|
1386
|
+
_teardownTransition: function () {
|
1387
|
+
// Reset the layout to its original value.
|
1388
|
+
this.set('layout', this._preTransitionLayout);
|
1389
|
+
|
1390
|
+
// Clean up.
|
1391
|
+
delete this._preTransitionLayout;
|
1392
|
+
delete this._preTransitionFrame;
|
1393
|
+
},
|
1394
|
+
|
1395
|
+
/** @private Attempts to run a transition hide, ensuring any incoming transitions are stopped in place. */
|
1396
|
+
_transitionHide: function () {
|
1397
|
+
var state = this.get('viewState'),
|
1398
|
+
transitionHide = this.get('transitionHide'),
|
1399
|
+
options = this.get('transitionHideOptions') || {},
|
1400
|
+
inPlace = false;
|
1401
|
+
|
1402
|
+
switch (state) {
|
1403
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
1404
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
1405
|
+
this.cancelAnimation(SC.LayoutState.CURRENT);
|
1406
|
+
inPlace = true;
|
1407
|
+
break;
|
1408
|
+
default:
|
1409
|
+
this._setupTransition();
|
1410
|
+
}
|
1411
|
+
|
1412
|
+
// Set up the hiding transition.
|
1413
|
+
if (transitionHide.setup) {
|
1414
|
+
transitionHide.setup(this, options, inPlace);
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
// Execute the hiding transition.
|
1418
|
+
transitionHide.run(this, options, this._preTransitionLayout, this._preTransitionFrame);
|
1419
|
+
},
|
1420
|
+
|
1421
|
+
/** @private Attempts to run a transition in, ensuring any outgoing transitions are stopped in place. */
|
1422
|
+
_transitionIn: function () {
|
1423
|
+
var state = this.get('viewState'),
|
1424
|
+
transitionIn = this.get('transitionIn'),
|
1425
|
+
options = this.get('transitionInOptions') || {},
|
1426
|
+
inPlace = false;
|
1427
|
+
|
1428
|
+
switch (state) {
|
1429
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT_BY_PARENT:
|
1430
|
+
case SC.CoreView.ATTACHED_BUILDING_OUT:
|
1431
|
+
this.cancelAnimation(SC.LayoutState.CURRENT);
|
1432
|
+
inPlace = true;
|
1433
|
+
break;
|
1434
|
+
default:
|
1435
|
+
this._setupTransition();
|
1436
|
+
}
|
1437
|
+
|
1438
|
+
// Set up the incoming transition.
|
1439
|
+
if (transitionIn.setup) {
|
1440
|
+
transitionIn.setup(this, options, inPlace);
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
// Execute the incoming transition.
|
1444
|
+
transitionIn.run(this, options, this._preTransitionLayout, this._preTransitionFrame);
|
1445
|
+
},
|
1446
|
+
|
1447
|
+
/** @private Attempts to run a transition out, ensuring any incoming transitions are stopped in place. */
|
1448
|
+
_transitionOut: function (owningView) {
|
1449
|
+
var state = this.get('viewState'),
|
1450
|
+
transitionOut = this.get('transitionOut'),
|
1451
|
+
options = this.get('transitionOutOptions') || {},
|
1452
|
+
inPlace = false;
|
1453
|
+
|
1454
|
+
switch (state) {
|
1455
|
+
case SC.CoreView.ATTACHED_SHOWING:
|
1456
|
+
case SC.CoreView.ATTACHED_HIDING:
|
1457
|
+
case SC.CoreView.ATTACHED_BUILDING_IN:
|
1458
|
+
this.cancelAnimation(SC.LayoutState.CURRENT);
|
1459
|
+
inPlace = true;
|
1460
|
+
break;
|
1461
|
+
default:
|
1462
|
+
this._setupTransition();
|
1463
|
+
}
|
1464
|
+
|
1465
|
+
// Increment the shared building out count.
|
1466
|
+
owningView._buildingOutCount++;
|
1467
|
+
|
1468
|
+
// Set up the outgoing transition.
|
1469
|
+
if (transitionOut.setup) {
|
1470
|
+
transitionOut.setup(this, options, inPlace);
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
// Execute the outgoing transition.
|
1474
|
+
transitionOut.run(this, options, this._preTransitionLayout, this._preTransitionFrame);
|
1475
|
+
},
|
1476
|
+
|
1477
|
+
/** @private Attempts to run a transition show, ensuring any hiding transitions are stopped in place. */
|
1478
|
+
_transitionShow: function () {
|
1479
|
+
var state = this.get('viewState'),
|
1480
|
+
transitionShow = this.get('transitionShow'),
|
1481
|
+
options = this.get('transitionShowOptions') || {},
|
1482
|
+
inPlace = false;
|
1483
|
+
|
1484
|
+
if (state === SC.CoreView.ATTACHED_HIDING) {
|
1485
|
+
this.cancelAnimation(SC.LayoutState.CURRENT);
|
1486
|
+
inPlace = true;
|
1487
|
+
} else {
|
1488
|
+
this._setupTransition();
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
// Set up the showing transition.
|
1492
|
+
if (transitionShow.setup) {
|
1493
|
+
transitionShow.setup(this, options, inPlace);
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
// Execute the showing transition.
|
1497
|
+
transitionShow.run(this, options, this._preTransitionLayout, this._preTransitionFrame);
|
1498
|
+
},
|
1499
|
+
|
1500
|
+
/** @private */
|
1501
|
+
_routeOnAttached: function () {
|
1502
|
+
var parentView = this.get('parentView'),
|
1503
|
+
// Views without a parent are not limited by a parent's current state.
|
1504
|
+
isParentShown = parentView ? parentView.get('viewState') & SC.CoreView.IS_SHOWN : true;
|
1505
|
+
|
1506
|
+
// Route.
|
1507
|
+
if (this.get('isVisible')) {
|
1508
|
+
if (isParentShown) {
|
1509
|
+
// Route.
|
1510
|
+
var transitionIn = this.get('transitionIn');
|
1511
|
+
if (transitionIn) {
|
1512
|
+
this._transitionIn();
|
1513
|
+
|
1514
|
+
this._gotoAttachedBuildingInState();
|
1515
|
+
} else {
|
1516
|
+
this._gotoAttachedShownState();
|
1517
|
+
}
|
1518
|
+
} else {
|
1519
|
+
this._gotoAttachedHiddenByParentState();
|
1520
|
+
}
|
1521
|
+
} else {
|
1522
|
+
this._gotoAttachedHiddenState();
|
1523
|
+
}
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
});
|