sproutit-sproutcore 1.0.0.20090407205609 → 1.0.0.20090408130025
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/frameworks/sproutcore/Buildfile +63 -0
- data/frameworks/sproutcore/HISTORY +682 -0
- data/frameworks/sproutcore/README +22 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/controllers/docs.js +149 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/core.js +16 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/body.css +17 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/body.js +99 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/images/sproutcore-logo.png +0 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/strings.js +15 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/main.js +27 -0
- data/frameworks/sproutcore/apps/sc_jsdoc/models/doc.js +21 -0
- data/frameworks/sproutcore/apps/sc_qunit/controllers/runner.js +209 -0
- data/frameworks/sproutcore/apps/sc_qunit/core.js +16 -0
- data/frameworks/sproutcore/apps/sc_qunit/english.lproj/body.css +17 -0
- data/frameworks/sproutcore/apps/sc_qunit/english.lproj/body.js +107 -0
- data/frameworks/sproutcore/apps/sc_qunit/english.lproj/images/sproutcore-logo.png +0 -0
- data/frameworks/sproutcore/apps/sc_qunit/english.lproj/strings.js +15 -0
- data/frameworks/sproutcore/apps/sc_qunit/main.js +18 -0
- data/frameworks/sproutcore/apps/sc_qunit/models/test.js +24 -0
- data/frameworks/sproutcore/apps/sc_qunit/views/test_iframe.js +52 -0
- data/frameworks/sproutcore/apps/tests/controllers/targets.js +47 -0
- data/frameworks/sproutcore/apps/tests/controllers/test.js +20 -0
- data/frameworks/sproutcore/apps/tests/controllers/tests.js +38 -0
- data/frameworks/sproutcore/apps/tests/core.js +35 -0
- data/frameworks/sproutcore/apps/tests/english.lproj/loading.rhtml +9 -0
- data/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +19 -0
- data/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +86 -0
- data/frameworks/sproutcore/apps/tests/english.lproj/strings.js +17 -0
- data/frameworks/sproutcore/apps/tests/fixtures/target.js +43 -0
- data/frameworks/sproutcore/apps/tests/fixtures/test.js +43 -0
- data/frameworks/sproutcore/apps/tests/main.js +39 -0
- data/frameworks/sproutcore/apps/tests/models/target.js +49 -0
- data/frameworks/sproutcore/apps/tests/models/test.js +20 -0
- data/frameworks/sproutcore/apps/tests/tests/controllers/targets.js +15 -0
- data/frameworks/sproutcore/apps/tests/tests/controllers/test.js +15 -0
- data/frameworks/sproutcore/apps/tests/tests/controllers/tests.js +15 -0
- data/frameworks/sproutcore/apps/tests/tests/models/target.js +15 -0
- data/frameworks/sproutcore/apps/tests/tests/models/test.js +15 -0
- data/frameworks/sproutcore/apps/welcome/core.js +23 -0
- data/frameworks/sproutcore/apps/welcome/english.lproj/loading.rhtml +8 -0
- data/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +43 -0
- data/frameworks/sproutcore/apps/welcome/english.lproj/strings.js +15 -0
- data/frameworks/sproutcore/apps/welcome/main.js +36 -0
- data/frameworks/sproutcore/design/Design Charts.graffle +15819 -0
- data/frameworks/sproutcore/design/Record State Table.numbers +0 -0
- data/frameworks/sproutcore/frameworks/datastore/core.js +14 -0
- data/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +113 -0
- data/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +256 -0
- data/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +196 -0
- data/frameworks/sproutcore/frameworks/datastore/debug/json.js +71 -0
- data/frameworks/sproutcore/frameworks/datastore/debug/standard_setup.js +96 -0
- data/frameworks/sproutcore/frameworks/datastore/fixtures/author_fixtures.js +2503 -0
- data/frameworks/sproutcore/frameworks/datastore/fixtures/sample.js +17 -0
- data/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +92 -0
- data/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +38 -0
- data/frameworks/sproutcore/frameworks/datastore/models/record.js +430 -0
- data/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +361 -0
- data/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +305 -0
- data/frameworks/sproutcore/frameworks/datastore/system/query.js +128 -0
- data/frameworks/sproutcore/frameworks/datastore/system/record_array.js +149 -0
- data/frameworks/sproutcore/frameworks/datastore/system/store.js +1689 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +86 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/contact_model.js +114 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/mail_model.js +91 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +56 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +73 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +48 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +42 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +138 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +46 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +71 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +115 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +40 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +116 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +135 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +110 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +99 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +180 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +126 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +163 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +166 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +175 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +54 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +126 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +127 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +57 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +78 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +247 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +106 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +21 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +61 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +74 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +74 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +74 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +144 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +137 -0
- data/frameworks/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +130 -0
- data/frameworks/sproutcore/frameworks/debug/core.js +1 -0
- data/frameworks/sproutcore/frameworks/deprecated/core.js +61 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/button_views.rb +330 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/collection_view.rb +83 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/core_views.rb +326 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/form_views.rb +253 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/index.rhtml +75 -0
- data/frameworks/sproutcore/frameworks/deprecated/lib/menu_views.rb +93 -0
- data/frameworks/sproutcore/frameworks/deprecated/server/rails_server.js +80 -0
- data/frameworks/sproutcore/frameworks/deprecated/server/rest_server.js +178 -0
- data/frameworks/sproutcore/frameworks/deprecated/server/server.js +674 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/animator.js +679 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/binding.js +36 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/browser.js +77 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/classic_responder.js +314 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/event.js +60 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/globals.js +20 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/misc.js +60 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/node_descriptor.js +72 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/object.js +124 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/path_module.js +433 -0
- data/frameworks/sproutcore/frameworks/deprecated/system/string.js +109 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/application/application.rhtml +125 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/clippingFrame.rhtml +401 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/frame.rhtml +357 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/isVisibleInWindow.rhtml +147 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/base.rhtml +298 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/incremental_rendering.rhtml +260 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/source_list_rendering.rhtml +143 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/popup_button.rhtml +128 -0
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/text_field.rhtml +37 -0
- data/frameworks/sproutcore/frameworks/deprecated/views/collection.js +24 -0
- data/frameworks/sproutcore/frameworks/designer/coders/design.js +30 -0
- data/frameworks/sproutcore/frameworks/designer/coders/localization.js +28 -0
- data/frameworks/sproutcore/frameworks/designer/coders/object.js +347 -0
- data/frameworks/sproutcore/frameworks/designer/controllers/page_design.js +102 -0
- data/frameworks/sproutcore/frameworks/designer/css/css_rule.js +22 -0
- data/frameworks/sproutcore/frameworks/designer/css/css_style.js +29 -0
- data/frameworks/sproutcore/frameworks/designer/css/css_style_sheet.js +201 -0
- data/frameworks/sproutcore/frameworks/designer/ext/page.js +88 -0
- data/frameworks/sproutcore/frameworks/designer/ext/view.js +40 -0
- data/frameworks/sproutcore/frameworks/designer/views/controls/button.js +18 -0
- data/frameworks/sproutcore/frameworks/designer/views/designer.js +553 -0
- data/frameworks/sproutcore/frameworks/designer/views/label.js +17 -0
- data/frameworks/sproutcore/frameworks/designer/views/mixins/button.js +13 -0
- data/frameworks/sproutcore/frameworks/designer/views/tab.js +17 -0
- data/frameworks/sproutcore/frameworks/desktop/core.js +6 -0
- data/frameworks/sproutcore/frameworks/desktop/debug/drag.js +41 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +56 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/a_sample_image.jpg +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/apple-logo1.jpeg +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/iframe.html +23 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +71 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +943 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/blank.gif +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_222222.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_454545.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_888888.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_ffffff.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/indicator.gif +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/panels/sprite-x.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/panels/sprite-y.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sc-theme-sprite.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/standard_fade/000000.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/standard_fade/ffffff.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sticky-note.png +0 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +156 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +83 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +99 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/palette.css +3 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +94 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +39 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +31 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +10 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/scroller.css +26 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +141 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +19 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +57 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/split.css +70 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/split_divider.css +8 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +14 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/tab.css +12 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/text_field.css +29 -0
- data/frameworks/sproutcore/frameworks/desktop/english.lproj/toolbar.css +6 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/border.js +53 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +22 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_item.js +22 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +226 -0
- data/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +247 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/alert.js +377 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/menu.js +504 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/modal.js +68 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/palette.js +63 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/panel.js +184 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/picker.js +402 -0
- data/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +46 -0
- data/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +39 -0
- data/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +81 -0
- data/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +175 -0
- data/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +280 -0
- data/frameworks/sproutcore/frameworks/desktop/system/drag.js +721 -0
- data/frameworks/sproutcore/frameworks/desktop/system/key_bindings.js +40 -0
- data/frameworks/sproutcore/frameworks/desktop/system/root_responder.js +641 -0
- data/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +187 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +43 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +152 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +57 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +36 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +40 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +80 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +38 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +140 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +145 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +99 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +39 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +64 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/ui.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui.js +110 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +255 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +44 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +128 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +240 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +113 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +202 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +139 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +111 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/methods.js +63 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/ui.js +70 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +94 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +206 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +81 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +85 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +37 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +50 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +52 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +54 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +88 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/text_field/methods.js +76 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/text_field/ui.js +198 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/web/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +110 -0
- data/frameworks/sproutcore/frameworks/desktop/views/button.js +320 -0
- data/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +98 -0
- data/frameworks/sproutcore/frameworks/desktop/views/collection.js +2141 -0
- data/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +44 -0
- data/frameworks/sproutcore/frameworks/desktop/views/form.js +595 -0
- data/frameworks/sproutcore/frameworks/desktop/views/grid.js +199 -0
- data/frameworks/sproutcore/frameworks/desktop/views/list.js +706 -0
- data/frameworks/sproutcore/frameworks/desktop/views/list_item.js +523 -0
- data/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +437 -0
- data/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +62 -0
- data/frameworks/sproutcore/frameworks/desktop/views/progress.js +207 -0
- data/frameworks/sproutcore/frameworks/desktop/views/radio.js +332 -0
- data/frameworks/sproutcore/frameworks/desktop/views/scene.js +56 -0
- data/frameworks/sproutcore/frameworks/desktop/views/scroll.js +648 -0
- data/frameworks/sproutcore/frameworks/desktop/views/scroller.js +203 -0
- data/frameworks/sproutcore/frameworks/desktop/views/segmented.js +509 -0
- data/frameworks/sproutcore/frameworks/desktop/views/select_field.js +292 -0
- data/frameworks/sproutcore/frameworks/desktop/views/separator.js +37 -0
- data/frameworks/sproutcore/frameworks/desktop/views/slider.js +178 -0
- data/frameworks/sproutcore/frameworks/desktop/views/source_list.js +1117 -0
- data/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +169 -0
- data/frameworks/sproutcore/frameworks/desktop/views/split.js +651 -0
- data/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +55 -0
- data/frameworks/sproutcore/frameworks/desktop/views/tab.js +190 -0
- data/frameworks/sproutcore/frameworks/desktop/views/text_field.js +233 -0
- data/frameworks/sproutcore/frameworks/desktop/views/thumb.js +49 -0
- data/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +49 -0
- data/frameworks/sproutcore/frameworks/desktop/views/web.js +86 -0
- data/frameworks/sproutcore/frameworks/foundation/TESTING +46 -0
- data/frameworks/sproutcore/frameworks/foundation/controllers/array.js +490 -0
- data/frameworks/sproutcore/frameworks/foundation/controllers/controller.js +317 -0
- data/frameworks/sproutcore/frameworks/foundation/controllers/object.js +421 -0
- data/frameworks/sproutcore/frameworks/foundation/core.js +111 -0
- data/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +172 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/blank.gif +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +53 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +55 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/core.css +5 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/debug/control-test-pane.css +8 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-logo.png +0 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/static_layout.css +5 -0
- data/frameworks/sproutcore/frameworks/foundation/english.lproj/view.css +40 -0
- data/frameworks/sproutcore/frameworks/foundation/ext/object.js +81 -0
- data/frameworks/sproutcore/frameworks/foundation/ext/run_loop.js +158 -0
- data/frameworks/sproutcore/frameworks/foundation/fixtures/file_exists.json +1 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/button.js +291 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +88 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/control.js +352 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +146 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/responder.js +156 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +154 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +101 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/string.js +237 -0
- data/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +176 -0
- data/frameworks/sproutcore/frameworks/foundation/panes/main.js +47 -0
- data/frameworks/sproutcore/frameworks/foundation/panes/pane.js +555 -0
- data/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +84 -0
- data/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +244 -0
- data/frameworks/sproutcore/frameworks/foundation/system/browser.js +64 -0
- data/frameworks/sproutcore/frameworks/foundation/system/builder.js +210 -0
- data/frameworks/sproutcore/frameworks/foundation/system/core_query.js +2015 -0
- data/frameworks/sproutcore/frameworks/foundation/system/cursor.js +129 -0
- data/frameworks/sproutcore/frameworks/foundation/system/error.js +93 -0
- data/frameworks/sproutcore/frameworks/foundation/system/event.js +817 -0
- data/frameworks/sproutcore/frameworks/foundation/system/image_cache.js +433 -0
- data/frameworks/sproutcore/frameworks/foundation/system/json.js +440 -0
- data/frameworks/sproutcore/frameworks/foundation/system/locale.js +288 -0
- data/frameworks/sproutcore/frameworks/foundation/system/page.js +106 -0
- data/frameworks/sproutcore/frameworks/foundation/system/ready.js +189 -0
- data/frameworks/sproutcore/frameworks/foundation/system/render_context.js +865 -0
- data/frameworks/sproutcore/frameworks/foundation/system/request.js +255 -0
- data/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +368 -0
- data/frameworks/sproutcore/frameworks/foundation/system/routes.js +446 -0
- data/frameworks/sproutcore/frameworks/foundation/system/time.js +478 -0
- data/frameworks/sproutcore/frameworks/foundation/system/timer.js +549 -0
- data/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +158 -0
- data/frameworks/sproutcore/frameworks/foundation/system/utils.js +330 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array.js +118 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/controller.js +268 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object.js +433 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +113 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/integration/creating_views.js +113 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/content.js +195 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/displayProperties.js +89 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/content.js +168 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +89 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/builder.js +42 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +1323 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +387 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +405 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +49 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/within.js +66 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/error.js +41 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/json.js +14 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/locale.js +128 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/begin.js +47 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/element.js +44 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/end.js +119 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/get.js +51 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_attr.js +50 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js +28 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_className.js +179 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_style.js +100 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/init.js +55 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/join.js +28 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/push_text.js +74 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/tag.js +45 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/update.js +205 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +89 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeKeyPane.js +124 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMainPane.js +68 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/root_responder.js +97 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/targetForAction.js +238 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +33 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invalidate.js +38 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invokeLater.js +201 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/isPaused.js +71 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/performAction.js +67 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/schedule.js +170 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/user_defaults.js +27 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/utils/normalizeURL.js +18 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/system/utils/range.js +62 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/validators/credit_card.js +35 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/validators/date.js +21 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/validators/number.js +47 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/validators/password.js +13 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +10 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +83 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +39 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/main_pane.js +31 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/append_remove.js +89 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/firstResponder.js +148 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/keyPane.js +133 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendEvent.js +165 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +132 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/convertFrames.js +246 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createChildViews.js +87 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createLayer.js +97 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/destroyLayer.js +85 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/findLayerInParentLayer.js +52 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/init.js +50 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/insertBefore.js +200 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/isVisibleInWindow.js +102 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layer.js +150 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutChildViews.js +162 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutDidChange.js +127 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +248 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/parentViewDidChange.js +67 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/prepareContext.js +166 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/removeChild.js +189 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/render.js +83 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/replaceChild.js +29 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayer.js +142 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayerLocation.js +194 -0
- data/frameworks/sproutcore/frameworks/foundation/tests/views/view/viewDidResize.js +185 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +125 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/date.js +52 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/email.js +45 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +33 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/number.js +82 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/password.js +86 -0
- data/frameworks/sproutcore/frameworks/foundation/validators/validator.js +311 -0
- data/frameworks/sproutcore/frameworks/foundation/views/container.js +136 -0
- data/frameworks/sproutcore/frameworks/foundation/views/field.js +276 -0
- data/frameworks/sproutcore/frameworks/foundation/views/image.js +158 -0
- data/frameworks/sproutcore/frameworks/foundation/views/label.js +261 -0
- data/frameworks/sproutcore/frameworks/foundation/views/view.js +2160 -0
- data/frameworks/sproutcore/frameworks/mobile/english.lproj/core.css +12 -0
- data/frameworks/sproutcore/frameworks/mobile/lib/index.rhtml +126 -0
- data/frameworks/sproutcore/frameworks/mobile/system/root_responder.js +109 -0
- data/frameworks/sproutcore/frameworks/mobile/tests/views/button/ui.js +9 -0
- data/frameworks/sproutcore/frameworks/mobile/views/button.js +190 -0
- data/frameworks/sproutcore/frameworks/runtime/README +11 -0
- data/frameworks/sproutcore/frameworks/runtime/core.js +777 -0
- data/frameworks/sproutcore/frameworks/runtime/license.js +28 -0
- data/frameworks/sproutcore/frameworks/runtime/mixins/array.js +403 -0
- data/frameworks/sproutcore/frameworks/runtime/mixins/delegate_support.js +70 -0
- data/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +1193 -0
- data/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1149 -0
- data/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +135 -0
- data/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +108 -0
- data/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +128 -0
- data/frameworks/sproutcore/frameworks/runtime/protocols/sparse_array_delegate.js +131 -0
- data/frameworks/sproutcore/frameworks/runtime/system/binding.js +891 -0
- data/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +107 -0
- data/frameworks/sproutcore/frameworks/runtime/system/object.js +783 -0
- data/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +99 -0
- data/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +214 -0
- data/frameworks/sproutcore/frameworks/runtime/system/set.js +246 -0
- data/frameworks/sproutcore/frameworks/runtime/system/sparse_array.js +286 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +56 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js +23 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/clone.js +66 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +147 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/inspect.js +27 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +25 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +38 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/keys.js +20 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/makeArray.js +30 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +19 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +37 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +592 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +467 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +123 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +79 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +80 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/array.js +263 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +190 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/object/base.js +135 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +339 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +120 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +313 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/system/sparse_array.js +84 -0
- data/frameworks/sproutcore/frameworks/testing/core.js +13 -0
- data/frameworks/sproutcore/frameworks/testing/english.lproj/additions.css +8 -0
- data/frameworks/sproutcore/frameworks/testing/english.lproj/testsuite.css +131 -0
- data/frameworks/sproutcore/frameworks/testing/extras.js +43 -0
- data/frameworks/sproutcore/frameworks/testing/jquery.js +3559 -0
- data/frameworks/sproutcore/frameworks/testing/qunit.js +819 -0
- data/frameworks/sproutcore/frameworks/testing/tests/debug/qunit.js +25 -0
- data/frameworks/sproutcore/frameworks/testing/utils.js +55 -0
- data/frameworks/sproutcore/lib/index.rhtml +118 -0
- data/frameworks/sproutcore/license.js +28 -0
- data/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +69 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/button.css +41 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/core.css +8 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/backButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/blueButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/cancel.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/grayButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/leftButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrow.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrowSel.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listGroup.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/loading.gif +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/pinstripes.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/rightButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/selection.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/thumb.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggle.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggleOn.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolbar.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/whiteButton.png +0 -0
- data/frameworks/sproutcore/themes/iphone_theme/english.lproj/strings.js +15 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/button.css +333 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/checkbox.css +90 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/collection.css +53 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/core.css +47 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/disclosure.css +55 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-sprite.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-ysprite.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-toolbar-view.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/label.css +37 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/pane.css +8 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/background-fat.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/background-thin.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-edge.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-left-corner.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-right-corner.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/left-edge.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/overlay.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/right-edge.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-edge.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-left-corner.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-right-corner.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/progress.css +23 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/radio.css +113 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +141 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/slider.css +62 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/split_view.css +27 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/tab.css +12 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/text_field.css +13 -0
- data/frameworks/sproutcore/themes/standard_theme/english.lproj/toolbar.css +4 -0
- data/lib/thor/.autotest +7 -0
- data/lib/thor/CHANGELOG.rdoc +52 -0
- data/lib/thor/LICENSE +20 -0
- data/lib/thor/README.markdown +76 -0
- data/lib/thor/Rakefile +6 -0
- data/lib/thor/Thorfile +45 -0
- data/lib/thor/bin/rake2thor +83 -0
- data/lib/thor/bin/thor +7 -0
- data/lib/thor/lib/thor/error.rb +3 -0
- data/lib/thor/lib/thor/options.rb +267 -0
- data/lib/thor/lib/thor/ordered_hash.rb +64 -0
- data/lib/thor/lib/thor/runner.rb +305 -0
- data/lib/thor/lib/thor/task.rb +83 -0
- data/lib/thor/lib/thor/task_hash.rb +22 -0
- data/lib/thor/lib/thor/tasks/package.rb +18 -0
- data/lib/thor/lib/thor/tasks.rb +77 -0
- data/lib/thor/lib/thor/util.rb +75 -0
- data/lib/thor/lib/thor.rb +170 -0
- data/lib/thor/script/destroy +14 -0
- data/lib/thor/script/generate +14 -0
- data/lib/thor/spec/fixtures/task.thor +10 -0
- data/lib/thor/spec/options_spec.rb +271 -0
- data/lib/thor/spec/ordered_hash_spec.rb +84 -0
- data/lib/thor/spec/spec.opts +1 -0
- data/lib/thor/spec/spec_helper.rb +30 -0
- data/lib/thor/spec/task_spec.rb +11 -0
- data/lib/thor/spec/tasks_spec.rb +28 -0
- data/lib/thor/spec/thor_runner_spec.rb +194 -0
- data/lib/thor/spec/thor_spec.rb +206 -0
- data/lib/thor/spec/util_spec.rb +99 -0
- data/lib/thor/task.thor +15 -0
- data/lib/thor/thor.gemspec +29 -0
- metadata +3 -4
- data/sproutcore.gemspec +0 -47
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple, Inc. All rights reserved.
|
5
|
+
// License: Licened under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
SC.mixin(Function.prototype, {
|
9
|
+
|
10
|
+
typeConverter: function() {
|
11
|
+
this.isTypeConverter = true; return this ;
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
@@ -0,0 +1,113 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple, Inc. All rights reserved.
|
5
|
+
// License: Licened under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('data_sources/data_source');
|
9
|
+
|
10
|
+
/** @class
|
11
|
+
|
12
|
+
A cascading data source will actually forward requests onto an array of
|
13
|
+
additional data sources, stopping when one of the data sources returns YES,
|
14
|
+
indicating that they handled the request.
|
15
|
+
|
16
|
+
You can use a cascading data source to tie together multiple data sources,
|
17
|
+
treating them as a single namespace.
|
18
|
+
|
19
|
+
@extends SC.DataSource
|
20
|
+
@since SproutCore 1.0
|
21
|
+
*/
|
22
|
+
SC.CascadeDataSource = SC.DataSource.extend(
|
23
|
+
/** SC.CascadeDataSource.prototype */ {
|
24
|
+
|
25
|
+
/**
|
26
|
+
The data sources used by the cascade, in the order that they are to be
|
27
|
+
followed. Usually when you define the cascade, you will define this
|
28
|
+
array.
|
29
|
+
|
30
|
+
@property {Array}
|
31
|
+
*/
|
32
|
+
dataSources: [],
|
33
|
+
|
34
|
+
// ..........................................................
|
35
|
+
// SC.STORE ENTRY POINTS
|
36
|
+
//
|
37
|
+
|
38
|
+
/**
|
39
|
+
Define which dataSources will be part of the cascading algorithms
|
40
|
+
|
41
|
+
@property {}
|
42
|
+
*/
|
43
|
+
from: function(dataSource) {
|
44
|
+
this.dataSources.push(dataSource);
|
45
|
+
},
|
46
|
+
|
47
|
+
|
48
|
+
_handleResponse: function(current, response) {
|
49
|
+
if (response === YES) return YES ;
|
50
|
+
if (current === NO) return response === NO ? NO : SC.MIXED_STATE ;
|
51
|
+
},
|
52
|
+
|
53
|
+
/** @private - just cascades */
|
54
|
+
retrieveRecords: function(store, storeKeys) {
|
55
|
+
var sources = this.get('dataSources'), len = sources.length;
|
56
|
+
var source, idx, ret = null, cur;
|
57
|
+
|
58
|
+
for(idx=0;idx<len;idx++) {
|
59
|
+
source = sources.objectAt(idx);
|
60
|
+
cur = source.retrieveRecords.call(this, store, storeKeys);
|
61
|
+
ret = this._handleResponse(ret, cur);
|
62
|
+
if (ret === YES) return YES ;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (ret === null) ret = NO ;
|
66
|
+
return ret ;
|
67
|
+
},
|
68
|
+
|
69
|
+
/** @private - just cascades */
|
70
|
+
commitRecords: function(store, createStoreKeys, updateStoreKeys, destroyStoreKeys) {
|
71
|
+
var sources = this.get('dataSources'), len = sources.length;
|
72
|
+
var source, idx, ret = null, cur;
|
73
|
+
|
74
|
+
for(idx=0;idx<len;idx++) {
|
75
|
+
source = sources.objectAt(idx);
|
76
|
+
cur = source.retrieveRecords.call(this, store, createStoreKeys, updateStoreKeys, destroyStoreKeys);
|
77
|
+
ret = this._handleResponse(ret, cur);
|
78
|
+
if (ret === YES) return YES ;
|
79
|
+
}
|
80
|
+
|
81
|
+
if (ret === null) ret = NO ;
|
82
|
+
return ret ;
|
83
|
+
},
|
84
|
+
|
85
|
+
/** @private - just cascades */
|
86
|
+
fetchRecords: function(store, fetchKey, params) {
|
87
|
+
var sources = this.get('dataSources'), len = sources.length;
|
88
|
+
var source, idx, ret = null;
|
89
|
+
|
90
|
+
for(idx=0;!ret && idx<len;idx++) {
|
91
|
+
source = sources.objectAt(idx);
|
92
|
+
ret = source.fetchRecords(store, fetchKey, params);
|
93
|
+
}
|
94
|
+
return ret ;
|
95
|
+
},
|
96
|
+
|
97
|
+
/** @private - just cascades */
|
98
|
+
cancel: function(store, storeKeys) {
|
99
|
+
var sources = this.get('dataSources'), len = sources.length;
|
100
|
+
var source, idx, ret = null, cur;
|
101
|
+
|
102
|
+
for(idx=0;idx<len;idx++) {
|
103
|
+
source = sources.objectAt(idx);
|
104
|
+
cur = source.cancel.call(this, store, storeKeys);
|
105
|
+
ret = this._handleResponse(ret, cur);
|
106
|
+
if (ret === YES) return YES ;
|
107
|
+
}
|
108
|
+
|
109
|
+
if (ret === null) ret = NO ;
|
110
|
+
return ret ;
|
111
|
+
}
|
112
|
+
|
113
|
+
});
|
@@ -0,0 +1,256 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple, Inc. All rights reserved.
|
5
|
+
// License: Licened under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
|
9
|
+
/** @class
|
10
|
+
|
11
|
+
TODO: Describe
|
12
|
+
|
13
|
+
@extend SC.Object
|
14
|
+
@since SproutCore 1.0
|
15
|
+
*/
|
16
|
+
SC.DataSource = SC.Object.extend( /** SC.DataSource.prototype */ {
|
17
|
+
|
18
|
+
// ..........................................................
|
19
|
+
// SC.STORE ENTRY POINTS
|
20
|
+
//
|
21
|
+
|
22
|
+
/**
|
23
|
+
Invoked by the Store to load or refresh records in the store. You can
|
24
|
+
map the storeKeys back to recordType and ids as needed to perform the
|
25
|
+
retrieval.
|
26
|
+
|
27
|
+
Typically you will override this method to initial a retrieval for the
|
28
|
+
records and then provide the data to the store using the standard data
|
29
|
+
source callbacks on the store.
|
30
|
+
|
31
|
+
If you are implementing an in-memory data source, you can provide this
|
32
|
+
data immediately if you want before returning.
|
33
|
+
|
34
|
+
To support cascading data stores, be sure to return NO if you cannot
|
35
|
+
retrieve any of the keys, YES if you can retrieve all of the, or
|
36
|
+
SC.MIXED_STATE if you can retrieve some of the.
|
37
|
+
|
38
|
+
@param {SC.DataSource} dataSource the receiver
|
39
|
+
@param {SC.Store} store the requesting store
|
40
|
+
@param {Array} storeKeys array of storeKeys to retrieve
|
41
|
+
@returns {Boolean} YES if data source can handle keys
|
42
|
+
*/
|
43
|
+
retrieveRecords: function(store, storeKeys) {
|
44
|
+
return NO;
|
45
|
+
},
|
46
|
+
|
47
|
+
/**
|
48
|
+
Invoked by the store whenever it has one or more records with pending
|
49
|
+
changes that need to be sent back to the server. The store keys will be
|
50
|
+
separated into three categories:
|
51
|
+
|
52
|
+
- createStoreKeys: records that need to be created on server
|
53
|
+
- updateStoreKeys: existing records that have been modified
|
54
|
+
- destroyStoreKeys: records need to be destroyed on the server
|
55
|
+
|
56
|
+
If you do not override this method yourself, this method will actually
|
57
|
+
invoke createRecords(), updateRecords(), and destroyRecords() on the
|
58
|
+
dataSource, passing each array of storeKeys. You can usually implement
|
59
|
+
those methods instead of overriding this method.
|
60
|
+
|
61
|
+
However, if your server API can sync multiple changes at once, you may
|
62
|
+
prefer to override this method instead.
|
63
|
+
|
64
|
+
To support cascading data stores, be sure to return NO if you cannot
|
65
|
+
handle any of the keys, YES if you can handle all of the keys, or
|
66
|
+
SC.MIXED_STATE if you can handle some of them.
|
67
|
+
|
68
|
+
@param {SC.Store} store the requesting store
|
69
|
+
@param {Array} createStoreKeys keys to create
|
70
|
+
@param {Array} updateStoreKeys keys to update
|
71
|
+
@param {Array} destroyStoreKeys keys to destroy
|
72
|
+
@returns {Boolean} YES if data source can handle keys
|
73
|
+
*/
|
74
|
+
commitRecords: function(store, createStoreKeys, updateStoreKeys, destroyStoreKeys) {
|
75
|
+
var cret, uret, dret;
|
76
|
+
if(createStoreKeys.length>0) cret = this.createRecords.call(this, store, createStoreKeys);
|
77
|
+
if(updateStoreKeys.length>0) uret = this.updateRecords.call(this, store, updateStoreKeys);
|
78
|
+
if(destroyStoreKeys.length>0) dret = this.destroyRecords.call(this, store, destroyStoreKeys);
|
79
|
+
return (cret === uret === dret) ? (cret || uret || dret) : SC.MIXED_STATE ;
|
80
|
+
},
|
81
|
+
|
82
|
+
/**
|
83
|
+
Invoked by the store whenever it needs to retrieve an array of storeKeys
|
84
|
+
matching a specific query. Your subclass should override this method
|
85
|
+
to return an array of storeKeys that match the passed fetchKey and
|
86
|
+
optional params. Often the fetchKey will actually be an SC.Record
|
87
|
+
subclass used as a filter or string, but it could be anything you want.
|
88
|
+
|
89
|
+
If your data source subclass can handle the fetch, it should either return
|
90
|
+
an array of storeKeys immediately or it can return an empty array and
|
91
|
+
populate it dynamically later one the result set has arrived. Optionally
|
92
|
+
you can also implement "server-side results" by returning a SparseArray
|
93
|
+
and then dynamically populating the contents of the array as it is
|
94
|
+
requested.
|
95
|
+
|
96
|
+
On return, the Store will write your result set in an SC.RecordArray
|
97
|
+
instance, which will monitor your array for changes and then maps those
|
98
|
+
store keys to actual SC.Record instances. SC.RecordArray can also use
|
99
|
+
your underlying storeKeys to create subqueries for client-side searching
|
100
|
+
and filtering.
|
101
|
+
|
102
|
+
@param {SC.Store} store the requesting store
|
103
|
+
@param {Object} fetchKey key describing the request, may be SC.Record
|
104
|
+
@param {Hash} params optional additonal fetch params
|
105
|
+
@returns {SC.Array} result set with storeKeys. May be sparse.
|
106
|
+
*/
|
107
|
+
fetchRecords: function(store, fetchKey, params) {
|
108
|
+
return null;
|
109
|
+
},
|
110
|
+
|
111
|
+
|
112
|
+
/**
|
113
|
+
Invoked by the store whenever it needs to cancel one or more records that
|
114
|
+
are currently in-flight. If any of the storeKeys match records you are
|
115
|
+
currently acting upon, you should cancel the in-progress operation and
|
116
|
+
return YES.
|
117
|
+
|
118
|
+
If you implement an in-memory data source that immediately services the
|
119
|
+
other requests, then this method will never be called on your data source.
|
120
|
+
|
121
|
+
To support cascading data stores, be sure to return NO if you cannot
|
122
|
+
retrieve any of the keys, YES if you can retrieve all of the, or
|
123
|
+
SC.MIXED_STATE if you can retrieve some of the.
|
124
|
+
|
125
|
+
@param {SC.Store} store the requesting store
|
126
|
+
@param {Array} storeKeys array of storeKeys to retrieve
|
127
|
+
@returns {Boolean} YES if data source can handle keys
|
128
|
+
*/
|
129
|
+
cancel: function(store, storeKeys) {
|
130
|
+
return NO;
|
131
|
+
},
|
132
|
+
|
133
|
+
// ..........................................................
|
134
|
+
// BULK RECORD ACTIONS
|
135
|
+
//
|
136
|
+
|
137
|
+
/**
|
138
|
+
Called from commitRecords() to commit modified existing records to the
|
139
|
+
store. You can override this method to actually send the updated
|
140
|
+
records to your store. The default version will simply call
|
141
|
+
updateRecord() for each storeKey.
|
142
|
+
|
143
|
+
To support cascading data stores, be sure to return NO if you cannot
|
144
|
+
handle any of the keys, YES if you can handle all of the keys, or
|
145
|
+
SC.MIXED_STATE if you can handle some of them.
|
146
|
+
|
147
|
+
@param {SC.Store} store the requesting store
|
148
|
+
@param {Array} storeKeys keys to update
|
149
|
+
*/
|
150
|
+
updateRecords: function(store, storeKeys) {
|
151
|
+
return this._handleEach(store, storeKeys, this.updateRecord);
|
152
|
+
},
|
153
|
+
|
154
|
+
/**
|
155
|
+
Called from commitRecords() to commit newly created records to the
|
156
|
+
store. You can override this method to actually send the created
|
157
|
+
records to your store. The default version will simply call
|
158
|
+
createRecord() for each storeKey.
|
159
|
+
|
160
|
+
To support cascading data stores, be sure to return NO if you cannot
|
161
|
+
handle any of the keys, YES if you can handle all of the keys, or
|
162
|
+
SC.MIXED_STATE if you can handle some of them.
|
163
|
+
|
164
|
+
@param {SC.Store} store the requesting store
|
165
|
+
@param {Array} storeKeys keys to update
|
166
|
+
*/
|
167
|
+
createRecords: function(store, storeKeys) {
|
168
|
+
return this._handleEach(store, storeKeys, this.createRecord);
|
169
|
+
},
|
170
|
+
|
171
|
+
/**
|
172
|
+
Called from commitRecords() to commit destroted records to the
|
173
|
+
store. You can override this method to actually send the destroyed
|
174
|
+
records to your store. The default version will simply call
|
175
|
+
destroyRecord() for each storeKey.
|
176
|
+
|
177
|
+
To support cascading data stores, be sure to return NO if you cannot
|
178
|
+
handle any of the keys, YES if you can handle all of the keys, or
|
179
|
+
SC.MIXED_STATE if you can handle some of them.
|
180
|
+
|
181
|
+
@param {SC.Store} store the requesting store
|
182
|
+
@param {Array} storeKeys keys to update
|
183
|
+
*/
|
184
|
+
destroyRecords: function(store, storeKeys) {
|
185
|
+
return this._handleEach(store, storeKeys, this.destroyRecord);
|
186
|
+
},
|
187
|
+
|
188
|
+
/** @private
|
189
|
+
invokes the named action for each store key. returns proper value
|
190
|
+
*/
|
191
|
+
_handleEach: function(store, storeKeys, action) {
|
192
|
+
var len = storeKeys.length, idx, ret, cur;
|
193
|
+
for(idx=0;idx<len;idx++) {
|
194
|
+
cur = action.call(this, store, storeKeys[idx]);
|
195
|
+
if (ret === undefined) {
|
196
|
+
ret = cur ;
|
197
|
+
} else if (ret === YES) {
|
198
|
+
ret = (cur === YES) ? YES : SC.MIXED_STATE ;
|
199
|
+
} else if (ret === NO) {
|
200
|
+
ret = (cur === NO) ? NO : SC.MIXED_STATE ;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
return ret ? ret : null ;
|
204
|
+
},
|
205
|
+
|
206
|
+
|
207
|
+
// ..........................................................
|
208
|
+
// SINGLE RECORD ACTIONS
|
209
|
+
//
|
210
|
+
|
211
|
+
/**
|
212
|
+
Called from updatesRecords() to update a single record. This is the
|
213
|
+
most basic primitive to can implement to support updating a record.
|
214
|
+
|
215
|
+
To support cascading data stores, be sure to return NO if you cannot
|
216
|
+
handle the passed storeKey or YES if you can.
|
217
|
+
|
218
|
+
@param {SC.Store} store the requesting store
|
219
|
+
@param {Array} storeKey key to update
|
220
|
+
@returns {Boolean} YES if handled
|
221
|
+
*/
|
222
|
+
updateRecord: function(store, storeKey) {
|
223
|
+
return NO ;
|
224
|
+
},
|
225
|
+
|
226
|
+
/**
|
227
|
+
Called from createdRecords() to created a single record. This is the
|
228
|
+
most basic primitive to can implement to support creating a record.
|
229
|
+
|
230
|
+
To support cascading data stores, be sure to return NO if you cannot
|
231
|
+
handle the passed storeKey or YES if you can.
|
232
|
+
|
233
|
+
@param {SC.Store} store the requesting store
|
234
|
+
@param {Array} storeKey key to update
|
235
|
+
@returns {Boolean} YES if handled
|
236
|
+
*/
|
237
|
+
createRecord: function(store, storeKey) {
|
238
|
+
return NO ;
|
239
|
+
},
|
240
|
+
|
241
|
+
/**
|
242
|
+
Called from destroyRecords() to destroy a single record. This is the
|
243
|
+
most basic primitive to can implement to support destroying a record.
|
244
|
+
|
245
|
+
To support cascading data stores, be sure to return NO if you cannot
|
246
|
+
handle the passed storeKey or YES if you can.
|
247
|
+
|
248
|
+
@param {SC.Store} store the requesting store
|
249
|
+
@param {Array} storeKey key to update
|
250
|
+
@returns {Boolean} YES if handled
|
251
|
+
*/
|
252
|
+
destroyRecord: function(store, storeKey) {
|
253
|
+
return NO ;
|
254
|
+
}
|
255
|
+
|
256
|
+
});
|
@@ -0,0 +1,196 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple, Inc. All rights reserved.
|
5
|
+
// License: Licened under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('data_sources/data_source');
|
9
|
+
sc_require('models/record');
|
10
|
+
|
11
|
+
/** @class
|
12
|
+
|
13
|
+
TODO: Describe Class
|
14
|
+
|
15
|
+
@extends SC.DataSource
|
16
|
+
@since SproutCore 1.0
|
17
|
+
*/
|
18
|
+
SC.FixturesDataSource = SC.DataSource.extend( {
|
19
|
+
|
20
|
+
// ..........................................................
|
21
|
+
// STANDARD DATA SOURCE METHODS
|
22
|
+
//
|
23
|
+
|
24
|
+
/**
|
25
|
+
Invoked by the store whenever it needs to retrieve an array of records.
|
26
|
+
|
27
|
+
@param {SC.Store} store the requesting store
|
28
|
+
@param {SC.Array} the array with the storeKeys to be retrieved
|
29
|
+
@returns {SC.Bool} return YES because Fixtures supports the function.
|
30
|
+
*/
|
31
|
+
retrieveRecords: function(store, storeKeys) {
|
32
|
+
var len = storeKeys.length, dataHash, storeKey, i;
|
33
|
+
for(i=0; i<len; i++){
|
34
|
+
storeKey = storeKeys[i];
|
35
|
+
dataHash = this.fixtureForStoreKey(store, storeKey);
|
36
|
+
if (dataHash) store.dataSourceDidComplete(storeKey, dataHash);
|
37
|
+
}
|
38
|
+
return YES;
|
39
|
+
},
|
40
|
+
|
41
|
+
/**
|
42
|
+
Invoked by the store whenever it needs to retrieve an array of storeKeys
|
43
|
+
matching a specific query. For the fixtures params are ignored and all
|
44
|
+
storeKeys for the specific recordType are returned.
|
45
|
+
|
46
|
+
@param {SC.Store} store the requesting store
|
47
|
+
@param {Object} recordType key describing the request, may be SC.Record
|
48
|
+
@param {Hash} params optional additonal fetch params
|
49
|
+
@returns {SC.Array} result set with storeKeys. May be sparse.
|
50
|
+
*/
|
51
|
+
fetchRecords: function(store, recordType, params) {
|
52
|
+
var ret = [], dataHashes, i, storeKey;
|
53
|
+
|
54
|
+
// only support loading records
|
55
|
+
if (!(recordType === SC.Record || SC.Record.hasSubclass(recordType))) {
|
56
|
+
return null ;
|
57
|
+
}
|
58
|
+
|
59
|
+
dataHashes = this.fixturesFor(recordType);
|
60
|
+
for(i in dataHashes){
|
61
|
+
storeKey = recordType.storeKeyFor(i);
|
62
|
+
ret.push(storeKey);
|
63
|
+
}
|
64
|
+
return ret;
|
65
|
+
},
|
66
|
+
|
67
|
+
/**
|
68
|
+
Fixture operations complete immediately so you cannot cancel them.
|
69
|
+
*/
|
70
|
+
cancel: function(store, storeKeys) {
|
71
|
+
return NO;
|
72
|
+
},
|
73
|
+
|
74
|
+
/**
|
75
|
+
Update the dataHash in this._fixtures
|
76
|
+
*/
|
77
|
+
updateRecord: function(store, storeKey) {
|
78
|
+
this.setFixtureForStoreKey(store, storeKey, store.readDataHash(storeKey));
|
79
|
+
store.dataSourceDidComplete(storeKey);
|
80
|
+
return YES ;
|
81
|
+
},
|
82
|
+
|
83
|
+
|
84
|
+
/**
|
85
|
+
Adds records to this._fixtures. If the record does not have an id yet,
|
86
|
+
then then calls generateIdFor() and sets that.
|
87
|
+
|
88
|
+
@param {SC.Store} store the store
|
89
|
+
@param {Number} storeKey the store key
|
90
|
+
@returns {Boolean} YES if successful
|
91
|
+
*/
|
92
|
+
createRecord: function(store, storeKey) {
|
93
|
+
var id = store.idFor(storeKey),
|
94
|
+
recordType = store.recordTypeFor(storeKey),
|
95
|
+
dataHash = store.readDataHash(storeKey),
|
96
|
+
fixtures = this.fixturesFor(recordType);
|
97
|
+
|
98
|
+
if (!id) id = this.generateIdFor(recordType, dataHash, store, storeKey);
|
99
|
+
fixtures[id] = dataHash;
|
100
|
+
|
101
|
+
store.dataSourceDidComplete(storeKey, null, id);
|
102
|
+
return YES ;
|
103
|
+
},
|
104
|
+
|
105
|
+
/**
|
106
|
+
Removes the data from the fixtures.
|
107
|
+
|
108
|
+
@param {SC.Store} store the store
|
109
|
+
@param {Number} storeKey the store key
|
110
|
+
@returns {Boolean} YES if successful
|
111
|
+
*/
|
112
|
+
destroyRecord: function(store, storeKey) {
|
113
|
+
var id = store.idFor(storeKey),
|
114
|
+
recordType = store.recordTypeFor(storeKey),
|
115
|
+
fixtures = this.fixturesFor(recordType);
|
116
|
+
|
117
|
+
if (id) delete fixtures[id];
|
118
|
+
store.dataSourceDidDestroy(storeKey);
|
119
|
+
return YES ;
|
120
|
+
},
|
121
|
+
|
122
|
+
// ..........................................................
|
123
|
+
// INTERNAL METHODS
|
124
|
+
//
|
125
|
+
|
126
|
+
/**
|
127
|
+
Generates an id for the passed record type. You can override this if
|
128
|
+
needed. The default generates a storekey and formats it as a string.
|
129
|
+
*/
|
130
|
+
generateIdFor: function(recordType, dataHash, store, storeKey) {
|
131
|
+
return "@id%@".fmt(SC.Store.generateStoreKey());
|
132
|
+
},
|
133
|
+
|
134
|
+
/**
|
135
|
+
Based on the storeKey it returns the specified fixtures
|
136
|
+
|
137
|
+
@param {SC.Store} store the store
|
138
|
+
@param {Number} storeKey the storeKey
|
139
|
+
@returns {Hash} data hash or null
|
140
|
+
*/
|
141
|
+
fixtureForStoreKey: function(store, storeKey) {
|
142
|
+
var id = store.idFor(storeKey),
|
143
|
+
recordType = store.recordTypeFor(storeKey),
|
144
|
+
fixtures = this.fixturesFor(recordType);
|
145
|
+
return fixtures ? fixtures[id] : null;
|
146
|
+
},
|
147
|
+
|
148
|
+
/**
|
149
|
+
Sets the data hash fixture for the named store key.
|
150
|
+
|
151
|
+
@param {SC.Store} store the store
|
152
|
+
@param {Number} storeKey the storeKey
|
153
|
+
@param {Hash} dataHash
|
154
|
+
@returns {SC.FixturesDataSource} receiver
|
155
|
+
*/
|
156
|
+
setFixtureForStoreKey: function(store, storeKey, dataHash) {
|
157
|
+
var id = store.idFor(storeKey),
|
158
|
+
recordType = store.recordTypeFor(storeKey),
|
159
|
+
fixtures = this.fixturesFor(recordType);
|
160
|
+
fixtures[id] = dataHash;
|
161
|
+
return this ;
|
162
|
+
},
|
163
|
+
|
164
|
+
/**
|
165
|
+
Invoked methods to ensure fixtures for a particular record type have been
|
166
|
+
loaded.
|
167
|
+
|
168
|
+
@param {SC.Record} recordType
|
169
|
+
@returns {Hash} data hashes
|
170
|
+
*/
|
171
|
+
fixturesFor: function(recordType) {
|
172
|
+
// get basic fixtures hash.
|
173
|
+
if (!this._fixtures) this._fixtures = {};
|
174
|
+
var fixtures = this._fixtures[SC.guidFor(recordType)];
|
175
|
+
if (fixtures) return fixtures ;
|
176
|
+
|
177
|
+
// need to load fixtures.
|
178
|
+
var dataHashes = recordType ? recordType.FIXTURES : null,
|
179
|
+
len = dataHashes ? dataHashes.length : 0,
|
180
|
+
primaryKey = recordType ? recordType.prototype.primaryKey : 'guid',
|
181
|
+
idx, dataHash, id ;
|
182
|
+
|
183
|
+
this._fixtures[SC.guidFor(recordType)] = fixtures = {} ;
|
184
|
+
for(idx=0;idx<len;idx++) {
|
185
|
+
dataHash = dataHashes[idx];
|
186
|
+
id = dataHash[primaryKey];
|
187
|
+
if (!id) id = this.generateIdFor(recordType, dataHash);
|
188
|
+
fixtures[id] = dataHash;
|
189
|
+
}
|
190
|
+
return fixtures;
|
191
|
+
}
|
192
|
+
|
193
|
+
});
|
194
|
+
|
195
|
+
// create default instance for use when configuring
|
196
|
+
SC.Record.fixtures = SC.FixturesDataSource.create();
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Apple, Inc. and contributors.
|
4
|
+
// License: Licened under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
|
7
|
+
// 50 JSON records.
|
8
|
+
var json0_9 = [
|
9
|
+
{"type": "Author", "guid": "4995bc653acad","fullName": "Trecia Williamson 4", "bookTitle": "The Death Doors", "address":" UC Santa Cruz, 35 First St, Wichita, KS"},
|
10
|
+
{"type": "Author", "guid": "4995bc653acfe","fullName": "Jarrod Schreckengost 1", "bookTitle": "The Fear of the Thieves", "address":" Michigan State University, 285 Lazaneo St, Ann Arbor, MI"},
|
11
|
+
{"type": "Author", "guid": "4995bc653ad23","fullName": "Colbert Ward 3", "bookTitle": "The Menace Myth", "address":" College University, 351 Van Ness Blvd, London, UK"},
|
12
|
+
{"type": "Author", "guid": "4995bc653ad43","fullName": "Kurtis Hall 3", "bookTitle": "The Creature of Madness", "address":" MIT, 122 Fifth Ave, Santa Clara, CA"},
|
13
|
+
{"type": "Author", "guid": "4995bc653ad56","fullName": "Marilyn Bellinger 2", "bookTitle": "The Fear of the Gods", "address":" New York University, 438 Dana St, Southampton, UK"},
|
14
|
+
{"type": "Author", "guid": "4995bc653ad6b","fullName": "Annalisa Butt 1", "bookTitle": "The Planet of Horror", "address":" Foothill College, 146 Bloom St, Los Angeles, CA"},
|
15
|
+
{"type": "Author", "guid": "4995bc653ad7f","fullName": "Jesse Robinson 4", "bookTitle": "The Ice of Madness", "address":" Michigan State University, 153 Broadway Blvd, Los Angeles, CA"},
|
16
|
+
{"type": "Author", "guid": "4995bc653ad93","fullName": "Zilla Fea 4", "bookTitle": "The Time of the Reign", "address":" Stanford University, 309 Van Ness Blvd, Wichita, KS"},
|
17
|
+
{"type": "Author", "guid": "4995bc653adad","fullName": "Milburn Holdeman 2", "bookTitle": "The Jaws of Night", "address":" Michigan State University, 236 Elm St, St. Louis, MO"},
|
18
|
+
{"type": "Author", "guid": "4995bc653adc4","fullName": "Martina Read 4", "bookTitle": "The Fear of the Spiders", "address":" London University, 142 Castro St, London, UK"}
|
19
|
+
];
|
20
|
+
|
21
|
+
var json10_19 = [
|
22
|
+
{"type": "Author", "guid": "4995bc653ade7","fullName": "Gallagher Burch 1", "bookTitle": "The Day of Time", "address":" CalTech, 92 Main St, San Francisco, CA"},
|
23
|
+
{"type": "Author", "guid": "4995bc653ae03","fullName": "Sorrel Dugmore 3", "bookTitle": "The Madness of the History", "address":" MIT, 120 Dana St, Los Angeles, CA"},
|
24
|
+
{"type": "Author", "guid": "4995bc653ae17","fullName": "Pamila Blois 3", "bookTitle": "The Ultimate Resurrection", "address":" Michigan State University, 262 Fifth Ave, Cupertino, CA"},
|
25
|
+
{"type": "Author", "guid": "4995bc653ae2d","fullName": "Jessamyn Graff 4", "bookTitle": "The Fear of the Key", "address":" Foothill College, 442 Main St, Cupertino, CA"},
|
26
|
+
{"type": "Author", "guid": "4995bc653ae43","fullName": "Camden Whiteman 4", "bookTitle": "The Doomed Monster", "address":" UC Santa Cruz, 64 University Loop, St. Louis, MO"},
|
27
|
+
{"type": "Author", "guid": "4995bc653ae64","fullName": "Eldon Ream 1", "bookTitle": "The Impossible Herald", "address":" London University, 32 Dana St, New York, NY"},
|
28
|
+
{"type": "Author", "guid": "4995bc653ae78","fullName": "Erskine Aultman 2", "bookTitle": "The Thief", "address":" University of Southampton, 101 Oak Ave, Ann Arbor, MI"},
|
29
|
+
{"type": "Author", "guid": "4995bc653ae8c","fullName": "Missie Marjorie 4", "bookTitle": "The Warrior of Horror", "address":" Springfield University, 452 Lazaneo St, London, UK"},
|
30
|
+
{"type": "Author", "guid": "4995bc653ae9f","fullName": "Lonnie Linton 3", "bookTitle": "The Time of the Dead", "address":" Harvard, 140 Castro St, Cupertino, CA"},
|
31
|
+
{"type": "Author", "guid": "4995bc653aeba","fullName": "Lesley Sanforth 4", "bookTitle": "The Underworld", "address":" New York University, 43 Fifth Ave, Southampton, UK"}
|
32
|
+
];
|
33
|
+
|
34
|
+
var json20_29 = [
|
35
|
+
{"type": "Author", "guid": "4995bc653aecc","fullName": "Alton Saline 4", "bookTitle": "The Horror Secret", "address":" Santa Clara University, 431 Main St, Seattle, WA"},
|
36
|
+
{"type": "Author", "guid": "4995bc653aee2","fullName": "Homer Sandys 2", "bookTitle": "The Day Seeds", "address":" Stanford University, 75 First St, Wichita, KS"},
|
37
|
+
{"type": "Author", "guid": "4995bc653aef6","fullName": "Katherine Hozier 3", "bookTitle": "The Dominators", "address":" Stanford University, 348 Broadway Blvd, Seattle, WA"},
|
38
|
+
{"type": "Author", "guid": "4995bc653af0a","fullName": "Lavone Baxter 2", "bookTitle": "The Bride of Day", "address":" Foothill College, 34 Bloom St, Cambridge, MA"},
|
39
|
+
{"type": "Author", "guid": "4995bc653af24","fullName": "Hailey Berkheimer 3", "bookTitle": "The Long Machine", "address":" Santa Clara University, 47 Broadway Blvd, San Francisco, CA"},
|
40
|
+
{"type": "Author", "guid": "4995bc653af3b","fullName": "Shanelle Fry 2", "bookTitle": "The Enemies of Fear", "address":" Foothill College, 323 Van Ness Blvd, Southampton, UK"},
|
41
|
+
{"type": "Author", "guid": "4995bc653af5e","fullName": "Booker Earl 2", "bookTitle": "The Fury Doors", "address":" Harvard, 180 Castro St, Cambridge, MA"},
|
42
|
+
{"type": "Author", "guid": "4995bc653af72","fullName": "Emery Cavalet 2", "bookTitle": "The Inferno", "address":" Stanford University, 430 Dana St, St. Louis, MO"},
|
43
|
+
{"type": "Author", "guid": "4995bc653af86","fullName": "Robynne Unk 3", "bookTitle": "The Fear Memories", "address":" Foothill College, 343 Lazaneo St, Santa Clara, CA"},
|
44
|
+
{"type": "Author", "guid": "4995bc653af9a","fullName": "Lyssa Ashbaugh 1", "bookTitle": "The Angels", "address":" Harvard, 42 First St, Palo Alto, CA"}
|
45
|
+
];
|
46
|
+
|
47
|
+
var json30_39 = [
|
48
|
+
{"type": "Author", "guid": "4995bc653afb5","fullName": "Rolph Burris 3", "bookTitle": "Dreams of Menace", "address":" Springfield University, 256 Fifth Ave, Southampton, UK"},
|
49
|
+
{"type": "Author", "guid": "4995bc653afcb","fullName": "Sheree Kiefer 1", "bookTitle": "The Doom of the Night", "address":" Michigan State University, 432 Dana St, Palo Alto, CA"},
|
50
|
+
{"type": "Author", "guid": "4995bc653afde","fullName": "Shaun Drabble 2", "bookTitle": "The Future Creatures", "address":" Springfield University, 388 Fifth Ave, Los Angeles, CA"},
|
51
|
+
{"type": "Author", "guid": "4995bc653aff4","fullName": "Melvyn Stafford 1", "bookTitle": "The Fury of the Runaway", "address":" New York University, 252 Dana St, Southampton, UK"},
|
52
|
+
{"type": "Author", "guid": "4995bc653b008","fullName": "Alfreda Rahl 3", "bookTitle": "The Time of the Enemies", "address":" CalTech, 13 Bloom St, Los Angeles, CA"},
|
53
|
+
{"type": "Author", "guid": "4995bc653b022","fullName": "Auberon Coughenour 1", "bookTitle": "The Horror of the Rock", "address":" MIT, 429 Bloom St, Cambridge, MA"},
|
54
|
+
{"type": "Author", "guid": "4995bc653b043","fullName": "Clitus Mccallum 2", "bookTitle": "The Horror Dead", "address":" Springfield University, 121 Bloom St, Palo Alto, CA"},
|
55
|
+
{"type": "Author", "guid": "4995bc653b05f","fullName": "Jackie Munson 4", "bookTitle": "Seed of Day", "address":" Stanford University, 232 Oak Ave, San Francisco, CA"},
|
56
|
+
{"type": "Author", "guid": "4995bc653b075","fullName": "Kerri Mayers 3", "bookTitle": "The Madness of the Fear", "address":" Foothill College, 443 Lazaneo St, Southampton, UK"},
|
57
|
+
{"type": "Author", "guid": "4995bc653b08a","fullName": "Lyric Richards 3", "bookTitle": "The Horror Dead", "address":" Michigan State University, 391 Van Ness Blvd, London, UK"}
|
58
|
+
];
|
59
|
+
|
60
|
+
var json40_49 = [
|
61
|
+
{"type": "Author", "guid": "4995bc653b09f","fullName": "Marci Caesar 1", "bookTitle": "The Seventh Child", "address":" College University, 469 Dana St, London, UK"},
|
62
|
+
{"type": "Author", "guid": "4995bc653b0b7","fullName": "Jade Sloan 4", "bookTitle": "The Menace of the Seas", "address":" UC Santa Cruz, 295 Van Ness Blvd, Cambridge, MA"},
|
63
|
+
{"type": "Author", "guid": "4995bc653b0cf","fullName": "Leyton Jyllian 2", "bookTitle": "The Foe", "address":" Stanford University, 419 University Loop, St. Louis, MO"},
|
64
|
+
{"type": "Author", "guid": "4995bc653b11d","fullName": "Janette Koepple 2", "bookTitle": "The Arc of Day", "address":" Springfield University, 57 Main St, Wichita, KS"},
|
65
|
+
{"type": "Author", "guid": "4995bc653b136","fullName": "Thea Sullivan 4", "bookTitle": "Suns of Doom", "address":" Michigan State University, 115 First St, Cupertino, CA"},
|
66
|
+
{"type": "Author", "guid": "4995bc653b14a","fullName": "Caileigh Todd 3", "bookTitle": "The Horror Leisure", "address":" UC Santa Cruz, 330 First St, London, UK"},
|
67
|
+
{"type": "Author", "guid": "4995bc653b15f","fullName": "Melvin Wilkerson 1", "bookTitle": "The Menace Alien", "address":" University of Southampton, 490 Elm St, Wichita, KS"},
|
68
|
+
{"type": "Author", "guid": "4995bc653b173","fullName": "Leyton Jyllian 4", "bookTitle": "The Assassin of Fear", "address":" Harvard, 60 Elm St, Palo Alto, CA"},
|
69
|
+
{"type": "Author", "guid": "4995bc653b187","fullName": "Sloane Moulton 1", "bookTitle": "The Crater of Horror", "address":" University of Southampton, 272 Broadway Blvd, New York, NY"},
|
70
|
+
{"type": "Author", "guid": "4995bc653b19b","fullName": "Tamsen Newton 3", "bookTitle": "The Long Crater", "address":" Harvard, 420 Second St, St. Louis, MO"}
|
71
|
+
];
|