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
data/VERSION.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
:digest:
|
3
|
-
:dist:
|
4
|
-
frameworks/sproutcore: e3bbb4a88ae2bc9fa217d0cf5a24868683f6ae91
|
2
|
+
:digest: f5de13f8e3034ce3c1f0c7cdd6fc4526eb03fdb4
|
5
3
|
:major: 1
|
6
4
|
:minor: 0
|
7
|
-
:patch:
|
5
|
+
:patch: 1049.pre.1
|
6
|
+
:dist:
|
7
|
+
frameworks/sproutcore: 66c5db9756d6829d5a439b65b4e644f8350d3afc
|
data/bin/sc-server
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
config :all,
|
13
13
|
:layout => 'sproutcore:lib/index.rhtml',
|
14
14
|
:test_layout => 'sproutcore:lib/index.rhtml',
|
15
|
-
:test_required => ['sproutcore/testing'
|
15
|
+
:test_required => ['sproutcore/testing'],
|
16
16
|
:debug_required => ['sproutcore/debug', 'sproutcore/testing']
|
17
17
|
|
18
18
|
# in debug mode, combine the JS for SC by default. This will improve perf
|
@@ -28,12 +28,17 @@ end
|
|
28
28
|
config :bootstrap, :required => [], :use_modules => false
|
29
29
|
|
30
30
|
config :runtime, :required => []
|
31
|
-
config :foundation, :required => [:runtime]
|
31
|
+
config :foundation, :required => [:jquery, :runtime]
|
32
32
|
config :datastore, :required => [:runtime]
|
33
|
+
config :statechart, :required => [:runtime]
|
34
|
+
config :desktop, :required => [:foundation]
|
35
|
+
config :media, :required => [:desktop]
|
33
36
|
|
34
37
|
# APP-LEVEL FRAMEWORKS
|
35
|
-
%w(
|
36
|
-
config app_framework,
|
38
|
+
%w(mobile designer).each do |app_framework|
|
39
|
+
config app_framework,
|
40
|
+
:required => [:runtime, :datastore, :foundation],
|
41
|
+
:test_required => ["sproutcore/testing", "sproutcore/empty_theme"]
|
37
42
|
end
|
38
43
|
|
39
44
|
config :mobile,
|
@@ -42,9 +47,10 @@ config :mobile,
|
|
42
47
|
|
43
48
|
# WRAPPER FRAMEWORKS
|
44
49
|
config :designer, :required => [:runtime, :foundation]
|
45
|
-
config :sproutcore, :required => :desktop
|
50
|
+
config :sproutcore, :required => [:desktop, :datastore]
|
46
51
|
config :mini, :required => [:runtime, :datastore]
|
47
|
-
|
52
|
+
config :animation, :required => :foundation
|
53
|
+
config :forms, :required => :desktop
|
48
54
|
|
49
55
|
# SPECIAL FRAMEWORKS AND THEMES
|
50
56
|
# These do not require any of the built-in SproutCore frameworks
|
@@ -56,7 +62,7 @@ end
|
|
56
62
|
# CONFIGURE THEMES
|
57
63
|
config :empty_theme,
|
58
64
|
:theme_name => 'empty-theme',
|
59
|
-
:test_required => ['sproutcore/testing'],
|
65
|
+
:test_required => ['sproutcore/foundation', 'sproutcore/testing'],
|
60
66
|
:debug_required => ['sproutcore/debug']
|
61
67
|
|
62
68
|
config :iphone_theme,
|
@@ -71,22 +77,39 @@ config :standard_theme,
|
|
71
77
|
:test_required => ['sproutcore/testing'],
|
72
78
|
:debug_required => ['sproutcore/debug']
|
73
79
|
|
74
|
-
|
80
|
+
config :ace,
|
81
|
+
:required => :empty_theme,
|
82
|
+
:theme_name => 'sc-theme',
|
83
|
+
:test_required => ['sproutcore/testing'],
|
84
|
+
:debug_required => ['sproutcore/debug']
|
75
85
|
|
76
|
-
|
86
|
+
|
87
|
+
# CONFIGURE DOCUMENTATION
|
88
|
+
config :documentation,
|
89
|
+
:required => [:desktop, :animation]
|
90
|
+
|
91
|
+
# CONFIGURE APPS
|
92
|
+
config :core_tools, :required => [:desktop, :datastore, :animation, :forms]
|
77
93
|
|
78
94
|
# mode :debug do
|
79
95
|
# config :core_tools, :combine_javascript => false
|
80
96
|
# end
|
81
97
|
|
82
|
-
%w(tests docs welcome).each do |app_target|
|
98
|
+
%w(tests test_controls docs welcome).each do |app_target|
|
83
99
|
config app_target,
|
84
|
-
:required => [:desktop, :core_tools],
|
85
|
-
:theme => :
|
100
|
+
:required => [:desktop, :datastore, :core_tools],
|
101
|
+
:theme => :ace
|
86
102
|
|
87
103
|
# mode :debug do
|
88
104
|
# config app_target, :combine_javascript => false
|
89
105
|
# end
|
90
106
|
|
91
107
|
end
|
108
|
+
|
109
|
+
config :greenhouse,
|
110
|
+
:required => [:sproutcore, :'sproutcore/designer', :statechart],
|
111
|
+
:theme => :ace
|
112
|
+
|
113
|
+
|
114
|
+
|
92
115
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../sproutcore-abbot
|
3
|
+
specs:
|
4
|
+
sproutcore (1.0.1047)
|
5
|
+
erubis (>= 2.6.2)
|
6
|
+
extlib (>= 0.9.9)
|
7
|
+
json_pure (>= 1.1.0)
|
8
|
+
rack (>= 0.9.1)
|
9
|
+
thor (>= 0.11.7)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: http://rubygems.org/
|
13
|
+
specs:
|
14
|
+
abstract (1.0.0)
|
15
|
+
daemons (1.1.0)
|
16
|
+
erubis (2.6.6)
|
17
|
+
abstract (>= 1.0.0)
|
18
|
+
eventmachine (0.12.10)
|
19
|
+
extlib (0.9.15)
|
20
|
+
json_pure (1.4.6)
|
21
|
+
rack (1.2.1)
|
22
|
+
thin (1.2.7)
|
23
|
+
daemons (>= 1.0.9)
|
24
|
+
eventmachine (>= 0.12.6)
|
25
|
+
rack (>= 1.0.0)
|
26
|
+
thor (0.14.0)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
sproutcore!
|
33
|
+
thin
|
@@ -0,0 +1,68 @@
|
|
1
|
+
SproutCore HTML5 Application Framework
|
2
|
+
======================================
|
3
|
+
|
4
|
+
SproutCore is a framework for building blazing-fast, desktop-like applications
|
5
|
+
in the web browser using only native HTML5 features. With SproutCore, you can
|
6
|
+
build rich, interactive applications in the web in less code than most simple
|
7
|
+
web pages require today.
|
8
|
+
|
9
|
+
The easiest way to get started with SproutCore is using the Abbot build tools
|
10
|
+
included with the SproutCore package when you install it from the Ruby gem.
|
11
|
+
Please see the Get Started documentation on the SproutCore website for more
|
12
|
+
information.
|
13
|
+
|
14
|
+
http://www.sproutcore.com/
|
15
|
+
|
16
|
+
If you would like to contact the authors, you can reach the current maintainer
|
17
|
+
at <charles@sproutit.com>
|
18
|
+
|
19
|
+
## Contributors
|
20
|
+
|
21
|
+
SproutCore has been built thanks to the tireless efforts of many talented
|
22
|
+
developers. Special thanks to the following developers who contributed lots of
|
23
|
+
code and ideas:
|
24
|
+
|
25
|
+
- Alex Iskander
|
26
|
+
- Billy Kakes
|
27
|
+
- Brian Cully
|
28
|
+
- Charles Jolley
|
29
|
+
- Chris Hyle
|
30
|
+
- Colin Campbell
|
31
|
+
- Cortland Klein
|
32
|
+
- Devin Torres
|
33
|
+
- Erich Ocean
|
34
|
+
- Evin Grano
|
35
|
+
- Geoffrey Donaldson
|
36
|
+
- James Austin
|
37
|
+
- Jason Ketterman
|
38
|
+
- Jonathan Lewis
|
39
|
+
- Joshua Dickens
|
40
|
+
- Juan Pinzon
|
41
|
+
- Majd Taby
|
42
|
+
- Matthias Loitsch
|
43
|
+
- Martin Ottenwaelter
|
44
|
+
- Maurits Lamers
|
45
|
+
- Mike Ball
|
46
|
+
- Mike Subelsky
|
47
|
+
- Mohammed Ashik
|
48
|
+
- Onar Vikingstad
|
49
|
+
- Peter Bergstrom
|
50
|
+
- Peter Wagenet
|
51
|
+
- Ray Bodenhorn
|
52
|
+
- Santosh Shanboque
|
53
|
+
- Sudarshan Bhat
|
54
|
+
- Tanner Donovan
|
55
|
+
- Teresa Tsui
|
56
|
+
- Thomas Langemann
|
57
|
+
- Tom Dale
|
58
|
+
- Trek Glowacki
|
59
|
+
|
60
|
+
## Acknowledgements
|
61
|
+
|
62
|
+
SproutCore includes code from a number of different open source projects
|
63
|
+
including:
|
64
|
+
|
65
|
+
* [jQuery](http://www.jquery.com/)
|
66
|
+
* [Prototype](http://www.prototypejs.org/)
|
67
|
+
* [Datejs](http://www.datejs.com/)
|
68
|
+
* [JSON2](http://www.json.org/)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Getting Started with Greenhouse (PageDesigner)
|
2
|
+
==============================================================================
|
3
|
+
|
4
|
+
git clone git://github.com/sproutit/sproutcore-abbot.git abbot
|
5
|
+
cd abbot
|
6
|
+
mkdir frameworks
|
7
|
+
cd frameworks
|
8
|
+
git clone git://github.com/sproutit/sproutcore.git sproutcore
|
9
|
+
git checkout greenhouse
|
10
|
+
|
11
|
+
to run:
|
12
|
+
cd into/your/project
|
13
|
+
../abbot/bin/sc-server --filesystem
|
14
|
+
|
15
|
+
visit:
|
16
|
+
http://localhost:4020/sproutcore/greenhouse
|
17
|
+
|
18
|
+
|
19
|
+
Credits:
|
20
|
+
|
21
|
+
Museo Sans 500 & Italic weights - http://www.josbuivenga.demon.nl/museosans.html
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
-JS config file to store all custom files (in design/greenhouse.json or ./greenhouse.json) and load all configs of all frameworks currently required
|
2
|
+
- move all desingers into the /designer folder of their respective frameworks
|
3
|
+
- open main page if it exists
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
DEMO Punch-list:
|
11
|
+
- adding a base view to a new page [MB] @Done
|
12
|
+
- exceptions when dragging view or controller into page [MB] @Done
|
13
|
+
- cleanup dimensions of modals [EG] @Done
|
14
|
+
- finish tear-off picker panes [MB/EG] @Done
|
15
|
+
- binding value is undefined [EG/MB]
|
16
|
+
- fix add custom view event [MB] @Done
|
17
|
+
- add js beautifier [MB] @Done
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
- Inner run loop not triggering re-draw of anchor view [CJ]
|
22
|
+
- figure out location for SC meetup [MB/EG]
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
TODO for demo:
|
27
|
+
- delete views from page
|
28
|
+
v change view type inline
|
29
|
+
- List of controls/views
|
30
|
+
2. creating a mechanism to register components (add a custom view to the controls library)
|
31
|
+
v snap lines
|
32
|
+
^ add root view capability
|
33
|
+
v View hierarchy inchworm view...
|
34
|
+
- asset source list view (controllers and page files)
|
35
|
+
- routes that choose project
|
36
|
+
|
37
|
+
New UI Changes:
|
38
|
+
- move (tools) inspector to picker/tear-off menu
|
39
|
+
- update grid view to have horizontal scroll
|
40
|
+
- dock tear-off pickers to side
|
41
|
+
|
42
|
+
Done stuff...
|
43
|
+
=========================
|
44
|
+
v add a controller (or execute any sc-gen command via greenhouse) @Done
|
45
|
+
- page creation broken! @Done
|
46
|
+
^ draw lines to hook up bindings @Done
|
47
|
+
- move project file list to picker/tear-off @Done
|
48
|
+
- add design to SC.Object @Done
|
49
|
+
- move library to picker @Done
|
50
|
+
- register all pages files if in design mode @Done
|
51
|
+
- register all controllers if in design mode @Done
|
52
|
+
- grid.js this.get('scrollFrame') in insertionIndexForLocation @bug @Done
|
53
|
+
- delete views from main view @Done
|
54
|
+
- button to launch app @Done
|
55
|
+
- drag and drop views onto page @Done
|
56
|
+
- remove type from property editor and add quotes for string value @Done
|
57
|
+
- List of controls/views @Done
|
58
|
+
|1. hardcode and allow one time custom view add
|
59
|
+
- Create Page File @Done
|
60
|
+
- property editor @Done
|
61
|
+
- change project name in github @Done
|
62
|
+
- binding into iframe (use two object controllers one on either side of the frame) @Done
|
63
|
+
|hack runloop so that both run loop start and end each other
|
64
|
+
| 1. Whenever a RunLoop.begin() (begin outer, begin inner, end inner, end outer)
|
65
|
+
| 2. If iframe.RunLoop.begin() => should call the above process...
|
66
|
+
- loading up app without main (SC.suppressMain) @Done
|
67
|
+
- how much filesystem tree to load up? (keep extra junk out?) @Done
|
68
|
+
- loading up views => (hardcode, special service?) @Done
|
69
|
+
- handle panes in the designPage... @Done
|
70
|
+
- handle panes in the designPage... @Done
|
71
|
+
- blueprint github @Done
|
72
|
+
- designer folder that loads in development mode but not in prod @Done
|
@@ -0,0 +1,1058 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: Greenhouse
|
3
|
+
// ==========================================================================
|
4
|
+
/*globals Greenhouse */
|
5
|
+
/*
|
6
|
+
|
7
|
+
JS Beautifier
|
8
|
+
---------------
|
9
|
+
|
10
|
+
|
11
|
+
Written by Einar Lielmanis, <einar@jsbeautifier.org>
|
12
|
+
http://jsbeautifier.org/
|
13
|
+
|
14
|
+
Originally converted to javascript by Vital, <vital76@gmail.com>
|
15
|
+
|
16
|
+
You are free to use this in any way you want, in case you find this useful or working for you.
|
17
|
+
|
18
|
+
Usage:
|
19
|
+
js_beautify(js_source_text);
|
20
|
+
js_beautify(js_source_text, options);
|
21
|
+
|
22
|
+
The options are:
|
23
|
+
indent_size (default 4) — indentation size,
|
24
|
+
indent_char (default space) — character to indent with,
|
25
|
+
preserve_newlines (default true) — whether existing line breaks should be preserved,
|
26
|
+
indent_level (default 0) — initial indentation level, you probably won't need this ever,
|
27
|
+
|
28
|
+
space_after_anon_function (default false) — if true, then space is added between "function ()"
|
29
|
+
(jslint is happy about this); if false, then the common "function()" output is used.
|
30
|
+
braces_on_own_line (default false) - ANSI / Allman brace style, each opening/closing brace gets its own line.
|
31
|
+
|
32
|
+
e.g
|
33
|
+
|
34
|
+
js_beautify(js_source_text, {indent_size: 1, indent_char: '\t'});
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
Copyright (c) 2009 Einar Lielmanis
|
39
|
+
|
40
|
+
Permission is hereby granted, free of charge, to any person
|
41
|
+
obtaining a copy of this software and associated documentation
|
42
|
+
files (the "Software"), to deal in the Software without
|
43
|
+
restriction, including without limitation the rights to use,
|
44
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
45
|
+
copies of the Software, and to permit persons to whom the
|
46
|
+
Software is furnished to do so, subject to the following
|
47
|
+
conditions:
|
48
|
+
|
49
|
+
The above copyright notice and this permission notice shall be
|
50
|
+
included in all copies or substantial portions of the Software.
|
51
|
+
|
52
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
53
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
54
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
55
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
56
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
57
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
58
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
59
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
60
|
+
*/
|
61
|
+
function js_beautify(js_source_text, options) {
|
62
|
+
|
63
|
+
var input, output, token_text, last_type, last_text, last_last_text, last_word, flags, flag_store, indent_string;
|
64
|
+
var whitespace, wordchar, punct, parser_pos, line_starters, digits;
|
65
|
+
var prefix, token_type, do_block_just_closed;
|
66
|
+
var wanted_newline, just_added_newline, n_newlines;
|
67
|
+
|
68
|
+
|
69
|
+
// Some interpreters have unexpected results with foo = baz || bar;
|
70
|
+
options = options ? options : {};
|
71
|
+
var opt_braces_on_own_line = options.braces_on_own_line ? options.braces_on_own_line : false;
|
72
|
+
var opt_indent_size = options.indent_size ? options.indent_size : 2;
|
73
|
+
var opt_indent_char = options.indent_char ? options.indent_char : ' ';
|
74
|
+
var opt_preserve_newlines = typeof options.preserve_newlines === 'undefined' ? true : options.preserve_newlines;
|
75
|
+
var opt_indent_level = options.indent_level ? options.indent_level : 0; // starting indentation
|
76
|
+
var opt_space_after_anon_function = options.space_after_anon_function === 'undefined' ? false : options.space_after_anon_function;
|
77
|
+
var opt_keep_array_indentation = typeof options.keep_array_indentation === 'undefined' ? true : options.keep_array_indentation;
|
78
|
+
|
79
|
+
just_added_newline = false;
|
80
|
+
|
81
|
+
// cache the source's length.
|
82
|
+
var input_length = js_source_text.length;
|
83
|
+
|
84
|
+
function trim_output() {
|
85
|
+
while (output.length && (output[output.length - 1] === ' ' || output[output.length - 1] === indent_string)) {
|
86
|
+
output.pop();
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
function print_newline(ignore_repeated) {
|
91
|
+
|
92
|
+
flags.eat_next_space = false;
|
93
|
+
if (opt_keep_array_indentation && is_array(flags.mode)) {
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
|
97
|
+
ignore_repeated = typeof ignore_repeated === 'undefined' ? true : ignore_repeated;
|
98
|
+
|
99
|
+
flags.if_line = false;
|
100
|
+
trim_output();
|
101
|
+
|
102
|
+
if (!output.length) {
|
103
|
+
return; // no newline on start of file
|
104
|
+
}
|
105
|
+
|
106
|
+
if (output[output.length - 1] !== "\n" || !ignore_repeated) {
|
107
|
+
just_added_newline = true;
|
108
|
+
output.push("\n");
|
109
|
+
}
|
110
|
+
for (var i = 0; i < flags.indentation_level; i += 1) {
|
111
|
+
output.push(indent_string);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
function print_single_space() {
|
118
|
+
if (flags.eat_next_space) {
|
119
|
+
flags.eat_next_space = false;
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
var last_output = ' ';
|
123
|
+
if (output.length) {
|
124
|
+
last_output = output[output.length - 1];
|
125
|
+
}
|
126
|
+
if (last_output !== ' ' && last_output !== '\n' && last_output !== indent_string) { // prevent occassional duplicate space
|
127
|
+
output.push(' ');
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
function print_token() {
|
133
|
+
just_added_newline = false;
|
134
|
+
flags.eat_next_space = false;
|
135
|
+
output.push(token_text);
|
136
|
+
}
|
137
|
+
|
138
|
+
function indent() {
|
139
|
+
flags.indentation_level += 1;
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
function remove_indent() {
|
144
|
+
if (output.length && output[output.length - 1] === indent_string) {
|
145
|
+
output.pop();
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
function set_mode(mode) {
|
150
|
+
if (flags) {
|
151
|
+
flag_store.push(flags);
|
152
|
+
}
|
153
|
+
flags = {
|
154
|
+
mode: mode,
|
155
|
+
var_line: false,
|
156
|
+
var_line_tainted: false,
|
157
|
+
var_line_reindented: false,
|
158
|
+
in_html_comment: false,
|
159
|
+
if_line: false,
|
160
|
+
in_case: false,
|
161
|
+
eat_next_space: false,
|
162
|
+
indentation_baseline: -1,
|
163
|
+
indentation_level: (flags ? flags.indentation_level + (flags.var_line_reindented ? 1 : 0) : opt_indent_level)
|
164
|
+
};
|
165
|
+
}
|
166
|
+
|
167
|
+
function is_expression(mode) {
|
168
|
+
return mode === '[EXPRESSION]' || mode === '[INDENTED-EXPRESSION]' || mode === '(EXPRESSION)';
|
169
|
+
}
|
170
|
+
|
171
|
+
function is_array(mode) {
|
172
|
+
return mode === '[EXPRESSION]' || mode === '[INDENTED-EXPRESSION]';
|
173
|
+
}
|
174
|
+
|
175
|
+
function restore_mode() {
|
176
|
+
do_block_just_closed = flags.mode === 'DO_BLOCK';
|
177
|
+
if (flag_store.length > 0) {
|
178
|
+
flags = flag_store.pop();
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
|
183
|
+
function in_array(what, arr) {
|
184
|
+
for (var i = 0; i < arr.length; i += 1) {
|
185
|
+
if (arr[i] === what) {
|
186
|
+
return true;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
return false;
|
190
|
+
}
|
191
|
+
|
192
|
+
// Walk backwards from the colon to find a '?' (colon is part of a ternary op)
|
193
|
+
// or a '{' (colon is part of a class literal). Along the way, keep track of
|
194
|
+
// the blocks and expressions we pass so we only trigger on those chars in our
|
195
|
+
// own level, and keep track of the colons so we only trigger on the matching '?'.
|
196
|
+
|
197
|
+
|
198
|
+
function is_ternary_op() {
|
199
|
+
var level = 0,
|
200
|
+
colon_count = 0;
|
201
|
+
for (var i = output.length - 1; i >= 0; i--) {
|
202
|
+
switch (output[i]) {
|
203
|
+
case ':':
|
204
|
+
if (level === 0) {
|
205
|
+
colon_count++;
|
206
|
+
}
|
207
|
+
break;
|
208
|
+
case '?':
|
209
|
+
if (level === 0) {
|
210
|
+
if (colon_count === 0) {
|
211
|
+
return true;
|
212
|
+
} else {
|
213
|
+
colon_count--;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
break;
|
217
|
+
case '{':
|
218
|
+
if (level === 0) {
|
219
|
+
return false;
|
220
|
+
}
|
221
|
+
level--;
|
222
|
+
break;
|
223
|
+
case '(':
|
224
|
+
case '[':
|
225
|
+
level--;
|
226
|
+
break;
|
227
|
+
case ')':
|
228
|
+
case ']':
|
229
|
+
case '}':
|
230
|
+
level++;
|
231
|
+
break;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
function get_next_token() {
|
237
|
+
n_newlines = 0;
|
238
|
+
|
239
|
+
if (parser_pos >= input_length) {
|
240
|
+
return ['', 'TK_EOF'];
|
241
|
+
}
|
242
|
+
|
243
|
+
wanted_newline = false;
|
244
|
+
|
245
|
+
var c = input.charAt(parser_pos);
|
246
|
+
parser_pos += 1;
|
247
|
+
|
248
|
+
|
249
|
+
var keep_whitespace = opt_keep_array_indentation && is_array(flags.mode);
|
250
|
+
|
251
|
+
if (keep_whitespace) {
|
252
|
+
|
253
|
+
//
|
254
|
+
// slight mess to allow nice preservation of array indentation and reindent that correctly
|
255
|
+
// first time when we get to the arrays:
|
256
|
+
// var a = [
|
257
|
+
// ....'something'
|
258
|
+
// we make note of whitespace_count = 4 into flags.indentation_baseline
|
259
|
+
// so we know that 4 whitespaces in original source match indent_level of reindented source
|
260
|
+
//
|
261
|
+
// and afterwards, when we get to
|
262
|
+
// 'something,
|
263
|
+
// .......'something else'
|
264
|
+
// we know that this should be indented to indent_level + (7 - indentation_baseline) spaces
|
265
|
+
//
|
266
|
+
var whitespace_count = 0;
|
267
|
+
|
268
|
+
while (in_array(c, whitespace)) {
|
269
|
+
|
270
|
+
if (c === "\n") {
|
271
|
+
trim_output();
|
272
|
+
output.push("\n");
|
273
|
+
just_added_newline = true;
|
274
|
+
whitespace_count = 0;
|
275
|
+
} else {
|
276
|
+
if (c === '\t') {
|
277
|
+
whitespace_count += 4;
|
278
|
+
} else {
|
279
|
+
whitespace_count += 1;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
if (parser_pos >= input_length) {
|
284
|
+
return ['', 'TK_EOF'];
|
285
|
+
}
|
286
|
+
|
287
|
+
c = input.charAt(parser_pos);
|
288
|
+
parser_pos += 1;
|
289
|
+
|
290
|
+
}
|
291
|
+
if (flags.indentation_baseline === -1) {
|
292
|
+
flags.indentation_baseline = whitespace_count;
|
293
|
+
}
|
294
|
+
|
295
|
+
if (just_added_newline) {
|
296
|
+
for (var i = 0; i < flags.indentation_level + 1; i += 1) {
|
297
|
+
output.push(indent_string);
|
298
|
+
}
|
299
|
+
if (flags.indentation_baseline !== -1) {
|
300
|
+
for (var i = 0; i < whitespace_count - flags.indentation_baseline; i++) {
|
301
|
+
output.push(' ');
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
} else {
|
307
|
+
while (in_array(c, whitespace)) {
|
308
|
+
|
309
|
+
if (c === "\n") {
|
310
|
+
n_newlines += 1;
|
311
|
+
}
|
312
|
+
|
313
|
+
|
314
|
+
if (parser_pos >= input_length) {
|
315
|
+
return ['', 'TK_EOF'];
|
316
|
+
}
|
317
|
+
|
318
|
+
c = input.charAt(parser_pos);
|
319
|
+
parser_pos += 1;
|
320
|
+
|
321
|
+
}
|
322
|
+
|
323
|
+
if (opt_preserve_newlines) {
|
324
|
+
if (n_newlines > 1) {
|
325
|
+
for (var i = 0; i < n_newlines; i += 1) {
|
326
|
+
print_newline(i === 0);
|
327
|
+
just_added_newline = true;
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|
331
|
+
wanted_newline = n_newlines > 0;
|
332
|
+
}
|
333
|
+
|
334
|
+
|
335
|
+
if (in_array(c, wordchar)) {
|
336
|
+
if (parser_pos < input_length) {
|
337
|
+
while (in_array(input.charAt(parser_pos), wordchar)) {
|
338
|
+
c += input.charAt(parser_pos);
|
339
|
+
parser_pos += 1;
|
340
|
+
if (parser_pos === input_length) {
|
341
|
+
break;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
|
346
|
+
// small and surprisingly unugly hack for 1E-10 representation
|
347
|
+
if (parser_pos !== input_length && c.match(/^[0-9]+[Ee]$/) && (input.charAt(parser_pos) === '-' || input.charAt(parser_pos) === '+')) {
|
348
|
+
|
349
|
+
var sign = input.charAt(parser_pos);
|
350
|
+
parser_pos += 1;
|
351
|
+
|
352
|
+
var t = get_next_token(parser_pos);
|
353
|
+
c += sign + t[0];
|
354
|
+
return [c, 'TK_WORD'];
|
355
|
+
}
|
356
|
+
|
357
|
+
if (c === 'in') { // hack for 'in' operator
|
358
|
+
return [c, 'TK_OPERATOR'];
|
359
|
+
}
|
360
|
+
if (wanted_newline && last_type !== 'TK_OPERATOR' && !flags.if_line && (opt_preserve_newlines || last_text !== 'var')) {
|
361
|
+
print_newline();
|
362
|
+
}
|
363
|
+
return [c, 'TK_WORD'];
|
364
|
+
}
|
365
|
+
|
366
|
+
if (c === '(' || c === '[') {
|
367
|
+
return [c, 'TK_START_EXPR'];
|
368
|
+
}
|
369
|
+
|
370
|
+
if (c === ')' || c === ']') {
|
371
|
+
return [c, 'TK_END_EXPR'];
|
372
|
+
}
|
373
|
+
|
374
|
+
if (c === '{') {
|
375
|
+
return [c, 'TK_START_BLOCK'];
|
376
|
+
}
|
377
|
+
|
378
|
+
if (c === '}') {
|
379
|
+
return [c, 'TK_END_BLOCK'];
|
380
|
+
}
|
381
|
+
|
382
|
+
if (c === ';') {
|
383
|
+
return [c, 'TK_SEMICOLON'];
|
384
|
+
}
|
385
|
+
|
386
|
+
if (c === '/') {
|
387
|
+
var comment = '';
|
388
|
+
// peek for comment /* ... */
|
389
|
+
var inline_comment = true;
|
390
|
+
if (input.charAt(parser_pos) === '*') {
|
391
|
+
parser_pos += 1;
|
392
|
+
if (parser_pos < input_length) {
|
393
|
+
while (! (input.charAt(parser_pos) === '*' && input.charAt(parser_pos + 1) && input.charAt(parser_pos + 1) === '/') && parser_pos < input_length) {
|
394
|
+
c = input.charAt(parser_pos);
|
395
|
+
comment += c;
|
396
|
+
if (c === '\x0d' || c === '\x0a') {
|
397
|
+
inline_comment = false;
|
398
|
+
}
|
399
|
+
parser_pos += 1;
|
400
|
+
if (parser_pos >= input_length) {
|
401
|
+
break;
|
402
|
+
}
|
403
|
+
}
|
404
|
+
}
|
405
|
+
parser_pos += 2;
|
406
|
+
if (inline_comment) {
|
407
|
+
return ['/*' + comment + '*/', 'TK_INLINE_COMMENT'];
|
408
|
+
} else {
|
409
|
+
return ['/*' + comment + '*/', 'TK_BLOCK_COMMENT'];
|
410
|
+
}
|
411
|
+
}
|
412
|
+
// peek for comment // ...
|
413
|
+
if (input.charAt(parser_pos) === '/') {
|
414
|
+
comment = c;
|
415
|
+
while (input.charAt(parser_pos) !== "\x0d" && input.charAt(parser_pos) !== "\x0a") {
|
416
|
+
comment += input.charAt(parser_pos);
|
417
|
+
parser_pos += 1;
|
418
|
+
if (parser_pos >= input_length) {
|
419
|
+
break;
|
420
|
+
}
|
421
|
+
}
|
422
|
+
parser_pos += 1;
|
423
|
+
if (wanted_newline) {
|
424
|
+
print_newline();
|
425
|
+
}
|
426
|
+
return [comment, 'TK_COMMENT'];
|
427
|
+
}
|
428
|
+
|
429
|
+
}
|
430
|
+
|
431
|
+
if (c === "'" || // string
|
432
|
+
c === '"' || // string
|
433
|
+
(c === '/' && ((last_type === 'TK_WORD' && in_array(last_text, ['return', 'do'])) || (last_type === 'TK_START_EXPR' || last_type === 'TK_START_BLOCK' || last_type === 'TK_END_BLOCK' || last_type === 'TK_OPERATOR' || last_type === 'TK_EQUALS' || last_type === 'TK_EOF' || last_type === 'TK_SEMICOLON')))) { // regexp
|
434
|
+
var sep = c;
|
435
|
+
var esc = false;
|
436
|
+
var resulting_string = c;
|
437
|
+
|
438
|
+
if (parser_pos < input_length) {
|
439
|
+
if (sep === '/') {
|
440
|
+
//
|
441
|
+
// handle regexp separately...
|
442
|
+
//
|
443
|
+
var in_char_class = false;
|
444
|
+
while (esc || in_char_class || input.charAt(parser_pos) !== sep) {
|
445
|
+
resulting_string += input.charAt(parser_pos);
|
446
|
+
if (!esc) {
|
447
|
+
esc = input.charAt(parser_pos) === '\\';
|
448
|
+
if (input.charAt(parser_pos) === '[') {
|
449
|
+
in_char_class = true;
|
450
|
+
} else if (input.charAt(parser_pos) === ']') {
|
451
|
+
in_char_class = false;
|
452
|
+
}
|
453
|
+
} else {
|
454
|
+
esc = false;
|
455
|
+
}
|
456
|
+
parser_pos += 1;
|
457
|
+
if (parser_pos >= input_length) {
|
458
|
+
// incomplete string/rexp when end-of-file reached.
|
459
|
+
// bail out with what had been received so far.
|
460
|
+
return [resulting_string, 'TK_STRING'];
|
461
|
+
}
|
462
|
+
}
|
463
|
+
|
464
|
+
} else {
|
465
|
+
//
|
466
|
+
// and handle string also separately
|
467
|
+
//
|
468
|
+
while (esc || input.charAt(parser_pos) !== sep) {
|
469
|
+
resulting_string += input.charAt(parser_pos);
|
470
|
+
if (!esc) {
|
471
|
+
esc = input.charAt(parser_pos) === '\\';
|
472
|
+
} else {
|
473
|
+
esc = false;
|
474
|
+
}
|
475
|
+
parser_pos += 1;
|
476
|
+
if (parser_pos >= input_length) {
|
477
|
+
// incomplete string/rexp when end-of-file reached.
|
478
|
+
// bail out with what had been received so far.
|
479
|
+
return [resulting_string, 'TK_STRING'];
|
480
|
+
}
|
481
|
+
}
|
482
|
+
}
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
}
|
487
|
+
|
488
|
+
parser_pos += 1;
|
489
|
+
|
490
|
+
resulting_string += sep;
|
491
|
+
|
492
|
+
if (sep === '/') {
|
493
|
+
// regexps may have modifiers /regexp/MOD , so fetch those, too
|
494
|
+
while (parser_pos < input_length && in_array(input.charAt(parser_pos), wordchar)) {
|
495
|
+
resulting_string += input.charAt(parser_pos);
|
496
|
+
parser_pos += 1;
|
497
|
+
}
|
498
|
+
}
|
499
|
+
return [resulting_string, 'TK_STRING'];
|
500
|
+
}
|
501
|
+
|
502
|
+
if (c === '#') {
|
503
|
+
// Spidermonkey-specific sharp variables for circular references
|
504
|
+
// https://developer.mozilla.org/En/Sharp_variables_in_JavaScript
|
505
|
+
// http://mxr.mozilla.org/mozilla-central/source/js/src/jsscan.cpp around line 1935
|
506
|
+
var sharp = '#';
|
507
|
+
if (parser_pos < input_length && in_array(input.charAt(parser_pos), digits)) {
|
508
|
+
do {
|
509
|
+
c = input.charAt(parser_pos);
|
510
|
+
sharp += c;
|
511
|
+
parser_pos += 1;
|
512
|
+
} while (parser_pos < input_length && c !== '#' && c !== '=');
|
513
|
+
if (c === '#') {
|
514
|
+
//
|
515
|
+
} else if (input.charAt(parser_pos) == '[' && input.charAt(parser_pos + 1) === ']') {
|
516
|
+
sharp += '[]';
|
517
|
+
parser_pos += 2;
|
518
|
+
} else if (input.charAt(parser_pos) == '{' && input.charAt(parser_pos + 1) === '}') {
|
519
|
+
sharp += '{}';
|
520
|
+
parser_pos += 2;
|
521
|
+
}
|
522
|
+
return [sharp, 'TK_WORD'];
|
523
|
+
}
|
524
|
+
}
|
525
|
+
|
526
|
+
if (c === '<' && input.substring(parser_pos - 1, parser_pos + 3) === '<!--') {
|
527
|
+
parser_pos += 3;
|
528
|
+
flags.in_html_comment = true;
|
529
|
+
return ['<!--', 'TK_COMMENT'];
|
530
|
+
}
|
531
|
+
|
532
|
+
if (c === '-' && flags.in_html_comment && input.substring(parser_pos - 1, parser_pos + 2) === '-->') {
|
533
|
+
flags.in_html_comment = false;
|
534
|
+
parser_pos += 2;
|
535
|
+
if (wanted_newline) {
|
536
|
+
print_newline();
|
537
|
+
}
|
538
|
+
return ['-->', 'TK_COMMENT'];
|
539
|
+
}
|
540
|
+
|
541
|
+
if (in_array(c, punct)) {
|
542
|
+
while (parser_pos < input_length && in_array(c + input.charAt(parser_pos), punct)) {
|
543
|
+
c += input.charAt(parser_pos);
|
544
|
+
parser_pos += 1;
|
545
|
+
if (parser_pos >= input_length) {
|
546
|
+
break;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
if (c === '=') {
|
551
|
+
return [c, 'TK_EQUALS'];
|
552
|
+
} else {
|
553
|
+
return [c, 'TK_OPERATOR'];
|
554
|
+
}
|
555
|
+
}
|
556
|
+
|
557
|
+
return [c, 'TK_UNKNOWN'];
|
558
|
+
}
|
559
|
+
|
560
|
+
//----------------------------------
|
561
|
+
indent_string = '';
|
562
|
+
while (opt_indent_size > 0) {
|
563
|
+
indent_string += opt_indent_char;
|
564
|
+
opt_indent_size -= 1;
|
565
|
+
}
|
566
|
+
|
567
|
+
input = js_source_text;
|
568
|
+
|
569
|
+
last_word = ''; // last 'TK_WORD' passed
|
570
|
+
last_type = 'TK_START_EXPR'; // last token type
|
571
|
+
last_text = ''; // last token text
|
572
|
+
last_last_text = ''; // pre-last token text
|
573
|
+
output = [];
|
574
|
+
|
575
|
+
do_block_just_closed = false;
|
576
|
+
|
577
|
+
whitespace = "\n\r\t ".split('');
|
578
|
+
wordchar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'.split('');
|
579
|
+
digits = '0123456789'.split('');
|
580
|
+
|
581
|
+
punct = '+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::'.split(' ');
|
582
|
+
|
583
|
+
// words which should always start on new line.
|
584
|
+
line_starters = 'continue,try,throw,return,var,if,switch,case,default,for,while,break,function'.split(',');
|
585
|
+
|
586
|
+
// states showing if we are currently in expression (i.e. "if" case) - 'EXPRESSION', or in usual block (like, procedure), 'BLOCK'.
|
587
|
+
// some formatting depends on that.
|
588
|
+
flag_store = [];
|
589
|
+
set_mode('BLOCK');
|
590
|
+
|
591
|
+
parser_pos = 0;
|
592
|
+
while (true) {
|
593
|
+
var t = get_next_token(parser_pos);
|
594
|
+
token_text = t[0];
|
595
|
+
token_type = t[1];
|
596
|
+
if (token_type === 'TK_EOF') {
|
597
|
+
break;
|
598
|
+
}
|
599
|
+
|
600
|
+
switch (token_type) {
|
601
|
+
|
602
|
+
case 'TK_START_EXPR':
|
603
|
+
|
604
|
+
if (token_text === '[') {
|
605
|
+
|
606
|
+
if (last_type === 'TK_WORD' || last_text === ')') {
|
607
|
+
// this is array index specifier, break immediately
|
608
|
+
// a[x], fn()[x]
|
609
|
+
if (in_array(last_text, line_starters)) {
|
610
|
+
print_single_space();
|
611
|
+
}
|
612
|
+
set_mode('(EXPRESSION)');
|
613
|
+
print_token();
|
614
|
+
break;
|
615
|
+
}
|
616
|
+
|
617
|
+
if (flags.mode === '[EXPRESSION]' || flags.mode === '[INDENTED-EXPRESSION]') {
|
618
|
+
if (last_last_text === ']' && last_text === ',') {
|
619
|
+
// ], [ goes to new line
|
620
|
+
if (flags.mode === '[EXPRESSION]') {
|
621
|
+
flags.mode = '[INDENTED-EXPRESSION]';
|
622
|
+
if (!opt_keep_array_indentation) {
|
623
|
+
indent();
|
624
|
+
}
|
625
|
+
}
|
626
|
+
set_mode('[EXPRESSION]');
|
627
|
+
if (!opt_keep_array_indentation) {
|
628
|
+
print_newline();
|
629
|
+
}
|
630
|
+
} else if (last_text === '[') {
|
631
|
+
if (flags.mode === '[EXPRESSION]') {
|
632
|
+
flags.mode = '[INDENTED-EXPRESSION]';
|
633
|
+
if (!opt_keep_array_indentation) {
|
634
|
+
indent();
|
635
|
+
}
|
636
|
+
}
|
637
|
+
set_mode('[EXPRESSION]');
|
638
|
+
|
639
|
+
if (!opt_keep_array_indentation) {
|
640
|
+
print_newline();
|
641
|
+
}
|
642
|
+
} else {
|
643
|
+
set_mode('[EXPRESSION]');
|
644
|
+
}
|
645
|
+
} else {
|
646
|
+
set_mode('[EXPRESSION]');
|
647
|
+
}
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
} else {
|
652
|
+
set_mode('(EXPRESSION)');
|
653
|
+
}
|
654
|
+
|
655
|
+
if (last_text === ';' || last_type === 'TK_START_BLOCK') {
|
656
|
+
print_newline();
|
657
|
+
} else if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK') {
|
658
|
+
// do nothing on (( and )( and ][ and ]( ..
|
659
|
+
} else if (last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') {
|
660
|
+
print_single_space();
|
661
|
+
} else if (last_word === 'function') {
|
662
|
+
// function() vs function ()
|
663
|
+
if (opt_space_after_anon_function) {
|
664
|
+
print_single_space();
|
665
|
+
}
|
666
|
+
} else if (in_array(last_text, line_starters) || last_text === 'catch') {
|
667
|
+
print_single_space();
|
668
|
+
}
|
669
|
+
print_token();
|
670
|
+
|
671
|
+
break;
|
672
|
+
|
673
|
+
case 'TK_END_EXPR':
|
674
|
+
if (token_text === ']') {
|
675
|
+
if (opt_keep_array_indentation) {
|
676
|
+
if (last_text === '}') {
|
677
|
+
// trim_output();
|
678
|
+
// print_newline(true);
|
679
|
+
remove_indent();
|
680
|
+
print_token();
|
681
|
+
restore_mode();
|
682
|
+
break;
|
683
|
+
}
|
684
|
+
} else {
|
685
|
+
if (flags.mode === '[INDENTED-EXPRESSION]') {
|
686
|
+
if (last_text === ']') {
|
687
|
+
restore_mode();
|
688
|
+
print_newline();
|
689
|
+
print_token();
|
690
|
+
break;
|
691
|
+
}
|
692
|
+
}
|
693
|
+
}
|
694
|
+
}
|
695
|
+
restore_mode();
|
696
|
+
print_token();
|
697
|
+
break;
|
698
|
+
|
699
|
+
case 'TK_START_BLOCK':
|
700
|
+
|
701
|
+
if (last_word === 'do') {
|
702
|
+
set_mode('DO_BLOCK');
|
703
|
+
} else {
|
704
|
+
set_mode('BLOCK');
|
705
|
+
}
|
706
|
+
if (opt_braces_on_own_line) {
|
707
|
+
if (last_type !== 'TK_OPERATOR') {
|
708
|
+
print_newline(true);
|
709
|
+
}
|
710
|
+
print_token();
|
711
|
+
indent();
|
712
|
+
} else {
|
713
|
+
if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') {
|
714
|
+
if (last_type === 'TK_START_BLOCK') {
|
715
|
+
print_newline();
|
716
|
+
} else {
|
717
|
+
print_single_space();
|
718
|
+
}
|
719
|
+
}
|
720
|
+
indent();
|
721
|
+
print_token();
|
722
|
+
}
|
723
|
+
|
724
|
+
break;
|
725
|
+
|
726
|
+
case 'TK_END_BLOCK':
|
727
|
+
restore_mode();
|
728
|
+
if (opt_braces_on_own_line) {
|
729
|
+
print_newline();
|
730
|
+
if (flags.var_line_reindented) {
|
731
|
+
output.push(indent_string);
|
732
|
+
}
|
733
|
+
print_token();
|
734
|
+
} else {
|
735
|
+
if (last_type === 'TK_START_BLOCK') {
|
736
|
+
// nothing
|
737
|
+
if (just_added_newline) {
|
738
|
+
remove_indent();
|
739
|
+
} else {
|
740
|
+
// {}
|
741
|
+
trim_output();
|
742
|
+
}
|
743
|
+
} else {
|
744
|
+
print_newline();
|
745
|
+
if (flags.var_line_reindented) {
|
746
|
+
output.push(indent_string);
|
747
|
+
}
|
748
|
+
}
|
749
|
+
print_token();
|
750
|
+
}
|
751
|
+
break;
|
752
|
+
|
753
|
+
case 'TK_WORD':
|
754
|
+
|
755
|
+
// no, it's not you. even I have problems understanding how this works
|
756
|
+
// and what does what.
|
757
|
+
if (do_block_just_closed) {
|
758
|
+
// do {} ## while ()
|
759
|
+
print_single_space();
|
760
|
+
print_token();
|
761
|
+
print_single_space();
|
762
|
+
do_block_just_closed = false;
|
763
|
+
break;
|
764
|
+
}
|
765
|
+
|
766
|
+
if (token_text === 'function') {
|
767
|
+
if ((just_added_newline || last_text == ';') && last_text !== '{') {
|
768
|
+
// make sure there is a nice clean space of at least one blank line
|
769
|
+
// before a new function definition
|
770
|
+
n_newlines = just_added_newline ? n_newlines : 0;
|
771
|
+
|
772
|
+
for (var i = 0; i < 2 - n_newlines; i++) {
|
773
|
+
print_newline(false);
|
774
|
+
}
|
775
|
+
|
776
|
+
}
|
777
|
+
}
|
778
|
+
if (token_text === 'case' || token_text === 'default') {
|
779
|
+
if (last_text === ':') {
|
780
|
+
// switch cases following one another
|
781
|
+
remove_indent();
|
782
|
+
} else {
|
783
|
+
// case statement starts in the same line where switch
|
784
|
+
flags.indentation_level--;
|
785
|
+
print_newline();
|
786
|
+
flags.indentation_level++;
|
787
|
+
}
|
788
|
+
print_token();
|
789
|
+
flags.in_case = true;
|
790
|
+
break;
|
791
|
+
}
|
792
|
+
|
793
|
+
prefix = 'NONE';
|
794
|
+
|
795
|
+
if (last_type === 'TK_END_BLOCK') {
|
796
|
+
if (!in_array(token_text.toLowerCase(), ['else', 'catch', 'finally'])) {
|
797
|
+
prefix = 'NEWLINE';
|
798
|
+
} else {
|
799
|
+
if (opt_braces_on_own_line) {
|
800
|
+
prefix = 'NEWLINE';
|
801
|
+
} else {
|
802
|
+
prefix = 'SPACE';
|
803
|
+
print_single_space();
|
804
|
+
}
|
805
|
+
}
|
806
|
+
} else if (last_type === 'TK_SEMICOLON' && (flags.mode === 'BLOCK' || flags.mode === 'DO_BLOCK')) {
|
807
|
+
prefix = 'NEWLINE';
|
808
|
+
} else if (last_type === 'TK_SEMICOLON' && is_expression(flags.mode)) {
|
809
|
+
prefix = 'SPACE';
|
810
|
+
} else if (last_type === 'TK_STRING') {
|
811
|
+
prefix = 'NEWLINE';
|
812
|
+
} else if (last_type === 'TK_WORD') {
|
813
|
+
prefix = 'SPACE';
|
814
|
+
} else if (last_type === 'TK_START_BLOCK') {
|
815
|
+
prefix = 'NEWLINE';
|
816
|
+
} else if (last_type === 'TK_END_EXPR') {
|
817
|
+
print_single_space();
|
818
|
+
prefix = 'NEWLINE';
|
819
|
+
}
|
820
|
+
|
821
|
+
if (last_type !== 'TK_END_BLOCK' && in_array(token_text.toLowerCase(), ['else', 'catch', 'finally'])) {
|
822
|
+
print_newline();
|
823
|
+
} else if (in_array(token_text, line_starters) || prefix === 'NEWLINE') {
|
824
|
+
if (last_text === 'else') {
|
825
|
+
// no need to force newline on else break
|
826
|
+
print_single_space();
|
827
|
+
} else if ((last_type === 'TK_START_EXPR' || last_text === '=' || last_text === ',') && token_text === 'function') {
|
828
|
+
// no need to force newline on 'function': (function
|
829
|
+
// DONOTHING
|
830
|
+
} else if (last_text === 'return' || last_text === 'throw') {
|
831
|
+
// no newline between 'return nnn'
|
832
|
+
print_single_space();
|
833
|
+
} else if (last_type !== 'TK_END_EXPR') {
|
834
|
+
if ((last_type !== 'TK_START_EXPR' || token_text !== 'var') && last_text !== ':') {
|
835
|
+
// no need to force newline on 'var': for (var x = 0...)
|
836
|
+
if (token_text === 'if' && last_word === 'else' && last_text !== '{') {
|
837
|
+
// no newline for } else if {
|
838
|
+
print_single_space();
|
839
|
+
} else {
|
840
|
+
print_newline();
|
841
|
+
}
|
842
|
+
}
|
843
|
+
} else {
|
844
|
+
if (in_array(token_text, line_starters) && last_text !== ')') {
|
845
|
+
print_newline();
|
846
|
+
}
|
847
|
+
}
|
848
|
+
} else if (prefix === 'SPACE') {
|
849
|
+
print_single_space();
|
850
|
+
}
|
851
|
+
print_token();
|
852
|
+
last_word = token_text;
|
853
|
+
|
854
|
+
if (token_text === 'var') {
|
855
|
+
flags.var_line = true;
|
856
|
+
flags.var_line_tainted = false;
|
857
|
+
}
|
858
|
+
|
859
|
+
if (token_text === 'if' || token_text === 'else') {
|
860
|
+
flags.if_line = true;
|
861
|
+
}
|
862
|
+
|
863
|
+
break;
|
864
|
+
|
865
|
+
case 'TK_SEMICOLON':
|
866
|
+
|
867
|
+
print_token();
|
868
|
+
flags.var_line = false;
|
869
|
+
break;
|
870
|
+
|
871
|
+
case 'TK_STRING':
|
872
|
+
|
873
|
+
if (last_type === 'TK_START_BLOCK' || last_type === 'TK_END_BLOCK' || last_type === 'TK_SEMICOLON') {
|
874
|
+
print_newline();
|
875
|
+
} else if (last_type === 'TK_WORD') {
|
876
|
+
print_single_space();
|
877
|
+
}
|
878
|
+
print_token();
|
879
|
+
break;
|
880
|
+
|
881
|
+
case 'TK_EQUALS':
|
882
|
+
if (flags.var_line) {
|
883
|
+
// just got an '=' in a var-line, different formatting/line-breaking, etc will now be done
|
884
|
+
flags.var_line_tainted = true;
|
885
|
+
}
|
886
|
+
print_single_space();
|
887
|
+
print_token();
|
888
|
+
print_single_space();
|
889
|
+
break;
|
890
|
+
|
891
|
+
case 'TK_OPERATOR':
|
892
|
+
|
893
|
+
var space_before = true;
|
894
|
+
var space_after = true;
|
895
|
+
|
896
|
+
if (flags.var_line && token_text === ',' && (is_expression(flags.mode))) {
|
897
|
+
// do not break on comma, for(var a = 1, b = 2)
|
898
|
+
flags.var_line_tainted = false;
|
899
|
+
}
|
900
|
+
|
901
|
+
if (flags.var_line) {
|
902
|
+
if (token_text === ',') {
|
903
|
+
if (flags.var_line_tainted) {
|
904
|
+
print_token();
|
905
|
+
print_newline();
|
906
|
+
output.push(indent_string);
|
907
|
+
flags.var_line_reindented = true;
|
908
|
+
flags.var_line_tainted = false;
|
909
|
+
break;
|
910
|
+
} else {
|
911
|
+
flags.var_line_tainted = false;
|
912
|
+
}
|
913
|
+
// } else if (token_text === ':') {
|
914
|
+
// hmm, when does this happen? tests don't catch this
|
915
|
+
// flags.var_line = false;
|
916
|
+
}
|
917
|
+
}
|
918
|
+
|
919
|
+
if (last_text === 'return' || last_text === 'throw') {
|
920
|
+
// "return" had a special handling in TK_WORD. Now we need to return the favor
|
921
|
+
print_single_space();
|
922
|
+
print_token();
|
923
|
+
break;
|
924
|
+
}
|
925
|
+
|
926
|
+
if (token_text === ':' && flags.in_case) {
|
927
|
+
print_token(); // colon really asks for separate treatment
|
928
|
+
print_newline();
|
929
|
+
flags.in_case = false;
|
930
|
+
break;
|
931
|
+
}
|
932
|
+
|
933
|
+
if (token_text === '::') {
|
934
|
+
// no spaces around exotic namespacing syntax operator
|
935
|
+
print_token();
|
936
|
+
break;
|
937
|
+
}
|
938
|
+
|
939
|
+
if (token_text === ',') {
|
940
|
+
if (flags.var_line) {
|
941
|
+
if (flags.var_line_tainted) {
|
942
|
+
print_token();
|
943
|
+
print_newline();
|
944
|
+
flags.var_line_tainted = false;
|
945
|
+
} else {
|
946
|
+
print_token();
|
947
|
+
print_single_space();
|
948
|
+
}
|
949
|
+
} else if (last_type === 'TK_END_BLOCK' && flags.mode !== "(EXPRESSION)") {
|
950
|
+
print_token();
|
951
|
+
print_newline();
|
952
|
+
} else {
|
953
|
+
if (flags.mode === 'BLOCK') {
|
954
|
+
print_token();
|
955
|
+
print_newline();
|
956
|
+
} else {
|
957
|
+
// EXPR or DO_BLOCK
|
958
|
+
print_token();
|
959
|
+
print_single_space();
|
960
|
+
}
|
961
|
+
}
|
962
|
+
break;
|
963
|
+
// } else if (in_array(token_text, ['--', '++', '!']) || (in_array(token_text, ['-', '+']) && (in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS']) || in_array(last_text, line_starters) || in_array(last_text, ['==', '!=', '+=', '-=', '*=', '/=', '+', '-'])))) {
|
964
|
+
} else if (in_array(token_text, ['--', '++', '!']) || (in_array(token_text, ['-', '+']) && (in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) || in_array(last_text, line_starters)))) {
|
965
|
+
// unary operators (and binary +/- pretending to be unary) special cases
|
966
|
+
|
967
|
+
space_before = false;
|
968
|
+
space_after = false;
|
969
|
+
|
970
|
+
if (last_text === ';' && is_expression(flags.mode)) {
|
971
|
+
// for (;; ++i)
|
972
|
+
// ^^^
|
973
|
+
space_before = true;
|
974
|
+
}
|
975
|
+
if (last_type === 'TK_WORD' && in_array(last_text, line_starters)) {
|
976
|
+
space_before = true;
|
977
|
+
}
|
978
|
+
|
979
|
+
if (flags.mode === 'BLOCK' && (last_text === '{' || last_text === ';')) {
|
980
|
+
// { foo; --i }
|
981
|
+
// foo(); --bar;
|
982
|
+
print_newline();
|
983
|
+
}
|
984
|
+
} else if (token_text === '.') {
|
985
|
+
// decimal digits or object.property
|
986
|
+
space_before = false;
|
987
|
+
|
988
|
+
} else if (token_text === ':') {
|
989
|
+
if ( ! is_ternary_op()) {
|
990
|
+
space_before = false;
|
991
|
+
}
|
992
|
+
}
|
993
|
+
if (space_before) {
|
994
|
+
print_single_space();
|
995
|
+
}
|
996
|
+
|
997
|
+
print_token();
|
998
|
+
|
999
|
+
if (space_after) {
|
1000
|
+
print_single_space();
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
if (token_text === '!') {
|
1004
|
+
// flags.eat_next_space = true;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
break;
|
1008
|
+
|
1009
|
+
case 'TK_BLOCK_COMMENT':
|
1010
|
+
|
1011
|
+
var lines = token_text.split(/\x0a|\x0d\x0a/);
|
1012
|
+
|
1013
|
+
print_newline();
|
1014
|
+
output.push(lines[0]);
|
1015
|
+
for (var i = 1, l = lines.length; i < l; i++) {
|
1016
|
+
print_newline();
|
1017
|
+
output.push(' ');
|
1018
|
+
output.push(lines[i].replace(/^\s\s*|\s\s*$/, ''));
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
print_newline();
|
1022
|
+
break;
|
1023
|
+
|
1024
|
+
case 'TK_INLINE_COMMENT':
|
1025
|
+
|
1026
|
+
print_single_space();
|
1027
|
+
print_token();
|
1028
|
+
if (is_expression(flags.mode)) {
|
1029
|
+
print_single_space();
|
1030
|
+
} else {
|
1031
|
+
print_newline();
|
1032
|
+
}
|
1033
|
+
break;
|
1034
|
+
|
1035
|
+
case 'TK_COMMENT':
|
1036
|
+
|
1037
|
+
// print_newline();
|
1038
|
+
if (wanted_newline) {
|
1039
|
+
print_newline();
|
1040
|
+
} else {
|
1041
|
+
print_single_space();
|
1042
|
+
}
|
1043
|
+
print_token();
|
1044
|
+
print_newline();
|
1045
|
+
break;
|
1046
|
+
|
1047
|
+
case 'TK_UNKNOWN':
|
1048
|
+
print_token();
|
1049
|
+
break;
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
last_last_text = last_text;
|
1053
|
+
last_type = token_type;
|
1054
|
+
last_text = token_text;
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
return output.join('').replace(/[\n ]+$/, '');
|
1058
|
+
}
|