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
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js
CHANGED
@@ -31,6 +31,9 @@ test("calls renderLayout() on child views on views that need layout if they have
|
|
31
31
|
|
32
32
|
view.layoutChildViews();
|
33
33
|
equals(callCount, 2, 'updateLayout should be called on two dirty child views');
|
34
|
+
|
35
|
+
// Clean up.
|
36
|
+
view.destroy();
|
34
37
|
});
|
35
38
|
|
36
39
|
// .......................................................
|
@@ -38,7 +41,7 @@ test("calls renderLayout() on child views on views that need layout if they have
|
|
38
41
|
//
|
39
42
|
module("SC.View#updateLayout");
|
40
43
|
|
41
|
-
test("if view has layout, calls
|
44
|
+
test("if view has layout, calls _executeDoUpdateLayout", function() {
|
42
45
|
|
43
46
|
// NOTE: renderLayout() is also called when a view's
|
44
47
|
// layer is first created. We use isTesting below to
|
@@ -46,9 +49,7 @@ test("if view has layout, calls renderLayout with context to update element", fu
|
|
46
49
|
// are actually doing layout.
|
47
50
|
var callCount = 0, isTesting = NO ;
|
48
51
|
var view = SC.View.create({
|
49
|
-
|
50
|
-
if (!isTesting) return ;
|
51
|
-
equals(context._elem, this.get('layer'), 'should pass context that will edit layer');
|
52
|
+
_executeDoUpdateLayout: function() {
|
52
53
|
callCount++;
|
53
54
|
}
|
54
55
|
});
|
@@ -56,9 +57,14 @@ test("if view has layout, calls renderLayout with context to update element", fu
|
|
56
57
|
view.createLayer(); // we need a layer
|
57
58
|
ok(view.get('layer'), 'precond - should have a layer');
|
58
59
|
|
59
|
-
isTesting= YES ;
|
60
60
|
view.updateLayout();
|
61
|
-
equals(callCount,
|
61
|
+
equals(callCount, 0, 'should not call _executeDoUpdateLayout() because the view isn\'t shown');
|
62
|
+
|
63
|
+
view.updateLayout(true);
|
64
|
+
equals(callCount, 1, 'should call _executeDoUpdateLayout() because we force it');
|
65
|
+
|
66
|
+
// Clean up.
|
67
|
+
view.destroy();
|
62
68
|
});
|
63
69
|
|
64
70
|
test("if view has NO layout, should not call renderLayout", function() {
|
@@ -80,11 +86,17 @@ test("if view has NO layout, should not call renderLayout", function() {
|
|
80
86
|
isTesting= YES ;
|
81
87
|
view.updateLayout();
|
82
88
|
equals(callCount, 0, 'should NOT call renderLayout()');
|
89
|
+
|
90
|
+
// Clean up.
|
91
|
+
view.destroy();
|
83
92
|
});
|
84
93
|
|
85
94
|
test("returns receiver", function() {
|
86
95
|
var view = SC.View.create();
|
87
96
|
equals(view.updateLayout(), view, 'should return receiver');
|
97
|
+
|
98
|
+
// Clean up.
|
99
|
+
view.destroy();
|
88
100
|
});
|
89
101
|
|
90
102
|
// .......................................................
|
@@ -108,6 +120,9 @@ test("adds layoutStyle property to passed context", function() {
|
|
108
120
|
|
109
121
|
equals(context.styles().width, 50, 'should have width style');
|
110
122
|
equals(context.styles().height, 50, 'should have height style');
|
123
|
+
|
124
|
+
// Clean up.
|
125
|
+
view.destroy();
|
111
126
|
});
|
112
127
|
|
113
128
|
// .......................................................
|
@@ -121,7 +136,11 @@ module('SC.View#layoutChildViewsIfNeeded', {
|
|
121
136
|
layoutChildViews: function() { callCount++; }
|
122
137
|
});
|
123
138
|
},
|
124
|
-
teardown: function() {
|
139
|
+
teardown: function() {
|
140
|
+
// Clean up.
|
141
|
+
view.destroy();
|
142
|
+
view = null;
|
143
|
+
}
|
125
144
|
});
|
126
145
|
|
127
146
|
test("calls layoutChildViews() if childViewsNeedLayout and isVisibleInWindow & sets childViewsNeedLayout to NO", function() {
|
@@ -141,20 +160,6 @@ test("does not call layoutChildViews() if childViewsNeedLayout is NO", function(
|
|
141
160
|
equals(callCount, 0, 'should NOT call layoutChildViews()');
|
142
161
|
});
|
143
162
|
|
144
|
-
|
145
|
-
test("does not call layoutChildViews() if isVisibleInWindow is NO unless passed isVisible YES", function() {
|
146
|
-
|
147
|
-
view.childViewsNeedLayout = YES ;
|
148
|
-
view.isVisibleInWindow = NO ;
|
149
|
-
view.layoutChildViewsIfNeeded();
|
150
|
-
equals(callCount, 0, 'should NOT call layoutChildViews()');
|
151
|
-
equals(view.get('childViewsNeedLayout'), YES, 'should leave childViewsNeedLayout set to YES');
|
152
|
-
|
153
|
-
view.layoutChildViewsIfNeeded(YES);
|
154
|
-
equals(callCount, 1, 'should call layoutChildViews()');
|
155
|
-
equals(view.get('childViewsNeedLayout'), NO, 'should set childViewsNeedLayout to NO');
|
156
|
-
});
|
157
|
-
|
158
163
|
test("returns receiver", function() {
|
159
164
|
equals(view.layoutChildViewsIfNeeded(), view, 'should return receiver');
|
160
165
|
});
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js
CHANGED
@@ -4,160 +4,229 @@
|
|
4
4
|
// License: Licensed under MIT license (see license.js)
|
5
5
|
// ==========================================================================
|
6
6
|
|
7
|
-
/*global module test equals
|
7
|
+
/*global module, test, equals, ok */
|
8
8
|
|
9
|
-
module("SC.View
|
9
|
+
module("SC.View.prototype.layoutDidChange");
|
10
10
|
|
11
|
-
test("notifies layoutStyle & frame change", function() {
|
11
|
+
test("notifies layoutStyle & frame change", function () {
|
12
12
|
|
13
13
|
var view = SC.View.create();
|
14
|
-
var
|
14
|
+
var layoutStyleCallCount = 0, frameCallCount = 0;
|
15
|
+
|
16
|
+
view.addObserver('layoutStyle', function () { layoutStyleCallCount++; });
|
17
|
+
view.addObserver('frame', function () { frameCallCount++; });
|
18
|
+
|
19
|
+
SC.run(function () {
|
20
|
+
// Manually indicate a layout change.
|
21
|
+
view.layoutDidChange();
|
22
|
+
});
|
23
|
+
|
24
|
+
equals(frameCallCount, 1, 'should trigger observers for frame');
|
25
|
+
equals(layoutStyleCallCount, 0, 'should not trigger observers for layoutStyle');
|
15
26
|
|
16
|
-
|
17
|
-
view.
|
27
|
+
// Attach to the document.
|
28
|
+
view.createLayer()._doAttach(document.body);
|
18
29
|
|
19
|
-
|
20
|
-
equals(
|
30
|
+
equals(frameCallCount, 2, 'should trigger observers for frame when attached to the document');
|
31
|
+
equals(layoutStyleCallCount, 0, 'should still not trigger observers for layoutStyle');
|
32
|
+
|
33
|
+
SC.run(function () {
|
34
|
+
view.adjust('top', 20);
|
35
|
+
});
|
36
|
+
|
37
|
+
equals(frameCallCount, 3, 'should trigger observers for frame when attached to the document');
|
38
|
+
equals(layoutStyleCallCount, 1, 'should trigger observers for layoutStyle');
|
39
|
+
|
40
|
+
// Clean up.
|
41
|
+
view.destroy();
|
21
42
|
});
|
22
43
|
|
23
|
-
test("invokes layoutDidChangeFor() on layoutView each time it is called", function() {
|
44
|
+
test("invokes layoutDidChangeFor() on layoutView each time it is called", function () {
|
24
45
|
|
25
|
-
var callCount = 0
|
46
|
+
var callCount = 0;
|
26
47
|
var layoutView = SC.View.create({
|
27
|
-
layoutDidChangeFor: function(changedView){
|
48
|
+
layoutDidChangeFor: function (changedView) {
|
28
49
|
equals(this.get('childViewsNeedLayout'), YES, 'should set childViewsNeedLayout to YES before calling layoutDidChangeFor()');
|
29
50
|
|
30
51
|
equals(view, changedView, 'should pass view');
|
31
52
|
callCount++;
|
53
|
+
|
54
|
+
// Original
|
55
|
+
var set = this._needLayoutViews;
|
56
|
+
if (!set) set = this._needLayoutViews = SC.CoreSet.create();
|
57
|
+
set.add(changedView);
|
32
58
|
}
|
33
59
|
});
|
34
60
|
|
35
61
|
var view = SC.View.create({ layoutView: layoutView });
|
36
62
|
|
37
|
-
|
38
|
-
|
39
|
-
|
63
|
+
SC.run(function () {
|
64
|
+
view.layoutDidChange();
|
65
|
+
view.layoutDidChange();
|
66
|
+
view.layoutDidChange();
|
67
|
+
});
|
40
68
|
|
41
69
|
equals(callCount, 3, 'should call layoutView.layoutDidChangeFor each time');
|
70
|
+
|
71
|
+
// Clean up.
|
72
|
+
layoutView.destroy();
|
73
|
+
view.destroy();
|
42
74
|
});
|
43
75
|
|
44
|
-
test("invokes layoutChildViewsIfNeeded() on layoutView once per runloop", function() {
|
76
|
+
test("invokes layoutChildViewsIfNeeded() on layoutView once per runloop", function () {
|
45
77
|
|
46
|
-
var callCount = 0
|
78
|
+
var callCount = 0;
|
47
79
|
var layoutView = SC.View.create({
|
48
|
-
layoutChildViewsIfNeeded: function(){
|
80
|
+
layoutChildViewsIfNeeded: function () {
|
49
81
|
callCount++;
|
50
82
|
}
|
51
83
|
});
|
52
84
|
|
53
85
|
var view = SC.View.create({ layoutView: layoutView });
|
54
86
|
|
55
|
-
SC.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
87
|
+
SC.run(function () {
|
88
|
+
view.layoutDidChange();
|
89
|
+
view.layoutDidChange();
|
90
|
+
view.layoutDidChange();
|
91
|
+
});
|
60
92
|
|
61
93
|
equals(callCount, 1, 'should call layoutView.layoutChildViewsIfNeeded one time');
|
94
|
+
|
95
|
+
// Clean up.
|
96
|
+
layoutView.destroy();
|
97
|
+
view.destroy();
|
62
98
|
});
|
63
99
|
|
64
100
|
|
65
|
-
test("should not invoke layoutChildViewsIfNeeded() if layoutDidChangeFor() sets childViewsNeedLayout to NO each time", function() {
|
101
|
+
test("should not invoke layoutChildViewsIfNeeded() if layoutDidChangeFor() sets childViewsNeedLayout to NO each time", function () {
|
66
102
|
|
67
|
-
var callCount = 0
|
103
|
+
var callCount = 0;
|
68
104
|
var layoutView = SC.View.create({
|
69
|
-
layoutDidChangeFor: function() {
|
105
|
+
layoutDidChangeFor: function () {
|
70
106
|
this.set('childViewsNeedLayout', NO);
|
71
107
|
},
|
72
108
|
|
73
|
-
layoutChildViewsIfNeeded: function(){
|
109
|
+
layoutChildViewsIfNeeded: function () {
|
74
110
|
callCount++;
|
75
111
|
}
|
76
112
|
});
|
77
113
|
|
78
114
|
var view = SC.View.create({ layoutView: layoutView });
|
79
115
|
|
80
|
-
SC.
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
116
|
+
SC.run(function () {
|
117
|
+
view.layoutDidChange();
|
118
|
+
view.layoutDidChange();
|
119
|
+
view.layoutDidChange();
|
120
|
+
});
|
85
121
|
|
86
122
|
equals(callCount, 0, 'should not call layoutView.layoutChildViewsIfNeeded');
|
123
|
+
|
124
|
+
// Clean up.
|
125
|
+
layoutView.destroy();
|
126
|
+
view.destroy();
|
87
127
|
});
|
88
128
|
|
89
|
-
test('returns receiver', function() {
|
129
|
+
test('returns receiver', function () {
|
90
130
|
var view = SC.View.create();
|
91
|
-
|
131
|
+
|
132
|
+
SC.run(function () {
|
133
|
+
equals(view.layoutDidChange(), view, 'should return receiver');
|
134
|
+
});
|
135
|
+
|
136
|
+
// Clean up.
|
137
|
+
view.destroy();
|
92
138
|
});
|
93
139
|
|
94
|
-
test("is invoked whenever layout property changes", function() {
|
140
|
+
test("is invoked whenever layout property changes", function () {
|
95
141
|
|
96
|
-
var callCount = 0
|
142
|
+
var callCount = 0;
|
97
143
|
var layoutView = SC.View.create({
|
98
|
-
layoutDidChangeFor: function(changedView){
|
144
|
+
layoutDidChangeFor: function (changedView) {
|
99
145
|
callCount++;
|
146
|
+
|
147
|
+
// Original
|
148
|
+
var set = this._needLayoutViews;
|
149
|
+
if (!set) set = this._needLayoutViews = SC.CoreSet.create();
|
150
|
+
set.add(changedView);
|
100
151
|
}
|
101
152
|
});
|
102
153
|
|
103
154
|
var view = SC.View.create({ layoutView: layoutView });
|
104
155
|
|
105
|
-
|
156
|
+
SC.run(function () {
|
157
|
+
view.set('layout', { top: 0, left: 10 });
|
158
|
+
});
|
106
159
|
equals(callCount, 1, 'should call layoutDidChangeFor when setting layout of child view');
|
107
160
|
|
108
|
-
|
161
|
+
// Clean up.
|
162
|
+
layoutView.destroy();
|
163
|
+
view.destroy();
|
109
164
|
});
|
110
165
|
|
111
|
-
test("is invoked on parentView if no layoutView whenever layout property changes", function() {
|
166
|
+
test("is invoked on parentView if no layoutView whenever layout property changes", function () {
|
112
167
|
|
113
|
-
var callCount = 0
|
168
|
+
var callCount = 0;
|
114
169
|
var parentView = SC.View.create({
|
115
|
-
layoutDidChangeFor: function(changedView){
|
170
|
+
layoutDidChangeFor: function (changedView) {
|
116
171
|
callCount++;
|
172
|
+
|
173
|
+
// Original
|
174
|
+
var set = this._needLayoutViews;
|
175
|
+
if (!set) set = this._needLayoutViews = SC.CoreSet.create();
|
176
|
+
set.add(changedView);
|
117
177
|
}
|
118
178
|
});
|
119
179
|
|
120
180
|
var view = SC.View.create({});
|
121
181
|
view.set('parentView', parentView);
|
122
182
|
|
123
|
-
|
183
|
+
SC.run(function () {
|
184
|
+
view.set('layout', { top: 0, left: 10 });
|
185
|
+
});
|
124
186
|
equals(callCount, 1, 'should call layoutDidChangeFor when setting layout of child view');
|
125
187
|
|
188
|
+
// Clean up.
|
189
|
+
parentView.destroy();
|
190
|
+
view.destroy();
|
126
191
|
});
|
127
192
|
|
128
|
-
test("sets rotateX when rotate is set", function() {
|
193
|
+
test("sets rotateX when rotate is set", function () {
|
129
194
|
var view = SC.View.create({});
|
130
|
-
|
195
|
+
|
196
|
+
SC.run(function () {
|
197
|
+
view.set('layout', { rotate: 45 });
|
198
|
+
});
|
131
199
|
|
132
200
|
equals(view.get('layout').rotateX, 45, "should set rotateX");
|
201
|
+
|
202
|
+
// Clean up.
|
203
|
+
view.destroy();
|
133
204
|
});
|
134
205
|
|
135
|
-
test("
|
206
|
+
test("rotateX overrides rotate", function () {
|
136
207
|
var view = SC.View.create({});
|
137
|
-
view.set('layout', { rotateX: 45 });
|
138
|
-
equals(view.get('layout').rotate, 45, "should set rotate");
|
139
208
|
|
140
|
-
|
141
|
-
|
142
|
-
});
|
209
|
+
SC.run(function () {
|
210
|
+
view.set('layout', { rotate: 45, rotateX: 90 });
|
211
|
+
});
|
143
212
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
213
|
+
equals(view.get('layout').rotate, undefined, "should clear rotate for rotateX");
|
214
|
+
|
215
|
+
// Clean up.
|
216
|
+
view.destroy();
|
148
217
|
});
|
149
218
|
|
150
219
|
// The default implementation for viewDidResize calls internal layout-related
|
151
220
|
// methods on child views. This test confirms that child views that do not
|
152
221
|
// support layout do not cause this process to explode.
|
153
|
-
test("Calling viewDidResize on a view notifies its child views", function() {
|
222
|
+
test("Calling viewDidResize on a view notifies its child views", function () {
|
154
223
|
var regularViewCounter = 0, coreViewCounter = 0;
|
155
224
|
|
156
225
|
var view = SC.View.create({
|
157
226
|
childViews: ['regular', 'core'],
|
158
227
|
|
159
228
|
regular: SC.View.create({
|
160
|
-
viewDidResize: function() {
|
229
|
+
viewDidResize: function () {
|
161
230
|
regularViewCounter++;
|
162
231
|
// Make sure we call the default implementation to
|
163
232
|
// ensure potential blow-uppy behavior is invoked
|
@@ -166,7 +235,7 @@ test("Calling viewDidResize on a view notifies its child views", function() {
|
|
166
235
|
}),
|
167
236
|
|
168
237
|
core: SC.CoreView.create({
|
169
|
-
viewDidResize: function() {
|
238
|
+
viewDidResize: function () {
|
170
239
|
coreViewCounter++;
|
171
240
|
sc_super();
|
172
241
|
}
|
@@ -177,4 +246,7 @@ test("Calling viewDidResize on a view notifies its child views", function() {
|
|
177
246
|
|
178
247
|
equals(regularViewCounter, 1, "regular view's viewDidResize gets called");
|
179
248
|
equals(coreViewCounter, 1, "core view's viewDidResize gets called");
|
249
|
+
|
250
|
+
// Clean up.
|
251
|
+
view.destroy();
|
180
252
|
});
|
@@ -8,17 +8,17 @@
|
|
8
8
|
// View Layout Unit Tests
|
9
9
|
// ========================================================================
|
10
10
|
|
11
|
-
/*
|
11
|
+
/*global module test ok same equals */
|
12
12
|
|
13
13
|
|
14
14
|
/* These unit tests verify: layout(), frame(), styleLayout() and clippingFrame(). */
|
15
|
-
(function() {
|
15
|
+
(function () {
|
16
16
|
var parent, child, frameKeys, layoutKeys;
|
17
17
|
|
18
18
|
frameKeys = 'x y width height'.w();
|
19
|
-
layoutKeys = ['width','height','top','bottom','marginLeft','marginTop','left','right','zIndex',
|
20
|
-
'minWidth','maxWidth','minHeight','maxHeight','borderTopWidth','borderBottomWidth',
|
21
|
-
'borderLeftWidth','borderRightWidth'];
|
19
|
+
layoutKeys = ['width', 'height', 'top', 'bottom', 'marginLeft', 'marginTop', 'left', 'right', 'zIndex',
|
20
|
+
'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'borderTopWidth', 'borderBottomWidth',
|
21
|
+
'borderLeftWidth', 'borderRightWidth'];
|
22
22
|
|
23
23
|
/*
|
24
24
|
helper method to test the layout of a view. Applies the passed layout to a
|
@@ -40,9 +40,9 @@
|
|
40
40
|
if (SC.platform.supportsCSSTransforms) { layoutKeys.push('transform'); }
|
41
41
|
|
42
42
|
// make sure we add null properties and convert numbers to 'XXpx' to style layout.
|
43
|
-
layoutKeys.forEach(function(key) {
|
44
|
-
if (no_s[key]===undefined) { no_s[key] = null; }
|
45
|
-
if (with_s[key]===undefined) { with_s[key] = null; }
|
43
|
+
layoutKeys.forEach(function (key) {
|
44
|
+
if (no_s[key] === undefined) { no_s[key] = null; }
|
45
|
+
if (with_s[key] === undefined) { with_s[key] = null; }
|
46
46
|
|
47
47
|
|
48
48
|
if (typeof no_s[key] === 'number') { no_s[key] = no_s[key].toString() + 'px'; }
|
@@ -50,21 +50,23 @@
|
|
50
50
|
});
|
51
51
|
|
52
52
|
// set layout
|
53
|
-
|
53
|
+
SC.run(function () {
|
54
|
+
child.set('layout', layout);
|
55
|
+
});
|
54
56
|
|
55
57
|
var layoutStyle = child.get('layoutStyle'),
|
56
58
|
frame = child.get('frame'),
|
57
59
|
testKey;
|
58
60
|
|
59
61
|
// test
|
60
|
-
layoutKeys.forEach(function(key) {
|
61
|
-
testKey = key === 'transform' ? SC.
|
62
|
+
layoutKeys.forEach(function (key) {
|
63
|
+
testKey = key === 'transform' ? SC.browser.domPrefix + 'Transform' : key;
|
62
64
|
equals(layoutStyle[testKey], no_s[key], "STYLE NO PARENT %@".fmt(key));
|
63
65
|
});
|
64
66
|
|
65
67
|
if (no_f !== undefined) {
|
66
68
|
if (frame && no_f) {
|
67
|
-
frameKeys.forEach(function(key){
|
69
|
+
frameKeys.forEach(function (key) {
|
68
70
|
equals(frame[key], no_f[key], "FRAME NO PARENT %@".fmt(key));
|
69
71
|
});
|
70
72
|
} else {
|
@@ -82,14 +84,14 @@
|
|
82
84
|
frame = child.get('frame');
|
83
85
|
|
84
86
|
// test again
|
85
|
-
layoutKeys.forEach(function(key) {
|
86
|
-
testKey = key === 'transform' ? SC.
|
87
|
+
layoutKeys.forEach(function (key) {
|
88
|
+
testKey = key === 'transform' ? SC.browser.domPrefix + 'Transform' : key;
|
87
89
|
equals(layoutStyle[testKey], with_s[key], "STYLE W/ PARENT %@".fmt(key));
|
88
90
|
});
|
89
91
|
|
90
92
|
if (with_f !== undefined) {
|
91
93
|
if (frame && with_f) {
|
92
|
-
frameKeys.forEach(function(key){
|
94
|
+
frameKeys.forEach(function (key) {
|
93
95
|
equals(frame[key], with_f[key], "FRAME W/ PARENT %@".fmt(key));
|
94
96
|
});
|
95
97
|
} else {
|
@@ -107,7 +109,7 @@
|
|
107
109
|
tests.
|
108
110
|
*/
|
109
111
|
var commonSetup = {
|
110
|
-
setup: function() {
|
112
|
+
setup: function () {
|
111
113
|
|
112
114
|
// create basic parent view
|
113
115
|
parent = SC.View.create({
|
@@ -118,22 +120,27 @@
|
|
118
120
|
child = SC.View.create();
|
119
121
|
},
|
120
122
|
|
121
|
-
teardown: function() {
|
122
|
-
|
123
|
+
teardown: function () {
|
124
|
+
child.destroy();
|
125
|
+
parent.destroy();
|
126
|
+
parent = child = null;
|
123
127
|
}
|
124
128
|
};
|
125
129
|
|
126
|
-
module("NOTIFICATIONS", commonSetup)
|
130
|
+
module("NOTIFICATIONS", commonSetup);
|
127
131
|
|
128
|
-
test("Setting layout will notify frame observers", function() {
|
132
|
+
test("Setting layout will notify frame observers", function () {
|
129
133
|
var didNotify = NO, didNotifyStyle = NO;
|
130
|
-
child.addObserver('frame', this, function() { didNotify = YES; })
|
131
|
-
child.addObserver('layoutStyle', this, function() { didNotifyStyle = YES; });
|
134
|
+
child.addObserver('frame', this, function () { didNotify = YES; });
|
135
|
+
child.addObserver('layoutStyle', this, function () { didNotifyStyle = YES; });
|
136
|
+
|
137
|
+
SC.run(function () {
|
138
|
+
child.set('layout', { left: 0, top: 10, bottom: 20, right: 50 });
|
139
|
+
});
|
132
140
|
|
133
|
-
child.set('layout', { left: 0, top: 10, bottom: 20, right: 50 }) ;
|
134
141
|
ok(didNotify, "didNotify");
|
135
142
|
ok(didNotifyStyle, 'didNotifyStyle');
|
136
|
-
})
|
143
|
+
});
|
137
144
|
|
138
145
|
// ..........................................................
|
139
146
|
// TEST FRAME/STYLEFRAME WITH BASIC LAYOUT VARIATIONS
|
@@ -143,50 +150,53 @@
|
|
143
150
|
|
144
151
|
module('BASIC LAYOUT VARIATIONS', commonSetup);
|
145
152
|
|
146
|
-
test("layout {top, left, width, height}", function() {
|
153
|
+
test("layout {top, left, width, height}", function () {
|
147
154
|
|
148
155
|
var layout = { top: 10, left: 10, width: 50, height: 50 };
|
149
|
-
var s = { top: 10, left: 10, width: 50, height: 50 }
|
150
|
-
var no_f = { x: 10, y: 10, width: 50, height: 50 }
|
151
|
-
var with_f = { x: 10, y: 10, width: 50, height: 50 }
|
156
|
+
var s = { top: 10, left: 10, width: 50, height: 50 };
|
157
|
+
var no_f = { x: 10, y: 10, width: 50, height: 50 };
|
158
|
+
var with_f = { x: 10, y: 10, width: 50, height: 50 };
|
152
159
|
|
153
|
-
performLayoutTest(layout, no_f, s, with_f, s, YES)
|
154
|
-
})
|
160
|
+
performLayoutTest(layout, no_f, s, with_f, s, YES);
|
161
|
+
});
|
155
162
|
|
156
|
-
test("layout {top, left, bottom, right}", function() {
|
163
|
+
test("layout {top, left, bottom, right}", function () {
|
157
164
|
|
158
165
|
var layout = { top: 10, left: 10, bottom: 10, right: 10 };
|
159
|
-
var no_f = { x: 10, y: 10, width: 0, height: 0 }
|
160
|
-
var with_f = { x: 10, y: 10, width: 180, height: 180 }
|
161
|
-
var s = { top: 10, left: 10, bottom: 10, right: 10 }
|
166
|
+
var no_f = { x: 10, y: 10, width: 0, height: 0 };
|
167
|
+
var with_f = { x: 10, y: 10, width: 180, height: 180 };
|
168
|
+
var s = { top: 10, left: 10, bottom: 10, right: 10 };
|
162
169
|
|
163
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
164
|
-
})
|
170
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
171
|
+
});
|
165
172
|
|
166
|
-
test("layout {bottom, right, width, height}", function() {
|
173
|
+
test("layout {bottom, right, width, height}", function () {
|
167
174
|
|
168
175
|
var layout = { bottom: 10, right: 10, width: 50, height: 50 };
|
169
|
-
var no_f = { x: 0, y: 0, width: 50, height: 50 }
|
170
|
-
var with_f = { x: 140, y: 140, width: 50, height: 50 }
|
171
|
-
var s = { bottom: 10, right: 10, width: 50, height: 50 }
|
176
|
+
var no_f = { x: 0, y: 0, width: 50, height: 50 };
|
177
|
+
var with_f = { x: 140, y: 140, width: 50, height: 50 };
|
178
|
+
var s = { bottom: 10, right: 10, width: 50, height: 50 };
|
172
179
|
|
173
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
174
|
-
})
|
180
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
181
|
+
});
|
175
182
|
|
176
|
-
test("layout {centerX, centerY, width, height}", function() {
|
183
|
+
test("layout {centerX, centerY, width, height}", function () {
|
177
184
|
|
178
185
|
var layout = { centerX: 10, centerY: 10, width: 60, height: 60 };
|
179
|
-
var no_f = { x: 10, y: 10, width: 60, height: 60 }
|
180
|
-
var with_f = { x: 80, y: 80, width: 60, height: 60 }
|
181
|
-
var s = { marginLeft: -20, marginTop: -20, width: 60, height: 60, top: "50%", left: "50%" }
|
186
|
+
var no_f = { x: 10, y: 10, width: 60, height: 60 };
|
187
|
+
var with_f = { x: 80, y: 80, width: 60, height: 60 };
|
188
|
+
var s = { marginLeft: -20, marginTop: -20, width: 60, height: 60, top: "50%", left: "50%" };
|
182
189
|
|
183
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
184
|
-
})
|
190
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
191
|
+
});
|
192
|
+
|
193
|
+
test("layout {top, left, width: auto, height: auto}", function () {
|
194
|
+
// Reset.
|
195
|
+
child.destroy();
|
185
196
|
|
186
|
-
test("layout {top, left, width: auto, height: auto}", function() {
|
187
197
|
child = SC.View.create({
|
188
198
|
useStaticLayout: YES,
|
189
|
-
render: function(context) {
|
199
|
+
render: function (context) {
|
190
200
|
// needed for auto
|
191
201
|
context.push('<div style="padding: 10px"></div>');
|
192
202
|
}
|
@@ -200,12 +210,13 @@
|
|
200
210
|
var layout = { top: 0, left: 0, width: 'auto', height: 'auto' };
|
201
211
|
var no_f = null;
|
202
212
|
// See test below
|
203
|
-
var with_f
|
213
|
+
var with_f; // { x: 0, y: 0, width: 200, height: 200 };
|
204
214
|
var s = { top: 0, left: 0, width: 'auto', height: 'auto' };
|
205
215
|
|
206
216
|
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
207
217
|
|
208
218
|
layer.parentNode.removeChild(layer);
|
219
|
+
child.destroy();
|
209
220
|
});
|
210
221
|
|
211
222
|
// See comment in above test
|
@@ -221,50 +232,81 @@
|
|
221
232
|
|
222
233
|
module('BASIC LAYOUT VARIATIONS PERCENTAGE', commonSetup);
|
223
234
|
|
224
|
-
test("layout {top, left, width, height}", function() {
|
235
|
+
test("layout {top, left, width, height}", function () {
|
225
236
|
|
226
237
|
var layout = { top: 0.1, left: 0.1, width: 0.5, height: 0.5 };
|
227
|
-
var s = { top: '10%', left: '10%', width: '50%', height: '50%' }
|
228
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
229
|
-
var with_f = { x: 20, y: 20, width: 100, height: 100 }
|
238
|
+
var s = { top: '10%', left: '10%', width: '50%', height: '50%' };
|
239
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
240
|
+
var with_f = { x: 20, y: 20, width: 100, height: 100 };
|
230
241
|
|
231
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
232
|
-
})
|
242
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
243
|
+
});
|
233
244
|
|
234
|
-
test("layout {top, left, bottom, right}", function() {
|
245
|
+
test("layout {top, left, bottom, right}", function () {
|
235
246
|
|
236
247
|
var layout = { top: 0.1, left: 0.1, bottom: 0.1, right: 0.1 };
|
237
248
|
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
238
249
|
var with_f = { x: 20, y: 20, width: 160, height: 160 };
|
239
|
-
var s = { top: '10%', left: '10%', bottom: '10%', right: '10%' }
|
250
|
+
var s = { top: '10%', left: '10%', bottom: '10%', right: '10%' };
|
240
251
|
|
241
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
242
|
-
})
|
252
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
253
|
+
});
|
243
254
|
|
244
|
-
test("layout {bottom, right, width, height}", function() {
|
255
|
+
test("layout {bottom, right, width, height}", function () {
|
245
256
|
|
246
257
|
var layout = { bottom: 0.1, right: 0.1, width: 0.5, height: 0.5 };
|
247
258
|
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
248
259
|
var with_f = { x: 80, y: 80, width: 100, height: 100 };
|
249
|
-
var s = { bottom: '10%', right: '10%', width: '50%', height: '50%' }
|
260
|
+
var s = { bottom: '10%', right: '10%', width: '50%', height: '50%' };
|
250
261
|
|
251
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
252
|
-
})
|
262
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
263
|
+
});
|
253
264
|
|
254
|
-
test("layout {centerX, centerY, width, height}", function() {
|
265
|
+
test("layout {centerX, centerY, width, height}", function () {
|
255
266
|
|
256
267
|
var layout = { centerX: 0.1, centerY: 0.1, width: 0.6, height: 0.6 };
|
257
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
258
|
-
var with_f = { x: 60, y: 60, width: 120, height: 120 }
|
259
|
-
var s = { marginLeft: '-20%', marginTop: '-20%', width: '60%', height: '60%', top: "50%", left: "50%" }
|
268
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
269
|
+
var with_f = { x: 60, y: 60, width: 120, height: 120 };
|
270
|
+
var s = { marginLeft: '-20%', marginTop: '-20%', width: '60%', height: '60%', top: "50%", left: "50%" };
|
271
|
+
|
272
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
273
|
+
});
|
274
|
+
|
275
|
+
// Previously, you couldn't set a % width or height with a centerX/centerY of 0.
|
276
|
+
// But there's no reason that a % sized view can't be centered at 0 and this
|
277
|
+
// test shows that.
|
278
|
+
test("layout {centerX 0, centerY 0, width %, height %}", function () {
|
279
|
+
var layout = { centerX: 0, centerY: 0, width: 0.6, height: 0.6 };
|
280
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
281
|
+
|
282
|
+
// The parent frame is 200 x 200.
|
283
|
+
var size = 200 * 0.6;
|
284
|
+
var with_f = { x: (200 - size) * 0.5, y: (200 - size) * 0.5, width: size, height: size };
|
285
|
+
var s = { marginLeft: '-30%', marginTop: '-30%', width: '60%', height: '60%', top: "50%", left: "50%" };
|
260
286
|
|
261
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
262
|
-
})
|
287
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
288
|
+
});
|
289
|
+
|
290
|
+
// Edge case: although rare, centered views should be able to have metrics of zero.
|
291
|
+
test("layout {centerX 0, centerY 0, width 0, height 0}", function () {
|
292
|
+
var layout = { centerX: 0, centerY: 0, width: 0, height: 0 };
|
293
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
294
|
+
|
295
|
+
// The parent frame is 200 x 200.
|
296
|
+
var size = 0;
|
297
|
+
var with_f = { x: (200 - size) * 0.5, y: (200 - size) * 0.5, width: size, height: size };
|
298
|
+
var s = { marginLeft: '0px', marginTop: '0px', width: '0px', height: '0px', top: '50%', left: '50%' };
|
299
|
+
|
300
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
301
|
+
});
|
302
|
+
|
303
|
+
test("layout {top, left, width: auto, height: auto}", function () {
|
304
|
+
// Reset.
|
305
|
+
child.destroy();
|
263
306
|
|
264
|
-
test("layout {top, left, width: auto, height: auto}", function() {
|
265
307
|
child = SC.View.create({
|
266
308
|
useStaticLayout: YES,
|
267
|
-
render: function(context) {
|
309
|
+
render: function (context) {
|
268
310
|
// needed for auto
|
269
311
|
context.push('<div style="padding: 10px"></div>');
|
270
312
|
}
|
@@ -278,12 +320,13 @@
|
|
278
320
|
var layout = { top: 0.1, left: 0.1, width: 'auto', height: 'auto' };
|
279
321
|
var no_f = null;
|
280
322
|
// See pending test below
|
281
|
-
var with_f
|
323
|
+
var with_f; // { x: 20, y: 20, width: 180, height: 180 };
|
282
324
|
var s = { top: '10%', left: '10%', width: 'auto', height: 'auto' };
|
283
325
|
|
284
326
|
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
285
327
|
|
286
328
|
layer.parentNode.removeChild(layer);
|
329
|
+
child.destroy();
|
287
330
|
});
|
288
331
|
|
289
332
|
// See commented out lines in test above
|
@@ -298,65 +341,92 @@
|
|
298
341
|
// parent.
|
299
342
|
|
300
343
|
module('CSS TRANSFORM LAYOUT VARIATIONS', {
|
301
|
-
setup: function(){
|
344
|
+
setup: function () {
|
302
345
|
commonSetup.setup();
|
303
346
|
child.createLayer();
|
304
347
|
document.body.appendChild(child.get('layer'));
|
305
348
|
},
|
306
349
|
|
307
|
-
teardown: function(){
|
350
|
+
teardown: function () {
|
351
|
+
document.body.removeChild(child.get('layer'));
|
308
352
|
child.destroyLayer();
|
309
353
|
commonSetup.teardown();
|
310
354
|
}
|
311
355
|
});
|
312
356
|
|
313
|
-
function transformFor(view){
|
314
|
-
return view.get('layer').style[SC.
|
357
|
+
function transformFor(view) {
|
358
|
+
return view.get('layer').style[SC.browser.domPrefix + 'Transform'];
|
315
359
|
}
|
316
360
|
|
317
|
-
test("layout {rotateX}", function() {
|
318
|
-
|
361
|
+
test("layout {rotateX}", function () {
|
362
|
+
SC.run(function () {
|
363
|
+
child.adjust('rotateX', 45).updateLayout(true);
|
364
|
+
});
|
365
|
+
|
319
366
|
equals(transformFor(child), 'rotateX(45deg)', 'transform attribute should be "rotateX(45deg)"');
|
320
367
|
});
|
321
368
|
|
322
|
-
test("layout {rotateY}", function() {
|
323
|
-
|
369
|
+
test("layout {rotateY}", function () {
|
370
|
+
SC.run(function () {
|
371
|
+
child.adjust('rotateY', 45).updateLayout(true);
|
372
|
+
});
|
324
373
|
equals(transformFor(child), 'rotateY(45deg)', 'transform attribute should be "rotateY(45deg)"');
|
325
374
|
});
|
326
375
|
|
327
|
-
test("layout {rotateZ}", function() {
|
328
|
-
|
376
|
+
test("layout {rotateZ}", function () {
|
377
|
+
SC.run(function () {
|
378
|
+
child.adjust('rotateZ', 45).updateLayout(true);
|
379
|
+
});
|
380
|
+
|
329
381
|
equals(transformFor(child), 'rotateZ(45deg)', 'transform attribute should be "rotateZ(45deg)"');
|
330
382
|
});
|
331
383
|
|
332
|
-
test("layout {rotate}", function() {
|
333
|
-
|
384
|
+
test("layout {rotate}", function () {
|
385
|
+
SC.run(function () {
|
386
|
+
child.adjust('rotate', 45).updateLayout(true);
|
387
|
+
});
|
388
|
+
|
334
389
|
equals(transformFor(child), 'rotateX(45deg)', 'transform attribute should be "rotateX(45deg)"');
|
335
390
|
});
|
336
391
|
|
337
|
-
test("layout {rotateX} with units", function() {
|
338
|
-
|
392
|
+
test("layout {rotateX} with units", function () {
|
393
|
+
SC.run(function () {
|
394
|
+
child.adjust('rotateX', '1rad').updateLayout(true);
|
395
|
+
});
|
396
|
+
|
339
397
|
equals(transformFor(child), 'rotateX(1rad)', 'transform attribute should be "rotateX(1rad)"');
|
340
398
|
});
|
341
399
|
|
342
|
-
test("layout {scale}", function() {
|
343
|
-
|
400
|
+
test("layout {scale}", function () {
|
401
|
+
SC.run(function () {
|
402
|
+
child.adjust('scale', 2).updateLayout(true);
|
403
|
+
});
|
404
|
+
|
344
405
|
equals(transformFor(child), 'scale(2)', 'transform attribute should be "scale(2)"');
|
345
406
|
});
|
346
407
|
|
347
|
-
test("layout {scale} with multiple", function() {
|
348
|
-
|
408
|
+
test("layout {scale} with multiple", function () {
|
409
|
+
SC.run(function () {
|
410
|
+
child.adjust('scale', [2, 3]).updateLayout(true);
|
411
|
+
});
|
412
|
+
|
349
413
|
equals(transformFor(child), 'scale(2, 3)', 'transform attribute should be "scale(2, 3)"');
|
350
414
|
});
|
351
415
|
|
352
|
-
test("layout {rotateX, scale}", function() {
|
353
|
-
|
416
|
+
test("layout {rotateX, scale}", function () {
|
417
|
+
SC.run(function () {
|
418
|
+
child.adjust({ rotateX: 45, scale: 2 }).updateLayout(true);
|
419
|
+
});
|
420
|
+
|
354
421
|
equals(transformFor(child), 'rotateX(45deg) scale(2)', 'transform attribute should be "rotateX(45deg) scale(2)"');
|
355
422
|
});
|
356
423
|
|
357
|
-
test("layout {rotateX} update", function() {
|
358
|
-
|
359
|
-
|
424
|
+
test("layout {rotateX} update", function () {
|
425
|
+
SC.run(function () {
|
426
|
+
child.adjust('rotateX', 45).updateLayout(true);
|
427
|
+
child.adjust('rotateX', 90).updateLayout(true);
|
428
|
+
});
|
429
|
+
|
360
430
|
equals(transformFor(child), 'rotateX(90deg)', 'transform attribute should be "rotateX(90deg)"');
|
361
431
|
});
|
362
432
|
|
@@ -370,40 +440,43 @@
|
|
370
440
|
// parent.
|
371
441
|
|
372
442
|
module('ACCELERATED LAYOUT VARIATIONS', {
|
373
|
-
setup: function(){
|
443
|
+
setup: function () {
|
374
444
|
commonSetup.setup();
|
375
|
-
child.wantsAcceleratedLayer
|
445
|
+
child.set('wantsAcceleratedLayer', YES);
|
376
446
|
},
|
377
447
|
|
378
448
|
teardown: commonSetup.teardown
|
379
449
|
});
|
380
450
|
|
381
|
-
test("layout {top, left, width, height}", function() {
|
451
|
+
test("layout {top, left, width, height}", function () {
|
382
452
|
var layout = { top: 10, left: 10, width: 50, height: 50 };
|
383
453
|
var expectedTransform = 'translateX(10px) translateY(10px)';
|
384
454
|
if (SC.platform.supportsCSS3DTransforms) expectedTransform += ' translateZ(0px)';
|
385
|
-
var s = { top: 0, left: 0, width: 50, height: 50, transform: expectedTransform }
|
386
|
-
var no_f = { x: 10, y: 10, width: 50, height: 50 }
|
387
|
-
var with_f = { x: 10, y: 10, width: 50, height: 50}
|
455
|
+
var s = { top: 0, left: 0, width: 50, height: 50, transform: expectedTransform };
|
456
|
+
var no_f = { x: 10, y: 10, width: 50, height: 50 };
|
457
|
+
var with_f = { x: 10, y: 10, width: 50, height: 50};
|
388
458
|
|
389
|
-
performLayoutTest(layout, no_f, s, with_f, s, YES)
|
390
|
-
})
|
459
|
+
performLayoutTest(layout, no_f, s, with_f, s, YES);
|
460
|
+
});
|
391
461
|
|
392
|
-
test("layout {top, left, bottom, right}", function() {
|
462
|
+
test("layout {top, left, bottom, right}", function () {
|
393
463
|
|
394
464
|
var layout = { top: 10, left: 10, bottom: 10, right: 10 };
|
395
|
-
var no_f = { x: 10, y: 10, width: 0, height: 0 }
|
396
|
-
var with_f = { x: 10, y: 10, width: 180, height: 180 }
|
397
|
-
var s = { top: 10, left: 10, bottom: 10, right: 10, transform: null }
|
465
|
+
var no_f = { x: 10, y: 10, width: 0, height: 0 };
|
466
|
+
var with_f = { x: 10, y: 10, width: 180, height: 180 };
|
467
|
+
var s = { top: 10, left: 10, bottom: 10, right: 10, transform: null };
|
468
|
+
|
469
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
470
|
+
});
|
398
471
|
|
399
|
-
|
400
|
-
|
472
|
+
test("layout {top, left, width: auto, height: auto}", function () {
|
473
|
+
// Reset.
|
474
|
+
child.destroy();
|
401
475
|
|
402
|
-
test("layout {top, left, width: auto, height: auto}", function() {
|
403
476
|
child = SC.View.create({
|
404
477
|
wantsAcceleratedLayer: YES,
|
405
478
|
useStaticLayout: YES,
|
406
|
-
render: function(context) {
|
479
|
+
render: function (context) {
|
407
480
|
// needed for auto
|
408
481
|
context.push('<div style="padding: 10px"></div>');
|
409
482
|
}
|
@@ -417,35 +490,33 @@
|
|
417
490
|
var layout = { top: 0, left: 0, width: 'auto', height: 'auto' };
|
418
491
|
var no_f = null;
|
419
492
|
// See test below
|
420
|
-
var with_f
|
493
|
+
var with_f; // { x: 0, y: 0, width: 200, height: 200 };
|
421
494
|
var s = { top: 0, left: 0, width: 'auto', height: 'auto', transform: null };
|
422
495
|
|
423
496
|
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
424
497
|
|
425
498
|
layer.parentNode.removeChild(layer);
|
499
|
+
|
500
|
+
child.destroy();
|
426
501
|
});
|
427
502
|
|
428
|
-
|
429
|
-
|
503
|
+
// See commented lines in test above
|
504
|
+
test("layout {top, left, width: auto, height: auto} - frame");
|
430
505
|
|
431
|
-
test("layout w/ percentage {top, left, width, height}", function() {
|
506
|
+
test("layout w/ percentage {top, left, width, height}", function () {
|
432
507
|
|
433
508
|
var layout = { top: 0.1, left: 0.1, width: 0.5, height: 0.5 };
|
434
|
-
var s = { top: '10%', left: '10%', width: '50%', height: '50%', transform: null }
|
509
|
+
var s = { top: '10%', left: '10%', width: '50%', height: '50%', transform: null };
|
435
510
|
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
436
|
-
var with_f = { x: 20, y: 20, width: 100, height: 100 }
|
511
|
+
var with_f = { x: 20, y: 20, width: 100, height: 100 };
|
437
512
|
|
438
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
439
|
-
})
|
513
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
514
|
+
});
|
440
515
|
|
441
516
|
}
|
442
517
|
|
443
518
|
|
444
519
|
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
520
|
// ..........................................................
|
450
521
|
// TEST FRAME/STYLEFRAME WITH INVALID LAYOUT VARIATIONS
|
451
522
|
//
|
@@ -454,108 +525,110 @@
|
|
454
525
|
|
455
526
|
module('INVALID LAYOUT VARIATIONS', commonSetup);
|
456
527
|
|
457
|
-
test("layout {top, left} - assume right/bottom=0", function() {
|
528
|
+
test("layout {top, left} - assume right/bottom=0", function () {
|
458
529
|
|
459
530
|
var layout = { top: 0.1, left: 0.1 };
|
460
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
461
|
-
var with_f = { x: 20, y: 20, width: 180, height: 180 }
|
462
|
-
var s = { bottom: 0, right: 0, top: '10%', left: '10%' }
|
531
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
532
|
+
var with_f = { x: 20, y: 20, width: 180, height: 180 };
|
533
|
+
var s = { bottom: 0, right: 0, top: '10%', left: '10%' };
|
463
534
|
|
464
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
465
|
-
})
|
535
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
536
|
+
});
|
466
537
|
|
467
|
-
test("layout {height, width} - assume top/left=0", function() {
|
538
|
+
test("layout {height, width} - assume top/left=0", function () {
|
468
539
|
|
469
540
|
var layout = { height: 0.6, width: 0.6 };
|
470
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
471
|
-
var with_f = { x: 0, y: 0, width: 120, height: 120 }
|
472
|
-
var s = { width: '60%', height: '60%', top: 0, left: 0 }
|
541
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
542
|
+
var with_f = { x: 0, y: 0, width: 120, height: 120 };
|
543
|
+
var s = { width: '60%', height: '60%', top: 0, left: 0 };
|
473
544
|
|
474
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
545
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
475
546
|
|
476
|
-
})
|
547
|
+
});
|
477
548
|
|
478
|
-
test("layout {right, bottom} - assume top/left=0", function() {
|
549
|
+
test("layout {right, bottom} - assume top/left=0", function () {
|
479
550
|
|
480
551
|
var layout = { right: 0.1, bottom: 0.1 };
|
481
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
482
|
-
var with_f = { x: 0, y: 0, width: 180, height: 180 }
|
483
|
-
var s = { bottom: '10%', right: '10%', top: 0, left: 0 }
|
552
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
553
|
+
var with_f = { x: 0, y: 0, width: 180, height: 180 };
|
554
|
+
var s = { bottom: '10%', right: '10%', top: 0, left: 0 };
|
484
555
|
|
485
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
556
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
486
557
|
|
487
|
-
})
|
558
|
+
});
|
488
559
|
|
489
|
-
test("layout {right, bottom, maxWidth, maxHeight} - assume top/left=null", function() {
|
560
|
+
test("layout {right, bottom, maxWidth, maxHeight} - assume top/left=null", function () {
|
490
561
|
|
491
562
|
var layout = { right: 0.1, bottom: 0.1, maxWidth: 10, maxHeight: 10 };
|
492
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
493
|
-
var with_f = { x: 0, y: 0, width: 10, height: 10 }
|
494
|
-
var s = { bottom: '10%', right: '10%', top: null, left: null, maxWidth: 10, maxHeight: 10 }
|
563
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
564
|
+
var with_f = { x: 0, y: 0, width: 10, height: 10 };
|
565
|
+
var s = { bottom: '10%', right: '10%', top: null, left: null, maxWidth: 10, maxHeight: 10 };
|
495
566
|
|
496
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
567
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
497
568
|
|
498
|
-
})
|
569
|
+
});
|
499
570
|
|
500
|
-
test("layout {centerX, centerY} - assume width/height=0", function() {
|
571
|
+
test("layout {centerX, centerY} - assume width/height=0", function () {
|
501
572
|
|
502
573
|
var layout = { centerX: 0.1, centerY: 0.1 };
|
503
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
504
|
-
var with_f = { x: 120, y: 120, width: 0, height: 0 }
|
505
|
-
var s = { width: 0, height: 0, top: "50%", left: "50%", marginTop: "50%", marginLeft: "50%" }
|
506
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
574
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
575
|
+
var with_f = { x: 120, y: 120, width: 0, height: 0 };
|
576
|
+
var s = { width: 0, height: 0, top: "50%", left: "50%", marginTop: "50%", marginLeft: "50%" };
|
577
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
507
578
|
|
508
|
-
})
|
579
|
+
});
|
509
580
|
|
510
|
-
test("layout {top, left, centerX, centerY, height, width} - top/left take presidence", function() {
|
581
|
+
test("layout {top, left, centerX, centerY, height, width} - top/left take presidence", function () {
|
511
582
|
|
512
583
|
var layout = { top: 0.1, left: 0.1, centerX: 0.1, centerY: 0.1, height: 0.6, width: 0.6 };
|
513
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
514
|
-
var with_f = { x: 20, y: 20, width: 120, height: 120 }
|
515
|
-
var s = { width: '60%', height: '60%', top: '10%', left: '10%' }
|
584
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
585
|
+
var with_f = { x: 20, y: 20, width: 120, height: 120 };
|
586
|
+
var s = { width: '60%', height: '60%', top: '10%', left: '10%' };
|
516
587
|
|
517
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
588
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
518
589
|
|
519
|
-
})
|
590
|
+
});
|
520
591
|
|
521
|
-
test("layout {bottom, right, centerX, centerY, height, width} - bottom/right take presidence", function() {
|
592
|
+
test("layout {bottom, right, centerX, centerY, height, width} - bottom/right take presidence", function () {
|
522
593
|
|
523
594
|
var layout = { bottom: 0.1, right: 0.1, centerX: 0.1, centerY: 0.1, height: 0.6, width: 0.6 };
|
524
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
525
|
-
var with_f = { x: 60, y: 60, width: 120, height: 120 }
|
526
|
-
var s = { width: '60%', height: '60%', bottom: '10%', right: '10%' }
|
595
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
596
|
+
var with_f = { x: 60, y: 60, width: 120, height: 120 };
|
597
|
+
var s = { width: '60%', height: '60%', bottom: '10%', right: '10%' };
|
527
598
|
|
528
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
599
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
529
600
|
|
530
|
-
})
|
601
|
+
});
|
531
602
|
|
532
|
-
test("layout {top, left, bottom, right, centerX, centerY, height, width} - top/left take presidence", function() {
|
603
|
+
test("layout {top, left, bottom, right, centerX, centerY, height, width} - top/left take presidence", function () {
|
533
604
|
|
534
605
|
var layout = { top: 0.1, left: 0.1, bottom: 0.1, right: 0.1, centerX: 0.1, centerY: 0.1, height: 0.6, width: 0.6 };
|
535
|
-
var no_f = { x: 0, y: 0, width: 0, height: 0 }
|
536
|
-
var with_f = { x: 20, y: 20, width: 120, height: 120 }
|
537
|
-
var s = { width: '60%', height: '60%', top: '10%', left: '10%' }
|
606
|
+
var no_f = { x: 0, y: 0, width: 0, height: 0 };
|
607
|
+
var with_f = { x: 20, y: 20, width: 120, height: 120 };
|
608
|
+
var s = { width: '60%', height: '60%', top: '10%', left: '10%' };
|
538
609
|
|
539
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
610
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
540
611
|
|
541
|
-
})
|
612
|
+
});
|
542
613
|
|
543
614
|
|
544
|
-
test("layout {centerX, centerY, width:auto, height:auto}", function() {
|
545
|
-
var error= 'NONE';
|
615
|
+
test("layout {centerX, centerY, width:auto, height:auto}", function () {
|
616
|
+
var error = 'NONE';
|
546
617
|
var layout = { centerX: 0.1, centerY: 0.1, width: 'auto', height: 'auto' };
|
547
618
|
|
548
|
-
|
549
|
-
|
619
|
+
SC.run(function () {
|
620
|
+
child.set('layout', layout);
|
621
|
+
});
|
622
|
+
|
623
|
+
try {
|
550
624
|
child.layoutStyle();
|
551
|
-
}catch(e){
|
552
|
-
error=e;
|
625
|
+
} catch (e) {
|
626
|
+
error = e;
|
553
627
|
}
|
554
628
|
|
555
|
-
equals(SC.T_ERROR, SC.typeOf(error), 'Layout style functions should throw an '+
|
556
|
-
'error if centerx/y and width/height are set at the same time ' + error
|
557
|
-
|
558
|
-
}) ;
|
629
|
+
equals(SC.T_ERROR, SC.typeOf(error), 'Layout style functions should throw an ' +
|
630
|
+
'error if centerx/y and width/height are set at the same time ' + error);
|
631
|
+
});
|
559
632
|
|
560
633
|
|
561
634
|
// ..........................................................
|
@@ -564,72 +637,75 @@
|
|
564
637
|
|
565
638
|
module('BORDER LAYOUT VARIATIONS', commonSetup);
|
566
639
|
|
567
|
-
test("layout {top, left, width, height, border}", function() {
|
640
|
+
test("layout {top, left, width, height, border}", function () {
|
568
641
|
var layout = { top: 10, left: 10, width: 50, height: 50, border: 2 };
|
569
642
|
var s = { top: 10, left: 10, width: 46, height: 46,
|
570
|
-
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 }
|
571
|
-
var no_f = { x: 12, y: 12, width: 46, height: 46 }
|
572
|
-
var with_f = { x: 12, y: 12, width: 46, height: 46 }
|
643
|
+
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 };
|
644
|
+
var no_f = { x: 12, y: 12, width: 46, height: 46 };
|
645
|
+
var with_f = { x: 12, y: 12, width: 46, height: 46 };
|
573
646
|
|
574
|
-
performLayoutTest(layout, no_f, s, with_f, s, YES)
|
575
|
-
})
|
647
|
+
performLayoutTest(layout, no_f, s, with_f, s, YES);
|
648
|
+
});
|
576
649
|
|
577
|
-
test("layout {top, left, bottom, right, border}", function() {
|
650
|
+
test("layout {top, left, bottom, right, border}", function () {
|
578
651
|
var layout = { top: 10, left: 10, bottom: 10, right: 10, border: 2 };
|
579
|
-
var no_f = { x: 12, y: 12, width: 0, height: 0 }
|
580
|
-
var with_f = { x: 12, y: 12, width: 176, height: 176 }
|
652
|
+
var no_f = { x: 12, y: 12, width: 0, height: 0 };
|
653
|
+
var with_f = { x: 12, y: 12, width: 176, height: 176 };
|
581
654
|
var s = { top: 10, left: 10, bottom: 10, right: 10,
|
582
|
-
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 }
|
655
|
+
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 };
|
583
656
|
|
584
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
585
|
-
})
|
657
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
658
|
+
});
|
586
659
|
|
587
|
-
test("layout {top, left, bottom, right, borderTop, borderLeft, borderRight, borderBottom}", function() {
|
660
|
+
test("layout {top, left, bottom, right, borderTop, borderLeft, borderRight, borderBottom}", function () {
|
588
661
|
var layout = { top: 10, left: 10, bottom: 10, right: 10, borderTop: 1, borderRight: 2, borderBottom: 3, borderLeft: 4 };
|
589
|
-
var no_f = { x: 14, y: 11, width: 0, height: 0 }
|
590
|
-
var with_f = { x: 14, y: 11, width: 174, height: 176 }
|
662
|
+
var no_f = { x: 14, y: 11, width: 0, height: 0 };
|
663
|
+
var with_f = { x: 14, y: 11, width: 174, height: 176 };
|
591
664
|
var s = { top: 10, left: 10, bottom: 10, right: 10,
|
592
|
-
borderTopWidth: 1, borderRightWidth: 2, borderBottomWidth: 3, borderLeftWidth: 4 }
|
665
|
+
borderTopWidth: 1, borderRightWidth: 2, borderBottomWidth: 3, borderLeftWidth: 4 };
|
593
666
|
|
594
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
595
|
-
})
|
667
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
668
|
+
});
|
596
669
|
|
597
|
-
test("layout {top, left, bottom, right, border, borderTop, borderLeft}", function() {
|
670
|
+
test("layout {top, left, bottom, right, border, borderTop, borderLeft}", function () {
|
598
671
|
var layout = { top: 10, left: 10, bottom: 10, right: 10, border: 5, borderTop: 1, borderRight: 2 };
|
599
|
-
var no_f = { x: 15, y: 11, width: 0, height: 0 }
|
600
|
-
var with_f = { x: 15, y: 11, width: 173, height: 174 }
|
672
|
+
var no_f = { x: 15, y: 11, width: 0, height: 0 };
|
673
|
+
var with_f = { x: 15, y: 11, width: 173, height: 174 };
|
601
674
|
var s = { top: 10, left: 10, bottom: 10, right: 10,
|
602
|
-
borderTopWidth: 1, borderRightWidth: 2, borderBottomWidth: 5, borderLeftWidth: 5 }
|
675
|
+
borderTopWidth: 1, borderRightWidth: 2, borderBottomWidth: 5, borderLeftWidth: 5 };
|
603
676
|
|
604
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
605
|
-
})
|
677
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
678
|
+
});
|
606
679
|
|
607
|
-
test("layout {bottom, right, width, height, border}", function() {
|
680
|
+
test("layout {bottom, right, width, height, border}", function () {
|
608
681
|
|
609
682
|
var layout = { bottom: 10, right: 10, width: 50, height: 50, border: 2 };
|
610
|
-
var no_f = { x: 2, y: 2, width: 46, height: 46 }
|
611
|
-
var with_f = { x: 142, y: 142, width: 46, height: 46 }
|
683
|
+
var no_f = { x: 2, y: 2, width: 46, height: 46 };
|
684
|
+
var with_f = { x: 142, y: 142, width: 46, height: 46 };
|
612
685
|
var s = { bottom: 10, right: 10, width: 46, height: 46,
|
613
|
-
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 }
|
686
|
+
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 };
|
614
687
|
|
615
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
616
|
-
})
|
688
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
689
|
+
});
|
617
690
|
|
618
|
-
test("layout {centerX, centerY, width, height, border}", function() {
|
691
|
+
test("layout {centerX, centerY, width, height, border}", function () {
|
619
692
|
|
620
693
|
var layout = { centerX: 10, centerY: 10, width: 60, height: 60, border: 2 };
|
621
|
-
var no_f = { x: 12, y: 12, width: 56, height: 56 }
|
622
|
-
var with_f = { x: 82, y: 82, width: 56, height: 56 }
|
623
|
-
var s = { marginLeft: -
|
624
|
-
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 }
|
694
|
+
var no_f = { x: 12, y: 12, width: 56, height: 56 };
|
695
|
+
var with_f = { x: 82, y: 82, width: 56, height: 56 };
|
696
|
+
var s = { marginLeft: -20, marginTop: -20, width: 56, height: 56, top: "50%", left: "50%",
|
697
|
+
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 };
|
625
698
|
|
626
|
-
performLayoutTest(layout, no_f, s, with_f, s, NO)
|
627
|
-
})
|
699
|
+
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
700
|
+
});
|
701
|
+
|
702
|
+
test("layout {top, left, width: auto, height: auto}", function () {
|
703
|
+
// Reset.
|
704
|
+
child.destroy();
|
628
705
|
|
629
|
-
test("layout {top, left, width: auto, height: auto}", function() {
|
630
706
|
child = SC.View.create({
|
631
707
|
useStaticLayout: YES,
|
632
|
-
render: function(context) {
|
708
|
+
render: function (context) {
|
633
709
|
// needed for auto
|
634
710
|
context.push('<div style="padding: 10px"></div>');
|
635
711
|
}
|
@@ -642,13 +718,15 @@
|
|
642
718
|
|
643
719
|
var layout = { top: 0, left: 0, width: 'auto', height: 'auto', border: 2 };
|
644
720
|
var no_f = null;
|
645
|
-
var with_f
|
721
|
+
var with_f; //{ x: 2, y: 2, width: 196, height: 196 };
|
646
722
|
var s = { top: 0, left: 0, width: 'auto', height: 'auto',
|
647
723
|
borderTopWidth: 2, borderRightWidth: 2, borderBottomWidth: 2, borderLeftWidth: 2 };
|
648
724
|
|
649
725
|
performLayoutTest(layout, no_f, s, with_f, s, NO);
|
650
726
|
|
651
727
|
layer.parentNode.removeChild(layer);
|
728
|
+
|
729
|
+
child.destroy();
|
652
730
|
});
|
653
731
|
|
654
732
|
|
@@ -660,37 +738,37 @@
|
|
660
738
|
|
661
739
|
function verifyFrameResize(layout, before, after) {
|
662
740
|
parent.appendChild(child);
|
663
|
-
SC.run(function() { child.set('layout', layout); });
|
741
|
+
SC.run(function () { child.set('layout', layout); });
|
664
742
|
|
665
|
-
same(child.get('frame'), before, "Before: %@ == %@".fmt(SC.inspect(child.get('frame')), SC.inspect(before)))
|
666
|
-
SC.run(function() { parent.adjust('width', 300).adjust('height', 300); });
|
743
|
+
same(child.get('frame'), before, "Before: %@ == %@".fmt(SC.inspect(child.get('frame')), SC.inspect(before)));
|
744
|
+
SC.run(function () { parent.adjust('width', 300).adjust('height', 300); });
|
667
745
|
|
668
746
|
same(child.get('frame'), after, "After: %@ == %@".fmt(SC.inspect(child.get('frame')), SC.inspect(after)));
|
669
747
|
|
670
748
|
}
|
671
749
|
|
672
|
-
test("frame does not change with top/left/w/h", function(){
|
750
|
+
test("frame does not change with top/left/w/h", function () {
|
673
751
|
var layout = { top: 10, left: 10, width: 60, height: 60 };
|
674
752
|
var before = { x: 10, y: 10, width: 60, height: 60 };
|
675
753
|
var after = { x: 10, y: 10, width: 60, height: 60 };
|
676
754
|
verifyFrameResize(layout, before, after);
|
677
755
|
});
|
678
756
|
|
679
|
-
test("frame shifts down with bottom/right/w/h", function(){
|
757
|
+
test("frame shifts down with bottom/right/w/h", function () {
|
680
758
|
var layout = { bottom: 10, right: 10, width: 60, height: 60 };
|
681
759
|
var before = { x: 130, y: 130, width: 60, height: 60 };
|
682
760
|
var after = { x: 230, y: 230, width: 60, height: 60 };
|
683
761
|
verifyFrameResize(layout, before, after);
|
684
762
|
});
|
685
763
|
|
686
|
-
test("frame size shifts with top/left/bottom/right", function(){
|
764
|
+
test("frame size shifts with top/left/bottom/right", function () {
|
687
765
|
var layout = { top: 10, left: 10, bottom: 10, right: 10 };
|
688
766
|
var before = { x: 10, y: 10, width: 180, height: 180 };
|
689
767
|
var after = { x: 10, y: 10, width: 280, height: 280 };
|
690
768
|
verifyFrameResize(layout, before, after);
|
691
769
|
});
|
692
770
|
|
693
|
-
test("frame loc shifts with centerX/centerY", function(){
|
771
|
+
test("frame loc shifts with centerX/centerY", function () {
|
694
772
|
var layout = { centerX: 10, centerY: 10, width: 60, height: 60 };
|
695
773
|
var before = { x: 80, y: 80, width: 60, height: 60 };
|
696
774
|
var after = { x: 130, y: 130, width: 60, height: 60 };
|
@@ -699,28 +777,28 @@
|
|
699
777
|
|
700
778
|
//with percentage
|
701
779
|
|
702
|
-
test("frame does not change with top/left/w/h - percentage", function(){
|
780
|
+
test("frame does not change with top/left/w/h - percentage", function () {
|
703
781
|
var layout = { top: 0.1, left: 0.1, width: 0.6, height: 0.6 };
|
704
782
|
var before = { x: 20, width: 120, y: 20, height: 120 };
|
705
783
|
var after = { x: 30, y: 30, width: 180, height: 180 };
|
706
784
|
verifyFrameResize(layout, before, after);
|
707
785
|
});
|
708
786
|
|
709
|
-
test("frame shifts down with bottom/right/w/h - percentage", function(){
|
787
|
+
test("frame shifts down with bottom/right/w/h - percentage", function () {
|
710
788
|
var layout = { bottom: 0.1, right: 0.1, width: 0.6, height: 0.6 };
|
711
789
|
var before = { x: 60, y: 60, width: 120, height: 120 };
|
712
790
|
var after = { x: 90, y: 90, width: 180, height: 180 };
|
713
791
|
verifyFrameResize(layout, before, after);
|
714
792
|
});
|
715
793
|
|
716
|
-
test("frame size shifts with top/left/bottom/right - percentage", function(){
|
794
|
+
test("frame size shifts with top/left/bottom/right - percentage", function () {
|
717
795
|
var layout = { top: 0.1, left: 0.1, bottom: 0.1, right: 0.1 };
|
718
796
|
var before = { x: 20, y: 20, width: 160, height: 160 };
|
719
797
|
var after = { x: 30, y: 30, width: 240, height: 240 };
|
720
798
|
verifyFrameResize(layout, before, after);
|
721
799
|
});
|
722
800
|
|
723
|
-
test("frame loc shifts with centerX/centerY - percentage", function(){
|
801
|
+
test("frame loc shifts with centerX/centerY - percentage", function () {
|
724
802
|
var layout = { centerX: 0, centerY: 0, width: 0.6, height: 0.6 };
|
725
803
|
var before = { x: 40, y: 40, width: 120, height: 120 };
|
726
804
|
var after = { x: 60, y: 60, width: 180, height: 180 };
|
@@ -732,7 +810,7 @@
|
|
732
810
|
|
733
811
|
module('STATIC LAYOUT VARIATIONS', commonSetup);
|
734
812
|
|
735
|
-
test("no layout", function() {
|
813
|
+
test("no layout", function () {
|
736
814
|
|
737
815
|
var no_f = null,
|
738
816
|
no_s = {},
|
@@ -744,7 +822,7 @@
|
|
744
822
|
performLayoutTest(SC.View.prototype.layout, no_f, no_s, with_f, with_s, NO);
|
745
823
|
});
|
746
824
|
|
747
|
-
test("with layout", function() {
|
825
|
+
test("with layout", function () {
|
748
826
|
|
749
827
|
var layout = { top: 10, left: 10, width: 50, height: 50 },
|
750
828
|
no_f = null,
|
@@ -757,7 +835,7 @@
|
|
757
835
|
performLayoutTest(layout, no_f, no_s, with_f, with_s, YES);
|
758
836
|
});
|
759
837
|
|
760
|
-
// test("frame size shifts with top/left/bottom/right", function(){
|
838
|
+
// test("frame size shifts with top/left/bottom/right", function () {
|
761
839
|
// var error=null;
|
762
840
|
// var layout = { top: 10, left: 10, bottom: 10, right: 10 };
|
763
841
|
// parent.appendChild(child);
|
@@ -766,7 +844,7 @@
|
|
766
844
|
// parent.adjust('width', 'auto').adjust('height', 'auto');
|
767
845
|
// try{
|
768
846
|
// child.get('frame');
|
769
|
-
// }catch(e){
|
847
|
+
// }catch(e) {
|
770
848
|
// error=e;
|
771
849
|
// }
|
772
850
|
// equals(SC.T_ERROR,SC.typeOf(error),'Layout style functions should throw and '+
|
@@ -774,4 +852,124 @@
|
|
774
852
|
//
|
775
853
|
//
|
776
854
|
// });
|
855
|
+
|
856
|
+
var pane, view;
|
857
|
+
module("COMPUTED LAYOUT", {
|
858
|
+
setup: function () {
|
859
|
+
|
860
|
+
SC.run(function () {
|
861
|
+
// create basic view
|
862
|
+
view = SC.View.create({
|
863
|
+
useTopLayout: YES,
|
864
|
+
|
865
|
+
layout: function () {
|
866
|
+
if (this.get('useTopLayout')) {
|
867
|
+
return { top: 10, left: 10, width: 100, height: 100 };
|
868
|
+
} else {
|
869
|
+
return { bottom: 10, right: 10, width: 200, height: 50 };
|
870
|
+
}
|
871
|
+
}.property('useTopLayout').cacheable()
|
872
|
+
});
|
873
|
+
|
874
|
+
pane = SC.Pane.create({
|
875
|
+
layout: { centerX: 0, centerY: 0, width: 400, height: 400 },
|
876
|
+
childViews: [view]
|
877
|
+
}).append();
|
878
|
+
});
|
879
|
+
},
|
880
|
+
|
881
|
+
teardown: function () {
|
882
|
+
pane.destroy();
|
883
|
+
pane = view = null;
|
884
|
+
}
|
885
|
+
});
|
886
|
+
|
887
|
+
/**
|
888
|
+
There was a regression while moving to jQuery 1.8 and removing the seemingly
|
889
|
+
unuseful buffered jQuery code, where updating the style failed to clear the
|
890
|
+
old style from the view's style attribute.
|
891
|
+
*/
|
892
|
+
test("with computed layout", function () {
|
893
|
+
var expectedLayoutStyle,
|
894
|
+
expectedStyleAttr,
|
895
|
+
layoutStyle,
|
896
|
+
styleAttr;
|
897
|
+
|
898
|
+
same(view.get('layout'), { top: 10, left: 10, width: 100, height: 100 }, "Test the value of the computed layout.");
|
899
|
+
layoutStyle = view.get('layoutStyle');
|
900
|
+
expectedLayoutStyle = { top: "10px", left: "10px", width: "100px", height: "100px" };
|
901
|
+
for (var key in layoutStyle) {
|
902
|
+
equals(layoutStyle[key], expectedLayoutStyle[key], "Test the value of %@ in the layout style.".fmt(key));
|
903
|
+
}
|
904
|
+
styleAttr = view.$().attr('style');
|
905
|
+
styleAttr = styleAttr.split(/;\s*/).filter(function (o) { return o; });
|
906
|
+
expectedStyleAttr = ['left: 10px', 'width: 100px', 'top: 10px', 'height: 100px'];
|
907
|
+
for (var i = styleAttr.length - 1; i >= 0; i--) {
|
908
|
+
ok(expectedStyleAttr.indexOf(styleAttr[i]) >= 0, "Test the expected style attribute includes `%@` found in the actual style attribute.".fmt(styleAttr[i]));
|
909
|
+
}
|
910
|
+
|
911
|
+
SC.run(function () {
|
912
|
+
view.set('useTopLayout', NO);
|
913
|
+
});
|
914
|
+
|
915
|
+
same(view.get('layout'), { bottom: 10, right: 10, width: 200, height: 50 }, "Test the value of the computed layout.");
|
916
|
+
layoutStyle = view.get('layoutStyle');
|
917
|
+
expectedLayoutStyle = { bottom: "10px", right: "10px", width: "200px", height: "50px" };
|
918
|
+
for (var key in layoutStyle) {
|
919
|
+
equals(layoutStyle[key], expectedLayoutStyle[key], "Test the value of %@ in the layout style.".fmt(key));
|
920
|
+
}
|
921
|
+
|
922
|
+
styleAttr = view.$().attr('style');
|
923
|
+
styleAttr = styleAttr.split(/;\s*/).filter(function (o) { return o; });
|
924
|
+
expectedStyleAttr = ['bottom: 10px', 'width: 200px', 'right: 10px', 'height: 50px'];
|
925
|
+
for (i = styleAttr.length - 1; i >= 0; i--) {
|
926
|
+
ok(expectedStyleAttr.indexOf(styleAttr[i]) >= 0, "Test the expected style attribute includes `%@` found in the actual style attribute.".fmt(styleAttr[i]));
|
927
|
+
}
|
928
|
+
});
|
929
|
+
|
930
|
+
|
931
|
+
module("OTHER LAYOUT STYLE TESTS", {
|
932
|
+
setup: function () {
|
933
|
+
|
934
|
+
SC.run(function () {
|
935
|
+
// create basic view
|
936
|
+
view = SC.View.create({});
|
937
|
+
|
938
|
+
pane = SC.Pane.create({
|
939
|
+
layout: { centerX: 0, centerY: 0, width: 400, height: 400 },
|
940
|
+
childViews: [view]
|
941
|
+
}).append();
|
942
|
+
});
|
943
|
+
},
|
944
|
+
|
945
|
+
teardown: function () {
|
946
|
+
pane.destroy();
|
947
|
+
pane = view = null;
|
948
|
+
}
|
949
|
+
});
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
/*
|
954
|
+
There was a regression where switching from a centered layout to a non-centered
|
955
|
+
layout failed to remove the margin style.
|
956
|
+
*/
|
957
|
+
test("Switching from centered to non-centered layouts.", function () {
|
958
|
+
var styleAttr;
|
959
|
+
|
960
|
+
SC.run(function () {
|
961
|
+
view.set('layout', { centerX: 10, centerY: 10, width: 60, height: 60 });
|
962
|
+
});
|
963
|
+
|
964
|
+
SC.run(function () {
|
965
|
+
view.set('layout', { left: 10, top: 10, width: 60, height: 60 });
|
966
|
+
});
|
967
|
+
|
968
|
+
styleAttr = view.$().attr('style');
|
969
|
+
styleAttr = styleAttr.split(/;\s*/).filter(function (o) { return o; });
|
970
|
+
var expectedStyleAttr = ['left: 10px', 'top: 10px', 'width: 60px', 'height: 60px'];
|
971
|
+
for (var i = styleAttr.length - 1; i >= 0; i--) {
|
972
|
+
ok(expectedStyleAttr.indexOf(styleAttr[i]) >= 0, "Test the expected style attribute includes `%@` found in the actual style attribute.".fmt(styleAttr[i]));
|
973
|
+
}
|
974
|
+
});
|
777
975
|
})();
|