sproutcore 1.0.1046 → 1.0.1049.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- data/DISTRIBUTION.yml +7 -1
- data/Gemfile +3 -0
- data/Rakefile +179 -91
- data/VERSION.yml +4 -4
- data/bin/sc-server +1 -2
- data/frameworks/sproutcore/Buildfile +35 -12
- data/frameworks/sproutcore/Gemfile +8 -0
- data/frameworks/sproutcore/Gemfile.lock +33 -0
- data/frameworks/sproutcore/README.md +68 -0
- data/frameworks/sproutcore/apps/docs/english.lproj/loading.rhtml +1 -1
- data/frameworks/sproutcore/apps/greenhouse/README +25 -0
- data/frameworks/sproutcore/apps/greenhouse/TODO +72 -0
- data/frameworks/sproutcore/apps/greenhouse/beautify.js +1058 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/design.js +20 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/file.js +75 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/files.js +40 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/layout.js +53 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/library.js +243 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/page.js +18 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/property.js +19 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/property_editor.js +17 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/target.js +20 -0
- data/frameworks/sproutcore/apps/greenhouse/controllers/targets.js +43 -0
- data/frameworks/sproutcore/apps/greenhouse/core.js +67 -0
- data/frameworks/sproutcore/apps/greenhouse/core_file.js +124 -0
- data/frameworks/sproutcore/apps/greenhouse/data_source.js +250 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +377 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/app-selector.css +111 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/button.css +310 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/dock.css +85 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/general.css +52 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/main-page.css +120 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/menu.css +52 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/modal.css +40 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/picker.css +188 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/search.css +60 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/tabbed.css +68 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/css/text-field.css +67 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/dialogs.js +278 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/main-bg.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/inspectors.js +365 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/loading.rhtml +9 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/main_page.js +95 -0
- data/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +84 -0
- data/frameworks/sproutcore/apps/greenhouse/fixtures/file.js +35 -0
- data/frameworks/sproutcore/apps/greenhouse/main.js +28 -0
- data/frameworks/sproutcore/apps/greenhouse/mixins/drop_down.js +97 -0
- data/frameworks/sproutcore/apps/greenhouse/models/design.js +22 -0
- data/frameworks/sproutcore/apps/greenhouse/models/dir.js +92 -0
- data/frameworks/sproutcore/apps/greenhouse/models/file.js +51 -0
- data/frameworks/sproutcore/apps/greenhouse/models/target.js +82 -0
- data/frameworks/sproutcore/apps/greenhouse/models/view_config.js +49 -0
- data/frameworks/sproutcore/apps/greenhouse/resources/test_page.js +37 -0
- data/frameworks/sproutcore/apps/greenhouse/states/inspector.js +144 -0
- data/frameworks/sproutcore/apps/greenhouse/states/library.js +133 -0
- data/frameworks/sproutcore/apps/greenhouse/states/main.js +223 -0
- data/frameworks/sproutcore/apps/greenhouse/states/modals.js +281 -0
- data/frameworks/sproutcore/apps/greenhouse/states/ready.js +197 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/controllers/design.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/controllers/designs.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/controllers/file.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/controllers/files.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/models/file.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/models/view_config.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/tests/views/list_item.js +15 -0
- data/frameworks/sproutcore/apps/greenhouse/views/anchor.js +277 -0
- data/frameworks/sproutcore/apps/greenhouse/views/application_list_item.js +19 -0
- data/frameworks/sproutcore/apps/greenhouse/views/event_blocker.js +32 -0
- data/frameworks/sproutcore/apps/greenhouse/views/label_designer.js +16 -0
- data/frameworks/sproutcore/apps/greenhouse/views/list_item.js +42 -0
- data/frameworks/sproutcore/apps/greenhouse/views/plist_item.js +39 -0
- data/frameworks/sproutcore/apps/greenhouse/views/simple_button.js +157 -0
- data/frameworks/sproutcore/apps/greenhouse/views/tear_off_picker.js +56 -0
- data/frameworks/sproutcore/apps/greenhouse/views/web.js +44 -0
- data/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/frameworks/sproutcore/apps/test_controls/controllers/category.js +31 -0
- data/frameworks/sproutcore/apps/test_controls/core.js +29 -0
- data/frameworks/sproutcore/apps/test_controls/main.js +14 -0
- data/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +124 -0
- data/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +77 -0
- data/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/frameworks/sproutcore/apps/test_controls/resources/main_page.css +54 -0
- data/frameworks/sproutcore/apps/test_controls/resources/main_page.js +136 -0
- data/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
- data/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +41 -0
- data/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +75 -0
- data/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +15 -0
- data/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +40 -0
- data/frameworks/sproutcore/apps/tests/core.js +1 -1
- data/frameworks/sproutcore/apps/tests/english.lproj/loading.rhtml +1 -1
- data/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +2 -2
- data/frameworks/sproutcore/apps/tests/main.js +0 -1
- data/frameworks/sproutcore/apps/tests/states/no_targets.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready_detail.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready_empty.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready_list.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready_loading.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +1 -1
- data/frameworks/sproutcore/apps/tests/states/start.js +1 -1
- data/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
- data/frameworks/sproutcore/apps/welcome/core.js +1 -1
- data/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
- data/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
- data/frameworks/sproutcore/bin/edit_json.rb +14 -0
- data/frameworks/sproutcore/bin/erubis +14 -0
- data/frameworks/sproutcore/bin/prettify_json.rb +14 -0
- data/frameworks/sproutcore/bin/rackup +14 -0
- data/frameworks/sproutcore/bin/rake2thor +14 -0
- data/frameworks/sproutcore/bin/sc-build +14 -0
- data/frameworks/sproutcore/bin/sc-build-number +14 -0
- data/frameworks/sproutcore/bin/sc-docs +14 -0
- data/frameworks/sproutcore/bin/sc-gen +14 -0
- data/frameworks/sproutcore/bin/sc-init +14 -0
- data/frameworks/sproutcore/bin/sc-manifest +14 -0
- data/frameworks/sproutcore/bin/sc-server +14 -0
- data/frameworks/sproutcore/bin/sproutcore +14 -0
- data/frameworks/sproutcore/bin/thin +14 -0
- data/frameworks/sproutcore/bin/thor +14 -0
- data/frameworks/sproutcore/design/greenhouse-statechart.graffle +9025 -0
- data/frameworks/sproutcore/design/greenhouse-statechart.pdf +0 -0
- data/frameworks/sproutcore/design/iphone-webapp-loading.psd +0 -0
- data/frameworks/sproutcore/frameworks/animation/core.js +349 -116
- data/frameworks/sproutcore/frameworks/animation/tests/core.js +78 -16
- data/frameworks/sproutcore/frameworks/bootstrap/core.js +1 -1
- data/frameworks/sproutcore/frameworks/bootstrap/setup_body_class_names.js +3 -1
- data/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +5 -4
- data/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +5 -2
- data/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/core.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/debug/json.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/debug/standard_setup.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +122 -0
- data/frameworks/sproutcore/frameworks/datastore/models/child_record.js +105 -0
- data/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +81 -0
- data/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/models/record.js +247 -82
- data/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +27 -13
- data/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/system/child_array.js +242 -0
- data/frameworks/sproutcore/frameworks/datastore/system/many_array.js +3 -3
- data/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +34 -18
- data/frameworks/sproutcore/frameworks/datastore/system/query.js +124 -47
- data/frameworks/sproutcore/frameworks/datastore/system/record_array.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/system/store.js +106 -22
- data/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/contact_model.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/cyclical_relationship.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/mail_model.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +12 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +235 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +337 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +421 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +304 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/parentless.js +134 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/core_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/error_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/normalize.js +30 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +35 -4
- data/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +49 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/core_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/compare.js +15 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/contains.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/containsRecordTypes.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation_of_records.js +2 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/expandedRecordTypes.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/parse.js +15 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/queryWithScope.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/record_type_is.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_comparisons.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_query_extensions.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/error_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +2 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/core_methods.js +15 -2
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/error_methods.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/find.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +6 -6
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +1 -1
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +1 -1
- data/frameworks/sproutcore/frameworks/datejs/core.js +1 -1
- data/frameworks/sproutcore/frameworks/datejs/extras.js +1 -1
- data/frameworks/sproutcore/frameworks/debug/core.js +13 -2
- data/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +40 -25
- data/frameworks/sproutcore/frameworks/designer/coders/design.js +1 -10
- data/frameworks/sproutcore/frameworks/designer/coders/localization.js +0 -8
- data/frameworks/sproutcore/frameworks/designer/controllers/controllers.js +16 -0
- data/frameworks/sproutcore/frameworks/designer/controllers/design.js +37 -0
- data/frameworks/sproutcore/frameworks/designer/controllers/designs.js +134 -0
- data/frameworks/sproutcore/frameworks/designer/controllers/page_design.js +44 -1
- data/frameworks/sproutcore/frameworks/designer/controllers/page_files.js +22 -0
- data/frameworks/sproutcore/frameworks/designer/core.js +16 -0
- data/frameworks/sproutcore/frameworks/designer/css/css_rule.js +1 -1
- data/frameworks/sproutcore/frameworks/designer/css/css_style.js +1 -1
- data/frameworks/sproutcore/frameworks/designer/css/css_style_sheet.js +1 -1
- data/frameworks/sproutcore/frameworks/designer/{views → designers}/button.js +2 -2
- data/frameworks/sproutcore/frameworks/designer/{views → designers}/label.js +1 -1
- data/frameworks/sproutcore/frameworks/designer/designers/object_designer.js +296 -0
- data/frameworks/sproutcore/frameworks/designer/{views → designers}/tab.js +3 -1
- data/frameworks/sproutcore/frameworks/designer/designers/text_field.js +15 -0
- data/frameworks/sproutcore/frameworks/designer/{views/designer.js → designers/view_designer.js} +282 -22
- data/frameworks/sproutcore/frameworks/designer/english.lproj/css/designer.css +96 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/design_page.js +55 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/high_light.css +10 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/controller.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/dock-bg.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/dock-item-bg.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/dock-item-divider.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/main-bg.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/page.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/pane.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/english.lproj/images/view.png +0 -0
- data/frameworks/sproutcore/frameworks/designer/ext/object.js +26 -0
- data/frameworks/sproutcore/frameworks/designer/ext/page.js +1 -1
- data/frameworks/sproutcore/frameworks/designer/ext/view.js +16 -0
- data/frameworks/sproutcore/frameworks/designer/mixins/snap_lines.js +221 -0
- data/frameworks/sproutcore/frameworks/designer/views/designer_drop_target.js +138 -0
- data/frameworks/sproutcore/frameworks/designer/views/drawing.js +219 -0
- data/frameworks/sproutcore/frameworks/designer/views/high_light.js +66 -0
- data/frameworks/sproutcore/frameworks/designer/views/page_item_view.js +130 -0
- data/frameworks/sproutcore/frameworks/designer/views/selection_handles.js +1 -0
- data/frameworks/sproutcore/frameworks/desktop/core.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +1 -1
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +7 -11
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/cap.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/downbutton.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-bottom.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-center.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-top.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/track.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/upbutton.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +3 -5
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +18 -39
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +2 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +30 -38
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +7 -5
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/split.css +0 -70
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/split_divider.css +0 -3
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/tab.css +0 -1
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/video.css +3 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/border.js +108 -23
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +681 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +6 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/alert.js +8 -7
- data/frameworks/sproutcore/frameworks/desktop/panes/menu.js +944 -501
- data/frameworks/sproutcore/frameworks/desktop/panes/modal.js +4 -1
- data/frameworks/sproutcore/frameworks/desktop/panes/palette.js +10 -1
- data/frameworks/sproutcore/frameworks/desktop/panes/panel.js +5 -22
- data/frameworks/sproutcore/frameworks/desktop/panes/picker.js +268 -56
- data/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +249 -110
- data/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +93 -33
- data/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +9 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/button.js +147 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/checkbox.js +87 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/checkbox_control.js +103 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/disclosure.js +82 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/disclosure_control.js +103 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/image_button.js +33 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/list_item.js +334 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/masterDetail.js +23 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/panel.js +34 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/picker.js +50 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/segment.js +79 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/segmented.js +172 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/slider.js +86 -0
- data/frameworks/sproutcore/frameworks/desktop/renderers/workspace.js +22 -0
- data/frameworks/sproutcore/frameworks/desktop/system/drag.js +85 -51
- data/frameworks/sproutcore/frameworks/desktop/tests/datetime_recordattribute.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +96 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +4 -4
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +113 -35
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +215 -51
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +3 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +2 -2
- data/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +28 -4
- data/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +32 -12
- data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +17 -24
- data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +14 -18
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deleteSelection.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deselect.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/displayProperties.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +13 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/layerIdFor.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/length.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +46 -5
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/nowShowing.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/select.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +76 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +455 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowDelegate.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowOffsetForContentIndex.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +45 -6
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +7 -7
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +129 -21
- data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +40 -38
- data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +24 -17
- data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +68 -36
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +22 -63
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller.js +90 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +8 -8
- data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +8 -4
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select/methods.js +144 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +216 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +46 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/web/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/tests/views/well/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/views/button.js +249 -79
- data/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +63 -89
- data/frameworks/sproutcore/frameworks/desktop/views/collection.js +358 -96
- data/frameworks/sproutcore/frameworks/desktop/views/date_field.js +319 -0
- data/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +31 -17
- data/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/frameworks/sproutcore/frameworks/desktop/views/grid.js +30 -34
- data/frameworks/sproutcore/frameworks/desktop/views/list.js +28 -14
- data/frameworks/sproutcore/frameworks/desktop/views/list_item.js +480 -262
- data/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +249 -0
- data/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +443 -381
- data/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +74 -66
- data/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +175 -57
- data/frameworks/sproutcore/frameworks/desktop/views/progress.js +29 -21
- data/frameworks/sproutcore/frameworks/desktop/views/radio.js +196 -204
- data/frameworks/sproutcore/frameworks/desktop/views/scene.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/views/scroll.js +1128 -94
- data/frameworks/sproutcore/frameworks/desktop/views/scroller.js +569 -153
- data/frameworks/sproutcore/frameworks/desktop/views/segmented.js +144 -129
- data/frameworks/sproutcore/frameworks/desktop/views/select.js +804 -0
- data/frameworks/sproutcore/frameworks/desktop/views/select_field.js +15 -13
- data/frameworks/sproutcore/frameworks/desktop/views/slider.js +77 -47
- data/frameworks/sproutcore/frameworks/desktop/views/source_list.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +4 -4
- data/frameworks/sproutcore/frameworks/desktop/views/split.js +426 -269
- data/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +5 -3
- data/frameworks/sproutcore/frameworks/desktop/views/stacked.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/views/static_content.js +123 -0
- data/frameworks/sproutcore/frameworks/desktop/views/tab.js +59 -63
- data/frameworks/sproutcore/frameworks/desktop/views/thumb.js +5 -1
- data/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +1 -1
- data/frameworks/sproutcore/frameworks/desktop/views/web.js +3 -3
- data/frameworks/sproutcore/frameworks/desktop/views/well.js +7 -2
- data/frameworks/sproutcore/frameworks/desktop/views/workspace.js +270 -0
- data/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/mixins/auto_hide.js +85 -0
- data/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
- data/frameworks/sproutcore/frameworks/forms/renderers/form.js +24 -0
- data/frameworks/sproutcore/frameworks/forms/renderers/form_row.js +24 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/frameworks/sproutcore/frameworks/forms/views/form.js +266 -0
- data/frameworks/sproutcore/frameworks/forms/views/form_row.js +188 -0
- data/frameworks/sproutcore/frameworks/foundation/TESTING +5 -5
- data/frameworks/sproutcore/frameworks/foundation/controllers/array.js +11 -2
- data/frameworks/sproutcore/frameworks/foundation/controllers/controller.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/controllers/object.js +23 -3
- data/frameworks/sproutcore/frameworks/foundation/core.js +34 -3
- data/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +2 -3
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -1
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +4 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/core.css +109 -81
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-logo.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.jpg +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.jpg +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +16 -14
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/view.css +5 -0
- data/frameworks/sproutcore/frameworks/foundation/ext/object.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/ext/run_loop.js +6 -5
- data/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +142 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +33 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +74 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -2
- data/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/mixins/control.js +88 -15
- data/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +3 -1
- data/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +415 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +106 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +95 -64
- data/frameworks/sproutcore/frameworks/foundation/{system → mixins}/responder_context.js +42 -16
- data/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +64 -83
- data/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +7 -53
- data/frameworks/sproutcore/frameworks/foundation/mixins/string.js +188 -5
- data/frameworks/sproutcore/frameworks/foundation/mixins/tree_item_content.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +4 -4
- data/frameworks/sproutcore/frameworks/foundation/panes/main.js +1 -2
- data/frameworks/sproutcore/frameworks/foundation/panes/pane.js +216 -53
- data/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/renderers/control.js +122 -0
- data/frameworks/sproutcore/frameworks/foundation/renderers/image.js +51 -0
- data/frameworks/sproutcore/frameworks/foundation/renderers/label.js +96 -0
- data/frameworks/sproutcore/frameworks/foundation/renderers/renderer.js +316 -0
- data/frameworks/sproutcore/frameworks/foundation/renderers/title.js +108 -0
- data/frameworks/sproutcore/frameworks/foundation/renderers/view.js +62 -0
- data/frameworks/sproutcore/frameworks/foundation/system/application.js +4 -3
- data/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +5 -2
- data/frameworks/sproutcore/frameworks/foundation/system/browser.js +32 -37
- data/frameworks/sproutcore/frameworks/foundation/system/builder.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/system/bundle.js +18 -15
- data/frameworks/sproutcore/frameworks/foundation/system/core_query.js +12 -13
- data/frameworks/sproutcore/frameworks/foundation/system/cursor.js +6 -5
- data/frameworks/sproutcore/frameworks/foundation/system/datetime.js +7 -8
- data/frameworks/sproutcore/frameworks/foundation/system/device.js +143 -0
- data/frameworks/sproutcore/frameworks/foundation/system/event.js +38 -13
- data/frameworks/sproutcore/frameworks/foundation/system/gesture.js +245 -0
- data/frameworks/sproutcore/frameworks/foundation/system/image_cache.js +13 -13
- data/frameworks/sproutcore/frameworks/foundation/system/json.js +11 -8
- data/frameworks/sproutcore/frameworks/foundation/system/locale.js +7 -2
- data/frameworks/sproutcore/frameworks/foundation/system/math.js +57 -0
- data/frameworks/sproutcore/frameworks/foundation/system/page.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/system/platform.js +189 -0
- data/frameworks/sproutcore/frameworks/foundation/system/ready.js +9 -7
- data/frameworks/sproutcore/frameworks/foundation/system/render_context.js +155 -62
- data/frameworks/sproutcore/frameworks/foundation/system/request.js +21 -1
- data/frameworks/sproutcore/frameworks/foundation/system/responder.js +6 -3
- data/frameworks/sproutcore/frameworks/foundation/system/response.js +5 -3
- data/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +1704 -233
- data/frameworks/sproutcore/frameworks/foundation/system/routes.js +340 -445
- data/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +150 -0
- data/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/system/theme.js +108 -0
- data/frameworks/sproutcore/frameworks/foundation/system/time.js +0 -5
- data/frameworks/sproutcore/frameworks/foundation/system/timer.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +193 -29
- data/frameworks/sproutcore/frameworks/foundation/system/utils.js +133 -60
- data/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +41 -0
- data/frameworks/sproutcore/frameworks/foundation/tasks/task.js +17 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/array_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/enum_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/null_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/selection_support.js +318 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/single_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/empty_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/multiple_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/single_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/single_enumerable_case.js +87 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/outline_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +340 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/integration/creating_views.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/content.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/displayProperties.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/keyEquivalents.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/content.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js +52 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +227 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/responder_context.js +75 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +17 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +58 -3
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +74 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/flat_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/group_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/outline_case.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/renderers/renderer/base.js +170 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/renderers/renderer/inheritance.js +39 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/datetime.js +4 -9
- data/frameworks/sproutcore/frameworks/foundation/tests/system/locale.js +6 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/math.js +39 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/begin.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/element.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/end.js +6 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/get.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_attr.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_className.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_style.js +12 -3
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/init.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/join.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/push_text.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/tag.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/update.js +12 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeKeyPane.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMainPane.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMenuPane.js +48 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/targetForAction.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +333 -14
- data/frameworks/sproutcore/frameworks/foundation/tests/system/task_queue.js +43 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/theme.js +86 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invokeLater.js +7 -5
- data/frameworks/sproutcore/frameworks/foundation/tests/validators/date.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +34 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/append_remove.js +7 -10
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/firstResponder.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/keyPane.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/layout.js +31 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendEvent.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendTouchEvent.js +267 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +99 -5
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/animation.js +321 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/build.js +85 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/build_children.js +89 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/convertFrames.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createChildViews.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createLayer.js +3 -3
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/destroyLayer.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/didAppendToDocument.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/findLayerInParentLayer.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/init.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/insertBefore.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layer.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutChildViews.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutDidChange.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +289 -22
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/nextValidKeyView.js +20 -1
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/parentViewDidChange.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/prepareContext.js +28 -6
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/removeChild.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/render.js +50 -7
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/renderer.js +443 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/replaceChild.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/theme.js +41 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayer.js +4 -4
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayerLocation.js +2 -2
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/viewDidResize.js +7 -6
- data/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/validators/date.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +46 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/email.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/validators/number.js +17 -5
- data/frameworks/sproutcore/frameworks/foundation/validators/password.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/validators/positive_integer.js +84 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/validator.js +16 -6
- data/frameworks/sproutcore/frameworks/foundation/views/container.js +25 -22
- data/frameworks/sproutcore/frameworks/foundation/views/field.js +16 -42
- data/frameworks/sproutcore/frameworks/foundation/views/image.js +1 -1
- data/frameworks/sproutcore/frameworks/foundation/views/label.js +58 -48
- data/frameworks/sproutcore/frameworks/foundation/views/text_field.js +321 -133
- data/frameworks/sproutcore/frameworks/foundation/views/view.js +1853 -353
- data/frameworks/sproutcore/frameworks/jquery/jquery.js +6240 -0
- data/frameworks/sproutcore/frameworks/media/resources/controls.png +0 -0
- data/frameworks/sproutcore/frameworks/media/resources/playeras3.fla +0 -0
- data/frameworks/sproutcore/frameworks/media/resources/video.css +120 -0
- data/frameworks/sproutcore/frameworks/media/resources/videoCanvas.swf +0 -0
- data/frameworks/sproutcore/frameworks/media/views/audio.js +729 -0
- data/frameworks/sproutcore/frameworks/media/views/controls.js +90 -0
- data/frameworks/sproutcore/frameworks/media/views/mediaSlider.js +243 -0
- data/frameworks/sproutcore/frameworks/media/views/miniControls.js +63 -0
- data/frameworks/sproutcore/frameworks/media/views/simpleControls.js +55 -0
- data/frameworks/sproutcore/frameworks/media/views/video.js +829 -0
- data/frameworks/sproutcore/frameworks/mobile/lib/index.rhtml +2 -3
- data/frameworks/sproutcore/frameworks/mobile/tests/views/button/ui.js +9 -2
- data/frameworks/sproutcore/frameworks/mobile/views/button.js +5 -4
- data/frameworks/sproutcore/frameworks/runtime/core.js +46 -34
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/indexOf.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/insertAt.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/objectAt.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/popObject.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/pushObject.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeAt.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeObject.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/replace.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/shiftObject.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/unshiftObject.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/mixins/array.js +36 -2
- data/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/mixins/delegate_support.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +63 -3
- data/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +25 -19
- data/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +12 -7
- data/frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/protocols/sparse_array_delegate.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/binding.js +60 -7
- data/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/error.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/index_set.js +2 -1
- data/frameworks/sproutcore/frameworks/runtime/system/object.js +37 -7
- data/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +39 -10
- data/frameworks/sproutcore/frameworks/runtime/system/selection_set.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/set.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/system/sparse_array.js +3 -3
- data/frameworks/sproutcore/frameworks/runtime/tests/core/clone.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/core/compare.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/comparable.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +12 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +6 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +23 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +126 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/addEach.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/clone.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/contains.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/create.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexAfter.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexBefore.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/intersects.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/max.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/min.js +11 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/rangeStartForIndex.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/removeEach.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/without.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +30 -12
- data/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/destroy.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/objectPropertyDidChange.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/rangeDidChange.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/update.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/add.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/indexSetForSource.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/isEqual.js +1 -1
- data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/remove.js +1 -1
- data/frameworks/sproutcore/frameworks/statechart/core.js +11 -0
- data/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +337 -0
- data/frameworks/sproutcore/frameworks/statechart/system/state.js +176 -0
- data/frameworks/sproutcore/frameworks/statechart/tests/basic.js +90 -0
- data/frameworks/sproutcore/frameworks/statechart/tests/history.js +71 -0
- data/frameworks/sproutcore/frameworks/statechart/tests/nested.js +59 -0
- data/frameworks/sproutcore/frameworks/statechart/tests/transient.js +148 -0
- data/frameworks/sproutcore/frameworks/table/mixins/table_delegate.js +41 -0
- data/frameworks/sproutcore/frameworks/table/system/table_column.js +125 -0
- data/frameworks/sproutcore/frameworks/table/views/table.js +438 -0
- data/frameworks/sproutcore/frameworks/table/views/table_cell.js +62 -0
- data/frameworks/sproutcore/frameworks/table/views/table_head.js +158 -0
- data/frameworks/sproutcore/frameworks/table/views/table_header.js +212 -0
- data/frameworks/sproutcore/frameworks/table/views/table_row.js +155 -0
- data/frameworks/sproutcore/frameworks/test +77 -0
- data/frameworks/sproutcore/frameworks/testing/core.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/extras.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/system/dump.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/system/equiv.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/system/plan.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -2
- data/frameworks/sproutcore/frameworks/testing/system/suite.js +1 -1
- data/frameworks/sproutcore/frameworks/testing/utils.js +1 -1
- data/frameworks/sproutcore/lib/index.rhtml +15 -4
- data/frameworks/sproutcore/themes/ace/Buildfile +0 -0
- data/frameworks/sproutcore/themes/ace/README.md +161 -0
- data/frameworks/sproutcore/themes/ace/build +2 -0
- data/frameworks/sproutcore/themes/ace/build-d +2 -0
- data/frameworks/sproutcore/themes/ace/chance/README.md +113 -0
- data/frameworks/sproutcore/themes/ace/chance/chance.rb +203 -0
- data/frameworks/sproutcore/themes/ace/chance/lib/css.rb +202 -0
- data/frameworks/sproutcore/themes/ace/chance/lib/slicedice.rb +391 -0
- data/frameworks/sproutcore/themes/ace/chance/sc-theme.rb +0 -0
- data/frameworks/sproutcore/themes/ace/chance/scripts/setup.rb +126 -0
- data/frameworks/sproutcore/themes/ace/mockups/dark.png +0 -0
- data/frameworks/sproutcore/themes/ace/mockups/dark.psd +0 -0
- data/frameworks/sproutcore/themes/ace/mockups/light.png +0 -0
- data/frameworks/sproutcore/themes/ace/mockups/light.psd +0 -0
- data/frameworks/sproutcore/themes/ace/resources/images/1.png +0 -0
- data/frameworks/sproutcore/themes/ace/resources/images/2.png +0 -0
- data/frameworks/sproutcore/themes/ace/resources/images/3.png +0 -0
- data/frameworks/sproutcore/themes/ace/resources/theme.css +1832 -0
- data/frameworks/sproutcore/themes/ace/scroll_test/resources/images/1.png +0 -0
- data/frameworks/sproutcore/themes/ace/scroll_test/resources/images/2.png +0 -0
- data/frameworks/sproutcore/themes/ace/scroll_test/resources/images/3.png +0 -0
- data/frameworks/sproutcore/themes/ace/scroll_test/resources/theme.css +147 -0
- data/frameworks/sproutcore/themes/ace/scroll_test/scrollbars.html +326 -0
- data/frameworks/sproutcore/themes/ace/src/body.css +13 -0
- data/frameworks/sproutcore/themes/ace/src/collections/list.css +4 -0
- data/frameworks/sproutcore/themes/ace/src/collections/list_item.css +7 -0
- data/frameworks/sproutcore/themes/ace/src/collections/source_list/selection.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/collections/source_list/selection.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/collections/source_list/source_list_view.css +37 -0
- data/frameworks/sproutcore/themes/ace/src/containers/container.css +3 -0
- data/frameworks/sproutcore/themes/ace/src/containers/masterdetail/master-detail.css +26 -0
- data/frameworks/sproutcore/themes/ace/src/containers/split/split.css +4 -0
- data/frameworks/sproutcore/themes/ace/src/containers/tab/tab.css +9 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button.js +23 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/button_view.css +53 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/button_view.css +144 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/button_view_30.css +111 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/button_view.css +57 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/button_view.css +56 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_view.css +64 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox.css +25 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox.css +25 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/checkbox.css +4 -0
- data/frameworks/sproutcore/themes/ace/src/controls/checkboxes/checkbox_control.css +31 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view.css +70 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_content.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_content.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_indeterminate_content.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_track.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_track.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio.css +61 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_unselected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/radio/radio_unselected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/horizontal.css +77 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/thumb.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/thumb.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/thumb.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/thumb.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/vertical.css +74 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented.css +92 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_normal.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_normal.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented.css +87 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_normal.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_normal.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented.css +93 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_normal.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_normal.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented.css +101 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_normal.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_normal.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/segmented.css +73 -0
- data/frameworks/sproutcore/themes/ace/src/controls/segmented/segmented.js +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/active_select.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/active_select.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/menu.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/normal_select.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/normal_select.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/select/select.css +45 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/14px/slider.css +43 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/16px/slider.css +44 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/slider.css +44 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/track.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/22px/track.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/slider.css +3 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/slider.js +27 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/track.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/slider/track.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_handle.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_handle.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_off.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_off.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_on.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_on.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/core/loading.css +50 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/button_view.css +142 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_capsule.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_capsule.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/button_view_30.css +111 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button_pointer.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button_pointer.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/button.css +20 -0
- data/frameworks/sproutcore/themes/ace/src/dark/buttons/button.js +3 -0
- data/frameworks/sproutcore/themes/ace/src/form/iphone/form.js +21 -0
- data/frameworks/sproutcore/themes/ace/src/form/iphone/form_row.js +24 -0
- data/frameworks/sproutcore/themes/ace/src/form/iphone/iphone.css +51 -0
- data/frameworks/sproutcore/themes/ace/src/form/iphone/iphone.js +14 -0
- data/frameworks/sproutcore/themes/ace/src/form/iphone/label.js +32 -0
- data/frameworks/sproutcore/themes/ace/src/panels/pane.css +3 -0
- data/frameworks/sproutcore/themes/ace/src/panels/panel.css +70 -0
- data/frameworks/sproutcore/themes/ace/src/panels/panel.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/panel.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark_active.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark_active.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/down.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/down.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.css +154 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu_item.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu_item.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/up.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/menu/up.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/picker.css +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/picker.js +1 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/picker.js +14 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.css +271 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.js +5 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_empty.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_empty.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_notoolbar.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_notoolbar.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_sourcelist.css +5 -0
- data/frameworks/sproutcore/themes/ace/src/panels/picker/popover/workspace.js +51 -0
- data/frameworks/sproutcore/themes/ace/src/theme.js +12 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/normal/selection.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.css +8 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.psd +0 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/panel_header/panel_header.png +0 -0
- data/frameworks/sproutcore/themes/ace/src/toolbars/panel_header/panel_header.psd +0 -0
- data/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/button.css +75 -2
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/checkbox.css +0 -16
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-repeat-x.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-repeat-y.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-scroller-sprite.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-repeat-x.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/menu_item_view.css +26 -2
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/radio.css +0 -29
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/scroller.css +155 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +64 -69
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/split_view.css +2 -18
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/tab.css +0 -1
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/table.css +14 -0
- data/gen/responder/Buildfile +18 -0
- data/gen/responder/README +1 -0
- data/gen/responder/USAGE +15 -0
- data/gen/responder/templates/states/@filename@.js +39 -0
- data/{Buildfile → lib/Buildfile} +37 -34
- data/lib/buildtasks/build.rake +103 -0
- data/{buildtasks → lib/buildtasks}/entry.rake +40 -34
- data/{buildtasks → lib/buildtasks}/manifest.rake +285 -239
- data/{buildtasks → lib/buildtasks}/render.rake +5 -5
- data/lib/buildtasks/target.rake +65 -0
- data/lib/sproutcore.rb +58 -53
- data/lib/sproutcore/builders.rb +12 -0
- data/lib/sproutcore/builders/base.rb +19 -20
- data/lib/sproutcore/builders/bundle.rb +17 -17
- data/lib/sproutcore/builders/combine.rb +14 -14
- data/lib/sproutcore/builders/html.rb +68 -62
- data/lib/sproutcore/builders/javascript.rb +40 -26
- data/lib/sproutcore/builders/less.rb +41 -0
- data/lib/sproutcore/builders/minify.rb +20 -25
- data/lib/sproutcore/builders/sass.rb +20 -10
- data/lib/sproutcore/builders/strings.rb +11 -10
- data/lib/sproutcore/builders/stylesheet.rb +28 -12
- data/lib/sproutcore/builders/test.rb +19 -19
- data/lib/sproutcore/builders/test_index.rb +6 -6
- data/lib/sproutcore/buildfile.rb +120 -114
- data/lib/sproutcore/buildfile/build_task.rb +5 -5
- data/lib/sproutcore/buildfile/buildfile_dsl.rb +22 -15
- data/lib/sproutcore/buildfile/cloneable.rb +3 -3
- data/lib/sproutcore/buildfile/early_time.rb +2 -2
- data/lib/sproutcore/buildfile/invocation_chain.rb +3 -3
- data/lib/sproutcore/buildfile/namespace.rb +3 -3
- data/lib/sproutcore/buildfile/string_ext.rb +5 -1
- data/lib/sproutcore/buildfile/task.rb +49 -48
- data/lib/sproutcore/buildfile/task_arguments.rb +28 -8
- data/lib/sproutcore/buildfile/task_manager.rb +19 -17
- data/lib/sproutcore/deprecated/view_helper.rb +2 -2
- data/lib/sproutcore/helpers.rb +11 -0
- data/lib/sproutcore/helpers/cssmin.rb +24 -24
- data/lib/sproutcore/helpers/dom_id_helper.rb +1 -1
- data/lib/sproutcore/helpers/entry_sorter.rb +51 -75
- data/lib/sproutcore/helpers/html5_manifest.rb +88 -0
- data/lib/sproutcore/helpers/packed_optimizer.rb +20 -20
- data/lib/sproutcore/helpers/static_helper.rb +79 -79
- data/lib/sproutcore/helpers/tag_helper.rb +10 -10
- data/lib/sproutcore/helpers/text_helper.rb +2 -2
- data/lib/sproutcore/models.rb +8 -0
- data/lib/sproutcore/models/generator.rb +92 -92
- data/lib/sproutcore/models/hash_struct.rb +42 -27
- data/lib/sproutcore/models/manifest.rb +123 -117
- data/lib/sproutcore/models/manifest_entry.rb +123 -105
- data/lib/sproutcore/models/project.rb +54 -54
- data/lib/sproutcore/models/target.rb +212 -200
- data/lib/sproutcore/rack.rb +7 -0
- data/lib/sproutcore/rack/builder.rb +89 -84
- data/lib/sproutcore/rack/dev.rb +55 -14
- data/lib/sproutcore/rack/docs.rb +4 -4
- data/lib/sproutcore/rack/filesystem.rb +118 -59
- data/lib/sproutcore/rack/proxy.rb +36 -34
- data/lib/sproutcore/rack/service.rb +36 -34
- data/lib/sproutcore/rack/test_runner.rb +4 -4
- data/lib/sproutcore/render_engines/erubis.rb +2 -2
- data/lib/sproutcore/render_engines/haml.rb +2 -2
- data/lib/sproutcore/tools.rb +102 -98
- data/lib/sproutcore/tools/build.rb +27 -22
- data/lib/sproutcore/tools/build_number.rb +3 -3
- data/lib/sproutcore/tools/docs.rb +4 -4
- data/lib/sproutcore/tools/gen.rb +24 -24
- data/lib/sproutcore/tools/init.rb +7 -7
- data/lib/sproutcore/tools/manifest.rb +13 -13
- data/lib/sproutcore/tools/server.rb +11 -11
- data/{vendor → lib/sproutcore/vendor}/github_gem_lint.rb +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/README.txt +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Chain.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Dumper.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Hash.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Link.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Namespace.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Opt.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Reflection.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/String.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/frame/Testrun.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/handlers/FOODOC.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/handlers/XMLDOC.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/handlers/XMLDOC/DomReader.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/handlers/XMLDOC/XMLDoc.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/handlers/XMLDOC/XMLParse.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/DocComment.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/DocTag.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/JsDoc.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/JsPlate.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Lang.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Parser.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/PluginManager.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Symbol.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/SymbolSet.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/TextStream.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Token.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/TokenReader.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/TokenStream.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Util.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/lib/JSDOC/Walker.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/main.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/commentSrcJson.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/frameworkPrototype.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/functionCall.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/publishSrcHilite.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/sproutcoreTags.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/symbolLink.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/tagParamConfig.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/plugins/tagSynonyms.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/run.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/t/TestDoc.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/t/runner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/addon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/anon_inner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/augments.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/augments2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/borrows.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/borrows2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/config.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/constructs.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/encoding.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/encoding_other.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/functions_anon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/functions_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/global.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/globals.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/ignore.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/inner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/jsdoc_test.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/lend.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/memberof.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/memberof_constructor.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/name.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/namespace_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/nocode.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/oblit_anon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/overview.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/param_inline.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/params_optional.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/prototype.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/prototype_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/prototype_oblit.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/prototype_oblit_constructor.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/public.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/shared.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/shared2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/shortcuts.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/static_this.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/synonyms.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/tosource.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/app/test/variable_redefine.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/changes.txt +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/conf/sample.conf +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/java/build.xml +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/java/build_1.4.xml +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/java/classes/js.jar +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/java/src/JsDebugRun.java +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/java/src/JsRun.java +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/jsdebug.jar +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/jsrun.jar +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/t/TestDoc.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/t/runner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/addon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/anon_inner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/augments.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/augments2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/borrows.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/borrows2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/config.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/constructs.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/encoding.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/encoding_other.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/functions_anon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/functions_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/global.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/globals.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/ignore.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/inner.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/jsdoc_test.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/lend.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/memberof.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/memberof_constructor.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/name.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/namespace_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/nocode.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/oblit_anon.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/overview.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/param_inline.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/params_optional.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/prototype.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/prototype_nested.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/prototype_oblit.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/prototype_oblit_constructor.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/public.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/shared.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/shared2.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/shortcuts.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/static_this.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/synonyms.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/tosource.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/jsdoc/test/variable_redefine.js +0 -0
- data/{vendor → lib/sproutcore/vendor}/yui-compressor/SCyuicompressor-2.4.2.jar +0 -0
- data/{vendor → lib/sproutcore/vendor}/yui-compressor/yuicompressor-2.4.2.jar +0 -0
- data/lib/sproutcore/version.rb +11 -0
- data/spec/buildtasks/build/copy_spec.rb +16 -16
- data/spec/buildtasks/build/spec_helper.rb +5 -5
- data/spec/buildtasks/manifest/catalog_spec.rb +9 -9
- data/spec/buildtasks/manifest/hide_buildfiles_spec.rb +15 -15
- data/spec/buildtasks/manifest/localize_spec.rb +14 -14
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +61 -61
- data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +52 -44
- data/spec/buildtasks/manifest/prepare_build_tasks/css_spec.rb +13 -13
- data/spec/buildtasks/manifest/prepare_build_tasks/html_spec.rb +29 -29
- data/spec/buildtasks/manifest/prepare_build_tasks/javascript_spec.rb +11 -11
- data/spec/buildtasks/manifest/prepare_build_tasks/minify_spec.rb +9 -9
- data/spec/buildtasks/manifest/prepare_build_tasks/packed_spec.rb +23 -23
- data/spec/buildtasks/manifest/prepare_build_tasks/sass_spec.rb +15 -15
- data/spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb +11 -11
- data/spec/buildtasks/manifest/prepare_build_tasks/tests_spec.rb +28 -28
- data/spec/buildtasks/manifest/prepare_spec.rb +7 -7
- data/spec/buildtasks/manifest/spec_helper.rb +6 -6
- data/spec/buildtasks/target_spec.rb +33 -33
- data/spec/fixtures/builder_tests/apps/less_test/sample.less +4 -0
- data/spec/fixtures/builder_tests/apps/sass_test/sample.sass +1 -0
- data/spec/fixtures/builder_tests/apps/sass_test/sample.scss +4 -0
- data/spec/fixtures/buildfiles/basic/Buildfile +0 -5
- data/spec/fixtures/buildfiles/installed/Buildfile +0 -2
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo3.scss +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo4.less +0 -0
- data/spec/fixtures/real_world/generators/sample_custom/templates/{filename}.js +1 -0
- data/spec/lib/builders/bundle_spec.rb +79 -78
- data/spec/lib/builders/combine_spec.rb +10 -10
- data/spec/lib/builders/html_spec.rb +134 -133
- data/spec/lib/builders/javascript_spec.rb +11 -10
- data/spec/lib/builders/less_spec.rb +51 -0
- data/spec/lib/builders/sass_spec.rb +38 -9
- data/spec/lib/builders/spec_helper.rb +8 -8
- data/spec/lib/builders/strings_spec.rb +14 -11
- data/spec/lib/builders/stylesheet_spec.rb +9 -8
- data/spec/lib/builders/test_index_spec.rb +10 -9
- data/spec/lib/builders/test_spec.rb +36 -35
- data/spec/lib/buildfile/config_for_spec.rb +15 -15
- data/spec/lib/buildfile/define_spec.rb +14 -14
- data/spec/lib/buildfile/dup_spec.rb +19 -19
- data/spec/lib/buildfile/invoke_spec.rb +38 -33
- data/spec/lib/buildfile/load_spec.rb +21 -19
- data/spec/lib/buildfile/task/dup_spec.rb +14 -14
- data/spec/lib/buildfile/task_defined_spec.rb +3 -3
- data/spec/lib/buildfile_commands/build_task_spec.rb +3 -3
- data/spec/lib/buildfile_commands/config_spec.rb +40 -40
- data/spec/lib/buildfile_commands/import_spec.rb +2 -2
- data/spec/lib/buildfile_commands/namespace_spec.rb +3 -3
- data/spec/lib/buildfile_commands/proxies_spec.rb +12 -12
- data/spec/lib/buildfile_commands/replace_task_spec.rb +7 -7
- data/spec/lib/buildfile_commands/task_spec.rb +6 -6
- data/spec/lib/helpers/packing_optimizer/optimize_spec.rb +5 -5
- data/spec/lib/models/hash_struct/deep_clone_spec.rb +8 -8
- data/spec/lib/models/hash_struct/has_options_spec.rb +10 -10
- data/spec/lib/models/hash_struct/hash_spec.rb +17 -19
- data/spec/lib/models/hash_struct/merge_spec.rb +4 -4
- data/spec/lib/models/hash_struct/method_missing.rb +9 -9
- data/spec/lib/models/manifest/add_entry_spec.rb +7 -7
- data/spec/lib/models/manifest/add_transform_spec.rb +17 -15
- data/spec/lib/models/manifest/build_spec.rb +19 -19
- data/spec/lib/models/manifest/entry_for_spec.rb +30 -30
- data/spec/lib/models/manifest/find_entry.rb +20 -20
- data/spec/lib/models/manifest/prepare_spec.rb +13 -13
- data/spec/lib/models/manifest_entry/cacheable_url_spec.rb +8 -8
- data/spec/lib/models/manifest_entry/hyperdomain_prefix.rb +9 -9
- data/spec/lib/models/manifest_entry/prepare_spec.rb +11 -11
- data/spec/lib/models/project/add_target_spec.rb +7 -7
- data/spec/lib/models/project/buildfile_spec.rb +4 -4
- data/spec/lib/models/project/find_targets_for_spec.rb +17 -17
- data/spec/lib/models/project/load_nearest_project_spec.rb +10 -10
- data/spec/lib/models/project/target_for_spec.rb +6 -6
- data/spec/lib/models/project/targets_spec.rb +13 -13
- data/spec/lib/models/target/compute_build_number_spec.rb +24 -23
- data/spec/lib/models/target/config_spec.rb +6 -6
- data/spec/lib/models/target/expand_required_targets_spec.rb +14 -14
- data/spec/lib/models/target/installed_languages_spec.rb +12 -12
- data/spec/lib/models/target/lproj_for_spec.rb +9 -9
- data/spec/lib/models/target/manifest_for_spec.rb +8 -8
- data/spec/lib/models/target/parent_target_spec.rb +3 -3
- data/spec/lib/models/target/prepare_spec.rb +11 -11
- data/spec/lib/models/target/required_targets_spec.rb +28 -28
- data/spec/lib/models/target/target_for_spec.rb +5 -5
- data/spec/lib/tools/build_number_spec.rb +9 -9
- data/spec/lib/tools/gen_spec.rb +34 -33
- data/spec/lib/tools/tools_spec.rb +20 -19
- data/spec/spec_helper.rb +28 -40
- data/sproutcore.gemspec +33 -0
- metadata +1741 -1056
- data/buildtasks/build.rake +0 -87
- data/buildtasks/target.rake +0 -61
- data/frameworks/sproutcore/README +0 -64
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/scroller.css +0 -26
- data/frameworks/sproutcore/frameworks/desktop/system/root_responder.js +0 -702
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/methods.js +0 -72
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/ui.js +0 -71
@@ -2,7 +2,7 @@
|
|
2
2
|
// Project: SproutCore - JavaScript Application Framework
|
3
3
|
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
4
|
// Portions ©2008-2009 Apple Inc. All rights reserved.
|
5
|
-
// License:
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
8
|
/** @class
|
@@ -2,12 +2,15 @@
|
|
2
2
|
// Project: SproutCore - JavaScript Application Framework
|
3
3
|
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
4
|
// Portions ©2008-2009 Apple Inc. All rights reserved.
|
5
|
-
// License:
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
8
|
sc_require('views/scroller');
|
9
9
|
sc_require('mixins/border');
|
10
10
|
|
11
|
+
SC.NORMAL_SCROLL_DECELERATION = 0.95;
|
12
|
+
SC.FAST_SCROLL_DECELERATION = 0.85;
|
13
|
+
|
11
14
|
/** @class
|
12
15
|
|
13
16
|
Implements a complete scroll view. This class uses a manual implementation
|
@@ -24,7 +27,7 @@ sc_require('mixins/border');
|
|
24
27
|
@since SproutCore 1.0
|
25
28
|
*/
|
26
29
|
SC.ScrollView = SC.View.extend(SC.Border, {
|
27
|
-
|
30
|
+
/** @scope SC.ScrollView.prototype */
|
28
31
|
classNames: ['sc-scroll-view'],
|
29
32
|
|
30
33
|
// ..........................................................
|
@@ -37,16 +40,91 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
37
40
|
The content view you want the scroll view to manage. This will be assigned to the contentView of the clipView also.
|
38
41
|
*/
|
39
42
|
contentView: null,
|
43
|
+
|
44
|
+
/**
|
45
|
+
The horizontal alignment for non-filling content inside of the ScrollView.
|
46
|
+
*/
|
47
|
+
horizontalAlign: SC.ALIGN_LEFT,
|
48
|
+
|
49
|
+
/**
|
50
|
+
The vertical alignment for non-filling content inside of the ScrollView.
|
51
|
+
*/
|
52
|
+
verticalAlign: SC.ALIGN_TOP,
|
40
53
|
|
41
54
|
/**
|
42
55
|
The current horizontal scroll offset. Changing this value will update both the contentView and the horizontal scroller, if there is one.
|
43
56
|
*/
|
44
|
-
horizontalScrollOffset:
|
57
|
+
horizontalScrollOffset: function(key, value) {
|
58
|
+
if (value !== undefined) {
|
59
|
+
var minOffset = this.minimumHorizontalScrollOffset(),
|
60
|
+
maxOffset = this.get('maximumHorizontalScrollOffset');
|
61
|
+
this._scroll_horizontalScrollOffset = Math.max(minOffset,Math.min(maxOffset, value)) ;
|
62
|
+
}
|
63
|
+
|
64
|
+
return this._scroll_horizontalScrollOffset||0;
|
65
|
+
}.property().cacheable(),
|
45
66
|
|
46
67
|
/**
|
47
68
|
The current vertical scroll offset. Changing this value will update both the contentView and the vertical scroller, if there is one.
|
48
69
|
*/
|
49
|
-
verticalScrollOffset:
|
70
|
+
verticalScrollOffset: function(key, value) {
|
71
|
+
if (value !== undefined) {
|
72
|
+
var minOffset = this.get('minimumVerticalScrollOffset'),
|
73
|
+
maxOffset = this.get('maximumVerticalScrollOffset');
|
74
|
+
this._scroll_verticalScrollOffset = Math.max(minOffset,Math.min(maxOffset, value)) ;
|
75
|
+
}
|
76
|
+
|
77
|
+
return this._scroll_verticalScrollOffset||0;
|
78
|
+
}.property().cacheable(),
|
79
|
+
|
80
|
+
/**
|
81
|
+
@private
|
82
|
+
Calculates the maximum offset given content and container sizes, and the
|
83
|
+
alignment.
|
84
|
+
*/
|
85
|
+
maximumScrollOffset: function(contentSize, containerSize, align) {
|
86
|
+
// if our content size is larger than or the same size as the container, it's quite
|
87
|
+
// simple to calculate the answer. Otherwise, we need to do some fancy-pants
|
88
|
+
// alignment logic (read: simple math)
|
89
|
+
if (contentSize >= containerSize) return contentSize - containerSize;
|
90
|
+
|
91
|
+
// alignment, yeah
|
92
|
+
if (align === SC.ALIGN_LEFT || align === SC.ALIGN_TOP) {
|
93
|
+
// if we left-align something, and it is smaller than the view, does that not mean
|
94
|
+
// that it's maximum (and minimum) offset is 0, because it should be positioned at 0?
|
95
|
+
return 0;
|
96
|
+
} else if (align === SC.ALIGN_MIDDLE || align === SC.ALIGN_CENTER) {
|
97
|
+
// middle align means the difference divided by two, because we want equal parts on each side.
|
98
|
+
return 0 - Math.round((containerSize - contentSize) / 2);
|
99
|
+
} else {
|
100
|
+
// right align means the entire difference, because we want all that space on the left
|
101
|
+
return 0 - (containerSize - contentSize);
|
102
|
+
}
|
103
|
+
},
|
104
|
+
|
105
|
+
/**
|
106
|
+
@private
|
107
|
+
Calculates the minimum offset given content and container sizes, and the
|
108
|
+
alignment.
|
109
|
+
*/
|
110
|
+
minimumScrollOffset: function(contentSize, containerSize, align) {
|
111
|
+
// if the content is larger than the container, we have no need to change the minimum
|
112
|
+
// away from the natural 0 position.
|
113
|
+
if (contentSize > containerSize) return 0;
|
114
|
+
|
115
|
+
// alignment, yeah
|
116
|
+
if (align === SC.ALIGN_LEFT || align === SC.ALIGN_TOP) {
|
117
|
+
// if we left-align something, and it is smaller than the view, does that not mean
|
118
|
+
// that it's maximum (and minimum) offset is 0, because it should be positioned at 0?
|
119
|
+
return 0;
|
120
|
+
} else if (align === SC.ALIGN_MIDDLE || align === SC.ALIGN_CENTER) {
|
121
|
+
// middle align means the difference divided by two, because we want equal parts on each side.
|
122
|
+
return 0 - Math.round((containerSize - contentSize) / 2);
|
123
|
+
} else {
|
124
|
+
// right align means the entire difference, because we want all that space on the left
|
125
|
+
return 0 - (containerSize - contentSize);
|
126
|
+
}
|
127
|
+
},
|
50
128
|
|
51
129
|
/**
|
52
130
|
The maximum horizontal scroll offset allowed given the current contentView
|
@@ -56,40 +134,111 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
56
134
|
@property {Number}
|
57
135
|
*/
|
58
136
|
maximumHorizontalScrollOffset: function() {
|
59
|
-
|
60
|
-
|
61
|
-
|
137
|
+
var view = this.get('contentView'),
|
138
|
+
contentWidth = 0, calculatedWidth = 0;
|
139
|
+
|
140
|
+
if (view && view.get('frame')) contentWidth = view.get('frame').width;
|
141
|
+
if (view) calculatedWidth = view.calculatedWidth || 0;
|
62
142
|
|
63
143
|
// The following code checks if there is a calculatedWidth (collections)
|
64
144
|
// to avoid looking at the incorrect value calculated by frame.
|
65
|
-
if(view.calculatedWidth && view.calculatedWidth!==0){
|
145
|
+
if(view && view.calculatedWidth && view.calculatedWidth!==0){
|
66
146
|
contentWidth = view.calculatedWidth;
|
67
147
|
}
|
148
|
+
contentWidth *= this._scale;
|
149
|
+
|
68
150
|
var containerWidth = this.get('containerView').get('frame').width ;
|
69
|
-
|
151
|
+
|
152
|
+
// we still must go through minimumScrollOffset even if we can't scroll
|
153
|
+
// because we need to adjust for alignment. So, just make sure it won't allow scrolling.
|
154
|
+
if (!this.get('canScrollHorizontal')) contentWidth = Math.min(contentWidth, containerWidth);
|
155
|
+
return this.maximumScrollOffset(contentWidth, containerWidth, this.get("horizontalAlign"));
|
70
156
|
}.property(),
|
71
157
|
|
72
158
|
/**
|
73
159
|
The maximum vertical scroll offset allowed given the current contentView
|
74
160
|
size and the size of the scroll view. If vertical scrolling is disabled,
|
75
|
-
this will always return 0.
|
161
|
+
this will always return 0 (or whatever alignment dictates).
|
76
162
|
|
77
163
|
@property {Number}
|
78
164
|
*/
|
79
165
|
maximumVerticalScrollOffset: function() {
|
80
|
-
|
166
|
+
var view = this.get('contentView'),
|
167
|
+
contentHeight = 0, calculatedHeight = 0;
|
168
|
+
|
169
|
+
if (view && view.get('frame')) contentHeight = view.get('frame').height;
|
170
|
+
if (view) calculatedHeight = view.calculatedHeight || 0;
|
171
|
+
|
172
|
+
// The following code checks if there is a calculatedWidth (collections)
|
173
|
+
// to avoid looking at the incorrect value calculated by frame.
|
174
|
+
if(view && view.calculatedHeight && view.calculatedHeight!==0){
|
175
|
+
contentHeight = view.calculatedHeight;
|
176
|
+
}
|
177
|
+
contentHeight *= this._scale;
|
178
|
+
|
179
|
+
var containerHeight = this.get('containerView').get('frame').height ;
|
180
|
+
|
181
|
+
// we still must go through minimumScrollOffset even if we can't scroll
|
182
|
+
// because we need to adjust for alignment. So, just make sure it won't allow scrolling.
|
183
|
+
if (!this.get('canScrollVertical')) contentHeight = Math.min(contentHeight, containerHeight);
|
184
|
+
return this.maximumScrollOffset(contentHeight, containerHeight, this.get("verticalAlign"));
|
185
|
+
}.property(),
|
186
|
+
|
187
|
+
|
188
|
+
/**
|
189
|
+
The minimum horizontal scroll offset allowed given the current contentView
|
190
|
+
size and the size of the scroll view. If horizontal scrolling is
|
191
|
+
disabled, this will always return 0 (or whatever alignment dictates).
|
192
|
+
|
193
|
+
@property {Number}
|
194
|
+
*/
|
195
|
+
minimumHorizontalScrollOffset: function() {
|
196
|
+
var view = this.get('contentView') ;
|
197
|
+
var contentWidth = view ? view.get('frame').width : 0 ;
|
198
|
+
|
199
|
+
// The following code checks if there is a calculatedWidth (collections)
|
200
|
+
// to avoid looking at the incorrect value calculated by frame.
|
201
|
+
if(view && view.calculatedWidth && view.calculatedWidth!==0){
|
202
|
+
contentWidth = view.calculatedWidth;
|
203
|
+
}
|
204
|
+
contentWidth *= this._scale;
|
205
|
+
|
206
|
+
var containerWidth = this.get('containerView').get('frame').width ;
|
207
|
+
|
208
|
+
// we still must go through minimumScrollOffset even if we can't scroll
|
209
|
+
// because we need to adjust for alignment. So, just make sure it won't allow scrolling.
|
210
|
+
if (!this.get('canScrollHorizontal')) contentWidth = Math.min(contentWidth, containerWidth);
|
211
|
+
return this.minimumScrollOffset(contentWidth, containerWidth, this.get("horizontalAlign"));
|
212
|
+
}.property(),
|
213
|
+
|
214
|
+
/**
|
215
|
+
The minimum vertical scroll offset allowed given the current contentView
|
216
|
+
size and the size of the scroll view. If vertical scrolling is disabled,
|
217
|
+
this will always return 0 (or whatever alignment dictates).
|
218
|
+
|
219
|
+
@property {Number}
|
220
|
+
*/
|
221
|
+
minimumVerticalScrollOffset: function() {
|
81
222
|
var view = this.get('contentView') ;
|
82
223
|
var contentHeight = (view && view.get('frame')) ? view.get('frame').height : 0 ;
|
83
224
|
|
84
225
|
// The following code checks if there is a calculatedWidth (collections)
|
85
226
|
// to avoid looking at the incorrect value calculated by frame.
|
86
|
-
if(view.calculatedHeight && view.calculatedHeight!==0){
|
227
|
+
if(view && view.calculatedHeight && view.calculatedHeight!==0){
|
87
228
|
contentHeight = view.calculatedHeight;
|
88
229
|
}
|
230
|
+
contentHeight *= this._scale;
|
231
|
+
|
89
232
|
var containerHeight = this.get('containerView').get('frame').height ;
|
90
|
-
|
233
|
+
|
234
|
+
// we still must go through minimumScrollOffset even if we can't scroll
|
235
|
+
// because we need to adjust for alignment. So, just make sure it won't allow scrolling.
|
236
|
+
if (!this.get('canScrollVertical')) contentHeight = Math.min(contentHeight, containerHeight);
|
237
|
+
return this.minimumScrollOffset(contentHeight, containerHeight, this.get("verticalAlign"));
|
91
238
|
}.property(),
|
92
239
|
|
240
|
+
|
241
|
+
|
93
242
|
/**
|
94
243
|
Amount to scroll one vertical line.
|
95
244
|
|
@@ -145,7 +294,9 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
145
294
|
|
146
295
|
@property {SC.View}
|
147
296
|
*/
|
148
|
-
horizontalScrollerView:
|
297
|
+
horizontalScrollerView: function() {
|
298
|
+
return SC.ScrollerView;
|
299
|
+
}.property().cacheable(),
|
149
300
|
|
150
301
|
/**
|
151
302
|
YES if the horizontal scroller should be visible. You can change this
|
@@ -191,7 +342,9 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
191
342
|
|
192
343
|
@property {SC.View}
|
193
344
|
*/
|
194
|
-
verticalScrollerView:
|
345
|
+
verticalScrollerView: function() {
|
346
|
+
return SC.ScrollerView;
|
347
|
+
}.property().cacheable(),
|
195
348
|
|
196
349
|
/**
|
197
350
|
YES if the vertical scroller should be visible. You can change this
|
@@ -231,6 +384,60 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
231
384
|
*/
|
232
385
|
verticalScrollerBottom: 0,
|
233
386
|
|
387
|
+
/**
|
388
|
+
Use this to overlay the vertical scroller.
|
389
|
+
|
390
|
+
This ensures that the container frame will not resize to accomodate the
|
391
|
+
vertical scroller, hence overlaying the scroller on top of
|
392
|
+
the container.
|
393
|
+
|
394
|
+
@property {Boolean}
|
395
|
+
*/
|
396
|
+
verticalOverlay: function() {
|
397
|
+
if (SC.platform.touch) return YES;
|
398
|
+
return NO;
|
399
|
+
}.property().cacheable(),
|
400
|
+
|
401
|
+
/**
|
402
|
+
Use this to overlay the horizontal scroller.
|
403
|
+
|
404
|
+
This ensures that the container frame will not resize to accomodate the
|
405
|
+
horizontal scroller, hence overlaying the scroller on top of
|
406
|
+
the container
|
407
|
+
|
408
|
+
@property {Boolean}
|
409
|
+
*/
|
410
|
+
horizontalOverlay: function() {
|
411
|
+
if (SC.platform.touch) return YES;
|
412
|
+
return NO;
|
413
|
+
}.property().cacheable(),
|
414
|
+
|
415
|
+
/**
|
416
|
+
Use to control the positioning of the vertical scroller. If you do not
|
417
|
+
set 'verticalOverlay' to YES, then the content view will be automatically
|
418
|
+
sized to meet the left edge of the vertical scroller, wherever it may be.
|
419
|
+
This allows you to easily, for example, have “one pixel higher and one
|
420
|
+
pixel lower” scroll bars that blend into their parent views.
|
421
|
+
|
422
|
+
If you do set 'verticalOverlay' to YES, then the scroller view will
|
423
|
+
“float on top” of the content view.
|
424
|
+
|
425
|
+
Example: { top: -1, bottom: -1, right: 0 }
|
426
|
+
*/
|
427
|
+
verticalScrollerLayout: null,
|
428
|
+
|
429
|
+
/**
|
430
|
+
Use to control the positioning of the horizontal scroller. If you do not
|
431
|
+
set 'horizontalOverlay' to YES, then the content view will be
|
432
|
+
automatically sized to meet the top edge of the horizontal scroller,
|
433
|
+
wherever it may be.
|
434
|
+
|
435
|
+
If you do set 'horizontalOverlay' to YES, then the scroller view will
|
436
|
+
“float on top” of the content view.
|
437
|
+
|
438
|
+
Example: { left: 0, bottom: 0, right: 0 }
|
439
|
+
*/
|
440
|
+
horizontalScrollerLayout: null,
|
234
441
|
|
235
442
|
// ..........................................................
|
236
443
|
// CUSTOM VIEWS
|
@@ -242,7 +449,9 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
242
449
|
|
243
450
|
@type {SC.ContainerView}
|
244
451
|
*/
|
245
|
-
containerView: SC.ContainerView
|
452
|
+
containerView: SC.ContainerView.extend({
|
453
|
+
|
454
|
+
}),
|
246
455
|
|
247
456
|
// ..........................................................
|
248
457
|
// METHODS
|
@@ -272,12 +481,12 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
272
481
|
}
|
273
482
|
|
274
483
|
if (!SC.none(x)) {
|
275
|
-
x = Math.max(
|
484
|
+
x = Math.max(this.get('minimumHorizontalScrollOffset'),Math.min(this.get('maximumHorizontalScrollOffset'), x)) ;
|
276
485
|
this.set('horizontalScrollOffset', x) ;
|
277
486
|
}
|
278
487
|
|
279
488
|
if (!SC.none(y)) {
|
280
|
-
y = Math.max(
|
489
|
+
y = Math.max(this.get('minimumVerticalScrollOffset'),Math.min(this.get('maximumVerticalScrollOffset'), y)) ;
|
281
490
|
this.set('verticalScrollOffset', y) ;
|
282
491
|
}
|
283
492
|
|
@@ -334,6 +543,15 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
334
543
|
// will become the new scroll offset after some adjustment.
|
335
544
|
vf = contentView.convertFrameFromView(vf, view.get('parentView')) ;
|
336
545
|
|
546
|
+
return this.scrollToRect(vf);
|
547
|
+
},
|
548
|
+
|
549
|
+
/**
|
550
|
+
Scroll to the supplied rectangle.
|
551
|
+
@param {rect} Rectangle to scroll to.
|
552
|
+
@returns {Boolean} YES if scroll position was changed.
|
553
|
+
*/
|
554
|
+
scrollToRect: function(rect) {
|
337
555
|
// find current visible frame.
|
338
556
|
var vo = SC.cloneRect(this.get('containerView').get('frame')) ;
|
339
557
|
|
@@ -343,12 +561,12 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
343
561
|
var origX = vo.x, origY = vo.y;
|
344
562
|
|
345
563
|
// if top edge is not visible, shift origin
|
346
|
-
vo.y -= Math.max(0, SC.minY(vo) - SC.minY(
|
347
|
-
vo.x -= Math.max(0, SC.minX(vo) - SC.minX(
|
564
|
+
vo.y -= Math.max(0, SC.minY(vo) - SC.minY(rect)) ;
|
565
|
+
vo.x -= Math.max(0, SC.minX(vo) - SC.minX(rect)) ;
|
348
566
|
|
349
567
|
// if bottom edge is not visible, shift origin
|
350
|
-
vo.y += Math.max(0, SC.maxY(
|
351
|
-
vo.x += Math.max(0, SC.maxX(
|
568
|
+
vo.y += Math.max(0, SC.maxY(rect) - SC.maxY(vo)) ;
|
569
|
+
vo.x += Math.max(0, SC.maxX(rect) - SC.maxX(vo)) ;
|
352
570
|
|
353
571
|
// scroll to that origin.
|
354
572
|
if ((origX !== vo.x) || (origY !== vo.y)) {
|
@@ -357,6 +575,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
357
575
|
} else return NO;
|
358
576
|
},
|
359
577
|
|
578
|
+
|
360
579
|
/**
|
361
580
|
Scrolls the receiver down one or more lines if allowed. If number of
|
362
581
|
lines is not specified, scrolls one line.
|
@@ -470,40 +689,60 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
470
689
|
additional controls you have added to the view.
|
471
690
|
*/
|
472
691
|
tile: function() {
|
692
|
+
|
693
|
+
// for now just hide scroll bars on touch platforms
|
694
|
+
var isTouch = SC.platform.touch;
|
695
|
+
|
473
696
|
// get horizontal scroller/determine if we should have a scroller
|
474
697
|
var hscroll = this.get('hasHorizontalScroller') ? this.get('horizontalScrollerView') : null ;
|
475
|
-
var hasHorizontal = hscroll && this.get('isHorizontalScrollerVisible');
|
698
|
+
var hasHorizontal = hscroll && !isTouch && this.get('isHorizontalScrollerVisible');
|
476
699
|
|
477
700
|
// get vertical scroller/determine if we should have a scroller
|
478
701
|
var vscroll = this.get('hasVerticalScroller') ? this.get('verticalScrollerView') : null ;
|
479
|
-
var hasVertical = vscroll && this.get('isVerticalScrollerVisible') ;
|
702
|
+
var hasVertical = vscroll && !isTouch && this.get('isVerticalScrollerVisible') ;
|
480
703
|
|
481
704
|
// get the containerView
|
482
705
|
var clip = this.get('containerView') ;
|
483
706
|
var clipLayout = { left: 0, top: 0 } ;
|
484
|
-
var t ;
|
707
|
+
var t, layout, vo, ho, vl, hl;
|
485
708
|
|
486
|
-
var ht = ((hasHorizontal) ? hscroll.get('
|
487
|
-
var vt = (hasVertical) ? vscroll.get('
|
709
|
+
var ht = ((hasHorizontal) ? hscroll.get('scrollbarThickness') : 0) ;
|
710
|
+
var vt = (hasVertical) ? vscroll.get('scrollbarThickness') : 0 ;
|
488
711
|
|
489
712
|
if (hasHorizontal) {
|
490
|
-
|
491
|
-
|
713
|
+
hl = this.get('horizontalScrollerLayout');
|
714
|
+
layout = {
|
715
|
+
left: (hl ? hl.left : 0),
|
716
|
+
bottom: (hl ? hl.bottom : 0),
|
717
|
+
right: (hl ? hl.right + vt-1 : vt-1),
|
718
|
+
height: ht
|
719
|
+
};
|
720
|
+
hscroll.set('layout', layout) ;
|
721
|
+
ho = this.get('horizontalOverlay');
|
722
|
+
clipLayout.bottom = ho ? 0 : (layout.bottom + ht) ;
|
492
723
|
} else {
|
493
724
|
clipLayout.bottom = 0 ;
|
494
725
|
}
|
495
726
|
if (hscroll) hscroll.set('isVisible', hasHorizontal) ;
|
496
727
|
|
497
728
|
if (hasVertical) {
|
498
|
-
ht
|
499
|
-
|
500
|
-
|
729
|
+
ht = ht + this.get('verticalScrollerBottom') ;
|
730
|
+
vl = this.get('verticalScrollerLayout');
|
731
|
+
layout = {
|
732
|
+
top: (vl ? vl.top : 0),
|
733
|
+
bottom: (vl ? vl.bottom + ht : ht),
|
734
|
+
right: (vl ? vl.right : 0),
|
735
|
+
width: vt
|
736
|
+
};
|
737
|
+
vscroll.set('layout', layout) ;
|
738
|
+
vo = this.get('verticalOverlay');
|
739
|
+
clipLayout.right = vo ? 0 : (layout.right + vt) ;
|
501
740
|
} else {
|
502
741
|
clipLayout.right = 0 ;
|
503
742
|
}
|
504
743
|
if (vscroll) vscroll.set('isVisible', hasVertical) ;
|
505
|
-
|
506
|
-
clip.
|
744
|
+
|
745
|
+
clip.adjust(clipLayout) ;
|
507
746
|
},
|
508
747
|
|
509
748
|
/** @private
|
@@ -523,18 +762,737 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
523
762
|
// save adjustment and then invoke the actual scroll code later. This will
|
524
763
|
// keep the view feeling smooth.
|
525
764
|
mouseWheel: function(evt) {
|
526
|
-
|
527
|
-
|
765
|
+
var deltaAdjust = (SC.browser.safari && SC.browser.version > 533.0) ? 120 : 1;
|
766
|
+
|
767
|
+
this._scroll_wheelDeltaX += evt.wheelDeltaX / deltaAdjust;
|
768
|
+
this._scroll_wheelDeltaY += evt.wheelDeltaY / deltaAdjust;
|
528
769
|
this.invokeLater(this._scroll_mouseWheel, 10) ;
|
529
770
|
return this.get('canScrollHorizontal') || this.get('canScrollVertical') ;
|
530
771
|
},
|
531
|
-
|
772
|
+
|
532
773
|
/** @private */
|
533
774
|
_scroll_mouseWheel: function() {
|
534
775
|
this.scrollBy(this._scroll_wheelDeltaX, this._scroll_wheelDeltaY);
|
535
|
-
|
776
|
+
if (SC.WHEEL_MOMENTUM && this._scroll_wheelDeltaY > 0) {
|
777
|
+
this._scroll_wheelDeltaY = Math.floor(this._scroll_wheelDeltaY*0.950);
|
778
|
+
this._scroll_wheelDeltaY = Math.max(this._scroll_wheelDeltaY, 0);
|
779
|
+
this.invokeLater(this._scroll_mouseWheel, 10) ;
|
780
|
+
} else if (SC.WHEEL_MOMENTUM && this._scroll_wheelDeltaY < 0){
|
781
|
+
this._scroll_wheelDeltaY = Math.ceil(this._scroll_wheelDeltaY*0.950);
|
782
|
+
this._scroll_wheelDeltaY = Math.min(this._scroll_wheelDeltaY, 0);
|
783
|
+
this.invokeLater(this._scroll_mouseWheel, 10) ;
|
784
|
+
} else {
|
785
|
+
this._scroll_wheelDeltaY = 0;
|
786
|
+
this._scroll_wheelDeltaX = 0;
|
787
|
+
}
|
536
788
|
},
|
537
789
|
|
790
|
+
/*..............................................
|
791
|
+
SCALING SUPPORT
|
792
|
+
*/
|
793
|
+
|
794
|
+
/**
|
795
|
+
Determines whether scaling is allowed.
|
796
|
+
*/
|
797
|
+
canScale: NO,
|
798
|
+
|
799
|
+
/**
|
800
|
+
The current scale.
|
801
|
+
*/
|
802
|
+
_scale: 1.0,
|
803
|
+
scale: function(key, value) {
|
804
|
+
if (value !== undefined) {
|
805
|
+
this._scale = Math.min(Math.max(this.get("minimumScale"), value), this.get("maximumScale"));
|
806
|
+
}
|
807
|
+
return this._scale;
|
808
|
+
}.property().cacheable(),
|
809
|
+
|
810
|
+
/**
|
811
|
+
The minimum scale.
|
812
|
+
*/
|
813
|
+
minimumScale: 0.25,
|
814
|
+
|
815
|
+
/**
|
816
|
+
The maximum scale.
|
817
|
+
*/
|
818
|
+
maximumScale: 2.0,
|
819
|
+
|
820
|
+
/**
|
821
|
+
Whether to automatically determine the scale range based on the size of the content.
|
822
|
+
*/
|
823
|
+
autoScaleRange: NO,
|
824
|
+
|
825
|
+
_scale_css: "",
|
826
|
+
|
827
|
+
updateScale: function(scale) {
|
828
|
+
var contentView = this.get("contentView");
|
829
|
+
if (!contentView) return;
|
830
|
+
|
831
|
+
if (contentView.isScalable) {
|
832
|
+
this.get("contentView").applyScale(scale);
|
833
|
+
this._scale_css = "";
|
834
|
+
} else {
|
835
|
+
this._scale_css = "scale3d(" + scale + ", " + scale + ", 1)";
|
836
|
+
}
|
837
|
+
},
|
838
|
+
|
839
|
+
/*..............................................
|
840
|
+
TOUCH SUPPORT
|
841
|
+
*/
|
842
|
+
acceptsMultitouch: YES,
|
843
|
+
|
844
|
+
/**
|
845
|
+
The scroll deceleration rate.
|
846
|
+
*/
|
847
|
+
decelerationRate: SC.NORMAL_SCROLL_DECELERATION,
|
848
|
+
|
849
|
+
/**
|
850
|
+
If YES, bouncing will always be enabled in the horizontal direction, even if the content
|
851
|
+
is smaller or the same size as the view. NO by default.
|
852
|
+
*/
|
853
|
+
alwaysBounceHorizontal: NO,
|
854
|
+
|
855
|
+
/**
|
856
|
+
If NO, bouncing will not be enabled in the vertical direction when the content is smaller
|
857
|
+
or the same size as the scroll view. YES by default.
|
858
|
+
*/
|
859
|
+
alwaysBounceVertical: YES,
|
860
|
+
|
861
|
+
/**
|
862
|
+
Whether to delay touches from passing through to the content.
|
863
|
+
*/
|
864
|
+
delaysContentTouches: YES,
|
865
|
+
|
866
|
+
/**
|
867
|
+
@private
|
868
|
+
If the view supports it, this
|
869
|
+
*/
|
870
|
+
_touchScrollDidChange: function() {
|
871
|
+
if (this.get("contentView").touchScrollDidChange) {
|
872
|
+
this.get("contentView").touchScrollDidChange(
|
873
|
+
this._scroll_horizontalScrollOffset,
|
874
|
+
this._scroll_verticalScrollOffset
|
875
|
+
);
|
876
|
+
}
|
877
|
+
|
878
|
+
// tell scrollers
|
879
|
+
if (this.verticalScrollerView && this.verticalScrollerView.touchScrollDidChange) {
|
880
|
+
this.verticalScrollerView.touchScrollDidChange(this._scroll_verticalScrollOffset);
|
881
|
+
}
|
882
|
+
|
883
|
+
if (this.horizontalScrollerView && this.horizontalScrollerView.touchScrollDidChange) {
|
884
|
+
this.horizontalScrollerView.touchScrollDidChange(this._scroll_horizontalScrollOffset);
|
885
|
+
}
|
886
|
+
},
|
887
|
+
|
888
|
+
_touchScrollDidStart: function() {
|
889
|
+
if (this.get("contentView").touchScrollDidStart) {
|
890
|
+
this.get("contentView").touchScrollDidStart(this._scroll_horizontalScrollOffset, this._scroll_verticalScrollOffset);
|
891
|
+
}
|
892
|
+
|
893
|
+
// tell scrollers
|
894
|
+
if (this.verticalScrollerView && this.verticalScrollerView.touchScrollDidStart) {
|
895
|
+
this.verticalScrollerView.touchScrollDidStart(this._touch_verticalScrollOffset);
|
896
|
+
}
|
897
|
+
if (this.horizontalScrollerView && this.horizontalScrollerView.touchScrollDidStart) {
|
898
|
+
this.horizontalScrollerView.touchScrollDidStart(this._touch_horizontalScrollOffset);
|
899
|
+
}
|
900
|
+
},
|
901
|
+
|
902
|
+
_touchScrollDidEnd: function() {
|
903
|
+
if (this.get("contentView").touchScrollDidEnd) {
|
904
|
+
this.get("contentView").touchScrollDidEnd(this._scroll_horizontalScrollOffset, this._scroll_verticalScrollOffset);
|
905
|
+
}
|
906
|
+
|
907
|
+
// tell scrollers
|
908
|
+
if (this.verticalScrollerView && this.verticalScrollerView.touchScrollDidEnd) {
|
909
|
+
this.verticalScrollerView.touchScrollDidEnd(this._touch_verticalScrollOffset);
|
910
|
+
}
|
911
|
+
|
912
|
+
if (this.horizontalScrollerView && this.horizontalScrollerView.touchScrollDidEnd) {
|
913
|
+
this.horizontalScrollerView.touchScrollDidEnd(this._touch_horizontalScrollOffset);
|
914
|
+
}
|
915
|
+
},
|
916
|
+
|
917
|
+
_applyCSSTransforms: function(layer) {
|
918
|
+
var transform = "";
|
919
|
+
this.updateScale(this._scale);
|
920
|
+
transform += 'translate3d('+ -this._scroll_horizontalScrollOffset +'px, '+ -Math.round(this._scroll_verticalScrollOffset)+'px,0) ';
|
921
|
+
transform += this._scale_css;
|
922
|
+
if (layer) {
|
923
|
+
layer.style.webkitTransform = transform;
|
924
|
+
layer.style.webkitTransformOrigin = "top left";
|
925
|
+
}
|
926
|
+
},
|
927
|
+
|
928
|
+
captureTouch: function(touch) {
|
929
|
+
return YES;
|
930
|
+
},
|
931
|
+
|
932
|
+
touchGeneration: 0,
|
933
|
+
touchStart: function(touch) {
|
934
|
+
var generation = ++this.touchGeneration;
|
935
|
+
if (!this.tracking && this.get("delaysContentTouches")) {
|
936
|
+
this.invokeLater(this.beginTouchesInContent, 150, generation);
|
937
|
+
} else if (!this.tracking) {
|
938
|
+
// NOTE: We still have to delay because we don't want to call touchStart
|
939
|
+
// while touchStart is itself being called...
|
940
|
+
this.invokeLater(this.beginTouchesInContent, 1, generation);
|
941
|
+
}
|
942
|
+
this.beginTouchTracking(touch, YES);
|
943
|
+
return YES;
|
944
|
+
},
|
945
|
+
|
946
|
+
beginTouchesInContent: function(gen) {
|
947
|
+
if (gen !== this.touchGeneration) return;
|
948
|
+
var touch = this.touch, itemView;
|
949
|
+
if (touch && this.tracking && !this.dragging && !touch.touch.scrollHasEnded) {
|
950
|
+
// try to capture the touch
|
951
|
+
touch.touch.captureTouch(this, YES);
|
952
|
+
if (!touch.touch.touchResponder) touch.touch.makeTouchResponder(this);
|
953
|
+
}
|
954
|
+
},
|
955
|
+
|
956
|
+
/**
|
957
|
+
Initializes the start state of the gesture.
|
958
|
+
|
959
|
+
We keep information about the initial location of the touch so we can
|
960
|
+
disambiguate between a tap and a drag.
|
961
|
+
|
962
|
+
@param {Event} evt
|
963
|
+
*/
|
964
|
+
beginTouchTracking: function(touch, starting) {
|
965
|
+
var avg = touch.averagedTouchesForView(this, starting);
|
966
|
+
|
967
|
+
var verticalScrollOffset = this._scroll_verticalScrollOffset || 0,
|
968
|
+
horizontalScrollOffset = this._scroll_horizontalScrollOffset || 0,
|
969
|
+
startClipOffsetX = horizontalScrollOffset,
|
970
|
+
startClipOffsetY = verticalScrollOffset;
|
971
|
+
|
972
|
+
if (this.touch && this.touch.timeout) {
|
973
|
+
// clear the timeout
|
974
|
+
clearTimeout(this.touch.timeout);
|
975
|
+
this.touch.timeout = null;
|
976
|
+
|
977
|
+
// get the scroll offsets
|
978
|
+
startClipOffsetX = this.touch.startClipOffset.x;
|
979
|
+
startClipOffsetY = this.touch.startClipOffset.y;
|
980
|
+
}
|
981
|
+
|
982
|
+
// calculate container+content width/height
|
983
|
+
var view = this.get('contentView') ;
|
984
|
+
var contentWidth = view ? view.get('frame').width : 0,
|
985
|
+
contentHeight = view ? view.get('frame').height : 0;
|
986
|
+
|
987
|
+
if(view.calculatedWidth && view.calculatedWidth!==0) contentWidth = view.calculatedWidth;
|
988
|
+
if (view.calculatedHeight && view.calculatedHeight !==0) contentHeight = view.calculatedHeight;
|
989
|
+
|
990
|
+
var containerWidth = this.get('containerView').get('frame').width,
|
991
|
+
containerHeight = this.get('containerView').get('frame').height;
|
992
|
+
|
993
|
+
|
994
|
+
// calculate position in content
|
995
|
+
var globalFrame = this.convertFrameToView(this.get("frame"), null),
|
996
|
+
positionInContentX = (horizontalScrollOffset + (avg.x - globalFrame.x)) / this._scale,
|
997
|
+
positionInContentY = (verticalScrollOffset + (avg.y - globalFrame.y)) / this._scale;
|
998
|
+
|
999
|
+
this.touch = {
|
1000
|
+
startTime: touch.timeStamp,
|
1001
|
+
notCalculated: YES,
|
1002
|
+
|
1003
|
+
enableScrolling: {
|
1004
|
+
x: contentWidth * this._scale > containerWidth || this.get("alwaysBounceHorizontal"),
|
1005
|
+
y: contentHeight * this._scale > containerHeight || this.get("alwaysBounceVertical")
|
1006
|
+
},
|
1007
|
+
scrolling: { x: NO, y: NO },
|
1008
|
+
|
1009
|
+
enableBouncing: SC.platform.bounceOnScroll,
|
1010
|
+
|
1011
|
+
// offsets and velocities
|
1012
|
+
startClipOffset: { x: startClipOffsetX, y: startClipOffsetY },
|
1013
|
+
lastScrollOffset: { x: horizontalScrollOffset, y: verticalScrollOffset },
|
1014
|
+
startTouchOffset: { x: avg.x, y: avg.y },
|
1015
|
+
scrollVelocity: { x: 0, y: 0 },
|
1016
|
+
|
1017
|
+
startTouchOffsetInContent: { x: positionInContentX, y: positionInContentY },
|
1018
|
+
|
1019
|
+
containerSize: { width: containerWidth, height: containerHeight },
|
1020
|
+
contentSize: { width: contentWidth, height: contentHeight },
|
1021
|
+
|
1022
|
+
startScale: this._scale,
|
1023
|
+
startDistance: avg.d,
|
1024
|
+
canScale: this.get("canScale") && SC.platform.pinchToZoom,
|
1025
|
+
minimumScale: this.get("minimumScale"),
|
1026
|
+
maximumScale: this.get("maximumScale"),
|
1027
|
+
|
1028
|
+
globalFrame: globalFrame,
|
1029
|
+
|
1030
|
+
// cache some things
|
1031
|
+
layer: this.get("contentView").get('layer'),
|
1032
|
+
|
1033
|
+
// some constants
|
1034
|
+
resistanceCoefficient: 0.998,
|
1035
|
+
resistanceAsymptote: 320,
|
1036
|
+
decelerationFromEdge: 0.05,
|
1037
|
+
accelerationToEdge: 0.1,
|
1038
|
+
|
1039
|
+
// how much percent of the other drag direction you must drag to start dragging that direction too.
|
1040
|
+
scrollTolerance: { x: 15, y: 15 },
|
1041
|
+
scaleTolerance: 5,
|
1042
|
+
secondaryScrollTolerance: 30,
|
1043
|
+
scrollLock: 500,
|
1044
|
+
|
1045
|
+
decelerationRate: this.get("decelerationRate"),
|
1046
|
+
|
1047
|
+
// general status
|
1048
|
+
lastEventTime: touch.timeStamp,
|
1049
|
+
|
1050
|
+
// the touch used
|
1051
|
+
touch: (starting ? touch : (this.touch ? this.touch.touch : null))
|
1052
|
+
};
|
1053
|
+
|
1054
|
+
if (!this.tracking) {
|
1055
|
+
this.tracking = YES;
|
1056
|
+
this.dragging = NO;
|
1057
|
+
}
|
1058
|
+
},
|
1059
|
+
|
1060
|
+
_adjustForEdgeResistance: function(offset, minOffset, maxOffset, resistanceCoefficient, asymptote) {
|
1061
|
+
var distanceFromEdge;
|
1062
|
+
|
1063
|
+
// find distance from edge
|
1064
|
+
if (offset < minOffset) distanceFromEdge = offset - minOffset;
|
1065
|
+
else if (offset > maxOffset) distanceFromEdge = maxOffset - offset;
|
1066
|
+
else return offset;
|
1067
|
+
|
1068
|
+
// manipulate logarithmically
|
1069
|
+
distanceFromEdge = Math.pow(resistanceCoefficient, Math.abs(distanceFromEdge)) * asymptote;
|
1070
|
+
|
1071
|
+
// adjust mathematically
|
1072
|
+
if (offset < minOffset) distanceFromEdge = distanceFromEdge - asymptote;
|
1073
|
+
else distanceFromEdge = -distanceFromEdge + asymptote;
|
1074
|
+
|
1075
|
+
// generate final value
|
1076
|
+
return Math.min(Math.max(minOffset, offset), maxOffset) + distanceFromEdge;
|
1077
|
+
},
|
1078
|
+
|
1079
|
+
touchesDragged: function(evt, touches) {
|
1080
|
+
var avg = evt.averagedTouchesForView(this);
|
1081
|
+
this.updateTouchScroll(avg.x, avg.y, avg.d, evt.timeStamp);
|
1082
|
+
},
|
1083
|
+
|
1084
|
+
updateTouchScroll: function(touchX, touchY, distance, timeStamp) {
|
1085
|
+
// get some vars
|
1086
|
+
var touch = this.touch,
|
1087
|
+
touchXInFrame = touchX - touch.globalFrame.x,
|
1088
|
+
touchYInFrame = touchY - touch.globalFrame.y,
|
1089
|
+
offsetY,
|
1090
|
+
maxOffsetY,
|
1091
|
+
offsetX,
|
1092
|
+
maxOffsetX,
|
1093
|
+
minOffsetX, minOffsetY;
|
1094
|
+
|
1095
|
+
// calculate new position in content
|
1096
|
+
var positionInContentX = ((this._scroll_horizontalScrollOffset||0) + touchXInFrame) / this._scale,
|
1097
|
+
positionInContentY = ((this._scroll_verticalScrollOffset||0) + touchYInFrame) / this._scale;
|
1098
|
+
|
1099
|
+
// calculate deltas
|
1100
|
+
var deltaX = positionInContentX - touch.startTouchOffset.x,
|
1101
|
+
deltaY = positionInContentY - touch.startTouchOffset.y;
|
1102
|
+
|
1103
|
+
var isDragging = touch.dragging;
|
1104
|
+
if (!touch.scrolling.x && Math.abs(deltaX) > touch.scrollTolerance.x && touch.enableScrolling.x) {
|
1105
|
+
// say we are scrolling
|
1106
|
+
isDragging = YES;
|
1107
|
+
touch.scrolling.x = YES;
|
1108
|
+
touch.scrollTolerance.y = touch.secondaryScrollTolerance;
|
1109
|
+
|
1110
|
+
// reset position
|
1111
|
+
touch.startTouchOffset.x = touchX;
|
1112
|
+
deltaX = 0;
|
1113
|
+
}
|
1114
|
+
if (!touch.scrolling.y && Math.abs(deltaY) > touch.scrollTolerance.y && touch.enableScrolling.y) {
|
1115
|
+
// say we are scrolling
|
1116
|
+
isDragging = YES;
|
1117
|
+
touch.scrolling.y = YES;
|
1118
|
+
touch.scrollTolerance.x = touch.secondaryScrollTolerance;
|
1119
|
+
|
1120
|
+
// reset position
|
1121
|
+
touch.startTouchOffset.y = touchY;
|
1122
|
+
deltaY = 0;
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
// handle scroll start
|
1126
|
+
if (isDragging && !touch.dragging) {
|
1127
|
+
touch.dragging = YES;
|
1128
|
+
this.dragging = YES;
|
1129
|
+
this._touchScrollDidStart();
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
// calculate new offset
|
1133
|
+
if (!touch.scrolling.x && !touch.scrolling.y && !touch.canScale) return;
|
1134
|
+
if (touch.scrolling.x && !touch.scrolling.y) {
|
1135
|
+
if (deltaX > touch.scrollLock && !touch.scrolling.y) touch.enableScrolling.y = NO;
|
1136
|
+
}
|
1137
|
+
if (touch.scrolling.y && !touch.scrolling.x) {
|
1138
|
+
if (deltaY > touch.scrollLock && !touch.scrolling.x) touch.enableScrolling.x = NO;
|
1139
|
+
}
|
1140
|
+
|
1141
|
+
// handle scaling through pinch gesture
|
1142
|
+
if (touch.canScale) {
|
1143
|
+
|
1144
|
+
var startDistance = touch.startDistance, dd = distance - startDistance;
|
1145
|
+
if (Math.abs(dd) > touch.scaleTolerance) {
|
1146
|
+
touch.scrolling.y = YES; // if you scale, you can scroll.
|
1147
|
+
touch.scrolling.x = YES;
|
1148
|
+
|
1149
|
+
// we want to say something that was the startDistance away from each other should now be
|
1150
|
+
// distance away. So, if we are twice as far away as we started...
|
1151
|
+
var scale = touch.startScale * (distance / Math.max(startDistance, 50));
|
1152
|
+
|
1153
|
+
var newScale = this._adjustForEdgeResistance(scale, touch.minimumScale, touch.maximumScale, touch.resistanceCoefficient, touch.resistanceAsymptote);
|
1154
|
+
this.dragging = YES;
|
1155
|
+
this._scale = newScale;
|
1156
|
+
var newPositionInContentX = positionInContentX * this._scale,
|
1157
|
+
newPositionInContentY = positionInContentY * this._scale;
|
1158
|
+
}
|
1159
|
+
}
|
1160
|
+
|
1161
|
+
// these do exactly what they sound like. So, this comment is just to
|
1162
|
+
// block off the code a bit
|
1163
|
+
// In english, these calculate the minimum X/Y offsets
|
1164
|
+
minOffsetX = this.minimumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1165
|
+
minOffsetY = this.minimumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1166
|
+
|
1167
|
+
// and now, maximum...
|
1168
|
+
maxOffsetX = this.maximumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1169
|
+
maxOffsetY = this.maximumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1170
|
+
|
1171
|
+
|
1172
|
+
// So, the following is the completely written out algebra:
|
1173
|
+
// (offsetY + touchYInFrame) / this._scale = touch.startTouchOffsetInContent.y
|
1174
|
+
// offsetY + touchYInFrame = touch.startTouchOffsetInContent.y * this._scale;
|
1175
|
+
// offsetY = touch.startTouchOffset * this._scale - touchYInFrame
|
1176
|
+
|
1177
|
+
// and the result applied:
|
1178
|
+
offsetX = touch.startTouchOffsetInContent.x * this._scale - touchXInFrame;
|
1179
|
+
offsetY = touch.startTouchOffsetInContent.y * this._scale - touchYInFrame;
|
1180
|
+
|
1181
|
+
|
1182
|
+
// we need to adjust for edge resistance, or, if bouncing is disabled, just stop flat.
|
1183
|
+
if (touch.enableBouncing) {
|
1184
|
+
offsetX = this._adjustForEdgeResistance(offsetX, minOffsetX, maxOffsetX, touch.resistanceCoefficient, touch.resistanceAsymptote);
|
1185
|
+
offsetY = this._adjustForEdgeResistance(offsetY, minOffsetY, maxOffsetY, touch.resistanceCoefficient, touch.resistanceAsymptote);
|
1186
|
+
} else {
|
1187
|
+
offsetX = Math.max(minOffsetX, Math.min(maxOffsetX, offsetX));
|
1188
|
+
offsetY = Math.max(minOffsetY, Math.min(maxOffsetY, offsetY));
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
// and now, _if_ scrolling is enabled, set the new coordinates
|
1192
|
+
if (touch.scrolling.x) this._scroll_horizontalScrollOffset = offsetX;
|
1193
|
+
if (touch.scrolling.y) this._scroll_verticalScrollOffset = offsetY;
|
1194
|
+
|
1195
|
+
// and apply the CSS transforms.
|
1196
|
+
this._applyCSSTransforms(touch.layer);
|
1197
|
+
this._touchScrollDidChange();
|
1198
|
+
|
1199
|
+
|
1200
|
+
// now we must prepare for momentum scrolling by calculating the momentum.
|
1201
|
+
if (timeStamp - touch.lastEventTime >= 1 || touch.notCalculated) {
|
1202
|
+
touch.notCalculated = NO;
|
1203
|
+
var horizontalOffset = this._scroll_horizontalScrollOffset;
|
1204
|
+
var verticalOffset = this._scroll_verticalScrollOffset;
|
1205
|
+
|
1206
|
+
touch.scrollVelocity.x = ((horizontalOffset - touch.lastScrollOffset.x) / Math.max(1, timeStamp - touch.lastEventTime)); // in px per ms
|
1207
|
+
touch.scrollVelocity.y = ((verticalOffset - touch.lastScrollOffset.y) / Math.max(1, timeStamp - touch.lastEventTime)); // in px per ms
|
1208
|
+
touch.lastScrollOffset.x = horizontalOffset;
|
1209
|
+
touch.lastScrollOffset.y = verticalOffset;
|
1210
|
+
touch.lastEventTime = timeStamp;
|
1211
|
+
}
|
1212
|
+
},
|
1213
|
+
|
1214
|
+
touchEnd: function(touch) {
|
1215
|
+
var touchStatus = this.touch,
|
1216
|
+
avg = touch.averagedTouchesForView(this);
|
1217
|
+
|
1218
|
+
touch.scrollHasEnded = YES;
|
1219
|
+
if (avg.touchCount > 0) {
|
1220
|
+
this.beginTouchTracking(touch, NO);
|
1221
|
+
} else {
|
1222
|
+
if (this.dragging) {
|
1223
|
+
touchStatus.dragging = NO;
|
1224
|
+
|
1225
|
+
// reset last event time
|
1226
|
+
touchStatus.lastEventTime = touch.timeStamp;
|
1227
|
+
|
1228
|
+
this.startDecelerationAnimation();
|
1229
|
+
} else {
|
1230
|
+
// this part looks weird, but it is actually quite simple.
|
1231
|
+
// First, we send the touch off for capture+starting again, but telling it to return to us
|
1232
|
+
// if nothing is found or if it is released.
|
1233
|
+
touch.captureTouch(this, YES);
|
1234
|
+
|
1235
|
+
// if we went anywhere, did anything, etc., call end()
|
1236
|
+
if (touch.touchResponder && touch.touchResponder !== this) {
|
1237
|
+
touch.end();
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
// now check if it was released to us or stayed with us the whole time, or is for some
|
1241
|
+
// wacky reason empty (in which case it is ours still). If so, and there is a next responder,
|
1242
|
+
// relay to that.
|
1243
|
+
if (!touch.touchResponder || touch.touchResponder === this) {
|
1244
|
+
if (touch.nextTouchResponder) touch.makeTouchResponder(touch.nextTouchResponder);
|
1245
|
+
} else {
|
1246
|
+
// in this case, the view that captured it and changed responder should have handled
|
1247
|
+
// everything for us.
|
1248
|
+
}
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
this.tracking = NO;
|
1252
|
+
this.dragging = NO;
|
1253
|
+
}
|
1254
|
+
},
|
1255
|
+
|
1256
|
+
touchCancelled: function(touch) {
|
1257
|
+
this.beginPropertyChanges();
|
1258
|
+
this.set("scale", this._scale);
|
1259
|
+
this.set("verticalScrollOffset", this._scroll_verticalScrollOffset);
|
1260
|
+
this.set("horizontalScrollOffset", this._scroll_horizontalScrollOffset);
|
1261
|
+
this.endPropertyChanges();
|
1262
|
+
this.tracking = NO;
|
1263
|
+
|
1264
|
+
if (this.dragging) {
|
1265
|
+
this._touchScrollDidEnd();
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
this.dragging = NO;
|
1269
|
+
this.touch = null;
|
1270
|
+
},
|
1271
|
+
|
1272
|
+
startDecelerationAnimation: function(evt) {
|
1273
|
+
var touch = this.touch;
|
1274
|
+
touch.decelerationVelocity = {
|
1275
|
+
x: touch.scrollVelocity.x * 10,
|
1276
|
+
y: touch.scrollVelocity.y * 10
|
1277
|
+
};
|
1278
|
+
|
1279
|
+
this.decelerateAnimation();
|
1280
|
+
},
|
1281
|
+
|
1282
|
+
/**
|
1283
|
+
@private
|
1284
|
+
Does bounce calculations, adjusting velocity.
|
1285
|
+
|
1286
|
+
Bouncing is fun. Functions that handle it should have fun names,
|
1287
|
+
don'tcha think?
|
1288
|
+
|
1289
|
+
P.S.: should this be named "bouncityBounce" instead?
|
1290
|
+
*/
|
1291
|
+
bouncyBounce: function(velocity, value, minValue, maxValue, de, ac, additionalAcceleration) {
|
1292
|
+
// we have 4 possible paths. On a higher level, we have two leaf paths that can be applied
|
1293
|
+
// for either of two super-paths.
|
1294
|
+
//
|
1295
|
+
// The first path is if we are decelerating past an edge: in this case, this function must
|
1296
|
+
// must enhance that deceleration. In this case, our math boils down to taking the amount
|
1297
|
+
// by which we are past the edge, multiplying it by our deceleration factor, and reducing
|
1298
|
+
// velocity by that amount.
|
1299
|
+
//
|
1300
|
+
// The second path is if we are not decelerating, but are still past the edge. In this case,
|
1301
|
+
// we must start acceleration back _to_ the edge. The math here takes the distance we are from
|
1302
|
+
// the edge, multiplies by the acceleration factor, and then performs two additional things:
|
1303
|
+
// First, it speeds up the acceleration artificially with additionalAcceleration; this will
|
1304
|
+
// make the stop feel more sudden, as it will still have this additional acceleration when it reaches
|
1305
|
+
// the edge. Second, it ensures the result does not go past the final value, so we don't end up
|
1306
|
+
// bouncing back and forth all crazy-like.
|
1307
|
+
if (value < minValue) {
|
1308
|
+
if (velocity < 0) velocity = velocity + ((minValue - value) * de);
|
1309
|
+
else {
|
1310
|
+
velocity = Math.min((minValue-value) * ac + additionalAcceleration, minValue - value - 0.01);
|
1311
|
+
}
|
1312
|
+
} else if (value > maxValue) {
|
1313
|
+
if (velocity > 0) velocity = velocity - ((value - maxValue) * de);
|
1314
|
+
else {
|
1315
|
+
velocity = -Math.min((value - maxValue) * ac + additionalAcceleration, value - maxValue - 0.01);
|
1316
|
+
}
|
1317
|
+
}
|
1318
|
+
return velocity;
|
1319
|
+
},
|
1320
|
+
|
1321
|
+
decelerateAnimation: function() {
|
1322
|
+
// get a bunch of properties. They are named well, so not much explanation of what they are...
|
1323
|
+
// However, note maxOffsetX/Y takes into account the scale;
|
1324
|
+
// also, newX/Y adds in the current deceleration velocity (the deceleration velocity will
|
1325
|
+
// be changed later in this function).
|
1326
|
+
var touch = this.touch,
|
1327
|
+
scale = this._scale,
|
1328
|
+
minOffsetX = this.minimumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign")),
|
1329
|
+
minOffsetY = this.minimumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign")),
|
1330
|
+
maxOffsetX = this.maximumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign")),
|
1331
|
+
maxOffsetY = this.maximumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign")),
|
1332
|
+
|
1333
|
+
now = Date.now(),
|
1334
|
+
t = Math.max(now - touch.lastEventTime, 1),
|
1335
|
+
|
1336
|
+
newX = this._scroll_horizontalScrollOffset + touch.decelerationVelocity.x * (t/10),
|
1337
|
+
newY = this._scroll_verticalScrollOffset + touch.decelerationVelocity.y * (t/10);
|
1338
|
+
|
1339
|
+
var de = touch.decelerationFromEdge, ac = touch.accelerationToEdge;
|
1340
|
+
|
1341
|
+
// under a few circumstances, we may want to force a valid X/Y position.
|
1342
|
+
// For instance, if bouncing is disabled, or if position was okay before
|
1343
|
+
// adjusting scale.
|
1344
|
+
var forceValidXPosition = !touch.enableBouncing, forceValidYPosition = !touch.enableBouncing;
|
1345
|
+
|
1346
|
+
// determine if position was okay before adjusting scale (which we do, in
|
1347
|
+
// a lovely, animated way, for the scaled out/in too far bounce-back).
|
1348
|
+
// if the position was okay, then we are going to make sure that we keep the
|
1349
|
+
// position okay when adjusting the scale.
|
1350
|
+
//
|
1351
|
+
// Position OKness, here, referring to if the position is valid (within
|
1352
|
+
// minimum and maximum scroll offsets)
|
1353
|
+
if (newX >= minOffsetX && newX <= maxOffsetX) forceValidXPosition = YES;
|
1354
|
+
if (newY >= minOffsetY && newY <= maxOffsetY) forceValidYPosition = YES;
|
1355
|
+
|
1356
|
+
// We are going to change scale in a moment, but the position should stay the
|
1357
|
+
// same, if possible (unless it would be more jarring, as described above, in
|
1358
|
+
// the case of starting with a valid position and ending with an invalid one).
|
1359
|
+
//
|
1360
|
+
// Because we are changing the scale, we need to make the position scale-neutral.
|
1361
|
+
// we'll make it non-scale-neutral after applying scale.
|
1362
|
+
//
|
1363
|
+
// Question: might it be better to save the center position instead, so scaling
|
1364
|
+
// bounces back around the center of the screen?
|
1365
|
+
newX /= this._scale;
|
1366
|
+
newY /= this._scale;
|
1367
|
+
|
1368
|
+
// scale velocity (amount to change) starts out at 0 each time, because
|
1369
|
+
// it is calculated by how far out of bounds it is, rather than by the
|
1370
|
+
// previous such velocity.
|
1371
|
+
var sv = 0;
|
1372
|
+
|
1373
|
+
// do said calculation; we'll use the same bouncyBounce method used for everything
|
1374
|
+
// else, but our adjustor that gives a minimum amount to change by and (which, as we'll
|
1375
|
+
// discuss, is to make the stop feel slightly more like a stop), we'll leave at 0
|
1376
|
+
// (scale doesn't really need it as much; if you disagree, at least come up with
|
1377
|
+
// numbers more appropriate for scale than the ones for X/Y)
|
1378
|
+
sv = this.bouncyBounce(sv, scale, touch.minimumScale, touch.maximumScale, de, ac, 0);
|
1379
|
+
|
1380
|
+
// add the amount to scale. This is linear, rather than multiplicative. If you think
|
1381
|
+
// it should be multiplicative (or however you say that), come up with a new formula.
|
1382
|
+
this._scale = scale = scale + sv;
|
1383
|
+
|
1384
|
+
// now we can convert newX/Y back to scale-specific coordinates...
|
1385
|
+
newX *= this._scale;
|
1386
|
+
newY *= this._scale;
|
1387
|
+
|
1388
|
+
// It looks very weird if the content started in-bounds, but the scale animation
|
1389
|
+
// made it not be in bounds; it causes the position to animate snapping back, and,
|
1390
|
+
// well, it looks very weird. It is more proper to just make sure it stays in a valid
|
1391
|
+
// position. So, we'll determine the new maximum/minimum offsets, and then, if it was
|
1392
|
+
// originally a valid position, we'll adjust the new position to a valid position as well.
|
1393
|
+
|
1394
|
+
|
1395
|
+
// determine new max offset
|
1396
|
+
minOffsetX = this.minimumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1397
|
+
minOffsetY = this.minimumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1398
|
+
maxOffsetX = this.maximumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1399
|
+
maxOffsetY = this.maximumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1400
|
+
|
1401
|
+
// see if scaling messed up the X position (but ignore if 'tweren't right to begin with).
|
1402
|
+
if (forceValidXPosition && (newX < minOffsetX || newX > maxOffsetX)) {
|
1403
|
+
// Correct the position
|
1404
|
+
newX = Math.max(minOffsetX, Math.min(newX, maxOffsetX));
|
1405
|
+
|
1406
|
+
// also, make the velocity be ZERO; it is obviously not needed...
|
1407
|
+
touch.decelerationVelocity.x = 0;
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
// now the y
|
1411
|
+
if (forceValidYPosition && (newY < minOffsetY || newY > maxOffsetY)) {
|
1412
|
+
// again, correct it...
|
1413
|
+
newY = Math.max(minOffsetY, Math.min(newY, maxOffsetY));
|
1414
|
+
|
1415
|
+
// also, make the velocity be ZERO; it is obviously not needed...
|
1416
|
+
touch.decelerationVelocity.y = 0;
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
|
1420
|
+
// now that we are done modifying the position, we may update the actual scroll
|
1421
|
+
this._scroll_horizontalScrollOffset = newX;
|
1422
|
+
this._scroll_verticalScrollOffset = newY;
|
1423
|
+
|
1424
|
+
this._applyCSSTransforms(touch.layer); // <- Does what it sounds like.
|
1425
|
+
|
1426
|
+
SC.RunLoop.begin();
|
1427
|
+
this._touchScrollDidChange();
|
1428
|
+
SC.RunLoop.end();
|
1429
|
+
|
1430
|
+
// Now we have to adjust the velocities. The velocities are simple x and y numbers that
|
1431
|
+
// get added to the scroll X/Y positions each frame.
|
1432
|
+
// The default decay rate is .950 per frame. To achieve some semblance of accuracy, we
|
1433
|
+
// make it to the power of the elapsed number of frames. This is not fully accurate,
|
1434
|
+
// as this is applying the elapsed time between this frame and the previous time to
|
1435
|
+
// modify the velocity for the next frame. My mind goes blank when I try to figure out
|
1436
|
+
// a way to fix this (given that we don't want to change the velocity on the first frame),
|
1437
|
+
// and as it seems to work great as-is, I'm just leaving it.
|
1438
|
+
var decay = touch.decelerationRate;
|
1439
|
+
touch.decelerationVelocity.y *= Math.pow(decay, (t / 10));
|
1440
|
+
touch.decelerationVelocity.x *= Math.pow(decay, (t / 10));
|
1441
|
+
|
1442
|
+
// We have a bouncyBounce method that adjusts the velocity for bounce. That is, if it is
|
1443
|
+
// out of range and still going, it will slow it down. This step is decelerationFromEdge.
|
1444
|
+
// If it is not moving (or has come to a stop from decelerating), but is still out of range,
|
1445
|
+
// it will start it moving back into range (accelerationToEdge)
|
1446
|
+
// we supply de and ac as these properties.
|
1447
|
+
// The .3 artificially increases the acceleration by .3; this is actually to make the final
|
1448
|
+
// stop a bit more abrupt.
|
1449
|
+
touch.decelerationVelocity.x = this.bouncyBounce(touch.decelerationVelocity.x, newX, minOffsetX, maxOffsetX, de, ac, 0.3);
|
1450
|
+
touch.decelerationVelocity.y = this.bouncyBounce(touch.decelerationVelocity.y, newY, minOffsetY, maxOffsetY, de, ac, 0.3);
|
1451
|
+
|
1452
|
+
// if we ain't got no velocity... then we must be finished, as there is no where else to go.
|
1453
|
+
// to determine our velocity, we take the absolue value, and use that; if it is less than .01, we
|
1454
|
+
// must be done. Note that we check scale's most recent velocity, calculated above using bouncyBounce,
|
1455
|
+
// as well.
|
1456
|
+
var absXVelocity = Math.abs(touch.decelerationVelocity.x);
|
1457
|
+
var absYVelocity = Math.abs(touch.decelerationVelocity.y);
|
1458
|
+
if (absYVelocity < 0.01 && absXVelocity < 0.01 && Math.abs(sv) < 0.01) {
|
1459
|
+
// we can reset the timeout, as it will no longer be required, and we don't want to re-cancel it later.
|
1460
|
+
touch.timeout = null;
|
1461
|
+
this.touch = null;
|
1462
|
+
|
1463
|
+
// we aren't in a run loop right now (see below, where we trigger the timer)
|
1464
|
+
// so, we must start one.
|
1465
|
+
SC.RunLoop.begin();
|
1466
|
+
|
1467
|
+
// trigger scroll end
|
1468
|
+
this._touchScrollDidEnd();
|
1469
|
+
|
1470
|
+
// set the scale, vertical, and horizontal offsets to what they technically already are,
|
1471
|
+
// but don't know they are yet. This will finally update things like, say, the clipping frame.
|
1472
|
+
this.beginPropertyChanges();
|
1473
|
+
this.set("scale", this._scale);
|
1474
|
+
this.set("verticalScrollOffset", this._scroll_verticalScrollOffset);
|
1475
|
+
this.set("horizontalScrollOffset", this._scroll_horizontalScrollOffset);
|
1476
|
+
this.endPropertyChanges();
|
1477
|
+
|
1478
|
+
// and now we're done, so just end the run loop and return.
|
1479
|
+
SC.RunLoop.end();
|
1480
|
+
return;
|
1481
|
+
}
|
1482
|
+
|
1483
|
+
// We now set up the next round. We are doing this as raw as we possibly can, not touching the
|
1484
|
+
// run loop at all. This speeds up performance drastically--keep in mind, we're on comparatively
|
1485
|
+
// slow devices, here. So, we'll just make a closure, saving "this" into "self" and calling
|
1486
|
+
// 10ms later (or however long it takes). Note also that we save both the last event time
|
1487
|
+
// (so we may calculate elapsed time) and the timeout we are creating, so we may cancel it in future.
|
1488
|
+
var self = this;
|
1489
|
+
touch.lastEventTime = Date.now();
|
1490
|
+
this.touch.timeout = setTimeout(function(){
|
1491
|
+
SC.RunLoop.begin();
|
1492
|
+
self.decelerateAnimation();
|
1493
|
+
SC.RunLoop.end();
|
1494
|
+
}, 10);
|
1495
|
+
},
|
538
1496
|
|
539
1497
|
// ..........................................................
|
540
1498
|
// INTERNAL SUPPORT
|
@@ -552,14 +1510,16 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
552
1510
|
if (SC.none(view = this.containerView)) view = SC.ContainerView;
|
553
1511
|
|
554
1512
|
childViews.push(this.containerView = this.createChildView(view, {
|
555
|
-
contentView: this.contentView
|
1513
|
+
contentView: this.contentView,
|
1514
|
+
isScrollContainer: YES
|
556
1515
|
}));
|
557
1516
|
|
558
1517
|
// and replace our own contentView...
|
559
1518
|
this.contentView = this.containerView.get('contentView');
|
560
1519
|
|
561
1520
|
// create a horizontal scroller view if needed...
|
562
|
-
|
1521
|
+
view = this.get("horizontalScrollerView");
|
1522
|
+
if (view) {
|
563
1523
|
if (this.get('hasHorizontalScroller')) {
|
564
1524
|
view = this.horizontalScrollerView = this.createChildView(view, {
|
565
1525
|
layoutDirection: SC.LAYOUT_HORIZONTAL,
|
@@ -570,7 +1530,8 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
570
1530
|
}
|
571
1531
|
|
572
1532
|
// create a vertical scroller view if needed...
|
573
|
-
|
1533
|
+
view = this.get("verticalScrollerView");
|
1534
|
+
if (view) {
|
574
1535
|
if (this.get('hasVerticalScroller')) {
|
575
1536
|
view = this.verticalScrollerView = this.createChildView(view, {
|
576
1537
|
layoutDirection: SC.LAYOUT_VERTICAL,
|
@@ -614,16 +1575,25 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
614
1575
|
frame to be notified whenever it's size changes.
|
615
1576
|
*/
|
616
1577
|
contentViewDidChange: function() {
|
617
|
-
var newView = this.get('contentView'),
|
618
|
-
|
1578
|
+
var newView = this.get('contentView'),
|
1579
|
+
oldView = this._scroll_contentView,
|
1580
|
+
frameObserver = this.contentViewFrameDidChange,
|
1581
|
+
layerObserver = this.contentViewLayerDidChange;
|
1582
|
+
|
619
1583
|
if (newView !== oldView) {
|
620
1584
|
|
621
1585
|
// stop observing old content view
|
622
|
-
if (oldView)
|
1586
|
+
if (oldView) {
|
1587
|
+
oldView.removeObserver('frame', this, frameObserver);
|
1588
|
+
oldView.removeObserver('layer', this, layerObserver);
|
1589
|
+
}
|
623
1590
|
|
624
1591
|
// update cache
|
625
1592
|
this._scroll_contentView = newView;
|
626
|
-
if (newView)
|
1593
|
+
if (newView) {
|
1594
|
+
newView.addObserver('frame', this, frameObserver);
|
1595
|
+
newView.addObserver('layer', this, layerObserver);
|
1596
|
+
}
|
627
1597
|
|
628
1598
|
// replace container
|
629
1599
|
this.containerView.set('contentView', newView);
|
@@ -631,47 +1601,67 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
631
1601
|
this.contentViewFrameDidChange();
|
632
1602
|
}
|
633
1603
|
}.observes('contentView'),
|
634
|
-
|
1604
|
+
|
1605
|
+
/** @private
|
1606
|
+
If we redraw after the initial render, we need to make sure that we reset
|
1607
|
+
the scrollTop/scrollLeft properties on the content view. This ensures
|
1608
|
+
that, for example, the scroll views displays correctly when switching
|
1609
|
+
views out in a ContainerView.
|
1610
|
+
*/
|
1611
|
+
render: function(context, firstTime) {
|
1612
|
+
this.invokeLast(this.adjustElementScroll);
|
1613
|
+
if (firstTime) {
|
1614
|
+
context.push('<div class="corner"></div>');
|
1615
|
+
}
|
1616
|
+
return sc_super();
|
1617
|
+
},
|
1618
|
+
|
635
1619
|
/** @private
|
636
1620
|
Invoked whenever the contentView's frame changes. This will update the
|
637
1621
|
scroller maxmimum and optionally update the scroller visibility if the
|
638
1622
|
size of the contentView changes. We don't care about the origin since
|
639
1623
|
that is tracked separately from the offset values.
|
1624
|
+
|
1625
|
+
@param {Boolean} force (optional) Re-calculate everything even if the contentView’s frame didn’t change size
|
640
1626
|
*/
|
641
|
-
|
1627
|
+
|
642
1628
|
oldMaxHOffset: 0,
|
643
1629
|
oldMaxVOffset: 0,
|
644
|
-
|
645
|
-
contentViewFrameDidChange: function() {
|
646
|
-
|
1630
|
+
|
1631
|
+
contentViewFrameDidChange: function(force) {
|
647
1632
|
var view = this.get('contentView'),
|
648
1633
|
f = (view) ? view.get('frame') : null,
|
649
|
-
|
650
|
-
|
651
|
-
|
1634
|
+
scale = this._scale,
|
1635
|
+
width = (f) ? f.width * scale : 0,
|
1636
|
+
height = (f) ? f.height * scale : 0,
|
1637
|
+
dim, dimWidth, dimHeight;
|
652
1638
|
|
653
1639
|
// cache out scroll settings...
|
654
|
-
|
655
|
-
this._scroll_contentWidth
|
656
|
-
this._scroll_contentHeight = height
|
1640
|
+
if (!force && (width === this._scroll_contentWidth) && (height === this._scroll_contentHeight)) return ;
|
1641
|
+
this._scroll_contentWidth = width;
|
1642
|
+
this._scroll_contentHeight = height;
|
1643
|
+
|
1644
|
+
dim = this.get('frame');
|
1645
|
+
dimWidth = dim.width;
|
1646
|
+
dimHeight = dim.height;
|
657
1647
|
|
658
1648
|
if (this.get('hasHorizontalScroller') && (view = this.get('horizontalScrollerView'))) {
|
659
|
-
width -= 1 ; // accurately account for our layout
|
660
1649
|
// decide if it should be visible or not
|
661
1650
|
if (this.get('autohidesHorizontalScroller')) {
|
662
|
-
this.set('isHorizontalScrollerVisible', width >
|
1651
|
+
this.set('isHorizontalScrollerVisible', width > dimWidth);
|
663
1652
|
}
|
664
|
-
view.setIfChanged('maximum', width) ;
|
1653
|
+
view.setIfChanged('maximum', width-dimWidth) ;
|
1654
|
+
view.setIfChanged('proportion', dimWidth/width);
|
665
1655
|
}
|
666
1656
|
|
667
1657
|
if (this.get('hasVerticalScroller') && (view = this.get('verticalScrollerView'))) {
|
668
|
-
height -= 1 ; // accurately account for our layout
|
669
1658
|
// decide if it should be visible or not
|
670
1659
|
if (this.get('autohidesVerticalScroller')) {
|
671
|
-
this.set('isVerticalScrollerVisible', height >
|
1660
|
+
this.set('isVerticalScrollerVisible', height > dimHeight);
|
672
1661
|
}
|
673
1662
|
height -= this.get('verticalScrollerBottom') ;
|
674
|
-
view.setIfChanged('maximum', height) ;
|
1663
|
+
view.setIfChanged('maximum', height-dimHeight) ;
|
1664
|
+
view.setIfChanged('proportion', dimHeight/height);
|
675
1665
|
}
|
676
1666
|
|
677
1667
|
// If there is no vertical scroller and auto hiding is on, make
|
@@ -689,31 +1679,42 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
689
1679
|
|
690
1680
|
// This forces to recalculate the height of the frame when is at the bottom
|
691
1681
|
// of the scroll and the content dimension are smaller that the previous one
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
if(forceHeight || forceWidth){
|
1682
|
+
var mxVOffSet = this.get('maximumVerticalScrollOffset'),
|
1683
|
+
vOffSet = this.get('verticalScrollOffset'),
|
1684
|
+
mxHOffSet = this.get('maximumHorizontalScrollOffset'),
|
1685
|
+
hOffSet = this.get('horizontalScrollOffset'),
|
1686
|
+
forceHeight = mxVOffSet < vOffSet,
|
1687
|
+
forceWidth = mxHOffSet < hOffSet;
|
1688
|
+
if (forceHeight || forceWidth) {
|
700
1689
|
this.forceDimensionsRecalculation(forceWidth, forceHeight, vOffSet, hOffSet);
|
701
1690
|
}
|
702
1691
|
},
|
703
|
-
|
1692
|
+
|
1693
|
+
/** @private
|
1694
|
+
If our frame changes, then we need to re-calculate the visiblility of our
|
1695
|
+
scrollers, etc.
|
1696
|
+
*/
|
1697
|
+
frameDidChange: function() {
|
1698
|
+
this.contentViewFrameDidChange(YES);
|
1699
|
+
}.observes('frame'),
|
1700
|
+
|
1701
|
+
/** @private
|
1702
|
+
If the layer of the content view changes, we need to readjust the
|
1703
|
+
scrollTop and scrollLeft properties on the new DOM element.
|
1704
|
+
*/
|
1705
|
+
contentViewLayerDidChange: function() {
|
1706
|
+
// Invalidate these cached values, as they're no longer valid
|
1707
|
+
if (this._verticalScrollOffset !== 0) this._verticalScrollOffset = -1;
|
1708
|
+
if (this._horizontalScrollOffset !== 0) this._horizontalScrollOffset = -1;
|
1709
|
+
this.invokeLast(this.adjustElementScroll);
|
1710
|
+
},
|
1711
|
+
|
704
1712
|
/** @private
|
705
1713
|
Whenever the horizontal scroll offset changes, update the scrollers and
|
706
1714
|
edit the location of the contentView.
|
707
1715
|
*/
|
708
1716
|
_scroll_horizontalScrollOffsetDidChange: function() {
|
709
|
-
|
710
|
-
|
711
|
-
offset = Math.max(0,Math.min(this.get('maximumHorizontalScrollOffset'), offset)) ;
|
712
|
-
|
713
|
-
// update the offset for the contentView...
|
714
|
-
var contentView = this.get('contentView');
|
715
|
-
if (contentView) contentView.adjust('left', 0-offset);
|
716
|
-
|
1717
|
+
this.invokeLast(this.adjustElementScroll);
|
717
1718
|
}.observes('horizontalScrollOffset'),
|
718
1719
|
|
719
1720
|
/** @private
|
@@ -721,21 +1722,51 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
721
1722
|
edit the location of the contentView.
|
722
1723
|
*/
|
723
1724
|
_scroll_verticalScrollOffsetDidChange: function() {
|
724
|
-
|
725
|
-
|
726
|
-
offset = Math.max(0,Math.min(this.get('maximumVerticalScrollOffset'), offset)) ;
|
727
|
-
|
728
|
-
// update the offset for the contentView...
|
729
|
-
var contentView = this.get('contentView');
|
730
|
-
var containerView = this.get('containerView');
|
731
|
-
|
732
|
-
// Optimization when not using collections. We need to reimplement clippingFrame
|
733
|
-
// and scrolling to be able to scroll using scrolltop. For now I just
|
734
|
-
// detect if the content to scroll is a class of collectionView.
|
735
|
-
if (contentView) contentView.adjust('top', 0-offset) ;
|
736
|
-
|
1725
|
+
this.invokeLast(this.adjustElementScroll);
|
737
1726
|
}.observes('verticalScrollOffset'),
|
738
|
-
|
1727
|
+
|
1728
|
+
/** @private
|
1729
|
+
Called at the end of the run loop to actually adjust the scrollTop
|
1730
|
+
and scrollLeft properties of the container view.
|
1731
|
+
*/
|
1732
|
+
adjustElementScroll: function() {
|
1733
|
+
var container = this.get('containerView'),
|
1734
|
+
content = this.get('contentView'),
|
1735
|
+
verticalScrollOffset = this.get('verticalScrollOffset'),
|
1736
|
+
horizontalScrollOffset = this.get('horizontalScrollOffset');
|
1737
|
+
|
1738
|
+
// We notify the content view that its frame property has changed
|
1739
|
+
// before we actually update the scrollTop/scrollLeft properties.
|
1740
|
+
// This gives views that use incremental rendering a chance to render
|
1741
|
+
// newly-appearing elements before they come into view.
|
1742
|
+
if (content) {
|
1743
|
+
SC.RunLoop.begin();
|
1744
|
+
content._viewFrameDidChange();
|
1745
|
+
SC.RunLoop.end();
|
1746
|
+
|
1747
|
+
// Use accelerated drawing if the browser supports it
|
1748
|
+
if (SC.platform.touch) {
|
1749
|
+
this._applyCSSTransforms(content.get('layer'));
|
1750
|
+
}
|
1751
|
+
}
|
1752
|
+
|
1753
|
+
if (container && !SC.platform.touch) {
|
1754
|
+
container = container.$()[0];
|
1755
|
+
|
1756
|
+
if (container) {
|
1757
|
+
if (verticalScrollOffset !== this._verticalScrollOffset) {
|
1758
|
+
container.scrollTop = verticalScrollOffset;
|
1759
|
+
this._verticalScrollOffset = verticalScrollOffset;
|
1760
|
+
}
|
1761
|
+
|
1762
|
+
if (horizontalScrollOffset !== this._horizontalScrollOffset) {
|
1763
|
+
container.scrollLeft = horizontalScrollOffset;
|
1764
|
+
this._horizontalScrollOffset = horizontalScrollOffset;
|
1765
|
+
}
|
1766
|
+
}
|
1767
|
+
}
|
1768
|
+
},
|
1769
|
+
|
739
1770
|
forceDimensionsRecalculation: function (forceWidth, forceHeight, vOffSet, hOffSet) {
|
740
1771
|
var oldScrollHOffset = hOffSet;
|
741
1772
|
var oldScrollVOffset = vOffSet;
|
@@ -749,6 +1780,9 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
749
1780
|
if(!forceWidth && forceHeight){
|
750
1781
|
this.scrollTo(oldScrollHOffset ,this.get('maximumVerticalScrollOffset'));
|
751
1782
|
}
|
752
|
-
}
|
1783
|
+
},
|
1784
|
+
|
1785
|
+
_scroll_verticalScrollOffset: 0,
|
1786
|
+
_scroll_horizontalScrollOffset: 0
|
753
1787
|
|
754
1788
|
});
|