sproutcore 1.9.2 → 1.10.0.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -37,7 +37,7 @@ SC.Copyable = /** @scope SC.Copyable.prototype */{
|
|
|
37
37
|
*/
|
|
38
38
|
copy: function(deep) {
|
|
39
39
|
var className = SC._object_className(this.constructor);
|
|
40
|
-
throw "%@.copy() is not implemented".fmt(className);
|
|
40
|
+
throw new Error("%@.copy() is not implemented".fmt(className));
|
|
41
41
|
},
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -56,7 +56,7 @@ SC.Copyable = /** @scope SC.Copyable.prototype */{
|
|
|
56
56
|
frozenCopy: function() {
|
|
57
57
|
var isFrozen = this.get ? this.get('isFrozen') : this.isFrozen;
|
|
58
58
|
if (isFrozen === YES) return this;
|
|
59
|
-
else if (isFrozen === undefined) throw "%@ does not support freezing".fmt(this);
|
|
59
|
+
else if (isFrozen === undefined) throw new Error("%@ does not support freezing".fmt(this));
|
|
60
60
|
else return this.copy().freeze();
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
|
6
6
|
// ==========================================================================
|
|
7
7
|
|
|
8
|
-
sc_require('core')
|
|
8
|
+
sc_require('core');
|
|
9
9
|
sc_require('ext/function');
|
|
10
10
|
sc_require('system/enumerator');
|
|
11
11
|
|
|
12
|
-
/*
|
|
12
|
+
/*global Prototype */
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
@class
|
|
@@ -90,8 +90,8 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
90
90
|
@param {Object} context a context object you can use to maintain state.
|
|
91
91
|
@returns {Object} the next object in the iteration or undefined
|
|
92
92
|
*/
|
|
93
|
-
nextObject: function(index, previousObject, context) {
|
|
94
|
-
return this.objectAt ? this.objectAt(index) : this[index]
|
|
93
|
+
nextObject: function (index, previousObject, context) {
|
|
94
|
+
return this.objectAt ? this.objectAt(index) : this[index];
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
/**
|
|
@@ -113,15 +113,15 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
113
113
|
|
|
114
114
|
@returns {Object} the object or undefined
|
|
115
115
|
*/
|
|
116
|
-
firstObject: function() {
|
|
117
|
-
if (this.get('length')===0) return undefined
|
|
116
|
+
firstObject: function () {
|
|
117
|
+
if (this.get('length') === 0) return undefined;
|
|
118
118
|
if (this.objectAt) return this.objectAt(0); // support arrays out of box
|
|
119
119
|
|
|
120
120
|
// handle generic enumerables
|
|
121
121
|
var context = SC.Enumerator._popContext(), ret;
|
|
122
122
|
ret = this.nextObject(0, null, context);
|
|
123
123
|
context = SC.Enumerator._pushContext(context);
|
|
124
|
-
return ret
|
|
124
|
+
return ret;
|
|
125
125
|
}.property().cacheable(),
|
|
126
126
|
|
|
127
127
|
/**
|
|
@@ -136,10 +136,10 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
136
136
|
|
|
137
137
|
@returns {Object} the object or undefined
|
|
138
138
|
*/
|
|
139
|
-
lastObject: function() {
|
|
139
|
+
lastObject: function () {
|
|
140
140
|
var len = this.get('length');
|
|
141
|
-
if (len===0) return undefined
|
|
142
|
-
if (this.objectAt) return this.objectAt(len-1); // support arrays out of box
|
|
141
|
+
if (len === 0) return undefined;
|
|
142
|
+
if (this.objectAt) return this.objectAt(len - 1); // support arrays out of box
|
|
143
143
|
}.property().cacheable(),
|
|
144
144
|
|
|
145
145
|
/**
|
|
@@ -149,7 +149,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
149
149
|
|
|
150
150
|
@returns {SC.Enumerator} an enumerator for the receiver
|
|
151
151
|
*/
|
|
152
|
-
enumerator: function() { return SC.Enumerator.create(this); },
|
|
152
|
+
enumerator: function () { return SC.Enumerator.create(this); },
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
Iterates through the enumerable, calling the passed function on each
|
|
@@ -159,7 +159,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
159
159
|
The callback method you provide should have the following signature (all
|
|
160
160
|
parameters are optional):
|
|
161
161
|
|
|
162
|
-
function(item, index, enumerable)
|
|
162
|
+
function (item, index, enumerable);
|
|
163
163
|
|
|
164
164
|
- *item* is the current item in the iteration.
|
|
165
165
|
- *index* is the current index in the iteration
|
|
@@ -173,21 +173,21 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
173
173
|
@param {Object} target the target object to use
|
|
174
174
|
@returns {Object} this
|
|
175
175
|
*/
|
|
176
|
-
forEach: function(callback, target) {
|
|
177
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
178
|
-
var len = this.get ? this.get('length') : this.length
|
|
176
|
+
forEach: function (callback, target) {
|
|
177
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
178
|
+
var len = this.get ? this.get('length') : this.length;
|
|
179
179
|
if (target === undefined) target = null;
|
|
180
180
|
|
|
181
|
-
var last = null
|
|
181
|
+
var last = null;
|
|
182
182
|
var context = SC.Enumerator._popContext();
|
|
183
|
-
for(var idx=0;idx<len;idx++) {
|
|
184
|
-
var next = this.nextObject(idx, last, context)
|
|
183
|
+
for (var idx = 0; idx < len;idx++) {
|
|
184
|
+
var next = this.nextObject(idx, last, context);
|
|
185
185
|
callback.call(target, next, idx, this);
|
|
186
|
-
last = next
|
|
186
|
+
last = next;
|
|
187
187
|
}
|
|
188
|
-
last = null
|
|
188
|
+
last = null;
|
|
189
189
|
context = SC.Enumerator._pushContext(context);
|
|
190
|
-
return this
|
|
190
|
+
return this;
|
|
191
191
|
},
|
|
192
192
|
|
|
193
193
|
/**
|
|
@@ -199,8 +199,8 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
199
199
|
@param {String} key the key to retrieve
|
|
200
200
|
@returns {Array} extracted values
|
|
201
201
|
*/
|
|
202
|
-
getEach: function(key) {
|
|
203
|
-
return this.map(function(next) {
|
|
202
|
+
getEach: function (key) {
|
|
203
|
+
return this.map(function (next) {
|
|
204
204
|
return next ? (next.get ? next.get(key) : next[key]) : null;
|
|
205
205
|
}, this);
|
|
206
206
|
},
|
|
@@ -215,14 +215,14 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
215
215
|
@param {Object} value the object to set
|
|
216
216
|
@returns {Object} receiver
|
|
217
217
|
*/
|
|
218
|
-
setEach: function(key, value) {
|
|
219
|
-
this.forEach(function(next) {
|
|
218
|
+
setEach: function (key, value) {
|
|
219
|
+
this.forEach(function (next) {
|
|
220
220
|
if (next) {
|
|
221
|
-
if (next.set) next.set(key, value)
|
|
222
|
-
else next[key] = value
|
|
221
|
+
if (next.set) next.set(key, value);
|
|
222
|
+
else next[key] = value;
|
|
223
223
|
}
|
|
224
224
|
}, this);
|
|
225
|
-
return this
|
|
225
|
+
return this;
|
|
226
226
|
},
|
|
227
227
|
|
|
228
228
|
/**
|
|
@@ -232,7 +232,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
232
232
|
The callback method you provide should have the following signature (all
|
|
233
233
|
parameters are optional):
|
|
234
234
|
|
|
235
|
-
function(item, index, enumerable)
|
|
235
|
+
function (item, index, enumerable);
|
|
236
236
|
|
|
237
237
|
- *item* is the current item in the iteration.
|
|
238
238
|
- *index* is the current index in the iteration
|
|
@@ -248,22 +248,22 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
248
248
|
@param {Object} target the target object to use
|
|
249
249
|
@returns {Array} The mapped array.
|
|
250
250
|
*/
|
|
251
|
-
map: function(callback, target) {
|
|
252
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
253
|
-
var len = this.get ? this.get('length') : this.length
|
|
251
|
+
map: function (callback, target) {
|
|
252
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
253
|
+
var len = this.get ? this.get('length') : this.length;
|
|
254
254
|
if (target === undefined) target = null;
|
|
255
255
|
|
|
256
256
|
var ret = [];
|
|
257
|
-
var last = null
|
|
257
|
+
var last = null;
|
|
258
258
|
var context = SC.Enumerator._popContext();
|
|
259
|
-
for(var idx=0;idx<len;idx++) {
|
|
260
|
-
var next = this.nextObject(idx, last, context)
|
|
261
|
-
ret[idx] = callback.call(target, next, idx, this)
|
|
262
|
-
last = next
|
|
259
|
+
for (var idx = 0; idx < len;idx++) {
|
|
260
|
+
var next = this.nextObject(idx, last, context);
|
|
261
|
+
ret[idx] = callback.call(target, next, idx, this);
|
|
262
|
+
last = next;
|
|
263
263
|
}
|
|
264
|
-
last = null
|
|
264
|
+
last = null;
|
|
265
265
|
context = SC.Enumerator._pushContext(context);
|
|
266
|
-
return ret
|
|
266
|
+
return ret;
|
|
267
267
|
},
|
|
268
268
|
|
|
269
269
|
/**
|
|
@@ -273,8 +273,8 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
273
273
|
@param {String} key name of the property
|
|
274
274
|
@returns {Array} The mapped array.
|
|
275
275
|
*/
|
|
276
|
-
mapProperty: function(key) {
|
|
277
|
-
return this.map(function(next) {
|
|
276
|
+
mapProperty: function (key) {
|
|
277
|
+
return this.map(function (next) {
|
|
278
278
|
return next ? (next.get ? next.get(key) : next[key]) : null;
|
|
279
279
|
});
|
|
280
280
|
},
|
|
@@ -287,7 +287,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
287
287
|
The callback method you provide should have the following signature (all
|
|
288
288
|
parameters are optional):
|
|
289
289
|
|
|
290
|
-
function(item, index, enumerable)
|
|
290
|
+
function (item, index, enumerable);
|
|
291
291
|
|
|
292
292
|
- *item* is the current item in the iteration.
|
|
293
293
|
- *index* is the current index in the iteration
|
|
@@ -303,22 +303,22 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
303
303
|
@param {Object} target the target object to use
|
|
304
304
|
@returns {Array} A filtered array.
|
|
305
305
|
*/
|
|
306
|
-
filter: function(callback, target) {
|
|
307
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
308
|
-
var len = this.get ? this.get('length') : this.length
|
|
306
|
+
filter: function (callback, target) {
|
|
307
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
308
|
+
var len = this.get ? this.get('length') : this.length;
|
|
309
309
|
if (target === undefined) target = null;
|
|
310
310
|
|
|
311
311
|
var ret = [];
|
|
312
|
-
var last = null
|
|
312
|
+
var last = null;
|
|
313
313
|
var context = SC.Enumerator._popContext();
|
|
314
|
-
for(var idx=0;idx<len;idx++) {
|
|
315
|
-
var next = this.nextObject(idx, last, context)
|
|
316
|
-
if(callback.call(target, next, idx, this)) ret.push(next)
|
|
317
|
-
last = next
|
|
314
|
+
for (var idx = 0; idx < len;idx++) {
|
|
315
|
+
var next = this.nextObject(idx, last, context);
|
|
316
|
+
if (callback.call(target, next, idx, this)) ret.push(next);
|
|
317
|
+
last = next;
|
|
318
318
|
}
|
|
319
|
-
last = null
|
|
319
|
+
last = null;
|
|
320
320
|
context = SC.Enumerator._pushContext(context);
|
|
321
|
-
return ret
|
|
321
|
+
return ret;
|
|
322
322
|
},
|
|
323
323
|
|
|
324
324
|
/**
|
|
@@ -329,7 +329,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
329
329
|
@param {String} key one or more key names
|
|
330
330
|
@returns {Array}
|
|
331
331
|
*/
|
|
332
|
-
sortProperty: function(key) {
|
|
332
|
+
sortProperty: function (key) {
|
|
333
333
|
var keys = (typeof key === SC.T_STRING) ? arguments : key,
|
|
334
334
|
len = keys.length,
|
|
335
335
|
src;
|
|
@@ -338,20 +338,20 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
338
338
|
if (this instanceof Array) src = this;
|
|
339
339
|
else {
|
|
340
340
|
src = [];
|
|
341
|
-
this.forEach(function(i) { src.push(i); });
|
|
341
|
+
this.forEach(function (i) { src.push(i); });
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
if (!src) return [];
|
|
345
|
-
return src.sort(function(a,b) {
|
|
345
|
+
return src.sort(function (a, b) {
|
|
346
346
|
var idx, key, aValue, bValue, ret = 0;
|
|
347
347
|
|
|
348
|
-
for(idx=0;ret===0 && idx<len;idx++) {
|
|
348
|
+
for (idx = 0; ret === 0 && idx < len; idx++) {
|
|
349
349
|
key = keys[idx];
|
|
350
350
|
aValue = a ? (a.get ? a.get(key) : a[key]) : null;
|
|
351
351
|
bValue = b ? (b.get ? b.get(key) : b[key]) : null;
|
|
352
352
|
ret = SC.compare(aValue, bValue);
|
|
353
353
|
}
|
|
354
|
-
return ret
|
|
354
|
+
return ret;
|
|
355
355
|
});
|
|
356
356
|
},
|
|
357
357
|
|
|
@@ -361,25 +361,38 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
361
361
|
can pass an optional second argument with the target value. Otherwise
|
|
362
362
|
this will match any property that evaluates to true.
|
|
363
363
|
|
|
364
|
+
Note: null, undefined, false and the empty string all evaulate to false.
|
|
365
|
+
|
|
364
366
|
@param {String} key the property to test
|
|
365
367
|
@param {String} value optional value to test against.
|
|
366
368
|
@returns {Array} filtered array
|
|
367
369
|
*/
|
|
368
|
-
filterProperty: function(key, value) {
|
|
369
|
-
var len = this.get ? this.get('length') : this.length
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
370
|
+
filterProperty: function (key, value) {
|
|
371
|
+
var len = this.get ? this.get('length') : this.length,
|
|
372
|
+
ret = [],
|
|
373
|
+
last = null,
|
|
374
|
+
context = SC.Enumerator._popContext(),
|
|
375
|
+
idx, item, cur;
|
|
376
|
+
// Although the code for value and no value are almost identical, we want to make as many decisions outside
|
|
377
|
+
// the loop as possible.
|
|
378
|
+
if (value === undefined) {
|
|
379
|
+
for (idx = 0; idx < len; idx++) {
|
|
380
|
+
item = this.nextObject(idx, last, context);
|
|
381
|
+
cur = item ? (item.get ? item.get(key) : item[key]) : null;
|
|
382
|
+
if (!!cur) ret.push(item);
|
|
383
|
+
last = item;
|
|
384
|
+
}
|
|
385
|
+
} else {
|
|
386
|
+
for (idx = 0; idx < len; idx++) {
|
|
387
|
+
item = this.nextObject(idx, last, context);
|
|
388
|
+
cur = item ? (item.get ? item.get(key) : item[key]) : null;
|
|
389
|
+
if (SC.isEqual(cur, value)) ret.push(item);
|
|
390
|
+
last = item;
|
|
391
|
+
}
|
|
379
392
|
}
|
|
380
|
-
last = null
|
|
393
|
+
last = null;
|
|
381
394
|
context = SC.Enumerator._pushContext(context);
|
|
382
|
-
return ret
|
|
395
|
+
return ret;
|
|
383
396
|
},
|
|
384
397
|
|
|
385
398
|
/**
|
|
@@ -390,7 +403,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
390
403
|
The callback method you provide should have the following signature (all
|
|
391
404
|
parameters are optional):
|
|
392
405
|
|
|
393
|
-
function(item, index, enumerable)
|
|
406
|
+
function (item, index, enumerable);
|
|
394
407
|
|
|
395
408
|
- *item* is the current item in the iteration.
|
|
396
409
|
- *index* is the current index in the iteration
|
|
@@ -406,20 +419,20 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
406
419
|
@param {Object} target the target object to use
|
|
407
420
|
@returns {Object} Found item or null.
|
|
408
421
|
*/
|
|
409
|
-
find: function(callback, target) {
|
|
410
|
-
var len = this.get ? this.get('length') : this.length
|
|
422
|
+
find: function (callback, target) {
|
|
423
|
+
var len = this.get ? this.get('length') : this.length;
|
|
411
424
|
if (target === undefined) target = null;
|
|
412
425
|
|
|
413
|
-
var last = null, next, found = NO, ret = null
|
|
426
|
+
var last = null, next, found = NO, ret = null;
|
|
414
427
|
var context = SC.Enumerator._popContext();
|
|
415
|
-
for(var idx=0;idx<len && !found;idx++) {
|
|
416
|
-
next = this.nextObject(idx, last, context)
|
|
417
|
-
if (found = callback.call(target, next, idx, this)) ret = next
|
|
418
|
-
last = next
|
|
428
|
+
for (var idx = 0; idx < len && !found;idx++) {
|
|
429
|
+
next = this.nextObject(idx, last, context);
|
|
430
|
+
if (found = callback.call(target, next, idx, this)) ret = next;
|
|
431
|
+
last = next;
|
|
419
432
|
}
|
|
420
|
-
next = last = null
|
|
433
|
+
next = last = null;
|
|
421
434
|
context = SC.Enumerator._pushContext(context);
|
|
422
|
-
return ret
|
|
435
|
+
return ret;
|
|
423
436
|
},
|
|
424
437
|
|
|
425
438
|
/**
|
|
@@ -433,20 +446,20 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
433
446
|
@param {String} value optional value to test against.
|
|
434
447
|
@returns {Object} found item or null
|
|
435
448
|
*/
|
|
436
|
-
findProperty: function(key, value) {
|
|
437
|
-
var len = this.get ? this.get('length') : this.length
|
|
438
|
-
var found = NO, ret = null, last = null, next, cur
|
|
449
|
+
findProperty: function (key, value) {
|
|
450
|
+
var len = this.get ? this.get('length') : this.length;
|
|
451
|
+
var found = NO, ret = null, last = null, next, cur;
|
|
439
452
|
var context = SC.Enumerator._popContext();
|
|
440
|
-
for(var idx=0;idx<len && !found;idx++) {
|
|
441
|
-
next = this.nextObject(idx, last, context)
|
|
453
|
+
for (var idx = 0; idx < len && !found;idx++) {
|
|
454
|
+
next = this.nextObject(idx, last, context);
|
|
442
455
|
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
443
456
|
found = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
444
|
-
if (found) ret = next
|
|
445
|
-
last = next
|
|
457
|
+
if (found) ret = next;
|
|
458
|
+
last = next;
|
|
446
459
|
}
|
|
447
|
-
last = next = null
|
|
460
|
+
last = next = null;
|
|
448
461
|
context = SC.Enumerator._pushContext(context);
|
|
449
|
-
return ret
|
|
462
|
+
return ret;
|
|
450
463
|
},
|
|
451
464
|
|
|
452
465
|
/**
|
|
@@ -456,7 +469,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
456
469
|
The callback method you provide should have the following signature (all
|
|
457
470
|
parameters are optional):
|
|
458
471
|
|
|
459
|
-
function(item, index, enumerable)
|
|
472
|
+
function (item, index, enumerable);
|
|
460
473
|
|
|
461
474
|
- *item* is the current item in the iteration.
|
|
462
475
|
- *index* is the current index in the iteration
|
|
@@ -476,22 +489,22 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
476
489
|
@param {Object} target the target object to use
|
|
477
490
|
@returns {Boolean}
|
|
478
491
|
*/
|
|
479
|
-
every: function(callback, target) {
|
|
480
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
481
|
-
var len = this.get ? this.get('length') : this.length
|
|
492
|
+
every: function (callback, target) {
|
|
493
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
494
|
+
var len = this.get ? this.get('length') : this.length;
|
|
482
495
|
if (target === undefined) target = null;
|
|
483
496
|
|
|
484
497
|
var ret = YES;
|
|
485
|
-
var last = null
|
|
498
|
+
var last = null;
|
|
486
499
|
var context = SC.Enumerator._popContext();
|
|
487
|
-
for(var idx=0;ret && (idx<len);idx++) {
|
|
488
|
-
var next = this.nextObject(idx, last, context)
|
|
489
|
-
if(!callback.call(target, next, idx, this)) ret = NO
|
|
490
|
-
last = next
|
|
500
|
+
for (var idx = 0;ret && (idx < len);idx++) {
|
|
501
|
+
var next = this.nextObject(idx, last, context);
|
|
502
|
+
if (!callback.call(target, next, idx, this)) ret = NO;
|
|
503
|
+
last = next;
|
|
491
504
|
}
|
|
492
|
-
last = null
|
|
505
|
+
last = null;
|
|
493
506
|
context = SC.Enumerator._pushContext(context);
|
|
494
|
-
return ret
|
|
507
|
+
return ret;
|
|
495
508
|
},
|
|
496
509
|
|
|
497
510
|
/**
|
|
@@ -502,20 +515,20 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
502
515
|
@param {String} value optional value to test against.
|
|
503
516
|
@returns {Array} filtered array
|
|
504
517
|
*/
|
|
505
|
-
everyProperty: function(key, value) {
|
|
506
|
-
var len = this.get ? this.get('length') : this.length
|
|
518
|
+
everyProperty: function (key, value) {
|
|
519
|
+
var len = this.get ? this.get('length') : this.length;
|
|
507
520
|
var ret = YES;
|
|
508
|
-
var last = null
|
|
521
|
+
var last = null;
|
|
509
522
|
var context = SC.Enumerator._popContext();
|
|
510
|
-
for(var idx=0;ret && (idx<len);idx++) {
|
|
511
|
-
var next = this.nextObject(idx, last, context)
|
|
523
|
+
for (var idx = 0;ret && (idx < len);idx++) {
|
|
524
|
+
var next = this.nextObject(idx, last, context);
|
|
512
525
|
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
513
526
|
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
514
|
-
last = next
|
|
527
|
+
last = next;
|
|
515
528
|
}
|
|
516
|
-
last = null
|
|
529
|
+
last = null;
|
|
517
530
|
context = SC.Enumerator._pushContext(context);
|
|
518
|
-
return ret
|
|
531
|
+
return ret;
|
|
519
532
|
},
|
|
520
533
|
|
|
521
534
|
|
|
@@ -526,7 +539,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
526
539
|
The callback method you provide should have the following signature (all
|
|
527
540
|
parameters are optional):
|
|
528
541
|
|
|
529
|
-
function(item, index, enumerable)
|
|
542
|
+
function (item, index, enumerable);
|
|
530
543
|
|
|
531
544
|
- *item* is the current item in the iteration.
|
|
532
545
|
- *index* is the current index in the iteration
|
|
@@ -546,22 +559,22 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
546
559
|
@param {Object} target the target object to use
|
|
547
560
|
@returns {Array} A filtered array.
|
|
548
561
|
*/
|
|
549
|
-
some: function(callback, target) {
|
|
550
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
551
|
-
var len = this.get ? this.get('length') : this.length
|
|
562
|
+
some: function (callback, target) {
|
|
563
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
564
|
+
var len = this.get ? this.get('length') : this.length;
|
|
552
565
|
if (target === undefined) target = null;
|
|
553
566
|
|
|
554
567
|
var ret = NO;
|
|
555
|
-
var last = null
|
|
568
|
+
var last = null;
|
|
556
569
|
var context = SC.Enumerator._popContext();
|
|
557
|
-
for(var idx=0;(!ret) && (idx<len);idx++) {
|
|
558
|
-
var next = this.nextObject(idx, last, context)
|
|
559
|
-
if(callback.call(target, next, idx, this)) ret = YES
|
|
560
|
-
last = next
|
|
570
|
+
for (var idx = 0;(!ret) && (idx < len);idx++) {
|
|
571
|
+
var next = this.nextObject(idx, last, context);
|
|
572
|
+
if (callback.call(target, next, idx, this)) ret = YES;
|
|
573
|
+
last = next;
|
|
561
574
|
}
|
|
562
|
-
last = null
|
|
575
|
+
last = null;
|
|
563
576
|
context = SC.Enumerator._pushContext(context);
|
|
564
|
-
return ret
|
|
577
|
+
return ret;
|
|
565
578
|
},
|
|
566
579
|
|
|
567
580
|
/**
|
|
@@ -572,20 +585,20 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
572
585
|
@param {String} value optional value to test against.
|
|
573
586
|
@returns {Boolean} YES
|
|
574
587
|
*/
|
|
575
|
-
someProperty: function(key, value) {
|
|
576
|
-
var len = this.get ? this.get('length') : this.length
|
|
588
|
+
someProperty: function (key, value) {
|
|
589
|
+
var len = this.get ? this.get('length') : this.length;
|
|
577
590
|
var ret = NO;
|
|
578
|
-
var last = null
|
|
591
|
+
var last = null;
|
|
579
592
|
var context = SC.Enumerator._popContext();
|
|
580
|
-
for(var idx=0; !ret && (idx<len); idx++) {
|
|
581
|
-
var next = this.nextObject(idx, last, context)
|
|
593
|
+
for (var idx = 0; !ret && (idx < len); idx++) {
|
|
594
|
+
var next = this.nextObject(idx, last, context);
|
|
582
595
|
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
583
596
|
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
584
|
-
last = next
|
|
597
|
+
last = next;
|
|
585
598
|
}
|
|
586
|
-
last = null
|
|
599
|
+
last = null;
|
|
587
600
|
context = SC.Enumerator._pushContext(context);
|
|
588
|
-
return ret
|
|
601
|
+
return ret; // return the invert
|
|
589
602
|
},
|
|
590
603
|
|
|
591
604
|
/**
|
|
@@ -596,7 +609,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
596
609
|
The callback method you provide should have the following signature (all
|
|
597
610
|
parameters are optional):
|
|
598
611
|
|
|
599
|
-
function(previousValue, item, index, enumerable)
|
|
612
|
+
function (previousValue, item, index, enumerable);
|
|
600
613
|
|
|
601
614
|
- *previousValue* is the value returned by the last call to the iterator.
|
|
602
615
|
- *item* is the current item in the iteration.
|
|
@@ -618,37 +631,37 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
618
631
|
@param {String} reducerProperty internal use only. May not be available.
|
|
619
632
|
@returns {Object} The reduced value.
|
|
620
633
|
*/
|
|
621
|
-
reduce: function(callback, initialValue, reducerProperty) {
|
|
622
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
623
|
-
var len = this.get ? this.get('length') : this.length
|
|
634
|
+
reduce: function (callback, initialValue, reducerProperty) {
|
|
635
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
636
|
+
var len = this.get ? this.get('length') : this.length;
|
|
624
637
|
|
|
625
638
|
// no value to return if no initial value & empty
|
|
626
|
-
if (len===0 && initialValue === undefined) throw new TypeError();
|
|
639
|
+
if (len === 0 && initialValue === undefined) throw new TypeError();
|
|
627
640
|
|
|
628
641
|
var ret = initialValue;
|
|
629
|
-
var last = null
|
|
642
|
+
var last = null;
|
|
630
643
|
var context = SC.Enumerator._popContext();
|
|
631
|
-
for(var idx=0;idx<len;idx++) {
|
|
632
|
-
var next = this.nextObject(idx, last, context)
|
|
644
|
+
for (var idx = 0; idx < len;idx++) {
|
|
645
|
+
var next = this.nextObject(idx, last, context);
|
|
633
646
|
|
|
634
647
|
// while ret is still undefined, just set the first value we get as ret.
|
|
635
648
|
// this is not the ideal behavior actually but it matches the FireFox
|
|
636
649
|
// implementation... :(
|
|
637
650
|
if (next !== null) {
|
|
638
651
|
if (ret === undefined) {
|
|
639
|
-
ret = next
|
|
652
|
+
ret = next;
|
|
640
653
|
} else {
|
|
641
654
|
ret = callback.call(null, ret, next, idx, this, reducerProperty);
|
|
642
655
|
}
|
|
643
656
|
}
|
|
644
|
-
last = next
|
|
657
|
+
last = next;
|
|
645
658
|
}
|
|
646
|
-
last = null
|
|
659
|
+
last = null;
|
|
647
660
|
context = SC.Enumerator._pushContext(context);
|
|
648
661
|
|
|
649
662
|
// uh oh...we never found a value!
|
|
650
|
-
if (ret === undefined) throw new TypeError()
|
|
651
|
-
return ret
|
|
663
|
+
if (ret === undefined) throw new TypeError();
|
|
664
|
+
return ret;
|
|
652
665
|
},
|
|
653
666
|
|
|
654
667
|
/**
|
|
@@ -660,32 +673,32 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
660
673
|
@param {Object...} args optional arguments to pass as well.
|
|
661
674
|
@returns {Array} return values from calling invoke.
|
|
662
675
|
*/
|
|
663
|
-
invoke: function(methodName) {
|
|
664
|
-
var len = this.get ? this.get('length') : this.length
|
|
665
|
-
if (len <= 0) return []
|
|
676
|
+
invoke: function (methodName) {
|
|
677
|
+
var len = this.get ? this.get('length') : this.length;
|
|
678
|
+
if (len <= 0) return []; // nothing to invoke....
|
|
666
679
|
|
|
667
680
|
var idx;
|
|
668
681
|
|
|
669
682
|
// collect the arguments
|
|
670
|
-
var args = []
|
|
671
|
-
var alen = arguments.length
|
|
683
|
+
var args = [];
|
|
684
|
+
var alen = arguments.length;
|
|
672
685
|
if (alen > 1) {
|
|
673
|
-
for(idx=1;idx<alen;idx++) args.push(arguments[idx])
|
|
686
|
+
for (idx = 1; idx < alen; idx++) args.push(arguments[idx]);
|
|
674
687
|
}
|
|
675
688
|
|
|
676
689
|
// call invoke
|
|
677
|
-
var ret = []
|
|
678
|
-
var last = null
|
|
690
|
+
var ret = [];
|
|
691
|
+
var last = null;
|
|
679
692
|
var context = SC.Enumerator._popContext();
|
|
680
|
-
for(idx=0;idx<len;idx++) {
|
|
681
|
-
var next = this.nextObject(idx, last, context)
|
|
682
|
-
var method = next ? next[methodName] : null
|
|
683
|
-
if (method) ret[idx] = method.apply(next, args)
|
|
684
|
-
last = next
|
|
693
|
+
for (idx = 0; idx < len; idx++) {
|
|
694
|
+
var next = this.nextObject(idx, last, context);
|
|
695
|
+
var method = next ? next[methodName] : null;
|
|
696
|
+
if (method) ret[idx] = method.apply(next, args);
|
|
697
|
+
last = next;
|
|
685
698
|
}
|
|
686
|
-
last = null
|
|
699
|
+
last = null;
|
|
687
700
|
context = SC.Enumerator._pushContext(context);
|
|
688
|
-
return ret
|
|
701
|
+
return ret;
|
|
689
702
|
},
|
|
690
703
|
|
|
691
704
|
/**
|
|
@@ -699,32 +712,32 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
699
712
|
@param {Object...} args optional arguments to pass as well.
|
|
700
713
|
@returns {Array} return values from calling invoke.
|
|
701
714
|
*/
|
|
702
|
-
invokeWhile: function(targetValue, methodName) {
|
|
703
|
-
var len = this.get ? this.get('length') : this.length
|
|
715
|
+
invokeWhile: function (targetValue, methodName) {
|
|
716
|
+
var len = this.get ? this.get('length') : this.length;
|
|
704
717
|
if (len <= 0) return null; // nothing to invoke....
|
|
705
718
|
|
|
706
719
|
var idx;
|
|
707
720
|
|
|
708
721
|
// collect the arguments
|
|
709
|
-
var args = []
|
|
710
|
-
var alen = arguments.length
|
|
722
|
+
var args = [];
|
|
723
|
+
var alen = arguments.length;
|
|
711
724
|
if (alen > 2) {
|
|
712
|
-
for(idx=2;idx<alen;idx++) args.push(arguments[idx])
|
|
725
|
+
for (idx = 2; idx < alen; idx++) args.push(arguments[idx]);
|
|
713
726
|
}
|
|
714
727
|
|
|
715
728
|
// call invoke
|
|
716
|
-
var ret = targetValue
|
|
717
|
-
var last = null
|
|
729
|
+
var ret = targetValue;
|
|
730
|
+
var last = null;
|
|
718
731
|
var context = SC.Enumerator._popContext();
|
|
719
|
-
for(idx=0;(ret === targetValue) && (idx<len);idx++) {
|
|
720
|
-
var next = this.nextObject(idx, last, context)
|
|
721
|
-
var method = next ? next[methodName] : null
|
|
722
|
-
if (method) ret = method.apply(next, args)
|
|
723
|
-
last = next
|
|
732
|
+
for (idx = 0; (ret === targetValue) && (idx < len); idx++) {
|
|
733
|
+
var next = this.nextObject(idx, last, context);
|
|
734
|
+
var method = next ? next[methodName] : null;
|
|
735
|
+
if (method) ret = method.apply(next, args);
|
|
736
|
+
last = next;
|
|
724
737
|
}
|
|
725
|
-
last = null
|
|
738
|
+
last = null;
|
|
726
739
|
context = SC.Enumerator._pushContext(context);
|
|
727
|
-
return ret
|
|
740
|
+
return ret;
|
|
728
741
|
},
|
|
729
742
|
|
|
730
743
|
/**
|
|
@@ -734,10 +747,10 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
734
747
|
|
|
735
748
|
@returns {Array} the enumerable as an array.
|
|
736
749
|
*/
|
|
737
|
-
toArray: function() {
|
|
750
|
+
toArray: function () {
|
|
738
751
|
var ret = [];
|
|
739
|
-
this.forEach(function(o) { ret.push(o); }, this);
|
|
740
|
-
return ret
|
|
752
|
+
this.forEach(function (o) { ret.push(o); }, this);
|
|
753
|
+
return ret;
|
|
741
754
|
},
|
|
742
755
|
|
|
743
756
|
/**
|
|
@@ -747,7 +760,7 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
747
760
|
@param {String} key the property to test
|
|
748
761
|
@returns {Array} matrix of arrays
|
|
749
762
|
*/
|
|
750
|
-
groupBy: function(key){
|
|
763
|
+
groupBy: function (key) {
|
|
751
764
|
var len = this.get ? this.get('length') : this.length,
|
|
752
765
|
ret = [],
|
|
753
766
|
last = null,
|
|
@@ -756,11 +769,12 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
756
769
|
keyValues = [],
|
|
757
770
|
idx, next, cur;
|
|
758
771
|
|
|
759
|
-
for(idx=0;idx<len;idx++) {
|
|
760
|
-
next = this.nextObject(idx, last, context)
|
|
772
|
+
for (idx = 0; idx < len;idx++) {
|
|
773
|
+
next = this.nextObject(idx, last, context);
|
|
761
774
|
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
762
|
-
if(SC.none(grouped[cur])) {
|
|
763
|
-
grouped[cur] = [];
|
|
775
|
+
if (SC.none(grouped[cur])) {
|
|
776
|
+
grouped[cur] = [];
|
|
777
|
+
keyValues.push(cur);
|
|
764
778
|
}
|
|
765
779
|
grouped[cur].push(next);
|
|
766
780
|
last = next;
|
|
@@ -768,28 +782,28 @@ SC.Enumerable = /** @scope SC.Enumerable.prototype */{
|
|
|
768
782
|
last = null;
|
|
769
783
|
context = SC.Enumerator._pushContext(context);
|
|
770
784
|
|
|
771
|
-
for(idx=0,len=keyValues.length; idx < len; idx++){
|
|
785
|
+
for (idx = 0, len = keyValues.length; idx < len; idx++) {
|
|
772
786
|
ret.push(grouped[keyValues[idx]]);
|
|
773
787
|
}
|
|
774
|
-
return ret
|
|
788
|
+
return ret;
|
|
775
789
|
}
|
|
776
790
|
|
|
777
|
-
}
|
|
791
|
+
};
|
|
778
792
|
|
|
779
793
|
// Build in a separate function to avoid unintentional leaks through closures...
|
|
780
|
-
SC._buildReducerFor = function(reducerKey, reducerProperty) {
|
|
781
|
-
return function(key, value) {
|
|
782
|
-
var reducer = this[reducerKey]
|
|
794
|
+
SC._buildReducerFor = function (reducerKey, reducerProperty) {
|
|
795
|
+
return function (key, value) {
|
|
796
|
+
var reducer = this[reducerKey];
|
|
783
797
|
if (SC.typeOf(reducer) !== SC.T_FUNCTION) {
|
|
784
798
|
return this.unknownProperty ? this.unknownProperty(key, value) : null;
|
|
785
799
|
} else {
|
|
786
800
|
// Invoke the reduce method defined in enumerable instead of using the
|
|
787
801
|
// one implemented in the receiver. The receiver might be a native
|
|
788
802
|
// implementation that does not support reducerProperty.
|
|
789
|
-
var ret = SC.Enumerable.reduce.call(this, reducer, null, reducerProperty)
|
|
790
|
-
return ret
|
|
803
|
+
var ret = SC.Enumerable.reduce.call(this, reducer, null, reducerProperty);
|
|
804
|
+
return ret;
|
|
791
805
|
}
|
|
792
|
-
}.property('[]')
|
|
806
|
+
}.property('[]');
|
|
793
807
|
};
|
|
794
808
|
|
|
795
809
|
/** @class */
|
|
@@ -802,16 +816,16 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
802
816
|
For plain enumerables, this property is read only. SC.Array overrides
|
|
803
817
|
this method.
|
|
804
818
|
|
|
805
|
-
@
|
|
819
|
+
@type SC.Array
|
|
806
820
|
*/
|
|
807
|
-
'[]': function(key, value) { return this
|
|
821
|
+
'[]': function (key, value) { return this; }.property(),
|
|
808
822
|
|
|
809
823
|
/**
|
|
810
824
|
Invoke this method when the contents of your enumerable has changed.
|
|
811
825
|
This will notify any observers watching for content changes. If you are
|
|
812
826
|
implementing an ordered enumerable (such as an Array), also pass the
|
|
813
827
|
start and length values so that it can be used to notify range observers.
|
|
814
|
-
Passing start and length values will also
|
|
828
|
+
Passing start and length values will also ensure that the computed
|
|
815
829
|
properties `firstObject` and `lastObject` are updated.
|
|
816
830
|
|
|
817
831
|
@param {Number} [start] start offset for the content change
|
|
@@ -819,7 +833,7 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
819
833
|
@param {Number} [deltas] if you added or removed objects, the delta change
|
|
820
834
|
@returns {Object} receiver
|
|
821
835
|
*/
|
|
822
|
-
enumerableContentDidChange: function(start, length, deltas) {
|
|
836
|
+
enumerableContentDidChange: function (start, length, deltas) {
|
|
823
837
|
// If the start & length are provided, we can also indicate if the firstObject
|
|
824
838
|
// or lastObject properties changed, thus making them independently observable.
|
|
825
839
|
if (!SC.none(start)) {
|
|
@@ -827,7 +841,7 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
827
841
|
if (!SC.none(length) && start + length === this.get('length') - 1) this.notifyPropertyChange('lastObject');
|
|
828
842
|
}
|
|
829
843
|
|
|
830
|
-
this.notifyPropertyChange('[]')
|
|
844
|
+
this.notifyPropertyChange('[]');
|
|
831
845
|
},
|
|
832
846
|
|
|
833
847
|
/**
|
|
@@ -843,8 +857,8 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
843
857
|
property. You can call this at the top of your unknownProperty handler
|
|
844
858
|
like so:
|
|
845
859
|
|
|
846
|
-
unknownProperty: function(key, value) {
|
|
847
|
-
var ret = this.handleReduceProperty(key, value)
|
|
860
|
+
unknownProperty: function (key, value) {
|
|
861
|
+
var ret = this.handleReduceProperty(key, value);
|
|
848
862
|
if (ret === undefined) {
|
|
849
863
|
// process like normal
|
|
850
864
|
}
|
|
@@ -859,18 +873,18 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
859
873
|
|
|
860
874
|
@returns {Object} the reduced property or undefined
|
|
861
875
|
*/
|
|
862
|
-
reducedProperty: function(key, value, generateProperty) {
|
|
876
|
+
reducedProperty: function (key, value, generateProperty) {
|
|
863
877
|
|
|
864
|
-
if (!key || typeof key !== SC.T_STRING || key.charAt(0) !== '@') return undefined
|
|
878
|
+
if (!key || typeof key !== SC.T_STRING || key.charAt(0) !== '@') return undefined; // not a reduced property
|
|
865
879
|
|
|
866
880
|
// get the reducer key and the reducer
|
|
867
|
-
var matches = key.match(/^@([^(]*)(\(([^)]*)\))?$/)
|
|
868
|
-
if (!matches || matches.length < 2) return undefined
|
|
881
|
+
var matches = key.match(/^@([^(]*)(\(([^)]*)\))?$/);
|
|
882
|
+
if (!matches || matches.length < 2) return undefined; // no match
|
|
869
883
|
|
|
870
884
|
var reducerKey = matches[1]; // = 'max' if key = '@max(balance)'
|
|
871
|
-
var reducerProperty = matches[3]
|
|
872
|
-
reducerKey = "reduce" + reducerKey.slice(0,1).toUpperCase() + reducerKey.slice(1);
|
|
873
|
-
var reducer = this[reducerKey]
|
|
885
|
+
var reducerProperty = matches[3]; // = 'balance' if key = '@max(balance)'
|
|
886
|
+
reducerKey = "reduce" + reducerKey.slice(0, 1).toUpperCase() + reducerKey.slice(1);
|
|
887
|
+
var reducer = this[reducerKey];
|
|
874
888
|
|
|
875
889
|
// if there is no reduce function defined for this key, then we can't
|
|
876
890
|
// build a reducer for it.
|
|
@@ -878,26 +892,26 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
878
892
|
|
|
879
893
|
// if we can't generate the property, just run reduce
|
|
880
894
|
if (generateProperty === NO) {
|
|
881
|
-
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty)
|
|
895
|
+
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty);
|
|
882
896
|
}
|
|
883
897
|
|
|
884
898
|
// ok, found the reducer. Let's build the computed property and install
|
|
885
899
|
var func = SC._buildReducerFor(reducerKey, reducerProperty);
|
|
886
|
-
var p = this.constructor.prototype
|
|
900
|
+
var p = this.constructor.prototype;
|
|
887
901
|
|
|
888
902
|
if (p) {
|
|
889
|
-
p[key] = func
|
|
903
|
+
p[key] = func;
|
|
890
904
|
|
|
891
905
|
// add the function to the properties array so that new instances
|
|
892
906
|
// will have their dependent key registered.
|
|
893
|
-
var props = p._properties || []
|
|
894
|
-
props.push(key)
|
|
895
|
-
p._properties = props
|
|
896
|
-
this.registerDependentKey(key, '[]')
|
|
907
|
+
var props = p._properties || [];
|
|
908
|
+
props.push(key);
|
|
909
|
+
p._properties = props;
|
|
910
|
+
this.registerDependentKey(key, '[]');
|
|
897
911
|
}
|
|
898
912
|
|
|
899
913
|
// and reduce anyway...
|
|
900
|
-
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty)
|
|
914
|
+
return SC.Enumerable.reduce.call(this, reducer, null, reducerProperty);
|
|
901
915
|
},
|
|
902
916
|
|
|
903
917
|
/**
|
|
@@ -910,12 +924,12 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
910
924
|
|
|
911
925
|
@returns {Object} reduced value
|
|
912
926
|
*/
|
|
913
|
-
reduceMax: function(previousValue, item, index, e, reducerProperty) {
|
|
927
|
+
reduceMax: function (previousValue, item, index, e, reducerProperty) {
|
|
914
928
|
if (reducerProperty && item) {
|
|
915
929
|
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
916
930
|
}
|
|
917
|
-
if (previousValue === null) return item
|
|
918
|
-
return (item > previousValue) ? item : previousValue
|
|
931
|
+
if (previousValue === null) return item;
|
|
932
|
+
return (item > previousValue) ? item : previousValue;
|
|
919
933
|
},
|
|
920
934
|
|
|
921
935
|
/**
|
|
@@ -930,22 +944,22 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
930
944
|
|
|
931
945
|
@returns {Object} reduced value
|
|
932
946
|
*/
|
|
933
|
-
reduceMaxObject: function(previousItem, item, index, e, reducerProperty) {
|
|
947
|
+
reduceMaxObject: function (previousItem, item, index, e, reducerProperty) {
|
|
934
948
|
|
|
935
949
|
// get the value for both the previous and current item. If no
|
|
936
950
|
// reducerProperty was supplied, use the items themselves.
|
|
937
|
-
var previousValue = previousItem, itemValue = item
|
|
951
|
+
var previousValue = previousItem, itemValue = item;
|
|
938
952
|
if (reducerProperty) {
|
|
939
953
|
if (item) {
|
|
940
|
-
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty]
|
|
954
|
+
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
941
955
|
}
|
|
942
956
|
|
|
943
957
|
if (previousItem) {
|
|
944
|
-
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty]
|
|
958
|
+
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty];
|
|
945
959
|
}
|
|
946
960
|
}
|
|
947
|
-
if (previousValue === null) return item
|
|
948
|
-
return (itemValue > previousValue) ? item : previousItem
|
|
961
|
+
if (previousValue === null) return item;
|
|
962
|
+
return (itemValue > previousValue) ? item : previousItem;
|
|
949
963
|
},
|
|
950
964
|
|
|
951
965
|
/**
|
|
@@ -960,12 +974,12 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
960
974
|
|
|
961
975
|
@returns {Object} reduced value
|
|
962
976
|
*/
|
|
963
|
-
reduceMin: function(previousValue, item, index, e, reducerProperty) {
|
|
977
|
+
reduceMin: function (previousValue, item, index, e, reducerProperty) {
|
|
964
978
|
if (reducerProperty && item) {
|
|
965
979
|
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
966
980
|
}
|
|
967
|
-
if (previousValue === null) return item
|
|
968
|
-
return (item < previousValue) ? item : previousValue
|
|
981
|
+
if (previousValue === null) return item;
|
|
982
|
+
return (item < previousValue) ? item : previousValue;
|
|
969
983
|
},
|
|
970
984
|
|
|
971
985
|
/**
|
|
@@ -980,22 +994,22 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
980
994
|
|
|
981
995
|
@returns {Object} reduced value
|
|
982
996
|
*/
|
|
983
|
-
reduceMinObject: function(previousItem, item, index, e, reducerProperty) {
|
|
997
|
+
reduceMinObject: function (previousItem, item, index, e, reducerProperty) {
|
|
984
998
|
|
|
985
999
|
// get the value for both the previous and current item. If no
|
|
986
1000
|
// reducerProperty was supplied, use the items themselves.
|
|
987
|
-
var previousValue = previousItem, itemValue = item
|
|
1001
|
+
var previousValue = previousItem, itemValue = item;
|
|
988
1002
|
if (reducerProperty) {
|
|
989
1003
|
if (item) {
|
|
990
|
-
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty]
|
|
1004
|
+
itemValue = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
991
1005
|
}
|
|
992
1006
|
|
|
993
1007
|
if (previousItem) {
|
|
994
|
-
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty]
|
|
1008
|
+
previousValue = previousItem.get ? previousItem.get(reducerProperty) : previousItem[reducerProperty];
|
|
995
1009
|
}
|
|
996
1010
|
}
|
|
997
|
-
if (previousValue === null) return item
|
|
998
|
-
return (itemValue < previousValue) ? item : previousItem
|
|
1011
|
+
if (previousValue === null) return item;
|
|
1012
|
+
return (itemValue < previousValue) ? item : previousItem;
|
|
999
1013
|
},
|
|
1000
1014
|
|
|
1001
1015
|
/**
|
|
@@ -1010,14 +1024,14 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
1010
1024
|
|
|
1011
1025
|
@returns {Object} reduced value
|
|
1012
1026
|
*/
|
|
1013
|
-
reduceAverage: function(previousValue, item, index, e, reducerProperty) {
|
|
1027
|
+
reduceAverage: function (previousValue, item, index, e, reducerProperty) {
|
|
1014
1028
|
if (reducerProperty && item) {
|
|
1015
1029
|
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
1016
1030
|
}
|
|
1017
|
-
var ret = (previousValue || 0) + item
|
|
1031
|
+
var ret = (previousValue || 0) + item;
|
|
1018
1032
|
var len = e.get ? e.get('length') : e.length;
|
|
1019
|
-
if (index >= len-1) ret = ret / len; //avg after last item.
|
|
1020
|
-
return ret
|
|
1033
|
+
if (index >= len - 1) ret = ret / len; //avg after last item.
|
|
1034
|
+
return ret;
|
|
1021
1035
|
},
|
|
1022
1036
|
|
|
1023
1037
|
/**
|
|
@@ -1032,18 +1046,18 @@ SC.Reducers = /** @scope SC.Reducers.prototype */ {
|
|
|
1032
1046
|
|
|
1033
1047
|
@returns {Object} reduced value
|
|
1034
1048
|
*/
|
|
1035
|
-
reduceSum: function(previousValue, item, index, e, reducerProperty) {
|
|
1049
|
+
reduceSum: function (previousValue, item, index, e, reducerProperty) {
|
|
1036
1050
|
if (reducerProperty && item) {
|
|
1037
1051
|
item = item.get ? item.get(reducerProperty) : item[reducerProperty];
|
|
1038
1052
|
}
|
|
1039
|
-
return (previousValue === null) ? item : previousValue + item
|
|
1053
|
+
return (previousValue === null) ? item : previousValue + item;
|
|
1040
1054
|
}
|
|
1041
|
-
}
|
|
1055
|
+
};
|
|
1042
1056
|
|
|
1043
1057
|
// Apply reducers...
|
|
1044
|
-
SC.mixin(SC.Enumerable, SC.Reducers)
|
|
1045
|
-
SC.mixin(Array.prototype, SC.Reducers)
|
|
1046
|
-
Array.prototype.isEnumerable = YES
|
|
1058
|
+
SC.mixin(SC.Enumerable, SC.Reducers);
|
|
1059
|
+
SC.mixin(Array.prototype, SC.Reducers);
|
|
1060
|
+
Array.prototype.isEnumerable = YES;
|
|
1047
1061
|
|
|
1048
1062
|
// ......................................................
|
|
1049
1063
|
// ARRAY SUPPORT
|
|
@@ -1051,7 +1065,7 @@ Array.prototype.isEnumerable = YES ;
|
|
|
1051
1065
|
|
|
1052
1066
|
// Implement the same enhancements on Array. We use specialized methods
|
|
1053
1067
|
// because working with arrays are so common.
|
|
1054
|
-
(function() {
|
|
1068
|
+
(function () {
|
|
1055
1069
|
|
|
1056
1070
|
// These methods will be applied even if they already exist b/c we do it
|
|
1057
1071
|
// better.
|
|
@@ -1067,177 +1081,186 @@ Array.prototype.isEnumerable = YES ;
|
|
|
1067
1081
|
sortProperty: SC.Enumerable.sortProperty,
|
|
1068
1082
|
|
|
1069
1083
|
// see above...
|
|
1070
|
-
mapProperty: function(key) {
|
|
1071
|
-
var len = this.length
|
|
1084
|
+
mapProperty: function (key) {
|
|
1085
|
+
var len = this.length;
|
|
1072
1086
|
var ret = [];
|
|
1073
|
-
for(var idx=0;idx<len;idx++) {
|
|
1074
|
-
var next = this[idx]
|
|
1087
|
+
for (var idx = 0; idx < len; idx++) {
|
|
1088
|
+
var next = this[idx];
|
|
1075
1089
|
ret[idx] = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
1076
1090
|
}
|
|
1077
|
-
return ret
|
|
1091
|
+
return ret;
|
|
1078
1092
|
},
|
|
1079
1093
|
|
|
1080
|
-
filterProperty: function(key, value) {
|
|
1081
|
-
var len = this.length
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1094
|
+
filterProperty: function (key, value) {
|
|
1095
|
+
var len = this.length,
|
|
1096
|
+
ret = [],
|
|
1097
|
+
idx, item, cur;
|
|
1098
|
+
// Although the code for value and no value are almost identical, we want to make as many decisions outside
|
|
1099
|
+
// the loop as possible.
|
|
1100
|
+
if (value === undefined) {
|
|
1101
|
+
for (idx = 0; idx < len; idx++) {
|
|
1102
|
+
item = this[idx];
|
|
1103
|
+
cur = item ? (item.get ? item.get(key) : item[key]) : null;
|
|
1104
|
+
if (!!cur) ret.push(item);
|
|
1105
|
+
}
|
|
1106
|
+
} else {
|
|
1107
|
+
for (idx = 0; idx < len; idx++) {
|
|
1108
|
+
item = this[idx];
|
|
1109
|
+
cur = item ? (item.get ? item.get(key) : item[key]) : null;
|
|
1110
|
+
if (SC.isEqual(cur, value)) ret.push(item);
|
|
1111
|
+
}
|
|
1088
1112
|
}
|
|
1089
|
-
return ret
|
|
1113
|
+
return ret;
|
|
1090
1114
|
},
|
|
1091
|
-
|
|
1092
1115
|
//returns a matrix
|
|
1093
|
-
groupBy: function(key) {
|
|
1116
|
+
groupBy: function (key) {
|
|
1094
1117
|
var len = this.length,
|
|
1095
1118
|
ret = [],
|
|
1096
1119
|
grouped = [],
|
|
1097
1120
|
keyValues = [],
|
|
1098
1121
|
idx, next, cur;
|
|
1099
1122
|
|
|
1100
|
-
for(idx=0;idx<len;idx++) {
|
|
1101
|
-
next = this[idx]
|
|
1123
|
+
for (idx = 0; idx < len; idx++) {
|
|
1124
|
+
next = this[idx];
|
|
1102
1125
|
cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
1103
|
-
if(SC.none(grouped[cur])){ grouped[cur] = []; keyValues.push(cur); }
|
|
1126
|
+
if (SC.none(grouped[cur])) { grouped[cur] = []; keyValues.push(cur); }
|
|
1104
1127
|
grouped[cur].push(next);
|
|
1105
1128
|
}
|
|
1106
1129
|
|
|
1107
|
-
for(idx=0,len=keyValues.length; idx < len; idx++){
|
|
1130
|
+
for (idx = 0, len = keyValues.length; idx < len; idx++) {
|
|
1108
1131
|
ret.push(grouped[keyValues[idx]]);
|
|
1109
1132
|
}
|
|
1110
|
-
return ret
|
|
1133
|
+
return ret;
|
|
1111
1134
|
},
|
|
1112
1135
|
|
|
1113
|
-
find: function(callback, target) {
|
|
1114
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1115
|
-
var len = this.length
|
|
1136
|
+
find: function (callback, target) {
|
|
1137
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1138
|
+
var len = this.length;
|
|
1116
1139
|
if (target === undefined) target = null;
|
|
1117
1140
|
|
|
1118
1141
|
var next, ret = null, found = NO;
|
|
1119
|
-
for(var idx=0;idx<len && !found;idx++) {
|
|
1120
|
-
next = this[idx]
|
|
1121
|
-
if(found = callback.call(target, next, idx, this)) ret = next
|
|
1142
|
+
for (var idx = 0; idx < len && !found; idx++) {
|
|
1143
|
+
next = this[idx];
|
|
1144
|
+
if (found = callback.call(target, next, idx, this)) ret = next;
|
|
1122
1145
|
}
|
|
1123
1146
|
next = null;
|
|
1124
|
-
return ret
|
|
1147
|
+
return ret;
|
|
1125
1148
|
},
|
|
1126
1149
|
|
|
1127
|
-
findProperty: function(key, value) {
|
|
1128
|
-
var len = this.length
|
|
1129
|
-
var next, cur, found=NO, ret=null;
|
|
1130
|
-
for(var idx=0;idx<len && !found;idx++) {
|
|
1131
|
-
cur = (next=this[idx]) ? (next.get ? next.get(key): next[key]):null;
|
|
1150
|
+
findProperty: function (key, value) {
|
|
1151
|
+
var len = this.length;
|
|
1152
|
+
var next, cur, found = NO, ret = null;
|
|
1153
|
+
for (var idx = 0; idx < len && !found; idx++) {
|
|
1154
|
+
cur = (next = this[idx]) ? (next.get ? next.get(key): next[key]):null;
|
|
1132
1155
|
found = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
1133
|
-
if (found) ret = next
|
|
1156
|
+
if (found) ret = next;
|
|
1134
1157
|
}
|
|
1135
|
-
next=null;
|
|
1136
|
-
return ret
|
|
1158
|
+
next = null;
|
|
1159
|
+
return ret;
|
|
1137
1160
|
},
|
|
1138
1161
|
|
|
1139
|
-
everyProperty: function(key, value) {
|
|
1140
|
-
var len = this.length
|
|
1162
|
+
everyProperty: function (key, value) {
|
|
1163
|
+
var len = this.length;
|
|
1141
1164
|
var ret = YES;
|
|
1142
|
-
for(var idx=0;ret && (idx<len);idx++) {
|
|
1143
|
-
var next = this[idx]
|
|
1165
|
+
for (var idx = 0; ret && (idx < len); idx++) {
|
|
1166
|
+
var next = this[idx];
|
|
1144
1167
|
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
1145
1168
|
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
1146
1169
|
}
|
|
1147
|
-
return ret
|
|
1170
|
+
return ret;
|
|
1148
1171
|
},
|
|
1149
1172
|
|
|
1150
|
-
someProperty: function(key, value) {
|
|
1151
|
-
var len = this.length
|
|
1173
|
+
someProperty: function (key, value) {
|
|
1174
|
+
var len = this.length;
|
|
1152
1175
|
var ret = NO;
|
|
1153
|
-
for(var idx=0; !ret && (idx<len); idx++) {
|
|
1154
|
-
var next = this[idx]
|
|
1176
|
+
for (var idx = 0; !ret && (idx < len); idx++) {
|
|
1177
|
+
var next = this[idx];
|
|
1155
1178
|
var cur = next ? (next.get ? next.get(key) : next[key]) : null;
|
|
1156
1179
|
ret = (value === undefined) ? !!cur : SC.isEqual(cur, value);
|
|
1157
1180
|
}
|
|
1158
|
-
return ret
|
|
1181
|
+
return ret; // return the invert
|
|
1159
1182
|
},
|
|
1160
1183
|
|
|
1161
|
-
invoke: function(methodName) {
|
|
1162
|
-
var len = this.length
|
|
1163
|
-
if (len <= 0) return []
|
|
1184
|
+
invoke: function (methodName) {
|
|
1185
|
+
var len = this.length;
|
|
1186
|
+
if (len <= 0) return []; // nothing to invoke....
|
|
1164
1187
|
|
|
1165
1188
|
var idx;
|
|
1166
1189
|
|
|
1167
1190
|
// collect the arguments
|
|
1168
|
-
var args = []
|
|
1169
|
-
var alen = arguments.length
|
|
1191
|
+
var args = [];
|
|
1192
|
+
var alen = arguments.length;
|
|
1170
1193
|
if (alen > 1) {
|
|
1171
|
-
for(idx=1;idx<alen;idx++) args.push(arguments[idx])
|
|
1194
|
+
for (idx = 1; idx < alen; idx++) args.push(arguments[idx]);
|
|
1172
1195
|
}
|
|
1173
1196
|
|
|
1174
1197
|
// call invoke
|
|
1175
|
-
var ret = []
|
|
1176
|
-
for(idx=0;idx<len;idx++) {
|
|
1177
|
-
var next = this[idx]
|
|
1178
|
-
var method = next ? next[methodName] : null
|
|
1179
|
-
if (method) ret[idx] = method.apply(next, args)
|
|
1198
|
+
var ret = [];
|
|
1199
|
+
for (idx = 0; idx < len; idx++) {
|
|
1200
|
+
var next = this[idx];
|
|
1201
|
+
var method = next ? next[methodName] : null;
|
|
1202
|
+
if (method) ret[idx] = method.apply(next, args);
|
|
1180
1203
|
}
|
|
1181
|
-
return ret
|
|
1204
|
+
return ret;
|
|
1182
1205
|
},
|
|
1183
1206
|
|
|
1184
|
-
invokeWhile: function(targetValue, methodName) {
|
|
1185
|
-
var len = this.length
|
|
1186
|
-
if (len <= 0) return null
|
|
1207
|
+
invokeWhile: function (targetValue, methodName) {
|
|
1208
|
+
var len = this.length;
|
|
1209
|
+
if (len <= 0) return null; // nothing to invoke....
|
|
1187
1210
|
|
|
1188
1211
|
var idx;
|
|
1189
1212
|
|
|
1190
1213
|
// collect the arguments
|
|
1191
|
-
var args = []
|
|
1192
|
-
var alen = arguments.length
|
|
1214
|
+
var args = [];
|
|
1215
|
+
var alen = arguments.length;
|
|
1193
1216
|
if (alen > 2) {
|
|
1194
|
-
for(idx=2;idx<alen;idx++) args.push(arguments[idx])
|
|
1217
|
+
for (idx = 2; idx < alen; idx++) args.push(arguments[idx]);
|
|
1195
1218
|
}
|
|
1196
1219
|
|
|
1197
1220
|
// call invoke
|
|
1198
|
-
var ret = targetValue
|
|
1199
|
-
for(idx=0;(ret === targetValue) && (idx<len);idx++) {
|
|
1200
|
-
var next = this[idx]
|
|
1201
|
-
var method = next ? next[methodName] : null
|
|
1202
|
-
if (method) ret = method.apply(next, args)
|
|
1221
|
+
var ret = targetValue;
|
|
1222
|
+
for (idx = 0; (ret === targetValue) && (idx < len); idx++) {
|
|
1223
|
+
var next = this[idx];
|
|
1224
|
+
var method = next ? next[methodName] : null;
|
|
1225
|
+
if (method) ret = method.apply(next, args);
|
|
1203
1226
|
}
|
|
1204
|
-
return ret
|
|
1227
|
+
return ret;
|
|
1205
1228
|
},
|
|
1206
1229
|
|
|
1207
|
-
toArray: function() {
|
|
1208
|
-
var len = this.length
|
|
1209
|
-
if (len <= 0) return []
|
|
1230
|
+
toArray: function () {
|
|
1231
|
+
var len = this.length;
|
|
1232
|
+
if (len <= 0) return []; // nothing to invoke....
|
|
1210
1233
|
|
|
1211
1234
|
// call invoke
|
|
1212
|
-
var ret = []
|
|
1213
|
-
for(var idx=0;idx<len;idx++) {
|
|
1214
|
-
var next = this[idx]
|
|
1215
|
-
ret.push(next)
|
|
1235
|
+
var ret = [];
|
|
1236
|
+
for (var idx = 0; idx < len; idx++) {
|
|
1237
|
+
var next = this[idx];
|
|
1238
|
+
ret.push(next);
|
|
1216
1239
|
}
|
|
1217
|
-
return ret
|
|
1240
|
+
return ret;
|
|
1218
1241
|
},
|
|
1219
1242
|
|
|
1220
|
-
getEach: function(key) {
|
|
1243
|
+
getEach: function (key) {
|
|
1221
1244
|
var ret = [];
|
|
1222
|
-
var len = this.length
|
|
1223
|
-
for(var idx=0;idx<len;idx++) {
|
|
1245
|
+
var len = this.length;
|
|
1246
|
+
for (var idx = 0; idx < len; idx++) {
|
|
1224
1247
|
var obj = this[idx];
|
|
1225
1248
|
ret[idx] = obj ? (obj.get ? obj.get(key) : obj[key]) : null;
|
|
1226
1249
|
}
|
|
1227
|
-
return ret
|
|
1250
|
+
return ret;
|
|
1228
1251
|
},
|
|
1229
1252
|
|
|
1230
|
-
setEach: function(key, value) {
|
|
1253
|
+
setEach: function (key, value) {
|
|
1231
1254
|
var len = this.length;
|
|
1232
|
-
for(var idx=0;idx<len;idx++) {
|
|
1255
|
+
for (var idx = 0; idx < len; idx++) {
|
|
1233
1256
|
var obj = this[idx];
|
|
1234
1257
|
if (obj) {
|
|
1235
1258
|
if (obj.set) {
|
|
1236
1259
|
obj.set(key, value);
|
|
1237
|
-
} else obj[key] = value
|
|
1260
|
+
} else obj[key] = value;
|
|
1238
1261
|
}
|
|
1239
1262
|
}
|
|
1240
|
-
return this
|
|
1263
|
+
return this;
|
|
1241
1264
|
}
|
|
1242
1265
|
|
|
1243
1266
|
};
|
|
@@ -1247,88 +1270,88 @@ Array.prototype.isEnumerable = YES ;
|
|
|
1247
1270
|
var mixinIfMissing = {
|
|
1248
1271
|
|
|
1249
1272
|
// QUESTION: The lack of DRY is burning my eyes [YK]
|
|
1250
|
-
forEach: function(callback, target) {
|
|
1251
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1273
|
+
forEach: function (callback, target) {
|
|
1274
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1252
1275
|
|
|
1253
1276
|
// QUESTION: Is this necessary?
|
|
1254
1277
|
if (target === undefined) target = null;
|
|
1255
1278
|
|
|
1256
|
-
for(var i=0, l=this.length; i<l; i++) {
|
|
1257
|
-
var next = this[i]
|
|
1279
|
+
for (var i = 0, l = this.length; i < l; i++) {
|
|
1280
|
+
var next = this[i];
|
|
1258
1281
|
callback.call(target, next, i, this);
|
|
1259
1282
|
}
|
|
1260
|
-
return this
|
|
1283
|
+
return this;
|
|
1261
1284
|
},
|
|
1262
1285
|
|
|
1263
|
-
map: function(callback, target) {
|
|
1264
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1286
|
+
map: function (callback, target) {
|
|
1287
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1265
1288
|
|
|
1266
1289
|
if (target === undefined) target = null;
|
|
1267
1290
|
|
|
1268
|
-
var ret
|
|
1269
|
-
for(var i=0, l=this.length; i<l; i++) {
|
|
1270
|
-
var next = this[i]
|
|
1271
|
-
ret[i] = callback.call(target, next, i, this)
|
|
1291
|
+
var ret = [];
|
|
1292
|
+
for (var i = 0, l = this.length; i < l; i++) {
|
|
1293
|
+
var next = this[i];
|
|
1294
|
+
ret[i] = callback.call(target, next, i, this);
|
|
1272
1295
|
}
|
|
1273
|
-
return ret
|
|
1296
|
+
return ret;
|
|
1274
1297
|
},
|
|
1275
1298
|
|
|
1276
|
-
filter: function(callback, target) {
|
|
1277
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1299
|
+
filter: function (callback, target) {
|
|
1300
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1278
1301
|
|
|
1279
1302
|
if (target === undefined) target = null;
|
|
1280
1303
|
|
|
1281
|
-
var ret
|
|
1282
|
-
for(var i=0, l=this.length; i<l; i++) {
|
|
1283
|
-
var next = this[i]
|
|
1284
|
-
if(callback.call(target, next, i, this)) ret.push(next)
|
|
1304
|
+
var ret = [];
|
|
1305
|
+
for (var i = 0, l = this.length; i < l; i++) {
|
|
1306
|
+
var next = this[i];
|
|
1307
|
+
if (callback.call(target, next, i, this)) ret.push(next);
|
|
1285
1308
|
}
|
|
1286
|
-
return ret
|
|
1309
|
+
return ret;
|
|
1287
1310
|
},
|
|
1288
1311
|
|
|
1289
|
-
every: function(callback, target) {
|
|
1290
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1291
|
-
var len = this.length
|
|
1312
|
+
every: function (callback, target) {
|
|
1313
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1314
|
+
var len = this.length;
|
|
1292
1315
|
if (target === undefined) target = null;
|
|
1293
1316
|
|
|
1294
1317
|
var ret = YES;
|
|
1295
|
-
for(var idx=0;ret && (idx<len);idx++) {
|
|
1296
|
-
var next = this[idx]
|
|
1297
|
-
if(!callback.call(target, next, idx, this)) ret = NO
|
|
1318
|
+
for (var idx = 0; ret && (idx < len); idx++) {
|
|
1319
|
+
var next = this[idx];
|
|
1320
|
+
if (!callback.call(target, next, idx, this)) ret = NO;
|
|
1298
1321
|
}
|
|
1299
|
-
return ret
|
|
1322
|
+
return ret;
|
|
1300
1323
|
},
|
|
1301
1324
|
|
|
1302
|
-
some: function(callback, target) {
|
|
1303
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1304
|
-
var len = this.length
|
|
1325
|
+
some: function (callback, target) {
|
|
1326
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1327
|
+
var len = this.length;
|
|
1305
1328
|
if (target === undefined) target = null;
|
|
1306
1329
|
|
|
1307
1330
|
var ret = NO;
|
|
1308
|
-
for(var idx=0;(!ret) && (idx<len);idx++) {
|
|
1309
|
-
var next = this[idx]
|
|
1310
|
-
if(callback.call(target, next, idx, this)) ret = YES
|
|
1331
|
+
for (var idx = 0; (!ret) && (idx < len); idx++) {
|
|
1332
|
+
var next = this[idx];
|
|
1333
|
+
if (callback.call(target, next, idx, this)) ret = YES;
|
|
1311
1334
|
}
|
|
1312
|
-
return ret
|
|
1335
|
+
return ret;
|
|
1313
1336
|
},
|
|
1314
1337
|
|
|
1315
|
-
reduce: function(callback, initialValue, reducerProperty) {
|
|
1316
|
-
if (typeof callback !== "function") throw new TypeError()
|
|
1317
|
-
var len = this.length
|
|
1338
|
+
reduce: function (callback, initialValue, reducerProperty) {
|
|
1339
|
+
if (typeof callback !== "function") throw new TypeError();
|
|
1340
|
+
var len = this.length;
|
|
1318
1341
|
|
|
1319
1342
|
// no value to return if no initial value & empty
|
|
1320
|
-
if (len===0 && initialValue === undefined) throw new TypeError();
|
|
1343
|
+
if (len === 0 && initialValue === undefined) throw new TypeError();
|
|
1321
1344
|
|
|
1322
1345
|
var ret = initialValue;
|
|
1323
|
-
for(var idx=0;idx<len;idx++) {
|
|
1324
|
-
var next = this[idx]
|
|
1346
|
+
for (var idx = 0; idx < len; idx++) {
|
|
1347
|
+
var next = this[idx];
|
|
1325
1348
|
|
|
1326
1349
|
// while ret is still undefined, just set the first value we get as
|
|
1327
1350
|
// ret. this is not the ideal behavior actually but it matches the
|
|
1328
1351
|
// FireFox implementation... :(
|
|
1329
1352
|
if (next !== null) {
|
|
1330
1353
|
if (ret === undefined) {
|
|
1331
|
-
ret = next
|
|
1354
|
+
ret = next;
|
|
1332
1355
|
} else {
|
|
1333
1356
|
ret = callback.call(null, ret, next, idx, this, reducerProperty);
|
|
1334
1357
|
}
|
|
@@ -1336,26 +1359,26 @@ Array.prototype.isEnumerable = YES ;
|
|
|
1336
1359
|
}
|
|
1337
1360
|
|
|
1338
1361
|
// uh oh...we never found a value!
|
|
1339
|
-
if (ret === undefined) throw new TypeError()
|
|
1340
|
-
return ret
|
|
1362
|
+
if (ret === undefined) throw new TypeError();
|
|
1363
|
+
return ret;
|
|
1341
1364
|
}
|
|
1342
1365
|
};
|
|
1343
1366
|
|
|
1344
1367
|
// Apply methods if missing...
|
|
1345
|
-
for(var key in mixinIfMissing) {
|
|
1346
|
-
if (!mixinIfMissing.hasOwnProperty(key)) continue
|
|
1368
|
+
for (var key in mixinIfMissing) {
|
|
1369
|
+
if (!mixinIfMissing.hasOwnProperty(key)) continue;
|
|
1347
1370
|
|
|
1348
1371
|
// The mixinIfMissing methods should be applied if they are not defined.
|
|
1349
1372
|
// If Prototype 1.6 is included, some of these methods will be defined
|
|
1350
1373
|
// already, but we want to override them anyway in this special case
|
|
1351
1374
|
// because our version is faster and functionally identical.
|
|
1352
1375
|
if (!Array.prototype[key] || ((typeof Prototype === 'object') && Prototype.Version.match(/^1\.6/))) {
|
|
1353
|
-
Array.prototype[key] = mixinIfMissing[key]
|
|
1376
|
+
Array.prototype[key] = mixinIfMissing[key];
|
|
1354
1377
|
}
|
|
1355
1378
|
}
|
|
1356
1379
|
|
|
1357
1380
|
// Apply other methods...
|
|
1358
|
-
SC.mixin(Array.prototype, alwaysMixin)
|
|
1381
|
+
SC.mixin(Array.prototype, alwaysMixin);
|
|
1359
1382
|
|
|
1360
|
-
})()
|
|
1383
|
+
})();
|
|
1361
1384
|
|