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
@@ -6,143 +6,81 @@
|
|
6
6
|
|
7
7
|
/*global module test equals context ok same */
|
8
8
|
|
9
|
-
// NOTE: This file tests both updateLayer() and the related methods that
|
9
|
+
// NOTE: This file tests both updateLayer() and the related methods that
|
10
10
|
// will trigger it.
|
11
11
|
|
12
12
|
// ..........................................................
|
13
13
|
// TEST: updateLayer()
|
14
|
-
//
|
14
|
+
//
|
15
15
|
module("SC.View#updateLayer");
|
16
16
|
|
17
|
-
test("invokes
|
17
|
+
test("invokes applyAttributesToContext() and then updates layer element", function() {
|
18
18
|
var layer = document.createElement('div');
|
19
19
|
|
20
20
|
var times = 0;
|
21
21
|
var view = SC.View.create({
|
22
|
-
|
22
|
+
applyAttributesToContext: function() {
|
23
23
|
times++;
|
24
24
|
this.$().addClass('did-update-' + times);
|
25
25
|
}
|
26
26
|
});
|
27
27
|
view.createLayer();
|
28
|
-
view.updateLayer();
|
29
|
-
ok(view.$().attr('class').indexOf('did-update-2')>=0, 'has class name added by
|
28
|
+
view.updateLayer(true);
|
29
|
+
ok(view.$().attr('class').indexOf('did-update-2')>=0, 'has class name added by render()');
|
30
|
+
|
31
|
+
// Clean up.
|
32
|
+
layer = null;
|
33
|
+
view.destroy();
|
30
34
|
});
|
31
35
|
|
32
36
|
// ..........................................................
|
33
37
|
// TEST: updateLayerIfNeeded()
|
34
|
-
//
|
38
|
+
//
|
35
39
|
var view, callCount ;
|
36
40
|
module("SC.View#updateLayerIfNeeded", {
|
37
41
|
setup: function() {
|
38
|
-
// setup a fake view class so that updateLayerIfNeeded() will call
|
39
|
-
// updateLayer() if needed. updateLayer() is faked to isolate test
|
40
42
|
view = SC.View.create({
|
41
|
-
|
42
|
-
|
43
|
+
isVisible: false,
|
44
|
+
_executeDoUpdateContent: function() {
|
45
|
+
callCount++;
|
46
|
+
}
|
43
47
|
});
|
44
48
|
callCount = 0 ;
|
45
|
-
|
49
|
+
|
46
50
|
view.createLayer();
|
47
|
-
view.
|
51
|
+
view._doAttach(document.body);
|
52
|
+
},
|
53
|
+
|
54
|
+
teardown: function () {
|
55
|
+
// Clean up.
|
56
|
+
view.destroy();
|
57
|
+
view = null;
|
48
58
|
}
|
49
|
-
|
50
|
-
});
|
51
59
|
|
52
|
-
test("does not call updateLayer if layerNeedsUpdate is NO", function() {
|
53
|
-
view.set('layerNeedsUpdate', NO);
|
54
|
-
view.updateLayerIfNeeded();
|
55
|
-
equals(callCount, 0, 'updateLayer did NOT run');
|
56
60
|
});
|
57
61
|
|
58
|
-
test("does not call
|
59
|
-
view.set('isVisibleInWindow', NO);
|
62
|
+
test("does not call _executeDoUpdateContent if not in shown state", function() {
|
60
63
|
view.updateLayerIfNeeded();
|
61
|
-
equals(callCount, 0, '
|
64
|
+
equals(callCount, 0, '_executeDoUpdateContent did NOT run');
|
62
65
|
});
|
63
66
|
|
64
|
-
test("does call
|
67
|
+
test("does call _executeDoUpdateContent if in shown state", function() {
|
68
|
+
view.set('isVisible', true);
|
65
69
|
equals(view.get('isVisibleInWindow'), YES, 'precond - isVisibleInWindow');
|
66
|
-
equals(view.get('layerNeedsUpdate'), YES, 'precond - layerNeedsUpdate');
|
67
|
-
|
68
|
-
view.updateLayerIfNeeded();
|
69
|
-
ok(callCount > 0, 'updateLayer() did run');
|
70
|
-
});
|
71
70
|
|
72
|
-
test("resets layerNeedsUpdate to NO if called", function() {
|
73
|
-
equals(view.get('layerNeedsUpdate'), YES, 'precond - layerNeedsUpdate');
|
74
71
|
view.updateLayerIfNeeded();
|
75
|
-
|
72
|
+
ok(callCount > 0, '_executeDoUpdateContent() did run');
|
76
73
|
});
|
77
74
|
|
78
75
|
test("returns receiver", function() {
|
79
76
|
equals(view.updateLayerIfNeeded(), view, 'returns receiver');
|
80
77
|
});
|
81
78
|
|
82
|
-
test("only runs
|
79
|
+
test("only runs _executeDoUpdateContent once if called multiple times (since layerNeedsUpdate is set to NO)", function() {
|
83
80
|
callCount = 0;
|
84
|
-
view.
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
// ..........................................................
|
89
|
-
// TEST: layerNeedsUpdate auto-trigger
|
90
|
-
//
|
91
|
-
module("SC.View#layerNeedsUpdate auto-triggers", {
|
92
|
-
setup: function() {
|
93
|
-
// use fake method to isolate call...
|
94
|
-
view = SC.View.create({
|
95
|
-
updateLayerIfNeeded: function() { callCount++; }
|
96
|
-
});
|
97
|
-
callCount = 0;
|
98
|
-
}
|
99
|
-
});
|
100
|
-
|
101
|
-
test("setting layerNeedsUpdate calls updateLayerIfNeeded at end of runloop", function() {
|
102
|
-
SC.RunLoop.begin();
|
103
|
-
view.set('layerNeedsUpdate', YES);
|
104
|
-
SC.RunLoop.end();
|
105
|
-
|
106
|
-
equals(callCount, 1, 'updateLayerIfNeeded did run');
|
107
|
-
});
|
108
|
-
|
109
|
-
test("setting & resetting only triggers updateLayerIfNeeded once per runloop", function() {
|
110
|
-
SC.RunLoop.begin();
|
111
|
-
view.set('layerNeedsUpdate', YES)
|
112
|
-
.set('layerNeedsUpdate', NO)
|
113
|
-
.set('layerNeedsUpdate', YES);
|
114
|
-
SC.RunLoop.end();
|
115
|
-
|
116
|
-
equals(callCount, 1, 'updateLayerIfNeeded did run');
|
117
|
-
});
|
118
|
-
|
119
|
-
// ..........................................................
|
120
|
-
// INTEGRATION SCENARIOS
|
121
|
-
//
|
122
|
-
|
123
|
-
module("SC.View#updateLayer - integration");
|
124
|
-
|
125
|
-
test("layerNeedsUpdate actually triggers updateLayer", function() {
|
126
|
-
var callCount = 0 ;
|
127
|
-
var layer = document.createElement('div');
|
128
|
-
var view = SC.View.create({
|
129
|
-
isVisibleInWindow: YES,
|
130
|
-
updateLayer: function() { callCount++; }
|
81
|
+
view.set('isVisible', true);
|
82
|
+
SC.run(function () {
|
83
|
+
view.displayDidChange().displayDidChange().displayDidChange();
|
131
84
|
});
|
132
|
-
|
133
|
-
|
134
|
-
SC.RunLoop.begin();
|
135
|
-
view.set('layerNeedsUpdate', YES);
|
136
|
-
SC.RunLoop.end();
|
137
|
-
|
138
|
-
equals(callCount, 1, 'updateLayer did run b/c layerNeedsUpdate is YES');
|
139
|
-
callCount = 0 ;
|
140
|
-
|
141
|
-
SC.RunLoop.begin();
|
142
|
-
view.set('layerNeedsUpdate', YES);
|
143
|
-
view.set('layerNeedsUpdate', NO);
|
144
|
-
SC.RunLoop.end();
|
145
|
-
|
146
|
-
equals(callCount, 0, 'updateLayer did NOT run b/c layerNeedsUpdate is NO');
|
85
|
+
equals(callCount, 1, '_executeDoUpdateContent() called only once');
|
147
86
|
});
|
148
|
-
|
@@ -8,25 +8,25 @@
|
|
8
8
|
|
9
9
|
// ..........................................................
|
10
10
|
// viewDidResize()
|
11
|
-
//
|
11
|
+
//
|
12
12
|
module("SC.View#viewDidResize");
|
13
13
|
|
14
14
|
test("invokes parentViewDidResize on all child views", function() {
|
15
15
|
var callCount = 0 ;
|
16
|
-
var ChildView = SC.View.extend({
|
17
|
-
parentViewDidResize: function() { callCount++; }
|
16
|
+
var ChildView = SC.View.extend({
|
17
|
+
parentViewDidResize: function() { callCount++; }
|
18
18
|
});
|
19
|
-
|
19
|
+
|
20
20
|
var view = SC.View.create({
|
21
|
-
childViews: [ChildView, ChildView, ChildView]
|
21
|
+
childViews: [ChildView, ChildView, ChildView]
|
22
22
|
});
|
23
|
-
|
23
|
+
|
24
24
|
// now test...
|
25
25
|
SC.run(function() { view.viewDidResize(); });
|
26
26
|
equals(callCount, 3, 'should invoke parentViewDidResize() on all children');
|
27
27
|
});
|
28
28
|
|
29
|
-
test("
|
29
|
+
test("parentViewDidResize should only be called when the parent's layout property changes in a manner that may affect child views.", function() {
|
30
30
|
var callCount = 0 ;
|
31
31
|
var view = SC.View.create({
|
32
32
|
// use the callback below to detect when viewDidResize is icalled.
|
@@ -34,9 +34,53 @@ test("triggers whenever layout property is changed", function() {
|
|
34
34
|
parentViewDidResize: function() { callCount++; }
|
35
35
|
})]
|
36
36
|
});
|
37
|
-
|
38
|
-
SC.run(function() { view.set('layout', { top: 10, left: 20, height: 50, width: 40 }); });
|
39
|
-
equals(callCount, 1, '
|
37
|
+
|
38
|
+
SC.run(function () { view.set('layout', { top: 10, left: 20, height: 50, width: 40 }); });
|
39
|
+
equals(callCount, 1, 'parentViewDidResize should invoke once');
|
40
|
+
|
41
|
+
SC.run(function () { view.adjust('top', 0); });
|
42
|
+
equals(callCount, 1, 'parentViewDidResize should invoke once');
|
43
|
+
|
44
|
+
SC.run(function () { view.adjust('height', 60); });
|
45
|
+
equals(callCount, 2, 'parentViewDidResize should invoke twice');
|
46
|
+
|
47
|
+
// This is tricky, if the height increases, but the same size border is added, the effective height/width is unchanged.
|
48
|
+
SC.run(function () { view.adjust({'height': 70, 'borderTop': 10 }); });
|
49
|
+
equals(callCount, 2, 'parentViewDidResize should invoke twice');
|
50
|
+
});
|
51
|
+
|
52
|
+
test("The view's frame should only notify changes when its layout changes if the effective size or position actually change.", function () {
|
53
|
+
var view2 = SC.View.create({
|
54
|
+
frameCallCount: 0,
|
55
|
+
frameDidChange: function() {
|
56
|
+
this.frameCallCount++;
|
57
|
+
}.observes('frame'),
|
58
|
+
viewDidResize: CoreTest.stub('viewDidResize', SC.View.prototype.viewDidResize)
|
59
|
+
}),
|
60
|
+
view1 = SC.View.create({
|
61
|
+
childViews: [view2],
|
62
|
+
layout: { width: 200, height: 200 }
|
63
|
+
});
|
64
|
+
|
65
|
+
SC.run(function () { view2.set('layout', { height: 50, width: 50 }); });
|
66
|
+
equals(view2.get('frameCallCount'), 1, 'frame should have notified changing once.');
|
67
|
+
|
68
|
+
SC.run(function () { view2.adjust('top', 0); });
|
69
|
+
equals(view2.get('frameCallCount'), 2, 'frame should have notified changing once.');
|
70
|
+
|
71
|
+
SC.run(function () { view2.adjust('height', 100); });
|
72
|
+
equals(view2.get('frameCallCount'), 3, 'frame should have notified changing twice.');
|
73
|
+
|
74
|
+
// Tricky.
|
75
|
+
SC.run(function () { view2.adjust({ 'height': 110, 'borderTop': 10, 'top': -10 }); });
|
76
|
+
equals(view2.get('frameCallCount'), 4, 'frame should have notified changing twice.');
|
77
|
+
|
78
|
+
SC.run(function () { view2.adjust('width', null); });
|
79
|
+
equals(view2.get('frameCallCount'), 5, 'frame should have notified changing thrice.');
|
80
|
+
|
81
|
+
// Tricky.
|
82
|
+
SC.run(function () { view2.adjust('width', 200); });
|
83
|
+
equals(view2.get('frameCallCount'), 6, 'frame should have notified changing thrice.');
|
40
84
|
});
|
41
85
|
|
42
86
|
test("making sure that the frame value is correct inside viewDidResize()", function() {
|
@@ -45,14 +89,14 @@ test("making sure that the frame value is correct inside viewDidResize()", funct
|
|
45
89
|
// the method itself, we'll cache a global reference to the then-current
|
46
90
|
// value and test it later.
|
47
91
|
var cachedFrame;
|
48
|
-
|
92
|
+
|
49
93
|
var view = SC.View.create({
|
50
|
-
|
94
|
+
|
51
95
|
layout: { left:0, top:0, width:400, height:400 },
|
52
|
-
|
96
|
+
|
53
97
|
viewDidResize: function() {
|
54
98
|
sc_super();
|
55
|
-
|
99
|
+
|
56
100
|
// Set a global reference to my frame at this point so that we can
|
57
101
|
// test for the correct value later.
|
58
102
|
cachedFrame = this.get('frame');
|
@@ -65,7 +109,7 @@ test("making sure that the frame value is correct inside viewDidResize()", funct
|
|
65
109
|
// after the resize, we can verify that the cache invalidation logic is
|
66
110
|
// working correctly.
|
67
111
|
var originalFrame = view.get('frame');
|
68
|
-
|
112
|
+
|
69
113
|
SC.RunLoop.begin();
|
70
114
|
view.adjust('height', 314);
|
71
115
|
SC.RunLoop.end();
|
@@ -79,86 +123,90 @@ test("making sure that the frame value is correct inside viewDidResize()", funct
|
|
79
123
|
|
80
124
|
// ..........................................................
|
81
125
|
// parentViewDidResize()
|
82
|
-
//
|
126
|
+
//
|
83
127
|
module("SC.View#parentViewDidResize");
|
84
128
|
|
85
|
-
test("
|
129
|
+
test("When parentViewDidResize is called on a view, it should only notify on frame and cascade the call to child views if it will be affected by the parent's resize.", function() {
|
86
130
|
var view = SC.View.create({
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
131
|
+
// instrument...
|
132
|
+
frameCallCount: 0,
|
133
|
+
frameDidChange: function() {
|
134
|
+
this.frameCallCount++;
|
135
|
+
}.observes('frame'),
|
136
|
+
viewDidResize: CoreTest.stub('viewDidResize', SC.View.prototype.viewDidResize)
|
137
|
+
}),
|
138
|
+
parentView = SC.View.create({
|
139
|
+
childViews: [view],
|
140
|
+
layout: { height: 100, width: 100 }
|
141
|
+
});
|
94
142
|
|
95
143
|
// try with fixed layout
|
96
144
|
view.set('layout', { top: 10, left: 10, height: 10, width: 10 });
|
97
145
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
98
|
-
|
146
|
+
parentView.adjust({ width: 90, height: 90 });
|
99
147
|
view.viewDidResize.expect(0);
|
100
148
|
equals(view.frameCallCount, 0, 'should not notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
101
149
|
|
102
150
|
// try with flexible height
|
103
151
|
view.set('layout', { top: 10, left: 10, bottom: 10, width: 10 });
|
104
152
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
105
|
-
|
153
|
+
parentView.adjust({ width: 80, height: 80 });
|
106
154
|
view.viewDidResize.expect(1);
|
107
155
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
108
156
|
|
109
157
|
// try with flexible width
|
110
158
|
view.set('layout', { top: 10, left: 10, height: 10, right: 10 });
|
111
159
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
112
|
-
|
160
|
+
parentView.adjust({ width: 70, height: 70 });
|
113
161
|
view.viewDidResize.expect(1);
|
114
162
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
115
163
|
|
116
164
|
// try with right align
|
117
165
|
view.set('layout', { top: 10, right: 10, height: 10, width: 10 });
|
118
166
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
119
|
-
|
167
|
+
parentView.adjust({ width: 60, height: 60 });
|
120
168
|
view.viewDidResize.expect(0);
|
121
169
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
122
170
|
|
123
171
|
// try with bottom align
|
124
172
|
view.set('layout', { top: 10, bottom: 10, height: 10, width: 10 });
|
125
173
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
126
|
-
|
174
|
+
parentView.adjust({ width: 50, height: 50 });
|
127
175
|
view.viewDidResize.expect(0);
|
128
176
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
129
177
|
|
130
178
|
// try with center horizontal align
|
131
179
|
view.set('layout', { centerX: 10, top: 10, height: 10, width: 10 });
|
132
180
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
133
|
-
|
181
|
+
parentView.adjust({ width: 40, height: 40 });
|
134
182
|
view.viewDidResize.expect(0);
|
135
183
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
136
184
|
|
137
185
|
// try with center vertical align
|
138
186
|
view.set('layout', { left: 10, centerY: 10, height: 10, width: 10 });
|
139
187
|
view.viewDidResize.reset(); view.frameCallCount = 0;
|
140
|
-
|
188
|
+
parentView.adjust({ width: 30, height: 30 });
|
141
189
|
view.viewDidResize.expect(0);
|
142
190
|
equals(view.frameCallCount, 1, 'should notify frame changed when isFixedPosition: %@ and isFixedSize: %@'.fmt(view.get('isFixedPosition'), view.get('isFixedSize')));
|
143
191
|
});
|
144
192
|
|
145
193
|
// ..........................................................
|
146
194
|
// beginLiveResize()
|
147
|
-
//
|
195
|
+
//
|
148
196
|
module("SC.View#beginLiveResize");
|
149
197
|
|
150
198
|
test("invokes willBeginLiveResize on receiver and any child views that implement it", function() {
|
151
|
-
var callCount = 0;
|
199
|
+
var callCount = 0;
|
152
200
|
var ChildView = SC.View.extend({
|
153
201
|
willBeginLiveResize: function() { callCount++ ;}
|
154
202
|
});
|
155
|
-
|
203
|
+
|
156
204
|
var view = ChildView.create({ // <-- has callback
|
157
205
|
childViews: [SC.View.extend({ // <-- this does not implement callback
|
158
206
|
childViews: [ChildView] // <-- has callback
|
159
207
|
})]
|
160
208
|
});
|
161
|
-
|
209
|
+
|
162
210
|
callCount = 0 ;
|
163
211
|
view.beginLiveResize();
|
164
212
|
equals(callCount, 2, 'should invoke willBeginLiveResize when implemented');
|
@@ -171,21 +219,21 @@ test("returns receiver", function() {
|
|
171
219
|
|
172
220
|
// ..........................................................
|
173
221
|
// endLiveResize()
|
174
|
-
//
|
222
|
+
//
|
175
223
|
module("SC.View#endLiveResize");
|
176
224
|
|
177
225
|
test("invokes didEndLiveResize on receiver and any child views that implement it", function() {
|
178
|
-
var callCount = 0;
|
226
|
+
var callCount = 0;
|
179
227
|
var ChildView = SC.View.extend({
|
180
228
|
didEndLiveResize: function() { callCount++; }
|
181
229
|
});
|
182
|
-
|
230
|
+
|
183
231
|
var view = ChildView.create({ // <-- has callback
|
184
232
|
childViews: [SC.View.extend({ // <-- this does not implement callback
|
185
233
|
childViews: [ChildView] // <-- has callback
|
186
234
|
})]
|
187
235
|
});
|
188
|
-
|
236
|
+
|
189
237
|
callCount = 0 ;
|
190
238
|
view.endLiveResize();
|
191
239
|
equals(callCount, 2, 'should invoke didEndLiveResize when implemented');
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js
ADDED
@@ -0,0 +1,684 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// ©2008-2011 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
/*global module, test, equals,ok */
|
9
|
+
|
10
|
+
var parentView;
|
11
|
+
|
12
|
+
/** Test the SC.View states. */
|
13
|
+
module("SC.View States", {
|
14
|
+
|
15
|
+
setup: function () {
|
16
|
+
parentView = SC.View.create();
|
17
|
+
},
|
18
|
+
|
19
|
+
teardown: function () {
|
20
|
+
parentView.destroy();
|
21
|
+
parentView = null;
|
22
|
+
}
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
/**
|
27
|
+
Test the state, in particular supported actions.
|
28
|
+
*/
|
29
|
+
test("Test unrendered state.", function () {
|
30
|
+
var handled,
|
31
|
+
view = SC.View.create();
|
32
|
+
|
33
|
+
// Test expected state of the view.
|
34
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "A newly created view should be in the state");
|
35
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
36
|
+
ok(!view.get('_isRendered'), "_isRendered should be false");
|
37
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
38
|
+
|
39
|
+
// _doAttach(document.body)
|
40
|
+
// _doDestroyLayer()
|
41
|
+
// _doDetach()
|
42
|
+
// _doHide()
|
43
|
+
// _doRender()
|
44
|
+
// _doShow()
|
45
|
+
// _doUpdateContent()
|
46
|
+
// _doUpdateLayout()
|
47
|
+
|
48
|
+
// UNHANDLED ACTIONS
|
49
|
+
handled = view._doAttach(document.body);
|
50
|
+
ok(!handled, "Calling _doAttach(document.body) should not be handled");
|
51
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doAttach(document.body) doesn't change state");
|
52
|
+
|
53
|
+
handled = view._doDestroyLayer();
|
54
|
+
ok(!handled, "Calling _doDestroyLayer() should not be handled");
|
55
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doDestroyLayer() doesn't change state");
|
56
|
+
|
57
|
+
handled = view._doDetach();
|
58
|
+
ok(!handled, "Calling _doDetach() should not be handled");
|
59
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doDetach() doesn't change state");
|
60
|
+
|
61
|
+
handled = view._doHide();
|
62
|
+
ok(!handled, "Calling _doHide() should not be handled");
|
63
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doHide() doesn't change state");
|
64
|
+
|
65
|
+
handled = view._doUpdateContent();
|
66
|
+
ok(!handled, "Calling _doUpdateContent() should not be handled");
|
67
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doUpdateContent() doesn't change state");
|
68
|
+
|
69
|
+
handled = view._doUpdateLayout();
|
70
|
+
ok(!handled, "Calling _doUpdateLayout() should not be handled");
|
71
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doUpdateLayout() doesn't change state");
|
72
|
+
|
73
|
+
|
74
|
+
// HANDLED ACTIONS
|
75
|
+
|
76
|
+
handled = view._doShow();
|
77
|
+
ok(handled, "Calling _doShow() should be handled");
|
78
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doShow() doesn't change state");
|
79
|
+
|
80
|
+
handled = view._doRender();
|
81
|
+
ok(handled, "Calling _doRender() should be handled");
|
82
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doRender() changes state");
|
83
|
+
|
84
|
+
|
85
|
+
// CLEAN UP
|
86
|
+
view.destroy();
|
87
|
+
});
|
88
|
+
|
89
|
+
/**
|
90
|
+
Test the state, in particular supported actions.
|
91
|
+
*/
|
92
|
+
test("Test unattached state.", function () {
|
93
|
+
var handled,
|
94
|
+
view = SC.View.create();
|
95
|
+
|
96
|
+
// Test expected state of the view.
|
97
|
+
view._doRender();
|
98
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "A newly created view that is rendered should be in the state");
|
99
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
100
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
101
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
102
|
+
|
103
|
+
// _doAttach(document.body)
|
104
|
+
// _doDestroyLayer()
|
105
|
+
// _doDetach()
|
106
|
+
// _doHide()
|
107
|
+
// _doRender()
|
108
|
+
// _doShow()
|
109
|
+
// _doUpdateContent()
|
110
|
+
// _doUpdateLayout()
|
111
|
+
|
112
|
+
// UNHANDLED ACTIONS
|
113
|
+
handled = view._doDetach();
|
114
|
+
ok(!handled, "Calling _doDetach() should not be handled");
|
115
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doDetach() doesn't change state");
|
116
|
+
|
117
|
+
handled = view._doRender();
|
118
|
+
ok(!handled, "Calling _doRender() should not be handled");
|
119
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doRender() doesn't change state");
|
120
|
+
|
121
|
+
|
122
|
+
// HANDLED ACTIONS
|
123
|
+
|
124
|
+
handled = view._doHide();
|
125
|
+
ok(handled, "Calling _doHide() should be handled");
|
126
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doHide() doesn't change state");
|
127
|
+
|
128
|
+
handled = view._doShow();
|
129
|
+
ok(handled, "Calling _doShow() should be handled");
|
130
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doShow() doesn't change state");
|
131
|
+
|
132
|
+
handled = view._doAttach(document.body);
|
133
|
+
ok(handled, "Calling _doAttach(document.body) should be handled");
|
134
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doAttach(document.body) changes state");
|
135
|
+
|
136
|
+
// Reset
|
137
|
+
view.destroy();
|
138
|
+
view = SC.View.create();
|
139
|
+
view._doRender();
|
140
|
+
|
141
|
+
handled = view._doDestroyLayer();
|
142
|
+
ok(handled, "Calling _doDestroyLayer() should be handled");
|
143
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doDestroyLayer() changes state");
|
144
|
+
|
145
|
+
// Reset
|
146
|
+
view.destroy();
|
147
|
+
view = SC.View.create();
|
148
|
+
view._doRender();
|
149
|
+
|
150
|
+
handled = view._doUpdateContent();
|
151
|
+
ok(handled, "Calling _doUpdateContent() should be handled");
|
152
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doUpdateContent() doesn't change state");
|
153
|
+
|
154
|
+
handled = view._doUpdateLayout();
|
155
|
+
ok(handled, "Calling _doUpdateLayout() should be handled");
|
156
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doUpdateLayout() doesn't change state");
|
157
|
+
|
158
|
+
// Reset
|
159
|
+
view.destroy();
|
160
|
+
view = SC.View.create();
|
161
|
+
view._doRender();
|
162
|
+
|
163
|
+
handled = view._doAttach(document.body);
|
164
|
+
ok(handled, "Calling _doAttach(document.body) with unrendered orphan parentView should be handled");
|
165
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doAttach(document.body) changes state");
|
166
|
+
|
167
|
+
|
168
|
+
// CLEAN UP
|
169
|
+
view.destroy();
|
170
|
+
});
|
171
|
+
|
172
|
+
|
173
|
+
/**
|
174
|
+
Test the state, in particular supported actions.
|
175
|
+
*/
|
176
|
+
test("Test attached_shown state.", function () {
|
177
|
+
var handled,
|
178
|
+
view = SC.View.create();
|
179
|
+
|
180
|
+
// Test expected state of the view.
|
181
|
+
view._doRender();
|
182
|
+
view._doAttach(document.body);
|
183
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created orphan view that is rendered and attached should be in the state");
|
184
|
+
ok(view.get('isAttached'), "isAttached should be true");
|
185
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
186
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
187
|
+
|
188
|
+
// _doAttach(document.body)
|
189
|
+
// _doDestroyLayer()
|
190
|
+
// _doDetach()
|
191
|
+
// _doHide()
|
192
|
+
// _doRender()
|
193
|
+
// _doShow()
|
194
|
+
// _doUpdateContent()
|
195
|
+
// _doUpdateLayout()
|
196
|
+
|
197
|
+
|
198
|
+
// UNHANDLED ACTIONS
|
199
|
+
handled = view._doAttach(document.body);
|
200
|
+
ok(!handled, "Calling _doAttach(document.body) should not be handled");
|
201
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doAttach(document.body) doesn't change state");
|
202
|
+
|
203
|
+
handled = view._doDestroyLayer();
|
204
|
+
ok(!handled, "Calling _doDestroyLayer() should not be handled");
|
205
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doDestroyLayer() doesn't change state");
|
206
|
+
|
207
|
+
handled = view._doRender();
|
208
|
+
ok(!handled, "Calling _doRender() should not be handled");
|
209
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doRender() doesn't change state");
|
210
|
+
|
211
|
+
handled = view._doShow();
|
212
|
+
ok(!handled, "Calling _doShow() should not be handled");
|
213
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doShow() doesn't change state");
|
214
|
+
|
215
|
+
|
216
|
+
// HANDLED ACTIONS
|
217
|
+
|
218
|
+
handled = view._doUpdateContent();
|
219
|
+
ok(handled, "Calling _doUpdateContent() should be handled");
|
220
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doUpdateContent() doesn't change state");
|
221
|
+
|
222
|
+
handled = view._doUpdateLayout();
|
223
|
+
ok(handled, "Calling _doUpdateLayout() should be handled");
|
224
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doUpdateLayout() doesn't change state");
|
225
|
+
|
226
|
+
handled = view._doDetach();
|
227
|
+
ok(handled, "Calling _doDetach() should be handled");
|
228
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doDetach() changes state");
|
229
|
+
|
230
|
+
// Reset
|
231
|
+
view.destroy();
|
232
|
+
view = SC.View.create();
|
233
|
+
view._doRender();
|
234
|
+
view._doAttach(document.body);
|
235
|
+
|
236
|
+
handled = view._doHide();
|
237
|
+
ok(handled, "Calling _doHide() should be handled");
|
238
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "Calling _doHide() changes state");
|
239
|
+
|
240
|
+
|
241
|
+
// CLEAN UP
|
242
|
+
view.destroy();
|
243
|
+
});
|
244
|
+
|
245
|
+
|
246
|
+
test("Calling destroy layer, clears the layer from all child views.", function () {
|
247
|
+
var child = SC.View.create(),
|
248
|
+
view = SC.View.create({ childViews: [child] });
|
249
|
+
|
250
|
+
view._doAdopt(parentView);
|
251
|
+
parentView._doRender();
|
252
|
+
|
253
|
+
ok(parentView.get('layer'), "The parentView should have a reference to the layer.");
|
254
|
+
ok(view.get('layer'), "The view should have a reference to the layer.");
|
255
|
+
ok(child.get('layer'), "The child should have a reference to the layer.");
|
256
|
+
|
257
|
+
parentView._doDestroyLayer();
|
258
|
+
equals(parentView.get('layer'), null, "The parentView should not have a reference to the layer.");
|
259
|
+
equals(view.get('layer'), null, "The view should not have a reference to the layer.");
|
260
|
+
equals(child.get('layer'), null, "The child should not have a reference to the layer.");
|
261
|
+
|
262
|
+
// CLEAN UP
|
263
|
+
view.destroy();
|
264
|
+
});
|
265
|
+
|
266
|
+
/** Test the SC.View state propagation to child views. */
|
267
|
+
module("SC.View Adoption", {
|
268
|
+
|
269
|
+
setup: function () {
|
270
|
+
parentView = SC.View.create();
|
271
|
+
},
|
272
|
+
|
273
|
+
teardown: function () {
|
274
|
+
parentView.destroy();
|
275
|
+
parentView = null;
|
276
|
+
}
|
277
|
+
|
278
|
+
});
|
279
|
+
|
280
|
+
|
281
|
+
test("Test adding a child brings that child to the same state as the parentView.", function () {
|
282
|
+
var child = SC.View.create(),
|
283
|
+
view = SC.View.create({ childViews: [child] });
|
284
|
+
|
285
|
+
// Test expected state of the view.
|
286
|
+
view._doAdopt(parentView);
|
287
|
+
equals(parentView.viewState, SC.CoreView.UNRENDERED, "A newly created parentView should be in the state");
|
288
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "A newly created child view of unrendered parentView should be in the state");
|
289
|
+
equals(child.viewState, SC.CoreView.UNRENDERED, "A newly created child view of unrendered parentView's child view should be in the state");
|
290
|
+
ok(!view.get('_isRendered'), "_isRendered should be false");
|
291
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
292
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
293
|
+
|
294
|
+
// Render the view.
|
295
|
+
view._doRender();
|
296
|
+
equals(view.viewState, SC.CoreView.UNATTACHED, "A rendered child view of unrendered parentView should be in the state");
|
297
|
+
equals(child.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "A rendered child view of unrendered parentView's child view should be in the state");
|
298
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
299
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
300
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
301
|
+
|
302
|
+
// Attach the view.
|
303
|
+
view._doAttach(document.body);
|
304
|
+
equals(view.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "An attached child view of unrendered parentView should be in the state");
|
305
|
+
equals(child.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "An attached child view of unrendered parentView's child view should be in the state");
|
306
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
307
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
308
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
309
|
+
|
310
|
+
// Reset
|
311
|
+
view.destroy();
|
312
|
+
child = SC.View.create();
|
313
|
+
view = SC.View.create({ childViews: [child] });
|
314
|
+
|
315
|
+
parentView._doRender();
|
316
|
+
view._doAdopt(parentView);
|
317
|
+
equals(parentView.viewState, SC.CoreView.UNATTACHED, "A newly created parentView that is rendered should be in the state");
|
318
|
+
equals(view.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "A newly created child view of unattached parentView should be in the state");
|
319
|
+
equals(child.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "A newly created child view of unattached parentView's child view should be in the state");
|
320
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
321
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
322
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
323
|
+
|
324
|
+
// Attach the view.
|
325
|
+
view._doAttach(document.body);
|
326
|
+
equals(view.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "An attached child view of unattached parentView should be in the state");
|
327
|
+
equals(child.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "An attached child view of unattached parentView's child view should be in the state");
|
328
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
329
|
+
ok(!view.get('isAttached'), "isAttached should be false");
|
330
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
331
|
+
|
332
|
+
// Reset
|
333
|
+
view.destroy();
|
334
|
+
child = SC.View.create();
|
335
|
+
view = SC.View.create({ childViews: [child] });
|
336
|
+
|
337
|
+
parentView._doAttach(document.body);
|
338
|
+
view._doAdopt(parentView);
|
339
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created parentView that is attached should be in the state");
|
340
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created child view of attached parentView should be in the state");
|
341
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "A child of newly created view of attached parentView should be in the state");
|
342
|
+
ok(view.get('_isRendered'), "_isRendered should be true");
|
343
|
+
ok(view.get('isAttached'), "isAttached should be true");
|
344
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
345
|
+
|
346
|
+
|
347
|
+
// CLEAN UP
|
348
|
+
view.destroy();
|
349
|
+
});
|
350
|
+
|
351
|
+
|
352
|
+
test("Test showing and hiding parentView updates child views.", function () {
|
353
|
+
var handled,
|
354
|
+
child = SC.View.create(),
|
355
|
+
view = SC.View.create({ childViews: [child] });
|
356
|
+
|
357
|
+
// Test expected state of the view.
|
358
|
+
parentView._doRender();
|
359
|
+
parentView._doAttach(document.body);
|
360
|
+
view._doAdopt(parentView);
|
361
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created parentView that is attached should be in the state");
|
362
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created child view of unattached parentView should be in the state");
|
363
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "A newly created child view of unattached parentView's child view should be in the state");
|
364
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
365
|
+
|
366
|
+
// Hide the parentView.
|
367
|
+
parentView._doHide();
|
368
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_HIDDEN, "A hidden parentView that is attached should be in the state");
|
369
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView should be in the state");
|
370
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView's child view should be in the state");
|
371
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
372
|
+
|
373
|
+
// Show the parentView/hide the view.
|
374
|
+
handled = parentView._doShow();
|
375
|
+
ok(handled, "Calling _doShow() on parentView should be handled");
|
376
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doShow() on parentView changes state on view.");
|
377
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doShow() on parentView changes state on child");
|
378
|
+
handled = view._doHide();
|
379
|
+
ok(handled, "Calling _doHide() should be handled");
|
380
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "Calling _doHide() on view changes state on view");
|
381
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "Calling _doHide() on view changes state on child");
|
382
|
+
|
383
|
+
// Reset
|
384
|
+
parentView._doHide();
|
385
|
+
view.destroy();
|
386
|
+
child = SC.View.create();
|
387
|
+
view = SC.View.create({ childViews: [child] });
|
388
|
+
view._doAdopt(parentView);
|
389
|
+
|
390
|
+
// Add child to already hidden parentView.
|
391
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView should be in the state");
|
392
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView's child view should be in the state");
|
393
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
394
|
+
|
395
|
+
// Reset
|
396
|
+
parentView.destroy();
|
397
|
+
parentView = SC.View.create();
|
398
|
+
parentView._doRender();
|
399
|
+
child = SC.View.create();
|
400
|
+
view = SC.View.create({ childViews: [child] });
|
401
|
+
view._doAdopt(parentView);
|
402
|
+
|
403
|
+
// Attach a parentView with children
|
404
|
+
equals(view.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "A child view of unattached parentView should be in the state");
|
405
|
+
equals(child.viewState, SC.CoreView.UNATTACHED_BY_PARENT, "A child view of unattached parentView's child view should be in the state");
|
406
|
+
parentView._doAttach(document.body);
|
407
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "A child view of attached_shown parentView should be in the state");
|
408
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "A child view of attached_shown parentView's child view should be in the state");
|
409
|
+
|
410
|
+
// CLEAN UP
|
411
|
+
view.destroy();
|
412
|
+
});
|
413
|
+
|
414
|
+
test("Test hiding with transitionHide", function () {
|
415
|
+
var child = SC.View.create(),
|
416
|
+
transitionHide = { run: function () {} },
|
417
|
+
view = SC.View.create({ childViews: [child] });
|
418
|
+
|
419
|
+
// Set up.
|
420
|
+
parentView._doRender();
|
421
|
+
parentView._doAttach(document.body);
|
422
|
+
view._doAdopt(parentView);
|
423
|
+
|
424
|
+
// Hide the parentView with transitionHide
|
425
|
+
parentView.set('transitionHide', transitionHide);
|
426
|
+
parentView._doHide();
|
427
|
+
ok(parentView.get('isVisibleInWindow'), "isVisibleInWindow of parentView should be false");
|
428
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
429
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
430
|
+
parentView.didTransitionOut(transitionHide);
|
431
|
+
ok(!parentView.get('isVisibleInWindow'), "isVisibleInWindow of parentView should be false after didTransitionOut");
|
432
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false after didTransitionOut");
|
433
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false after didTransitionOut");
|
434
|
+
|
435
|
+
// CLEAN UP
|
436
|
+
view.destroy();
|
437
|
+
});
|
438
|
+
|
439
|
+
/** isVisible */
|
440
|
+
var child, view;
|
441
|
+
module("SC.View isVisible integration with shown and hidden state", {
|
442
|
+
|
443
|
+
setup: function () {
|
444
|
+
SC.run(function () {
|
445
|
+
parentView = SC.View.create();
|
446
|
+
parentView._doRender();
|
447
|
+
parentView._doAttach(document.body);
|
448
|
+
|
449
|
+
child = SC.View.create(),
|
450
|
+
view = SC.View.create({
|
451
|
+
// STUB: _executeDoUpdateContent
|
452
|
+
_executeDoUpdateContent: CoreTest.stub('_executeDoUpdateContent', SC.CoreView.prototype._executeDoUpdateContent),
|
453
|
+
// STUB: _doUpdateVisibleStyle
|
454
|
+
_doUpdateVisibleStyle: CoreTest.stub('_doUpdateVisibleStyle', SC.CoreView.prototype._doUpdateVisibleStyle),
|
455
|
+
|
456
|
+
childViews: [child],
|
457
|
+
displayProperties: ['foo'],
|
458
|
+
foo: false
|
459
|
+
});
|
460
|
+
});
|
461
|
+
},
|
462
|
+
|
463
|
+
teardown: function () {
|
464
|
+
view.destroy();
|
465
|
+
parentView.destroy();
|
466
|
+
parentView = null;
|
467
|
+
}
|
468
|
+
|
469
|
+
});
|
470
|
+
|
471
|
+
test("Test showing and hiding a hidden view in same run loop should not update visibility or content.", function () {
|
472
|
+
view._doAdopt(parentView);
|
473
|
+
|
474
|
+
SC.run(function () {
|
475
|
+
view.set('isVisible', false);
|
476
|
+
});
|
477
|
+
|
478
|
+
view._executeDoUpdateContent.expect(0);
|
479
|
+
view._doUpdateVisibleStyle.expect(1);
|
480
|
+
|
481
|
+
// Hide the view using isVisible.
|
482
|
+
SC.run(function () {
|
483
|
+
view.set('foo', true);
|
484
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
485
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
486
|
+
|
487
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
488
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
489
|
+
|
490
|
+
view.set('isVisible', true);
|
491
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "The view should now be in the state");
|
492
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should now be in the state");
|
493
|
+
|
494
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
495
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
496
|
+
|
497
|
+
view.set('isVisible', false);
|
498
|
+
});
|
499
|
+
|
500
|
+
view._executeDoUpdateContent.expect(0);
|
501
|
+
view._doUpdateVisibleStyle.expect(3);
|
502
|
+
});
|
503
|
+
|
504
|
+
test("Test hiding and showing a shown view in same run loop should not update visibility.", function () {
|
505
|
+
view._doAdopt(parentView);
|
506
|
+
|
507
|
+
// Hide the view using isVisible.
|
508
|
+
SC.run(function () {
|
509
|
+
view.set('foo', true);
|
510
|
+
view.set('isVisible', false);
|
511
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
512
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
513
|
+
|
514
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
515
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
516
|
+
|
517
|
+
view.set('isVisible', true);
|
518
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "The view should be in the state");
|
519
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should be in the state");
|
520
|
+
|
521
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
522
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
523
|
+
});
|
524
|
+
|
525
|
+
view._executeDoUpdateContent.expect(1);
|
526
|
+
view._doUpdateVisibleStyle.expect(2);
|
527
|
+
});
|
528
|
+
|
529
|
+
|
530
|
+
test("Test showing and hiding a hiding view in same run loop should not update visibility or content.", function () {
|
531
|
+
var transitionHide = { run: function () {} };
|
532
|
+
|
533
|
+
view._doAdopt(parentView);
|
534
|
+
|
535
|
+
view.set('transitionHide', transitionHide);
|
536
|
+
|
537
|
+
SC.run(function () {
|
538
|
+
view.set('foo', true);
|
539
|
+
view.set('isVisible', false);
|
540
|
+
});
|
541
|
+
|
542
|
+
// Hide the view using isVisible.
|
543
|
+
SC.run(function () {
|
544
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDING, "The view should be in the state");
|
545
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should be in the state");
|
546
|
+
|
547
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
548
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
549
|
+
|
550
|
+
view.set('isVisible', true);
|
551
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "The view should be in the state");
|
552
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should be in the state");
|
553
|
+
|
554
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
555
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
556
|
+
|
557
|
+
view.set('isVisible', false);
|
558
|
+
});
|
559
|
+
|
560
|
+
view._executeDoUpdateContent.expect(1);
|
561
|
+
view._doUpdateVisibleStyle.expect(0);
|
562
|
+
});
|
563
|
+
|
564
|
+
test("Test hiding and showing a showing view in same run loop should not update visibility.", function () {
|
565
|
+
var transitionShow = { run: function () {} };
|
566
|
+
|
567
|
+
view._doAdopt(parentView);
|
568
|
+
|
569
|
+
view.set('transitionShow', transitionShow);
|
570
|
+
|
571
|
+
SC.run(function () {
|
572
|
+
view.set('foo', true);
|
573
|
+
view.set('isVisible', false);
|
574
|
+
});
|
575
|
+
|
576
|
+
SC.run(function () {
|
577
|
+
view.set('isVisible', true);
|
578
|
+
});
|
579
|
+
|
580
|
+
// Hide the view using isVisible.
|
581
|
+
SC.run(function () {
|
582
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWING, "The view should be in the state");
|
583
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
584
|
+
|
585
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
586
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
587
|
+
|
588
|
+
view.set('isVisible', false);
|
589
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
590
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
591
|
+
|
592
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
593
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
594
|
+
|
595
|
+
view.set('isVisible', true);
|
596
|
+
});
|
597
|
+
|
598
|
+
view._executeDoUpdateContent.expect(1);
|
599
|
+
view._doUpdateVisibleStyle.expect(4);
|
600
|
+
});
|
601
|
+
|
602
|
+
|
603
|
+
test("Test hiding and showing an attached child view with child views.", function () {
|
604
|
+
view._doAdopt(parentView);
|
605
|
+
|
606
|
+
// Hide the view using isVisible.
|
607
|
+
SC.run(function () {
|
608
|
+
view.set('isVisible', false);
|
609
|
+
});
|
610
|
+
|
611
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_SHOWN, "The parentView view should be in the state");
|
612
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
613
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
614
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
615
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
616
|
+
|
617
|
+
// Show the view using isVisible.
|
618
|
+
SC.run(function () {
|
619
|
+
view.set('isVisible', true);
|
620
|
+
});
|
621
|
+
|
622
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "The view should be in the state");
|
623
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should be in the state");
|
624
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should now be true");
|
625
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should now be true");
|
626
|
+
});
|
627
|
+
|
628
|
+
|
629
|
+
test("Test hiding an attached parentView view and then adding child views.", function () {
|
630
|
+
// Hide the parentView using isVisible and then adopting child views.
|
631
|
+
SC.run(function () {
|
632
|
+
parentView.set('isVisible', false);
|
633
|
+
view._doAdopt(parentView);
|
634
|
+
});
|
635
|
+
|
636
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_HIDDEN, "The parentView view should be in the state");
|
637
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The view should be in the state");
|
638
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
639
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
640
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
641
|
+
|
642
|
+
// Show the parentView using isVisible.
|
643
|
+
SC.run(function () {
|
644
|
+
parentView.set('isVisible', true);
|
645
|
+
});
|
646
|
+
|
647
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_SHOWN, "The parentView view should be in the state");
|
648
|
+
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "The view should be in the state");
|
649
|
+
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "The child view should be in the state");
|
650
|
+
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
651
|
+
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
652
|
+
});
|
653
|
+
|
654
|
+
|
655
|
+
test("Test showing an attached parentView view while hiding the child view.", function () {
|
656
|
+
SC.run(function () {
|
657
|
+
parentView.set('isVisible', false);
|
658
|
+
view._doAdopt(parentView);
|
659
|
+
|
660
|
+
// Hide the view and then show the parentView using isVisible.
|
661
|
+
view.set('isVisible', false);
|
662
|
+
parentView.set('isVisible', true);
|
663
|
+
});
|
664
|
+
|
665
|
+
equals(parentView.viewState, SC.CoreView.ATTACHED_SHOWN, "The parentView view should be in the state");
|
666
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
667
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
668
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
669
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
670
|
+
});
|
671
|
+
|
672
|
+
|
673
|
+
test("Test adding a hidden child view to attached shown parentView.", function () {
|
674
|
+
// Hide the view with isVisible and then add to parentView.
|
675
|
+
SC.run(function () {
|
676
|
+
view.set('isVisible', false);
|
677
|
+
view._doAdopt(parentView);
|
678
|
+
});
|
679
|
+
|
680
|
+
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "The view should be in the state");
|
681
|
+
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "The child view should be in the state");
|
682
|
+
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false");
|
683
|
+
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false");
|
684
|
+
});
|