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
@@ -0,0 +1,124 @@
|
|
1
|
+
// ========================================================================
|
2
|
+
// SproutCore -- JavaScript Application Framework
|
3
|
+
// Copyright ©2006-2008, Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions copyright ©2008 Apple, Inc. All rights reserved.
|
5
|
+
// ========================================================================
|
6
|
+
|
7
|
+
require('system/object') ;
|
8
|
+
|
9
|
+
SC.mixin(SC.Object, {
|
10
|
+
|
11
|
+
/** @deprecated
|
12
|
+
This method will listen for the observed value to change one time and
|
13
|
+
then will remove itself. You can also set an optional timeout that
|
14
|
+
will cause the function to be triggered (and the observer removed) after
|
15
|
+
a set amount of time even if the value never changes. The function
|
16
|
+
can expect an extra parameter, 'didTimeout', set to true.
|
17
|
+
|
18
|
+
The returned value is the function actually set as the observer. You
|
19
|
+
can manually remove this observer by calling the cancel() method on it.
|
20
|
+
*/
|
21
|
+
observeOnce: function(key, target, method, timeout) {
|
22
|
+
|
23
|
+
// fixup the params
|
24
|
+
var targetType = SC.typeOf(target) ;
|
25
|
+
if (targetType === SC.T_FUNCTION) {
|
26
|
+
if ((SC.typeOf(method) === SC.T_NUMBER) && (timeout === undefined)) {
|
27
|
+
timeout = method ;
|
28
|
+
}
|
29
|
+
method = target ;
|
30
|
+
target = this ;
|
31
|
+
}
|
32
|
+
|
33
|
+
// convert the method to a function if needed...
|
34
|
+
if (SC.typeOf(method) === SC.T_STRING) method = target[method] ;
|
35
|
+
if (!method) throw "You must pass a valid method to observeOnce()";
|
36
|
+
|
37
|
+
var timeoutObject = null ;
|
38
|
+
|
39
|
+
// define a custom observer that will call the target method and remove
|
40
|
+
// itself as an observer.
|
41
|
+
var handler = function(observer, target, property, value, rev, didTimeout) {
|
42
|
+
// invoke method...
|
43
|
+
method.call(this, observer, target, property, value, rev, didTimeout);
|
44
|
+
|
45
|
+
// remove observer...
|
46
|
+
target.removeObserver(key, this, handler) ;
|
47
|
+
|
48
|
+
// if there is a timeout, invalidate it.
|
49
|
+
if (timeoutObject) { timeoutObject.invalidate();}
|
50
|
+
|
51
|
+
// avoid memory leaks
|
52
|
+
handler = target = method = timeoutObject = null;
|
53
|
+
} ;
|
54
|
+
|
55
|
+
// now add observer
|
56
|
+
target.addObserver(key, target, handler) ;
|
57
|
+
if (timeout) {
|
58
|
+
timeoutObject = function() {
|
59
|
+
handler(null, target, key, target.get(key), target.propertyRevision, true) ;
|
60
|
+
handler = target = method = timeoutObject = null;
|
61
|
+
}.invokeLater(this, timeout) ;
|
62
|
+
}
|
63
|
+
|
64
|
+
handler.cancel = function() {
|
65
|
+
target.removeObserver(key, target, handler);
|
66
|
+
handler = target = method = timeoutObject = null;
|
67
|
+
} ;
|
68
|
+
|
69
|
+
return handler ;
|
70
|
+
},
|
71
|
+
|
72
|
+
/** @deprecated
|
73
|
+
Takes an array of hashes and returns newly created instances.
|
74
|
+
|
75
|
+
This convenience method will take an array of properties and simply
|
76
|
+
instantiates objects from them.
|
77
|
+
|
78
|
+
@params {Array} array Array of hashes with properties to assigned to each object.
|
79
|
+
@returns {Array} instantiated objects.
|
80
|
+
*/
|
81
|
+
createEach: function(array) {
|
82
|
+
return array.map(function(props) { return this.create(props); }, this);
|
83
|
+
},
|
84
|
+
|
85
|
+
/** @deprecated
|
86
|
+
Adding this function to the end of a view declaration will define the
|
87
|
+
class as an outlet that can be constructed using the outlet() method
|
88
|
+
(instead of get()).
|
89
|
+
|
90
|
+
@returns {Outlet} a specially constructed function that will be used to
|
91
|
+
build the outlet later.
|
92
|
+
*/
|
93
|
+
outlet: function() {
|
94
|
+
var obj = this ;
|
95
|
+
return function() {
|
96
|
+
var ret = obj.create() ; ret.owner = this ; return ret ;
|
97
|
+
}.property().cacheable().outlet() ;
|
98
|
+
},
|
99
|
+
|
100
|
+
/** @deprecated
|
101
|
+
Returns all the keys defined on this object, excluding any defined in
|
102
|
+
parent classes unless you pass all.
|
103
|
+
|
104
|
+
@param {Boolean} all OPTIONAL: if YES return all keys, NO return only keys belonging to object itself. Defaults to NO.
|
105
|
+
@returns {Array} keys
|
106
|
+
*/
|
107
|
+
keys: function(all) {
|
108
|
+
var ret = [];
|
109
|
+
for(var key in this) {
|
110
|
+
if (all || ret.hasOwnProperty(key)) ret.push(key);
|
111
|
+
}
|
112
|
+
return ret ;
|
113
|
+
},
|
114
|
+
|
115
|
+
tupleForPropertyPath: SC.tupleForPropertyPath,
|
116
|
+
objectForPropertyPath: SC.objectForPropertyPath,
|
117
|
+
createArray: SC.Object.createEach
|
118
|
+
});
|
119
|
+
|
120
|
+
/** @deprecated
|
121
|
+
outlet() now works just like get(). Use get() instead.
|
122
|
+
*/
|
123
|
+
SC.Object.prototype.outlet = SC.Object.prototype.get ;
|
124
|
+
|
@@ -0,0 +1,433 @@
|
|
1
|
+
// ========================================================================
|
2
|
+
// SproutCore -- JavaScript Application Framework
|
3
|
+
// Copyright ©2006-2008, Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions copyright ©2008 Apple, Inc. All rights reserved.
|
5
|
+
// ========================================================================
|
6
|
+
//
|
7
|
+
// When creating a web app, you often need to find elements in your page to
|
8
|
+
// configure them on load. These elements are often marked with a class or
|
9
|
+
// id. General purpose methods such as $$() or getElementsByClassName are
|
10
|
+
// not very good for this because they search entire trees of nodes.
|
11
|
+
//
|
12
|
+
// These methods are much faster because they make some assumptions about
|
13
|
+
// how your elements are structured.
|
14
|
+
//
|
15
|
+
// ==========================================================================
|
16
|
+
|
17
|
+
require('core') ;
|
18
|
+
require('system/benchmark') ;
|
19
|
+
|
20
|
+
// Constants
|
21
|
+
SC.BENCHMARK_SELECTOR = NO ;
|
22
|
+
NO_LIMIT = 10000 ;
|
23
|
+
|
24
|
+
/**
|
25
|
+
PathModule is high-performance API for locating DOM nodes in your HTML
|
26
|
+
document. It's designed to be used by searching elements from a parent
|
27
|
+
node.
|
28
|
+
|
29
|
+
PathModule is patched into Prototypes Element.Methods, which means that
|
30
|
+
you can automatically access this API for any DOM element retrieved via
|
31
|
+
the $() operator. You can also mixin the PathModule api to your own
|
32
|
+
objects. Be sure to also have a property called rootElement that points to
|
33
|
+
the root DOM element you want to search.
|
34
|
+
*/
|
35
|
+
SC.PathModule = {
|
36
|
+
|
37
|
+
// NOTE: The code below simulates having document.rootElement = document.
|
38
|
+
// we can't actually do this assignment because it will leak memory in IE.
|
39
|
+
|
40
|
+
$$func: function(func, levels, max, nest) {
|
41
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
42
|
+
return SC._PathModule.$$func(el,func,levels,max,nest);
|
43
|
+
},
|
44
|
+
|
45
|
+
$$C: function(className, levels, max, nest) {
|
46
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
47
|
+
return SC._PathModule.$$C(el,className,levels,max,nest);
|
48
|
+
},
|
49
|
+
|
50
|
+
$$T: function(tagName, levels, max, nest) {
|
51
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
52
|
+
return SC._PathModule.$$T(el,tagName,levels,max,nest);
|
53
|
+
},
|
54
|
+
|
55
|
+
$$P: function(property, value, levels, max, nest) {
|
56
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
57
|
+
return SC._PathModule.$$P(el, property, value, levels, max, nest);
|
58
|
+
},
|
59
|
+
|
60
|
+
$$S: function(selector, levels, max, nest) {
|
61
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
62
|
+
return SC._PathModule.$$S(el, selector, levels, max, nest);
|
63
|
+
},
|
64
|
+
|
65
|
+
// finds the first node for which func returns true.
|
66
|
+
$func: function(func, levels) {
|
67
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
68
|
+
return SC._PathModule.$func(el, func, levels);
|
69
|
+
},
|
70
|
+
|
71
|
+
// finds the first node with class name. returns element, not array.
|
72
|
+
$C: function(className, levels) {
|
73
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
74
|
+
return SC._PathModule.$C(el, className, levels);
|
75
|
+
},
|
76
|
+
|
77
|
+
// finds the first node with tag name. returns element, not array.
|
78
|
+
$T: function(tagName, levels) {
|
79
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
80
|
+
return SC._PathModule.$T(el, tagName, levels);
|
81
|
+
},
|
82
|
+
|
83
|
+
// find first node with an attribute matching then named value.
|
84
|
+
$P: function(attr, value, levels) {
|
85
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
86
|
+
return SC._PathModule.$P(el, attr, value, levels);
|
87
|
+
},
|
88
|
+
|
89
|
+
// find first node matching the specified class selector.
|
90
|
+
$S: function(selector, levels) {
|
91
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
92
|
+
return SC._PathModule.$S(el, selector, levels);
|
93
|
+
},
|
94
|
+
|
95
|
+
// find an element and configure it as the named view if it is not already
|
96
|
+
// configured.
|
97
|
+
$$view: function(selector, viewClass, levels, max, nest) {
|
98
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
99
|
+
return SC._PathModule.$$view(el, selector, viewClass, levels, max, nest) ;
|
100
|
+
},
|
101
|
+
|
102
|
+
// find the first element matching the selector and create a view if it is
|
103
|
+
// not already configured.
|
104
|
+
$view: function(selector, viewClass, levels) {
|
105
|
+
var el = (this.rootElement) ? this.rootElement : (this === document) ? document : null ;
|
106
|
+
return SC._PathModule.$view(el, selector, viewClass, levels) ;
|
107
|
+
}
|
108
|
+
|
109
|
+
};
|
110
|
+
|
111
|
+
// This version of PathModule can be added to Element.Methods among others.
|
112
|
+
// It is the same API except that it passes the element as the first parameter.
|
113
|
+
SC._PathModule = {
|
114
|
+
|
115
|
+
// this is the core method that needs to be implemented for each object.
|
116
|
+
// this method will search the receiver (up to _levels_ deep) for _max_
|
117
|
+
// elements for which the function func() returns true.
|
118
|
+
//
|
119
|
+
// el: (req) the root element. If you pass null, document will be used.
|
120
|
+
// func: (req) the function to be used to check each element.
|
121
|
+
// levels: (opt) the max levels deep in nested elements. defaults: NO_LIMIT
|
122
|
+
// max: (opt) the maximum number of elements to return. defaults:
|
123
|
+
// NO_LIMIT
|
124
|
+
// nest: (opt) if true, then the children of matched elements will also be
|
125
|
+
// searched. if your element matches will never be nested, setting
|
126
|
+
// this to false can be much faster. defaults: false
|
127
|
+
$$func: function(el, func, levels, max, nest) {
|
128
|
+
// defaults
|
129
|
+
levels = levels || NO_LIMIT ; max = max || NO_LIMIT; nest = nest || false;
|
130
|
+
|
131
|
+
// function to search this node.
|
132
|
+
var searchNode = function(node, depth, remain, includeThisNode) {
|
133
|
+
var ret = [] ;
|
134
|
+
|
135
|
+
// does this node match?
|
136
|
+
// we extend any returned elements so you can chain these methods.
|
137
|
+
// on browsers that support HTMLElement.prototype, this will do nothing.
|
138
|
+
var match = (includeThisNode) ? func(node) : false ;
|
139
|
+
if (match) { ret.push(node); remain--; }
|
140
|
+
|
141
|
+
// can we search children?
|
142
|
+
depth-- ;
|
143
|
+
if ((match && !nest) || (remain<=0) || (depth<=0)) return ret;
|
144
|
+
|
145
|
+
// search children.
|
146
|
+
node = node.firstChild ;
|
147
|
+
while(node && (remain > 0)) {
|
148
|
+
var found = searchNode(node,depth,remain,true) ;
|
149
|
+
remain -= found.length ;
|
150
|
+
ret = ret.concat(found) ;
|
151
|
+
node = node.nextSibling ;
|
152
|
+
}
|
153
|
+
return ret ;
|
154
|
+
} ;
|
155
|
+
|
156
|
+
return searchNode(el || document, levels+1, max, false) ;
|
157
|
+
},
|
158
|
+
|
159
|
+
// finds all nodes with class name.
|
160
|
+
$$C: function(el, className, levels, max, nest) {
|
161
|
+
return SC._PathModule.$$func(el, function(node) {
|
162
|
+
return Element.hasClassName(node, className) ;
|
163
|
+
}, levels, max, nest) ;
|
164
|
+
},
|
165
|
+
|
166
|
+
// find all nodes with tag name
|
167
|
+
$$T: function(el, tagName, levels, max, nest) {
|
168
|
+
tagName = tagName.toUpperCase() ;
|
169
|
+
return SC._PathModule.$$func(el, function(node) {
|
170
|
+
return node.tagName == tagName;
|
171
|
+
}, levels, max, nest) ;
|
172
|
+
},
|
173
|
+
|
174
|
+
// find all nodes with an attribute matching then named value.
|
175
|
+
$$P: function(el, property, value, levels, max, nest) {
|
176
|
+
return SC._PathModule.$$func(el, function(node) {
|
177
|
+
var pvalue = (node.getAttribute) ? node.getAttribute(property) : node[property] ;
|
178
|
+
return pvalue == value;
|
179
|
+
}, levels, max, nest) ;
|
180
|
+
},
|
181
|
+
|
182
|
+
// this will parse the selector and then execute the selectors to return
|
183
|
+
// the result. this understands a very simple form for selectors. the
|
184
|
+
// parts are split by spaces. and treated like so:
|
185
|
+
// '.classname' = class name
|
186
|
+
// 'tag' = tag
|
187
|
+
// '#id' = an id. (this will bypass the normal selector methods)
|
188
|
+
// 'attr=value' = find an attr with the value.
|
189
|
+
//
|
190
|
+
// understands the following qualifiers:
|
191
|
+
// .selector:3 => find .selector at most 3 levels deep
|
192
|
+
// .selector:3:4 => find at most 4 .selectors at most 3 levels deep
|
193
|
+
// .selector? => find at most 1 .selector, any depth.
|
194
|
+
// .selector?3 => find at most 3 .selectors, any depth
|
195
|
+
// .selector:*:4 => find at more 4 .selectors at any depth.
|
196
|
+
//
|
197
|
+
// You can also directly access child nodes by doing:
|
198
|
+
// .selector[0][1][3] -> get child 3 of child 1 of child 0.
|
199
|
+
// or:
|
200
|
+
// [0][2][3] -> search base.
|
201
|
+
//
|
202
|
+
$$S: function(el,selector, levels, max, nest) {
|
203
|
+
var parts = selector.split(' ') ;
|
204
|
+
var ret = [el] ; var nextMax = null ; var bits ;
|
205
|
+
var blevels; var bmax; var q; var indicies ;
|
206
|
+
|
207
|
+
parts.each(function(part) {
|
208
|
+
// this is included for compatibility with earlier changes I made to
|
209
|
+
// prototype. the preferred way to do this in the future is with with
|
210
|
+
// the colon format.
|
211
|
+
if (part == '?') { nextMax = 1; return ; }
|
212
|
+
|
213
|
+
// get defaults
|
214
|
+
blevels = levels; bmax = (nextMax) ? nextMax : max ;
|
215
|
+
nextMax = null ;
|
216
|
+
|
217
|
+
// if there are indexes, find those and save them.
|
218
|
+
if (part.slice(part.length-1,part.length) == ']') {
|
219
|
+
bits = part.split('[') ;
|
220
|
+
part = bits.shift();
|
221
|
+
indicies = bits.map(function(b) {return parseInt(b.slice(0,-1),0);});
|
222
|
+
} else indicies = null ;
|
223
|
+
|
224
|
+
// find found modifiers
|
225
|
+
bits = part.split('?') ;
|
226
|
+
part = bits[0] ;
|
227
|
+
if (bits.length > 1) {
|
228
|
+
bmax = (bits[1].length == 0) ? 1 : parseInt(bits[1],0) ;
|
229
|
+
}
|
230
|
+
|
231
|
+
// find level modifiers
|
232
|
+
bits = part.split(':') ;
|
233
|
+
part = bits[0] ;
|
234
|
+
if (bits.length > 1) blevels = (bits[1] == '*') ? '*' : parseInt(bits[1],0) ;
|
235
|
+
if (bits.length > 2) bmax = (bits[2] == '*') ? '*' : parseInt(bits[2],0) ;
|
236
|
+
|
237
|
+
// convert star to NO_LIMIT
|
238
|
+
if (blevels == '*') blevels = NO_LIMIT ;
|
239
|
+
if (bmax == '*') bmax = NO_LIMIT ;
|
240
|
+
|
241
|
+
// prepare the selector info.
|
242
|
+
// q tells us how to process the first part.
|
243
|
+
// part is the first part of the selector
|
244
|
+
// bits are any extra css selectors.
|
245
|
+
if (part && part.length > 0) {
|
246
|
+
q = part.slice(0,1) ;
|
247
|
+
if (['.','#'].indexOf(q) >= 0) {
|
248
|
+
part = part.slice(1,part.length) ;
|
249
|
+
}
|
250
|
+
|
251
|
+
bits = part.split('.') ;
|
252
|
+
part = bits[0] ;
|
253
|
+
bits = bits.slice(1,bits.length) ;
|
254
|
+
|
255
|
+
// optimization for # types.
|
256
|
+
var fret = null ;
|
257
|
+
if (q == '#') {
|
258
|
+
fret = $(part) ;
|
259
|
+
fret = (fret) ? [fret] : null ;
|
260
|
+
if (fret) ret = fret ;
|
261
|
+
}
|
262
|
+
|
263
|
+
// otherwise pass this off to $$func to actually search.
|
264
|
+
if (fret == null) {
|
265
|
+
fret = [] ;
|
266
|
+
for(var i=0;i<ret.length;i++) {
|
267
|
+
|
268
|
+
var found = SC._PathModule.$$func(ret[i],function(node) {
|
269
|
+
var match ;
|
270
|
+
switch(q) {
|
271
|
+
case '.':
|
272
|
+
NODE = node ;
|
273
|
+
var elementClassName = node.className;
|
274
|
+
if (elementClassName && (elementClassName.length > 0)) {
|
275
|
+
match = (elementClassName == part ||
|
276
|
+
elementClassName.match( new RegExp("(^|\\s)" + part +
|
277
|
+
"(\\s|$)"))) ;
|
278
|
+
} else match = false ;
|
279
|
+
break ;
|
280
|
+
case '#':
|
281
|
+
match = node.id == part ;
|
282
|
+
break ;
|
283
|
+
default:
|
284
|
+
if (node.tagName) {
|
285
|
+
match = (node.tagName.toLowerCase() == part.toLowerCase()) ;
|
286
|
+
} else { match = false; }
|
287
|
+
}
|
288
|
+
|
289
|
+
// if the first item matched, verify that the others match as well.
|
290
|
+
var ilen = bits.length ;
|
291
|
+
for(var i=0; match && i < ilen; i++) {
|
292
|
+
if (!Element.hasClassName(node,bits[i])) match = false ;
|
293
|
+
}
|
294
|
+
return match ;
|
295
|
+
}, blevels, bmax, nest) ;
|
296
|
+
fret = fret.concat(found) ;
|
297
|
+
}
|
298
|
+
ret = fret ;
|
299
|
+
}
|
300
|
+
} else if (SC.typeOf(ret) != SC.T_ARRAY) ret = [ret] ;
|
301
|
+
|
302
|
+
// now follow indicies, if there are any
|
303
|
+
if (indicies && indicies.length > 0 && ret) {
|
304
|
+
ret = ret.map(function(el){
|
305
|
+
var iloclen = indicies.length ;
|
306
|
+
for(var iloc=0; el && (iloc < iloclen); iloc++) {
|
307
|
+
el = el.childNodes[indicies[iloc]] ;
|
308
|
+
}
|
309
|
+
return el;
|
310
|
+
}) ;
|
311
|
+
}
|
312
|
+
}) ;
|
313
|
+
return ret ;
|
314
|
+
},
|
315
|
+
|
316
|
+
// finds the first node for which func returns true.
|
317
|
+
$func: function(el,func, levels) {
|
318
|
+
var ret = SC._PathModule.$$func(el,func,levels,1,false) ;
|
319
|
+
return (ret.length>0) ? ret[0] : null ;
|
320
|
+
},
|
321
|
+
|
322
|
+
// finds the first node with class name. returns element, not array.
|
323
|
+
$C: function(el, className, levels) {
|
324
|
+
var ret = SC._PathModule.$$C(el, className,levels,1,false) ;
|
325
|
+
return (ret.length>0) ? ret[0] : null ;
|
326
|
+
},
|
327
|
+
|
328
|
+
// finds the first node with tag name. returns element, not array.
|
329
|
+
$T: function(el, tagName, levels) {
|
330
|
+
var ret = SC._PathModule.$$T(el, tagName,levels,1,false) ;
|
331
|
+
return (ret.length>0) ? ret[0] : null ;
|
332
|
+
},
|
333
|
+
|
334
|
+
// find first node with an attribute matching then named value.
|
335
|
+
$P: function(el, attr, value, levels) {
|
336
|
+
var ret = SC._PathModule.$$P(el, attr, value,levels,1,false) ;
|
337
|
+
return (ret.length>0) ? ret[0] : null ;
|
338
|
+
},
|
339
|
+
|
340
|
+
// find first node matching the specified class selector.
|
341
|
+
$S: function(el, selector, levels) {
|
342
|
+
var ret = SC._PathModule.$$S(el, selector,levels,1,false) ;
|
343
|
+
return (ret.length>0) ? ret[0] : null ;
|
344
|
+
},
|
345
|
+
|
346
|
+
// find an element and configure it as the named view if it is not already
|
347
|
+
// configured.
|
348
|
+
$$view: function(el, selector, viewClass, levels, max, nest) {
|
349
|
+
//if (!viewClass) viewClass = SC.ClassicView;
|
350
|
+
var ret ;
|
351
|
+
if (selector && (typeof(selector) != 'string')) {
|
352
|
+
ret = [selector] ;
|
353
|
+
} else {
|
354
|
+
ret = SC._PathModule.$$S(el,selector,levels,max,nest) ;
|
355
|
+
}
|
356
|
+
if (ret) ret = ret.map(function(x) { return (viewClass) ? viewClass.viewFor(x) : SC.ClassicView.findViewForElement(x); }) ;
|
357
|
+
return ret ;
|
358
|
+
},
|
359
|
+
|
360
|
+
// find the first element matching the selector and create a view if it is
|
361
|
+
// not already configured.
|
362
|
+
$view: function(el, selector, viewClass, levels) {
|
363
|
+
var ret = SC._PathModule.$$view(el, selector, viewClass, levels, 1, false) ;
|
364
|
+
return (ret.length>0) ? ret[0] : null ;
|
365
|
+
}
|
366
|
+
|
367
|
+
} ;
|
368
|
+
|
369
|
+
// Install benchmark report for selector if configured.
|
370
|
+
if (SC.BENCHMARK_SELECTOR) {
|
371
|
+
['$$S','$$C','$$T','$S','$C','$T'].each(function(mname) {
|
372
|
+
SC.Benchmark.install(SC._PathModule,mname) ;
|
373
|
+
}) ;
|
374
|
+
SC.Benchmark.install(window,'$$$') ;
|
375
|
+
}
|
376
|
+
|
377
|
+
// longer form aliases of the functions.
|
378
|
+
SC.mixin(SC._PathModule, {
|
379
|
+
$$class: SC._PathModule.$$C,
|
380
|
+
$$tag: SC._PathModule.$$T,
|
381
|
+
$$sel: SC._PathModule.$$S,
|
382
|
+
$$prop: SC._PathModule.$$P,
|
383
|
+
|
384
|
+
$class: SC._PathModule.$C,
|
385
|
+
$tag: SC._PathModule.$T,
|
386
|
+
$sel: SC._PathModule.$S,
|
387
|
+
$prop: SC._PathModule.$P
|
388
|
+
}) ;
|
389
|
+
|
390
|
+
// longer form aliases of the functions.
|
391
|
+
SC.mixin(SC.PathModule, {
|
392
|
+
$$class: SC.PathModule.$$C,
|
393
|
+
$$tag: SC.PathModule.$$T,
|
394
|
+
$$sel: SC.PathModule.$$S,
|
395
|
+
$$prop: SC.PathModule.$$P,
|
396
|
+
|
397
|
+
$class: SC.PathModule.$C,
|
398
|
+
$tag: SC.PathModule.$T,
|
399
|
+
$sel: SC.PathModule.$S,
|
400
|
+
$prop: SC.PathModule.$P
|
401
|
+
}) ;
|
402
|
+
|
403
|
+
// Add _PathModule to the appropriate elements. Add to Element.Methods which
|
404
|
+
// will cause it to be copied onto elements automatically in IE when you
|
405
|
+
// call IE.
|
406
|
+
SC.mixin(Element.Methods,SC._PathModule) ;
|
407
|
+
SC.mixin(Element,SC._PathModule) ;
|
408
|
+
|
409
|
+
// applies to Element.
|
410
|
+
if (typeof HTMLElement != 'undefined') {
|
411
|
+
SC.mixin(HTMLElement.prototype,SC.PathModule) ;
|
412
|
+
}
|
413
|
+
|
414
|
+
// applies to document
|
415
|
+
SC.mixin(document,SC.PathModule) ;
|
416
|
+
|
417
|
+
// applies to window.
|
418
|
+
SC.mixin(SC.mixin(window,SC.PathModule), {
|
419
|
+
$$func: function(func, levels, max, nest) {
|
420
|
+
return document.$$func(func,levels,max,nest) ;
|
421
|
+
}
|
422
|
+
});
|
423
|
+
|
424
|
+
// applies to arrays. Note the override of $$func to act on the group.
|
425
|
+
SC.mixin(SC.mixin(Array.prototype,SC.PathModule), {
|
426
|
+
$$func: function(func, levels, max, nest) {
|
427
|
+
var ret = [] ;
|
428
|
+
for(var loc=0;loc<this.length;loc++) {
|
429
|
+
ret = ret.concat(this[loc].$$func(func,levels,max,nest)) ;
|
430
|
+
}
|
431
|
+
return ret ;
|
432
|
+
}
|
433
|
+
}) ;
|
@@ -0,0 +1,109 @@
|
|
1
|
+
// ========================================================================
|
2
|
+
// SproutCore -- JavaScript Application Framework
|
3
|
+
// Copyright ©2006-2008, Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions copyright ©2008 Apple, Inc. All rights reserved.
|
5
|
+
// ========================================================================
|
6
|
+
|
7
|
+
require('system/mixins/string');
|
8
|
+
|
9
|
+
// deprecated, mostly useless API, that was blindly copied from Prototype
|
10
|
+
SC.mixin(String.prototype, {
|
11
|
+
|
12
|
+
/** @deprecated
|
13
|
+
Explodes a string into an array of characters.
|
14
|
+
|
15
|
+
@returns {Array}
|
16
|
+
*/
|
17
|
+
toArray: function() {
|
18
|
+
return this.split('');
|
19
|
+
},
|
20
|
+
|
21
|
+
// Deprecated, longer version of this method.
|
22
|
+
format: SC.String.fmt
|
23
|
+
});
|
24
|
+
|
25
|
+
// Add strings for various languages to this collection. String.loc()
|
26
|
+
// method will try to localize the string passed using the current language.
|
27
|
+
// if the language is not available, it will use English.
|
28
|
+
SC.mixin(String,
|
29
|
+
/** @scope String @static */ {
|
30
|
+
|
31
|
+
/** @deprecated
|
32
|
+
The current browser language as a two letter code.
|
33
|
+
Use SC.browser.language instead.
|
34
|
+
*/
|
35
|
+
browserLanguage: ((navigator.language || navigator.browserLanguage).split('-', 1)[0]),
|
36
|
+
|
37
|
+
/** @deprecated
|
38
|
+
If YES, localization will favor the detected language instead of the
|
39
|
+
preferred one.
|
40
|
+
|
41
|
+
Use SC.Locale.useAutodetectedLanguage instead.
|
42
|
+
*/
|
43
|
+
useAutodetectedLanguage: null,
|
44
|
+
|
45
|
+
/** @deprecated
|
46
|
+
This property is set by the build tools to the current build language.
|
47
|
+
Use SC.Locale.preferredLanguage instead
|
48
|
+
*/
|
49
|
+
preferredLanguage: null,
|
50
|
+
|
51
|
+
/** @deprecated
|
52
|
+
Returns the hash key to use for loc strings. The default implementation
|
53
|
+
will autodetect the browser language and look for a loc string to
|
54
|
+
match. If it can't find one then it will introspect to find loc strings
|
55
|
+
that are defined and use those instead.
|
56
|
+
|
57
|
+
Use SC.Locale.currentLanguage property instead.
|
58
|
+
*/
|
59
|
+
currentLanguage: function () {
|
60
|
+
return this.normalizedLanguage(SC.Locale.currentLanguage);
|
61
|
+
},
|
62
|
+
|
63
|
+
/** @deprecated
|
64
|
+
Returns a normalized language string for the two letter country code.
|
65
|
+
|
66
|
+
Use SC.Locale.normalizeLanguage() instead.
|
67
|
+
*/
|
68
|
+
normalizedLanguage: function(ret) {
|
69
|
+
switch(SC.Locale.normalizeLanguage(ret).split('-')[0]) {
|
70
|
+
case 'en':
|
71
|
+
ret = 'English' ;
|
72
|
+
break;
|
73
|
+
case 'fr':
|
74
|
+
ret = 'French' ;
|
75
|
+
break ;
|
76
|
+
case 'ja':
|
77
|
+
ret = 'Japanese' ;
|
78
|
+
break ;
|
79
|
+
case 'de':
|
80
|
+
ret = 'German' ;
|
81
|
+
break ;
|
82
|
+
case 'es':
|
83
|
+
ret = 'Spanish' ;
|
84
|
+
break;
|
85
|
+
default:
|
86
|
+
ret = 'English';
|
87
|
+
}
|
88
|
+
return ret ;
|
89
|
+
},
|
90
|
+
|
91
|
+
/**
|
92
|
+
Adds loc strings for the named language. This method takes care of
|
93
|
+
creating the localized string hash if it does not already exist.
|
94
|
+
The language can be one of the following or any two-letter country code.
|
95
|
+
|
96
|
+
English, French, German, Japanese, Spanish
|
97
|
+
|
98
|
+
@param language {String} the language code
|
99
|
+
@param strings {Hash} hash of loc strings.
|
100
|
+
@returns {this}
|
101
|
+
*/
|
102
|
+
addStringsFor: SC.stringsFor
|
103
|
+
|
104
|
+
});
|
105
|
+
|
106
|
+
String.English = String.English || {};
|
107
|
+
String.French = String.French || {};
|
108
|
+
String.German = String.German || {};
|
109
|
+
String.Japanese = String.Japanese || {};
|