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,40 @@
|
|
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
|
+
// Key Bindings are used to map a keyboard input to an action message on a
|
8
|
+
// responder. These bindings are most useful when implementing sophisticated
|
9
|
+
// keyboard input mechanisms. For keyboard shortcuts, instead use menus, etc.
|
10
|
+
|
11
|
+
SC.MODIFIED_KEY_BINDINGS = {
|
12
|
+
'ctrl_.': 'cancel',
|
13
|
+
'shift_tab': 'insertBacktab',
|
14
|
+
'shift_left': 'moveLeftAndModifySelection',
|
15
|
+
'shift_right': 'moveRightAndModifySelection',
|
16
|
+
'shift_up': 'moveUpAndModifySelection',
|
17
|
+
'shift_down': 'moveDownAndModifySelection',
|
18
|
+
'alt_left': 'moveLeftAndModifySelection',
|
19
|
+
'alt_right': 'moveRightAndModifySelection',
|
20
|
+
'alt_up': 'moveUpAndModifySelection',
|
21
|
+
'alt_down': 'moveDownAndModifySelection',
|
22
|
+
'ctrl_a': 'selectAll'
|
23
|
+
} ;
|
24
|
+
|
25
|
+
SC.BASE_KEY_BINDINGS = {
|
26
|
+
'escape': 'cancel',
|
27
|
+
'backspace': 'deleteBackward',
|
28
|
+
'delete': 'deleteForward',
|
29
|
+
'return': 'insertNewline',
|
30
|
+
'tab': 'insertTab',
|
31
|
+
'left': 'moveLeft',
|
32
|
+
'right': 'moveRight',
|
33
|
+
'up': 'moveUp',
|
34
|
+
'down': 'moveDown',
|
35
|
+
'home': 'moveToBeginningOfDocument',
|
36
|
+
'end': 'moveToEndOfDocument',
|
37
|
+
'pagedown': 'pageDown',
|
38
|
+
'pageup': 'pageUp'
|
39
|
+
} ;
|
40
|
+
|
@@ -0,0 +1,641 @@
|
|
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
|
+
/** Set to NO to leave the backspace key under the control of the browser.*/
|
8
|
+
SC.CAPTURE_BACKSPACE_KEY = NO ;
|
9
|
+
|
10
|
+
/**
|
11
|
+
Order layer for regular Panels. Panels appear in front of the main view,
|
12
|
+
but behind palettes, popups.
|
13
|
+
*/
|
14
|
+
SC.PANEL_ORDER_LAYER = 0x1000 ;
|
15
|
+
|
16
|
+
/**
|
17
|
+
Order layer for Palettes. Palettes appear in front of the main view and
|
18
|
+
panels, but behind popups.
|
19
|
+
*/
|
20
|
+
SC.PALETTE_ORDER_LAYER = 0x2000 ;
|
21
|
+
|
22
|
+
/**
|
23
|
+
Order layer for Popups. Popups appear in fron of hte main view and panels.
|
24
|
+
*/
|
25
|
+
SC.POPUP_ORDER_LAYER = 0x3000 ;
|
26
|
+
|
27
|
+
/*
|
28
|
+
This is the root responder subclass for desktop-style applications. It
|
29
|
+
supports mouse events and window resize events in addition to the built
|
30
|
+
in keyboard handling provided by the base class.
|
31
|
+
*/
|
32
|
+
SC.RootResponder = SC.RootResponder.extend(
|
33
|
+
/** @scope SC.RootResponder.prototype */ {
|
34
|
+
|
35
|
+
platform: 'desktop',
|
36
|
+
|
37
|
+
// ..........................................................
|
38
|
+
// ORDERED PANES
|
39
|
+
//
|
40
|
+
|
41
|
+
/** @property
|
42
|
+
The current front view. This view should have the highest z-index of all
|
43
|
+
the other views.
|
44
|
+
*/
|
45
|
+
focusedPane: function() {
|
46
|
+
var views = this.get('orderedPanes');
|
47
|
+
return views[views.length-1];
|
48
|
+
}.property('orderedPanes'),
|
49
|
+
|
50
|
+
|
51
|
+
/** @property
|
52
|
+
Array of panes currently displayed that can be reordered. This property
|
53
|
+
changes when you orderBack() or orderOut() a pane to determine the next
|
54
|
+
frontmost pane.
|
55
|
+
*/
|
56
|
+
orderedPanes: null,
|
57
|
+
|
58
|
+
/**
|
59
|
+
Inserts the passed panes into the orderedPanes array before the named pane
|
60
|
+
array. Pass null to order at the front. If this changes the frontmost
|
61
|
+
view, then focus will also be shifted. The pane you request must have the
|
62
|
+
same orderLayer property at the pane you are passing in. If it does not,
|
63
|
+
the pane will be placed nearest to the target as possible.
|
64
|
+
|
65
|
+
@param {SC.Pane} pane
|
66
|
+
@param {SC.Pane} beforePane
|
67
|
+
@returns {SC.RootResponder} receiver
|
68
|
+
*/
|
69
|
+
orderBefore: function(pane, beforePane) {
|
70
|
+
var currentFocus = this.get('focusedPane');
|
71
|
+
var panes = this.get('orderedPanes').without(pane);
|
72
|
+
var len, idx, currentOrder, newFocus ;
|
73
|
+
|
74
|
+
// adjust the beforePane to match orderLayer
|
75
|
+
var orderLayer = pane.get('orderLayer');
|
76
|
+
if (beforePane) {
|
77
|
+
len = panes.length;
|
78
|
+
idx = panes.indexOf(beforePane);
|
79
|
+
currentOrder = beforePane.get('orderLayer');
|
80
|
+
|
81
|
+
if (currentOrder<orderLayer) {
|
82
|
+
while((beforePane.get('orderLayer')<orderLayer) && (++idx<len)) beforePane = panes[idx];
|
83
|
+
if (idx>=len) beforePane = null ; // insert at end if needed
|
84
|
+
} else if (currentOrder>orderLayer) {
|
85
|
+
while((beforePane.get('orderLayer')>orderLayer) && (--idx>=0)) beforePane = panes[idx];
|
86
|
+
beforePane = (idx<0) ? panes[0] : panes[idx+1]; // go to next pane
|
87
|
+
}
|
88
|
+
|
89
|
+
// otherwise, find the highest pane matching the order...
|
90
|
+
} else {
|
91
|
+
idx = panes.length ;
|
92
|
+
while((--idx >= 0) && !beforePane) {
|
93
|
+
beforePane = panes[idx] ;
|
94
|
+
if (beforePane.get('orderLayer') > orderLayer) beforePane = null; // try next one
|
95
|
+
}
|
96
|
+
if (idx<0) { // did not find a match, insert at beginning
|
97
|
+
beforePane = panes[0];
|
98
|
+
} else beforePane = panes[idx+1]; // go to next pane
|
99
|
+
}
|
100
|
+
|
101
|
+
// adjust array
|
102
|
+
if (beforePane) {
|
103
|
+
idx = panes.indexOf(beforePane);
|
104
|
+
panes.insertAt(idx, pane);
|
105
|
+
} else panes.push(pane);
|
106
|
+
this.set('orderedPanes', panes); // update
|
107
|
+
|
108
|
+
newFocus = this.get('focusedPane');
|
109
|
+
if (newFocus !== currentFocus) {
|
110
|
+
if (currentFocus) currentFocus.blurTo(newFocus);
|
111
|
+
if (newFocus) newFocus.focusFrom(currentFocus);
|
112
|
+
}
|
113
|
+
|
114
|
+
return this ;
|
115
|
+
},
|
116
|
+
|
117
|
+
/**
|
118
|
+
Removes the named pane from the orderedPanes array. If the pane was also
|
119
|
+
focused, it will also blur the pane and focus the next view. If the view
|
120
|
+
is key, it will also determine the next view to make key by going down the
|
121
|
+
list of ordered panes, finally ending with the mainPane.
|
122
|
+
|
123
|
+
@param {SC.Pane} pane
|
124
|
+
@param {SC.Pane} beforePane
|
125
|
+
@returns {SC.RootResponder} receiver
|
126
|
+
*/
|
127
|
+
orderOut: function(pane) {
|
128
|
+
var currentFocus = this.get('focusedPane'), currentKey = this.get('keyPane');
|
129
|
+
|
130
|
+
var panes = this.get('orderedPanes').without(pane) ;
|
131
|
+
this.set('orderedPanes', panes) ;
|
132
|
+
|
133
|
+
// focus only changes if we are removing the current focus view.
|
134
|
+
// in this case, blur the old view and focus the new. Also, if the view was
|
135
|
+
// key, try to make the new focus view key or make main key.
|
136
|
+
if (currentFocus === pane) {
|
137
|
+
var newFocus = this.get('focusedPane') ;
|
138
|
+
if (currentFocus) currentFocus.blurTo(newFocus) ;
|
139
|
+
if (newFocus) newFocus.focusFrom(currentFocus) ;
|
140
|
+
if (currentKey === pane) this.makeKeyPane(newFocus);
|
141
|
+
|
142
|
+
// if the front is not changing, just check for key view. Go back to main...
|
143
|
+
} else if (currentKey === pane) {
|
144
|
+
this.makeKeyPane(null);
|
145
|
+
}
|
146
|
+
|
147
|
+
return this ;
|
148
|
+
},
|
149
|
+
|
150
|
+
init: function() {
|
151
|
+
sc_super();
|
152
|
+
this.orderedPanes = []; // create new array
|
153
|
+
},
|
154
|
+
|
155
|
+
// .......................................................
|
156
|
+
// EVENT HANDLING
|
157
|
+
//
|
158
|
+
|
159
|
+
setup: function() {
|
160
|
+
// handle basic events
|
161
|
+
this.listenFor('keydown keyup mousedown mouseup click dblclick mouseout mouseover mousemove'.w(), document)
|
162
|
+
.listenFor('resize focus blur'.w(), window);
|
163
|
+
|
164
|
+
// handle special case for keypress- you can't use normal listener to block the backspace key on Mozilla
|
165
|
+
if (this.keypress) {
|
166
|
+
if (SC.CAPTURE_BACKSPACE_KEY && SC.browser.mozilla) {
|
167
|
+
var responder = this ;
|
168
|
+
document.onkeypress = function(e) {
|
169
|
+
e = SC.Event.normalizeEvent(e);
|
170
|
+
return responder.keypress.call(responder, e);
|
171
|
+
};
|
172
|
+
|
173
|
+
SC.Event.add(window, 'unload', this, function() { document.onkeypress = null; }); // be sure to cleanup memory leaks
|
174
|
+
|
175
|
+
// Otherwise, just add a normal event handler.
|
176
|
+
} else SC.Event.add(document, 'keypress', this, this.keypress);
|
177
|
+
}
|
178
|
+
|
179
|
+
// handle these two events specially in IE
|
180
|
+
'drag selectstart'.w().forEach(function(keyName) {
|
181
|
+
var method = this[keyName] ;
|
182
|
+
if (method) {
|
183
|
+
if (SC.browser.msie) {
|
184
|
+
var responder = this ;
|
185
|
+
document.body['on' + keyName] = function(e) {
|
186
|
+
// return method.call(responder, SC.Event.normalizeEvent(e));
|
187
|
+
return method.call(responder, SC.Event.normalizeEvent(event || window.event)); // this is IE :(
|
188
|
+
};
|
189
|
+
|
190
|
+
// be sure to cleanup memory leaks
|
191
|
+
SC.Event.add(window, 'unload', this, function() {
|
192
|
+
document.body['on' + keyName] = null;
|
193
|
+
});
|
194
|
+
|
195
|
+
} else {
|
196
|
+
SC.Event.add(document, keyName, this, method);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}, this);
|
200
|
+
|
201
|
+
// handle mousewheel specifically for FireFox
|
202
|
+
var mousewheel = SC.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel';
|
203
|
+
SC.Event.add(document, mousewheel, this, this.mousewheel);
|
204
|
+
|
205
|
+
// do some initial set
|
206
|
+
this.set('currentWindowSize', this.computeWindowSize()) ;
|
207
|
+
this.focus(); // assume the window is focused when you load.
|
208
|
+
},
|
209
|
+
|
210
|
+
/**
|
211
|
+
Invoked on a keyDown event that is not handled by any actual value. This
|
212
|
+
will get the key equivalent string and then walk down the keyPane, then
|
213
|
+
the focusedPane, then the mainPane, looking for someone to handle it.
|
214
|
+
Note that this will walk DOWN the view hierarchy, not up it like most.
|
215
|
+
|
216
|
+
@returns {Object} Object that handled evet or null
|
217
|
+
*/
|
218
|
+
attemptKeyEquivalent: function(evt) {
|
219
|
+
var ret = null ;
|
220
|
+
|
221
|
+
// keystring is a method name representing the keys pressed (i.e
|
222
|
+
// 'alt_shift_escape')
|
223
|
+
var keystring = evt.commandCodes()[0];
|
224
|
+
|
225
|
+
// couldn't build a keystring for this key event, nothing to do
|
226
|
+
if (!keystring) return NO;
|
227
|
+
|
228
|
+
var keyPane = this.get('keyPane'), mainPane = this.get('mainPane'),
|
229
|
+
mainMenu = this.get('mainMenu');
|
230
|
+
|
231
|
+
// try the keyPane
|
232
|
+
if (keyPane) ret = keyPane.performKeyEquivalent(keystring, evt) ;
|
233
|
+
|
234
|
+
// if not, then try the main pane
|
235
|
+
if (!ret && mainPane && (mainPane!==keyPane)) {
|
236
|
+
ret = mainPane.performKeyEquivalent(keystring, evt);
|
237
|
+
}
|
238
|
+
|
239
|
+
// if not, then try the main menu
|
240
|
+
if (!ret && mainMenu) {
|
241
|
+
ret = mainMenu.performKeyEquivalent(keystring, evt);
|
242
|
+
}
|
243
|
+
|
244
|
+
return ret ;
|
245
|
+
},
|
246
|
+
|
247
|
+
/** @property The last known window size. */
|
248
|
+
currentWindowSize: null,
|
249
|
+
|
250
|
+
/** Computes the window size from the DOM. */
|
251
|
+
computeWindowSize: function() {
|
252
|
+
var size ;
|
253
|
+
if (window.innerHeight) {
|
254
|
+
size = {
|
255
|
+
width: window.innerWidth,
|
256
|
+
height: window.innerHeight
|
257
|
+
} ;
|
258
|
+
|
259
|
+
} else if (document.documentElement && document.documentElement.clientHeight) {
|
260
|
+
size = {
|
261
|
+
width: document.documentElement.clientWidth,
|
262
|
+
height: document.documentElement.clientHeight
|
263
|
+
} ;
|
264
|
+
|
265
|
+
} else if (document.body) {
|
266
|
+
size = {
|
267
|
+
width: document.body.clientWidth,
|
268
|
+
height: document.body.clientHeight
|
269
|
+
} ;
|
270
|
+
}
|
271
|
+
return size;
|
272
|
+
},
|
273
|
+
|
274
|
+
/**
|
275
|
+
On window resize, notifies panes of the change.
|
276
|
+
|
277
|
+
@returns {Boolean}
|
278
|
+
*/
|
279
|
+
resize: function() {
|
280
|
+
this._resize();
|
281
|
+
//this.invokeLater(this._resize, 10);
|
282
|
+
return YES; //always allow normal processing to continue.
|
283
|
+
},
|
284
|
+
|
285
|
+
_resize: function() {
|
286
|
+
// calculate new window size...
|
287
|
+
var newSize = this.computeWindowSize(), oldSize = this.get('currentWindowSize');
|
288
|
+
this.set('currentWindowSize', newSize); // update size
|
289
|
+
|
290
|
+
if (!SC.rectsEqual(newSize, oldSize)) {
|
291
|
+
// notify panes
|
292
|
+
if (this.panes) {
|
293
|
+
SC.RunLoop.begin() ;
|
294
|
+
this.panes.invoke('windowSizeDidChange', oldSize, newSize) ;
|
295
|
+
SC.RunLoop.end() ;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
},
|
299
|
+
|
300
|
+
/**
|
301
|
+
Indicates whether or not the window currently has focus. If you need
|
302
|
+
to do something based on whether or not the window is in focus, you can
|
303
|
+
setup a binding or observer to this property. Note that the SproutCore
|
304
|
+
automatically adds an sc-focus or sc-blur CSS class to the body tag as
|
305
|
+
appropriate. If you only care about changing the appearance of your
|
306
|
+
controls, you should use those classes in your CSS rules instead.
|
307
|
+
*/
|
308
|
+
hasFocus: NO,
|
309
|
+
|
310
|
+
/**
|
311
|
+
Handle window focus. Change hasFocus and add sc-focus CSS class
|
312
|
+
(removing sc-blur). Also notify panes.
|
313
|
+
*/
|
314
|
+
focus: function() {
|
315
|
+
if (!this.get('hasFocus')) {
|
316
|
+
SC.$('body').addClass('sc-focus').removeClass('sc-blur');
|
317
|
+
|
318
|
+
SC.RunLoop.begin();
|
319
|
+
this.set('hasFocus', YES);
|
320
|
+
SC.RunLoop.end();
|
321
|
+
}
|
322
|
+
return YES ; // allow default
|
323
|
+
},
|
324
|
+
|
325
|
+
/**
|
326
|
+
Handle window focus. Change hasFocus and add sc-focus CSS class (removing
|
327
|
+
sc-blur). Also notify panes.
|
328
|
+
*/
|
329
|
+
blur: function() {
|
330
|
+
if (this.get('hasFocus')) {
|
331
|
+
SC.$('body').addClass('sc-blur').removeClass('sc-focus');
|
332
|
+
|
333
|
+
SC.RunLoop.begin();
|
334
|
+
this.set('hasFocus', NO);
|
335
|
+
SC.RunLoop.end();
|
336
|
+
}
|
337
|
+
return YES ; // allow default
|
338
|
+
},
|
339
|
+
|
340
|
+
dragDidStart: function(drag) {
|
341
|
+
// console.log('dragDidStart called in %@ with %@'.fmt(this, drag));
|
342
|
+
// this._mouseDownView = drag ;
|
343
|
+
this._drag = drag ;
|
344
|
+
},
|
345
|
+
|
346
|
+
// .......................................................
|
347
|
+
// KEYBOARD HANDLING
|
348
|
+
//
|
349
|
+
|
350
|
+
_lastModifiers: null,
|
351
|
+
|
352
|
+
/** @private
|
353
|
+
Modifier key changes are notified with a keydown event in most browsers.
|
354
|
+
We turn this into a flagsChanged keyboard event. Normally this does not
|
355
|
+
stop the normal browser behavior.
|
356
|
+
*/
|
357
|
+
_handleModifierChanges: function(evt) {
|
358
|
+
// if the modifier keys have changed, then notify the first responder.
|
359
|
+
var m;
|
360
|
+
m = this._lastModifiers = (this._lastModifiers || { alt: false, ctrl: false, shift: false });
|
361
|
+
|
362
|
+
var changed = false;
|
363
|
+
if (evt.altKey !== m.alt) { m.alt = evt.altKey; changed=true; }
|
364
|
+
if (evt.ctrlKey !== m.ctrl) { m.ctrl = evt.ctrlKey; changed=true; }
|
365
|
+
if (evt.shiftKey !== m.shift) { m.shift = evt.shiftKey; changed=true;}
|
366
|
+
evt.modifiers = m; // save on event
|
367
|
+
|
368
|
+
return (changed) ? (this.sendEvent('flagsChanged', evt) ? evt.hasCustomEventHandling : YES) : YES ;
|
369
|
+
},
|
370
|
+
|
371
|
+
/** @private
|
372
|
+
Determines if the keyDown event is a nonprintable or function key. These
|
373
|
+
kinds of events are processed as keyboard shortcuts. If no shortcut
|
374
|
+
handles the event, then it will be sent as a regular keyDown event.
|
375
|
+
*/
|
376
|
+
_isFunctionOrNonPrintableKey: function(evt) {
|
377
|
+
return !!(evt.altKey || evt.ctrlKey || evt.metaKey || ((evt.charCode !== evt.which) && SC.FUNCTION_KEYS[evt.which]));
|
378
|
+
},
|
379
|
+
|
380
|
+
/** @private
|
381
|
+
Determines if the event simply reflects a modifier key change. These
|
382
|
+
events may generate a flagsChanged event, but are otherwise ignored.
|
383
|
+
*/
|
384
|
+
_isModifierKey: function(evt) {
|
385
|
+
return !!SC.MODIFIER_KEYS[evt.charCode];
|
386
|
+
},
|
387
|
+
|
388
|
+
/** @private
|
389
|
+
The keydown event occurs whenever the physically depressed key changes.
|
390
|
+
This event is used to deliver the flagsChanged event and to with function
|
391
|
+
keys and keyboard shortcuts.
|
392
|
+
|
393
|
+
All actions that might cause an actual insertion of text are handled in
|
394
|
+
the keypress event.
|
395
|
+
*/
|
396
|
+
keydown: function(evt) {
|
397
|
+
// Firefox does NOT handle delete here...
|
398
|
+
if (SC.browser.mozilla > 0 && (evt.which === 8)) return true ;
|
399
|
+
|
400
|
+
// modifier keys are handled separately by the 'flagsChanged' event
|
401
|
+
// send event for modifier key changes, but only stop processing if this
|
402
|
+
// is only a modifier change
|
403
|
+
var ret = this._handleModifierChanges(evt);
|
404
|
+
if (this._isModifierKey(evt)) return ret;
|
405
|
+
|
406
|
+
// if this is a function or non-printable key, try to use this as a key
|
407
|
+
// equivalent. Otherwise, send as a keyDown event so that the focused
|
408
|
+
// responder can do something useful with the event.
|
409
|
+
if (this._isFunctionOrNonPrintableKey(evt)) {
|
410
|
+
// otherwise, send as keyDown event. If no one was interested in this
|
411
|
+
// keyDown event (probably the case), just let the browser do its own
|
412
|
+
// processing.
|
413
|
+
ret = this.sendEvent('keyDown', evt) ;
|
414
|
+
|
415
|
+
// attempt key equivalent if key not handled
|
416
|
+
if (!ret) {
|
417
|
+
ret = this.attemptKeyEquivalent(evt) ;
|
418
|
+
return !ret ;
|
419
|
+
} else {
|
420
|
+
return evt.hasCustomEventHandling ;
|
421
|
+
}
|
422
|
+
}
|
423
|
+
return YES; // allow normal processing...
|
424
|
+
},
|
425
|
+
|
426
|
+
/** @private
|
427
|
+
The keypress event occurs after the user has typed something useful that
|
428
|
+
the browser would like to insert. Unlike keydown, the input codes here
|
429
|
+
have been processed to reflect that actual text you might want to insert.
|
430
|
+
|
431
|
+
Normally ignore any function or non-printable key events. Otherwise, just
|
432
|
+
trigger a keyDown.
|
433
|
+
*/
|
434
|
+
keypress: function(evt) {
|
435
|
+
// delete is handled in keydown() for most browsers
|
436
|
+
if (SC.browser.mozilla > 0 && (evt.which === 8)) {
|
437
|
+
return this.sendEvent('keyDown', evt) ? evt.hasCustomEventHandling:YES;
|
438
|
+
|
439
|
+
// normal processing. send keyDown for printable keys...
|
440
|
+
} else {
|
441
|
+
if (this._isFunctionOrNonPrintableKey(evt)) return YES;
|
442
|
+
if (evt.charCode !== undefined && evt.charCode === 0) return YES;
|
443
|
+
return this.sendEvent('keyDown', evt) ? evt.hasCustomEventHandling:YES;
|
444
|
+
}
|
445
|
+
},
|
446
|
+
|
447
|
+
keyup: function(evt) {
|
448
|
+
// modifier keys are handled separately by the 'flagsChanged' event
|
449
|
+
// send event for modifier key changes, but only stop processing if this is only a modifier change
|
450
|
+
var ret = this._handleModifierChanges(evt);
|
451
|
+
if (this._isModifierKey(evt)) return ret;
|
452
|
+
return this.sendEvent('keyUp', evt) ? evt.hasCustomEventHandling:YES;
|
453
|
+
},
|
454
|
+
|
455
|
+
mousedown: function(evt) {
|
456
|
+
try {
|
457
|
+
// make sure the window gets focus no matter what. FF is inconsistant
|
458
|
+
// about this.
|
459
|
+
this.focus();
|
460
|
+
|
461
|
+
// first, save the click count. Click count resets if your down is
|
462
|
+
// more than 125msec after you last click up.
|
463
|
+
this._clickCount = this._clickCount + 1 ;
|
464
|
+
if (!this._lastMouseUpAt || ((Date.now()-this._lastMouseUpAt) > 200)) {
|
465
|
+
this._clickCount = 1 ;
|
466
|
+
}
|
467
|
+
evt.clickCount = this._clickCount ;
|
468
|
+
|
469
|
+
var view = this.targetViewForEvent(evt) ;
|
470
|
+
view = this._mouseDownView = this.sendEvent('mouseDown', evt, view) ;
|
471
|
+
if (view && view.respondsTo('mouseDragged')) this._mouseCanDrag = YES ;
|
472
|
+
} catch (e) {
|
473
|
+
|
474
|
+
console.log('Exception during mousedown: %@'.fmt(e)) ;
|
475
|
+
this._mouseDownView = null ;
|
476
|
+
this._mouseCanDrag = NO ;
|
477
|
+
throw e;
|
478
|
+
}
|
479
|
+
|
480
|
+
return view ? evt.hasCustomEventHandling : YES;
|
481
|
+
},
|
482
|
+
|
483
|
+
/**
|
484
|
+
mouseUp only gets delivered to the view that handled the mouseDown evt.
|
485
|
+
we also handle click and double click notifications through here to
|
486
|
+
ensure consistant delivery. Note that if mouseDownView is not
|
487
|
+
implemented, then no mouseUp event will be sent, but a click will be
|
488
|
+
sent.
|
489
|
+
*/
|
490
|
+
mouseup: function(evt) {
|
491
|
+
// console.log('mouseup called in %@ with this._mouseDownView = %@'.fmt(this, this._mouseDownView));
|
492
|
+
try {
|
493
|
+
if (this._drag) {
|
494
|
+
this._drag.tryToPerform('mouseUp', evt) ;
|
495
|
+
this._drag = null ;
|
496
|
+
}
|
497
|
+
|
498
|
+
var handler = null, view = this._mouseDownView ;
|
499
|
+
this._lastMouseUpAt = Date.now() ;
|
500
|
+
|
501
|
+
// record click count.
|
502
|
+
evt.clickCount = this._clickCount ;
|
503
|
+
|
504
|
+
// attempt the mouseup call only if there's a target.
|
505
|
+
// don't want a mouseup going to anyone unless they handled the mousedown...
|
506
|
+
if (view) {
|
507
|
+
handler = this.sendEvent('mouseUp', evt, view) ;
|
508
|
+
|
509
|
+
// try doubleClick
|
510
|
+
if (!handler && (this._clickCount === 2)) {
|
511
|
+
handler = this.sendEvent('doubleClick', evt, view) ;
|
512
|
+
}
|
513
|
+
|
514
|
+
// try single click
|
515
|
+
if (!handler) {
|
516
|
+
handler = this.sendEvent('click', evt, view) ;
|
517
|
+
}
|
518
|
+
}
|
519
|
+
|
520
|
+
// try whoever's under the mouse if we haven't handle the mouse up yet
|
521
|
+
if (!handler) {
|
522
|
+
view = this.targetViewForEvent(evt) ;
|
523
|
+
|
524
|
+
// try doubleClick
|
525
|
+
if (this._clickCount === 2) {
|
526
|
+
handler = this.sendEvent('doubleClick', evt, view);
|
527
|
+
}
|
528
|
+
|
529
|
+
// try singleClick
|
530
|
+
if (!handler) {
|
531
|
+
handler = this.sendEvent('click', evt, view) ;
|
532
|
+
}
|
533
|
+
}
|
534
|
+
|
535
|
+
// cleanup
|
536
|
+
this._mouseCanDrag = NO; this._mouseDownView = null ;
|
537
|
+
} catch (e) {
|
538
|
+
console.log('Exception during mouseup: %@'.fmt(e)) ;
|
539
|
+
this._drag = null; this._mouseCanDrag = NO; this._mouseDownView = null ;
|
540
|
+
throw e;
|
541
|
+
}
|
542
|
+
return (handler) ? evt.hasCustomEventHandling : YES ;
|
543
|
+
},
|
544
|
+
|
545
|
+
dblclick: function(evt){
|
546
|
+
if (SC.browser.isIE) {
|
547
|
+
this._clickCount = 2;
|
548
|
+
// this._onmouseup(evt);
|
549
|
+
this.mouseup(evt);
|
550
|
+
}
|
551
|
+
},
|
552
|
+
|
553
|
+
mousewheel: function(evt) {
|
554
|
+
try {
|
555
|
+
var view = this.targetViewForEvent(evt) ;
|
556
|
+
var handler = this.sendEvent('mouseWheel', evt, view) ;
|
557
|
+
} catch (e) {
|
558
|
+
console.log('Exception during mousewheel: %@'.fmt(e)) ;
|
559
|
+
throw e;
|
560
|
+
}
|
561
|
+
return (handler) ? evt.hasCustomEventHandling : YES ;
|
562
|
+
},
|
563
|
+
|
564
|
+
_lastHovered: null,
|
565
|
+
|
566
|
+
/**
|
567
|
+
This will send mouseOver, mouseOut, and mouseMoved to the views you
|
568
|
+
hover over. To receive these events, you must implement the method.
|
569
|
+
If any subviews implement them and return true, then you won't receive
|
570
|
+
any notices.
|
571
|
+
|
572
|
+
If there is a target mouseDown view, then mouse moved events will also
|
573
|
+
trigger calls to mouseDragged.
|
574
|
+
*/
|
575
|
+
mousemove: function(evt) {
|
576
|
+
SC.RunLoop.begin();
|
577
|
+
try {
|
578
|
+
// make sure the view gets focus no matter what. FF is inconsistant
|
579
|
+
// about this.
|
580
|
+
this.focus();
|
581
|
+
|
582
|
+
// only do mouse[Moved|Entered|Exited|Dragged] if not in a drag session
|
583
|
+
// drags send their own events, e.g. drag[Moved|Entered|Exited]
|
584
|
+
if (this._drag) {
|
585
|
+
this._drag.tryToPerform('mouseDragged', evt);
|
586
|
+
} else {
|
587
|
+
var lh = this._lastHovered || [] ;
|
588
|
+
var nh = [] ;
|
589
|
+
var view = this.targetViewForEvent(evt) ;
|
590
|
+
|
591
|
+
// work up the view chain. Notify of mouse entered and
|
592
|
+
// mouseMoved if implemented.
|
593
|
+
while(view && (view !== this)) {
|
594
|
+
if (lh.indexOf(view) !== -1) {
|
595
|
+
view.tryToPerform('mouseMoved', evt);
|
596
|
+
nh.push(view) ;
|
597
|
+
} else {
|
598
|
+
view.tryToPerform('mouseEntered', evt);
|
599
|
+
nh.push(view) ;
|
600
|
+
}
|
601
|
+
|
602
|
+
view = view.get('nextResponder');
|
603
|
+
}
|
604
|
+
|
605
|
+
// now find those views last hovered over that were no longer found
|
606
|
+
// in this chain and notify of mouseExited.
|
607
|
+
for(var loc=0; loc < lh.length; loc++) {
|
608
|
+
view = lh[loc] ;
|
609
|
+
var exited = view.respondsTo('mouseExited') ;
|
610
|
+
if (exited && !(nh.indexOf(view) !== -1)) {
|
611
|
+
view.tryToPerform('mouseExited',evt);
|
612
|
+
}
|
613
|
+
}
|
614
|
+
|
615
|
+
this._lastHovered = nh;
|
616
|
+
|
617
|
+
// also, if a mouseDownView exists, call the mouseDragged action, if
|
618
|
+
// it exists.
|
619
|
+
if (this._mouseDownView) {
|
620
|
+
this._mouseDownView.tryToPerform('mouseDragged', evt);
|
621
|
+
}
|
622
|
+
}
|
623
|
+
} catch (e) {
|
624
|
+
console.log('Exception during mousemove: %@'.fmt(e)) ;
|
625
|
+
throw e;
|
626
|
+
}
|
627
|
+
SC.RunLoop.end();
|
628
|
+
},
|
629
|
+
|
630
|
+
// these methods are used to prevent unnecessary text-selection in IE,
|
631
|
+
// there could be some more work to improve this behavior and make it
|
632
|
+
// a bit more useful; right now it's just to prevent bugs when dragging
|
633
|
+
// and dropping.
|
634
|
+
|
635
|
+
_mouseCanDrag: YES,
|
636
|
+
|
637
|
+
selectstart: function() { return this._mouseCanDrag ? false : true ; },
|
638
|
+
|
639
|
+
drag: function() { return false; }
|
640
|
+
|
641
|
+
});
|