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
@@ -0,0 +1,107 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Apple Inc. and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals module ok equals same test MyApp */
|
7
|
+
|
8
|
+
// test parsing of query string
|
9
|
+
module("SC.Query instance and memory management", {
|
10
|
+
setup: function() {
|
11
|
+
|
12
|
+
SC.RunLoop.begin();
|
13
|
+
|
14
|
+
// setup dummy app and store
|
15
|
+
MyApp = SC.Object.create({
|
16
|
+
store: SC.Store.create()
|
17
|
+
});
|
18
|
+
|
19
|
+
// setup a dummy model
|
20
|
+
MyApp.Foo = SC.Record.extend();
|
21
|
+
MyApp.Bar = SC.Record.extend();
|
22
|
+
MyApp.BarChild = MyApp.Bar.extend();
|
23
|
+
MyApp.Baz = SC.Record.extend();
|
24
|
+
|
25
|
+
// load some data
|
26
|
+
MyApp.store.loadRecords(MyApp.Foo, [{
|
27
|
+
guid: 1,
|
28
|
+
firstName: "John",
|
29
|
+
lastName: "Doe",
|
30
|
+
year: 1974
|
31
|
+
}, {
|
32
|
+
guid: 2,
|
33
|
+
firstName: "Jane",
|
34
|
+
lastName: "Doe",
|
35
|
+
year: 1975
|
36
|
+
}]);
|
37
|
+
|
38
|
+
MyApp.store.loadRecords(MyApp.Bar, [{
|
39
|
+
guid: 3,
|
40
|
+
firstName: "Emily",
|
41
|
+
lastName: "Parker",
|
42
|
+
year: 1975,
|
43
|
+
active: null
|
44
|
+
}, {
|
45
|
+
guid: 4,
|
46
|
+
firstName: "Johnny",
|
47
|
+
lastName: "Cash",
|
48
|
+
active: false
|
49
|
+
}]);
|
50
|
+
|
51
|
+
SC.RunLoop.end();
|
52
|
+
|
53
|
+
},
|
54
|
+
|
55
|
+
teardown: function() {
|
56
|
+
MyApp = q = null;
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
// ..........................................................
|
61
|
+
// BASIC TESTS
|
62
|
+
//
|
63
|
+
test("Record Arrays should not be created more than once if a query is re-run", function() {
|
64
|
+
|
65
|
+
var qFoo = SC.Query.create({
|
66
|
+
recordType: MyApp.Foo
|
67
|
+
});
|
68
|
+
var qBar = SC.Query.create({
|
69
|
+
recordType: MyApp.Bar
|
70
|
+
});
|
71
|
+
|
72
|
+
ok(!MyApp.store.getPath('recordArrays.length'), "RecordArrays length must start as empty.");
|
73
|
+
var raFoo = MyApp.store.find(qFoo);
|
74
|
+
equals(MyApp.store.getPath('recordArrays.length'), 1, "RecordArrays length must be 1 after new query");
|
75
|
+
var raFoo2 = MyApp.store.find(qFoo);
|
76
|
+
equals(MyApp.store.getPath('recordArrays.length'), 1, "RecordArrays length must not increment after second identical query");
|
77
|
+
var raBar = MyApp.store.find(qBar);
|
78
|
+
equals(MyApp.store.getPath('recordArrays.length'), 2, "RecordArrays length must be 2 after second new query.");
|
79
|
+
|
80
|
+
equals(raFoo2, raFoo, "Record array must return same instance.");
|
81
|
+
|
82
|
+
raFoo.destroy();
|
83
|
+
raBar.destroy();
|
84
|
+
qFoo.destroy();
|
85
|
+
qBar.destroy();
|
86
|
+
});
|
87
|
+
|
88
|
+
test("Reset must destroy all cached record arrays.", function() {
|
89
|
+
|
90
|
+
var qFoo = SC.Query.create({
|
91
|
+
recordType: MyApp.Foo
|
92
|
+
});
|
93
|
+
var qBar = SC.Query.create({
|
94
|
+
recordType: MyApp.Bar
|
95
|
+
});
|
96
|
+
|
97
|
+
ok(!MyApp.store.getPath('recordArrays.length'), "RecordArrays length must start as empty.");
|
98
|
+
var raFoo = MyApp.store.find(qFoo);
|
99
|
+
var raBar = MyApp.store.find(qBar);
|
100
|
+
equals(MyApp.store.getPath('recordArrays.length'), 2, "RecordArrays length must be 2 after two new queries.");
|
101
|
+
|
102
|
+
MyApp.store.reset();
|
103
|
+
ok(!MyApp.store.getPath('recordArrays.length'), "Cached record array must be empty after reset()");
|
104
|
+
ok(raFoo.get('isDestroyed'), "Record Array 1 must be destroyed after reset()");
|
105
|
+
ok(raBar.get('isDestroyed'), "Record Array 2 must be destroyed after reset()");
|
106
|
+
|
107
|
+
});
|
@@ -240,3 +240,20 @@ test("Initializing default values with keyed attributes", function() {
|
|
240
240
|
ok(store.readDataHash(sk2)['array_key'] !== store.readDataHash(sk1)['array_key'], "the default value for 'array' is a copy not a reference");
|
241
241
|
ok(store.readDataHash(sk2)['funcDef_key'] !== store.readDataHash(sk1)['funcDef_key'], "the default value for 'funcDef' is a copy not a reference");
|
242
242
|
});
|
243
|
+
|
244
|
+
test("The data hash of the record should be correct BEFORE the status changes.", function () {
|
245
|
+
var rec1;
|
246
|
+
|
247
|
+
//create record
|
248
|
+
rec1 = store.createRecord(MyRecordType, { string: "Pre-create" }, 'test-status');
|
249
|
+
rec1.commitRecord();
|
250
|
+
|
251
|
+
rec1.addObserver('status', function () {
|
252
|
+
if (this.get('status') === SC.Record.READY_CLEAN) {
|
253
|
+
equals(this.get('id'), 'new-id', "The id attribute should be correct since the status has updated.");
|
254
|
+
equals(this.get('string'), "Post-create", "The string attribute should be correct since the status has updated.");
|
255
|
+
}
|
256
|
+
});
|
257
|
+
|
258
|
+
store.dataSourceDidComplete(rec1.get('storeKey'), { string: "Post-create" }, 'new-id');
|
259
|
+
});
|
@@ -14,7 +14,7 @@ module("SC.Store#destroyRecord", {
|
|
14
14
|
SC.RunLoop.begin();
|
15
15
|
|
16
16
|
store = SC.Store.create();
|
17
|
-
|
17
|
+
|
18
18
|
json1 = {
|
19
19
|
guid: "destroyGUID1",
|
20
20
|
string: "string",
|
@@ -51,7 +51,7 @@ module("SC.Store#destroyRecord", {
|
|
51
51
|
number: 23,
|
52
52
|
bool: YES
|
53
53
|
};
|
54
|
-
|
54
|
+
|
55
55
|
storeKey1 = SC.Store.generateStoreKey();
|
56
56
|
store.writeDataHash(storeKey1, json1, SC.Record.BUSY_DESTROYING);
|
57
57
|
storeKey2 = SC.Store.generateStoreKey();
|
@@ -75,11 +75,11 @@ test("Check for different states after/before executing destroyRecord", function
|
|
75
75
|
store.destroyRecord(undefined, undefined, storeKey1);
|
76
76
|
status = store.readStatus( storeKey1);
|
77
77
|
equals(status, SC.Record.BUSY_DESTROYING, "the status shouldn't have changed. It should be BUSY_DESTROYING ");
|
78
|
-
|
78
|
+
|
79
79
|
store.destroyRecord(undefined, undefined, storeKey2);
|
80
80
|
status = store.readStatus( storeKey2);
|
81
81
|
equals(status, SC.Record.DESTROYED, "the status shouldn't have changed. It should be DESTROYED ");
|
82
|
-
|
82
|
+
|
83
83
|
try{
|
84
84
|
store.destroyRecord(undefined, undefined, storeKey3);
|
85
85
|
msg='';
|
@@ -87,7 +87,7 @@ test("Check for different states after/before executing destroyRecord", function
|
|
87
87
|
msg=error1.message;
|
88
88
|
}
|
89
89
|
equals(msg, SC.Record.NOT_FOUND_ERROR.message, "destroyRecord should throw the following error");
|
90
|
-
|
90
|
+
|
91
91
|
try{
|
92
92
|
store.destroyRecord(undefined, undefined, storeKey4);
|
93
93
|
msg='';
|
@@ -95,16 +95,17 @@ test("Check for different states after/before executing destroyRecord", function
|
|
95
95
|
msg=error2.message;
|
96
96
|
}
|
97
97
|
equals(msg, SC.Record.BUSY_ERROR.message, "destroyRecord should throw the following error");
|
98
|
-
|
98
|
+
|
99
99
|
store.destroyRecord(undefined, undefined, storeKey5);
|
100
|
-
status = store.readStatus(
|
100
|
+
status = store.readStatus(storeKey5);
|
101
|
+
equals(store.dataHashes[storeKey5], null, "the data hash should be removed");
|
101
102
|
equals(status, SC.Record.DESTROYED_CLEAN, "the status should have changed to DESTROYED_CLEAN ");
|
102
|
-
|
103
|
+
|
103
104
|
store.destroyRecord(undefined, undefined, storeKey6);
|
104
105
|
status = store.readStatus( storeKey6);
|
105
106
|
equals(status, SC.Record.DESTROYED_DIRTY, "the status should have changed to DESTROYED_DIRTY ");
|
106
|
-
|
107
|
+
|
107
108
|
equals(store.changelog.length, 1, "The changelog has the following number of entries:");
|
108
|
-
|
109
|
-
|
109
|
+
|
110
|
+
|
110
111
|
});
|
@@ -11,54 +11,79 @@ var Person;
|
|
11
11
|
|
12
12
|
module("SC.Store#loadRecord", {
|
13
13
|
setup: function() {
|
14
|
-
|
14
|
+
|
15
15
|
Person = SC.Record.extend({
|
16
16
|
first: SC.Record.attr(String, { isRequired: YES}),
|
17
17
|
last: SC.Record.attr(String),
|
18
18
|
age: SC.Record.attr(Number),
|
19
19
|
isAlive: SC.Record.attr(Boolean)
|
20
20
|
});
|
21
|
-
|
21
|
+
|
22
22
|
SC.RunLoop.begin();
|
23
23
|
|
24
24
|
store = SC.Store.create();
|
25
|
-
|
26
|
-
dataHashes = [
|
27
|
-
|
28
|
-
|
25
|
+
|
26
|
+
dataHashes = [
|
27
|
+
|
28
|
+
{
|
29
29
|
guid: 1,
|
30
30
|
first: "John",
|
31
31
|
last: "Sproutish",
|
32
32
|
age: 35,
|
33
|
-
isAlive: YES}
|
34
|
-
|
35
|
-
|
33
|
+
isAlive: YES},
|
34
|
+
|
35
|
+
{
|
36
36
|
guid: 2,
|
37
37
|
first: "Sarah",
|
38
38
|
last: "Coop",
|
39
39
|
age: 28,
|
40
|
-
isAlive: YES }
|
40
|
+
isAlive: YES }];
|
41
41
|
|
42
42
|
SC.RunLoop.end();
|
43
43
|
}
|
44
44
|
});
|
45
45
|
|
46
46
|
test("loadRecord loads new / update existing record in store", function() {
|
47
|
-
var aDataHash = dataHashes[0];
|
47
|
+
var aDataHash = dataHashes[0];
|
48
48
|
var storeKey = store.loadRecord(Person, aDataHash);
|
49
49
|
ok(storeKey, "A store key is generated for a new record.");
|
50
|
-
|
51
|
-
var doesStoreKeyResolveToPK = aDataHash.
|
50
|
+
|
51
|
+
var doesStoreKeyResolveToPK = aDataHash.guid === store.idFor(storeKey);
|
52
52
|
ok(doesStoreKeyResolveToPK, "The storeKey resolves to the correct Primary Key");
|
53
|
-
|
53
|
+
|
54
54
|
var isStatusCorrect = store.peekStatus(storeKey) & SC.Record.READY_CLEAN;
|
55
55
|
ok(isStatusCorrect, "Record is in SC.Record.READY_CLEAN state after loading into store.");
|
56
|
-
|
56
|
+
|
57
57
|
// Change the record
|
58
58
|
aDataHash['age'] = 40;
|
59
59
|
var storeKeyAfterUpdate = store.loadRecord(Person, aDataHash);
|
60
60
|
ok(storeKey === storeKeyAfterUpdate, "When the same record is loaded a second time its store key remains unchanged.");
|
61
|
-
|
61
|
+
|
62
62
|
var record = store.materializeRecord(storeKey);
|
63
|
-
ok(record.get('age') === 40, "Record in store is updated with new values from data hash.");
|
63
|
+
ok(record.get('age') === 40, "Record in store is updated with new values from data hash.");
|
64
|
+
});
|
65
|
+
|
66
|
+
test("The data hash of the record should be correct BEFORE the status changes.", function () {
|
67
|
+
var rec1;
|
68
|
+
var aDataHash = dataHashes[0];
|
69
|
+
var storeKey = store.loadRecord(Person, aDataHash);
|
70
|
+
|
71
|
+
store.set('dataSource', SC.DataSource.create({
|
72
|
+
retrieveRecords: function () { return true; }
|
73
|
+
}));
|
74
|
+
|
75
|
+
//create record
|
76
|
+
rec1 = store.materializeRecord(storeKey);
|
77
|
+
|
78
|
+
rec1.addObserver('status', function () {
|
79
|
+
if (this.get('status') === SC.Record.READY_CLEAN) {
|
80
|
+
equals(this.get('last'), "Post-Sproutish", "The string attribute should be correct since the status has updated.");
|
81
|
+
}
|
82
|
+
});
|
83
|
+
|
84
|
+
SC.run(function () {
|
85
|
+
rec1.refresh();
|
86
|
+
});
|
87
|
+
|
88
|
+
store.loadRecord(Person, {guid: 1 , first: "John", last: "Post-Sproutish", age: 35 , isAlive: true}, 1);
|
64
89
|
});
|
@@ -3,20 +3,20 @@
|
|
3
3
|
// Copyright: ©2006-2011 Apple Inc. and contributors.
|
4
4
|
// License: Licensed under MIT license (see license.js)
|
5
5
|
// ==========================================================================
|
6
|
-
/*
|
6
|
+
/*global module ok equals test */
|
7
7
|
|
8
|
-
var store,
|
8
|
+
var store, storeKey1, storeKey2, storeKey3, storeKey4, storeKey5, storeKey6, json;
|
9
9
|
module("SC.Store#pushChanges", {
|
10
|
-
setup: function() {
|
10
|
+
setup: function () {
|
11
11
|
SC.RunLoop.begin();
|
12
12
|
store = SC.Store.create();
|
13
|
-
|
13
|
+
|
14
14
|
json = {
|
15
15
|
string: "string",
|
16
16
|
number: 23,
|
17
17
|
bool: YES
|
18
18
|
};
|
19
|
-
|
19
|
+
|
20
20
|
storeKey1 = SC.Store.generateStoreKey();
|
21
21
|
store.writeDataHash(storeKey1, json, SC.Record.EMPTY);
|
22
22
|
|
@@ -35,43 +35,48 @@ module("SC.Store#pushChanges", {
|
|
35
35
|
storeKey6 = SC.Store.generateStoreKey();
|
36
36
|
store.writeDataHash(storeKey6, json, SC.Record.BUSY_LOADING);
|
37
37
|
SC.RunLoop.end();
|
38
|
+
},
|
39
|
+
|
40
|
+
teardown: function () {
|
41
|
+
store.destroy();
|
42
|
+
store = json = null;
|
38
43
|
}
|
39
44
|
});
|
40
45
|
|
41
|
-
test("Do a pushRetrieve and check if there is conflicts", function() {
|
46
|
+
test("Do a pushRetrieve and check if there is conflicts", function () {
|
42
47
|
var res = store.pushRetrieve(SC.Record, undefined, undefined, storeKey1);
|
43
48
|
equals(res, storeKey1, "There is no conflict, pushRetrieve was succesful.");
|
44
49
|
res = store.pushRetrieve(SC.Record, undefined, undefined, storeKey4);
|
45
50
|
ok(!res, "There is a conflict, because of the state, this is expected.");
|
46
51
|
});
|
47
52
|
|
48
|
-
test("Do a pushDestroy and check if there is conflicts", function() {
|
53
|
+
test("Do a pushDestroy and check if there is conflicts", function () {
|
49
54
|
var res = store.pushDestroy(SC.Record, undefined, storeKey2);
|
50
55
|
equals(res, storeKey2, "There is no conflict, pushDestroy was succesful.");
|
51
56
|
res = store.pushRetrieve(SC.Record, undefined, undefined, storeKey5);
|
52
57
|
ok(!res, "There is a conflict, because of the state, this is expected.");
|
53
58
|
});
|
54
59
|
|
55
|
-
test("Issue a pushError and check if there is conflicts", function() {
|
60
|
+
test("Issue a pushError and check if there is conflicts", function () {
|
56
61
|
var res = store.pushError(SC.Record, undefined, SC.Record.NOT_FOUND_ERROR, storeKey3);
|
57
62
|
equals(res, storeKey3, "There is no conflict, pushError was succesful.");
|
58
63
|
res = store.pushRetrieve(SC.Record, undefined, undefined, storeKey6);
|
59
64
|
ok(!res, "There is a conflict, because of the state, this is expected.");
|
60
65
|
});
|
61
66
|
|
62
|
-
test("A pushRetrieve updating the id of an existing record should update the primary Key cache", function(){
|
67
|
+
test("A pushRetrieve updating the id of an existing record should update the primary Key cache", function () {
|
63
68
|
var tmpid, recFirst, recSecond, sK;
|
64
|
-
|
69
|
+
|
65
70
|
tmpid = "@2345235asddsgfd";
|
66
71
|
recFirst = { firstname: 'me', lastname: 'too', guid: tmpid };
|
67
72
|
recSecond = { firstname: 'me', lastname: 'too', guid: 1 };
|
68
73
|
SC.RunLoop.begin();
|
69
|
-
|
74
|
+
|
75
|
+
sK = store.loadRecord(SC.Record, recFirst, tmpid);
|
70
76
|
SC.RunLoop.end();
|
71
|
-
equals(store.idFor(sK),tmpid); //check whether the id is indeed tmpid
|
77
|
+
equals(store.idFor(sK), tmpid); //check whether the id is indeed tmpid
|
72
78
|
SC.RunLoop.begin();
|
73
|
-
store.pushRetrieve(SC.Record,1,recSecond,sK);
|
79
|
+
store.pushRetrieve(SC.Record, 1, recSecond, sK);
|
74
80
|
SC.RunLoop.end();
|
75
|
-
equals(store.idFor(sK),1); // id should now have been updated
|
81
|
+
equals(store.idFor(sK), 1); // id should now have been updated
|
76
82
|
});
|
77
|
-
|
@@ -16,7 +16,7 @@ SC.SCANNER_OUT_OF_BOUNDS_ERROR = new Error("Out of bounds.");
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
Standard error thrown by `SC.Scanner` when you pass a value not an integer.
|
19
|
-
|
19
|
+
|
20
20
|
@static
|
21
21
|
@constant
|
22
22
|
@type Error
|
@@ -25,15 +25,15 @@ SC.SCANNER_INT_ERROR = new Error("Not an int.");
|
|
25
25
|
|
26
26
|
/**
|
27
27
|
Standard error thrown by `SC.SCanner` when it cannot find a string to skip.
|
28
|
-
|
28
|
+
|
29
29
|
@static
|
30
30
|
@constant
|
31
31
|
@type Error
|
32
32
|
*/
|
33
33
|
SC.SCANNER_SKIP_ERROR = new Error("Did not find the string to skip.");
|
34
34
|
|
35
|
-
/**
|
36
|
-
Standard error thrown by `SC.Scanner` when it can any kind a string in the
|
35
|
+
/**
|
36
|
+
Standard error thrown by `SC.Scanner` when it can any kind a string in the
|
37
37
|
matching array.
|
38
38
|
|
39
39
|
@static
|
@@ -43,7 +43,7 @@ SC.SCANNER_SKIP_ERROR = new Error("Did not find the string to skip.");
|
|
43
43
|
SC.SCANNER_SCAN_ARRAY_ERROR = new Error("Did not find any string of the given array to scan.");
|
44
44
|
|
45
45
|
/**
|
46
|
-
Standard error thrown when trying to compare two dates in different
|
46
|
+
Standard error thrown when trying to compare two dates in different
|
47
47
|
timezones.
|
48
48
|
|
49
49
|
@static
|
@@ -69,38 +69,38 @@ SC.DATETIME_ISO8601 = '%Y-%m-%dT%H:%M:%S%Z';
|
|
69
69
|
assign the scanner's string on initialization and the scanner progresses
|
70
70
|
through the characters of that string from beginning to end as you request
|
71
71
|
items.
|
72
|
-
|
72
|
+
|
73
73
|
Scanners are used by `DateTime` to convert strings into `DateTime` objects.
|
74
|
-
|
74
|
+
|
75
75
|
@extends SC.Object
|
76
76
|
@since SproutCore 1.0
|
77
77
|
@author Martin Ottenwaelter
|
78
78
|
*/
|
79
79
|
SC.Scanner = SC.Object.extend(
|
80
80
|
/** @scope SC.Scanner.prototype */ {
|
81
|
-
|
81
|
+
|
82
82
|
/**
|
83
83
|
The string to scan. You usually pass it to the create method:
|
84
|
-
|
84
|
+
|
85
85
|
SC.Scanner.create({string: 'May, 8th'});
|
86
|
-
|
86
|
+
|
87
87
|
@type String
|
88
88
|
*/
|
89
89
|
string: null,
|
90
|
-
|
90
|
+
|
91
91
|
/**
|
92
92
|
The current scan location. It is incremented by the scanner as the
|
93
93
|
characters are processed.
|
94
94
|
The default is 0: the beginning of the string.
|
95
|
-
|
95
|
+
|
96
96
|
@type Integer
|
97
97
|
*/
|
98
98
|
scanLocation: 0,
|
99
|
-
|
99
|
+
|
100
100
|
/**
|
101
101
|
Reads some characters from the string, and increments the scan location
|
102
|
-
accordingly.
|
103
|
-
|
102
|
+
accordingly.
|
103
|
+
|
104
104
|
@param {Integer} len The amount of characters to read
|
105
105
|
@throws {SC.SCANNER_OUT_OF_BOUNDS_ERROR} If asked to read too many characters
|
106
106
|
@returns {String} The characters
|
@@ -111,10 +111,10 @@ SC.Scanner = SC.Object.extend(
|
|
111
111
|
this.scanLocation += len;
|
112
112
|
return str;
|
113
113
|
},
|
114
|
-
|
114
|
+
|
115
115
|
/**
|
116
116
|
Reads some characters from the string and interprets it as an integer.
|
117
|
-
|
117
|
+
|
118
118
|
@param {Integer} min_len The minimum amount of characters to read
|
119
119
|
@param {Integer} [max_len] The maximum amount of characters to read (defaults to the minimum)
|
120
120
|
@throws {SC.SCANNER_INT_ERROR} If asked to read non numeric characters
|
@@ -131,10 +131,10 @@ SC.Scanner = SC.Object.extend(
|
|
131
131
|
}
|
132
132
|
return parseInt(match[0], 10);
|
133
133
|
},
|
134
|
-
|
134
|
+
|
135
135
|
/**
|
136
136
|
Attempts to skip a given string.
|
137
|
-
|
137
|
+
|
138
138
|
@param {String} str The string to skip
|
139
139
|
@throws {SC.SCANNER_SKIP_ERROR} If the given string could not be scanned
|
140
140
|
@returns {Boolean} YES if the given string was successfully scanned, NO otherwise
|
@@ -143,10 +143,10 @@ SC.Scanner = SC.Object.extend(
|
|
143
143
|
if (this.scan(str.length) !== str) throw SC.SCANNER_SKIP_ERROR;
|
144
144
|
return YES;
|
145
145
|
},
|
146
|
-
|
146
|
+
|
147
147
|
/**
|
148
148
|
Attempts to scan any string in a given array.
|
149
|
-
|
149
|
+
|
150
150
|
@param {Array} ary the array of strings to scan
|
151
151
|
@throws {SC.SCANNER_SCAN_ARRAY_ERROR} If no string of the given array is found
|
152
152
|
@returns {Integer} The index of the scanned string of the given array
|
@@ -160,7 +160,7 @@ SC.Scanner = SC.Object.extend(
|
|
160
160
|
}
|
161
161
|
throw SC.SCANNER_SCAN_ARRAY_ERROR;
|
162
162
|
}
|
163
|
-
|
163
|
+
|
164
164
|
});
|
165
165
|
|
166
166
|
|
@@ -178,27 +178,27 @@ SC.Scanner = SC.Object.extend(
|
|
178
178
|
// Creates a DateTime representing 5am in Washington, DC and 10am in London
|
179
179
|
var d = SC.DateTime.create({ hour: 5, timezone: 300 }); // -5 hours from UTC
|
180
180
|
var e = SC.DateTime.create({ hour: 10, timezone: 0 }); // same time, specified in UTC
|
181
|
-
|
181
|
+
|
182
182
|
and it is true that `d.isEqual(e)`.
|
183
183
|
|
184
184
|
The time zone specified upon creation is permanent, and any calls to
|
185
185
|
`get()` on that instance will return values expressed in that time zone. So,
|
186
|
-
|
186
|
+
|
187
187
|
d.get('hour') returns 5.
|
188
188
|
e.get('hour') returns 10.
|
189
|
-
|
189
|
+
|
190
190
|
but
|
191
|
-
|
191
|
+
|
192
192
|
d.get('milliseconds') === e.get('milliseconds')
|
193
|
-
|
193
|
+
|
194
194
|
is true, since they are technically the same position in time.
|
195
|
-
|
196
|
-
You can also use SC.DateTime as a record attribute on a data model.
|
197
|
-
|
195
|
+
|
196
|
+
You can also use SC.DateTime as a record attribute on a data model.
|
197
|
+
|
198
198
|
SC.Record.attr(SC.DateTime); // Default format is ISO8601. See `SC.DateTime.recordFormat`
|
199
199
|
SC.Record.attr(SC.DateTime, { format: '%d/%m/%Y' }); // Attribute stored as a string in '%d/%m/%Y' format
|
200
|
-
SC.Record.attr(SC.DateTime, { useUnixTime: YES }); // Attribute stored as a number in Unix time
|
201
|
-
|
200
|
+
SC.Record.attr(SC.DateTime, { useUnixTime: YES }); // Attribute stored as a number in Unix time
|
201
|
+
|
202
202
|
@extends SC.Object
|
203
203
|
@extends SC.Freezable
|
204
204
|
@extends SC.Copyable
|
@@ -209,13 +209,13 @@ SC.Scanner = SC.Object.extend(
|
|
209
209
|
*/
|
210
210
|
SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
211
211
|
/** @scope SC.DateTime.prototype */ {
|
212
|
-
|
212
|
+
|
213
213
|
/**
|
214
214
|
@private
|
215
215
|
|
216
216
|
Internal representation of a date: the number of milliseconds
|
217
217
|
since January, 1st 1970 00:00:00.0 UTC.
|
218
|
-
|
218
|
+
|
219
219
|
@property
|
220
220
|
@type {Integer}
|
221
221
|
*/
|
@@ -229,7 +229,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
229
229
|
@type Integer
|
230
230
|
*/
|
231
231
|
timezone: 0,
|
232
|
-
|
232
|
+
|
233
233
|
/**
|
234
234
|
A `SC.DateTime` instance is frozen by default for better performance.
|
235
235
|
|
@@ -251,7 +251,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
251
251
|
Note that passing only a time zone does not affect the actual milliseconds since
|
252
252
|
Jan 1, 1970, only the time zone in which it is expressed when displayed.
|
253
253
|
|
254
|
-
@see SC.DateTime
|
254
|
+
@see SC.DateTime.create for the list of options you can pass
|
255
255
|
@returns {SC.DateTime} copy of receiver
|
256
256
|
*/
|
257
257
|
adjust: function(options, resetCascadingly) {
|
@@ -267,7 +267,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
267
267
|
Returns a new `SC.DateTime` object advanced according the the given parameters.
|
268
268
|
Don't use floating point values, it might give unpredictable results.
|
269
269
|
|
270
|
-
@see SC.DateTime
|
270
|
+
@see SC.DateTime.create for the list of options you can pass
|
271
271
|
@param {Hash} options the amount of date/time to advance the receiver
|
272
272
|
@returns {DateTime} copy of the receiver
|
273
273
|
*/
|
@@ -279,6 +279,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
279
279
|
Generic getter.
|
280
280
|
|
281
281
|
The properties you can get are:
|
282
|
+
|
282
283
|
- `year`
|
283
284
|
- `month` (January is 1, contrary to JavaScript Dates for which January is 0)
|
284
285
|
- `day`
|
@@ -289,6 +290,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
289
290
|
- `millisecond`
|
290
291
|
- `milliseconds`, the number of milliseconds since
|
291
292
|
January, 1st 1970 00:00:00.0 UTC
|
293
|
+
- `elapsed`, the number of milliseconds until (-), or since (+), the date.
|
292
294
|
- `isLeapYear`, a boolean value indicating whether the receiver's year
|
293
295
|
is a leap year
|
294
296
|
- `daysInMonth`, the number of days of the receiver's current month
|
@@ -313,36 +315,94 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
313
315
|
like the C strftime function.
|
314
316
|
|
315
317
|
The format parameter can contain the following characters:
|
316
|
-
|
317
|
-
-
|
318
|
-
-
|
319
|
-
-
|
320
|
-
-
|
321
|
-
-
|
322
|
-
-
|
323
|
-
-
|
324
|
-
-
|
325
|
-
-
|
326
|
-
-
|
327
|
-
-
|
328
|
-
-
|
329
|
-
-
|
330
|
-
-
|
331
|
-
-
|
332
|
-
-
|
333
|
-
-
|
318
|
+
|
319
|
+
- `%a` -- The abbreviated weekday name ("Sun")
|
320
|
+
- `%A` -- The full weekday name ("Sunday")
|
321
|
+
- `%b` -- The abbreviated month name ("Jan")
|
322
|
+
- `%B` -- The full month name ("January")
|
323
|
+
- `%c` -- The preferred local date and time representation
|
324
|
+
- `%d` -- Day of the month (01..31)
|
325
|
+
- `%D` -- Day of the month (0..31)
|
326
|
+
- `%E` -- Elapsed time, according to localized text formatting strings. See below.
|
327
|
+
- `%h` -- Hour of the day, 24-hour clock (0..23)
|
328
|
+
- `%H` -- Hour of the day, 24-hour clock (00..23)
|
329
|
+
- `%i` -- Hour of the day, 12-hour clock (1..12)
|
330
|
+
- `%I` -- Hour of the day, 12-hour clock (01..12)
|
331
|
+
- `%j` -- Day of the year (001..366)
|
332
|
+
- `%m` -- Month of the year (01..12)
|
333
|
+
- `%M` -- Minute of the hour (00..59)
|
334
|
+
- `%p` -- Meridian indicator ("AM" or "PM")
|
335
|
+
- `%S` -- Second of the minute (00..60)
|
336
|
+
- `%s` -- Milliseconds of the second (000..999)
|
337
|
+
- `%U` -- Week number of the current year,
|
334
338
|
starting with the first Sunday as the first
|
335
339
|
day of the first week (00..53)
|
336
|
-
-
|
337
|
-
starting with the first Monday as the first
|
340
|
+
- `%W` -- Week number of the current year,
|
341
|
+
starting with the first Monday as the first
|
338
342
|
day of the first week (00..53)
|
339
|
-
-
|
340
|
-
-
|
341
|
-
-
|
342
|
-
-
|
343
|
-
-
|
344
|
-
-
|
345
|
-
-
|
343
|
+
- `%w` -- Day of the week (Sunday is 0, 0..6)
|
344
|
+
- `%x` -- Preferred representation for the date alone, no time
|
345
|
+
- `%X` -- Preferred representation for the time alone, no date
|
346
|
+
- `%y` -- Year without a century (00..99)
|
347
|
+
- `%Y` -- Year with century
|
348
|
+
- `%Z` -- Time zone (ISO 8601 formatted)
|
349
|
+
- `%%` -- Literal "%" character
|
350
|
+
|
351
|
+
The Elapsed date format is a special, SproutCore specific formatting
|
352
|
+
feature which will return an accurate-ish, human readable indication
|
353
|
+
of elapsed time. For example, it might return "In 5 minutes", or "A year
|
354
|
+
ago".
|
355
|
+
|
356
|
+
For example,
|
357
|
+
|
358
|
+
var date = SC.DateTime.create();
|
359
|
+
|
360
|
+
date.toFormattedString("%E"); // "Right now"
|
361
|
+
|
362
|
+
date.advance({ minute: 4 });
|
363
|
+
date.toFormattedString("%E"); // "In 4 minutes"
|
364
|
+
|
365
|
+
date.advance({ day: -7 });
|
366
|
+
date.toFormattedString("%E"); // "About a week ago"
|
367
|
+
|
368
|
+
To customize the output for the %E formatter, override the date
|
369
|
+
localization strings inside of in your app. The English localization
|
370
|
+
strings used are:
|
371
|
+
|
372
|
+
'_SC.DateTime.now' : 'Right now',
|
373
|
+
'_SC.DateTime.secondIn' : 'In a moment',
|
374
|
+
'_SC.DateTime.secondsIn' : 'In %e seconds',
|
375
|
+
'_SC.DateTime.minuteIn' : 'In a minute',
|
376
|
+
'_SC.DateTime.minutesIn' : 'In %e minutes',
|
377
|
+
'_SC.DateTime.hourIn' : 'An hour from now',
|
378
|
+
'_SC.DateTime.hoursIn' : 'In about %e hours',
|
379
|
+
'_SC.DateTime.dayIn' : 'Tomorrow at %i:%M %p',
|
380
|
+
'_SC.DateTime.daysIn' : '%A at %i:%M %p',
|
381
|
+
'_SC.DateTime.weekIn' : 'Next week',
|
382
|
+
'_SC.DateTime.weeksIn' : 'In %e weeks',
|
383
|
+
'_SC.DateTime.monthIn' : 'Next month',
|
384
|
+
'_SC.DateTime.monthsIn' : 'In %e months',
|
385
|
+
'_SC.DateTime.yearIn' : 'Next year',
|
386
|
+
'_SC.DateTime.yearsIn' : 'In %e years',
|
387
|
+
|
388
|
+
'_SC.DateTime.secondAgo' : 'A moment ago',
|
389
|
+
'_SC.DateTime.secondsAgo' : '%e seconds ago',
|
390
|
+
'_SC.DateTime.minuteAgo' : 'A minute ago',
|
391
|
+
'_SC.DateTime.minutesAgo' : '%e minutes ago',
|
392
|
+
'_SC.DateTime.hourAgo' : 'An hour ago',
|
393
|
+
'_SC.DateTime.hoursAgo' : 'About %e hours ago',
|
394
|
+
'_SC.DateTime.dayAgo' : 'Yesterday at %i:%M %p',
|
395
|
+
'_SC.DateTime.daysAgo' : '%A at %i:%M %p',
|
396
|
+
'_SC.DateTime.weekAgo' : 'About a week ago',
|
397
|
+
'_SC.DateTime.weeksAgo' : '%e weeks ago',
|
398
|
+
'_SC.DateTime.monthAgo' : 'About a month ago',
|
399
|
+
'_SC.DateTime.monthsAgo' : '%e months ago',
|
400
|
+
'_SC.DateTime.yearAgo' : 'Last year',
|
401
|
+
'_SC.DateTime.yearsAgo' : '%e years ago'
|
402
|
+
|
403
|
+
Notice the special "%e" parameter in the localized strings. This will be
|
404
|
+
replaced with the number of intervals (seconds, minutes, weeks, etc) that
|
405
|
+
are appropriate.
|
346
406
|
|
347
407
|
@param {String} format the format string
|
348
408
|
@return {String} the formatted string
|
@@ -370,7 +430,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
370
430
|
`SC.DateTime` is designed, calling `SC.DateTime._toFormattedString` would
|
371
431
|
have a nasty side effect. We shouldn't therefore call any of
|
372
432
|
`SC.DateTime`'s methods from `toString`)
|
373
|
-
|
433
|
+
|
374
434
|
@returns {String}
|
375
435
|
*/
|
376
436
|
toString: function() {
|
@@ -379,7 +439,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
379
439
|
", timezone: " +
|
380
440
|
this.timezone;
|
381
441
|
},
|
382
|
-
|
442
|
+
|
383
443
|
/**
|
384
444
|
Returns `YES` if the passed `SC.DateTime` is equal to the receiver, ie: if their
|
385
445
|
number of milliseconds since January, 1st 1970 00:00:00.0 UTC are equal.
|
@@ -402,7 +462,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
402
462
|
copy: function() {
|
403
463
|
return this;
|
404
464
|
},
|
405
|
-
|
465
|
+
|
406
466
|
/**
|
407
467
|
Returns a copy of the receiver with the timezone set to the passed
|
408
468
|
timezone. The returned value is equal to the receiver (ie `SC.Compare`
|
@@ -421,7 +481,7 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
|
|
421
481
|
if (timezone === undefined) timezone = 0;
|
422
482
|
return this.advance({ timezone: timezone - this.timezone });
|
423
483
|
}
|
424
|
-
|
484
|
+
|
425
485
|
});
|
426
486
|
|
427
487
|
SC.DateTime.mixin(SC.Comparable,
|
@@ -447,7 +507,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
447
507
|
@default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
448
508
|
*/
|
449
509
|
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
450
|
-
|
510
|
+
|
451
511
|
/**
|
452
512
|
@private
|
453
513
|
|
@@ -456,7 +516,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
456
516
|
@type Array
|
457
517
|
*/
|
458
518
|
_englishDayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
459
|
-
|
519
|
+
|
460
520
|
/**
|
461
521
|
@type Array
|
462
522
|
@default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
@@ -474,13 +534,13 @@ SC.DateTime.mixin(SC.Comparable,
|
|
474
534
|
@default ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
475
535
|
*/
|
476
536
|
abbreviatedMonthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
477
|
-
|
537
|
+
|
478
538
|
/**
|
479
539
|
@type Array
|
480
540
|
@default ['AM', 'PM']
|
481
541
|
*/
|
482
542
|
AMPMNames:['AM', 'PM'],
|
483
|
-
|
543
|
+
|
484
544
|
/**
|
485
545
|
@private
|
486
546
|
|
@@ -509,7 +569,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
509
569
|
@type Integer
|
510
570
|
*/
|
511
571
|
_tz: 0,
|
512
|
-
|
572
|
+
|
513
573
|
/**
|
514
574
|
The offset, in minutes, between UTC and the local system time. This
|
515
575
|
property is computed at loading time and should never be changed.
|
@@ -519,7 +579,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
519
579
|
@constant
|
520
580
|
*/
|
521
581
|
timezone: new Date().getTimezoneOffset(),
|
522
|
-
|
582
|
+
|
523
583
|
/**
|
524
584
|
@private
|
525
585
|
|
@@ -530,7 +590,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
530
590
|
@type Array
|
531
591
|
*/
|
532
592
|
_dt_cache: {},
|
533
|
-
|
593
|
+
|
534
594
|
/**
|
535
595
|
@private
|
536
596
|
|
@@ -628,7 +688,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
628
688
|
suffix = key.slice(4);
|
629
689
|
if (prefix === 'last' || prefix === 'next') {
|
630
690
|
currentWeekday = this._get('dayOfWeek', start, timezone);
|
631
|
-
targetWeekday = this._englishDayNames.indexOf(suffix);
|
691
|
+
targetWeekday = this._englishDayNames.indexOf(suffix);
|
632
692
|
if (targetWeekday >= 0) {
|
633
693
|
var delta = targetWeekday - currentWeekday;
|
634
694
|
if (prefix === 'last' && delta >= 0) delta -= 7;
|
@@ -673,6 +733,9 @@ SC.DateTime.mixin(SC.Comparable,
|
|
673
733
|
case 'millisecond':
|
674
734
|
v = d.getUTCMilliseconds();
|
675
735
|
break;
|
736
|
+
case 'elapsed':
|
737
|
+
v = +new Date() - d.getTime() - (timezone * 60000);
|
738
|
+
break;
|
676
739
|
}
|
677
740
|
|
678
741
|
// isLeapYear
|
@@ -745,7 +808,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
745
808
|
this._setCalcState(ms, timezone);
|
746
809
|
return this; // for chaining
|
747
810
|
},
|
748
|
-
|
811
|
+
|
749
812
|
/**
|
750
813
|
@private
|
751
814
|
@see SC.DateTime#advance
|
@@ -764,7 +827,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
764
827
|
|
765
828
|
return this._adjust(opts, start, tz, NO);
|
766
829
|
},
|
767
|
-
|
830
|
+
|
768
831
|
/*
|
769
832
|
@private
|
770
833
|
|
@@ -835,7 +898,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
835
898
|
// to move back to real UTC.
|
836
899
|
d.setTime(ms + (tz * 60000));
|
837
900
|
ms = d.getTime(); // now get the corrected milliseconds value
|
838
|
-
|
901
|
+
|
839
902
|
// Restore what was there previously before leaving in case someone called this method
|
840
903
|
// in the middle of another calculation.
|
841
904
|
d.setTime(previousMilliseconds);
|
@@ -907,7 +970,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
907
970
|
});
|
908
971
|
}
|
909
972
|
},
|
910
|
-
|
973
|
+
|
911
974
|
/**
|
912
975
|
@private
|
913
976
|
|
@@ -921,7 +984,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
921
984
|
timezone: this._tz
|
922
985
|
});
|
923
986
|
},
|
924
|
-
|
987
|
+
|
925
988
|
/**
|
926
989
|
Returns a `SC.DateTime` object created from a given string parsed with a given
|
927
990
|
format. Returns `null` if the parsing fails.
|
@@ -946,24 +1009,26 @@ SC.DateTime.mixin(SC.Comparable,
|
|
946
1009
|
case 'A': check.dayOfWeek = scanner.scanArray(this.dayNames); break;
|
947
1010
|
case 'b': opts.month = scanner.scanArray(this.abbreviatedMonthNames) + 1; break;
|
948
1011
|
case 'B': opts.month = scanner.scanArray(this.monthNames) + 1; break;
|
949
|
-
case 'c': throw "%c is not implemented";
|
1012
|
+
case 'c': throw new Error("%c is not implemented");
|
950
1013
|
case 'd':
|
951
1014
|
case 'D': opts.day = scanner.scanInt(1, 2); break;
|
1015
|
+
case 'e': throw new Error("%e is not implemented");
|
1016
|
+
case 'E': throw new Error("%E is not implemented");
|
952
1017
|
case 'h':
|
953
1018
|
case 'H': opts.hour = scanner.scanInt(1, 2); break;
|
954
1019
|
case 'i':
|
955
1020
|
case 'I': opts.hour = scanner.scanInt(1, 2); break;
|
956
|
-
case 'j': throw "%j is not implemented";
|
1021
|
+
case 'j': throw new Error("%j is not implemented");
|
957
1022
|
case 'm': opts.month = scanner.scanInt(1, 2); break;
|
958
1023
|
case 'M': opts.minute = scanner.scanInt(1, 2); break;
|
959
1024
|
case 'p': opts.meridian = scanner.scanArray(this.AMPMNames); break;
|
960
1025
|
case 'S': opts.second = scanner.scanInt(1, 2); break;
|
961
1026
|
case 's': opts.millisecond = scanner.scanInt(1, 3); break;
|
962
|
-
case 'U': throw "%U is not implemented";
|
963
|
-
case 'W': throw "%W is not implemented";
|
964
|
-
case 'w': throw "%w is not implemented";
|
965
|
-
case 'x': throw "%x is not implemented";
|
966
|
-
case 'X': throw "%X is not implemented";
|
1027
|
+
case 'U': throw new Error("%U is not implemented");
|
1028
|
+
case 'W': throw new Error("%W is not implemented");
|
1029
|
+
case 'w': throw new Error("%w is not implemented");
|
1030
|
+
case 'x': throw new Error("%x is not implemented");
|
1031
|
+
case 'X': throw new Error("%X is not implemented");
|
967
1032
|
case 'y': opts.year = scanner.scanInt(2); opts.year += (opts.year > 70 ? 1900 : 2000); break;
|
968
1033
|
case 'Y': opts.year = scanner.scanInt(4); break;
|
969
1034
|
case 'Z':
|
@@ -1008,7 +1073,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
1008
1073
|
|
1009
1074
|
Converts the x parameter into a string padded with 0s so that the string’s
|
1010
1075
|
length is at least equal to the len parameter.
|
1011
|
-
|
1076
|
+
|
1012
1077
|
@param {Object} x the object to convert to a string
|
1013
1078
|
@param {Integer} the minimum length of the returned string
|
1014
1079
|
@returns {String} the padded string
|
@@ -1043,12 +1108,13 @@ SC.DateTime.mixin(SC.Comparable,
|
|
1043
1108
|
case 'c': return this._date.toString();
|
1044
1109
|
case 'd': return this._pad(this._get('day'));
|
1045
1110
|
case 'D': return this._get('day');
|
1111
|
+
case 'E': return this._toFormattedString(this.__getElapsedStringFormat(start, timezone), start, timezone);
|
1046
1112
|
case 'h': return this._get('hour');
|
1047
1113
|
case 'H': return this._pad(this._get('hour'));
|
1048
1114
|
case 'i':
|
1049
1115
|
hour = this._get('hour');
|
1050
1116
|
return (hour === 12 || hour === 0) ? 12 : (hour + 12) % 12;
|
1051
|
-
case 'I':
|
1117
|
+
case 'I':
|
1052
1118
|
hour = this._get('hour');
|
1053
1119
|
return this._pad((hour === 12 || hour === 0) ? 12 : (hour + 12) % 12);
|
1054
1120
|
case 'j': return this._pad(this._get('dayOfYear'), 3);
|
@@ -1086,12 +1152,20 @@ SC.DateTime.mixin(SC.Comparable,
|
|
1086
1152
|
// need to move into local time zone for these calculations
|
1087
1153
|
this._setCalcState(start - (timezone * 60000), 0); // so simulate a shifted 'UTC' time
|
1088
1154
|
|
1089
|
-
return format.replace(/\%([
|
1155
|
+
return format.replace(/\%([aAbBcdeEDhHiIjmMpsSUWwxXyYZ\%])/g, function() {
|
1090
1156
|
var v = that.__toFormattedString.call(that, arguments, start, timezone);
|
1091
1157
|
return v;
|
1092
1158
|
});
|
1093
1159
|
},
|
1094
1160
|
|
1161
|
+
/**
|
1162
|
+
@private
|
1163
|
+
@see SC.DateTime#toFormattedString
|
1164
|
+
*/
|
1165
|
+
__getElapsedStringFormat: function(start, timezone) {
|
1166
|
+
return "";
|
1167
|
+
},
|
1168
|
+
|
1095
1169
|
/**
|
1096
1170
|
This will tell you which of the two passed `DateTime` is greater by
|
1097
1171
|
comparing their number of milliseconds since
|
@@ -1099,11 +1173,12 @@ SC.DateTime.mixin(SC.Comparable,
|
|
1099
1173
|
|
1100
1174
|
@param {SC.DateTime} a the first DateTime instance
|
1101
1175
|
@param {SC.DateTime} b the second DateTime instance
|
1102
|
-
@returns {Integer} -1 if a < b,
|
1176
|
+
@returns {Integer} -1 if a < b,
|
1103
1177
|
+1 if a > b,
|
1104
1178
|
0 if a == b
|
1105
1179
|
*/
|
1106
1180
|
compare: function(a, b) {
|
1181
|
+
if (SC.none(a) || SC.none(b)) throw new Error("You must pass two valid dates to compare()");
|
1107
1182
|
var ma = a.get('milliseconds');
|
1108
1183
|
var mb = b.get('milliseconds');
|
1109
1184
|
return ma < mb ? -1 : ma === mb ? 0 : 1;
|
@@ -1123,12 +1198,50 @@ SC.DateTime.mixin(SC.Comparable,
|
|
1123
1198
|
don't have the same timezone
|
1124
1199
|
*/
|
1125
1200
|
compareDate: function(a, b) {
|
1201
|
+
if (SC.none(a) || SC.none(b)) throw new Error("You must pass two valid dates to compareDate()");
|
1126
1202
|
if (a.get('timezone') !== b.get('timezone')) throw SC.DATETIME_COMPAREDATE_TIMEZONE_ERROR;
|
1127
1203
|
var ma = a.adjust({hour: 0}).get('milliseconds');
|
1128
1204
|
var mb = b.adjust({hour: 0}).get('milliseconds');
|
1129
1205
|
return ma < mb ? -1 : ma === mb ? 0 : 1;
|
1206
|
+
},
|
1207
|
+
|
1208
|
+
/**
|
1209
|
+
Returns the interval of time between the two passed in DateTimes in units
|
1210
|
+
according to the format.
|
1211
|
+
|
1212
|
+
You can display the difference in weeks (w), days (d), hours (h), minutes (M)
|
1213
|
+
or seconds (S).
|
1214
|
+
|
1215
|
+
@param {SC.DateTime} a the first DateTime instance
|
1216
|
+
@param {SC.DateTime} b the second DateTime instance
|
1217
|
+
@param {String} format the interval to get the difference in
|
1218
|
+
*/
|
1219
|
+
difference: function(a, b, format) {
|
1220
|
+
if (SC.none(a) || SC.none(b)) throw new Error("You must pass two valid dates to difference()");
|
1221
|
+
var ma = a.get('milliseconds'),
|
1222
|
+
mb = b.get('milliseconds'),
|
1223
|
+
diff = mb - ma,
|
1224
|
+
divider;
|
1225
|
+
|
1226
|
+
switch(format) {
|
1227
|
+
case 'd':
|
1228
|
+
case 'D': divider = 864e5; break; // day: 1000 * 60 * 60 * 24
|
1229
|
+
case 'h':
|
1230
|
+
case 'H': divider = 36e5; break; // hour: 1000 * 60 * 60
|
1231
|
+
case 'M': divider = 6e4; break; // minute: 1000 * 60
|
1232
|
+
case 'S': divider = 1e3; break; // second: 1000
|
1233
|
+
case 's': divider = 1; break;
|
1234
|
+
case 'W': divider = 6048e5; break; // week: 1000 * 60 * 60 * 24 * 7
|
1235
|
+
default: throw format+" is not supported"; break;
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
var ret = diff/divider;
|
1239
|
+
|
1240
|
+
return Math.round(ret);
|
1130
1241
|
}
|
1131
1242
|
|
1243
|
+
|
1244
|
+
|
1132
1245
|
});
|
1133
1246
|
|
1134
1247
|
/**
|