sproutcore 1.9.2 → 1.10.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +12 -9
- data/bin/sc-build-number +12 -9
- data/bin/sc-docs +12 -15
- data/bin/sc-gen +12 -9
- data/bin/sc-init +12 -9
- data/bin/sc-manifest +12 -9
- data/bin/sc-server +12 -9
- data/bin/sproutcore +12 -9
- data/lib/frameworks/sproutcore/Buildfile +14 -17
- data/lib/frameworks/sproutcore/CHANGELOG.md +214 -3
- data/lib/frameworks/sproutcore/README.md +4 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/Buildfile +13 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps/greenhouse/README → apps/greenhouse/README.md} +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/TODO +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/beautify.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/design.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/file.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/files.js +3 -3
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/layout.js +9 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/library.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/page.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property_editor.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/targets.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/view_configs.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core_file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/data_source.js +42 -42
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/app_page.js +45 -45
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/app-selector.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/button.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/dock.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/general.css +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/icons.css +5 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/main-page.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/menu.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/modal.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/picker.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/search.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/text-field.css +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/dialogs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/images/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/inspectors.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/loading.rhtml +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/main_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/strings.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/fixtures/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/main.js +5 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/mixins/drop_down.js +14 -14
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/design.js +4 -4
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/dir.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/file.js +7 -9
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/target.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/view_config.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/resources/test_page.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/inspector.js +11 -11
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/library.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/main.js +26 -25
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/modals.js +10 -10
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/ready.js +15 -15
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/designs.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/file.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/list_item.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/plist_item.js +1 -5
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/theme.js +6 -6
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/anchor.js +43 -43
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/application_list_item.js +2 -2
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/event_blocker.js +7 -7
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/label_designer.js +0 -0
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/list_item.js +8 -8
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/plist_item.js +23 -23
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/simple_button.js +31 -31
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/tear_off_picker.js +12 -12
- data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/web.js +5 -5
- data/lib/frameworks/sproutcore/apps/media_examples/core.js +5 -6
- data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +16 -17
- data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +17 -18
- data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +4 -5
- data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +18 -19
- data/lib/frameworks/sproutcore/apps/showcase/Buildfile +2 -2
- data/lib/frameworks/sproutcore/apps/showcase/README +1 -1
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +27 -7
- data/lib/frameworks/sproutcore/apps/showcase/core.js +6 -4
- data/lib/frameworks/sproutcore/apps/showcase/main.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/patch.diff +529 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +35 -16
- data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +195 -10
- data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/theme.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +3 -2
- data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +10 -9
- data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +15 -6
- data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +5 -4
- data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +2 -1
- data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +5 -5
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +15 -15
- data/lib/frameworks/sproutcore/apps/statechart_routing/resources/styles.css +3 -0
- data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +11 -11
- data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +6 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +28 -33
- data/lib/frameworks/sproutcore/apps/tests/controllers/{detail.js → test.js} +14 -12
- data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +11 -15
- data/lib/frameworks/sproutcore/apps/tests/core.js +8 -113
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +9 -19
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +81 -92
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +3 -1
- data/lib/frameworks/sproutcore/apps/tests/main.js +8 -13
- data/lib/frameworks/sproutcore/apps/tests/statechart.js +268 -0
- data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +4 -4
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +16 -16
- data/lib/frameworks/sproutcore/apps/welcome/core.js +9 -9
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +22 -25
- data/lib/frameworks/sproutcore/apps/welcome/main.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +21 -7
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +35 -2
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +142 -75
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js +283 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js +284 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +64 -65
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +10 -25
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +12 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +53 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +30 -24
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +44 -40
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +105 -176
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/view_transition_protocol.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +225 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +54 -34
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +86 -71
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +283 -120
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +653 -435
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +49 -42
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +422 -396
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +37 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/platform.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +4 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +18 -30
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +78 -43
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +31 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +47 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +32 -31
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +23 -22
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +17 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +626 -211
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/border_frame_test.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +22 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/childViewLayout_test.js +27 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +10 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +17 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroy.js +60 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +19 -26
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +14 -13
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +341 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +26 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +28 -68
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +35 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +93 -78
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +62 -64
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +69 -18
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +26 -21
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +129 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +436 -238
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +38 -44
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +14 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +29 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceAllChildren_test.js +229 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +33 -95
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +87 -39
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +684 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +767 -625
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +4 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +645 -77
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +218 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +648 -321
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +326 -534
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +120 -126
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +1526 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +18 -23
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +12 -94
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +43 -27
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/icons.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_tools/resources/sc-icon-sproutcore-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +90 -90
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +74 -48
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +187 -253
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +49 -9
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +236 -127
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/instance_management.js +107 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +42 -17
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +20 -15
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +205 -92
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +61 -25
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +39 -9
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +45 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/tests/system/datetime.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/design.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/controllers.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/design.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/designs.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_design.js +44 -44
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_files.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_rule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style_sheet.js +37 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/label.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/object_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/tab.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/text_field.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/view_designer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/css/designer.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/design_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/high_light.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/controller.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/page.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/pane.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/view.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/selection_handles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/binding.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/snap_lines.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/coders/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/designers/view_designer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/designer_drop_target.js +36 -37
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/drawing.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/high_light.js +17 -17
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/page_item_view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/selection_handles.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +51 -51
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_child.js +63 -52
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_thumb.js +64 -59
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +113 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +182 -203
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +51 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +513 -307
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +69 -217
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +31 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +15 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +2 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +25 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +29 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +19 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +14 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split_divider.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/modal.css +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +24 -98
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +446 -442
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +42 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +26 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +11 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +27 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +11 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +9 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +15 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/{mixins → views/collection}/collection_fast_path.js +18 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +46 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +101 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +26 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +89 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +27 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +32 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +6 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +103 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +76 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +91 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +2 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +70 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +10 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +37 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +18 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +115 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +37 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +194 -182
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +18 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +5 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/children.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/dividers.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +341 -45
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_child.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_thumb.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +6 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +49 -52
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +23 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +47 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +887 -740
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +68 -55
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +8 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +189 -167
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +55 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +145 -146
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +66 -66
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +40 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +203 -200
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +11 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +6 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +87 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +192 -179
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +64 -64
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +56 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +784 -714
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +21 -39
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +45 -41
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +4 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +9 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +40 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +62 -50
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +0 -9
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +46 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/render_delegates/desktop_scroller.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/tests/scroll/ui.js +38 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +26 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +43 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/test-image.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +63 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +60 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +72 -72
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +142 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +36 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/swap_transition_protocol.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +54 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +23 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +12 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +21 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-128.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-256.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-32.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-512.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-64.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/app_cache.js +412 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +11 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +33 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +5 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +49 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +29 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +8 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/app_cache_test.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +0 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +40 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +143 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +187 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +6 -41
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +51 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +11 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_bounce_transition.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_smooth_transition.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_spring_transition.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/bounce_transition.js +211 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/fade_transition.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/pop_transition.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/scale_transition.js +54 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/slide_transition.js +140 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/spring_transition.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_dissolve_transition.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_push_transition.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +483 -95
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +65 -65
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +111 -100
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +30 -222
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +38 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +74 -62
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-1.8.3-patched.js +9485 -0
- data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +18 -17
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +10 -11
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +32 -21
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +72 -53
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +164 -156
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +20 -20
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +145 -140
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +393 -370
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1045 -999
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +41 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +10 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +275 -205
- data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +229 -193
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +186 -188
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +138 -65
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +11 -10
- data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +4 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +112 -23
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +71 -18
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +97 -57
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/infinite.js +184 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +63 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +73 -36
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +100 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +449 -422
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +19 -19
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +612 -562
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +115 -62
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +145 -64
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/respond_to_event.js +17 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +30 -30
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +34 -34
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/collection.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/view.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/panes/template.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/views/bindable_span.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +15 -21
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +35 -35
- data/lib/frameworks/sproutcore/scripts/run_sc_server_master.sh +34 -0
- data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +606 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +3 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +18 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +34 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +7 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +5 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +6 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +7 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +37 -37
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +12 -12
- data/lib/sproutcore/helpers/static_helper.rb +35 -27
- data/sproutcore.gemspec +1 -0
- metadata +529 -451
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +0 -55
- data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +0 -29
- data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +0 -28
- data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +0 -22
- data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +0 -51
- data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +0 -26
- data/lib/frameworks/sproutcore/apps/tests/states/ready.js +0 -56
- data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +0 -48
- data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +0 -41
- data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +0 -44
- data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +0 -31
- data/lib/frameworks/sproutcore/apps/tests/states/start.js +0 -39
- data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +0 -3
- data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +0 -25
- data/lib/frameworks/sproutcore/frameworks/animation/README.md +0 -79
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +0 -1208
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +0 -152
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +0 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +0 -203
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +0 -213
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +0 -163
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +0 -97
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +0 -312
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +0 -961
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +0 -40
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +0 -27
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +0 -394
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -8981
- data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +0 -40
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
@@ -13,64 +13,64 @@ SC.Function = /** @scope SC.Function.prototype */{
|
|
13
13
|
/**
|
14
14
|
@see Function.prototype.property
|
15
15
|
*/
|
16
|
-
property: function(fn, keys) {
|
17
|
-
fn.dependentKeys = SC.$A(keys)
|
18
|
-
var guid = SC.guidFor(fn)
|
19
|
-
fn.cacheKey = "__cache__" + guid
|
20
|
-
fn.lastSetValueKey = "__lastValue__" + guid
|
21
|
-
fn.isProperty = true
|
22
|
-
return fn
|
16
|
+
property: function (fn, keys) {
|
17
|
+
fn.dependentKeys = SC.$A(keys);
|
18
|
+
var guid = SC.guidFor(fn);
|
19
|
+
fn.cacheKey = "__cache__" + guid;
|
20
|
+
fn.lastSetValueKey = "__lastValue__" + guid;
|
21
|
+
fn.isProperty = true;
|
22
|
+
return fn;
|
23
23
|
},
|
24
24
|
|
25
25
|
/**
|
26
26
|
@see Function.prototype.cacheable
|
27
27
|
*/
|
28
|
-
cacheable: function(fn, aFlag) {
|
29
|
-
fn.isProperty = true
|
30
|
-
if (!fn.dependentKeys) fn.dependentKeys = []
|
31
|
-
fn.isCacheable = (aFlag === undefined) ? true : aFlag
|
32
|
-
return fn
|
28
|
+
cacheable: function (fn, aFlag) {
|
29
|
+
fn.isProperty = true; // also make a property just in case
|
30
|
+
if (!fn.dependentKeys) fn.dependentKeys = [];
|
31
|
+
fn.isCacheable = (aFlag === undefined) ? true : aFlag;
|
32
|
+
return fn;
|
33
33
|
},
|
34
34
|
|
35
35
|
/**
|
36
36
|
@see Function.prototype.idempotent
|
37
37
|
*/
|
38
|
-
idempotent: function(fn, aFlag) {
|
38
|
+
idempotent: function (fn, aFlag) {
|
39
39
|
fn.isProperty = true; // also make a property just in case
|
40
|
-
if (!fn.dependentKeys) this.dependentKeys = []
|
41
|
-
fn.isVolatile = (aFlag === undefined) ? true : aFlag
|
42
|
-
return fn
|
40
|
+
if (!fn.dependentKeys) this.dependentKeys = [];
|
41
|
+
fn.isVolatile = (aFlag === undefined) ? true : aFlag;
|
42
|
+
return fn;
|
43
43
|
},
|
44
44
|
|
45
45
|
/**
|
46
46
|
@see Function.prototype.enhance
|
47
47
|
*/
|
48
|
-
enhance: function(fn) {
|
48
|
+
enhance: function (fn) {
|
49
49
|
fn.isEnhancement = true;
|
50
|
-
return fn
|
50
|
+
return fn;
|
51
51
|
},
|
52
52
|
|
53
53
|
/**
|
54
54
|
@see Function.prototype.observes
|
55
55
|
*/
|
56
|
-
observes: function(fn, propertyPaths) {
|
56
|
+
observes: function (fn, propertyPaths) {
|
57
57
|
// sort property paths into local paths (i.e just a property name) and
|
58
58
|
// full paths (i.e. those with a . or * in them)
|
59
|
-
var loc = propertyPaths.length, local = null, paths = null
|
60
|
-
while(--loc >= 0) {
|
61
|
-
var path = propertyPaths[loc]
|
59
|
+
var loc = propertyPaths.length, local = null, paths = null;
|
60
|
+
while (--loc >= 0) {
|
61
|
+
var path = propertyPaths[loc];
|
62
62
|
// local
|
63
|
-
if ((path.indexOf('.')<0) && (path.indexOf('*')<0)) {
|
64
|
-
if (!local) local = fn.localPropertyPaths = []
|
63
|
+
if ((path.indexOf('.') < 0) && (path.indexOf('*') < 0)) {
|
64
|
+
if (!local) local = fn.localPropertyPaths = [];
|
65
65
|
local.push(path);
|
66
66
|
|
67
67
|
// regular
|
68
68
|
} else {
|
69
|
-
if (!paths) paths = fn.propertyPaths = []
|
70
|
-
paths.push(path)
|
69
|
+
if (!paths) paths = fn.propertyPaths = [];
|
70
|
+
paths.push(path);
|
71
71
|
}
|
72
72
|
}
|
73
|
-
return fn
|
73
|
+
return fn;
|
74
74
|
}
|
75
75
|
|
76
76
|
};
|
@@ -5,8 +5,8 @@
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
|
-
sc_require('mixins/enumerable')
|
9
|
-
sc_require('mixins/observable')
|
8
|
+
sc_require('mixins/enumerable');
|
9
|
+
sc_require('mixins/observable');
|
10
10
|
sc_require('mixins/freezable');
|
11
11
|
sc_require('mixins/copyable');
|
12
12
|
|
@@ -20,16 +20,16 @@ sc_require('mixins/copyable');
|
|
20
20
|
Examples
|
21
21
|
---
|
22
22
|
|
23
|
-
var set = SC.IndexSet.create(ranges)
|
23
|
+
var set = SC.IndexSet.create(ranges);
|
24
24
|
set.contains(index);
|
25
25
|
set.add(index, length);
|
26
26
|
set.remove(index, length);
|
27
27
|
|
28
28
|
// uses a backing SC.Array object to return each index
|
29
|
-
set.forEach(function(object) { .. })
|
29
|
+
set.forEach(function (object) { .. })
|
30
30
|
|
31
31
|
// returns ranges
|
32
|
-
set.forEachRange(function(start, length) { .. });
|
32
|
+
set.forEachRange(function (start, length) { .. });
|
33
33
|
|
34
34
|
Implementation Notes
|
35
35
|
---
|
@@ -46,24 +46,25 @@ sc_require('mixins/copyable');
|
|
46
46
|
@since SproutCore 1.0
|
47
47
|
*/
|
48
48
|
SC.IndexSet = SC.mixin({},
|
49
|
-
SC.
|
49
|
+
SC.Observable, SC.Enumerable, SC.Freezable, SC.Copyable,
|
50
50
|
/** @scope SC.IndexSet.prototype */ {
|
51
51
|
|
52
52
|
/** @private
|
53
53
|
Walks a content array and copies its contents to a new array. For large
|
54
54
|
content arrays this is faster than using slice()
|
55
55
|
*/
|
56
|
-
_sc_sliceContent: function(c) {
|
56
|
+
_sc_sliceContent: function (c) {
|
57
57
|
if (c.length < 1000) return c.slice(); // use native when faster
|
58
58
|
var cur = 0, ret = [], next = c[0];
|
59
59
|
while(next !== 0) {
|
60
|
-
ret[cur] = next
|
61
|
-
cur = (next<0) ? (0-next) : next
|
60
|
+
ret[cur] = next;
|
61
|
+
cur = (next<0) ? (0-next) : next;
|
62
62
|
next = c[cur];
|
63
63
|
}
|
64
64
|
ret[cur] = 0;
|
65
|
+
|
65
66
|
this._hint(0, cur, ret); // hints are not copied manually - add them
|
66
|
-
return ret
|
67
|
+
return ret;
|
67
68
|
},
|
68
69
|
|
69
70
|
/**
|
@@ -73,7 +74,7 @@ SC.IndexSet = SC.mixin({},
|
|
73
74
|
@param {Number} [length] The length of the range (by default set to 1 if start is a Number)
|
74
75
|
@returns {SC.IndexSet}
|
75
76
|
*/
|
76
|
-
create: function(start, length) {
|
77
|
+
create: function (start, length) {
|
77
78
|
var ret = SC.beget(this);
|
78
79
|
ret.initObservable();
|
79
80
|
ret.registerDependentKey('min', '[]');
|
@@ -84,7 +85,7 @@ SC.IndexSet = SC.mixin({},
|
|
84
85
|
// This is here because `create` doesn't follow the
|
85
86
|
// idiomatic SC convention of passing in an object literal to `create`.
|
86
87
|
if (start && !(SC.typeOf(start) === SC.T_NUMBER || start.isIndexSet)) {
|
87
|
-
throw "SC.IndexSet does not accept `%@` as a parameter to `create`. Take a look at the function signature for proper usage.".fmt(start);
|
88
|
+
throw new Error("SC.IndexSet does not accept `%@` as a parameter to `create`. Take a look at the function signature for proper usage.".fmt(start));
|
88
89
|
}
|
89
90
|
// @endif
|
90
91
|
|
@@ -93,14 +94,14 @@ SC.IndexSet = SC.mixin({},
|
|
93
94
|
ret._content = this._sc_sliceContent(start._content);
|
94
95
|
ret.max = start.max;
|
95
96
|
ret.length = start.length;
|
96
|
-
ret.source = start.source
|
97
|
+
ret.source = start.source;
|
97
98
|
|
98
99
|
// otherwise just do a regular add
|
99
100
|
} else {
|
100
101
|
ret._content = [0];
|
101
102
|
if (start !== undefined) ret.add(start, length);
|
102
103
|
}
|
103
|
-
return ret
|
104
|
+
return ret;
|
104
105
|
},
|
105
106
|
|
106
107
|
/**
|
@@ -138,7 +139,7 @@ SC.IndexSet = SC.mixin({},
|
|
138
139
|
|
139
140
|
@type Number
|
140
141
|
*/
|
141
|
-
min: function() {
|
142
|
+
min: function () {
|
142
143
|
var content = this._content,
|
143
144
|
cur = content[0];
|
144
145
|
return (cur === 0) ? -1 : (cur>0) ? 0 : Math.abs(cur);
|
@@ -150,7 +151,7 @@ SC.IndexSet = SC.mixin({},
|
|
150
151
|
|
151
152
|
@type Number
|
152
153
|
*/
|
153
|
-
firstObject: function() {
|
154
|
+
firstObject: function () {
|
154
155
|
return (this.get('length')>0) ? this.get('min') : undefined;
|
155
156
|
}.property(),
|
156
157
|
|
@@ -161,18 +162,22 @@ SC.IndexSet = SC.mixin({},
|
|
161
162
|
@param {Number} index
|
162
163
|
@returns {Number} starting index
|
163
164
|
*/
|
164
|
-
rangeStartForIndex: function(index) {
|
165
|
+
rangeStartForIndex: function (index) {
|
165
166
|
var content = this._content,
|
166
167
|
max = this.get('max'),
|
167
168
|
ret, next, accel;
|
168
169
|
|
169
170
|
// fast cases
|
170
|
-
if (index >= max) return max
|
171
|
-
if (Math.abs(content[index]) > index) return index
|
171
|
+
if (index >= max) return max;
|
172
|
+
if (Math.abs(content[index]) > index) return index; // we hit a border
|
172
173
|
|
173
174
|
// use accelerator to find nearest content range
|
174
175
|
accel = index - (index % SC.IndexSet.HINT_SIZE);
|
175
176
|
ret = content[accel];
|
177
|
+
|
178
|
+
// If there are no hints, we are in the infinite range.
|
179
|
+
if (SC.none(ret)) { ret = this._infRange; }
|
180
|
+
|
176
181
|
if (ret<0 || ret>index) ret = accel;
|
177
182
|
next = content[ret];
|
178
183
|
|
@@ -186,10 +191,10 @@ SC.IndexSet = SC.mixin({},
|
|
186
191
|
// now step forward through ranges until we find one that includes the
|
187
192
|
// index.
|
188
193
|
while (next < index) {
|
189
|
-
ret = next
|
194
|
+
ret = next;
|
190
195
|
next = Math.abs(content[ret]);
|
191
196
|
}
|
192
|
-
return ret
|
197
|
+
return ret;
|
193
198
|
},
|
194
199
|
|
195
200
|
/**
|
@@ -199,10 +204,10 @@ SC.IndexSet = SC.mixin({},
|
|
199
204
|
@param {Object} obj another object.
|
200
205
|
@returns {Boolean}
|
201
206
|
*/
|
202
|
-
isEqual: function(obj) {
|
207
|
+
isEqual: function (obj) {
|
203
208
|
|
204
209
|
// optimize for some special cases
|
205
|
-
if (obj === this) return YES
|
210
|
+
if (obj === this) return YES;
|
206
211
|
if (!obj || !obj.isIndexSet || (obj.max !== this.max) || (obj.length !== this.length)) return NO;
|
207
212
|
|
208
213
|
// ok, now we need to actually compare the ranges of the two.
|
@@ -212,11 +217,11 @@ SC.IndexSet = SC.mixin({},
|
|
212
217
|
next = lcontent[cur];
|
213
218
|
|
214
219
|
do {
|
215
|
-
if (rcontent[cur] !== next) return NO
|
216
|
-
cur = Math.abs(next)
|
220
|
+
if (rcontent[cur] !== next) return NO;
|
221
|
+
cur = Math.abs(next);
|
217
222
|
next = lcontent[cur];
|
218
223
|
} while (cur !== 0);
|
219
|
-
return YES
|
224
|
+
return YES;
|
220
225
|
},
|
221
226
|
|
222
227
|
/**
|
@@ -226,9 +231,9 @@ SC.IndexSet = SC.mixin({},
|
|
226
231
|
@param {Number} index index to check
|
227
232
|
@returns {Number} index or -1
|
228
233
|
*/
|
229
|
-
indexBefore: function(index) {
|
234
|
+
indexBefore: function (index) {
|
230
235
|
|
231
|
-
if (index===0) return -1; // fast path
|
236
|
+
if (index === 0) return -1; // fast path
|
232
237
|
index--; // start with previous index
|
233
238
|
|
234
239
|
var content = this._content,
|
@@ -236,10 +241,12 @@ SC.IndexSet = SC.mixin({},
|
|
236
241
|
start = this.rangeStartForIndex(index);
|
237
242
|
if (!content) return null;
|
238
243
|
|
244
|
+
if (!isFinite(start)) return index; // fast path
|
245
|
+
|
239
246
|
// loop backwards until we find a range that is in the set.
|
240
247
|
while((start===max) || (content[start]<0)) {
|
241
|
-
if (start === 0) return -1
|
242
|
-
index = start -1
|
248
|
+
if (start === 0) return -1; // nothing before; just quit
|
249
|
+
index = start - 1;
|
243
250
|
start = this.rangeStartForIndex(index);
|
244
251
|
}
|
245
252
|
|
@@ -253,19 +260,19 @@ SC.IndexSet = SC.mixin({},
|
|
253
260
|
@param {Number} index index to check
|
254
261
|
@returns {Number} index or -1
|
255
262
|
*/
|
256
|
-
indexAfter: function(index) {
|
263
|
+
indexAfter: function (index) {
|
257
264
|
var content = this._content,
|
258
265
|
max = this.get('max'),
|
259
|
-
start, next
|
260
|
-
if (!content || (index>=max)) return -1; // fast path
|
261
|
-
index++; // start with next index
|
266
|
+
start, next;
|
262
267
|
|
268
|
+
if (!content || (index >= max)) return -1; // fast path
|
269
|
+
index++; // start with next index
|
263
270
|
|
264
271
|
// loop forwards until we find a range that is in the set.
|
265
272
|
start = this.rangeStartForIndex(index);
|
266
273
|
next = content[start];
|
267
274
|
while(next<0) {
|
268
|
-
if (next === 0) return -1
|
275
|
+
if (next === 0) return -1; //nothing after; just quit
|
269
276
|
index = start = Math.abs(next);
|
270
277
|
next = content[start];
|
271
278
|
}
|
@@ -280,29 +287,29 @@ SC.IndexSet = SC.mixin({},
|
|
280
287
|
@param {Number} length optional range length
|
281
288
|
@returns {Boolean}
|
282
289
|
*/
|
283
|
-
contains: function(start, length) {
|
290
|
+
contains: function (start, length) {
|
284
291
|
var content, cur, next, rstart, rnext;
|
285
292
|
|
286
293
|
// normalize input
|
287
294
|
if (length === undefined) {
|
288
|
-
if (start === null || start === undefined) return NO
|
295
|
+
if (start === null || start === undefined) return NO;
|
289
296
|
|
290
297
|
if (typeof start === SC.T_NUMBER) {
|
291
|
-
length = 1
|
298
|
+
length = 1;
|
292
299
|
|
293
300
|
// if passed an index set, check each receiver range
|
294
301
|
} else if (start && start.isIndexSet) {
|
295
|
-
if (start === this) return YES
|
302
|
+
if (start === this) return YES; // optimization
|
296
303
|
|
297
|
-
content = start._content
|
298
|
-
cur = 0
|
304
|
+
content = start._content;
|
305
|
+
cur = 0;
|
299
306
|
next = content[cur];
|
300
307
|
while (next !== 0) {
|
301
|
-
if ((next>0) && !this.contains(cur, next-cur)) return NO
|
308
|
+
if ((next>0) && !this.contains(cur, next-cur)) return NO;
|
302
309
|
cur = Math.abs(next);
|
303
310
|
next = content[cur];
|
304
311
|
}
|
305
|
-
return YES
|
312
|
+
return YES;
|
306
313
|
|
307
314
|
} else {
|
308
315
|
length = start.length;
|
@@ -311,9 +318,13 @@ SC.IndexSet = SC.mixin({},
|
|
311
318
|
}
|
312
319
|
|
313
320
|
rstart = this.rangeStartForIndex(start);
|
314
|
-
|
321
|
+
if (isFinite(rstart)) {
|
322
|
+
rnext = this._content[rstart];
|
315
323
|
|
316
|
-
|
324
|
+
return (rnext>0) && (rstart <= start) && (rnext >= (start+length));
|
325
|
+
} else {
|
326
|
+
return true;
|
327
|
+
}
|
317
328
|
},
|
318
329
|
|
319
330
|
/**
|
@@ -324,27 +335,27 @@ SC.IndexSet = SC.mixin({},
|
|
324
335
|
@param {Number} length optional range length
|
325
336
|
@returns {Boolean}
|
326
337
|
*/
|
327
|
-
intersects: function(start, length) {
|
338
|
+
intersects: function (start, length) {
|
328
339
|
var content, cur, next, lim;
|
329
340
|
|
330
341
|
// normalize input
|
331
342
|
if (length === undefined) {
|
332
343
|
if (typeof start === SC.T_NUMBER) {
|
333
|
-
length = 1
|
344
|
+
length = 1;
|
334
345
|
|
335
346
|
// if passed an index set, check each receiver range
|
336
347
|
} else if (start && start.isIndexSet) {
|
337
|
-
if (start === this) return YES
|
348
|
+
if (start === this) return YES; // optimization
|
338
349
|
|
339
|
-
content = start._content
|
340
|
-
cur = 0
|
350
|
+
content = start._content;
|
351
|
+
cur = 0;
|
341
352
|
next = content[cur];
|
342
353
|
while (next !== 0) {
|
343
|
-
if ((next>0) && this.intersects(cur, next-cur)) return YES
|
354
|
+
if ((next>0) && this.intersects(cur, next-cur)) return YES;
|
344
355
|
cur = Math.abs(next);
|
345
356
|
next = content[cur];
|
346
357
|
}
|
347
|
-
return NO
|
358
|
+
return NO;
|
348
359
|
|
349
360
|
} else {
|
350
361
|
length = start.length;
|
@@ -358,11 +369,11 @@ SC.IndexSet = SC.mixin({},
|
|
358
369
|
lim = start + length;
|
359
370
|
while (cur < lim) {
|
360
371
|
if (next === 0) return NO; // no match and at end!
|
361
|
-
if ((next > 0) && (next > start)) return YES
|
372
|
+
if ((next > 0) && (next > start)) return YES; // found a match
|
362
373
|
cur = Math.abs(next);
|
363
374
|
next = content[cur];
|
364
375
|
}
|
365
|
-
return NO
|
376
|
+
return NO; // no match
|
366
377
|
},
|
367
378
|
|
368
379
|
/**
|
@@ -373,7 +384,7 @@ SC.IndexSet = SC.mixin({},
|
|
373
384
|
@param {Number} length optional range length
|
374
385
|
@returns {SC.IndexSet} new index set
|
375
386
|
*/
|
376
|
-
without: function(start, length) {
|
387
|
+
without: function (start, length) {
|
377
388
|
if (start === this) return SC.IndexSet.create(); // just need empty set
|
378
389
|
return this.clone().remove(start, length);
|
379
390
|
},
|
@@ -386,11 +397,11 @@ SC.IndexSet = SC.mixin({},
|
|
386
397
|
@param {Number} length optional length of range.
|
387
398
|
@returns {SC.IndexSet} receiver
|
388
399
|
*/
|
389
|
-
replace: function(start, length) {
|
400
|
+
replace: function (start, length) {
|
390
401
|
|
391
402
|
if (length === undefined) {
|
392
403
|
if (typeof start === SC.T_NUMBER) {
|
393
|
-
length = 1
|
404
|
+
length = 1;
|
394
405
|
} else if (start && start.isIndexSet) {
|
395
406
|
this._content = this._sc_sliceContent(start._content);
|
396
407
|
this.beginPropertyChanges()
|
@@ -399,7 +410,7 @@ SC.IndexSet = SC.mixin({},
|
|
399
410
|
.set('source', start.source)
|
400
411
|
.enumerableContentDidChange();
|
401
412
|
this.endPropertyChanges();
|
402
|
-
return this
|
413
|
+
return this;
|
403
414
|
|
404
415
|
} else {
|
405
416
|
length = start.length;
|
@@ -410,7 +421,7 @@ SC.IndexSet = SC.mixin({},
|
|
410
421
|
var oldlen = this.length;
|
411
422
|
this._content.length=1;
|
412
423
|
this._content[0] = 0;
|
413
|
-
this.length = this.max = 0
|
424
|
+
this.length = this.max = 0; // reset without notifying since add()
|
414
425
|
return this.add(start, length);
|
415
426
|
},
|
416
427
|
|
@@ -418,11 +429,11 @@ SC.IndexSet = SC.mixin({},
|
|
418
429
|
Adds the specified range of indexes to the set. You can also pass another
|
419
430
|
IndexSet to union the contents of the index set with the receiver.
|
420
431
|
|
421
|
-
@param {Number} start index, Range, or another IndexSet
|
422
|
-
@param {Number} length
|
432
|
+
@param {Number} start Start index, Range, or another IndexSet
|
433
|
+
@param {Number} [length=1] The length of range.
|
423
434
|
@returns {SC.IndexSet} receiver
|
424
435
|
*/
|
425
|
-
add: function(start, length) {
|
436
|
+
add: function (start, length) {
|
426
437
|
|
427
438
|
if (this.isFrozen) throw SC.FROZEN_ERROR;
|
428
439
|
|
@@ -435,26 +446,26 @@ SC.IndexSet = SC.mixin({},
|
|
435
446
|
|
436
447
|
if (!content) return this; // nothing to do
|
437
448
|
|
438
|
-
cur = 0
|
449
|
+
cur = 0;
|
439
450
|
next = content[0];
|
440
451
|
while(next !== 0) {
|
441
452
|
if (next>0) this.add(cur, next-cur);
|
442
453
|
cur = next<0 ? 0-next : next;
|
443
454
|
next = content[cur];
|
444
455
|
}
|
445
|
-
return this
|
456
|
+
return this;
|
446
457
|
|
447
458
|
} else if (length === undefined) {
|
448
459
|
|
449
460
|
if (start === null || start === undefined) {
|
450
461
|
return this; // nothing to do
|
451
462
|
} else if (typeof start === SC.T_NUMBER) {
|
452
|
-
length = 1
|
463
|
+
length = 1;
|
453
464
|
} else {
|
454
465
|
length = start.length;
|
455
466
|
start = start.start;
|
456
467
|
}
|
457
|
-
} else if (length === null) length = 1
|
468
|
+
} else if (length === null) length = 1;
|
458
469
|
|
459
470
|
// if no length - do nothing.
|
460
471
|
if (length <= 0) return this;
|
@@ -462,9 +473,9 @@ SC.IndexSet = SC.mixin({},
|
|
462
473
|
// special case - appending to end of set
|
463
474
|
var max = this.get('max'),
|
464
475
|
oldmax = max,
|
465
|
-
delta, value
|
476
|
+
delta, value;
|
466
477
|
|
467
|
-
content = this._content
|
478
|
+
content = this._content;
|
468
479
|
|
469
480
|
if (start === max) {
|
470
481
|
|
@@ -476,8 +487,8 @@ SC.IndexSet = SC.mixin({},
|
|
476
487
|
// just extend range at end
|
477
488
|
if (next > 0) {
|
478
489
|
delete content[max]; // no 0
|
479
|
-
content[cur] = max = start + length
|
480
|
-
start = cur
|
490
|
+
content[cur] = max = start + length;
|
491
|
+
start = cur;
|
481
492
|
|
482
493
|
// previous range was not in set, just tack onto the end
|
483
494
|
} else {
|
@@ -487,21 +498,21 @@ SC.IndexSet = SC.mixin({},
|
|
487
498
|
content[start] = max = length;
|
488
499
|
}
|
489
500
|
|
490
|
-
content[max] = 0
|
501
|
+
content[max] = 0;
|
491
502
|
this.set('max', max);
|
492
|
-
this.set('length', this.length + length)
|
493
|
-
length = max - start
|
503
|
+
this.set('length', this.length + length);
|
504
|
+
length = max - start;
|
494
505
|
|
495
506
|
} else if (start > max) {
|
496
507
|
content[max] = 0-start; // empty!
|
497
|
-
content[start] = start+length
|
508
|
+
content[start] = start+length;
|
498
509
|
content[start+length] = 0; // set end
|
499
|
-
this.set('max', start + length)
|
500
|
-
this.set('length', this.length + length)
|
510
|
+
this.set('max', start + length);
|
511
|
+
this.set('length', this.length + length);
|
501
512
|
|
502
513
|
// affected range goes from starting range to end of content.
|
503
|
-
length = start + length - max
|
504
|
-
start = max
|
514
|
+
length = start + length - max;
|
515
|
+
start = max;
|
505
516
|
|
506
517
|
// otherwise, merge into existing range
|
507
518
|
} else {
|
@@ -509,32 +520,32 @@ SC.IndexSet = SC.mixin({},
|
|
509
520
|
// find nearest starting range. split or join that range
|
510
521
|
cur = this.rangeStartForIndex(start);
|
511
522
|
next = content[cur];
|
512
|
-
max = start + length
|
513
|
-
delta = 0
|
523
|
+
max = start + length;
|
524
|
+
delta = 0;
|
514
525
|
|
515
526
|
// we are right on a boundary and we had a range or were the end, then
|
516
527
|
// go back one more.
|
517
528
|
if ((start>0) && (cur === start) && (next <= 0)) {
|
518
529
|
cur = this.rangeStartForIndex(start-1);
|
519
|
-
next = content[cur]
|
530
|
+
next = content[cur];
|
520
531
|
}
|
521
532
|
|
522
533
|
// previous range is not in set. splice it here
|
523
534
|
if (next < 0) {
|
524
|
-
content[cur] = 0-start
|
535
|
+
content[cur] = 0-start;
|
525
536
|
|
526
537
|
// if previous range extends beyond this range, splice afterwards also
|
527
538
|
if (Math.abs(next) > max) {
|
528
539
|
content[start] = 0-max;
|
529
|
-
content[max] = next
|
540
|
+
content[max] = next;
|
530
541
|
} else content[start] = next;
|
531
542
|
|
532
543
|
// previous range is in set. merge the ranges
|
533
544
|
} else {
|
534
|
-
start = cur
|
545
|
+
start = cur;
|
535
546
|
if (next > max) {
|
536
|
-
// delta -= next - max
|
537
|
-
max = next
|
547
|
+
// delta -= next - max;
|
548
|
+
max = next;
|
538
549
|
}
|
539
550
|
}
|
540
551
|
|
@@ -548,21 +559,21 @@ SC.IndexSet = SC.mixin({},
|
|
548
559
|
value = content[cur];
|
549
560
|
if (value === 0) {
|
550
561
|
content[max] = 0;
|
551
|
-
next = max
|
552
|
-
delta += max - cur
|
562
|
+
next = max;
|
563
|
+
delta += max - cur;
|
553
564
|
} else {
|
554
565
|
next = Math.abs(value);
|
555
566
|
if (next > max) {
|
556
|
-
content[max] = value
|
557
|
-
next = max
|
567
|
+
content[max] = value;
|
568
|
+
next = max;
|
558
569
|
}
|
559
570
|
|
560
571
|
// ok, cur range is entirely inside top range.
|
561
572
|
// add to delta if needed
|
562
|
-
if (value < 0) delta += next - cur
|
573
|
+
if (value < 0) delta += next - cur;
|
563
574
|
}
|
564
575
|
|
565
|
-
delete content[cur]
|
576
|
+
delete content[cur]; // and remove range
|
566
577
|
cur = next;
|
567
578
|
}
|
568
579
|
|
@@ -570,18 +581,18 @@ SC.IndexSet = SC.mixin({},
|
|
570
581
|
// merge in also - don't adjust delta because these aren't new indexes
|
571
582
|
if ((cur = content[max]) > 0) {
|
572
583
|
delete content[max];
|
573
|
-
max = cur
|
584
|
+
max = cur;
|
574
585
|
}
|
575
586
|
|
576
587
|
// finally set my own range.
|
577
|
-
content[start] = max
|
578
|
-
if (max > oldmax) this.set('max', max)
|
588
|
+
content[start] = max;
|
589
|
+
if (max > oldmax) this.set('max', max);
|
579
590
|
|
580
591
|
// adjust length
|
581
592
|
this.set('length', this.get('length') + delta);
|
582
593
|
|
583
594
|
// compute hint range
|
584
|
-
length = max - start
|
595
|
+
length = max - start;
|
585
596
|
}
|
586
597
|
|
587
598
|
this._hint(start, length);
|
@@ -596,7 +607,7 @@ SC.IndexSet = SC.mixin({},
|
|
596
607
|
@param {Number} length optional length of range.
|
597
608
|
@returns {SC.IndexSet} receiver
|
598
609
|
*/
|
599
|
-
remove: function(start, length) {
|
610
|
+
remove: function (start, length) {
|
600
611
|
|
601
612
|
if (this.isFrozen) throw SC.FROZEN_ERROR;
|
602
613
|
|
@@ -606,7 +617,7 @@ SC.IndexSet = SC.mixin({},
|
|
606
617
|
return this; // nothing to do
|
607
618
|
|
608
619
|
} else if (typeof start === SC.T_NUMBER) {
|
609
|
-
length = 1
|
620
|
+
length = 1;
|
610
621
|
|
611
622
|
// if passed an index set, just add each range in the index set.
|
612
623
|
} else if (start.isIndexSet) {
|
@@ -625,7 +636,7 @@ SC.IndexSet = SC.mixin({},
|
|
625
636
|
var max = this.get('max'),
|
626
637
|
oldmax = max,
|
627
638
|
content = this._content,
|
628
|
-
cur, next, delta, value, last
|
639
|
+
cur, next, delta, value, last;
|
629
640
|
|
630
641
|
// if we're past the end, do nothing.
|
631
642
|
if (start >= max) return this;
|
@@ -633,35 +644,44 @@ SC.IndexSet = SC.mixin({},
|
|
633
644
|
// find nearest starting range. split or join that range
|
634
645
|
cur = this.rangeStartForIndex(start);
|
635
646
|
next = content[cur];
|
636
|
-
last = start + length
|
637
|
-
delta = 0
|
647
|
+
last = start + length;
|
648
|
+
delta = 0;
|
638
649
|
|
639
650
|
// we are right on a boundary and we had a range or were the end, then
|
640
651
|
// go back one more.
|
641
|
-
if ((start>0) && (cur === start) && (next > 0)) {
|
652
|
+
if ((start > 0) && (cur === start) && (next > 0)) {
|
642
653
|
cur = this.rangeStartForIndex(start-1);
|
643
|
-
next = content[cur]
|
654
|
+
next = content[cur];
|
644
655
|
}
|
645
656
|
|
646
657
|
// previous range is in set. splice it here
|
647
658
|
if (next > 0) {
|
648
|
-
content[cur] = start
|
659
|
+
content[cur] = start;
|
649
660
|
|
650
661
|
// if previous range extends beyond this range, splice afterwards also
|
651
662
|
if (next > last) {
|
652
663
|
content[start] = last;
|
653
|
-
content[last] = next
|
664
|
+
content[last] = next;
|
654
665
|
} else content[start] = next;
|
655
666
|
|
656
667
|
// previous range is not in set. merge the ranges
|
657
668
|
} else {
|
658
|
-
start = cur
|
669
|
+
start = cur;
|
659
670
|
next = Math.abs(next);
|
660
671
|
if (next > last) {
|
661
|
-
last = next
|
672
|
+
last = next;
|
662
673
|
}
|
663
674
|
}
|
664
675
|
|
676
|
+
// If splicing into the infinite range, we have to add hints up to the start
|
677
|
+
// of the splice and adjust our pointer to the start of the infinite range.
|
678
|
+
if (!isFinite(next)) {
|
679
|
+
this._hint(cur, start - cur);
|
680
|
+
|
681
|
+
// Infinite range
|
682
|
+
this._infRange = last;
|
683
|
+
}
|
684
|
+
|
665
685
|
// at this point there should be clean starting point for the range.
|
666
686
|
// just walk the ranges, adding up the length delta and then removing
|
667
687
|
// the range until we find a range that passes last
|
@@ -672,21 +692,21 @@ SC.IndexSet = SC.mixin({},
|
|
672
692
|
value = content[cur];
|
673
693
|
if (value === 0) {
|
674
694
|
content[last] = 0;
|
675
|
-
next = last
|
695
|
+
next = last;
|
676
696
|
|
677
697
|
} else {
|
678
698
|
next = Math.abs(value);
|
679
699
|
if (next > last) {
|
680
|
-
content[last] = value
|
681
|
-
next = last
|
700
|
+
content[last] = value;
|
701
|
+
next = last;
|
682
702
|
}
|
683
703
|
|
684
704
|
// ok, cur range is entirely inside top range.
|
685
705
|
// add to delta if needed
|
686
|
-
if (value > 0) delta += next - cur
|
706
|
+
if (value > 0) delta += next - cur;
|
687
707
|
}
|
688
708
|
|
689
|
-
delete content[cur]
|
709
|
+
delete content[cur]; // and remove range
|
690
710
|
cur = next;
|
691
711
|
}
|
692
712
|
|
@@ -694,24 +714,28 @@ SC.IndexSet = SC.mixin({},
|
|
694
714
|
// merge in also - don't adjust delta because these aren't new indexes
|
695
715
|
if ((cur = content[last]) < 0) {
|
696
716
|
delete content[last];
|
697
|
-
last = Math.abs(cur)
|
717
|
+
last = Math.abs(cur);
|
698
718
|
}
|
699
719
|
|
700
720
|
// set my own range - if the next item is 0, then clear it.
|
701
721
|
if (content[last] === 0) {
|
702
722
|
delete content[last];
|
703
|
-
content[start] = 0
|
723
|
+
content[start] = 0;
|
704
724
|
this.set('max', start); //max has changed
|
705
725
|
|
706
726
|
} else {
|
707
|
-
content[start] = 0-last
|
727
|
+
content[start] = 0-last;
|
708
728
|
}
|
709
729
|
|
710
730
|
// adjust length
|
711
|
-
|
731
|
+
if (isFinite(delta)) {
|
732
|
+
this.set('length', this.get('length') - delta);
|
733
|
+
} else {
|
734
|
+
this.set('length', 0);
|
735
|
+
}
|
712
736
|
|
713
|
-
// compute hint range
|
714
|
-
length = last - start
|
737
|
+
// compute hint range. Constrain it to the length of the content.
|
738
|
+
length = Math.min(content.length, last - start);
|
715
739
|
|
716
740
|
this._hint(start, length);
|
717
741
|
if (delta !== 0) this.enumerableContentDidChange();
|
@@ -723,28 +747,35 @@ SC.IndexSet = SC.mixin({},
|
|
723
747
|
pointing to the nearest range start. The passed range must start on a
|
724
748
|
range boundary. It can end anywhere.
|
725
749
|
*/
|
726
|
-
_hint: function(start, length, content) {
|
750
|
+
_hint: function (start, length, content) {
|
727
751
|
if (content === undefined) content = this._content;
|
728
752
|
|
729
753
|
var skip = SC.IndexSet.HINT_SIZE,
|
730
754
|
next = Math.abs(content[start]), // start of next range
|
731
755
|
loc = start - (start % skip) + skip, // next hint loc
|
732
|
-
lim = start + length
|
756
|
+
lim = start + length; // stop
|
733
757
|
|
734
758
|
while (loc < lim) {
|
735
|
-
// make sure we are in current
|
759
|
+
// make sure we are in current range
|
736
760
|
while ((next !== 0) && (next <= loc)) {
|
737
|
-
start = next
|
738
|
-
next = Math.abs(content[start])
|
761
|
+
start = next;
|
762
|
+
next = Math.abs(content[start]);
|
739
763
|
}
|
740
764
|
|
741
765
|
// past end
|
742
766
|
if (next === 0) {
|
743
767
|
delete content[loc];
|
744
768
|
|
769
|
+
} else if (!isFinite(next)) {
|
770
|
+
// We can't hint the infinite range the normal way. Instead we have a
|
771
|
+
// single pointer to the start of the infinite range that we use when
|
772
|
+
// no hints exist.
|
773
|
+
this._infRange = start;
|
774
|
+
loc = Infinity;
|
775
|
+
|
745
776
|
// do not change if on actual boundary
|
746
777
|
} else if (loc !== start) {
|
747
|
-
content[loc] = start
|
778
|
+
content[loc] = start; // set hint
|
748
779
|
}
|
749
780
|
|
750
781
|
loc += skip;
|
@@ -754,12 +785,13 @@ SC.IndexSet = SC.mixin({},
|
|
754
785
|
/**
|
755
786
|
Clears the set
|
756
787
|
*/
|
757
|
-
clear: function() {
|
788
|
+
clear: function () {
|
758
789
|
if (this.isFrozen) throw SC.FROZEN_ERROR;
|
759
790
|
|
760
791
|
var oldlen = this.length;
|
761
|
-
this._content.length=1;
|
792
|
+
this._content.length = 1;
|
762
793
|
this._content[0] = 0;
|
794
|
+
this._infRange = null;
|
763
795
|
this.set('length', 0).set('max', 0);
|
764
796
|
if (oldlen > 0) this.enumerableContentDidChange();
|
765
797
|
},
|
@@ -769,19 +801,19 @@ SC.IndexSet = SC.mixin({},
|
|
769
801
|
|
770
802
|
@param {Enumerable} objects The list of ranges you want to add
|
771
803
|
*/
|
772
|
-
addEach: function(objects) {
|
804
|
+
addEach: function (objects) {
|
773
805
|
if (this.isFrozen) throw SC.FROZEN_ERROR;
|
774
806
|
|
775
807
|
this.beginPropertyChanges();
|
776
|
-
var idx = objects.get('length')
|
808
|
+
var idx = objects.get('length');
|
777
809
|
if (objects.isSCArray) {
|
778
|
-
while(--idx >= 0) this.add(objects.objectAt(idx))
|
810
|
+
while(--idx >= 0) this.add(objects.objectAt(idx));
|
779
811
|
} else if (objects.isEnumerable) {
|
780
|
-
objects.forEach(function(idx) { this.add(idx); }, this);
|
812
|
+
objects.forEach(function (idx) { this.add(idx); }, this);
|
781
813
|
}
|
782
814
|
this.endPropertyChanges();
|
783
815
|
|
784
|
-
return this
|
816
|
+
return this;
|
785
817
|
},
|
786
818
|
|
787
819
|
/**
|
@@ -789,27 +821,27 @@ SC.IndexSet = SC.mixin({},
|
|
789
821
|
|
790
822
|
@param {Object...} objects The list of objects you want to remove
|
791
823
|
*/
|
792
|
-
removeEach: function(objects) {
|
824
|
+
removeEach: function (objects) {
|
793
825
|
if (this.isFrozen) throw SC.FROZEN_ERROR;
|
794
826
|
|
795
827
|
this.beginPropertyChanges();
|
796
828
|
|
797
|
-
var idx = objects.get('length')
|
829
|
+
var idx = objects.get('length');
|
798
830
|
if (objects.isSCArray) {
|
799
|
-
while(--idx >= 0) this.remove(objects.objectAt(idx))
|
831
|
+
while(--idx >= 0) this.remove(objects.objectAt(idx));
|
800
832
|
} else if (objects.isEnumerable) {
|
801
|
-
objects.forEach(function(idx) { this.remove(idx); }, this);
|
833
|
+
objects.forEach(function (idx) { this.remove(idx); }, this);
|
802
834
|
}
|
803
835
|
|
804
836
|
this.endPropertyChanges();
|
805
837
|
|
806
|
-
return this
|
838
|
+
return this;
|
807
839
|
},
|
808
840
|
|
809
841
|
/**
|
810
842
|
Clones the set into a new set.
|
811
843
|
*/
|
812
|
-
clone: function() {
|
844
|
+
clone: function () {
|
813
845
|
return SC.IndexSet.create(this);
|
814
846
|
},
|
815
847
|
|
@@ -819,7 +851,7 @@ SC.IndexSet = SC.mixin({},
|
|
819
851
|
|
820
852
|
@returns {String}
|
821
853
|
*/
|
822
|
-
inspect: function() {
|
854
|
+
inspect: function () {
|
823
855
|
var content = this._content,
|
824
856
|
len = content.length,
|
825
857
|
idx = 0,
|
@@ -847,20 +879,20 @@ SC.IndexSet = SC.mixin({},
|
|
847
879
|
@param {Object} target the object to call the callback on
|
848
880
|
@returns {SC.IndexSet} receiver
|
849
881
|
*/
|
850
|
-
forEachRange: function(callback, target) {
|
882
|
+
forEachRange: function (callback, target) {
|
851
883
|
var content = this._content,
|
852
884
|
cur = 0,
|
853
885
|
next = content[cur],
|
854
886
|
source = this.source;
|
855
887
|
|
856
|
-
if (target === undefined) target = null
|
888
|
+
if (target === undefined) target = null;
|
857
889
|
while (next !== 0) {
|
858
890
|
if (next > 0) callback.call(target, cur, next - cur, this, source);
|
859
891
|
cur = Math.abs(next);
|
860
892
|
next = content[cur];
|
861
893
|
}
|
862
894
|
|
863
|
-
return this
|
895
|
+
return this;
|
864
896
|
},
|
865
897
|
|
866
898
|
/**
|
@@ -873,7 +905,7 @@ SC.IndexSet = SC.mixin({},
|
|
873
905
|
@param {Object} target
|
874
906
|
@returns {SC.IndexSet} receiver
|
875
907
|
*/
|
876
|
-
forEachIn: function(start, length, callback, target) {
|
908
|
+
forEachIn: function (start, length, callback, target) {
|
877
909
|
var content = this._content,
|
878
910
|
cur = 0,
|
879
911
|
idx = 0,
|
@@ -881,21 +913,21 @@ SC.IndexSet = SC.mixin({},
|
|
881
913
|
source = this.source,
|
882
914
|
next = content[cur];
|
883
915
|
|
884
|
-
if (target === undefined) target = null
|
916
|
+
if (target === undefined) target = null;
|
885
917
|
while (next !== 0) {
|
886
|
-
if (cur < start) cur = start
|
918
|
+
if (cur < start) cur = start; // skip forward
|
887
919
|
while((cur < next) && (cur < lim)) {
|
888
920
|
callback.call(target, cur++, idx++, this, source);
|
889
921
|
}
|
890
922
|
|
891
923
|
if (cur >= lim) {
|
892
|
-
cur = next = 0
|
924
|
+
cur = next = 0;
|
893
925
|
} else {
|
894
926
|
cur = Math.abs(next);
|
895
927
|
next = content[cur];
|
896
928
|
}
|
897
929
|
}
|
898
|
-
return this
|
930
|
+
return this;
|
899
931
|
},
|
900
932
|
|
901
933
|
/**
|
@@ -905,9 +937,9 @@ SC.IndexSet = SC.mixin({},
|
|
905
937
|
@param {Number} length optional range length
|
906
938
|
@returns {Number} count of indexes
|
907
939
|
*/
|
908
|
-
lengthIn: function(start, length) {
|
940
|
+
lengthIn: function (start, length) {
|
909
941
|
|
910
|
-
var ret = 0
|
942
|
+
var ret = 0;
|
911
943
|
|
912
944
|
// normalize input
|
913
945
|
if (length === undefined) {
|
@@ -915,11 +947,11 @@ SC.IndexSet = SC.mixin({},
|
|
915
947
|
return 0; // nothing to do
|
916
948
|
|
917
949
|
} else if (typeof start === SC.T_NUMBER) {
|
918
|
-
length = 1
|
950
|
+
length = 1;
|
919
951
|
|
920
952
|
// if passed an index set, just add each range in the index set.
|
921
953
|
} else if (start.isIndexSet) {
|
922
|
-
start.forEachRange(function(start, length) {
|
954
|
+
start.forEachRange(function (start, length) {
|
923
955
|
ret += this.lengthIn(start, length);
|
924
956
|
}, this);
|
925
957
|
return ret;
|
@@ -936,7 +968,7 @@ SC.IndexSet = SC.mixin({},
|
|
936
968
|
var content = this._content,
|
937
969
|
cur = 0,
|
938
970
|
next = content[cur],
|
939
|
-
lim = start + length
|
971
|
+
lim = start + length;
|
940
972
|
|
941
973
|
while (cur<lim && next !== 0) {
|
942
974
|
if (next>0) {
|
@@ -946,7 +978,7 @@ SC.IndexSet = SC.mixin({},
|
|
946
978
|
next = content[cur];
|
947
979
|
}
|
948
980
|
|
949
|
-
return ret
|
981
|
+
return ret;
|
950
982
|
},
|
951
983
|
|
952
984
|
// ..........................................................
|
@@ -968,20 +1000,20 @@ SC.IndexSet = SC.mixin({},
|
|
968
1000
|
@param {Number} startAt optional starting point
|
969
1001
|
@returns {Number} found index or -1 if not in set
|
970
1002
|
*/
|
971
|
-
indexOf: function(object, startAt) {
|
1003
|
+
indexOf: function (object, startAt) {
|
972
1004
|
var source = this.source;
|
973
|
-
if (!source) throw "%@.indexOf() requires source".fmt(this);
|
1005
|
+
if (!source) throw new Error("%@.indexOf() requires source".fmt(this));
|
974
1006
|
|
975
1007
|
var len = source.get('length'),
|
976
1008
|
|
977
1009
|
// start with the first index in the set
|
978
1010
|
content = this._content,
|
979
1011
|
cur = content[0]<0 ? Math.abs(content[0]) : 0,
|
980
|
-
idx
|
1012
|
+
idx;
|
981
1013
|
|
982
1014
|
while(cur>=0 && cur<len) {
|
983
1015
|
idx = source.indexOf(object, cur);
|
984
|
-
if (idx<0) return -1
|
1016
|
+
if (idx<0) return -1; // not found in source
|
985
1017
|
if (this.contains(idx)) return idx; // found in source and in set.
|
986
1018
|
cur = idx+1;
|
987
1019
|
}
|
@@ -997,19 +1029,19 @@ SC.IndexSet = SC.mixin({},
|
|
997
1029
|
@param {Number} startAt optional starting point
|
998
1030
|
@returns {Number} found index or -1 if not in set
|
999
1031
|
*/
|
1000
|
-
lastIndexOf: function(object, startAt) {
|
1032
|
+
lastIndexOf: function (object, startAt) {
|
1001
1033
|
var source = this.source;
|
1002
|
-
if (!source) throw "%@.lastIndexOf() requires source".fmt(this);
|
1034
|
+
if (!source) throw new Error("%@.lastIndexOf() requires source".fmt(this));
|
1003
1035
|
|
1004
1036
|
// start with the last index in the set
|
1005
1037
|
var len = source.get('length'),
|
1006
1038
|
cur = this.max-1,
|
1007
|
-
idx
|
1039
|
+
idx;
|
1008
1040
|
|
1009
1041
|
if (cur >= len) cur = len-1;
|
1010
1042
|
while (cur>=0) {
|
1011
1043
|
idx = source.lastIndexOf(object, cur);
|
1012
|
-
if (idx<0) return -1
|
1044
|
+
if (idx<0) return -1; // not found in source
|
1013
1045
|
if (this.contains(idx)) return idx; // found in source and in set.
|
1014
1046
|
cur = idx+1;
|
1015
1047
|
}
|
@@ -1030,16 +1062,16 @@ SC.IndexSet = SC.mixin({},
|
|
1030
1062
|
@param {Object} target optional content. otherwise uses window
|
1031
1063
|
@returns {SC.IndexSet} receiver
|
1032
1064
|
*/
|
1033
|
-
forEachObject: function(callback, target) {
|
1065
|
+
forEachObject: function (callback, target) {
|
1034
1066
|
var source = this.source;
|
1035
|
-
if (!source) throw "%@.forEachObject() requires source".fmt(this);
|
1067
|
+
if (!source) throw new Error("%@.forEachObject() requires source".fmt(this));
|
1036
1068
|
|
1037
1069
|
var content = this._content,
|
1038
1070
|
cur = 0,
|
1039
1071
|
idx = 0,
|
1040
1072
|
next = content[cur];
|
1041
1073
|
|
1042
|
-
if (target === undefined) target = null
|
1074
|
+
if (target === undefined) target = null;
|
1043
1075
|
while (next !== 0) {
|
1044
1076
|
|
1045
1077
|
while(cur < next) {
|
@@ -1050,7 +1082,7 @@ SC.IndexSet = SC.mixin({},
|
|
1050
1082
|
cur = Math.abs(next);
|
1051
1083
|
next = content[cur];
|
1052
1084
|
}
|
1053
|
-
return this
|
1085
|
+
return this;
|
1054
1086
|
},
|
1055
1087
|
|
1056
1088
|
/**
|
@@ -1066,9 +1098,9 @@ SC.IndexSet = SC.mixin({},
|
|
1066
1098
|
match is the only one
|
1067
1099
|
@returns {SC.IndexSet} receiver
|
1068
1100
|
*/
|
1069
|
-
addObject: function(object, firstOnly) {
|
1101
|
+
addObject: function (object, firstOnly) {
|
1070
1102
|
var source = this.source;
|
1071
|
-
if (!source) throw "%@.addObject() requires source".fmt(this);
|
1103
|
+
if (!source) throw new Error("%@.addObject() requires source".fmt(this));
|
1072
1104
|
|
1073
1105
|
var len = source.get('length'),
|
1074
1106
|
cur = 0, idx;
|
@@ -1077,11 +1109,11 @@ SC.IndexSet = SC.mixin({},
|
|
1077
1109
|
idx = source.indexOf(object, cur);
|
1078
1110
|
if (idx >= 0) {
|
1079
1111
|
this.add(idx);
|
1080
|
-
if (firstOnly) return this
|
1112
|
+
if (firstOnly) return this;
|
1081
1113
|
cur = idx++;
|
1082
|
-
} else return this
|
1114
|
+
} else return this;
|
1083
1115
|
}
|
1084
|
-
return this
|
1116
|
+
return this;
|
1085
1117
|
},
|
1086
1118
|
|
1087
1119
|
/**
|
@@ -1093,8 +1125,8 @@ SC.IndexSet = SC.mixin({},
|
|
1093
1125
|
match is the only one
|
1094
1126
|
@returns {SC.IndexSet} receiver
|
1095
1127
|
*/
|
1096
|
-
addObjects: function(objects, firstOnly) {
|
1097
|
-
objects.forEach(function(object) {
|
1128
|
+
addObjects: function (objects, firstOnly) {
|
1129
|
+
objects.forEach(function (object) {
|
1098
1130
|
this.addObject(object, firstOnly);
|
1099
1131
|
}, this);
|
1100
1132
|
return this;
|
@@ -1113,9 +1145,9 @@ SC.IndexSet = SC.mixin({},
|
|
1113
1145
|
match is the only one
|
1114
1146
|
@returns {SC.IndexSet} receiver
|
1115
1147
|
*/
|
1116
|
-
removeObject: function(object, firstOnly) {
|
1148
|
+
removeObject: function (object, firstOnly) {
|
1117
1149
|
var source = this.source;
|
1118
|
-
if (!source) throw "%@.removeObject() requires source".fmt(this);
|
1150
|
+
if (!source) throw new Error("%@.removeObject() requires source".fmt(this));
|
1119
1151
|
|
1120
1152
|
var len = source.get('length'),
|
1121
1153
|
cur = 0, idx;
|
@@ -1124,11 +1156,11 @@ SC.IndexSet = SC.mixin({},
|
|
1124
1156
|
idx = source.indexOf(object, cur);
|
1125
1157
|
if (idx >= 0) {
|
1126
1158
|
this.remove(idx);
|
1127
|
-
if (firstOnly) return this
|
1159
|
+
if (firstOnly) return this;
|
1128
1160
|
cur = idx+1;
|
1129
|
-
} else return this
|
1161
|
+
} else return this;
|
1130
1162
|
}
|
1131
|
-
return this
|
1163
|
+
return this;
|
1132
1164
|
},
|
1133
1165
|
|
1134
1166
|
/**
|
@@ -1140,8 +1172,8 @@ SC.IndexSet = SC.mixin({},
|
|
1140
1172
|
match is the only one
|
1141
1173
|
@returns {SC.IndexSet} receiver
|
1142
1174
|
*/
|
1143
|
-
removeObjects: function(objects, firstOnly) {
|
1144
|
-
objects.forEach(function(object) {
|
1175
|
+
removeObjects: function (objects, firstOnly) {
|
1176
|
+
objects.forEach(function (object) {
|
1145
1177
|
this.removeObject(object, firstOnly);
|
1146
1178
|
}, this);
|
1147
1179
|
return this;
|
@@ -1161,37 +1193,41 @@ SC.IndexSet = SC.mixin({},
|
|
1161
1193
|
LOG_OBSERVING: NO,
|
1162
1194
|
|
1163
1195
|
/** @private - optimized call to forEach() */
|
1164
|
-
forEach: function(callback, target) {
|
1196
|
+
forEach: function (callback, target) {
|
1165
1197
|
var content = this._content,
|
1166
1198
|
cur = 0,
|
1167
1199
|
idx = 0,
|
1168
1200
|
source = this.source,
|
1169
1201
|
next = content[cur];
|
1170
1202
|
|
1171
|
-
if (target === undefined) target = null
|
1203
|
+
if (target === undefined) target = null;
|
1172
1204
|
while (next !== 0) {
|
1173
|
-
|
1174
|
-
|
1205
|
+
if (isFinite(next)) {
|
1206
|
+
while(cur < next) {
|
1207
|
+
callback.call(target, cur++, idx++, this, source);
|
1208
|
+
}
|
1209
|
+
cur = Math.abs(next);
|
1210
|
+
next = content[cur];
|
1211
|
+
} else {
|
1212
|
+
throw new Error("Developer Error: You may not iterate an infinite range in SC.IndexSet.");
|
1175
1213
|
}
|
1176
|
-
cur = Math.abs(next);
|
1177
|
-
next = content[cur];
|
1178
1214
|
}
|
1179
|
-
return this
|
1215
|
+
return this;
|
1180
1216
|
},
|
1181
1217
|
|
1182
1218
|
/** @private - support iterators */
|
1183
|
-
nextObject: function(ignore, idx, context) {
|
1219
|
+
nextObject: function (ignore, idx, context) {
|
1184
1220
|
var content = this._content,
|
1185
1221
|
next = context.next,
|
1186
1222
|
max = this.get('max'); // next boundary
|
1187
1223
|
|
1188
1224
|
// seed.
|
1189
1225
|
if (idx === null) {
|
1190
|
-
idx = next = 0
|
1226
|
+
idx = next = 0;
|
1191
1227
|
|
1192
1228
|
} else if (idx >= max) {
|
1193
1229
|
delete context.next; // cleanup context
|
1194
|
-
return null
|
1230
|
+
return null; // nothing left to do
|
1195
1231
|
|
1196
1232
|
} else idx++; // look on next index
|
1197
1233
|
|
@@ -1207,17 +1243,17 @@ SC.IndexSet = SC.mixin({},
|
|
1207
1243
|
return idx;
|
1208
1244
|
},
|
1209
1245
|
|
1210
|
-
toString: function() {
|
1246
|
+
toString: function () {
|
1211
1247
|
var str = [];
|
1212
|
-
this.forEachRange(function(start, length) {
|
1248
|
+
this.forEachRange(function (start, length) {
|
1213
1249
|
str.push(length === 1 ? start : "%@..%@".fmt(start, start + length - 1));
|
1214
1250
|
}, this);
|
1215
|
-
return "SC.IndexSet<%@>".fmt(str.join(','))
|
1251
|
+
return "SC.IndexSet<%@>".fmt(str.join(','));
|
1216
1252
|
},
|
1217
1253
|
|
1218
1254
|
max: 0
|
1219
1255
|
|
1220
|
-
})
|
1256
|
+
});
|
1221
1257
|
|
1222
|
-
SC.IndexSet.slice = SC.IndexSet.copy = SC.IndexSet.clone
|
1258
|
+
SC.IndexSet.slice = SC.IndexSet.copy = SC.IndexSet.clone;
|
1223
1259
|
SC.IndexSet.EMPTY = SC.IndexSet.create().freeze();
|