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
@@ -16,7 +16,7 @@ sc_require('models/record');
|
|
16
16
|
your application can work with.
|
17
17
|
|
18
18
|
Normally you do not create `RecordArray`s yourself. Instead, a
|
19
|
-
`RecordArray` is returned when you call `SC.Store.
|
19
|
+
`RecordArray` is returned when you call `SC.Store.find()`, already
|
20
20
|
properly configured. You can usually just work with the `RecordArray`
|
21
21
|
instance just like any other array.
|
22
22
|
|
@@ -43,7 +43,7 @@ sc_require('models/record');
|
|
43
43
|
computationally heavy to match a large dataset to a query. To avoid the
|
44
44
|
browser from ever showing a slow script timer in this scenario, the query
|
45
45
|
matching is by default paced at 100ms. If query matching takes longer than
|
46
|
-
100ms, it will chunk the work with
|
46
|
+
100ms, it will chunk the work with invokeNext to avoid too much computation
|
47
47
|
to happen in one runloop.
|
48
48
|
|
49
49
|
|
@@ -212,7 +212,7 @@ SC.RecordArray = SC.Object.extend(SC.Enumerable, SC.Array,
|
|
212
212
|
len = recs ? (recs.get ? recs.get('length') : recs.length) : 0,
|
213
213
|
i, keys;
|
214
214
|
|
215
|
-
if (!storeKeys) throw "Unable to edit an SC.RecordArray that does not have its storeKeys property set.";
|
215
|
+
if (!storeKeys) throw new Error("Unable to edit an SC.RecordArray that does not have its storeKeys property set.");
|
216
216
|
|
217
217
|
if (!this.get('isEditable')) throw SC.RecordArray.NOT_EDITABLE;
|
218
218
|
|
@@ -575,18 +575,13 @@ SC.RecordArray = SC.Object.extend(SC.Enumerable, SC.Array,
|
|
575
575
|
|
576
576
|
// if we reach our threshold of pacing we need to schedule the rest of the
|
577
577
|
// storeKeys to also be updated
|
578
|
-
if(storeKeysToPace.length>0) {
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
self.set('needsFlush', YES);
|
586
|
-
self._scq_changedStoreKeys = SC.IndexSet.create().addEach(storeKeysToPace);
|
587
|
-
self.flush();
|
588
|
-
});
|
589
|
-
}, 1);
|
578
|
+
if (storeKeysToPace.length > 0) {
|
579
|
+
this.invokeNext(function () {
|
580
|
+
if (!this || this.get('isDestroyed')) return;
|
581
|
+
this.set('needsFlush', YES);
|
582
|
+
this._scq_changedStoreKeys = SC.IndexSet.create().addEach(storeKeysToPace);
|
583
|
+
this.flush();
|
584
|
+
});
|
590
585
|
}
|
591
586
|
|
592
587
|
// clear set of changed store keys
|
@@ -757,7 +752,7 @@ SC.RecordArray.mixin(/** @scope SC.RecordArray.prototype */{
|
|
757
752
|
/**
|
758
753
|
Number of milliseconds to allow a query matching to run for. If this number
|
759
754
|
is exceeded, the query matching will be paced so as to not lock up the
|
760
|
-
browser (by essentially splitting the work with
|
755
|
+
browser (by essentially splitting the work with an invokeNext)
|
761
756
|
|
762
757
|
@type Number
|
763
758
|
*/
|
@@ -84,13 +84,13 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
84
84
|
@param {SC.DataSource|String} dataSource the data source
|
85
85
|
@returns {SC.Store} receiver
|
86
86
|
*/
|
87
|
-
from: function(dataSource) {
|
87
|
+
from: function (dataSource) {
|
88
88
|
this.set('dataSource', dataSource);
|
89
89
|
return this ;
|
90
90
|
},
|
91
91
|
|
92
92
|
// lazily convert data source to real object
|
93
|
-
_getDataSource: function() {
|
93
|
+
_getDataSource: function () {
|
94
94
|
var ret = this.get('dataSource');
|
95
95
|
if (typeof ret === SC.T_STRING) {
|
96
96
|
ret = SC.requiredObjectForPropertyPath(ret);
|
@@ -108,7 +108,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
108
108
|
@param {SC.DataSource...} dataSource one or more data source arguments
|
109
109
|
@returns {SC.Store} receiver
|
110
110
|
*/
|
111
|
-
cascade: function(dataSource) {
|
111
|
+
cascade: function (dataSource) {
|
112
112
|
var dataSources = SC.A(arguments) ;
|
113
113
|
dataSource = SC.CascadeDataSource.create({
|
114
114
|
dataSources: dataSources
|
@@ -134,7 +134,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
134
134
|
@param {Class} newStoreClass optional the class of the newly-created nested store (defaults to SC.NestedStore)
|
135
135
|
@returns {SC.NestedStore} new nested store chained to receiver
|
136
136
|
*/
|
137
|
-
chain: function(attrs, newStoreClass) {
|
137
|
+
chain: function (attrs, newStoreClass) {
|
138
138
|
if (!attrs) attrs = {};
|
139
139
|
attrs.parentStore = this;
|
140
140
|
|
@@ -166,7 +166,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
166
166
|
|
167
167
|
@returns {SC.Store} receiver
|
168
168
|
*/
|
169
|
-
willDestroyNestedStore: function(nestedStore) {
|
169
|
+
willDestroyNestedStore: function (nestedStore) {
|
170
170
|
if (this.nestedStores) {
|
171
171
|
this.nestedStores.removeObject(nestedStore);
|
172
172
|
}
|
@@ -180,7 +180,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
180
180
|
@param {SC.Store} store store instance
|
181
181
|
@returns {Boolean} YES if belongs
|
182
182
|
*/
|
183
|
-
hasNestedStore: function(store) {
|
183
|
+
hasNestedStore: function (store) {
|
184
184
|
while(store && (store !== this)) store = store.get('parentStore');
|
185
185
|
return store === this ;
|
186
186
|
},
|
@@ -293,7 +293,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
293
293
|
@param {Number} storeKey the store key
|
294
294
|
@returns {Number} edit status
|
295
295
|
*/
|
296
|
-
storeKeyEditState: function(storeKey) {
|
296
|
+
storeKeyEditState: function (storeKey) {
|
297
297
|
var editables = this.editables, locks = this.locks;
|
298
298
|
return (editables && editables[storeKey]) ? SC.Store.EDITABLE : SC.Store.LOCKED ;
|
299
299
|
},
|
@@ -306,7 +306,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
306
306
|
@param {Number} storeKey key to retrieve
|
307
307
|
@returns {Hash} data hash or null
|
308
308
|
*/
|
309
|
-
readDataHash: function(storeKey) {
|
309
|
+
readDataHash: function (storeKey) {
|
310
310
|
return this.dataHashes[storeKey];
|
311
311
|
},
|
312
312
|
|
@@ -321,7 +321,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
321
321
|
@param {Number} storeKey the store key to retrieve
|
322
322
|
@returns {Hash} the attributes hash
|
323
323
|
*/
|
324
|
-
readEditableDataHash: function(storeKey) {
|
324
|
+
readEditableDataHash: function (storeKey) {
|
325
325
|
// read the value - if there is no hash just return; nothing to do
|
326
326
|
var ret = this.dataHashes[storeKey];
|
327
327
|
if (!ret) return ret ; // nothing to do.
|
@@ -346,7 +346,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
346
346
|
@param {String} propertyName property to read
|
347
347
|
@returns {Object} editable property value
|
348
348
|
*/
|
349
|
-
readEditableProperty: function(storeKey, propertyName) {
|
349
|
+
readEditableProperty: function (storeKey, propertyName) {
|
350
350
|
var hash = this.readEditableDataHash(storeKey),
|
351
351
|
editables = this.editables[storeKey], // get editable info...
|
352
352
|
ret = hash[propertyName];
|
@@ -382,7 +382,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
382
382
|
@param {String} status the new hash status
|
383
383
|
@returns {SC.Store} receiver
|
384
384
|
*/
|
385
|
-
writeDataHash: function(storeKey, hash, status) {
|
385
|
+
writeDataHash: function (storeKey, hash, status) {
|
386
386
|
|
387
387
|
// update dataHashes and optionally status.
|
388
388
|
if (hash) this.dataHashes[storeKey] = hash;
|
@@ -418,7 +418,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
418
418
|
@param {String} status optional new status
|
419
419
|
@returns {SC.Store} receiver
|
420
420
|
*/
|
421
|
-
removeDataHash: function(storeKey, status) {
|
421
|
+
removeDataHash: function (storeKey, status) {
|
422
422
|
// don't use delete -- that will allow parent dataHash to come through
|
423
423
|
this.dataHashes[storeKey] = null;
|
424
424
|
this.statuses[storeKey] = status || SC.Record.EMPTY;
|
@@ -437,7 +437,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
437
437
|
@param {Number} storeKey the store key
|
438
438
|
@returns {Number} status
|
439
439
|
*/
|
440
|
-
readStatus: function(storeKey) {
|
440
|
+
readStatus: function (storeKey) {
|
441
441
|
// use readDataHash to handle optimistic locking. this could be inlined
|
442
442
|
// but for now this minimized copy-and-paste code.
|
443
443
|
this.readDataHash(storeKey);
|
@@ -452,7 +452,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
452
452
|
@param {Number} storeKey the store key
|
453
453
|
@returns {Number} status
|
454
454
|
*/
|
455
|
-
peekStatus: function(storeKey) {
|
455
|
+
peekStatus: function (storeKey) {
|
456
456
|
return this.statuses[storeKey] || SC.Record.EMPTY;
|
457
457
|
},
|
458
458
|
|
@@ -466,7 +466,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
466
466
|
@param {SC.Error} error optional error object
|
467
467
|
@returns {SC.Store} receiver
|
468
468
|
*/
|
469
|
-
writeStatus: function(storeKey, newStatus) {
|
469
|
+
writeStatus: function (storeKey, newStatus) {
|
470
470
|
// use writeDataHash for now to handle optimistic lock. maximize code
|
471
471
|
// reuse.
|
472
472
|
return this.writeDataHash(storeKey, null, newStatus);
|
@@ -484,7 +484,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
484
484
|
@param {String} key that changed (optional)
|
485
485
|
@returns {SC.Store} receiver
|
486
486
|
*/
|
487
|
-
dataHashDidChange: function(storeKeys, rev, statusOnly, key) {
|
487
|
+
dataHashDidChange: function (storeKeys, rev, statusOnly, key) {
|
488
488
|
|
489
489
|
// update the revision for storeKey. Use generateStoreKey() because that
|
490
490
|
// guarantees a universally (to this store hierarchy anyway) unique
|
@@ -506,7 +506,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
506
506
|
this.revisions[storeKey] = rev;
|
507
507
|
this._notifyRecordPropertyChange(storeKey, statusOnly, key);
|
508
508
|
|
509
|
-
this._propagateToChildren(storeKey, function(storeKey){
|
509
|
+
this._propagateToChildren(storeKey, function (storeKey) {
|
510
510
|
that.dataHashDidChange(storeKey, null, statusOnly, key);
|
511
511
|
});
|
512
512
|
}
|
@@ -518,7 +518,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
518
518
|
Will push all changes to a the recordPropertyChanges property
|
519
519
|
and execute `flush()` once at the end of the runloop.
|
520
520
|
*/
|
521
|
-
_notifyRecordPropertyChange: function(storeKey, statusOnly, key) {
|
521
|
+
_notifyRecordPropertyChange: function (storeKey, statusOnly, key) {
|
522
522
|
|
523
523
|
var records = this.records,
|
524
524
|
nestedStores = this.get('nestedStores'),
|
@@ -599,7 +599,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
599
599
|
|
600
600
|
@returns {SC.Store} receiver
|
601
601
|
*/
|
602
|
-
flush: function() {
|
602
|
+
flush: function () {
|
603
603
|
if (!this.recordPropertyChanges) return this;
|
604
604
|
|
605
605
|
var changes = this.recordPropertyChanges,
|
@@ -610,7 +610,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
610
610
|
recordTypes = SC.CoreSet.create(),
|
611
611
|
rec, recordType, statusOnly, idx, len, storeKey, keys;
|
612
612
|
|
613
|
-
storeKeys.forEach(function(storeKey) {
|
613
|
+
storeKeys.forEach(function (storeKey) {
|
614
614
|
if (records.contains(storeKey)) {
|
615
615
|
statusOnly = hasDataChanges.contains(storeKey) ? NO : YES;
|
616
616
|
rec = this.records[storeKey];
|
@@ -649,7 +649,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
649
649
|
|
650
650
|
@returns {SC.Store} receiver
|
651
651
|
*/
|
652
|
-
reset: function() {
|
652
|
+
reset: function () {
|
653
653
|
|
654
654
|
// create a new empty data store
|
655
655
|
this.dataHashes = {} ;
|
@@ -673,6 +673,16 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
673
673
|
}
|
674
674
|
}
|
675
675
|
|
676
|
+
// Also reset all pre-created recordArrays.
|
677
|
+
var ra, raList = this.get('recordArrays');
|
678
|
+
if (raList) {
|
679
|
+
while (ra = raList.pop()) {
|
680
|
+
ra.destroy();
|
681
|
+
}
|
682
|
+
raList.clear();
|
683
|
+
this.set('recordArrays', null);
|
684
|
+
}
|
685
|
+
|
676
686
|
this.set('hasChanges', NO);
|
677
687
|
},
|
678
688
|
|
@@ -692,7 +702,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
692
702
|
@param {Boolean} force
|
693
703
|
@returns {SC.Store} receiver
|
694
704
|
*/
|
695
|
-
commitChangesFromNestedStore: function(nestedStore, changes, force) {
|
705
|
+
commitChangesFromNestedStore: function (nestedStore, changes, force) {
|
696
706
|
// first, check for optimistic locking problems
|
697
707
|
if (!force) this._verifyLockRevisions(changes, nestedStore.locks);
|
698
708
|
|
@@ -756,7 +766,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
756
766
|
@param {SC.Set} locks the locks to verify
|
757
767
|
@returns {SC.Store} receiver
|
758
768
|
*/
|
759
|
-
_verifyLockRevisions: function(changes, locks) {
|
769
|
+
_verifyLockRevisions: function (changes, locks) {
|
760
770
|
var len = changes.length, revs = this.revisions, i, storeKey, lock, rev ;
|
761
771
|
if (locks && revs) {
|
762
772
|
for(i=0;i<len;i++) {
|
@@ -838,7 +848,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
838
848
|
@param {String} id the id to load
|
839
849
|
@returns {SC.Record} record instance or null
|
840
850
|
*/
|
841
|
-
find: function(recordType, id) {
|
851
|
+
find: function (recordType, id) {
|
842
852
|
|
843
853
|
// if recordType is passed as string, find object
|
844
854
|
if (SC.typeOf(recordType)===SC.T_STRING) {
|
@@ -859,29 +869,8 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
859
869
|
}
|
860
870
|
},
|
861
871
|
|
862
|
-
/** @private
|
863
|
-
|
864
|
-
|
865
|
-
This method will accept a record type or query and return a record array
|
866
|
-
matching the results. This method was commonly used prior to SproutCore
|
867
|
-
1.0. It has been deprecated in favor of a single `find()` method instead.
|
868
|
-
|
869
|
-
For compatibility, this method will continue to work in SproutCore 1.0 but
|
870
|
-
it will raise a warning. It will be removed in a future version of
|
871
|
-
SproutCore.
|
872
|
-
*/
|
873
|
-
findAll: function(recordType, conditions, params) {
|
874
|
-
SC.Logger.warn("SC.Store#findAll() will be removed in a future version of SproutCore. Use SC.Store#find() instead");
|
875
|
-
|
876
|
-
if (!recordType || !recordType.isQuery) {
|
877
|
-
recordType = SC.Query.local(recordType, conditions, params);
|
878
|
-
}
|
879
|
-
|
880
|
-
return this._findQuery(recordType, YES, YES);
|
881
|
-
},
|
882
|
-
|
883
|
-
|
884
|
-
_findQuery: function(query, createIfNeeded, refreshIfNew) {
|
872
|
+
/** @private */
|
873
|
+
_findQuery: function (query, createIfNeeded, refreshIfNew) {
|
885
874
|
|
886
875
|
// lookup the local RecordArray for this query.
|
887
876
|
var cache = this._scst_recordArraysByQuery,
|
@@ -906,7 +895,8 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
906
895
|
return ret ;
|
907
896
|
},
|
908
897
|
|
909
|
-
|
898
|
+
/** @private */
|
899
|
+
_findRecord: function (recordType, id) {
|
910
900
|
|
911
901
|
var storeKey ;
|
912
902
|
|
@@ -942,7 +932,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
942
932
|
@param {SC.RecordArray} recordArray the record array
|
943
933
|
@returns {SC.Store} receiver
|
944
934
|
*/
|
945
|
-
recordArrayWillDestroy: function(recordArray) {
|
935
|
+
recordArrayWillDestroy: function (recordArray) {
|
946
936
|
var cache = this._scst_recordArraysByQuery,
|
947
937
|
set = this.get('recordArrays');
|
948
938
|
|
@@ -962,7 +952,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
962
952
|
@param {SC.Query} query the record array query to refresh
|
963
953
|
@returns {SC.Store} receiver
|
964
954
|
*/
|
965
|
-
refreshQuery: function(query) {
|
955
|
+
refreshQuery: function (query) {
|
966
956
|
if (!query) throw new Error("refreshQuery() requires a query");
|
967
957
|
|
968
958
|
var cache = this._scst_recordArraysByQuery,
|
@@ -978,18 +968,18 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
978
968
|
},
|
979
969
|
|
980
970
|
/** @private
|
981
|
-
Will ask all record arrays that have been returned from `
|
971
|
+
Will ask all record arrays that have been returned from `find`
|
982
972
|
with an `SC.Query` to check their arrays with the new `storeKey`s
|
983
973
|
|
984
974
|
@param {SC.IndexSet} storeKeys set of storeKeys that changed
|
985
975
|
@param {SC.Set} recordTypes
|
986
976
|
@returns {SC.Store} receiver
|
987
977
|
*/
|
988
|
-
_notifyRecordArrays: function(storeKeys, recordTypes) {
|
978
|
+
_notifyRecordArrays: function (storeKeys, recordTypes) {
|
989
979
|
var recordArrays = this.get('recordArrays');
|
990
980
|
if (!recordArrays) return this;
|
991
981
|
|
992
|
-
recordArrays.forEach(function(recArray) {
|
982
|
+
recordArrays.forEach(function (recArray) {
|
993
983
|
if (recArray) recArray.storeDidChangeStoreKeys(storeKeys, recordTypes);
|
994
984
|
}, this);
|
995
985
|
|
@@ -1010,7 +1000,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1010
1000
|
@param {SC.Record} recordType the record type
|
1011
1001
|
@returns {SC.Array} array instance - usually SC.RecordArray
|
1012
1002
|
*/
|
1013
|
-
recordsFor: function(recordType) {
|
1003
|
+
recordsFor: function (recordType) {
|
1014
1004
|
var storeKeys = [],
|
1015
1005
|
storeKeysById = recordType.storeKeysById(),
|
1016
1006
|
id, storeKey, ret;
|
@@ -1029,6 +1019,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1029
1019
|
return ret ;
|
1030
1020
|
},
|
1031
1021
|
|
1022
|
+
/** @private */
|
1032
1023
|
_TMP_REC_ATTRS: {},
|
1033
1024
|
|
1034
1025
|
/**
|
@@ -1044,7 +1035,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1044
1035
|
@param {Number} storeKey The storeKey for the dataHash.
|
1045
1036
|
@returns {SC.Record} Returns a record instance.
|
1046
1037
|
*/
|
1047
|
-
materializeRecord: function(storeKey) {
|
1038
|
+
materializeRecord: function (storeKey) {
|
1048
1039
|
var records = this.records, ret, recordType, attrs;
|
1049
1040
|
|
1050
1041
|
// look up in cached records
|
@@ -1107,7 +1098,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1107
1098
|
|
1108
1099
|
@returns {SC.Record} Returns the created record
|
1109
1100
|
*/
|
1110
|
-
createRecord: function(recordType, dataHash, id) {
|
1101
|
+
createRecord: function (recordType, dataHash, id) {
|
1111
1102
|
var primaryKey, prototype, storeKey, status, K = SC.Record, changelog, defaultVal, ret;
|
1112
1103
|
|
1113
1104
|
//initialize dataHash if necessary
|
@@ -1215,7 +1206,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1215
1206
|
@param {Array} ids (optional) ids to assign to records
|
1216
1207
|
@returns {Array} array of materialized record instances.
|
1217
1208
|
*/
|
1218
|
-
createRecords: function(recordTypes, dataHashes, ids) {
|
1209
|
+
createRecords: function (recordTypes, dataHashes, ids) {
|
1219
1210
|
var ret = [], recordType, id, isArray, len = dataHashes.length, idx ;
|
1220
1211
|
isArray = SC.typeOf(recordTypes) === SC.T_ARRAY;
|
1221
1212
|
if (!isArray) recordType = recordTypes;
|
@@ -1239,7 +1230,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1239
1230
|
@param {Number} storeKey (optional) if passed, ignores recordType and id
|
1240
1231
|
@returns {SC.Store} receiver
|
1241
1232
|
*/
|
1242
|
-
unloadRecord: function(recordType, id, storeKey, newStatus) {
|
1233
|
+
unloadRecord: function (recordType, id, storeKey, newStatus) {
|
1243
1234
|
if (storeKey === undefined) storeKey = recordType.storeKeyFor(id);
|
1244
1235
|
var status = this.readStatus(storeKey), K = SC.Record;
|
1245
1236
|
newStatus = newStatus || K.EMPTY;
|
@@ -1260,7 +1251,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1260
1251
|
|
1261
1252
|
// Handle all the child Records
|
1262
1253
|
var that = this;
|
1263
|
-
this._propagateToChildren(storeKey, function(storeKey){
|
1254
|
+
this._propagateToChildren(storeKey, function (storeKey) {
|
1264
1255
|
that.unloadRecord(null, null, storeKey, newStatus);
|
1265
1256
|
});
|
1266
1257
|
|
@@ -1287,7 +1278,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1287
1278
|
@param {Array} storeKeys (optional) store keys to unload
|
1288
1279
|
@returns {SC.Store} receiver
|
1289
1280
|
*/
|
1290
|
-
unloadRecords: function(recordTypes, ids, storeKeys, newStatus) {
|
1281
|
+
unloadRecords: function (recordTypes, ids, storeKeys, newStatus) {
|
1291
1282
|
var len, isArray, idx, id, recordType, storeKey;
|
1292
1283
|
|
1293
1284
|
if (storeKeys === undefined) {
|
@@ -1330,7 +1321,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1330
1321
|
@param {Number} storeKey (optional) if passed, ignores recordType and id
|
1331
1322
|
@returns {SC.Store} receiver
|
1332
1323
|
*/
|
1333
|
-
destroyRecord: function(recordType, id, storeKey) {
|
1324
|
+
destroyRecord: function (recordType, id, storeKey) {
|
1334
1325
|
if (storeKey === undefined) storeKey = recordType.storeKeyFor(id);
|
1335
1326
|
var status = this.readStatus(storeKey), changelog, K = SC.Record;
|
1336
1327
|
|
@@ -1346,9 +1337,10 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1346
1337
|
} else if (status & K.BUSY) {
|
1347
1338
|
throw K.BUSY_ERROR ;
|
1348
1339
|
|
1349
|
-
// if new status, destroy
|
1340
|
+
// if new status, destroy in clean state
|
1350
1341
|
} else if (status === K.READY_NEW) {
|
1351
1342
|
status = K.DESTROYED_CLEAN ;
|
1343
|
+
this.removeDataHash(storeKey, status) ;
|
1352
1344
|
|
1353
1345
|
// otherwise, destroy in dirty state
|
1354
1346
|
} else status = K.DESTROYED_DIRTY ;
|
@@ -1370,7 +1362,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1370
1362
|
}
|
1371
1363
|
|
1372
1364
|
var that = this;
|
1373
|
-
this._propagateToChildren(storeKey, function(storeKey){
|
1365
|
+
this._propagateToChildren(storeKey, function (storeKey){
|
1374
1366
|
that.destroyRecord(null, null, storeKey);
|
1375
1367
|
});
|
1376
1368
|
|
@@ -1397,7 +1389,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1397
1389
|
@param {Array} storeKeys (optional) store keys to destroy
|
1398
1390
|
@returns {SC.Store} receiver
|
1399
1391
|
*/
|
1400
|
-
destroyRecords: function(recordTypes, ids, storeKeys) {
|
1392
|
+
destroyRecords: function (recordTypes, ids, storeKeys) {
|
1401
1393
|
var len, isArray, idx, id, recordType, storeKey;
|
1402
1394
|
if(storeKeys===undefined){
|
1403
1395
|
len = ids.length;
|
@@ -1421,43 +1413,46 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1421
1413
|
/**
|
1422
1414
|
register a Child Record to the parent
|
1423
1415
|
*/
|
1424
|
-
registerChildToParent: function(parentStoreKey, childStoreKey, path){
|
1425
|
-
var
|
1416
|
+
registerChildToParent: function (parentStoreKey, childStoreKey, path) {
|
1417
|
+
var parentRecords, childRecords, oldPk, oldChildren, pkRef;
|
1418
|
+
|
1426
1419
|
// Check the child to see if it has a parent
|
1427
|
-
|
1428
|
-
|
1420
|
+
childRecords = this.childRecords || {};
|
1421
|
+
parentRecords = this.parentRecords || {};
|
1422
|
+
|
1429
1423
|
// first rid of the old parent
|
1430
|
-
oldPk =
|
1431
|
-
if (oldPk){
|
1432
|
-
oldChildren =
|
1424
|
+
oldPk = childRecords[childStoreKey];
|
1425
|
+
if (oldPk) {
|
1426
|
+
oldChildren = parentRecords[oldPk];
|
1433
1427
|
delete oldChildren[childStoreKey];
|
1434
1428
|
// this.recordDidChange(null, null, oldPk, key);
|
1435
1429
|
}
|
1436
|
-
pkRef =
|
1430
|
+
pkRef = parentRecords[parentStoreKey] || {};
|
1437
1431
|
pkRef[childStoreKey] = path || YES;
|
1438
|
-
|
1439
|
-
|
1432
|
+
parentRecords[parentStoreKey] = pkRef;
|
1433
|
+
childRecords[childStoreKey] = parentStoreKey;
|
1434
|
+
|
1440
1435
|
// sync the status of the child
|
1441
1436
|
this.writeStatus(childStoreKey, this.statuses[parentStoreKey]);
|
1442
|
-
this.childRecords =
|
1443
|
-
this.parentRecords =
|
1437
|
+
this.childRecords = childRecords;
|
1438
|
+
this.parentRecords = parentRecords;
|
1444
1439
|
},
|
1445
1440
|
|
1446
1441
|
/**
|
1447
1442
|
Unregister the Child Record from its Parent. This will cause the Child
|
1448
1443
|
Record to be removed from the store.
|
1449
1444
|
*/
|
1450
|
-
unregisterChildFromParent: function(childStoreKey) {
|
1451
|
-
var
|
1445
|
+
unregisterChildFromParent: function (childStoreKey) {
|
1446
|
+
var childRecords, oldPk;
|
1452
1447
|
|
1453
1448
|
// Check the child to see if it has a parent
|
1454
|
-
|
1449
|
+
childRecords = this.childRecords;
|
1455
1450
|
|
1456
1451
|
// Remove the parent's connection to the child. This doesn't remove the
|
1457
1452
|
// parent store key from the cache of parent store keys if the parent
|
1458
1453
|
// no longer has any other registered children, because the amount of effort
|
1459
1454
|
// to determine that would not be worth the miniscule memory savings.
|
1460
|
-
oldPk =
|
1455
|
+
oldPk = childRecords[childStoreKey];
|
1461
1456
|
if (oldPk) {
|
1462
1457
|
delete this.parentRecords[oldPk][childStoreKey];
|
1463
1458
|
}
|
@@ -1468,13 +1463,13 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1468
1463
|
// 3. from the cache of child record store keys
|
1469
1464
|
this.removeDataHash(childStoreKey);
|
1470
1465
|
delete this.records[childStoreKey];
|
1471
|
-
delete
|
1466
|
+
delete childRecords[childStoreKey];
|
1472
1467
|
},
|
1473
1468
|
|
1474
1469
|
/**
|
1475
1470
|
materialize the parent when passing in a store key for the child
|
1476
1471
|
*/
|
1477
|
-
materializeParentRecord: function(childStoreKey){
|
1472
|
+
materializeParentRecord: function (childStoreKey){
|
1478
1473
|
var pk, crs;
|
1479
1474
|
if (SC.none(childStoreKey)) return null;
|
1480
1475
|
crs = this.childRecords;
|
@@ -1489,7 +1484,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1489
1484
|
|
1490
1485
|
@param {Number} storeKey The store key of the parent
|
1491
1486
|
*/
|
1492
|
-
parentStoreKeyExists: function(storeKey){
|
1487
|
+
parentStoreKeyExists: function (storeKey){
|
1493
1488
|
if (SC.none(storeKey)) return ;
|
1494
1489
|
var crs = this.childRecords || {};
|
1495
1490
|
return crs[storeKey];
|
@@ -1498,7 +1493,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1498
1493
|
/**
|
1499
1494
|
function that propagates a function call to all children
|
1500
1495
|
*/
|
1501
|
-
_propagateToChildren: function(storeKey, func){
|
1496
|
+
_propagateToChildren: function (storeKey, func) {
|
1502
1497
|
// Handle all the child Records
|
1503
1498
|
if ( SC.none(this.parentRecords) ) return;
|
1504
1499
|
var children = this.parentRecords[storeKey] || {};
|
@@ -1522,7 +1517,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1522
1517
|
@param {Boolean} if the change is to statusOnly (optional)
|
1523
1518
|
@returns {SC.Store} receiver
|
1524
1519
|
*/
|
1525
|
-
recordDidChange: function(recordType, id, storeKey, key, statusOnly) {
|
1520
|
+
recordDidChange: function (recordType, id, storeKey, key, statusOnly) {
|
1526
1521
|
if (storeKey === undefined) storeKey = recordType.storeKeyFor(id);
|
1527
1522
|
var status = this.readStatus(storeKey), changelog, K = SC.Record;
|
1528
1523
|
|
@@ -1579,7 +1574,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1579
1574
|
@param {Array} storeKeys (optional) store keys to destroy
|
1580
1575
|
@returns {SC.Store} receiver
|
1581
1576
|
*/
|
1582
|
-
recordsDidChange: function(recordTypes, ids, storeKeys) {
|
1577
|
+
recordsDidChange: function (recordTypes, ids, storeKeys) {
|
1583
1578
|
var len, isArray, idx, id, recordType, storeKey;
|
1584
1579
|
if(storeKeys===undefined){
|
1585
1580
|
len = ids.length;
|
@@ -1619,7 +1614,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1619
1614
|
@param {Function|Array} callback function or array of functions
|
1620
1615
|
@returns {Array} storeKeys to be retrieved
|
1621
1616
|
*/
|
1622
|
-
retrieveRecords: function(recordTypes, ids, storeKeys, isRefresh, callbacks) {
|
1617
|
+
retrieveRecords: function (recordTypes, ids, storeKeys, isRefresh, callbacks) {
|
1623
1618
|
|
1624
1619
|
var source = this._getDataSource(),
|
1625
1620
|
isArray = SC.typeOf(recordTypes) === SC.T_ARRAY,
|
@@ -1711,7 +1706,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1711
1706
|
@private
|
1712
1707
|
stores the callbacks for the storeKeys that are inflight
|
1713
1708
|
**/
|
1714
|
-
_setCallbackForStoreKey: function(storeKey, callback, hasCallbackArray, storeKeys){
|
1709
|
+
_setCallbackForStoreKey: function (storeKey, callback, hasCallbackArray, storeKeys){
|
1715
1710
|
var queue = this._callback_queue;
|
1716
1711
|
if(hasCallbackArray) queue[storeKey] = {callback: callback, otherKeys: storeKeys};
|
1717
1712
|
else queue[storeKey] = callback;
|
@@ -1721,7 +1716,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1721
1716
|
retreives and calls callback for `storkey` if exists
|
1722
1717
|
also handles if a single callback is need for one key
|
1723
1718
|
**/
|
1724
|
-
_retreiveCallbackForStoreKey: function(storeKey){
|
1719
|
+
_retreiveCallbackForStoreKey: function (storeKey){
|
1725
1720
|
var queue = this._callback_queue,
|
1726
1721
|
callback = queue[storeKey],
|
1727
1722
|
allFinished, keys;
|
@@ -1733,13 +1728,13 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1733
1728
|
else if(SC.typeOf(callback) == SC.T_HASH){
|
1734
1729
|
callback.completed = YES;
|
1735
1730
|
keys = callback.storeKeys;
|
1736
|
-
keys.forEach(function(key){
|
1731
|
+
keys.forEach(function (key){
|
1737
1732
|
if(!queue[key].completed) allFinished = YES;
|
1738
1733
|
});
|
1739
1734
|
if(allFinished){
|
1740
1735
|
callback.callback.call(); // args?
|
1741
1736
|
//cleanup
|
1742
|
-
keys.forEach(function(key){
|
1737
|
+
keys.forEach(function (key){
|
1743
1738
|
delete queue[key];
|
1744
1739
|
});
|
1745
1740
|
}
|
@@ -1752,7 +1747,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1752
1747
|
@private
|
1753
1748
|
|
1754
1749
|
*/
|
1755
|
-
_cancelCallback: function(storeKey){
|
1750
|
+
_cancelCallback: function (storeKey){
|
1756
1751
|
var queue = this._callback_queue;
|
1757
1752
|
if(queue[storeKey]){
|
1758
1753
|
delete queue[storeKey];
|
@@ -1778,7 +1773,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1778
1773
|
@param {Function} callback (optional)
|
1779
1774
|
@returns {Number} storeKey that was retrieved
|
1780
1775
|
*/
|
1781
|
-
retrieveRecord: function(recordType, id, storeKey, isRefresh, callback) {
|
1776
|
+
retrieveRecord: function (recordType, id, storeKey, isRefresh, callback) {
|
1782
1777
|
var array = this._TMP_RETRIEVE_ARRAY,
|
1783
1778
|
ret;
|
1784
1779
|
|
@@ -1807,7 +1802,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1807
1802
|
@param {Function} callback (optional) when refresh completes
|
1808
1803
|
@returns {Boolean} YES if the retrieval was a success.
|
1809
1804
|
*/
|
1810
|
-
refreshRecord: function(recordType, id, storeKey, callback) {
|
1805
|
+
refreshRecord: function (recordType, id, storeKey, callback) {
|
1811
1806
|
return !!this.retrieveRecord(recordType, id, storeKey, YES, callback);
|
1812
1807
|
},
|
1813
1808
|
|
@@ -1822,7 +1817,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1822
1817
|
@param {Function} callback (optional) when refresh completes
|
1823
1818
|
@returns {Boolean} YES if the retrieval was a success.
|
1824
1819
|
*/
|
1825
|
-
refreshRecords: function(recordTypes, ids, storeKeys, callback) {
|
1820
|
+
refreshRecords: function (recordTypes, ids, storeKeys, callback) {
|
1826
1821
|
var ret = this.retrieveRecords(recordTypes, ids, storeKeys, YES, callback);
|
1827
1822
|
return ret && ret.length>0;
|
1828
1823
|
},
|
@@ -1844,7 +1839,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1844
1839
|
|
1845
1840
|
@returns {Boolean} if the action was succesful.
|
1846
1841
|
*/
|
1847
|
-
commitRecords: function(recordTypes, ids, storeKeys, params, callbacks) {
|
1842
|
+
commitRecords: function (recordTypes, ids, storeKeys, params, callbacks) {
|
1848
1843
|
var source = this._getDataSource(),
|
1849
1844
|
isArray = SC.typeOf(recordTypes) === SC.T_ARRAY,
|
1850
1845
|
hasCallbackArray = SC.typeOf(callbacks) === SC.T_ARRAY,
|
@@ -1939,7 +1934,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1939
1934
|
@param {Function|Array} callback function or array of functions
|
1940
1935
|
@returns {Boolean} if the action was successful.
|
1941
1936
|
*/
|
1942
|
-
commitRecord: function(recordType, id, storeKey, params, callback) {
|
1937
|
+
commitRecord: function (recordType, id, storeKey, params, callback) {
|
1943
1938
|
var array = this._TMP_RETRIEVE_ARRAY,
|
1944
1939
|
ret ;
|
1945
1940
|
if (id === undefined && storeKey === undefined ) return NO;
|
@@ -1967,7 +1962,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
1967
1962
|
@param {Array} storeKeys (optional) store keys to destroy
|
1968
1963
|
@returns {SC.Store} the store.
|
1969
1964
|
*/
|
1970
|
-
cancelRecords: function(recordTypes, ids, storeKeys) {
|
1965
|
+
cancelRecords: function (recordTypes, ids, storeKeys) {
|
1971
1966
|
var source = this._getDataSource(),
|
1972
1967
|
isArray = SC.typeOf(recordTypes) === SC.T_ARRAY,
|
1973
1968
|
K = SC.Record,
|
@@ -2012,7 +2007,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2012
2007
|
@param {Array} storeKeys (optional) store keys to destroy
|
2013
2008
|
@returns {SC.Store} the store.
|
2014
2009
|
*/
|
2015
|
-
cancelRecord: function(recordType, id, storeKey) {
|
2010
|
+
cancelRecord: function (recordType, id, storeKey) {
|
2016
2011
|
var array = this._TMP_RETRIEVE_ARRAY,
|
2017
2012
|
ret ;
|
2018
2013
|
|
@@ -2055,7 +2050,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2055
2050
|
@param {Array} id optional. if not passed lookup on the hash
|
2056
2051
|
@returns {String} store keys assigned to these id
|
2057
2052
|
*/
|
2058
|
-
loadRecord: function(recordType, dataHash, id) {
|
2053
|
+
loadRecord: function (recordType, dataHash, id) {
|
2059
2054
|
var K = SC.Record,
|
2060
2055
|
ret, primaryKey, storeKey;
|
2061
2056
|
|
@@ -2101,7 +2096,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2101
2096
|
@param {Array} ids optional array of ids. if not passed lookup on hashes
|
2102
2097
|
@returns {Array} store keys assigned to these ids
|
2103
2098
|
*/
|
2104
|
-
loadRecords: function(recordTypes, dataHashes, ids) {
|
2099
|
+
loadRecords: function (recordTypes, dataHashes, ids) {
|
2105
2100
|
var isArray = SC.typeOf(recordTypes) === SC.T_ARRAY,
|
2106
2101
|
len = dataHashes.get('length'),
|
2107
2102
|
ret = [],
|
@@ -2137,7 +2132,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2137
2132
|
|
2138
2133
|
@returns {SC.Error} SC.Error or undefined if no error associated with the record.
|
2139
2134
|
*/
|
2140
|
-
readError: function(storeKey) {
|
2135
|
+
readError: function (storeKey) {
|
2141
2136
|
var errors = this.recordErrors ;
|
2142
2137
|
return errors ? errors[storeKey] : undefined ;
|
2143
2138
|
},
|
@@ -2149,7 +2144,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2149
2144
|
|
2150
2145
|
@returns {SC.Error} SC.Error or undefined if no error associated with the query.
|
2151
2146
|
*/
|
2152
|
-
readQueryError: function(query) {
|
2147
|
+
readQueryError: function (query) {
|
2153
2148
|
var errors = this.queryErrors ;
|
2154
2149
|
return errors ? errors[SC.guidFor(query)] : undefined ;
|
2155
2150
|
},
|
@@ -2166,7 +2161,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2166
2161
|
@param {Number} storeKey record store key to cancel
|
2167
2162
|
@returns {SC.Store} receiver
|
2168
2163
|
*/
|
2169
|
-
dataSourceDidCancel: function(storeKey) {
|
2164
|
+
dataSourceDidCancel: function (storeKey) {
|
2170
2165
|
var status = this.readStatus(storeKey),
|
2171
2166
|
K = SC.Record;
|
2172
2167
|
|
@@ -2222,7 +2217,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2222
2217
|
@param {Object} newId optional new id to replace the old one
|
2223
2218
|
@returns {SC.Store} receiver
|
2224
2219
|
*/
|
2225
|
-
dataSourceDidComplete: function(storeKey, dataHash, newId) {
|
2220
|
+
dataSourceDidComplete: function (storeKey, dataHash, newId) {
|
2226
2221
|
var status = this.readStatus(storeKey), K = SC.Record, statusOnly;
|
2227
2222
|
|
2228
2223
|
// EMPTY, ERROR, READY_CLEAN, READY_NEW, READY_DIRTY, DESTROYED_CLEAN,
|
@@ -2261,7 +2256,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2261
2256
|
@param {Number} storeKey record store key to cancel
|
2262
2257
|
@returns {SC.Store} receiver
|
2263
2258
|
*/
|
2264
|
-
dataSourceDidDestroy: function(storeKey) {
|
2259
|
+
dataSourceDidDestroy: function (storeKey) {
|
2265
2260
|
var status = this.readStatus(storeKey), K = SC.Record;
|
2266
2261
|
|
2267
2262
|
// EMPTY, ERROR, READY_CLEAN, READY_NEW, READY_DIRTY, DESTROYED_CLEAN,
|
@@ -2294,7 +2289,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2294
2289
|
@param {SC.Error} error [optional] an SC.Error instance to associate with storeKey
|
2295
2290
|
@returns {SC.Store} receiver
|
2296
2291
|
*/
|
2297
|
-
dataSourceDidError: function(storeKey, error) {
|
2292
|
+
dataSourceDidError: function (storeKey, error) {
|
2298
2293
|
var status = this.readStatus(storeKey), errors = this.recordErrors, K = SC.Record;
|
2299
2294
|
|
2300
2295
|
// EMPTY, ERROR, READY_CLEAN, READY_NEW, READY_DIRTY, DESTROYED_CLEAN,
|
@@ -2337,15 +2332,15 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2337
2332
|
@param {Number} storeKey optional store key.
|
2338
2333
|
@returns {Number|Boolean} storeKey if push was allowed, NO if not
|
2339
2334
|
*/
|
2340
|
-
pushRetrieve: function(recordType, id, dataHash, storeKey) {
|
2335
|
+
pushRetrieve: function (recordType, id, dataHash, storeKey) {
|
2341
2336
|
var K = SC.Record, status;
|
2342
2337
|
|
2343
|
-
if(storeKey===undefined) storeKey = recordType.storeKeyFor(id);
|
2338
|
+
if (storeKey === undefined) storeKey = recordType.storeKeyFor(id);
|
2344
2339
|
status = this.readStatus(storeKey);
|
2345
|
-
if(status==K.EMPTY || status==K.ERROR || status==K.READY_CLEAN || status==K.DESTROYED_CLEAN) {
|
2340
|
+
if (status == K.EMPTY || status == K.ERROR || status == K.READY_CLEAN || status == K.DESTROYED_CLEAN) {
|
2346
2341
|
|
2347
2342
|
status = K.READY_CLEAN;
|
2348
|
-
if(dataHash===undefined) this.writeStatus(storeKey, status) ;
|
2343
|
+
if (dataHash === undefined) this.writeStatus(storeKey, status) ;
|
2349
2344
|
else this.writeDataHash(storeKey, dataHash, status) ;
|
2350
2345
|
|
2351
2346
|
if (id && this.idFor(storeKey) !== id) SC.Store.replaceIdFor(storeKey, id);
|
@@ -2366,7 +2361,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2366
2361
|
@param {Number} storeKey optional store key.
|
2367
2362
|
@returns {Number|Boolean} storeKey if push was allowed, NO if not
|
2368
2363
|
*/
|
2369
|
-
pushDestroy: function(recordType, id, storeKey) {
|
2364
|
+
pushDestroy: function (recordType, id, storeKey) {
|
2370
2365
|
var K = SC.Record, status;
|
2371
2366
|
|
2372
2367
|
if(storeKey===undefined){
|
@@ -2393,7 +2388,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2393
2388
|
@param {Number} storeKey optional store key.
|
2394
2389
|
@returns {Number|Boolean} storeKey if push was allowed, NO if not
|
2395
2390
|
*/
|
2396
|
-
pushError: function(recordType, id, error, storeKey) {
|
2391
|
+
pushError: function (recordType, id, error, storeKey) {
|
2397
2392
|
var K = SC.Record, status, errors = this.recordErrors;
|
2398
2393
|
|
2399
2394
|
if(storeKey===undefined) storeKey = recordType.storeKeyFor(id);
|
@@ -2425,53 +2420,81 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2425
2420
|
// stores. This is why these methods are implemented here instead of
|
2426
2421
|
// directly on `Query` or `RecordArray` objects.
|
2427
2422
|
|
2428
|
-
/**
|
2429
|
-
Sets the passed array of storeKeys as the new data for the query. You
|
2430
|
-
can call this at any time for a remote query to update its content. If
|
2431
|
-
you want to use incremental loading, then pass a `SparseArray` object.
|
2432
|
-
|
2433
|
-
If the query you pass is not a REMOTE query, then this method will raise
|
2434
|
-
an exception. This will also implicitly transition the query state to
|
2435
|
-
`SC.Record.READY`.
|
2436
|
-
|
2437
|
-
If you called `loadRecords()` before to load the actual content, you can
|
2438
|
-
call this method with the return value of that method to actually set the
|
2439
|
-
storeKeys on the result.
|
2423
|
+
/** @deprecated
|
2440
2424
|
|
2441
2425
|
@param {SC.Query} query the query you are loading. must be remote.
|
2442
2426
|
@param {SC.Array} storeKeys array of store keys
|
2443
2427
|
@returns {SC.Store} receiver
|
2444
2428
|
*/
|
2445
|
-
loadQueryResults: function(query, storeKeys) {
|
2429
|
+
loadQueryResults: function (query, storeKeys) {
|
2430
|
+
//@if(debug)
|
2446
2431
|
if (query.get('location') === SC.Query.LOCAL) {
|
2447
|
-
throw new Error("
|
2432
|
+
throw new Error("Developer Error: You should not call loadQueryResults with a local query. You need to use dataSourceDidFetchQuery instead.");
|
2433
|
+
} else {
|
2434
|
+
SC.warn("Developer Warning: loadQueryResults has been deprecated in favor of using dataSourceDidFetchQuery for both local and remote queries. With remote queries, include the store keys when calling dataSourceDidFetchQuery.");
|
2448
2435
|
}
|
2436
|
+
//@endif
|
2449
2437
|
|
2450
|
-
|
2451
|
-
if (recArray) recArray.set('storeKeys', storeKeys);
|
2452
|
-
this.dataSourceDidFetchQuery(query);
|
2453
|
-
|
2454
|
-
return this ;
|
2438
|
+
return this.dataSourceDidFetchQuery(query, storeKeys);
|
2455
2439
|
},
|
2456
2440
|
|
2457
2441
|
/**
|
2458
2442
|
Called by your data source whenever you finish fetching the results of a
|
2459
|
-
query. This will put the
|
2443
|
+
query. This will put the record array for the query into a READY_CLEAN
|
2444
|
+
state if it was previously loading or refreshing.
|
2445
|
+
|
2446
|
+
# Handling REMOTE queries
|
2447
|
+
|
2448
|
+
Note that if the query is REMOTE, then you must first load the results
|
2449
|
+
into the store using `loadRecords()` and pass the ordered array of store
|
2450
|
+
keys returned by `loadRecords()` into this method.
|
2451
|
+
|
2452
|
+
For example,
|
2453
|
+
|
2454
|
+
storeKeys = store.loadRecords(body.contacts);
|
2455
|
+
store.dataSourceDidFetchQuery(query, storeKeys);
|
2456
|
+
|
2457
|
+
# Automatic updates
|
2458
|
+
|
2459
|
+
When you call this method the record array for the query will notify that
|
2460
|
+
its contents have changed. If the query is LOCAL then the contents will
|
2461
|
+
update automatically to include any new records you added to the store.
|
2462
|
+
If the query is REMOTE the contents will update to be the ordered records
|
2463
|
+
for the passed in store keys.
|
2460
2464
|
|
2461
|
-
|
2462
|
-
the results into the query using `loadQueryResults()`. If the query is
|
2463
|
-
LOCAL, then the query will update automatically with any new records you
|
2464
|
-
added to the store.
|
2465
|
+
# Incremental loading for REMOTE queries
|
2465
2466
|
|
2466
|
-
|
2467
|
+
If you want to support incremental loading, then pass an SC.SparseArray
|
2468
|
+
object to hold the store keys. This will allow you to load results
|
2469
|
+
incrementally and provide more store keys as you do.
|
2470
|
+
|
2471
|
+
See the SC.SparseArray documentation for more information.
|
2472
|
+
|
2473
|
+
@param {SC.Query} query The query you fetched
|
2474
|
+
@param {Array} [storeKeys] Ordered array of store keys as returned by a remote query. NOTE: Required for remote queries.
|
2467
2475
|
@returns {SC.Store} receiver
|
2468
2476
|
*/
|
2469
|
-
dataSourceDidFetchQuery: function(query) {
|
2470
|
-
|
2477
|
+
dataSourceDidFetchQuery: function (query, storeKeys) {
|
2478
|
+
var recArray = this._findQuery(query, YES, NO);
|
2479
|
+
|
2480
|
+
// Set the ordered array of store keys for remote queries.
|
2481
|
+
if (recArray && query.get('isRemote')) {
|
2482
|
+
//@if(debug)
|
2483
|
+
// Prevent confusion between local and remote requests.
|
2484
|
+
if (SC.none(storeKeys)) {
|
2485
|
+
throw new Error("Developer Error: The storeKeys argument in dataSourceDidFetchQuery is not optional for remote queries. For a remote query you must include the ordered array of store keys for the loaded records (even if it's an empty array).");
|
2486
|
+
}
|
2487
|
+
//@endif
|
2488
|
+
|
2489
|
+
recArray.set('storeKeys', storeKeys);
|
2490
|
+
}
|
2491
|
+
|
2492
|
+
return this._scstore_dataSourceDidFetchQuery(query);
|
2471
2493
|
},
|
2472
2494
|
|
2473
|
-
|
2474
|
-
|
2495
|
+
/** @private */
|
2496
|
+
_scstore_dataSourceDidFetchQuery: function (query) {
|
2497
|
+
var recArray = this._findQuery(query, NO, NO),
|
2475
2498
|
nestedStores = this.get('nestedStores'),
|
2476
2499
|
loc = nestedStores ? nestedStores.get('length') : 0;
|
2477
2500
|
|
@@ -2479,11 +2502,11 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2479
2502
|
if (recArray) recArray.storeDidFetchQuery(query);
|
2480
2503
|
|
2481
2504
|
// notify nested stores
|
2482
|
-
while(--loc >= 0) {
|
2483
|
-
nestedStores[loc]._scstore_dataSourceDidFetchQuery(query
|
2505
|
+
while (--loc >= 0) {
|
2506
|
+
nestedStores[loc]._scstore_dataSourceDidFetchQuery(query);
|
2484
2507
|
}
|
2485
2508
|
|
2486
|
-
return this
|
2509
|
+
return this;
|
2487
2510
|
},
|
2488
2511
|
|
2489
2512
|
/**
|
@@ -2494,11 +2517,11 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2494
2517
|
@param {SC.Query} query the query you cancelled
|
2495
2518
|
@returns {SC.Store} receiver
|
2496
2519
|
*/
|
2497
|
-
dataSourceDidCancelQuery: function(query) {
|
2520
|
+
dataSourceDidCancelQuery: function (query) {
|
2498
2521
|
return this._scstore_dataSourceDidCancelQuery(query, YES);
|
2499
2522
|
},
|
2500
2523
|
|
2501
|
-
_scstore_dataSourceDidCancelQuery: function(query, createIfNeeded) {
|
2524
|
+
_scstore_dataSourceDidCancelQuery: function (query, createIfNeeded) {
|
2502
2525
|
var recArray = this._findQuery(query, createIfNeeded, NO),
|
2503
2526
|
nestedStores = this.get('nestedStores'),
|
2504
2527
|
loc = nestedStores ? nestedStores.get('length') : 0;
|
@@ -2523,7 +2546,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2523
2546
|
@param {SC.Error} error [optional] an SC.Error instance to associate with query
|
2524
2547
|
@returns {SC.Store} receiver
|
2525
2548
|
*/
|
2526
|
-
dataSourceDidErrorQuery: function(query, error) {
|
2549
|
+
dataSourceDidErrorQuery: function (query, error) {
|
2527
2550
|
var errors = this.queryErrors;
|
2528
2551
|
|
2529
2552
|
// Add the error to the array of query errors (for lookup later on if necessary).
|
@@ -2535,7 +2558,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2535
2558
|
return this._scstore_dataSourceDidErrorQuery(query, YES);
|
2536
2559
|
},
|
2537
2560
|
|
2538
|
-
_scstore_dataSourceDidErrorQuery: function(query, createIfNeeded) {
|
2561
|
+
_scstore_dataSourceDidErrorQuery: function (query, createIfNeeded) {
|
2539
2562
|
var recArray = this._findQuery(query, createIfNeeded, NO),
|
2540
2563
|
nestedStores = this.get('nestedStores'),
|
2541
2564
|
loc = nestedStores ? nestedStores.get('length') : 0;
|
@@ -2556,13 +2579,13 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2556
2579
|
//
|
2557
2580
|
|
2558
2581
|
/** @private */
|
2559
|
-
init: function() {
|
2582
|
+
init: function () {
|
2560
2583
|
sc_super();
|
2561
2584
|
this.reset();
|
2562
2585
|
},
|
2563
2586
|
|
2564
2587
|
|
2565
|
-
toString: function() {
|
2588
|
+
toString: function () {
|
2566
2589
|
// Include the name if the client has specified one.
|
2567
2590
|
var name = this.get('name');
|
2568
2591
|
if (!name) {
|
@@ -2585,7 +2608,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2585
2608
|
@param {Number} storeKey the store key
|
2586
2609
|
@returns {String} primaryKey value
|
2587
2610
|
*/
|
2588
|
-
idFor: function(storeKey) {
|
2611
|
+
idFor: function (storeKey) {
|
2589
2612
|
return SC.Store.idFor(storeKey);
|
2590
2613
|
},
|
2591
2614
|
|
@@ -2595,7 +2618,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2595
2618
|
@param {Number} storeKey the store key
|
2596
2619
|
@returns {SC.Record} record instance
|
2597
2620
|
*/
|
2598
|
-
recordTypeFor: function(storeKey) {
|
2621
|
+
recordTypeFor: function (storeKey) {
|
2599
2622
|
return SC.Store.recordTypeFor(storeKey) ;
|
2600
2623
|
},
|
2601
2624
|
|
@@ -2607,7 +2630,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2607
2630
|
@param {String} primaryKey the primary key
|
2608
2631
|
@returns {Number} storeKey
|
2609
2632
|
*/
|
2610
|
-
storeKeyFor: function(recordType, primaryKey) {
|
2633
|
+
storeKeyFor: function (recordType, primaryKey) {
|
2611
2634
|
return recordType.storeKeyFor(primaryKey);
|
2612
2635
|
},
|
2613
2636
|
|
@@ -2620,7 +2643,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2620
2643
|
@param {String} primaryKey the primary key
|
2621
2644
|
@returns {Number} a storeKey.
|
2622
2645
|
*/
|
2623
|
-
storeKeyExists: function(recordType, primaryKey) {
|
2646
|
+
storeKeyExists: function (recordType, primaryKey) {
|
2624
2647
|
return recordType.storeKeyExists(primaryKey);
|
2625
2648
|
},
|
2626
2649
|
|
@@ -2631,7 +2654,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2631
2654
|
@param {SC.Record} recordType
|
2632
2655
|
@returns {Array} set of storeKeys
|
2633
2656
|
*/
|
2634
|
-
storeKeysFor: function(recordType) {
|
2657
|
+
storeKeysFor: function (recordType) {
|
2635
2658
|
var ret = [],
|
2636
2659
|
isEnum = recordType && recordType.isEnumerable,
|
2637
2660
|
recType, storeKey, isMatch ;
|
@@ -2656,7 +2679,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2656
2679
|
|
2657
2680
|
@returns {Array} set of storeKeys
|
2658
2681
|
*/
|
2659
|
-
storeKeys: function() {
|
2682
|
+
storeKeys: function () {
|
2660
2683
|
var ret = [], storeKey;
|
2661
2684
|
if(!this.statuses) return ret;
|
2662
2685
|
|
@@ -2676,7 +2699,7 @@ SC.Store = SC.Object.extend( /** @scope SC.Store.prototype */ {
|
|
2676
2699
|
@param {Number} storeKey
|
2677
2700
|
@returns {String}
|
2678
2701
|
*/
|
2679
|
-
statusString: function(storeKey) {
|
2702
|
+
statusString: function (storeKey) {
|
2680
2703
|
var rec = this.materializeRecord(storeKey);
|
2681
2704
|
return rec.statusString();
|
2682
2705
|
}
|
@@ -2774,7 +2797,7 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2774
2797
|
|
2775
2798
|
@type Number
|
2776
2799
|
*/
|
2777
|
-
generateStoreKey: function() { return this.nextStoreKey++; },
|
2800
|
+
generateStoreKey: function () { return this.nextStoreKey++; },
|
2778
2801
|
|
2779
2802
|
/**
|
2780
2803
|
Given a `storeKey` returns the `primaryKey` associated with the key.
|
@@ -2783,7 +2806,7 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2783
2806
|
@param {Number} storeKey the store key
|
2784
2807
|
@returns {String} the primary key or null
|
2785
2808
|
*/
|
2786
|
-
idFor: function(storeKey) {
|
2809
|
+
idFor: function (storeKey) {
|
2787
2810
|
return this.idsByStoreKey[storeKey] ;
|
2788
2811
|
},
|
2789
2812
|
|
@@ -2794,7 +2817,7 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2794
2817
|
@param {Number} storeKey the store key
|
2795
2818
|
@returns {SC.Query} query query object
|
2796
2819
|
*/
|
2797
|
-
queryFor: function(storeKey) {
|
2820
|
+
queryFor: function (storeKey) {
|
2798
2821
|
return this.queriesByStoreKey[storeKey];
|
2799
2822
|
},
|
2800
2823
|
|
@@ -2808,7 +2831,7 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2808
2831
|
@param {Number} storeKey the store key
|
2809
2832
|
@returns {SC.Record} the record type
|
2810
2833
|
*/
|
2811
|
-
recordTypeFor: function(storeKey) {
|
2834
|
+
recordTypeFor: function (storeKey) {
|
2812
2835
|
return this.recordTypesByStoreKey[storeKey];
|
2813
2836
|
},
|
2814
2837
|
|
@@ -2821,7 +2844,7 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2821
2844
|
@param {String} newPrimaryKey the new primary key
|
2822
2845
|
@returns {SC.Store} receiver
|
2823
2846
|
*/
|
2824
|
-
replaceIdFor: function(storeKey, newId) {
|
2847
|
+
replaceIdFor: function (storeKey, newId) {
|
2825
2848
|
var oldId = this.idsByStoreKey[storeKey],
|
2826
2849
|
recordType, storeKeys;
|
2827
2850
|
|
@@ -2854,98 +2877,9 @@ SC.Store.mixin(/** @scope SC.Store.prototype */{
|
|
2854
2877
|
@param {SC.Record} recordType a record class
|
2855
2878
|
@returns {SC.Store} receiver
|
2856
2879
|
*/
|
2857
|
-
replaceRecordTypeFor: function(storeKey, recordType) {
|
2880
|
+
replaceRecordTypeFor: function (storeKey, recordType) {
|
2858
2881
|
this.recordTypesByStoreKey[storeKey] = recordType;
|
2859
2882
|
return this ;
|
2860
2883
|
}
|
2861
2884
|
|
2862
2885
|
});
|
2863
|
-
|
2864
|
-
|
2865
|
-
/** @private */
|
2866
|
-
SC.Store.prototype.nextStoreIndex = 1;
|
2867
|
-
|
2868
|
-
// ..........................................................
|
2869
|
-
// COMPATIBILITY
|
2870
|
-
//
|
2871
|
-
|
2872
|
-
/** @private
|
2873
|
-
global store is used only for deprecated compatibility methods. Don't use
|
2874
|
-
this in real code.
|
2875
|
-
*/
|
2876
|
-
SC.Store._getDefaultStore = function() {
|
2877
|
-
var store = this._store;
|
2878
|
-
if(!store) this._store = store = SC.Store.create();
|
2879
|
-
return store;
|
2880
|
-
};
|
2881
|
-
|
2882
|
-
/** @private
|
2883
|
-
|
2884
|
-
DEPRECATED
|
2885
|
-
|
2886
|
-
Included for compatibility, loads data hashes with the named `recordType`.
|
2887
|
-
If no `recordType` is passed, expects to find a `recordType` property in the
|
2888
|
-
data hashes. `dataSource` and `isLoaded` params are ignored.
|
2889
|
-
|
2890
|
-
Calls `SC.Store#loadRecords()` on the default store. Do not use this method in
|
2891
|
-
new code.
|
2892
|
-
|
2893
|
-
@param {Array} dataHashes data hashes to import
|
2894
|
-
@param {Object} dataSource ignored
|
2895
|
-
@param {SC.Record} recordType default record type
|
2896
|
-
@param {Boolean} isLoaded ignored
|
2897
|
-
@returns {Array} SC.Record instances for loaded data hashes
|
2898
|
-
*/
|
2899
|
-
SC.Store.updateRecords = function(dataHashes, dataSource, recordType, isLoaded) {
|
2900
|
-
SC.Logger.warn("SC.Store.updateRecords() is deprecated. Use loadRecords() instead");
|
2901
|
-
var store = this._getDefaultStore(),
|
2902
|
-
len = dataHashes.length,
|
2903
|
-
idx, ret;
|
2904
|
-
|
2905
|
-
// if no recordType was passed, build an array of recordTypes from hashes
|
2906
|
-
if (!recordType) {
|
2907
|
-
recordType = [];
|
2908
|
-
for(idx=0;idx<len;idx++) recordType[idx] = dataHashes[idx].recordType;
|
2909
|
-
}
|
2910
|
-
|
2911
|
-
// call new API. Returns storeKeys
|
2912
|
-
ret = store.loadRecords(recordType, dataHashes);
|
2913
|
-
|
2914
|
-
// map to SC.Record instances
|
2915
|
-
len = ret.length;
|
2916
|
-
for(idx=0;idx<len;idx++) ret[idx] = store.materializeRecord(ret[idx]);
|
2917
|
-
|
2918
|
-
return ret ;
|
2919
|
-
};
|
2920
|
-
|
2921
|
-
/** @private
|
2922
|
-
|
2923
|
-
DEPRECATED
|
2924
|
-
|
2925
|
-
Finds a record with the passed guid on the default store. This is included
|
2926
|
-
only for compatibility. You should use the newer `find()` method defined on
|
2927
|
-
`SC.Store` instead.
|
2928
|
-
|
2929
|
-
@param {String} guid the guid
|
2930
|
-
@param {SC.Record} recordType expected record type
|
2931
|
-
@returns {SC.Record} found record
|
2932
|
-
*/
|
2933
|
-
SC.Store.find = function(guid, recordType) {
|
2934
|
-
return this._getDefaultStore().find(recordType, guid);
|
2935
|
-
};
|
2936
|
-
|
2937
|
-
/** @private
|
2938
|
-
|
2939
|
-
DEPRECATED
|
2940
|
-
|
2941
|
-
Passes through to `findAll` on default store. This is included only for
|
2942
|
-
compatibility. You should use the newer `findAll()` defined on `SC.Store`
|
2943
|
-
instead.
|
2944
|
-
|
2945
|
-
@param {Hash} filter search parameters
|
2946
|
-
@param {SC.Record} recordType type of record to find
|
2947
|
-
@returns {SC.RecordArray} result set
|
2948
|
-
*/
|
2949
|
-
SC.Store.findAll = function(filter, recordType) {
|
2950
|
-
return this._getDefaultStore().findAll(filter, recordType);
|
2951
|
-
};
|