sproutcore 1.9.2 → 1.10.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +12 -9
- data/bin/sc-build-number +12 -9
- data/bin/sc-docs +12 -15
- data/bin/sc-gen +12 -9
- data/bin/sc-init +12 -9
- data/bin/sc-manifest +12 -9
- data/bin/sc-server +12 -9
- data/bin/sproutcore +12 -9
- data/lib/frameworks/sproutcore/Buildfile +14 -17
- data/lib/frameworks/sproutcore/CHANGELOG.md +214 -3
- data/lib/frameworks/sproutcore/README.md +4 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/Buildfile +13 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps/greenhouse/README → apps/greenhouse/README.md} +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/TODO +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/beautify.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/design.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/file.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/files.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/layout.js +9 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/library.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/page.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property_editor.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/targets.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/view_configs.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core_file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/data_source.js +42 -42
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/app_page.js +45 -45
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/app-selector.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/button.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/dock.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/general.css +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/icons.css +5 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/main-page.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/menu.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/modal.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/picker.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/search.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/text-field.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/dialogs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/images/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/inspectors.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/loading.rhtml +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/main_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/strings.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/fixtures/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/main.js +5 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/mixins/drop_down.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/design.js +4 -4
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/dir.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/file.js +7 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/target.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/view_config.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/resources/test_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/inspector.js +11 -11
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/library.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/main.js +26 -25
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/modals.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/ready.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/designs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/list_item.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/plist_item.js +1 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/theme.js +6 -6
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/anchor.js +43 -43
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/application_list_item.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/event_blocker.js +7 -7
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/label_designer.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/list_item.js +8 -8
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/plist_item.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/simple_button.js +31 -31
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/tear_off_picker.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/web.js +5 -5
- data/lib/frameworks/sproutcore/apps/media_examples/core.js +5 -6
- data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +16 -17
- data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +17 -18
- data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +18 -19
- data/lib/frameworks/sproutcore/apps/showcase/Buildfile +2 -2
- data/lib/frameworks/sproutcore/apps/showcase/README +1 -1
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +27 -7
- data/lib/frameworks/sproutcore/apps/showcase/core.js +6 -4
- data/lib/frameworks/sproutcore/apps/showcase/main.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/patch.diff +529 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +35 -16
- data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +195 -10
- data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/theme.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +10 -9
- data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +15 -6
- data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +5 -4
- data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +5 -5
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +15 -15
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/styles.css +3 -0
- data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +11 -11
- data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +6 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +28 -33
- data/lib/frameworks/sproutcore/apps/tests/controllers/{detail.js → test.js} +14 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +11 -15
- data/lib/frameworks/sproutcore/apps/tests/core.js +8 -113
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +9 -19
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +81 -92
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +3 -1
- data/lib/frameworks/sproutcore/apps/tests/main.js +8 -13
- data/lib/frameworks/sproutcore/apps/tests/statechart.js +268 -0
- data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +4 -4
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +16 -16
- data/lib/frameworks/sproutcore/apps/welcome/core.js +9 -9
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +22 -25
- data/lib/frameworks/sproutcore/apps/welcome/main.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +21 -7
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +35 -2
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +142 -75
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js +283 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js +284 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +64 -65
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +10 -25
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +12 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +53 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +30 -24
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +44 -40
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +105 -176
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/view_transition_protocol.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +225 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +54 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +86 -71
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +283 -120
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +653 -435
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +49 -42
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +422 -396
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +37 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/platform.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +4 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +18 -30
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +78 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +31 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +47 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +32 -31
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +23 -22
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +17 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +626 -211
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/border_frame_test.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +22 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/childViewLayout_test.js +27 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +10 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +17 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroy.js +60 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +19 -26
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +14 -13
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +341 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +26 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +28 -68
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +35 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +93 -78
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +62 -64
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +69 -18
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +26 -21
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +129 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +436 -238
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +38 -44
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +14 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +29 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceAllChildren_test.js +229 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +33 -95
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +87 -39
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +684 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +767 -625
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +4 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +645 -77
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +218 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +648 -321
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +326 -534
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +120 -126
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +1526 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +18 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +12 -94
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +43 -27
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/icons.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +90 -90
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +74 -48
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +187 -253
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +49 -9
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +236 -127
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/instance_management.js +107 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +42 -17
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +20 -15
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +205 -92
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +61 -25
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +39 -9
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +45 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/tests/system/datetime.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/design.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/controllers.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/design.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/designs.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_design.js +44 -44
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_files.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_rule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style_sheet.js +37 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/label.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/object_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/tab.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/text_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/view_designer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/css/designer.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/design_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/high_light.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/controller.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/page.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/pane.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/view.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/selection_handles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/binding.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/snap_lines.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/coders/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/designers/view_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/designer_drop_target.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/drawing.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/high_light.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/page_item_view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/selection_handles.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +51 -51
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_child.js +63 -52
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_thumb.js +64 -59
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +113 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +182 -203
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +51 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +513 -307
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +69 -217
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +31 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +15 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +2 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +25 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +29 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +19 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +14 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split_divider.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/modal.css +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +24 -98
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +446 -442
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +42 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +26 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +11 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +27 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +11 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +9 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +15 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/{mixins → views/collection}/collection_fast_path.js +18 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +46 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +101 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +26 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +89 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +27 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +32 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +6 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +103 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +76 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +91 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +2 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +70 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +10 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +37 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +18 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +115 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +37 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +194 -182
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +18 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +5 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/children.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/dividers.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +341 -45
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_child.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_thumb.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +6 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +49 -52
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +23 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +47 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +887 -740
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +68 -55
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +8 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +189 -167
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +55 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +145 -146
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +66 -66
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +40 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +203 -200
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +11 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +6 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +87 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +192 -179
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +64 -64
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +56 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +784 -714
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +21 -39
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +45 -41
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +4 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +9 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +40 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +62 -50
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +0 -9
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +46 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/render_delegates/desktop_scroller.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/tests/scroll/ui.js +38 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +26 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/test-image.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +63 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +60 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +72 -72
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +142 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +36 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/swap_transition_protocol.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +54 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +23 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +21 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-256.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-32.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-512.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-64.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/app_cache.js +412 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +11 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +33 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +49 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +29 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +8 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/app_cache_test.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +0 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +40 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +143 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +187 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +6 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +51 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_bounce_transition.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_smooth_transition.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_spring_transition.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/bounce_transition.js +211 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/fade_transition.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/pop_transition.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/scale_transition.js +54 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/slide_transition.js +140 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/spring_transition.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_dissolve_transition.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_push_transition.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +483 -95
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +65 -65
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +111 -100
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +30 -222
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +38 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +74 -62
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-1.8.3-patched.js +9485 -0
- data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +18 -17
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +10 -11
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +32 -21
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +72 -53
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +164 -156
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +145 -140
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +393 -370
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1045 -999
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +41 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +10 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +275 -205
- data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +229 -193
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +186 -188
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +138 -65
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +4 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +112 -23
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +71 -18
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +97 -57
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/infinite.js +184 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +63 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +73 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +100 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +449 -422
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +612 -562
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +115 -62
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +145 -64
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/respond_to_event.js +17 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +30 -30
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +34 -34
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/collection.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/view.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/panes/template.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/views/bindable_span.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +15 -21
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +35 -35
- data/lib/frameworks/sproutcore/scripts/run_sc_server_master.sh +34 -0
- data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +606 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +3 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +18 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +34 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +7 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +6 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +7 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +37 -37
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +12 -12
- data/lib/sproutcore/helpers/static_helper.rb +35 -27
- data/sproutcore.gemspec +1 -0
- metadata +529 -451
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +0 -55
- data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +0 -29
- data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +0 -28
- data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +0 -22
- data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +0 -51
- data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +0 -26
- data/lib/frameworks/sproutcore/apps/tests/states/ready.js +0 -56
- data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +0 -48
- data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +0 -44
- data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +0 -31
- data/lib/frameworks/sproutcore/apps/tests/states/start.js +0 -39
- data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +0 -3
- data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +0 -25
- data/lib/frameworks/sproutcore/frameworks/animation/README.md +0 -79
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +0 -1208
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +0 -152
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +0 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +0 -203
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +0 -213
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +0 -163
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +0 -97
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +0 -312
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +0 -961
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +0 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +0 -27
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +0 -394
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -8981
- data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +0 -40
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
@@ -4,15 +4,16 @@
|
|
4
4
|
// Portions ©2008-2011 Apple Inc. All rights reserved.
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
|
+
/*global jQuery*/
|
7
8
|
|
8
9
|
sc_require('system/browser');
|
9
10
|
sc_require('system/event');
|
10
11
|
sc_require('system/cursor');
|
11
|
-
sc_require('system/responder')
|
12
|
+
sc_require('system/responder');
|
12
13
|
sc_require('system/theme');
|
13
14
|
|
14
|
-
sc_require('system/string')
|
15
|
-
sc_require('views/view/
|
15
|
+
sc_require('system/string');
|
16
|
+
sc_require('views/view/statechart');
|
16
17
|
|
17
18
|
|
18
19
|
/**
|
@@ -42,6 +43,13 @@ SC.EMPTY_CHILD_VIEWS_ARRAY.needsClone = YES;
|
|
42
43
|
SC.CoreView.reopen(
|
43
44
|
/** @scope SC.View.prototype */ {
|
44
45
|
|
46
|
+
/**
|
47
|
+
An array of the properties of this class that will be concatenated when
|
48
|
+
also present on subclasses.
|
49
|
+
|
50
|
+
@type Array
|
51
|
+
@default ['outlets', 'displayProperties', 'classNames', 'renderMixin', 'didCreateLayerMixin', 'willDestroyLayerMixin', 'classNameBindings', 'attributeBindings']
|
52
|
+
*/
|
45
53
|
concatenatedProperties: ['outlets', 'displayProperties', 'classNames', 'renderMixin', 'didCreateLayerMixin', 'willDestroyLayerMixin', 'classNameBindings', 'attributeBindings'],
|
46
54
|
|
47
55
|
/**
|
@@ -53,68 +61,96 @@ SC.CoreView.reopen(
|
|
53
61
|
The full list of valid WAI-ARIA roles is available at:
|
54
62
|
http://www.w3.org/TR/wai-aria/roles#roles_categorization
|
55
63
|
|
56
|
-
@
|
64
|
+
@type String
|
65
|
+
@default null
|
57
66
|
*/
|
58
|
-
|
59
67
|
ariaRole: null,
|
60
68
|
|
61
69
|
/**
|
62
|
-
The
|
63
|
-
|
70
|
+
The aria-hidden role is managed appropriately by the internal view's
|
71
|
+
statechart. When the view is not currently displayed the aria-hidden
|
72
|
+
attribute will be set to true.
|
64
73
|
|
65
|
-
@
|
74
|
+
@type String
|
75
|
+
@default null
|
76
|
+
@deprecated Version 1.10
|
66
77
|
*/
|
67
|
-
|
68
78
|
ariaHidden: null,
|
69
79
|
|
80
|
+
/**
|
81
|
+
Whether this view was created by its parent view or not.
|
82
|
+
|
83
|
+
Several views are given child view classes or instances to automatically
|
84
|
+
append and remove. In the case that the view was provided an instance,
|
85
|
+
when it removes the instance and no longer needs it, it should not destroy
|
86
|
+
the instance because it was created by someone else.
|
87
|
+
|
88
|
+
On the other hand if the view was given a class that it creates internal
|
89
|
+
instances from, then it should destroy those instances properly to avoid
|
90
|
+
memory leaks.
|
91
|
+
|
92
|
+
This property should be set by any view that is creating internal child
|
93
|
+
views so that it can properly remove them later. Note that if you use
|
94
|
+
`createChildView`, this property is set automatically for you.
|
95
|
+
|
96
|
+
@type Boolean
|
97
|
+
@see SC.View#createChildView
|
98
|
+
@default false
|
99
|
+
*/
|
100
|
+
createdByParent: false,
|
101
|
+
|
70
102
|
/**
|
71
103
|
The current pane.
|
72
|
-
|
104
|
+
|
105
|
+
@field
|
106
|
+
@type SC.Pane
|
107
|
+
@default null
|
73
108
|
*/
|
74
|
-
pane: function() {
|
75
|
-
var view = this
|
76
|
-
|
77
|
-
|
109
|
+
pane: function () {
|
110
|
+
var view = this;
|
111
|
+
|
112
|
+
while (view && !view.isPane) { view = view.get('parentView'); }
|
113
|
+
|
114
|
+
return view;
|
78
115
|
}.property('parentView').cacheable(),
|
79
116
|
|
80
117
|
/**
|
81
118
|
The page this view was instantiated from. This is set by the page object
|
82
119
|
during instantiation.
|
83
120
|
|
84
|
-
@
|
121
|
+
@type SC.Page
|
122
|
+
@default null
|
85
123
|
*/
|
86
124
|
page: null,
|
87
125
|
|
88
126
|
/**
|
89
127
|
If the view is currently inserted into the DOM of a parent view, this
|
90
128
|
property will point to the parent of the view.
|
129
|
+
|
130
|
+
@type SC.View
|
131
|
+
@default null
|
91
132
|
*/
|
92
133
|
parentView: null,
|
93
134
|
|
94
135
|
/**
|
95
|
-
The isVisible property determines if the view
|
96
|
-
hierarchy it is a part of. A view can have isVisible == YES and still have
|
97
|
-
isVisibleInWindow == NO. This occurs, for instance, when a parent view has
|
98
|
-
isVisible == NO. Default is YES.
|
136
|
+
The isVisible property determines if the view should be displayed or not.
|
99
137
|
|
100
|
-
|
101
|
-
will
|
138
|
+
If you also set a transitionShow or transitionHide plugin, then when
|
139
|
+
isVisible changes, the appropriate transition will execute as the view's
|
140
|
+
visibility changes.
|
102
141
|
|
103
|
-
|
104
|
-
|
105
|
-
isVisible: YES,
|
106
|
-
isVisibleBindingDefault: SC.Binding.bool(),
|
142
|
+
Note that isVisible can be set to true and the view may still not be
|
143
|
+
"visible" in the window. This can occur if:
|
107
144
|
|
108
|
-
|
109
|
-
|
110
|
-
unless the visibility module is added to SC.View.
|
145
|
+
1. the view is not attached to the document.
|
146
|
+
2. the view has a view ancestor with isVisible set to false.
|
111
147
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
in the window.
|
148
|
+
@type Boolean
|
149
|
+
@see SC.View#viewState
|
150
|
+
@default true
|
116
151
|
*/
|
117
|
-
|
152
|
+
isVisible: true,
|
153
|
+
isVisibleBindingDefault: SC.Binding.bool(),
|
118
154
|
|
119
155
|
// ..........................................................
|
120
156
|
// CHILD VIEW SUPPORT
|
@@ -126,7 +162,8 @@ SC.CoreView.reopen(
|
|
126
162
|
use the accessor methods such as appendChild(), insertBefore() and
|
127
163
|
removeChild().
|
128
164
|
|
129
|
-
@
|
165
|
+
@type Array
|
166
|
+
@default []
|
130
167
|
*/
|
131
168
|
childViews: SC.EMPTY_CHILD_VIEWS_ARRAY,
|
132
169
|
|
@@ -144,11 +181,11 @@ SC.CoreView.reopen(
|
|
144
181
|
|
145
182
|
You can also set the layer by calling set on this property.
|
146
183
|
|
147
|
-
@
|
184
|
+
@type DOMElement the layer
|
148
185
|
*/
|
149
|
-
layer: function(key, value) {
|
186
|
+
layer: function (key, value) {
|
150
187
|
if (value !== undefined) {
|
151
|
-
this._view_layer = value
|
188
|
+
this._view_layer = value;
|
152
189
|
|
153
190
|
// no layer...attempt to discover it...
|
154
191
|
} else {
|
@@ -159,7 +196,7 @@ SC.CoreView.reopen(
|
|
159
196
|
this._view_layer = value = this.findLayerInParentLayer(parent);
|
160
197
|
}
|
161
198
|
}
|
162
|
-
return value
|
199
|
+
return value;
|
163
200
|
}.property('isVisibleInWindow').cacheable(),
|
164
201
|
|
165
202
|
/**
|
@@ -169,11 +206,11 @@ SC.CoreView.reopen(
|
|
169
206
|
@param {String} sel a CoreQuery-compatible selector string
|
170
207
|
@returns {SC.CoreQuery} the CoreQuery object for the DOM node
|
171
208
|
*/
|
172
|
-
$: function(sel) {
|
173
|
-
var layer = this.get('layer')
|
209
|
+
$: function (sel) {
|
210
|
+
var layer = this.get('layer');
|
174
211
|
|
175
|
-
if(!layer) { return SC.$(); }
|
176
|
-
else if(sel === undefined) { return SC.$(layer); }
|
212
|
+
if (!layer) { return SC.$(); }
|
213
|
+
else if (sel === undefined) { return SC.$(layer); }
|
177
214
|
else { return SC.$(sel, layer); }
|
178
215
|
},
|
179
216
|
|
@@ -183,10 +220,10 @@ SC.CoreView.reopen(
|
|
183
220
|
returns the layer itself. You can override this to return a DOM element
|
184
221
|
within the layer.
|
185
222
|
|
186
|
-
@
|
223
|
+
@type DOMElement the container layer
|
187
224
|
*/
|
188
|
-
containerLayer: function() {
|
189
|
-
return this.get('layer')
|
225
|
+
containerLayer: function () {
|
226
|
+
return this.get('layer');
|
190
227
|
}.property('layer').cacheable(),
|
191
228
|
|
192
229
|
/**
|
@@ -194,13 +231,13 @@ SC.CoreView.reopen(
|
|
194
231
|
set the layerId explicitly, then the view's GUID will be used instead.
|
195
232
|
This ID must be set at the time the view is created.
|
196
233
|
|
197
|
-
@
|
234
|
+
@type String
|
198
235
|
@readOnly
|
199
236
|
*/
|
200
|
-
layerId: function(key, value) {
|
237
|
+
layerId: function (key, value) {
|
201
238
|
if (value) { this._layerId = value; }
|
202
239
|
if (this._layerId) { return this._layerId; }
|
203
|
-
return SC.guidFor(this)
|
240
|
+
return SC.guidFor(this);
|
204
241
|
}.property().cacheable(),
|
205
242
|
|
206
243
|
/**
|
@@ -213,7 +250,7 @@ SC.CoreView.reopen(
|
|
213
250
|
@param {DOMElement} parentLayer the parent's DOM layer
|
214
251
|
@returns {DOMElement} the discovered layer
|
215
252
|
*/
|
216
|
-
findLayerInParentLayer: function(parentLayer) {
|
253
|
+
findLayerInParentLayer: function (parentLayer) {
|
217
254
|
var id = "#" + this.get('layerId');
|
218
255
|
return jQuery(id, parentLayer)[0] || jQuery(id)[0];
|
219
256
|
},
|
@@ -224,89 +261,66 @@ SC.CoreView.reopen(
|
|
224
261
|
|
225
262
|
@property {SC.View} view
|
226
263
|
*/
|
227
|
-
isDescendantOf: function(view) {
|
264
|
+
isDescendantOf: function (view) {
|
228
265
|
var parentView = this.get('parentView');
|
229
266
|
|
230
|
-
if(this === view) { return YES; }
|
231
|
-
else if(parentView) { return parentView.isDescendantOf(view); }
|
267
|
+
if (this === view) { return YES; }
|
268
|
+
else if (parentView) { return parentView.isDescendantOf(view); }
|
232
269
|
else { return NO; }
|
233
270
|
},
|
234
271
|
|
235
272
|
/**
|
236
|
-
This method is invoked whenever a display property changes
|
237
|
-
the
|
238
|
-
|
273
|
+
This method is invoked whenever a display property changes and updates
|
274
|
+
the view's content once at the end of the run loop before any invokeLast
|
275
|
+
functions run.
|
276
|
+
|
277
|
+
To cause the view to be updated you can call this method directly and
|
278
|
+
if you need to perform additional setup whenever the display changes, you
|
279
|
+
can override this method as well.
|
239
280
|
|
240
281
|
@returns {SC.View} receiver
|
241
282
|
*/
|
242
|
-
displayDidChange: function() {
|
243
|
-
|
283
|
+
displayDidChange: function () {
|
284
|
+
// Filter the input channel.
|
285
|
+
this.invokeOnce(this._doUpdateContent);
|
286
|
+
|
244
287
|
return this;
|
245
288
|
},
|
246
289
|
|
247
290
|
/**
|
248
|
-
|
291
|
+
This property has no effect and is deprecated.
|
249
292
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
*/
|
254
|
-
_sc_isVisibleDidChange: function() {
|
255
|
-
this.displayDidChange();
|
256
|
-
}.observes('isVisible'),
|
257
|
-
|
258
|
-
/**
|
259
|
-
Setting this property to YES will cause the updateLayerIfNeeded method to
|
260
|
-
be invoked at the end of the runloop. You can also force a view to update
|
261
|
-
sooner by calling updateLayerIfNeeded() directly. The method will update
|
262
|
-
the layer only if this property is YES.
|
293
|
+
To cause a view to update immediately, you should just call updateLayer or
|
294
|
+
updateLayerIfNeeded. To cause a view to update at the end of the run loop
|
295
|
+
before any invokeLast functions run, you should call displayDidChange.
|
263
296
|
|
264
|
-
@
|
297
|
+
@deprecated Version 1.10
|
298
|
+
@type Boolean
|
265
299
|
@test in updateLayer
|
266
300
|
*/
|
267
301
|
layerNeedsUpdate: NO,
|
268
302
|
|
269
|
-
/** @private
|
270
|
-
Schedules the updateLayerIfNeeded method to run at the end of the runloop
|
271
|
-
if layerNeedsUpdate is set to YES.
|
272
|
-
*/
|
273
|
-
_view_layerNeedsUpdateDidChange: function() {
|
274
|
-
if (this.get('layerNeedsUpdate')) {
|
275
|
-
this.invokeOnce(this.updateLayerIfNeeded) ;
|
276
|
-
}
|
277
|
-
}.observes('layerNeedsUpdate'),
|
278
|
-
|
279
303
|
/**
|
280
|
-
Updates the layer
|
281
|
-
|
282
|
-
directly. Instead you set the layerNeedsUpdate property to YES and this
|
283
|
-
method will be called once at the end of the runloop.
|
284
|
-
|
285
|
-
If you need to update view's layer sooner than the end of the runloop, you
|
286
|
-
can call this method directly. If your view is not visible in the window
|
287
|
-
but you want it to update anyway, then call this method, passing YES for
|
288
|
-
the 'skipIsVisibleInWindowCheck' parameter.
|
304
|
+
Updates the view's layer if the view is in a shown state. Otherwise, the
|
305
|
+
view will be updated the next time it enters a shown state.
|
289
306
|
|
290
|
-
|
291
|
-
|
307
|
+
This is the same behavior as `displayDidChange` except that calling
|
308
|
+
`updateLayerIfNeeded` will attempt to update each time it is called,
|
309
|
+
while `displayDidChange` will only attempt to update the layer once per run
|
310
|
+
loop.
|
292
311
|
|
293
312
|
@returns {SC.View} receiver
|
294
313
|
@test in updateLayer
|
295
314
|
*/
|
296
|
-
updateLayerIfNeeded: function(skipIsVisibleInWindowCheck) {
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
// only update a layer if it already exists
|
301
|
-
if (this.get('layer')) {
|
302
|
-
this.beginPropertyChanges() ;
|
303
|
-
this.set('layerNeedsUpdate', NO) ;
|
304
|
-
this.updateLayer() ;
|
305
|
-
this.endPropertyChanges() ;
|
306
|
-
}
|
315
|
+
updateLayerIfNeeded: function (skipIsVisibleInWindowCheck) {
|
316
|
+
//@if(debug)
|
317
|
+
if (skipIsVisibleInWindowCheck) {
|
318
|
+
SC.warn("Developer Warning: The `skipIsVisibleInWindowCheck` argument of updateLayerIfNeeded is not supported and will be ignored.");
|
307
319
|
}
|
320
|
+
//@endif
|
321
|
+
this._doUpdateContent(false);
|
308
322
|
|
309
|
-
return this
|
323
|
+
return this;
|
310
324
|
},
|
311
325
|
|
312
326
|
/**
|
@@ -324,55 +338,16 @@ SC.CoreView.reopen(
|
|
324
338
|
do not want your render() method called when updating a layer, then you
|
325
339
|
should override this method instead.
|
326
340
|
|
327
|
-
@param optionalContext provided only for backwards-compatibility.
|
328
|
-
|
329
341
|
@returns {SC.View} receiver
|
330
342
|
*/
|
331
|
-
updateLayer: function(
|
332
|
-
|
333
|
-
|
334
|
-
var context = optionalContext || this.renderContext(this.get('layer')) ;
|
335
|
-
this._renderLayerSettings(context, NO);
|
336
|
-
|
337
|
-
// If the render method takes two parameters, we assume that it is a
|
338
|
-
// legacy implementation that takes context and firstTime. If it has only
|
339
|
-
// one parameter, we assume it is the render delegates style that requires
|
340
|
-
// only context. Note that, for backwards compatibility, the default
|
341
|
-
// SC.View implementation of render uses the old style.
|
342
|
-
hasLegacyRenderMethod = !this.update;
|
343
|
-
// Call render with firstTime set to NO to indicate an update, rather than
|
344
|
-
// full re-render, should be performed.
|
345
|
-
if (hasLegacyRenderMethod) {
|
346
|
-
this.render(context, NO);
|
347
|
-
}
|
348
|
-
else {
|
349
|
-
this.update(context.$());
|
350
|
-
}
|
351
|
-
if (mixins = this.renderMixin) {
|
352
|
-
len = mixins.length;
|
353
|
-
for(idx=0; idx<len; ++idx) { mixins[idx].call(this, context, NO) ; }
|
354
|
-
}
|
355
|
-
|
356
|
-
context.update() ;
|
357
|
-
if (context._innerHTMLReplaced) {
|
358
|
-
var pane = this.get('pane');
|
359
|
-
if(pane && pane.get('isPaneAttached')) {
|
360
|
-
this._notifyDidAppendToDocument();
|
361
|
-
}
|
362
|
-
}
|
343
|
+
updateLayer: function () {
|
344
|
+
this._doUpdateContent(true);
|
363
345
|
|
364
|
-
|
365
|
-
// changed.
|
366
|
-
if (this.useStaticLayout) { this.viewDidResize(); }
|
367
|
-
|
368
|
-
if (this.didUpdateLayer) { this.didUpdateLayer(); } // call to update DOM
|
369
|
-
if(this.designer && this.designer.viewDidUpdateLayer) {
|
370
|
-
this.designer.viewDidUpdateLayer(); //let the designer know
|
371
|
-
}
|
372
|
-
return this ;
|
346
|
+
return this;
|
373
347
|
},
|
374
348
|
|
375
|
-
|
349
|
+
/** @private */
|
350
|
+
parentViewDidResize: function () {
|
376
351
|
if (!this.get('hasLayout')) { this.notifyPropertyChange('frame'); }
|
377
352
|
this.viewDidResize();
|
378
353
|
},
|
@@ -381,7 +356,7 @@ SC.CoreView.reopen(
|
|
381
356
|
Override this in a child class to define behavior that should be invoked
|
382
357
|
when a parent's view was resized.
|
383
358
|
*/
|
384
|
-
viewDidResize: function() {},
|
359
|
+
viewDidResize: function () {},
|
385
360
|
|
386
361
|
/**
|
387
362
|
Creates a new renderContext with the passed tagName or element. You
|
@@ -390,8 +365,8 @@ SC.CoreView.reopen(
|
|
390
365
|
|
391
366
|
@returns {SC.RenderContext}
|
392
367
|
*/
|
393
|
-
renderContext: function(tagNameOrElement) {
|
394
|
-
return SC.RenderContext(tagNameOrElement)
|
368
|
+
renderContext: function (tagNameOrElement) {
|
369
|
+
return SC.RenderContext(tagNameOrElement);
|
395
370
|
},
|
396
371
|
|
397
372
|
/**
|
@@ -406,62 +381,10 @@ SC.CoreView.reopen(
|
|
406
381
|
|
407
382
|
@returns {SC.View} receiver
|
408
383
|
*/
|
409
|
-
createLayer: function() {
|
410
|
-
|
411
|
-
|
412
|
-
var context = this.renderContext(this.get('tagName')) ;
|
413
|
-
|
414
|
-
// now prepare the content like normal.
|
415
|
-
this.renderToContext(context) ;
|
416
|
-
this.set('layer', context.element()) ;
|
384
|
+
createLayer: function () {
|
385
|
+
this._doRender();
|
417
386
|
|
418
|
-
|
419
|
-
this._notifyDidCreateLayer() ;
|
420
|
-
|
421
|
-
return this ;
|
422
|
-
},
|
423
|
-
|
424
|
-
/** @private -
|
425
|
-
Invokes the receivers didCreateLayer() method if it exists and then
|
426
|
-
invokes the same on all child views.
|
427
|
-
*/
|
428
|
-
_notifyDidCreateLayer: function() {
|
429
|
-
this.notifyPropertyChange('layer');
|
430
|
-
|
431
|
-
if (this.get('useStaticLayout')) this.viewDidResize();
|
432
|
-
|
433
|
-
if (this.didCreateLayer) { this.didCreateLayer() ; }
|
434
|
-
|
435
|
-
// and notify others
|
436
|
-
var mixins = this.didCreateLayerMixin, len, idx,
|
437
|
-
childViews = this.get('childViews'),
|
438
|
-
childView;
|
439
|
-
if (mixins) {
|
440
|
-
len = mixins.length ;
|
441
|
-
for (idx=0; idx<len; ++idx) { mixins[idx].call(this) ; }
|
442
|
-
}
|
443
|
-
|
444
|
-
len = childViews.length ;
|
445
|
-
for (idx=0; idx<len; ++idx) {
|
446
|
-
childView = childViews[idx];
|
447
|
-
if (!childView) { continue; }
|
448
|
-
|
449
|
-
// A parent view creating a layer might result in the creation of a
|
450
|
-
// child view's DOM node being created via a render context without
|
451
|
-
// createLayer() being invoked on the child. In such cases, if anyone
|
452
|
-
// had requested 'layer' and it was cached as null, we need to
|
453
|
-
// invalidate it.
|
454
|
-
childView.notifyPropertyChange('layer');
|
455
|
-
|
456
|
-
// A strange case, that a childView's frame won't be correct before
|
457
|
-
// we have a layer, if the childView doesn't have a fixed layout
|
458
|
-
// and we are using static layout
|
459
|
-
if (this.get('useStaticLayout')) {
|
460
|
-
if (!childView.get('isFixedLayout')) { childView.viewDidResize(); }
|
461
|
-
}
|
462
|
-
|
463
|
-
childView._notifyDidCreateLayer() ;
|
464
|
-
}
|
387
|
+
return this;
|
465
388
|
},
|
466
389
|
|
467
390
|
/**
|
@@ -482,65 +405,75 @@ SC.CoreView.reopen(
|
|
482
405
|
|
483
406
|
@returns {SC.View} receiver
|
484
407
|
*/
|
485
|
-
destroyLayer: function() {
|
486
|
-
|
487
|
-
if (
|
408
|
+
destroyLayer: function () {
|
409
|
+
// We allow you to call destroy layer, but you should really detach first.
|
410
|
+
if (this.get('isAttached')) {
|
411
|
+
this._doDetach();
|
412
|
+
}
|
488
413
|
|
489
|
-
|
490
|
-
// layer property to null.
|
491
|
-
this._notifyWillDestroyLayer() ;
|
414
|
+
this._doDestroyLayer();
|
492
415
|
|
493
|
-
|
494
|
-
if (layer.parentNode) { layer.parentNode.removeChild(layer) ; }
|
495
|
-
layer = null ;
|
496
|
-
}
|
497
|
-
return this ;
|
416
|
+
return this;
|
498
417
|
},
|
499
418
|
|
500
419
|
/**
|
501
|
-
Destroys and recreates the current layer.
|
502
|
-
modifying individual child views.
|
420
|
+
Destroys and recreates the current layer. Doing this on a parent view can
|
421
|
+
be more efficient than modifying individual child views independently.
|
503
422
|
|
504
423
|
@returns {SC.View} receiver
|
505
424
|
*/
|
506
|
-
replaceLayer: function() {
|
507
|
-
|
508
|
-
|
509
|
-
|
425
|
+
replaceLayer: function () {
|
426
|
+
var layer, parentNode;
|
427
|
+
|
428
|
+
// If attached, detach and track our parent node so we can re-attach.
|
429
|
+
if (this.get('isAttached')) {
|
430
|
+
layer = this.get('layer');
|
431
|
+
parentNode = layer.parentNode;
|
432
|
+
|
433
|
+
this._doDetach();
|
434
|
+
}
|
435
|
+
|
436
|
+
this.destroyLayer().createLayer();
|
437
|
+
|
438
|
+
// Reattach our layer (if we have a parentView this is done automatically).
|
439
|
+
if (parentNode && !this.get('isAttached')) { this._doAttach(parentNode); }
|
440
|
+
|
441
|
+
return this;
|
510
442
|
},
|
511
443
|
|
512
444
|
/**
|
513
445
|
If the parent view has changed, we need to insert this
|
514
446
|
view's layer into the layer of the new parent view.
|
515
447
|
*/
|
516
|
-
parentViewDidChange: function() {
|
517
|
-
|
518
|
-
|
448
|
+
parentViewDidChange: function () {
|
449
|
+
//@if(debug)
|
450
|
+
SC.warn("Developer Warning: parentViewDidChange has been deprecated. Please use the notification methods willAddChild, didAddChild, willRemoveChild or didRemoveChild on the parent or willAddToParent, didAddToParent, willRemoveFromParent or didRemoveFromParent on the child to perform updates when the parent/child status changes.");
|
451
|
+
//@endif
|
519
452
|
},
|
520
453
|
|
521
454
|
/**
|
522
455
|
Set to YES when the view's layer location is dirty. You can call
|
523
456
|
updateLayerLocationIfNeeded() to clear this flag if it is set.
|
524
457
|
|
525
|
-
@
|
458
|
+
@deprecated Version 1.10
|
459
|
+
@type Boolean
|
526
460
|
*/
|
527
461
|
layerLocationNeedsUpdate: NO,
|
528
462
|
|
529
463
|
/**
|
530
464
|
Calls updateLayerLocation(), but only if the view's layer location
|
531
|
-
currently needs to be updated.
|
532
|
-
the end of a run loop if you have called parentViewDidChange() at some
|
533
|
-
point.
|
465
|
+
currently needs to be updated.
|
534
466
|
|
535
|
-
@
|
467
|
+
@deprecated Version 1.10
|
536
468
|
@returns {SC.View} receiver
|
537
469
|
@test in updateLayerLocation
|
538
470
|
*/
|
539
|
-
updateLayerLocationIfNeeded: function(
|
540
|
-
if
|
541
|
-
|
542
|
-
|
543
|
-
|
471
|
+
updateLayerLocationIfNeeded: function () {
|
472
|
+
//@if(debug)
|
473
|
+
SC.warn("SC.View.prototype.updateLayerLocationIfNeeded is no longer used and has been deprecated. See the SC.View statechart code for more details on attaching and detaching layers.");
|
474
|
+
//@endif
|
475
|
+
|
476
|
+
return this;
|
544
477
|
},
|
545
478
|
|
546
479
|
/**
|
@@ -548,89 +481,17 @@ SC.CoreView.reopen(
|
|
548
481
|
hierarchy. This method will update the underlying DOM-location of the
|
549
482
|
layer so that it reflects the new location.
|
550
483
|
|
484
|
+
@deprecated Version 1.10
|
551
485
|
@returns {SC.View} receiver
|
552
486
|
*/
|
553
|
-
updateLayerLocation: function() {
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
parentView = this.get('parentView'),
|
558
|
-
parentNode = parentView ? parentView.get('containerLayer') : null ;
|
559
|
-
|
560
|
-
// remove node from current parentNode if the node does not match the new
|
561
|
-
// parent node.
|
562
|
-
if (node && node.parentNode && node.parentNode !== parentNode) {
|
563
|
-
node.parentNode.removeChild(node);
|
564
|
-
}
|
565
|
-
|
566
|
-
// CASE 1: no new parentView. just remove from parent (above).
|
567
|
-
if (!parentView) {
|
568
|
-
if (node && node.parentNode) { node.parentNode.removeChild(node); }
|
569
|
-
|
570
|
-
// CASE 2: parentView has no layer, view has layer. destroy layer
|
571
|
-
// CASE 3: parentView has no layer, view has no layer, nothing to do
|
572
|
-
} else if (!parentNode) {
|
573
|
-
if (node) {
|
574
|
-
if (node.parentNode) { node.parentNode.removeChild(node); }
|
575
|
-
this.destroyLayer();
|
576
|
-
}
|
577
|
-
|
578
|
-
// CASE 4: parentView has layer, view has no layer. create layer & add
|
579
|
-
// CASE 5: parentView has layer, view has layer. move layer
|
580
|
-
} else {
|
581
|
-
if (!node) {
|
582
|
-
this.createLayer() ;
|
583
|
-
node = this.get('layer') ;
|
584
|
-
if (!node) { return; } // can't do anything without a node.
|
585
|
-
}
|
586
|
-
|
587
|
-
var siblings = parentView.get('childViews'),
|
588
|
-
nextView = siblings.objectAt(siblings.indexOf(this)+1),
|
589
|
-
nextNode = (nextView) ? nextView.get('layer') : null ;
|
590
|
-
|
591
|
-
// before we add to parent node, make sure that the nextNode exists...
|
592
|
-
if (nextView && (!nextNode || nextNode.parentNode!==parentNode)) {
|
593
|
-
nextView.updateLayerLocationIfNeeded() ;
|
594
|
-
|
595
|
-
// just in case it still couldn't generate the layer, force to null, because
|
596
|
-
// IE doesn't support insertBefore(blah, undefined) in version IE9.
|
597
|
-
nextNode = nextView.get('layer') || null;
|
598
|
-
}
|
599
|
-
|
600
|
-
// add to parentNode if needed.
|
601
|
-
if ((node.parentNode!==parentNode) || (node.nextSibling!==nextNode)) {
|
602
|
-
parentNode.insertBefore(node, nextNode) ;
|
603
|
-
}
|
604
|
-
}
|
605
|
-
|
606
|
-
parentNode = parentView = node = nextNode = null ; // avoid memory leaks
|
607
|
-
|
608
|
-
this.set('layerLocationNeedsUpdate', NO) ;
|
609
|
-
|
610
|
-
return this ;
|
611
|
-
},
|
612
|
-
|
613
|
-
/** @private -
|
614
|
-
Invokes willDestroyLayer() on view and child views. Then sets layer to
|
615
|
-
null for receiver.
|
616
|
-
*/
|
617
|
-
_notifyWillDestroyLayer: function() {
|
618
|
-
if (this.willDestroyLayer) { this.willDestroyLayer() ; }
|
619
|
-
var mixins = this.willDestroyLayerMixin, len, idx,
|
620
|
-
childViews = this.get('childViews') ;
|
621
|
-
if (mixins) {
|
622
|
-
len = mixins.length ;
|
623
|
-
for (idx=0; idx<len; ++idx) { mixins[idx].call(this) ; }
|
624
|
-
}
|
625
|
-
|
626
|
-
len = childViews.length ;
|
627
|
-
for (idx=0; idx<len; ++idx) { childViews[idx]._notifyWillDestroyLayer() ; }
|
487
|
+
updateLayerLocation: function () {
|
488
|
+
//@if(debug)
|
489
|
+
SC.warn("SC.View.prototype.updateLayerLocation is no longer used and has been deprecated. See the SC.View statechart code for more details on attaching and detaching layers.");
|
490
|
+
//@endif
|
628
491
|
|
629
|
-
this
|
492
|
+
return this;
|
630
493
|
},
|
631
494
|
|
632
|
-
|
633
|
-
|
634
495
|
/**
|
635
496
|
@private
|
636
497
|
|
@@ -642,81 +503,53 @@ SC.CoreView.reopen(
|
|
642
503
|
a context.
|
643
504
|
|
644
505
|
@param {SC.RenderContext} context the render context.
|
645
|
-
@param {Boolean} firstTime Provided for compatibility when rendering legacy views only.
|
646
506
|
*/
|
647
|
-
renderToContext: function(context
|
648
|
-
var
|
507
|
+
renderToContext: function (context) {
|
508
|
+
var mixins, idx, len;
|
649
509
|
|
650
|
-
this.beginPropertyChanges()
|
651
|
-
this.set('layerNeedsUpdate', NO) ;
|
510
|
+
this.beginPropertyChanges();
|
652
511
|
|
653
|
-
|
512
|
+
context.id(this.get('layerId'));
|
513
|
+
context.setAttr('role', this.get('ariaRole'));
|
654
514
|
|
655
|
-
|
515
|
+
// Set up the classNameBindings and attributeBindings observers.
|
516
|
+
// TODO: CLEAN UP!!
|
517
|
+
this._applyClassNameBindings();
|
518
|
+
this._applyAttributeBindings(context);
|
656
519
|
|
657
|
-
|
658
|
-
// legacy implementation that takes context and firstTime. If it has only
|
659
|
-
// one parameter, we assume it is the render delegates style that requires
|
660
|
-
// only context. Note that, for backwards compatibility, the default
|
661
|
-
// SC.View implementation of render uses the old style.
|
662
|
-
hasLegacyRenderMethod = !this.update;
|
520
|
+
context.addClass(this.get('classNames'));
|
663
521
|
|
664
|
-
|
665
|
-
|
666
|
-
if (
|
667
|
-
|
668
|
-
|
669
|
-
// This view implements the render delegate protocol.
|
670
|
-
else {
|
671
|
-
if (firstTime) {
|
672
|
-
this.render(context);
|
673
|
-
} else {
|
674
|
-
this.update(context.$());
|
675
|
-
}
|
522
|
+
if (this.get('isTextSelectable')) { context.addClass('allow-select'); }
|
523
|
+
|
524
|
+
if (!this.get('isVisible')) {
|
525
|
+
context.addClass('sc-hidden');
|
526
|
+
context.setAttr('aria-hidden', 'true');
|
676
527
|
}
|
677
528
|
|
529
|
+
// Call applyAttributesToContext so that subclasses that override it can
|
530
|
+
// insert further attributes.
|
531
|
+
this.applyAttributesToContext(context);
|
532
|
+
|
533
|
+
// We pass true for the second argument to support the old style of render.
|
534
|
+
this.render(context, true);
|
535
|
+
|
678
536
|
// If we've made it this far and renderChildViews() was never called,
|
679
537
|
// render any child views now.
|
680
|
-
if (
|
681
|
-
// Reset the flag so that if the layer is recreated we re-render the child views
|
682
|
-
this._didRenderChildViews =
|
683
|
-
|
538
|
+
if (!this._didRenderChildViews) { this.renderChildViews(context); }
|
539
|
+
// Reset the flag so that if the layer is recreated we re-render the child views.
|
540
|
+
this._didRenderChildViews = false;
|
684
541
|
|
685
542
|
if (mixins = this.renderMixin) {
|
686
543
|
len = mixins.length;
|
687
|
-
for(idx=0; idx<len; ++idx) { mixins[idx].call(this, context,
|
544
|
+
for (idx = 0; idx < len; ++idx) { mixins[idx].call(this, context, true); }
|
688
545
|
}
|
689
546
|
|
690
|
-
this.endPropertyChanges()
|
547
|
+
this.endPropertyChanges();
|
691
548
|
},
|
692
549
|
|
693
|
-
|
694
|
-
|
695
|
-
context.resetStyles();
|
550
|
+
/** Apply the attributes to the context. */
|
551
|
+
applyAttributesToContext: function (context) {
|
696
552
|
|
697
|
-
this.applyAttributesToContext(context);
|
698
|
-
},
|
699
|
-
|
700
|
-
applyAttributesToContext: function(context) {
|
701
|
-
if (!this.get('layer')) {
|
702
|
-
this._applyClassNameBindings();
|
703
|
-
this._applyAttributeBindings(context);
|
704
|
-
}
|
705
|
-
|
706
|
-
context.addClass(this.get('classNames'));
|
707
|
-
|
708
|
-
if (this.get('isTextSelectable')) { context.addClass('allow-select'); }
|
709
|
-
if (!this.get('isVisible')) { context.addClass('sc-hidden'); }
|
710
|
-
if (this.get('isFirstResponder')) { context.addClass('focus'); }
|
711
|
-
|
712
|
-
context.id(this.get('layerId'));
|
713
|
-
context.attr('role', this.get('ariaRole'));
|
714
|
-
|
715
|
-
var _ariaHidden = this.get('ariaHidden');
|
716
|
-
if(_ariaHidden!==null){
|
717
|
-
if(_ariaHidden === NO) context.removeAttr('aria-hidden');
|
718
|
-
else context.attr('aria-hidden', _ariaHidden);
|
719
|
-
}
|
720
553
|
},
|
721
554
|
|
722
555
|
/**
|
@@ -727,7 +560,7 @@ SC.CoreView.reopen(
|
|
727
560
|
observer to update the view's element if the bound property ever changes
|
728
561
|
in the future.
|
729
562
|
*/
|
730
|
-
_applyClassNameBindings: function() {
|
563
|
+
_applyClassNameBindings: function () {
|
731
564
|
var classBindings = this.get('classNameBindings'),
|
732
565
|
classNames = this.get('classNames'),
|
733
566
|
dasherizedClass;
|
@@ -737,7 +570,7 @@ SC.CoreView.reopen(
|
|
737
570
|
// Loop through all of the configured bindings. These will be either
|
738
571
|
// property names ('isUrgent') or property paths relative to the view
|
739
572
|
// ('content.isUrgent')
|
740
|
-
classBindings.forEach(function(property) {
|
573
|
+
classBindings.forEach(function (property) {
|
741
574
|
|
742
575
|
// Variable in which the old class value is saved. The observer function
|
743
576
|
// closes over this variable, so it knows which string to remove when
|
@@ -746,7 +579,7 @@ SC.CoreView.reopen(
|
|
746
579
|
|
747
580
|
// Set up an observer on the context. If the property changes, toggle the
|
748
581
|
// class name.
|
749
|
-
var observer = function() {
|
582
|
+
var observer = function () {
|
750
583
|
// Get the current value of the property
|
751
584
|
var newClass = this._classStringForProperty(property);
|
752
585
|
var elem = this.$();
|
@@ -793,16 +626,16 @@ SC.CoreView.reopen(
|
|
793
626
|
|
794
627
|
@param {SC.RenderBuffer} buffer
|
795
628
|
*/
|
796
|
-
_applyAttributeBindings: function(context) {
|
629
|
+
_applyAttributeBindings: function (context) {
|
797
630
|
var attributeBindings = this.get('attributeBindings'),
|
798
631
|
attributeValue, elem, type;
|
799
632
|
|
800
633
|
if (!attributeBindings) { return; }
|
801
634
|
|
802
|
-
attributeBindings.forEach(function(attribute) {
|
635
|
+
attributeBindings.forEach(function (attribute) {
|
803
636
|
// Create an observer to add/remove/change the attribute if the
|
804
637
|
// JavaScript property changes.
|
805
|
-
var observer = function() {
|
638
|
+
var observer = function () {
|
806
639
|
elem = this.$();
|
807
640
|
var currentValue = elem.attr(attribute);
|
808
641
|
attributeValue = this.get(attribute);
|
@@ -826,10 +659,10 @@ SC.CoreView.reopen(
|
|
826
659
|
type = typeof attributeValue;
|
827
660
|
|
828
661
|
if (type === 'string' || type === 'number') {
|
829
|
-
context.
|
662
|
+
context.setAttr(attribute, attributeValue);
|
830
663
|
} else if (attributeValue && type === 'boolean') {
|
831
664
|
// Apply boolean attributes in the form attribute="attribute"
|
832
|
-
context.
|
665
|
+
context.setAttr(attribute, attribute);
|
833
666
|
}
|
834
667
|
}, this);
|
835
668
|
},
|
@@ -843,7 +676,7 @@ SC.CoreView.reopen(
|
|
843
676
|
For example, if the view has property `isUrgent` that evaluates to true,
|
844
677
|
passing `isUrgent` to this method will return `"is-urgent"`.
|
845
678
|
*/
|
846
|
-
_classStringForProperty: function(property) {
|
679
|
+
_classStringForProperty: function (property) {
|
847
680
|
var split = property.split(':'), className = split[1];
|
848
681
|
property = split[0];
|
849
682
|
|
@@ -871,32 +704,6 @@ SC.CoreView.reopen(
|
|
871
704
|
}
|
872
705
|
},
|
873
706
|
|
874
|
-
/**
|
875
|
-
@private
|
876
|
-
|
877
|
-
Invoked by createLayer() and updateLayer() to actually render a context.
|
878
|
-
This method calls the render() method on your view along with any
|
879
|
-
renderMixin() methods supplied by mixins you might have added.
|
880
|
-
|
881
|
-
You should not override this method directly. Nor should you call it. It is OLD.
|
882
|
-
|
883
|
-
@param {SC.RenderContext} context the render context
|
884
|
-
@param {Boolean} firstTime YES if this is creating a layer
|
885
|
-
@returns {void}
|
886
|
-
*/
|
887
|
-
prepareContext: function(context, firstTime) {
|
888
|
-
// eventually, firstTime will be removed because it is ugly.
|
889
|
-
// for now, we will sense whether we are doing things the ugly way or not.
|
890
|
-
// if ugly, we will allow updates through.
|
891
|
-
if (firstTime !== false) { firstTime = YES; } // the GOOD code path :)
|
892
|
-
|
893
|
-
if (firstTime) {
|
894
|
-
this.renderToContext(context);
|
895
|
-
} else {
|
896
|
-
this.updateLayer(context);
|
897
|
-
}
|
898
|
-
},
|
899
|
-
|
900
707
|
/**
|
901
708
|
Your render method should invoke this method to render any child views,
|
902
709
|
especially if this is the first time the view will be rendered. This will
|
@@ -904,20 +711,22 @@ SC.CoreView.reopen(
|
|
904
711
|
way.
|
905
712
|
|
906
713
|
@param {SC.RenderContext} context the context
|
907
|
-
@param {Boolean} firstName true if the layer is being created
|
908
714
|
@returns {SC.RenderContext} the render context
|
909
715
|
@test in render
|
910
716
|
*/
|
911
|
-
renderChildViews: function(context
|
912
|
-
var cv = this.get('childViews'), len = cv.length, idx, view
|
913
|
-
for (idx=0; idx<len; ++idx) {
|
914
|
-
view = cv[idx]
|
717
|
+
renderChildViews: function (context) {
|
718
|
+
var cv = this.get('childViews'), len = cv.length, idx, view;
|
719
|
+
for (idx = 0; idx < len; ++idx) {
|
720
|
+
view = cv[idx];
|
915
721
|
if (!view) { continue; }
|
916
|
-
context = context.begin(view.get('tagName'))
|
917
|
-
view.renderToContext(context
|
918
|
-
context = context.end()
|
722
|
+
context = context.begin(view.get('tagName'));
|
723
|
+
view.renderToContext(context);
|
724
|
+
context = context.end();
|
919
725
|
}
|
920
|
-
|
726
|
+
|
727
|
+
// Track that renderChildViews was called in case it was called directly
|
728
|
+
// in a render method.
|
729
|
+
this._didRenderChildViews = true;
|
921
730
|
|
922
731
|
return context;
|
923
732
|
},
|
@@ -925,35 +734,7 @@ SC.CoreView.reopen(
|
|
925
734
|
/** @private -
|
926
735
|
override to add support for theming or in your view
|
927
736
|
*/
|
928
|
-
render: function() { },
|
929
|
-
|
930
|
-
/** @private -
|
931
|
-
Invokes the receivers didAppendLayerToDocument() method if it exists and
|
932
|
-
then invokes the same on all child views.
|
933
|
-
*/
|
934
|
-
|
935
|
-
_notifyDidAppendToDocument: function() {
|
936
|
-
if (!this.get('hasLayout')) { this.notifyPropertyChange('frame'); }
|
937
|
-
if (this.didAppendToDocument) { this.didAppendToDocument(); }
|
938
|
-
|
939
|
-
var i=0, child, childLen, children = this.get('childViews');
|
940
|
-
for(i=0, childLen=children.length; i<childLen; i++) {
|
941
|
-
child = children[i];
|
942
|
-
if(child._notifyDidAppendToDocument){
|
943
|
-
child._notifyDidAppendToDocument();
|
944
|
-
}
|
945
|
-
}
|
946
|
-
},
|
947
|
-
|
948
|
-
childViewsObserver: function(){
|
949
|
-
var childViews = this.get('childViews'), i, iLen, child;
|
950
|
-
for(i=0, iLen = childViews.length; i<iLen; i++){
|
951
|
-
child = childViews[i];
|
952
|
-
if(child._notifyDidAppendToDocument){
|
953
|
-
child._notifyDidAppendToDocument();
|
954
|
-
}
|
955
|
-
}
|
956
|
-
}.observes('childViews'),
|
737
|
+
render: function () { },
|
957
738
|
|
958
739
|
// ..........................................................
|
959
740
|
// STANDARD RENDER PROPERTIES
|
@@ -978,7 +759,7 @@ SC.CoreView.reopen(
|
|
978
759
|
|
979
760
|
attributeBindings: ['aria-valuenow', 'disabled'],
|
980
761
|
|
981
|
-
'aria-valuenow': function() {
|
762
|
+
'aria-valuenow': function () {
|
982
763
|
return this.get('value');
|
983
764
|
}.property('value').cacheable(), // adds 'aria-valuenow="{value}"' attribute
|
984
765
|
|
@@ -986,7 +767,8 @@ SC.CoreView.reopen(
|
|
986
767
|
|
987
768
|
// ...
|
988
769
|
|
989
|
-
@
|
770
|
+
@type Array
|
771
|
+
@default null
|
990
772
|
*/
|
991
773
|
attributeBindings: null,
|
992
774
|
|
@@ -996,7 +778,8 @@ SC.CoreView.reopen(
|
|
996
778
|
a layer is first created. If you change the tagName for an element, you
|
997
779
|
must destroy and recreate the view layer.
|
998
780
|
|
999
|
-
@
|
781
|
+
@type String
|
782
|
+
@default 'div'
|
1000
783
|
*/
|
1001
784
|
tagName: 'div',
|
1002
785
|
|
@@ -1004,7 +787,8 @@ SC.CoreView.reopen(
|
|
1004
787
|
Standard CSS class names to apply to the view's outer element. These class
|
1005
788
|
names are used in addition to any defined on the view's superclass.
|
1006
789
|
|
1007
|
-
@
|
790
|
+
@type Array
|
791
|
+
@default []
|
1008
792
|
*/
|
1009
793
|
classNames: [],
|
1010
794
|
|
@@ -1030,7 +814,7 @@ SC.CoreView.reopen(
|
|
1030
814
|
Class names mediated by these bindings are used in addition to any that
|
1031
815
|
you've listed in the classNames property.
|
1032
816
|
|
1033
|
-
@
|
817
|
+
@type Array
|
1034
818
|
*/
|
1035
819
|
classNameBindings: null,
|
1036
820
|
|
@@ -1038,7 +822,7 @@ SC.CoreView.reopen(
|
|
1038
822
|
Tool tip property that will be set to the title attribute on the HTML
|
1039
823
|
rendered element.
|
1040
824
|
|
1041
|
-
@
|
825
|
+
@type String
|
1042
826
|
*/
|
1043
827
|
toolTip: null,
|
1044
828
|
|
@@ -1046,12 +830,12 @@ SC.CoreView.reopen(
|
|
1046
830
|
The computed tooltip. This is generated by localizing the toolTip
|
1047
831
|
property if necessary.
|
1048
832
|
|
1049
|
-
@
|
833
|
+
@type String
|
1050
834
|
*/
|
1051
|
-
displayToolTip: function() {
|
835
|
+
displayToolTip: function () {
|
1052
836
|
var ret = this.get('toolTip');
|
1053
837
|
return (ret && this.get('localize')) ? SC.String.loc(ret) : (ret || '');
|
1054
|
-
}.property('toolTip','localize').cacheable(),
|
838
|
+
}.property('toolTip', 'localize').cacheable(),
|
1055
839
|
|
1056
840
|
/**
|
1057
841
|
Determines if the user can select text within the view. Normally this is
|
@@ -1060,7 +844,7 @@ SC.CoreView.reopen(
|
|
1060
844
|
to YES will probably make your controls harder to use and it is not
|
1061
845
|
recommended.
|
1062
846
|
|
1063
|
-
@
|
847
|
+
@type Boolean
|
1064
848
|
@readOnly
|
1065
849
|
*/
|
1066
850
|
isTextSelectable: NO,
|
@@ -1082,16 +866,13 @@ SC.CoreView.reopen(
|
|
1082
866
|
Delegate's API.
|
1083
867
|
|
1084
868
|
Implementation note: 'isVisible' is also effectively a display property,
|
1085
|
-
but it is not declared as such because
|
1086
|
-
|
1087
|
-
'isVisible', which is:
|
1088
|
-
a. More efficient
|
1089
|
-
b. More correct, because we can guarantee the order of operations
|
869
|
+
but it is not declared as such because it is observed separately in
|
870
|
+
order to manage the view's internal state.
|
1090
871
|
|
1091
|
-
@
|
872
|
+
@type Array
|
1092
873
|
@readOnly
|
1093
874
|
*/
|
1094
|
-
displayProperties: [
|
875
|
+
displayProperties: [],
|
1095
876
|
|
1096
877
|
// .......................................................
|
1097
878
|
// SC.RESPONDER SUPPORT
|
@@ -1100,8 +881,8 @@ SC.CoreView.reopen(
|
|
1100
881
|
/** @property
|
1101
882
|
The nextResponder is usually the parentView.
|
1102
883
|
*/
|
1103
|
-
nextResponder: function() {
|
1104
|
-
return this.get('parentView')
|
884
|
+
nextResponder: function () {
|
885
|
+
return this.get('parentView');
|
1105
886
|
}.property('parentView').cacheable(),
|
1106
887
|
|
1107
888
|
|
@@ -1124,29 +905,26 @@ SC.CoreView.reopen(
|
|
1124
905
|
- register the view with the global views hash, which is used for event
|
1125
906
|
dispatch
|
1126
907
|
*/
|
1127
|
-
init: function() {
|
1128
|
-
var
|
1129
|
-
path, root, lp, displayProperties ;
|
908
|
+
init: function () {
|
909
|
+
var childViews;
|
1130
910
|
|
1131
911
|
sc_super();
|
1132
912
|
|
1133
913
|
// Register the view for event handling. This hash is used by
|
1134
914
|
// SC.RootResponder to dispatch incoming events.
|
915
|
+
//@if (debug)
|
916
|
+
if (SC.View.views[this.get('layerId')]) {
|
917
|
+
throw new Error("Developer Error: A view with layerId, '%@', already exists. Each view must have a unique layerId.".fmt(this.get('layerId')));
|
918
|
+
}
|
919
|
+
//@endif
|
1135
920
|
SC.View.views[this.get('layerId')] = this;
|
1136
921
|
|
1137
922
|
// setup classNames
|
1138
923
|
this.classNames = this.get('classNames').slice();
|
1139
924
|
|
1140
925
|
// setup child views. be sure to clone the child views array first
|
1141
|
-
this.childViews = this.get('childViews').slice()
|
1142
|
-
this.createChildViews()
|
1143
|
-
|
1144
|
-
// register display property observers ..
|
1145
|
-
// TODO: Optimize into class setup
|
1146
|
-
displayProperties = this.get('displayProperties') ;
|
1147
|
-
for(var i=0, l=displayProperties.length; i<l; i++) {
|
1148
|
-
this.addObserver(displayProperties[i], this, this.displayDidChange);
|
1149
|
-
}
|
926
|
+
childViews = this.childViews = this.get('childViews').slice();
|
927
|
+
this.createChildViews(); // setup child Views
|
1150
928
|
},
|
1151
929
|
|
1152
930
|
/**
|
@@ -1161,12 +939,12 @@ SC.CoreView.reopen(
|
|
1161
939
|
|
1162
940
|
@returns {void}
|
1163
941
|
*/
|
1164
|
-
awake: function() {
|
942
|
+
awake: function () {
|
1165
943
|
sc_super();
|
1166
|
-
var childViews = this.get('childViews'), len = childViews.length, idx
|
1167
|
-
for (idx=0; idx<len; ++idx) {
|
1168
|
-
if (!childViews[idx]) { continue
|
1169
|
-
childViews[idx].awake()
|
944
|
+
var childViews = this.get('childViews'), len = childViews.length, idx;
|
945
|
+
for (idx = 0; idx < len; ++idx) {
|
946
|
+
if (!childViews[idx]) { continue; }
|
947
|
+
childViews[idx].awake();
|
1170
948
|
}
|
1171
949
|
},
|
1172
950
|
|
@@ -1174,11 +952,11 @@ SC.CoreView.reopen(
|
|
1174
952
|
Frame describes the current bounding rect for your view. This is always
|
1175
953
|
measured from the top-left corner of the parent view.
|
1176
954
|
|
1177
|
-
@
|
955
|
+
@type Rect
|
1178
956
|
@test in layoutStyle
|
1179
957
|
*/
|
1180
|
-
frame: function() {
|
1181
|
-
return this.computeFrameWithParentFrame(null)
|
958
|
+
frame: function () {
|
959
|
+
return this.computeFrameWithParentFrame(null);
|
1182
960
|
}.property('useStaticLayout').cacheable(), // We depend on the layout, but layoutDidChange will call viewDidResize to check the frame for us
|
1183
961
|
|
1184
962
|
/**
|
@@ -1190,7 +968,7 @@ SC.CoreView.reopen(
|
|
1190
968
|
|
1191
969
|
@returns {Rect} the computed frame
|
1192
970
|
*/
|
1193
|
-
computeFrameWithParentFrame: function() {
|
971
|
+
computeFrameWithParentFrame: function () {
|
1194
972
|
var layer, // The view's layer
|
1195
973
|
pv = this.get('parentView'), // The view's parent view (if it exists)
|
1196
974
|
f; // The layer's coordinates in the document
|
@@ -1217,6 +995,33 @@ SC.CoreView.reopen(
|
|
1217
995
|
}
|
1218
996
|
},
|
1219
997
|
|
998
|
+
/** @private Call the method recursively on all child views. */
|
999
|
+
_callOnChildViews: function (methodName, context) {
|
1000
|
+
var childView,
|
1001
|
+
childViews = this.get('childViews'),
|
1002
|
+
method,
|
1003
|
+
shouldContinue;
|
1004
|
+
|
1005
|
+
// Could have support for arguments, but accessing Arguments and using apply is slower than using call, so avoid it.
|
1006
|
+
// args = SC.$A(arguments).slice(1);
|
1007
|
+
for (var i = childViews.length - 1; i >= 0; i--) {
|
1008
|
+
childView = childViews[i];
|
1009
|
+
|
1010
|
+
// We allow missing childViews in the array so ignore them.
|
1011
|
+
if (!childView) { continue; }
|
1012
|
+
|
1013
|
+
// Look up the method on the child.
|
1014
|
+
method = childView[methodName];
|
1015
|
+
// method.apply(childView, args); This is slower.
|
1016
|
+
shouldContinue = method.call(childView, context);
|
1017
|
+
|
1018
|
+
// Recurse.
|
1019
|
+
if (shouldContinue === undefined || shouldContinue) {
|
1020
|
+
childView._callOnChildViews(methodName, context);
|
1021
|
+
}
|
1022
|
+
}
|
1023
|
+
},
|
1024
|
+
|
1220
1025
|
/**
|
1221
1026
|
The clipping frame returns the visible portion of the view, taking into
|
1222
1027
|
account the clippingFrame of the parent view. Keep in mind that
|
@@ -1226,9 +1031,9 @@ SC.CoreView.reopen(
|
|
1226
1031
|
Normally this will be calculated based on the intersection of your own
|
1227
1032
|
clippingFrame and your parentView's clippingFrame.
|
1228
1033
|
|
1229
|
-
@
|
1034
|
+
@type Rect
|
1230
1035
|
*/
|
1231
|
-
clippingFrame: function() {
|
1036
|
+
clippingFrame: function () {
|
1232
1037
|
var f = this.get('frame'),
|
1233
1038
|
ret = f,
|
1234
1039
|
pv, cf;
|
@@ -1250,45 +1055,127 @@ SC.CoreView.reopen(
|
|
1250
1055
|
This method is invoked whenever the clippingFrame changes, notifying
|
1251
1056
|
each child view that its clippingFrame has also changed.
|
1252
1057
|
*/
|
1253
|
-
_sc_view_clippingFrameDidChange: function() {
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1058
|
+
_sc_view_clippingFrameDidChange: function () {
|
1059
|
+
this.notifyPropertyChange('clippingFrame');
|
1060
|
+
},
|
1061
|
+
|
1062
|
+
/**
|
1063
|
+
Removes the child view from the parent view *and* detaches it from the
|
1064
|
+
document.
|
1065
|
+
|
1066
|
+
This does *not* remove the child view's layer (i.e. the node still exists,
|
1067
|
+
but is no longer in the document) and does *not* destroy the child view
|
1068
|
+
(i.e. it can still be re-attached to the document).
|
1069
|
+
|
1070
|
+
Note that if the child view uses a transitionOut plugin, it will not be
|
1071
|
+
fully detached until the transition completes. To force the view to detach
|
1072
|
+
immediately you can pass true for the optional `immediately` argument.
|
1073
|
+
|
1074
|
+
If you wish to remove the child and discard it, use `removeChildAndDestroy`.
|
1075
|
+
|
1076
|
+
@param {SC.View} view The view to remove as a child view.
|
1077
|
+
@param {Boolean} [immediately=false] Forces the child view to be removed immediately regardless if it uses a transitionOut plugin.
|
1078
|
+
@see SC.View#removeChildAndDestroy
|
1079
|
+
@returns {SC.View} receiver
|
1080
|
+
*/
|
1081
|
+
removeChild: function (view, immediately) {
|
1082
|
+
view._doDetach(immediately);
|
1257
1083
|
|
1258
|
-
|
1259
|
-
|
1084
|
+
// If the view will transition out, wait for the transition to complete
|
1085
|
+
// before orphaning the view entirely.
|
1086
|
+
if (!immediately && view.get('viewState') === SC.CoreView.ATTACHED_BUILDING_OUT) {
|
1087
|
+
view.addObserver('isAttached', this, this._orphanChildView);
|
1088
|
+
} else {
|
1089
|
+
view._doOrphan();
|
1260
1090
|
}
|
1091
|
+
|
1092
|
+
return this;
|
1261
1093
|
},
|
1262
1094
|
|
1263
1095
|
/**
|
1264
|
-
Removes the child view from the parent view
|
1096
|
+
Removes the child view from the parent view, detaches it from the document
|
1097
|
+
*and* destroys the view and its layer.
|
1098
|
+
|
1099
|
+
Note that if the child view uses a transitionOut plugin, it will not be
|
1100
|
+
fully detached and destroyed until the transition completes. To force the
|
1101
|
+
view to detach immediately you can pass true for the optional `immediately`
|
1102
|
+
argument.
|
1103
|
+
|
1104
|
+
If you wish to remove the child and keep it for further re-use, use
|
1105
|
+
`removeChild`.
|
1265
1106
|
|
1266
|
-
@param {SC.View} view
|
1107
|
+
@param {SC.View} view The view to remove as a child view and destroy.
|
1108
|
+
@param {Boolean} [immediately=false] Forces the child view to be removed and destroyed immediately regardless if it uses a transitionOut plugin.
|
1109
|
+
@see SC.View#removeChild
|
1267
1110
|
@returns {SC.View} receiver
|
1268
1111
|
*/
|
1269
|
-
|
1270
|
-
|
1271
|
-
view.set('parentView', null) ;
|
1112
|
+
removeChildAndDestroy: function (view, immediately) {
|
1113
|
+
view._doDetach(immediately);
|
1272
1114
|
|
1273
|
-
//
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1115
|
+
// If the view will transition out, wait for the transition to complete
|
1116
|
+
// before destroying the view entirely.
|
1117
|
+
if (view.get('transitionOut') && !immediately) {
|
1118
|
+
view.addObserver('isAttached', this, this._destroyChildView);
|
1119
|
+
} else {
|
1120
|
+
view.destroy(); // Destroys the layer and the view.
|
1121
|
+
}
|
1277
1122
|
|
1278
|
-
return this
|
1123
|
+
return this;
|
1279
1124
|
},
|
1280
1125
|
|
1281
1126
|
/**
|
1282
|
-
Removes all children from the parentView
|
1127
|
+
Removes all children from the parentView *and* destroys them and their
|
1128
|
+
layers.
|
1129
|
+
|
1130
|
+
Note that if any child view uses a transitionOut plugin, it will not be
|
1131
|
+
fully removed until the transition completes. To force all child views to
|
1132
|
+
remove immediately you can pass true as the optional `immediately` argument.
|
1283
1133
|
|
1134
|
+
Tip: If you know that there are no transitions for the child views,
|
1135
|
+
you should pass true to optimize the document removal.
|
1136
|
+
|
1137
|
+
@param {Boolean} [immediately=false] Forces all child views to be removed immediately regardless if any uses a transitionOut plugin.
|
1284
1138
|
@returns {SC.View} receiver
|
1285
1139
|
*/
|
1286
|
-
removeAllChildren: function() {
|
1287
|
-
var childViews = this.get('childViews'),
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1140
|
+
removeAllChildren: function (immediately) {
|
1141
|
+
var childViews = this.get('childViews'),
|
1142
|
+
len = childViews.get('length'),
|
1143
|
+
i;
|
1144
|
+
|
1145
|
+
// OPTIMIZATION!
|
1146
|
+
// If we know that we're removing all children and we are rendered, lets do the document cleanup in one sweep.
|
1147
|
+
// if (immediately && this.get('_isRendered')) {
|
1148
|
+
// var layer,
|
1149
|
+
// parentNode;
|
1150
|
+
|
1151
|
+
// // If attached, detach and track our parent node so we can re-attach.
|
1152
|
+
// if (this.get('isAttached')) {
|
1153
|
+
// layer = this.get('layer');
|
1154
|
+
// parentNode = layer.parentNode;
|
1155
|
+
|
1156
|
+
// this._doDetach();
|
1157
|
+
// }
|
1158
|
+
|
1159
|
+
// // Destroy our layer and thus all the children's layers in one move.
|
1160
|
+
// this.destroyLayer();
|
1161
|
+
|
1162
|
+
// // Remove all the children.
|
1163
|
+
// for (i = len - 1; i >= 0; i--) {
|
1164
|
+
// this.removeChildAndDestroy(childViews.objectAt(i), immediately);
|
1165
|
+
// }
|
1166
|
+
|
1167
|
+
// // Recreate our layer (now empty).
|
1168
|
+
// this.createLayer();
|
1169
|
+
|
1170
|
+
// // Reattach our layer.
|
1171
|
+
// if (parentNode && !this.get('isAttached')) { this._doAttach(parentNode); }
|
1172
|
+
// } else {
|
1173
|
+
for (i = len - 1; i >= 0; i--) {
|
1174
|
+
this.removeChildAndDestroy(childViews.objectAt(i), immediately);
|
1175
|
+
}
|
1176
|
+
// }
|
1177
|
+
|
1178
|
+
return this;
|
1292
1179
|
},
|
1293
1180
|
|
1294
1181
|
/**
|
@@ -1297,51 +1184,90 @@ SC.CoreView.reopen(
|
|
1297
1184
|
|
1298
1185
|
@returns {SC.View} receiver
|
1299
1186
|
*/
|
1300
|
-
removeFromParent: function() {
|
1301
|
-
var parent = this.get('parentView')
|
1302
|
-
if (parent) { parent.removeChild(this)
|
1303
|
-
|
1187
|
+
removeFromParent: function () {
|
1188
|
+
var parent = this.get('parentView');
|
1189
|
+
if (parent) { parent.removeChild(this); }
|
1190
|
+
|
1191
|
+
return this;
|
1192
|
+
},
|
1193
|
+
|
1194
|
+
/** @private Observer for child views that are being discarded after transitioning out. */
|
1195
|
+
_destroyChildView: function (view) {
|
1196
|
+
// Commence destroying of the view once it is detached.
|
1197
|
+
if (!view.get('isAttached')) {
|
1198
|
+
view.removeObserver('isAttached', this, this._destroyChildView);
|
1199
|
+
view.destroy();
|
1200
|
+
}
|
1201
|
+
},
|
1202
|
+
|
1203
|
+
/** @private Observer for child views that are being orphaned after transitioning out. */
|
1204
|
+
_orphanChildView: function (view) {
|
1205
|
+
// Commence orphaning of the view once it is detached.
|
1206
|
+
if (!view.get('isAttached')) {
|
1207
|
+
view.removeObserver('isAttached', this, this._orphanChildView);
|
1208
|
+
view._doOrphan();
|
1209
|
+
}
|
1304
1210
|
},
|
1305
1211
|
|
1306
1212
|
/**
|
1213
|
+
Completely destroys a view instance so that it may be garbage collected.
|
1214
|
+
|
1307
1215
|
You must call this method on a view to destroy the view (and all of its
|
1308
|
-
child views). This will remove the view from any parent
|
1309
|
-
|
1310
|
-
|
1216
|
+
child views). This will remove the view from any parent, detach the
|
1217
|
+
view's layer from the DOM if it is attached and clear the view's layer
|
1218
|
+
if it is rendered.
|
1219
|
+
|
1220
|
+
Once a view is destroyed it can *not* be reused.
|
1221
|
+
|
1222
|
+
@returns {SC.View} receiver
|
1311
1223
|
*/
|
1312
|
-
destroy: function() {
|
1313
|
-
|
1224
|
+
destroy: function () {
|
1225
|
+
// Fast path!
|
1226
|
+
if (this.get('isDestroyed')) { return this; }
|
1314
1227
|
|
1315
|
-
|
1228
|
+
// Do generic destroy. It takes care of mixins and sets isDestroyed to YES.
|
1229
|
+
// Do this first, since it cleans up bindings that may apply to parentView
|
1230
|
+
// (which we will soon null out).
|
1231
|
+
var ret = sc_super();
|
1316
1232
|
|
1317
|
-
//
|
1318
|
-
|
1319
|
-
|
1233
|
+
// If our parent is already destroyed, then we can defer destroying ourself
|
1234
|
+
// and our own child views momentarily.
|
1235
|
+
if (this.getPath('parentView.isDestroyed')) {
|
1236
|
+
// Complete the destroy in a bit.
|
1237
|
+
this.invokeNext(this._destroy);
|
1238
|
+
} else {
|
1239
|
+
// Immediately remove the layer if attached (ignores transitionOut). This
|
1240
|
+
// will detach the layer for all child views as well.
|
1241
|
+
this._doDetach(true);
|
1320
1242
|
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
this.destroyLayer() ;
|
1243
|
+
// Clear the layer if rendered. This will clear all child views layer
|
1244
|
+
// references as well.
|
1245
|
+
this._doDestroyLayer();
|
1325
1246
|
|
1326
|
-
|
1327
|
-
|
1328
|
-
if (len) {
|
1329
|
-
childViews = childViews.slice() ;
|
1330
|
-
for (idx=0; idx<len; ++idx) { childViews[idx].destroy() ; }
|
1247
|
+
// Complete the destroy.
|
1248
|
+
this._destroy();
|
1331
1249
|
}
|
1332
1250
|
|
1333
|
-
//
|
1334
|
-
delete SC.View.views[this.get('layerId')]
|
1335
|
-
delete this._CQ ;
|
1336
|
-
delete this.page ;
|
1251
|
+
// Remove the view from the global hash.
|
1252
|
+
delete SC.View.views[this.get('layerId')];
|
1337
1253
|
|
1338
|
-
//
|
1339
|
-
|
1254
|
+
// Destroy any children. Loop backwards since childViews will shrink.
|
1255
|
+
var childViews = this.get('childViews');
|
1256
|
+
for (var i = childViews.length - 1; i >= 0; i--) {
|
1257
|
+
childViews[i].destroy();
|
1258
|
+
}
|
1340
1259
|
|
1341
|
-
|
1342
|
-
|
1260
|
+
return ret;
|
1261
|
+
},
|
1343
1262
|
|
1344
|
-
|
1263
|
+
/** @private */
|
1264
|
+
_destroy: function () {
|
1265
|
+
// Orphan the view if adopted.
|
1266
|
+
this._doOrphan();
|
1267
|
+
|
1268
|
+
// TODO: Deprecate owner in this sense.
|
1269
|
+
this.set('owner', null);
|
1270
|
+
delete this.page;
|
1345
1271
|
},
|
1346
1272
|
|
1347
1273
|
/**
|
@@ -1364,40 +1290,49 @@ SC.CoreView.reopen(
|
|
1364
1290
|
|
1365
1291
|
@returns {SC.View} receiver
|
1366
1292
|
*/
|
1367
|
-
createChildViews: function() {
|
1293
|
+
createChildViews: function () {
|
1368
1294
|
var childViews = this.get('childViews'),
|
1369
1295
|
len = childViews.length,
|
1370
|
-
|
1296
|
+
isNoLongerValid = false,
|
1297
|
+
idx, key, view;
|
1371
1298
|
|
1372
|
-
this.beginPropertyChanges()
|
1299
|
+
this.beginPropertyChanges();
|
1373
1300
|
|
1374
1301
|
// swap the array
|
1375
|
-
for (idx=0; idx<len; ++idx) {
|
1376
|
-
|
1302
|
+
for (idx = 0; idx < len; ++idx) {
|
1303
|
+
key = view = childViews[idx];
|
1377
1304
|
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1305
|
+
// is this is a key name, lookup view class
|
1306
|
+
if (typeof key === SC.T_STRING) {
|
1307
|
+
view = this[key];
|
1308
|
+
} else {
|
1309
|
+
key = null;
|
1310
|
+
}
|
1384
1311
|
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
}
|
1312
|
+
if (!view) {
|
1313
|
+
//@if (debug)
|
1314
|
+
SC.warn("Developer Warning: The child view named '%@' was not found in the view, %@. This child view will be ignored.".fmt(key, this));
|
1315
|
+
//@endif
|
1390
1316
|
|
1391
|
-
//
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1317
|
+
// skip this one.
|
1318
|
+
isNoLongerValid = true;
|
1319
|
+
childViews[idx] = null;
|
1320
|
+
continue;
|
1395
1321
|
}
|
1322
|
+
|
1323
|
+
// createChildView creates the view if necessary, but also sets
|
1324
|
+
// important properties, such as parentView
|
1325
|
+
view = this.createChildView(view);
|
1326
|
+
if (key) { this[key] = view; } // save on key name if passed
|
1327
|
+
|
1396
1328
|
childViews[idx] = view;
|
1397
1329
|
}
|
1398
1330
|
|
1399
|
-
|
1400
|
-
|
1331
|
+
// Set childViews to be only the valid array.
|
1332
|
+
if (isNoLongerValid) { this.set('childViews', childViews.compact()); }
|
1333
|
+
|
1334
|
+
this.endPropertyChanges();
|
1335
|
+
return this;
|
1401
1336
|
},
|
1402
1337
|
|
1403
1338
|
/**
|
@@ -1407,35 +1342,43 @@ SC.CoreView.reopen(
|
|
1407
1342
|
automatically configure the correct settings on the new view instance to
|
1408
1343
|
act as a child of the parent.
|
1409
1344
|
|
1410
|
-
|
1411
|
-
|
1345
|
+
If the given view is a class, then createdByParent will be set to true on
|
1346
|
+
the returned instance.
|
1347
|
+
|
1348
|
+
@param {Class} view A view class to create or view instance to prepare.
|
1349
|
+
@param {Object} [attrs={}] attributes to add
|
1412
1350
|
@returns {SC.View} new instance
|
1413
1351
|
@test in createChildViews
|
1414
1352
|
*/
|
1415
|
-
createChildView: function(view, attrs) {
|
1353
|
+
createChildView: function (view, attrs) {
|
1416
1354
|
if (!view.isClass) {
|
1417
1355
|
attrs = view;
|
1418
1356
|
} else {
|
1419
1357
|
// attrs should always exist...
|
1420
|
-
if (!attrs) { attrs = {}
|
1358
|
+
if (!attrs) { attrs = {}; }
|
1421
1359
|
// clone the hash that was given so we do not pollute it if it's being reused
|
1422
1360
|
else { attrs = SC.clone(attrs); }
|
1423
1361
|
}
|
1424
1362
|
|
1425
|
-
attrs.owner = attrs.parentView = this
|
1363
|
+
attrs.owner = attrs.parentView = this;
|
1426
1364
|
|
1427
1365
|
// We need to set isVisibleInWindow before the init method is called on the view
|
1428
1366
|
// The prototype check is a bit hackish and should be revisited - PDW
|
1429
|
-
if (view.isClass && view.prototype.hasVisibility) {
|
1430
|
-
|
1431
|
-
}
|
1367
|
+
// if (view.isClass && view.prototype.hasVisibility) {
|
1368
|
+
// attrs.isVisibleInWindow = this.get('isVisibleInWindow');
|
1369
|
+
// }
|
1432
1370
|
|
1433
|
-
if (!attrs.page) { attrs.page = this.page
|
1371
|
+
if (!attrs.page) { attrs.page = this.page; }
|
1434
1372
|
|
1435
1373
|
// Now add this to the attributes and create.
|
1436
|
-
if (view.isClass) {
|
1374
|
+
if (view.isClass) {
|
1375
|
+
// Track that we created this view.
|
1376
|
+
attrs.createdByParent = true;
|
1377
|
+
|
1378
|
+
view = view.create(attrs);
|
1379
|
+
}
|
1437
1380
|
|
1438
|
-
return view
|
1381
|
+
return view;
|
1439
1382
|
},
|
1440
1383
|
|
1441
1384
|
/** walk like a duck */
|
@@ -1458,7 +1401,7 @@ SC.CoreView.reopen(
|
|
1458
1401
|
@param evt {SC.Event} the selectstart event
|
1459
1402
|
@returns YES if selectable
|
1460
1403
|
*/
|
1461
|
-
selectStart: function(evt) {
|
1404
|
+
selectStart: function (evt) {
|
1462
1405
|
return this.get('isTextSelectable');
|
1463
1406
|
},
|
1464
1407
|
|
@@ -1468,16 +1411,215 @@ SC.CoreView.reopen(
|
|
1468
1411
|
@param evt {SC.Event} the contextmenu event
|
1469
1412
|
@returns YES if the contextmenu will be allowed to show up
|
1470
1413
|
*/
|
1471
|
-
contextMenu: function(evt) {
|
1414
|
+
contextMenu: function (evt) {
|
1472
1415
|
if (this.get('isContextMenuEnabled')) {
|
1473
1416
|
evt.allowDefault();
|
1474
1417
|
return YES;
|
1475
1418
|
}
|
1476
|
-
}
|
1419
|
+
},
|
1420
|
+
|
1421
|
+
// ------------------------------------------------------------------------
|
1422
|
+
// Transitions
|
1423
|
+
//
|
1424
|
+
|
1425
|
+
/**
|
1426
|
+
The transition plugin to use when this view is appended to the DOM.
|
1427
|
+
|
1428
|
+
SC.CoreView uses a pluggable transition architecture where the transition
|
1429
|
+
setup, execution and cleanup can be handled by a specified transition
|
1430
|
+
plugin.
|
1431
|
+
|
1432
|
+
There are a number of pre-built transition plugins available in the
|
1433
|
+
foundation framework:
|
1434
|
+
|
1435
|
+
SC.View.BOUNCE_IN
|
1436
|
+
SC.View.FADE_IN
|
1437
|
+
SC.View.SLIDE_IN
|
1438
|
+
SC.View.SCALE_IN
|
1439
|
+
SC.View.SPRING_IN
|
1440
|
+
|
1441
|
+
You can even provide your own custom transition plugins. Just create a
|
1442
|
+
transition object that conforms to the SC.ViewTransitionProtocol protocol.
|
1443
|
+
|
1444
|
+
@type Object (SC.ViewTransitionProtocol)
|
1445
|
+
@default null
|
1446
|
+
@since Version 1.10
|
1447
|
+
*/
|
1448
|
+
transitionIn: null,
|
1449
|
+
|
1450
|
+
/**
|
1451
|
+
The options for the given transition in plugin.
|
1452
|
+
|
1453
|
+
These options are specific to the current transition plugin used and are
|
1454
|
+
used to modify the transition animation. To determine what options
|
1455
|
+
may be used for a given plugin and to see what the default options are,
|
1456
|
+
see the documentation for the transition plugin being used.
|
1457
|
+
|
1458
|
+
Most transitions will accept a duration and timing option, but may
|
1459
|
+
also use other options. For example, SC.View.SLIDE_IN accepts options
|
1460
|
+
like:
|
1461
|
+
|
1462
|
+
transitionInOptions: {
|
1463
|
+
direction: 'left',
|
1464
|
+
duration: 0.25,
|
1465
|
+
timing: 'ease-in-out'
|
1466
|
+
}
|
1467
|
+
|
1468
|
+
@type Object
|
1469
|
+
@default null
|
1470
|
+
@since Version 1.10
|
1471
|
+
*/
|
1472
|
+
transitionInOptions: null,
|
1473
|
+
|
1474
|
+
/**
|
1475
|
+
The transition plugin to use when this view is removed from the DOM.
|
1476
|
+
|
1477
|
+
SC.View uses a pluggable transition architecture where the transition setup,
|
1478
|
+
execution and cleanup can be handled by a specified transition plugin.
|
1479
|
+
|
1480
|
+
There are a number of pre-built transition plugins available in the
|
1481
|
+
foundation framework:
|
1482
|
+
|
1483
|
+
SC.View.BOUNCE_OUT
|
1484
|
+
SC.View.FADE_OUT
|
1485
|
+
SC.View.SLIDE_OUT
|
1486
|
+
SC.View.SCALE_OUT
|
1487
|
+
SC.View.SPRING_OUT
|
1488
|
+
|
1489
|
+
You can even provide your own custom transition plugins. Just create a
|
1490
|
+
transition object that conforms to the SC.ViewTransitionProtocol protocol.
|
1491
|
+
|
1492
|
+
@type Object (SC.ViewTransitionProtocol)
|
1493
|
+
@default null
|
1494
|
+
@since Version 1.10
|
1495
|
+
*/
|
1496
|
+
transitionOut: null,
|
1497
|
+
|
1498
|
+
/**
|
1499
|
+
The options for the given transition out plugin.
|
1500
|
+
|
1501
|
+
These options are specific to the current transition plugin used and are
|
1502
|
+
used to modify the transition animation. To determine what options
|
1503
|
+
may be used for a given plugin and to see what the default options are,
|
1504
|
+
see the documentation for the transition plugin being used.
|
1505
|
+
|
1506
|
+
Most transitions will accept a duration and timing option, but may
|
1507
|
+
also use other options. For example, SC.View.SLIDE accepts options
|
1508
|
+
like:
|
1509
|
+
|
1510
|
+
transitionOutOptions: {
|
1511
|
+
direction: 'right',
|
1512
|
+
duration: 0.15,
|
1513
|
+
timing: 'ease-in'
|
1514
|
+
}
|
1515
|
+
|
1516
|
+
@type Object
|
1517
|
+
@default null
|
1518
|
+
@since Version 1.10
|
1519
|
+
*/
|
1520
|
+
transitionOutOptions: null,
|
1521
|
+
|
1522
|
+
/**
|
1523
|
+
The transition plugin to use when this view is made shown from being
|
1524
|
+
hidden.
|
1525
|
+
|
1526
|
+
SC.CoreView uses a pluggable transition architecture where the transition setup,
|
1527
|
+
execution and cleanup can be handled by a specified transition plugin.
|
1528
|
+
|
1529
|
+
There are a number of pre-built transition plugins available in the
|
1530
|
+
foundation framework:
|
1531
|
+
|
1532
|
+
SC.View.BOUNCE_IN
|
1533
|
+
SC.View.FADE_IN
|
1534
|
+
SC.View.SLIDE_IN
|
1535
|
+
SC.View.SCALE_IN
|
1536
|
+
SC.View.SPRING_IN
|
1537
|
+
|
1538
|
+
You can even provide your own custom transition plugins. Just create a
|
1539
|
+
transition object that conforms to the SC.ViewTransitionProtocol protocol.
|
1540
|
+
|
1541
|
+
@type Object (SC.ViewTransitionProtocol)
|
1542
|
+
@default null
|
1543
|
+
@since Version 1.10
|
1544
|
+
*/
|
1545
|
+
transitionShow: null,
|
1546
|
+
|
1547
|
+
/**
|
1548
|
+
The options for the given transition show plugin.
|
1549
|
+
|
1550
|
+
These options are specific to the current transition plugin used and are
|
1551
|
+
used to modify the transition animation. To determine what options
|
1552
|
+
may be used for a given plugin and to see what the default options are,
|
1553
|
+
see the documentation for the transition plugin being used.
|
1554
|
+
|
1555
|
+
Most transitions will accept a duration and timing option, but may
|
1556
|
+
also use other options. For example, SC.View.SLIDE accepts options
|
1557
|
+
like:
|
1558
|
+
|
1559
|
+
transitionShowOptions: {
|
1560
|
+
direction: 'left',
|
1561
|
+
duration: 0.25,
|
1562
|
+
timing: 'ease-in-out'
|
1563
|
+
}
|
1564
|
+
|
1565
|
+
@type Object
|
1566
|
+
@default null
|
1567
|
+
@since Version 1.10
|
1568
|
+
*/
|
1569
|
+
transitionShowOptions: null,
|
1570
|
+
|
1571
|
+
/**
|
1572
|
+
The transition plugin to use when this view is hidden after being shown.
|
1573
|
+
|
1574
|
+
SC.View uses a pluggable transition architecture where the transition setup,
|
1575
|
+
execution and cleanup can be handled by a specified transition plugin.
|
1576
|
+
|
1577
|
+
There are a number of pre-built transition plugins available in the
|
1578
|
+
foundation framework:
|
1579
|
+
|
1580
|
+
SC.View.BOUNCE_OUT
|
1581
|
+
SC.View.FADE_OUT
|
1582
|
+
SC.View.SLIDE_OUT
|
1583
|
+
SC.View.SCALE_OUT
|
1584
|
+
SC.View.SPRING_OUT
|
1585
|
+
|
1586
|
+
You can even provide your own custom transition plugins. Just create a
|
1587
|
+
transition object that conforms to the SC.ViewTransitionProtocol protocol.
|
1588
|
+
|
1589
|
+
@type Object (SC.ViewTransitionProtocol)
|
1590
|
+
@default null
|
1591
|
+
@since Version 1.10
|
1592
|
+
*/
|
1593
|
+
transitionHide: null,
|
1594
|
+
|
1595
|
+
/**
|
1596
|
+
The options for the given transition hide plugin.
|
1597
|
+
|
1598
|
+
These options are specific to the current transition plugin used and are
|
1599
|
+
used to modify the transition animation. To determine what options
|
1600
|
+
may be used for a given plugin and to see what the default options are,
|
1601
|
+
see the documentation for the transition plugin being used.
|
1602
|
+
|
1603
|
+
Most transitions will accept a duration and timing option, but may
|
1604
|
+
also use other options. For example, SC.View.SLIDE accepts options
|
1605
|
+
like:
|
1606
|
+
|
1607
|
+
transitionHideOptions: {
|
1608
|
+
direction: 'right',
|
1609
|
+
duration: 0.15,
|
1610
|
+
timing: 'ease-in'
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
@type Object
|
1614
|
+
@default null
|
1615
|
+
@since Version 1.10
|
1616
|
+
*/
|
1617
|
+
transitionHideOptions: null
|
1477
1618
|
|
1478
1619
|
});
|
1479
1620
|
|
1480
|
-
SC.CoreView.mixin(
|
1621
|
+
SC.CoreView.mixin(
|
1622
|
+
/** @scope SC.CoreView */ {
|
1481
1623
|
|
1482
1624
|
/** @private walk like a duck -- used by SC.Page */
|
1483
1625
|
isViewClass: YES,
|
@@ -1491,23 +1633,23 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1491
1633
|
@returns {Class} SC.View subclass to create
|
1492
1634
|
@function
|
1493
1635
|
*/
|
1494
|
-
design: function() {
|
1636
|
+
design: function () {
|
1495
1637
|
if (this.isDesign) {
|
1496
1638
|
// @if (debug)
|
1497
|
-
SC.Logger.warn("
|
1639
|
+
SC.Logger.warn("Developer Warning: .design() was called twice for %@.".fmt(this));
|
1498
1640
|
// @endif
|
1499
1641
|
return this;
|
1500
1642
|
}
|
1501
1643
|
|
1502
1644
|
var ret = this.extend.apply(this, arguments);
|
1503
|
-
ret.isDesign = YES
|
1645
|
+
ret.isDesign = YES;
|
1504
1646
|
if (SC.ViewDesigner) {
|
1505
1647
|
SC.ViewDesigner.didLoadDesign(ret, this, SC.A(arguments));
|
1506
1648
|
}
|
1507
|
-
return ret
|
1649
|
+
return ret;
|
1508
1650
|
},
|
1509
1651
|
|
1510
|
-
extend: function() {
|
1652
|
+
extend: function () {
|
1511
1653
|
var last = arguments[arguments.length - 1];
|
1512
1654
|
|
1513
1655
|
if (last && !SC.none(last.theme)) {
|
@@ -1521,71 +1663,71 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1521
1663
|
/**
|
1522
1664
|
Helper applies the layout to the prototype.
|
1523
1665
|
*/
|
1524
|
-
layout: function(layout) {
|
1525
|
-
this.prototype.layout = layout
|
1526
|
-
return this
|
1666
|
+
layout: function (layout) {
|
1667
|
+
this.prototype.layout = layout;
|
1668
|
+
return this;
|
1527
1669
|
},
|
1528
1670
|
|
1529
1671
|
/**
|
1530
1672
|
Helper applies the classNames to the prototype
|
1531
1673
|
*/
|
1532
|
-
classNames: function(sc) {
|
1674
|
+
classNames: function (sc) {
|
1533
1675
|
sc = (this.prototype.classNames || []).concat(sc);
|
1534
1676
|
this.prototype.classNames = sc;
|
1535
|
-
return this
|
1677
|
+
return this;
|
1536
1678
|
},
|
1537
1679
|
|
1538
1680
|
/**
|
1539
1681
|
Help applies the tagName
|
1540
1682
|
*/
|
1541
|
-
tagName: function(tg) {
|
1683
|
+
tagName: function (tg) {
|
1542
1684
|
this.prototype.tagName = tg;
|
1543
|
-
return this
|
1685
|
+
return this;
|
1544
1686
|
},
|
1545
1687
|
|
1546
1688
|
/**
|
1547
1689
|
Helper adds the childView
|
1548
1690
|
*/
|
1549
|
-
childView: function(cv) {
|
1691
|
+
childView: function (cv) {
|
1550
1692
|
var childViews = this.prototype.childViews || [];
|
1551
1693
|
if (childViews === this.superclass.prototype.childViews) {
|
1552
1694
|
childViews = childViews.slice();
|
1553
1695
|
}
|
1554
|
-
childViews.push(cv)
|
1696
|
+
childViews.push(cv);
|
1555
1697
|
this.prototype.childViews = childViews;
|
1556
|
-
return this
|
1698
|
+
return this;
|
1557
1699
|
},
|
1558
1700
|
|
1559
1701
|
/**
|
1560
1702
|
Helper adds a binding to a design
|
1561
1703
|
*/
|
1562
|
-
bind: function(keyName, path) {
|
1704
|
+
bind: function (keyName, path) {
|
1563
1705
|
var p = this.prototype, s = this.superclass.prototype;
|
1564
|
-
var bindings = p._bindings
|
1706
|
+
var bindings = p._bindings;
|
1565
1707
|
if (!bindings || bindings === s._bindings) {
|
1566
|
-
bindings = p._bindings = (bindings || []).slice()
|
1708
|
+
bindings = p._bindings = (bindings || []).slice();
|
1567
1709
|
}
|
1568
1710
|
|
1569
1711
|
keyName = keyName + "Binding";
|
1570
|
-
p[keyName] = path
|
1712
|
+
p[keyName] = path;
|
1571
1713
|
bindings.push(keyName);
|
1572
1714
|
|
1573
|
-
return this
|
1715
|
+
return this;
|
1574
1716
|
},
|
1575
1717
|
|
1576
1718
|
/**
|
1577
1719
|
Helper sets a generic property on a design.
|
1578
1720
|
*/
|
1579
|
-
prop: function(keyName, value) {
|
1721
|
+
prop: function (keyName, value) {
|
1580
1722
|
this.prototype[keyName] = value;
|
1581
|
-
return this
|
1723
|
+
return this;
|
1582
1724
|
},
|
1583
1725
|
|
1584
1726
|
/**
|
1585
1727
|
Used to construct a localization for a view. The default implementation
|
1586
1728
|
will simply return the passed attributes.
|
1587
1729
|
*/
|
1588
|
-
localization: function(attrs, rootElement) {
|
1730
|
+
localization: function (attrs, rootElement) {
|
1589
1731
|
// add rootElement
|
1590
1732
|
if (rootElement) attrs.rootElement = SC.$(rootElement)[0];
|
1591
1733
|
return attrs;
|
@@ -1601,21 +1743,21 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1601
1743
|
@param {Hash} attrs
|
1602
1744
|
@returns {SC.View} instance
|
1603
1745
|
*/
|
1604
|
-
viewFor: function(element, attrs) {
|
1746
|
+
viewFor: function (element, attrs) {
|
1605
1747
|
var args = SC.$A(arguments); // prepare to edit
|
1606
1748
|
if (SC.none(element)) {
|
1607
1749
|
args.shift(); // remove if no element passed
|
1608
|
-
} else args[0] = { rootElement: SC.$(element)[0] }
|
1609
|
-
var ret = this.create.apply(this, arguments)
|
1750
|
+
} else args[0] = { rootElement: SC.$(element)[0] };
|
1751
|
+
var ret = this.create.apply(this, arguments);
|
1610
1752
|
args = args[0] = null;
|
1611
|
-
return ret
|
1753
|
+
return ret;
|
1612
1754
|
},
|
1613
1755
|
|
1614
1756
|
/**
|
1615
1757
|
Create a new view with the passed attributes hash. If you have the
|
1616
1758
|
Designer module loaded, this will also create a peer designer if needed.
|
1617
1759
|
*/
|
1618
|
-
create: function() {
|
1760
|
+
create: function () {
|
1619
1761
|
var last = arguments[arguments.length - 1];
|
1620
1762
|
|
1621
1763
|
if (last && last.theme) {
|
@@ -1623,11 +1765,11 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1623
1765
|
delete last.theme;
|
1624
1766
|
}
|
1625
1767
|
|
1626
|
-
var C=this, ret = new C(arguments);
|
1768
|
+
var C = this, ret = new C(arguments);
|
1627
1769
|
if (SC.ViewDesigner) {
|
1628
1770
|
SC.ViewDesigner.didCreateView(ret, SC.$A(arguments));
|
1629
1771
|
}
|
1630
|
-
return ret
|
1772
|
+
return ret;
|
1631
1773
|
},
|
1632
1774
|
|
1633
1775
|
/**
|
@@ -1641,11 +1783,11 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1641
1783
|
@param rootElement {String} optional rootElement with prepped HTML
|
1642
1784
|
@returns {SC.View} receiver
|
1643
1785
|
*/
|
1644
|
-
loc: function(loc) {
|
1786
|
+
loc: function (loc) {
|
1645
1787
|
var childLocs = loc.childViews;
|
1646
1788
|
delete loc.childViews; // clear out child views before applying to attrs
|
1647
1789
|
|
1648
|
-
this.applyLocalizedAttributes(loc)
|
1790
|
+
this.applyLocalizedAttributes(loc);
|
1649
1791
|
if (SC.ViewDesigner) {
|
1650
1792
|
SC.ViewDesigner.didLoadLocalization(this, SC.$A(arguments));
|
1651
1793
|
}
|
@@ -1653,7 +1795,7 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1653
1795
|
// apply localization recursively to childViews
|
1654
1796
|
var childViews = this.prototype.childViews, idx = childViews.length,
|
1655
1797
|
viewClass;
|
1656
|
-
while(--idx>=0) {
|
1798
|
+
while (--idx >= 0) {
|
1657
1799
|
viewClass = childViews[idx];
|
1658
1800
|
loc = childLocs[idx];
|
1659
1801
|
if (loc && viewClass && typeof viewClass === SC.T_STRING) SC.String.loc(viewClass, loc);
|
@@ -1666,13 +1808,13 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1666
1808
|
Internal method actually updates the localized attributes on the view
|
1667
1809
|
class. This is overloaded in design mode to also save the attributes.
|
1668
1810
|
*/
|
1669
|
-
applyLocalizedAttributes: function(loc) {
|
1670
|
-
SC.mixin(this.prototype, loc)
|
1811
|
+
applyLocalizedAttributes: function (loc) {
|
1812
|
+
SC.mixin(this.prototype, loc);
|
1671
1813
|
},
|
1672
1814
|
|
1673
1815
|
views: {}
|
1674
1816
|
|
1675
|
-
})
|
1817
|
+
});
|
1676
1818
|
|
1677
1819
|
// .......................................................
|
1678
1820
|
// OUTLET BUILDER
|
@@ -1684,24 +1826,24 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
|
|
1684
1826
|
define an outlet that points to another view or object. The root object
|
1685
1827
|
used for the path will be the receiver.
|
1686
1828
|
*/
|
1687
|
-
SC.outlet = function(path, root) {
|
1688
|
-
return function(key) {
|
1689
|
-
return (this[key] = SC.objectForPropertyPath(path, (root !== undefined) ? root : this))
|
1829
|
+
SC.outlet = function (path, root) {
|
1830
|
+
return function (key) {
|
1831
|
+
return (this[key] = SC.objectForPropertyPath(path, (root !== undefined) ? root : this));
|
1690
1832
|
}.property();
|
1691
1833
|
};
|
1692
1834
|
|
1693
1835
|
/** @private on unload clear cached divs. */
|
1694
|
-
SC.CoreView.unload = function() {
|
1836
|
+
SC.CoreView.unload = function () {
|
1695
1837
|
// delete view items this way to ensure the views are cleared. The hash
|
1696
1838
|
// itself may be owned by multiple view subclasses.
|
1697
1839
|
var views = SC.View.views;
|
1698
1840
|
if (views) {
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1841
|
+
for (var key in views) {
|
1842
|
+
if (!views.hasOwnProperty(key)) continue;
|
1843
|
+
delete views[key];
|
1844
|
+
}
|
1703
1845
|
}
|
1704
|
-
}
|
1846
|
+
};
|
1705
1847
|
|
1706
1848
|
/**
|
1707
1849
|
@class
|
@@ -1754,10 +1896,10 @@ SC.CoreView.unload = function() {
|
|
1754
1896
|
SC.View = SC.CoreView.extend(/** @scope SC.View.prototype */{
|
1755
1897
|
classNames: ['sc-view'],
|
1756
1898
|
|
1757
|
-
displayProperties: [
|
1899
|
+
displayProperties: []
|
1758
1900
|
});
|
1759
1901
|
|
1760
1902
|
//unload views for IE, trying to collect memory.
|
1761
|
-
if(SC.browser.isIE) SC.Event.add(window, 'unload', SC.View, SC.View.unload)
|
1903
|
+
if (SC.browser.isIE) SC.Event.add(window, 'unload', SC.View, SC.View.unload);
|
1762
1904
|
|
1763
1905
|
|