sproutcore 1.4.5-java → 1.5.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/CHANGELOG +126 -0
- data/README.txt +25 -0
- data/VERSION.yml +2 -2
- data/bin/sc-build +1 -1
- data/bin/sc-build-number +1 -1
- data/bin/sc-docs +1 -1
- data/bin/sc-gen +1 -1
- data/bin/sc-init +1 -1
- data/bin/sc-manifest +1 -1
- data/bin/sc-server +1 -1
- data/bin/sproutcore +1 -1
- data/lib/Buildfile +14 -5
- data/lib/buildtasks/build.rake +33 -17
- data/lib/buildtasks/manifest.rake +381 -103
- data/lib/buildtasks/target.rake +1 -0
- data/lib/doc_templates/sproutcore/index.tmpl +18 -4
- data/lib/doc_templates/sproutcore/publish.js +1 -1
- data/lib/frameworks/sproutcore/Buildfile +36 -33
- data/lib/frameworks/sproutcore/CHANGELOG.md +414 -0
- data/lib/frameworks/sproutcore/README.md +1 -0
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/alert.js +39 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +125 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/split.js +74 -0
- data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
- data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +158 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +85 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +151 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/panels_page.js +62 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +33 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +55 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +77 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +99 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +61 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +54 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/split_page.js +141 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +65 -0
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
- data/lib/frameworks/sproutcore/apps/tests/controllers/detail.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/core.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +6 -6
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/states/start.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/detail.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/source.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/target.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/targets.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/tests.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/models/target.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/models/test.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/tests/views/offset_checkbox.js +1 -1
- data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +10 -4
- data/lib/frameworks/sproutcore/apps/welcome/core.js +1 -1
- data/lib/frameworks/sproutcore/apps/{greenhouse → welcome}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +37 -47
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/strings.js +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +1 -1
- data/lib/frameworks/sproutcore/design/{SproutCore Datastore Design.graffle → Sproutcore_DatastoreDesign.graffle}/QuickLook/Preview.pdf +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Datastore Design.graffle → Sproutcore_DatastoreDesign.graffle}/QuickLook/Thumbnail.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Datastore Design.graffle → Sproutcore_DatastoreDesign.graffle}/data.plist +0 -0
- data/lib/frameworks/sproutcore/{apps/docs/design/Doc Viewer.graffle → design/Sproutcore_DatastoreDesign.graffle}/image8.png +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Design Template.graffle → Sproutcore_Design_Template.graffle}/QuickLook/Preview.pdf +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Design Template.graffle → Sproutcore_Design_Template.graffle}/QuickLook/Thumbnail.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Design Template.graffle → Sproutcore_Design_Template.graffle}/data.plist +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Datastore Design.graffle → Sproutcore_Design_Template.graffle}/image8.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/QuickLook/Preview.pdf +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/QuickLook/Thumbnail.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/data.plist +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image10.png +0 -0
- data/lib/frameworks/sproutcore/{apps/docs/design/Doc Viewer.graffle → design/TestRunner_Design.graffle}/image11.png +0 -0
- data/lib/frameworks/sproutcore/{apps/docs/design/Doc Viewer.graffle → design/TestRunner_Design.graffle}/image13.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image15.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image16.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image17.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image18.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image19.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image22.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image23.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image24.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image25.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image30.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image31.png +0 -0
- data/lib/frameworks/sproutcore/design/{SproutCore Design Template.graffle → TestRunner_Design.graffle}/image8.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner Design.graffle → TestRunner_Design.graffle}/image9.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/fixtures/file_exists.json +1 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/fixtures/malformed.json +11 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +611 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +550 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +276 -0
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +57 -45
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/bootstrap/setup_body_class_names.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +219 -23
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +16 -15
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +540 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +342 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/function.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars.js +73 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +293 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/localization.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/view.js +96 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/string.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/delegate_support.js +110 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/responder_context.js +268 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +249 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/keyboard.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +33 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +670 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +31 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/observable_protocol.js +40 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/sparse_array_delegate.js +131 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +378 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +57 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +33 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/bindable_span.js +164 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +36 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/builder.js +202 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +131 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/datetime.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +210 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +991 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +289 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/page.js +106 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +419 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +103 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +1063 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +124 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +2174 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +693 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +397 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +165 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +316 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +548 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +155 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +301 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/enum_case.js +206 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/null_case.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +344 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/single_case.js +136 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/empty_case.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/multiple_case.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_case.js +193 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_enumerable_case.js +265 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/responder_context.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/string.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/checkbox_support.js +38 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +79 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/panes/template.js +20 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/builder.js +49 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/core_query/within.js +71 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/locale.js +140 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/ready/done.js +40 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/begin.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/element.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +124 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/get.js +51 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +177 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/init.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/join.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/push_text.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/tag.js +46 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +219 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeKeyPane.js +124 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMainPane.js +68 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMenuPane.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/root_responder.js +108 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/targetForAction.js +288 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/add.js +92 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/copy.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/indexSetForSource.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/isEqual.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/remove.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/invalidate.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/invokeLater.js +209 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/isPaused.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/performAction.js +75 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/schedule.js +176 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/normalizeURL.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/offset.js +284 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/rect.js +105 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +49 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +224 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +26 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +148 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +133 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +31 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +206 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/core.js +160 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +919 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +382 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build_children.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +117 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +248 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertLayouts.js +153 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +132 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +83 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +83 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +217 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +146 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +180 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +745 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +203 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceChild.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/static_layout.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js +45 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +148 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +213 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +202 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template.js +131 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +242 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +1524 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/base.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +223 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +1115 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +624 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +401 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +400 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/touch.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +118 -0
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/english.lproj/strings.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/fixtures/target.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/fixtures/test.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +17 -21
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +322 -132
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/debug/json.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/debug/standard_setup.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +44 -61
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +16 -100
- data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +17 -24
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +20 -21
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +457 -216
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +204 -94
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +150 -115
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +148 -110
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +51 -26
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +160 -158
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +298 -204
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +419 -233
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/contact_model.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/cyclical_relationship.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/mail_model.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/datetime_recordattribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +180 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +56 -18
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +36 -10
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/core_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/error_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/normalize.js +26 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +5 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/core_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/compare.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/contains.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/containsRecordTypes.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation_of_records.js +39 -14
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/expandedRecordTypes.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/parse.js +14 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/queryWithScope.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/record_type_is.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_comparisons.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_query_extensions.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/error_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +89 -53
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/core_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/error_methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/find.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecords.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +39 -36
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +17 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/unloadRecord.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/unloadRecords.js +85 -32
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +1103 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +390 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +91 -0
- data/lib/frameworks/sproutcore/frameworks/debug/core.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +10 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/core.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/debug/drag.js +8 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +0 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +0 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +1 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +72 -74
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +49 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +63 -46
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +6 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +53 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +84 -79
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +138 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +38 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +396 -218
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +92 -123
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +23 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +39 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +66 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +364 -121
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +209 -108
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +40 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +16 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +25 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +36 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +59 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +35 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +51 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +84 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +116 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +197 -103
- data/lib/frameworks/sproutcore/frameworks/desktop/system/key_bindings.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +74 -37
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +26 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +16 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +190 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +69 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +30 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +91 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/content.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +46 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +91 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +16 -32
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +29 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deleteSelection.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deselect.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/displayProperties.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/layerIdFor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/length.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +27 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/nowShowing.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/select.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +16 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +40 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +52 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowDelegate.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowOffsetForContentIndex.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +129 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +174 -43
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +93 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/integration.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +14 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroller.js +29 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +26 -83
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +292 -61
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +32 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +78 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +11 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +11 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +16 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +33 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/method.js +33 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/well/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +550 -231
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +63 -55
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +286 -187
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +77 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +39 -31
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +148 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +43 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +82 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +58 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +668 -509
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +313 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +93 -54
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +152 -38
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +261 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +191 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +35 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +131 -122
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +208 -208
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +24 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +332 -135
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +184 -73
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +193 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +829 -426
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +377 -143
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +96 -37
- data/lib/frameworks/sproutcore/frameworks/desktop/views/separator.js +26 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +52 -39
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +19 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +15 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +387 -271
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +10 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +15 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +18 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +114 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +14 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +103 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +36 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +27 -31
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +285 -0
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +6 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/README.md +23 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/README +18 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/TODO +56 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/beautify.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/file.js +35 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/layout.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/library.js +194 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/page.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/property.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/property_editor.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/target.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/targets.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/controllers/view_configs.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js +65 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core_file.js +124 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/data_source.js +250 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/app_page.js +399 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/app-selector.css +107 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/button.css +314 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/dock.css +90 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/general.css +51 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/main-page.css +93 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/menu.css +49 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/modal.css +41 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/picker.css +195 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/css/search.css +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/css/text-field.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/dialogs.js +303 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/apps/greenhouse}/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/inspectors.js +365 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/loading.rhtml +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/english.lproj/main_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/strings.js +93 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/fixtures/file.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/main.js +28 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/mixins/drop_down.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/design.js +26 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/dir.js +93 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/file.js +51 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/models/target.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/resources/test_page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/inspector.js +152 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/library.js +142 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/main.js +283 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/modals.js +299 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/ready.js +235 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/controllers/design.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/controllers/designs.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/controllers/file.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/controllers/files.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/models/file.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/tests/models/view_config.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/views/list_item.js +16 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/views/plist_item.js +20 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/theme.js +25 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/anchor.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/application_list_item.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/event_blocker.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/label_designer.js +0 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/list_item.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/plist_item.js +178 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/simple_button.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/tear_off_picker.js +56 -0
- data/lib/frameworks/sproutcore/{apps → frameworks/experimental/apps}/greenhouse/views/web.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/coders/design.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/coders/object.js +349 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/controllers.js +23 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/designs.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_design.js +172 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_files.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/core.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_rule.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style_sheet.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/button.js +23 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/label.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/object_designer.js +298 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/tab.js +20 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/text_field.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/view_designer.js +1269 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/css/designer.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/design_page.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/high_light.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/controller.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/dock-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/dock-item-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/dock-item-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/page.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/pane.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/images/view.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/english.lproj/selection_handles.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/binding.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/object.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/page.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/view.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/button.js +13 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/snap_lines.js +227 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/tests/coders/page.js +54 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/tests/designers/view_designer.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/designer_drop_target.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/drawing.js +219 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/views/high_light.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{designer → experimental/frameworks/designer}/views/page_item_view.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/selection_handles.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/README.md +11 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +215 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/README.md +46 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/many.js +79 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/single.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_child.js +229 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_thumb.js +236 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split_divider.js +26 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/children.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/dividers.js +243 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +294 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/split_child.js +135 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/split_thumb.js +160 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +929 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +40 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +26 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/forms/render_delegates/form.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/forms/render_delegates/form_row.js +20 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +286 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +52 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +15 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +29 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +4 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/checkbox_view.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/radio_view.css +7 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/ext/string.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +234 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +157 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +355 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -350
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +8 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +227 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +105 -200
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +16 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +745 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +254 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor.js +188 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +195 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +194 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +20 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/tree_item_content.js +57 -53
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +18 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +214 -203
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +110 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/helpers/sizing.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +386 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +404 -191
- data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +65 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/cookie.js +176 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +20 -2006
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/image_queue.js +433 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/math.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +591 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +123 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +422 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +19 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +91 -96
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +87 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +157 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +71 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +254 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/task.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/outline_case.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/integration/creating_views.js +9 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_value_support/content.js +168 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/editable/ui.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/beginEditing.js +194 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/commitEditing.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/discardEditing.js +151 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/beginEditing.js +114 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/commitEditing.js +151 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/discardEditing.js +152 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +13 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/ui.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +8 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/flat_case.js +59 -59
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/group_case.js +114 -114
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/outline_case.js +74 -74
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/render_delegates/render_delegate.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/cookie.js +182 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +19 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/math.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +30 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/string.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/task_queue.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/user_defaults.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +241 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/range.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/credit_card.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/date.js +11 -13
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/not_empty.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/number.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/password.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/validator.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +10 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +76 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +499 -46
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +32 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/nextValidKeyView.js +110 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +87 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +39 -12
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/email.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +6 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/password.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/positive_integer.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +5 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +16 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +23 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +307 -105
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +654 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +81 -195
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +287 -116
- data/lib/frameworks/sproutcore/frameworks/handlebars/handlebars.js +1435 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +390 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +210 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +12 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +40 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +4 -6
- data/lib/frameworks/sproutcore/frameworks/media/views/media_slider.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/mini/license.js +30 -28
- data/lib/frameworks/sproutcore/frameworks/qunit/README.md +24 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/package.json +21 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.css +215 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.js +1442 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/headless.html +24 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/index.html +18 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.html +17 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/same.js +1421 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +314 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +232 -537
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +163 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/indexOf.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/insertAt.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/objectAt.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/popObject.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/pushObject.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +74 -74
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeAt.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeObject.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/replace.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/shiftObject.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/unshiftObject.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +92 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/date.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/function.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/string.js +31 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +577 -317
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +16 -13
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +25 -18
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +351 -308
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +51 -52
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1149 -1001
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +85 -45
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +61 -55
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +51 -107
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +195 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +361 -348
- data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +45 -40
- data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +275 -265
- data/lib/frameworks/sproutcore/frameworks/runtime/system/json.js +515 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +1337 -204
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +312 -259
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +89 -87
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +119 -106
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +107 -101
- data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +23 -47
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/clone.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/compare.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/console.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +59 -126
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/inspect.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +21 -19
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +71 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/keys.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/makeArray.js +21 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +39 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/comparable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable.js +623 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable_observers.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +44 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +286 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observersForKey.js +36 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +7 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +78 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +7 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +87 -8
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/error.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/addEach.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/clone.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/contains.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/create.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexAfter.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexBefore.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/intersects.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/max.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/min.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/rangeStartForIndex.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/removeEach.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/without.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/json.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/logger.js +180 -92
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/base.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/concatenated_properties.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +196 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +56 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +12 -12
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/destroy.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/objectPropertyDidChange.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/rangeDidChange.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/update.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +77 -45
- data/lib/frameworks/sproutcore/frameworks/statechart/core.js +4 -10
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +155 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +1241 -97
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +1617 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/respond_to_event.js +401 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/without_concurrent_states.js +306 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/without_concurrent_states.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/pane.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/responder_chain.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/root_responder.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/initial_substate.js +67 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +60 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/namespacing.js +248 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/plugin/mixin.js +68 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/plugin/nesting.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/state_observes.js +235 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/core.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +123 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/without_concurrent_states.js +191 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/initial_substate/core.js +48 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/initial_substate/without_concurrent_states.js +218 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/with_concurrent_states.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/without_concurrent_states/context.js +191 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/without_concurrent_states/core.js +200 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +239 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +131 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +120 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/without_concurrent_states/context.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/without_concurrent_states/core.js +281 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/transient/without_concurrent_states.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/create/assigned_root_state.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/create/unassigned_root_state.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/destroy.js +73 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/invoke_state_method.js +241 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/owner.js +236 -0
- data/lib/frameworks/sproutcore/frameworks/table/mixins/table_delegate.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/system/table_column.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table.js +6 -5
- data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/table/views/table_header.js +6 -4
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/testing/core.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/testing/extras.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/dump.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/equiv.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +32 -19
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +13 -3
- data/lib/frameworks/sproutcore/frameworks/testing/system/suite.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/utils.js +1 -1
- data/lib/frameworks/sproutcore/lib/index.rhtml +54 -9
- data/lib/frameworks/sproutcore/license.js +32 -30
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +33 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +102 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +39 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +41 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +93 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +72 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +5 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +21 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/imagebutton/ace/imagebutton.css +11 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +79 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +41 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +57 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +83 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +31 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +7 -0
- data/lib/frameworks/sproutcore/themes/ace/theme.js +30 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/strings.js +1 -1
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/Panel.drawit/Data +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/Panel.drawit/QuickLook/Preview.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/Panel.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/Source/SproutCore Theme Buttons.psd b/data/lib/frameworks/sproutcore/themes/legacy_theme/Source/SproutCore Theme → Buttons.psd +0 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/Data b/data/lib/frameworks/sproutcore/themes/legacy_theme/Source/ToolbarView → Pattern.drawit/Data +0 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Preview.jpg b/data/lib/frameworks/sproutcore/themes/legacy_theme/Source/ToolbarView → Pattern.drawit/QuickLook/Preview.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Thumbnail.jpg b/data/lib/frameworks/sproutcore/themes/legacy_theme/Source/ToolbarView → Pattern.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/16/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/24/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/32/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/48/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/48/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/48/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/icons/48/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-x.drawit/Data +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-x.drawit/QuickLook/Preview.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-x.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-y.drawit/Data +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-y.drawit/QuickLook/Preview.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/panel-sprite-y.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sc-theme-repeat-x-2.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sc-theme-repeat-x.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sc-theme-sprite.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sc-theme-ysprite.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/shared-icons.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sproutcore-logo.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/Source/sticky-note.psd +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/button.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/checkbox.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/collection.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/core.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/disclosure.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/icons/mini_222222.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/icons/mini_454545.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/icons/mini_888888.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/icons/mini_ffffff.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/panels/sprite-x.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/panels/sprite-y.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-scroller-repeat-x.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-scroller-repeat-y.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-scroller-sprite.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-theme-repeat-x.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-theme-ysprite.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/images/sc-toolbar-view.png +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/label.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/list_item.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/menu.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/menu_item_view.css +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/pane.css +18 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/panel.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/picker.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/progress.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/radio.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/scroller.css +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/segmented.css +270 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/slider.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/split_view.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/tab.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/table.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/text_field.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/toolbar.css +0 -0
- data/lib/frameworks/sproutcore/themes/{standard_theme → legacy_theme}/english.lproj/well.css +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +89 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +194 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +67 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/well.js +27 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/theme.js +13 -0
- data/lib/gen/app/templates/apps/@target_name@/Buildfile +14 -0
- data/lib/gen/app/templates/apps/@target_name@/theme.js +27 -0
- data/lib/gen/html_app/Buildfile +36 -0
- data/lib/gen/html_app/README +1 -0
- data/lib/gen/html_app/USAGE +15 -0
- data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +14 -0
- data/lib/gen/html_app/templates/apps/@target_name@/resources/images/.gitkeep +0 -0
- data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +4 -0
- data/lib/gen/html_app/templates/apps/@target_name@/resources/templates/@target_name@.handlebars +1 -0
- data/lib/gen/html_project/Buildfile +45 -0
- data/lib/gen/html_project/INIT +3 -0
- data/lib/gen/html_project/README +1 -0
- data/lib/gen/html_project/USAGE +2 -0
- data/lib/gen/html_project/templates/@filename@/Buildfile +8 -0
- data/lib/gen/html_project/templates/@filename@/README +7 -0
- data/lib/gen/project/templates/@filename@/Buildfile +7 -2
- data/lib/gen/theme/templates/themes/@target_name@/Buildfile +3 -0
- data/lib/gen/theme/templates/themes/@target_name@/theme.js +23 -0
- data/lib/sproutcore.rb +11 -2
- data/lib/sproutcore/builders.rb +4 -2
- data/lib/sproutcore/builders/base.rb +10 -3
- data/lib/sproutcore/builders/chance_file.rb +78 -0
- data/lib/sproutcore/builders/combine.rb +6 -5
- data/lib/sproutcore/builders/handlebars.rb +30 -0
- data/lib/sproutcore/builders/html.rb +2 -0
- data/lib/sproutcore/builders/javascript.rb +15 -2
- data/lib/sproutcore/builders/minify.rb +14 -25
- data/lib/sproutcore/builders/module.rb +74 -0
- data/lib/sproutcore/builders/string_wrapper.rb +41 -0
- data/lib/sproutcore/buildfile.rb +17 -17
- data/lib/sproutcore/buildfile/task.rb +4 -12
- data/lib/sproutcore/buildfile/task_manager.rb +13 -4
- data/lib/sproutcore/helpers.rb +1 -1
- data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
- data/lib/sproutcore/helpers/minifier.rb +110 -0
- data/lib/sproutcore/helpers/static_helper.rb +105 -39
- data/lib/sproutcore/models/generator.rb +16 -0
- data/lib/sproutcore/models/manifest.rb +3 -3
- data/lib/sproutcore/models/manifest_entry.rb +10 -3
- data/lib/sproutcore/models/target.rb +146 -34
- data/lib/sproutcore/rack/dev.rb +3 -3
- data/lib/sproutcore/rack/proxy.rb +1 -1
- data/lib/sproutcore/tools.rb +53 -5
- data/lib/sproutcore/tools/build.rb +10 -16
- data/lib/sproutcore/tools/docs.rb +1 -1
- data/lib/sproutcore/tools/gen.rb +1 -1
- data/lib/sproutcore/tools/init.rb +26 -10
- data/lib/sproutcore/tools/server.rb +9 -1
- data/lib/sproutcore/version.rb +1 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/chance_2x_spec.rb +100 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/chance_spec.rb +104 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +86 -9
- data/spec/buildtasks/manifest/prepare_build_tasks/css_spec.rb +1 -1
- data/spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb +39 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/minify_spec.rb +1 -1
- data/spec/buildtasks/manifest/prepare_build_tasks/module_info_spec.rb +96 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/module_spec.rb +83 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/packed_2x_indirect_spec.rb +191 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/packed_2x_spec.rb +185 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/packed_spec.rb +46 -11
- data/spec/buildtasks/manifest/spec_helper.rb +4 -0
- data/spec/fixtures/builder_tests/Buildfile +11 -9
- data/spec/fixtures/builder_tests/apps/chance_test/Buildfile +14 -0
- data/spec/fixtures/builder_tests/apps/chance_test/core.js +27 -0
- data/spec/fixtures/builder_tests/apps/chance_test/main.js +30 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/demo.css +6 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/force@2x.png +0 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/last_file.css +7 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/loading.rhtml +9 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/main_page.js +24 -0
- data/spec/fixtures/builder_tests/apps/chance_test/resources/z_first_file.css +6 -0
- data/spec/fixtures/builder_tests/apps/chance_test/theme.js +27 -0
- data/spec/fixtures/builder_tests/apps/handlebars_test/template.handlebars +5 -0
- data/spec/fixtures/builder_tests/apps/module_test/module.js +1 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/english.lproj/req_style_2.css +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/english.lproj/test.rhtml +1 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/javascript.js +1 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/lib/alt_layout.rhtml +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/req_js_2.js +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/dynamic_req_target_1/dynamic_req_js_1.js +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/dynamic_req_target_1/english.lproj/dynamic_req_style_1.css +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/inlined_module/README +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/req_style_1.css +0 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/strings.js +4 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/test.rhtml +1 -0
- data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/req_js_1.js +0 -0
- data/spec/fixtures/helper_tests/apps/minifier_test/core.js +8 -0
- data/spec/fixtures/real_world/Buildfile +11 -1
- data/spec/fixtures/real_world/apps/account/modules/preferences/README +0 -0
- data/spec/fixtures/real_world/apps/calendar/modules/preferences/README +0 -0
- data/spec/fixtures/real_world/apps/contacts/modules/preferences/README +0 -0
- data/spec/fixtures/real_world/apps/contacts/modules/printing/README +0 -0
- data/spec/fixtures/real_world/apps/mail/modules/preferences/README +0 -0
- data/spec/fixtures/real_world/apps/mail/modules/printing/README +0 -0
- data/spec/fixtures/real_world/apps/photos/modules/email/README +0 -0
- data/spec/fixtures/real_world/apps/photos/modules/preferences/README +0 -0
- data/spec/fixtures/real_world/frameworks/no_2x/resources/test.css +1 -0
- data/spec/fixtures/real_world/frameworks/no_2x/resources/test.png +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/templates/demo.handlebars +4 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/resources/force@2x.png +0 -0
- data/spec/lib/builders/chance_file_spec.rb +44 -0
- data/spec/lib/builders/handlebars_spec.rb +29 -0
- data/spec/lib/builders/module_spec.rb +133 -0
- data/spec/lib/builders/strings_spec.rb +1 -0
- data/spec/lib/helpers/minifier.rb +31 -0
- data/spec/lib/models/project/find_targets_for_spec.rb +1 -1
- data/sproutcore.gemspec +11 -4
- data/vendor/chance/.gitignore +5 -0
- data/vendor/chance/Gemfile +4 -0
- data/vendor/chance/Rakefile +2 -0
- data/vendor/chance/bin/chance +46 -0
- data/vendor/chance/chance.gemspec +28 -0
- data/vendor/chance/lib/chance.rb +156 -0
- data/vendor/chance/lib/chance/instance.rb +330 -0
- data/vendor/chance/lib/chance/instance/data_url.rb +85 -0
- data/vendor/chance/lib/chance/instance/javascript.rb +19 -0
- data/vendor/chance/lib/chance/instance/slicing.rb +181 -0
- data/vendor/chance/lib/chance/instance/spriting.rb +311 -0
- data/vendor/chance/lib/chance/parser.rb +835 -0
- data/vendor/chance/lib/chance/perf.rb +17 -0
- data/vendor/chance/lib/chance/version.rb +3 -0
- data/vendor/chance/lib/tester/test.rb +108 -0
- data/vendor/chance/lib/tester/test_runner.rb +27 -0
- data/vendor/chance/test/case/abc.png +0 -0
- data/vendor/chance/test/case/more/abc.png +0 -0
- data/vendor/chance/test/case/more/another.css +4 -0
- data/vendor/chance/test/case/test1.css +22 -0
- data/vendor/chance/test/case/test2.css +6 -0
- data/vendor/chance/tests/parser/basic/input/test.css +4 -0
- data/vendor/chance/tests/parser/basic/output/test.parsed.css +5 -0
- data/vendor/sproutcore/SCCompiler.jar +0 -0
- data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
- data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
- data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
- metadata +1236 -560
- data/lib/frameworks/sproutcore/CHANGELOG +0 -93
- data/lib/frameworks/sproutcore/CHANGELOG-1.4.md +0 -170
- data/lib/frameworks/sproutcore/apps/docs/core.js +0 -27
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Preview.pdf +0 -0
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/data.plist +0 -14378
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image10.png +0 -0
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image14.png +0 -0
- data/lib/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image9.tiff +0 -0
- data/lib/frameworks/sproutcore/apps/docs/english.lproj/loading.rhtml +0 -9
- data/lib/frameworks/sproutcore/apps/docs/english.lproj/main_page.js +0 -22
- data/lib/frameworks/sproutcore/apps/docs/english.lproj/strings.js +0 -15
- data/lib/frameworks/sproutcore/apps/docs/main.js +0 -30
- data/lib/frameworks/sproutcore/apps/greenhouse/README +0 -25
- data/lib/frameworks/sproutcore/apps/greenhouse/TODO +0 -72
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +0 -75
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/library.js +0 -201
- data/lib/frameworks/sproutcore/apps/greenhouse/core.js +0 -67
- data/lib/frameworks/sproutcore/apps/greenhouse/core_file.js +0 -124
- data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +0 -250
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +0 -377
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/app-selector.css +0 -111
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/button.css +0 -310
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/dock.css +0 -85
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/general.css +0 -52
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/main-page.css +0 -120
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/menu.css +0 -52
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/modal.css +0 -40
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/picker.css +0 -188
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/tabbed.css +0 -68
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/dialogs.js +0 -302
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/inspectors.js +0 -365
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +0 -87
- data/lib/frameworks/sproutcore/apps/greenhouse/main.js +0 -28
- data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +0 -22
- data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +0 -92
- data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +0 -51
- data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +0 -144
- data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +0 -133
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +0 -224
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +0 -291
- data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +0 -197
- data/lib/frameworks/sproutcore/apps/greenhouse/tests/views/list_item.js +0 -15
- data/lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js +0 -39
- data/lib/frameworks/sproutcore/apps/greenhouse/views/tear_off_picker.js +0 -56
- data/lib/frameworks/sproutcore/design/TestRunner Design.graffle/image11.png +0 -0
- data/lib/frameworks/sproutcore/design/TestRunner Design.graffle/image13.png +0 -0
- data/lib/frameworks/sproutcore/design/TestRunner Design.graffle/image8.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/parentless.js +0 -134
- data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
- data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
- data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
- data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
- data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
- data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/designer/coders/design.js +0 -20
- data/lib/frameworks/sproutcore/frameworks/designer/coders/localization.js +0 -19
- data/lib/frameworks/sproutcore/frameworks/designer/coders/object.js +0 -347
- data/lib/frameworks/sproutcore/frameworks/designer/controllers/controllers.js +0 -16
- data/lib/frameworks/sproutcore/frameworks/designer/controllers/design.js +0 -37
- data/lib/frameworks/sproutcore/frameworks/designer/controllers/designs.js +0 -134
- data/lib/frameworks/sproutcore/frameworks/designer/controllers/page_design.js +0 -170
- data/lib/frameworks/sproutcore/frameworks/designer/controllers/page_files.js +0 -22
- data/lib/frameworks/sproutcore/frameworks/designer/core.js +0 -26
- data/lib/frameworks/sproutcore/frameworks/designer/css/css_rule.js +0 -22
- data/lib/frameworks/sproutcore/frameworks/designer/css/css_style.js +0 -29
- data/lib/frameworks/sproutcore/frameworks/designer/css/css_style_sheet.js +0 -201
- data/lib/frameworks/sproutcore/frameworks/designer/designers/button.js +0 -21
- data/lib/frameworks/sproutcore/frameworks/designer/designers/label.js +0 -16
- data/lib/frameworks/sproutcore/frameworks/designer/designers/object_designer.js +0 -296
- data/lib/frameworks/sproutcore/frameworks/designer/designers/tab.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/designer/designers/text_field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/designer/designers/view_designer.js +0 -1259
- data/lib/frameworks/sproutcore/frameworks/designer/english.lproj/design_page.js +0 -55
- data/lib/frameworks/sproutcore/frameworks/designer/ext/object.js +0 -26
- data/lib/frameworks/sproutcore/frameworks/designer/ext/page.js +0 -86
- data/lib/frameworks/sproutcore/frameworks/designer/ext/view.js +0 -54
- data/lib/frameworks/sproutcore/frameworks/designer/mixins/button.js +0 -11
- data/lib/frameworks/sproutcore/frameworks/designer/mixins/snap_lines.js +0 -221
- data/lib/frameworks/sproutcore/frameworks/designer/views/designer_drop_target.js +0 -138
- data/lib/frameworks/sproutcore/frameworks/designer/views/drawing.js +0 -219
- data/lib/frameworks/sproutcore/frameworks/designer/views/selection_handles.js +0 -78
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/array.js +0 -518
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/controller.js +0 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/object.js +0 -342
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/core.css +0 -474
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/view.css +0 -57
- data/lib/frameworks/sproutcore/frameworks/foundation/ext/object.js +0 -83
- data/lib/frameworks/sproutcore/frameworks/foundation/ext/run_loop.js +0 -162
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +0 -585
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/responder_context.js +0 -269
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +0 -250
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +0 -543
- data/lib/frameworks/sproutcore/frameworks/foundation/panes/main.js +0 -51
- data/lib/frameworks/sproutcore/frameworks/foundation/panes/pane.js +0 -848
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/system/application.js +0 -37
- data/lib/frameworks/sproutcore/frameworks/foundation/system/browser.js +0 -59
- data/lib/frameworks/sproutcore/frameworks/foundation/system/builder.js +0 -210
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
- data/lib/frameworks/sproutcore/frameworks/foundation/system/cursor.js +0 -131
- data/lib/frameworks/sproutcore/frameworks/foundation/system/datetime.js +0 -1140
- data/lib/frameworks/sproutcore/frameworks/foundation/system/device.js +0 -143
- data/lib/frameworks/sproutcore/frameworks/foundation/system/event.js +0 -894
- data/lib/frameworks/sproutcore/frameworks/foundation/system/image_cache.js +0 -433
- data/lib/frameworks/sproutcore/frameworks/foundation/system/json.js +0 -515
- data/lib/frameworks/sproutcore/frameworks/foundation/system/locale.js +0 -293
- data/lib/frameworks/sproutcore/frameworks/foundation/system/page.js +0 -108
- data/lib/frameworks/sproutcore/frameworks/foundation/system/platform.js +0 -298
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
- data/lib/frameworks/sproutcore/frameworks/foundation/system/render_context.js +0 -988
- data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +0 -599
- data/lib/frameworks/sproutcore/frameworks/foundation/system/responder.js +0 -124
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +0 -538
- data/lib/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +0 -2068
- data/lib/frameworks/sproutcore/frameworks/foundation/system/time.js +0 -473
- data/lib/frameworks/sproutcore/frameworks/foundation/system/timer.js +0 -551
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/array_case.js +0 -218
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/enum_case.js +0 -206
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/null_case.js +0 -64
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/selection_support.js +0 -318
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/single_case.js +0 -136
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/empty_case.js +0 -82
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/multiple_case.js +0 -111
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/single_case.js +0 -193
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/object/single_enumerable_case.js +0 -265
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/content.js +0 -195
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/displayProperties.js +0 -89
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/keyEquivalents.js +0 -57
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/ui.js +0 -68
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/content.js +0 -168
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/responder_context.js +0 -75
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +0 -83
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/builder.js +0 -42
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/within.js +0 -66
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/datetime.js +0 -382
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/json.js +0 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/locale.js +0 -134
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/begin.js +0 -47
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/element.js +0 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/end.js +0 -124
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/get.js +0 -51
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_attr.js +0 -50
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js +0 -28
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_className.js +0 -179
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_style.js +0 -101
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/init.js +0 -55
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/join.js +0 -28
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/push_text.js +0 -74
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/tag.js +0 -46
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/update.js +0 -218
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +0 -223
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeKeyPane.js +0 -124
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMainPane.js +0 -68
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMenuPane.js +0 -48
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/root_responder.js +0 -101
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/targetForAction.js +0 -251
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invalidate.js +0 -38
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invokeLater.js +0 -201
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/isPaused.js +0 -71
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/performAction.js +0 -69
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/schedule.js +0 -170
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/normalizeURL.js +0 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/rect.js +0 -99
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/main_pane.js +0 -31
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/append_remove.js +0 -124
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/firstResponder.js +0 -148
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/keyPane.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/layout.js +0 -31
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendEvent.js +0 -206
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +0 -133
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/convertFrames.js +0 -246
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/convertLayouts.js +0 -145
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/createChildViews.js +0 -122
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/createLayer.js +0 -97
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/destroyLayer.js +0 -83
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/didAppendToDocument.js +0 -48
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/findLayerInParentLayer.js +0 -50
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/init.js +0 -50
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/insertBefore.js +0 -200
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/isVisible.js +0 -51
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/isVisibleInWindow.js +0 -116
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/layer.js +0 -150
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutChildViews.js +0 -162
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutDidChange.js +0 -127
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +0 -531
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/nextValidKeyView.js +0 -110
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/parentViewDidChange.js +0 -67
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/prepareContext.js +0 -180
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/removeChild.js +0 -189
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/render.js +0 -83
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/replaceChild.js +0 -29
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayer.js +0 -146
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayerLocation.js +0 -194
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/viewDidResize.js +0 -202
- data/lib/frameworks/sproutcore/frameworks/foundation/views/view.js +0 -3313
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/delegate_support.js +0 -110
- data/lib/frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js +0 -40
- data/lib/frameworks/sproutcore/frameworks/runtime/protocols/sparse_array_delegate.js +0 -131
- data/lib/frameworks/sproutcore/frameworks/runtime/system/cookie.js +0 -160
- data/lib/frameworks/sproutcore/frameworks/runtime/system/selection_set.js +0 -697
- data/lib/frameworks/sproutcore/frameworks/runtime/system/sparse_array.js +0 -379
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +0 -622
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/cookie.js +0 -163
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/add.js +0 -92
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js +0 -17
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/indexSetForSource.js +0 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/isEqual.js +0 -60
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/remove.js +0 -111
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/sparse_array.js +0 -194
- data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
- data/lib/frameworks/sproutcore/frameworks/testing/jquery.js +0 -3559
- data/lib/frameworks/sproutcore/frameworks/testing/qunit.js +0 -827
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/pane.css +0 -18
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +0 -275
- data/lib/sproutcore/builders/bundle.rb +0 -63
- data/lib/sproutcore/buildfile/cloneable.rb +0 -34
- data/lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar +0 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +0 -254
- data/spec/fixtures/builder_tests/apps/bundle_test/bundle.js +0 -1
- data/spec/lib/builders/bundle_spec.rb +0 -295
@@ -1,202 +0,0 @@
|
|
1
|
-
// ==========================================================================
|
2
|
-
// Project: SproutCore - JavaScript Application Framework
|
3
|
-
// Copyright: ©2006-2010 Apple Inc. and contributors.
|
4
|
-
// License: Licensed under MIT license (see license.js)
|
5
|
-
// ==========================================================================
|
6
|
-
|
7
|
-
/*global module test equals context ok same Q$ htmlbody */
|
8
|
-
|
9
|
-
// ..........................................................
|
10
|
-
// viewDidResize()
|
11
|
-
//
|
12
|
-
module("SC.View#viewDidResize");
|
13
|
-
|
14
|
-
test("invokes parentViewDidResize on all child views", function() {
|
15
|
-
var callCount = 0 ;
|
16
|
-
var ChildView = SC.View.extend({
|
17
|
-
parentViewDidResize: function() { callCount++; }
|
18
|
-
});
|
19
|
-
|
20
|
-
var view = SC.View.create({
|
21
|
-
childViews: [ChildView, ChildView, ChildView]
|
22
|
-
});
|
23
|
-
|
24
|
-
// now test...
|
25
|
-
SC.run(function() { view.viewDidResize(); });
|
26
|
-
equals(callCount, 3, 'should invoke parentViewDidResize() on all children');
|
27
|
-
});
|
28
|
-
|
29
|
-
test("triggers whenever layout property is changed", function() {
|
30
|
-
var callCount = 0 ;
|
31
|
-
var view = SC.View.create({
|
32
|
-
// use the callback below to detect when viewDidResize is icalled.
|
33
|
-
childViews: [SC.View.extend({
|
34
|
-
parentViewDidResize: function() { callCount++; }
|
35
|
-
})]
|
36
|
-
});
|
37
|
-
|
38
|
-
SC.run(function() { view.set('layout', { top: 10, left: 20, height: 50, width: 40 }); });
|
39
|
-
equals(callCount, 1, 'viewDidResize should invoke once');
|
40
|
-
});
|
41
|
-
|
42
|
-
test("making sure that the frame value is correct inside viewDidResize()", function() {
|
43
|
-
// We want to test to be sure that when the view's viewDidResize() method is
|
44
|
-
// called, its frame has been updated. But rather than run the test inside
|
45
|
-
// the method itself, we'll cache a global reference to the then-current
|
46
|
-
// value and test it later.
|
47
|
-
var cachedFrame;
|
48
|
-
|
49
|
-
var view = SC.View.create({
|
50
|
-
|
51
|
-
layout: { left:0, top:0, width:400, height:400 },
|
52
|
-
|
53
|
-
viewDidResize: function() {
|
54
|
-
sc_super();
|
55
|
-
|
56
|
-
// Set a global reference to my frame at this point so that we can
|
57
|
-
// test for the correct value later.
|
58
|
-
cachedFrame = this.get('frame');
|
59
|
-
}
|
60
|
-
});
|
61
|
-
|
62
|
-
|
63
|
-
// Access the frame once before resizing the view, to make sure that the
|
64
|
-
// previous value was cached. That way, when we ask for the frame again
|
65
|
-
// after the resize, we can verify that the cache invalidation logic is
|
66
|
-
// working correctly.
|
67
|
-
var originalFrame = view.get('frame');
|
68
|
-
|
69
|
-
SC.RunLoop.begin();
|
70
|
-
view.adjust('height', 314);
|
71
|
-
SC.RunLoop.end();
|
72
|
-
|
73
|
-
// Now that we've adjusted the view, the cached view (as it was inside its
|
74
|
-
// viewDidResize() method) should be the same value, because the cached
|
75
|
-
// 'frame' value should have been invalidated by that point.
|
76
|
-
same(view.get('frame').height, cachedFrame.height, 'height');
|
77
|
-
});
|
78
|
-
|
79
|
-
|
80
|
-
// ..........................................................
|
81
|
-
// parentViewDidResize()
|
82
|
-
//
|
83
|
-
module("SC.View#parentViewDidResize");
|
84
|
-
|
85
|
-
// view.callCount must increments whenever something interesting happens
|
86
|
-
function testParentViewDidResizeWithAlignments(view) {
|
87
|
-
// try with fixed layout
|
88
|
-
view.set('layout', { top: 10, left: 10, height: 10, width: 10 });
|
89
|
-
view.callCount = 0 ;
|
90
|
-
view.parentViewDidResize();
|
91
|
-
equals(view.callCount, 0, 'should not notify frame changed');
|
92
|
-
|
93
|
-
// try with flexible height
|
94
|
-
view.set('layout', { top: 10, left: 10, bottom: 10, width: 10 });
|
95
|
-
view.callCount = 0 ;
|
96
|
-
view.parentViewDidResize();
|
97
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
98
|
-
|
99
|
-
// try with flexible width
|
100
|
-
view.set('layout', { top: 10, left: 10, height: 10, right: 10 });
|
101
|
-
view.callCount = 0 ;
|
102
|
-
view.parentViewDidResize();
|
103
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
104
|
-
|
105
|
-
// try with right align
|
106
|
-
view.set('layout', { top: 10, right: 10, height: 10, width: 10 });
|
107
|
-
view.callCount = 0 ;
|
108
|
-
view.parentViewDidResize();
|
109
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
110
|
-
|
111
|
-
// try with bottom align
|
112
|
-
view.set('layout', { top: 10, bottom: 10, height: 10, width: 10 });
|
113
|
-
view.callCount = 0 ;
|
114
|
-
view.parentViewDidResize();
|
115
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
116
|
-
|
117
|
-
// try with center horizontal align
|
118
|
-
view.set('layout', { centerX: 10, top: 10, height: 10, width: 10 });
|
119
|
-
view.callCount = 0 ;
|
120
|
-
view.parentViewDidResize();
|
121
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
122
|
-
|
123
|
-
// try with center vertical align
|
124
|
-
view.set('layout', { left: 10, centerY: 10, height: 10, width: 10 });
|
125
|
-
view.callCount = 0 ;
|
126
|
-
view.parentViewDidResize();
|
127
|
-
equals(view.callCount, 1, 'should notify frame changed');
|
128
|
-
}
|
129
|
-
|
130
|
-
test("notifies 'frame' property change unless layout is fixed", function() {
|
131
|
-
var view = SC.View.create({
|
132
|
-
// instrument...
|
133
|
-
callCount: 0 ,
|
134
|
-
frameDidChange: function() {
|
135
|
-
this.callCount++;
|
136
|
-
}.observes('frame')
|
137
|
-
});
|
138
|
-
testParentViewDidResizeWithAlignments(view);
|
139
|
-
});
|
140
|
-
|
141
|
-
test("calls viewDidResize on self unless layout is fixed", function() {
|
142
|
-
var view = SC.View.create({
|
143
|
-
// instrument...
|
144
|
-
callCount: 0 ,
|
145
|
-
viewDidResize: function() { this.callCount++; }
|
146
|
-
});
|
147
|
-
testParentViewDidResizeWithAlignments(view);
|
148
|
-
});
|
149
|
-
|
150
|
-
// ..........................................................
|
151
|
-
// beginLiveResize()
|
152
|
-
//
|
153
|
-
module("SC.View#beginLiveResize");
|
154
|
-
|
155
|
-
test("invokes willBeginLiveResize on receiver and any child views that implement it", function() {
|
156
|
-
var callCount = 0;
|
157
|
-
var ChildView = SC.View.extend({
|
158
|
-
willBeginLiveResize: function() { callCount++ ;}
|
159
|
-
});
|
160
|
-
|
161
|
-
var view = ChildView.create({ // <-- has callback
|
162
|
-
childViews: [SC.View.extend({ // <-- this does not implement callback
|
163
|
-
childViews: [ChildView] // <-- has callback
|
164
|
-
})]
|
165
|
-
});
|
166
|
-
|
167
|
-
callCount = 0 ;
|
168
|
-
view.beginLiveResize();
|
169
|
-
equals(callCount, 2, 'should invoke willBeginLiveResize when implemented');
|
170
|
-
});
|
171
|
-
|
172
|
-
test("returns receiver", function() {
|
173
|
-
var view = SC.View.create();
|
174
|
-
equals(view.beginLiveResize(), view, 'returns receiver');
|
175
|
-
});
|
176
|
-
|
177
|
-
// ..........................................................
|
178
|
-
// endLiveResize()
|
179
|
-
//
|
180
|
-
module("SC.View#endLiveResize");
|
181
|
-
|
182
|
-
test("invokes didEndLiveResize on receiver and any child views that implement it", function() {
|
183
|
-
var callCount = 0;
|
184
|
-
var ChildView = SC.View.extend({
|
185
|
-
didEndLiveResize: function() { callCount++; }
|
186
|
-
});
|
187
|
-
|
188
|
-
var view = ChildView.create({ // <-- has callback
|
189
|
-
childViews: [SC.View.extend({ // <-- this does not implement callback
|
190
|
-
childViews: [ChildView] // <-- has callback
|
191
|
-
})]
|
192
|
-
});
|
193
|
-
|
194
|
-
callCount = 0 ;
|
195
|
-
view.endLiveResize();
|
196
|
-
equals(callCount, 2, 'should invoke didEndLiveResize when implemented');
|
197
|
-
});
|
198
|
-
|
199
|
-
test("returns receiver", function() {
|
200
|
-
var view = SC.View.create();
|
201
|
-
equals(view.endLiveResize(), view, 'returns receiver');
|
202
|
-
});
|
@@ -1,3313 +0,0 @@
|
|
1
|
-
// ==========================================================================
|
2
|
-
// Project: SproutCore - JavaScript Application Framework
|
3
|
-
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
-
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
-
// License: Licensed under MIT license (see license.js)
|
6
|
-
// ==========================================================================
|
7
|
-
|
8
|
-
sc_require('system/browser');
|
9
|
-
sc_require('system/event');
|
10
|
-
sc_require('system/cursor');
|
11
|
-
sc_require('system/responder') ;
|
12
|
-
|
13
|
-
sc_require('mixins/string') ;
|
14
|
-
|
15
|
-
SC.viewKey = SC.guidKey + "_view" ;
|
16
|
-
|
17
|
-
/** Select a horizontal layout for various views.*/
|
18
|
-
SC.LAYOUT_HORIZONTAL = 'sc-layout-horizontal';
|
19
|
-
|
20
|
-
/** Select a vertical layout for various views.*/
|
21
|
-
SC.LAYOUT_VERTICAL = 'sc-layout-vertical';
|
22
|
-
|
23
|
-
/** @private */
|
24
|
-
SC._VIEW_DEFAULT_DIMS = 'marginTop marginLeft'.w();
|
25
|
-
|
26
|
-
/**
|
27
|
-
Layout properties needed to anchor a view to the top.
|
28
|
-
*/
|
29
|
-
SC.ANCHOR_TOP = { top: 0 };
|
30
|
-
|
31
|
-
/**
|
32
|
-
Layout properties needed to anchor a view to the left.
|
33
|
-
*/
|
34
|
-
SC.ANCHOR_LEFT = { left: 0 };
|
35
|
-
|
36
|
-
/*
|
37
|
-
Layout properties to anchor a view to the top left
|
38
|
-
*/
|
39
|
-
SC.ANCHOR_TOP_LEFT = { top: 0, left: 0 };
|
40
|
-
|
41
|
-
/**
|
42
|
-
Layout properties to anchoe view to the bottom.
|
43
|
-
*/
|
44
|
-
SC.ANCHOR_BOTTOM = { bottom: 0 };
|
45
|
-
|
46
|
-
/**
|
47
|
-
Layout properties to anchor a view to the right.
|
48
|
-
*/
|
49
|
-
SC.ANCHOR_RIGHT = { right: 0 } ;
|
50
|
-
|
51
|
-
/**
|
52
|
-
Layout properties to anchor a view to the bottom right.
|
53
|
-
*/
|
54
|
-
SC.ANCHOR_BOTTOM_RIGHT = { bottom: 0, right: 0 };
|
55
|
-
|
56
|
-
/**
|
57
|
-
Layout properties to take up the full width of a parent view.
|
58
|
-
*/
|
59
|
-
SC.FULL_WIDTH = { left: 0, right: 0 };
|
60
|
-
|
61
|
-
/**
|
62
|
-
Layout properties to take up the full height of a parent view.
|
63
|
-
*/
|
64
|
-
SC.FULL_HEIGHT = { top: 0, bottom: 0 };
|
65
|
-
|
66
|
-
/**
|
67
|
-
Layout properties to center. Note that you must also specify a width and
|
68
|
-
height for this to work.
|
69
|
-
*/
|
70
|
-
SC.ANCHOR_CENTER = { centerX: 0, centerY: 0 };
|
71
|
-
|
72
|
-
/**
|
73
|
-
Layout property for width, height
|
74
|
-
*/
|
75
|
-
|
76
|
-
SC.LAYOUT_AUTO = 'auto';
|
77
|
-
|
78
|
-
/**
|
79
|
-
Default property to disable or enable by default the contextMenu
|
80
|
-
*/
|
81
|
-
SC.CONTEXT_MENU_ENABLED = YES;
|
82
|
-
|
83
|
-
/**
|
84
|
-
Default property to disable or enable if the focus can jump to the address
|
85
|
-
bar or not.
|
86
|
-
*/
|
87
|
-
SC.TABBING_ONLY_INSIDE_DOCUMENT = YES;
|
88
|
-
|
89
|
-
/** @private - custom array used for child views */
|
90
|
-
SC.EMPTY_CHILD_VIEWS_ARRAY = [];
|
91
|
-
SC.EMPTY_CHILD_VIEWS_ARRAY.needsClone = YES;
|
92
|
-
|
93
|
-
/**
|
94
|
-
@class
|
95
|
-
|
96
|
-
Base class for managing a view. Views provide two functions:
|
97
|
-
|
98
|
-
1. They translate state and events into drawing instructions for the
|
99
|
-
web browser and
|
100
|
-
|
101
|
-
2. They act as first responders for incoming keyboard, mouse, and
|
102
|
-
touch events.
|
103
|
-
|
104
|
-
h2. View Initialization
|
105
|
-
|
106
|
-
When a view is setup, there are several methods you can override that
|
107
|
-
will be called at different times depending on how your view is created.
|
108
|
-
Here is a guide to which method you want to override and when:
|
109
|
-
|
110
|
-
- *init:* override this method for any general object setup (such as
|
111
|
-
observers, starting timers and animations, etc) that you need to happen
|
112
|
-
everytime the view is created, regardless of whether or not its layer
|
113
|
-
exists yet.
|
114
|
-
|
115
|
-
- *render:* override this method to generate or update your HTML to reflect
|
116
|
-
the current state of your view. This method is called both when your view
|
117
|
-
is first created and later anytime it needs to be updated.
|
118
|
-
|
119
|
-
- *didCreateLayer:* the render() method is used to generate new HTML.
|
120
|
-
Override this method to perform any additional setup on the DOM you might
|
121
|
-
need to do after creating the view. For example, if you need to listen
|
122
|
-
for events.
|
123
|
-
|
124
|
-
- *willDestroyLayer:* if you implement didCreateLayer() to setup event
|
125
|
-
listeners, you should implement this method as well to remove the same
|
126
|
-
just before the DOM for your view is destroyed.
|
127
|
-
|
128
|
-
- *updateLayer:* Normally, when a view needs to update its content, it will
|
129
|
-
re-render the view using the render() method. If you would like to
|
130
|
-
override this behavior with your own custom updating code, you can
|
131
|
-
replace updateLayer() with your own implementation instead.
|
132
|
-
|
133
|
-
- *didAppendToDocument:* in theory all DOM setup could be done
|
134
|
-
in didCreateLayer() as you already have a DOM element instantiated.
|
135
|
-
However there is cases where the element has to be first appended to the
|
136
|
-
Document because there is either a bug on the browser or you are using
|
137
|
-
plugins which objects are not instantiated until you actually append the
|
138
|
-
element to the DOM. This will allow you to do things like registering
|
139
|
-
DOM events on flash or quicktime objects.
|
140
|
-
|
141
|
-
@extends SC.Responder
|
142
|
-
@extends SC.DelegateSupport
|
143
|
-
@since SproutCore 1.0
|
144
|
-
*/
|
145
|
-
SC.View = SC.Responder.extend(SC.DelegateSupport,
|
146
|
-
/** @scope SC.View.prototype */ {
|
147
|
-
|
148
|
-
concatenatedProperties: 'outlets displayProperties layoutProperties classNames renderMixin didCreateLayerMixin willDestroyLayerMixin'.w(),
|
149
|
-
|
150
|
-
/**
|
151
|
-
The current pane.
|
152
|
-
@property {SC.Pane}
|
153
|
-
*/
|
154
|
-
pane: function() {
|
155
|
-
var view = this ;
|
156
|
-
while (view && !view.isPane) view = view.get('parentView') ;
|
157
|
-
return view ;
|
158
|
-
}.property('parentView').cacheable(),
|
159
|
-
|
160
|
-
/**
|
161
|
-
The page this view was instantiated from. This is set by the page object
|
162
|
-
during instantiation.
|
163
|
-
|
164
|
-
@property {SC.Page}
|
165
|
-
*/
|
166
|
-
page: null,
|
167
|
-
|
168
|
-
/**
|
169
|
-
The current split view this view is embedded in (may be null).
|
170
|
-
@property {SC.SplitView}
|
171
|
-
*/
|
172
|
-
splitView: function() {
|
173
|
-
var view = this ;
|
174
|
-
while (view && !view.isSplitView) view = view.get('parentView') ;
|
175
|
-
return view ;
|
176
|
-
}.property('parentView').cacheable(),
|
177
|
-
|
178
|
-
/**
|
179
|
-
If the view is currently inserted into the DOM of a parent view, this
|
180
|
-
property will point to the parent of the view.
|
181
|
-
*/
|
182
|
-
parentView: null,
|
183
|
-
|
184
|
-
/**
|
185
|
-
Optional background color. Will be applied to the view's element if
|
186
|
-
set. This property is intended for one-off views that need a background
|
187
|
-
element. If you plan to create many view instances it is probably better
|
188
|
-
to use CSS.
|
189
|
-
|
190
|
-
@property {String}
|
191
|
-
*/
|
192
|
-
backgroundColor: null,
|
193
|
-
|
194
|
-
/**
|
195
|
-
Activates use of brower's static layout. You can apply this mixin and
|
196
|
-
still use absolute positioning. To activate static positioning, set this
|
197
|
-
property to YES.
|
198
|
-
|
199
|
-
@property {Boolean}
|
200
|
-
*/
|
201
|
-
useStaticLayout: NO,
|
202
|
-
|
203
|
-
// ..........................................................
|
204
|
-
// IS ENABLED SUPPORT
|
205
|
-
//
|
206
|
-
|
207
|
-
/**
|
208
|
-
Set to true when the item is enabled. Note that changing this value
|
209
|
-
will also alter the isVisibleInWindow property for this view and any
|
210
|
-
child views.
|
211
|
-
|
212
|
-
Note that if you apply the SC.Control mixin, changing this property will
|
213
|
-
also automatically add or remove a 'disabled' CSS class name as well.
|
214
|
-
|
215
|
-
This property is observable and bindable.
|
216
|
-
|
217
|
-
@property {Boolean}
|
218
|
-
*/
|
219
|
-
isEnabled: YES,
|
220
|
-
isEnabledBindingDefault: SC.Binding.oneWay().bool(),
|
221
|
-
|
222
|
-
/**
|
223
|
-
Computed property returns YES if the view and all of its parent views
|
224
|
-
are enabled in the pane. You should use this property when deciding
|
225
|
-
whether to respond to an incoming event or not.
|
226
|
-
|
227
|
-
This property is not observable.
|
228
|
-
|
229
|
-
@property {Boolean}
|
230
|
-
*/
|
231
|
-
isEnabledInPane: function() {
|
232
|
-
var ret = this.get('isEnabled'), pv ;
|
233
|
-
if (ret && (pv = this.get('parentView'))) ret = pv.get('isEnabledInPane');
|
234
|
-
return ret ;
|
235
|
-
}.property('parentView', 'isEnabled'),
|
236
|
-
|
237
|
-
/** @private
|
238
|
-
Observes the isEnabled property and resigns first responder if set to NO.
|
239
|
-
This will avoid cases where, for example, a disabled text field retains
|
240
|
-
its focus rings.
|
241
|
-
|
242
|
-
@observes isEnabled
|
243
|
-
*/
|
244
|
-
_sc_view_isEnabledDidChange: function(){
|
245
|
-
if(!this.get('isEnabled') && this.get('isFirstResponder')){
|
246
|
-
this.resignFirstResponder();
|
247
|
-
}
|
248
|
-
}.observes('isEnabled'),
|
249
|
-
|
250
|
-
// ..........................................................
|
251
|
-
// IS VISIBLE IN WINDOW SUPPORT
|
252
|
-
//
|
253
|
-
|
254
|
-
/**
|
255
|
-
The isVisible property determines if the view is shown in the view
|
256
|
-
hierarchy it is a part of. A view can have isVisible == YES and still have
|
257
|
-
isVisibleInWindow == NO. This occurs, for instance, when a parent view has
|
258
|
-
isVisible == NO. Default is YES.
|
259
|
-
|
260
|
-
The isVisible property is considered part of the layout and so changing it
|
261
|
-
will trigger a layout update.
|
262
|
-
|
263
|
-
@property {Boolean}
|
264
|
-
*/
|
265
|
-
isVisible: YES,
|
266
|
-
isVisibleBindingDefault: SC.Binding.bool(),
|
267
|
-
|
268
|
-
/**
|
269
|
-
YES only if the view and all of its parent views are currently visible
|
270
|
-
in the window. This property is used to optimize certain behaviors in
|
271
|
-
the view. For example, updates to the view layer are not performed
|
272
|
-
if the view until the view becomes visible in the window.
|
273
|
-
*/
|
274
|
-
isVisibleInWindow: NO,
|
275
|
-
|
276
|
-
/**
|
277
|
-
By default we don't disable the context menu. Overriding this property
|
278
|
-
can enable/disable the context menu per view.
|
279
|
-
*/
|
280
|
-
isContextMenuEnabled: function() {
|
281
|
-
return SC.CONTEXT_MENU_ENABLED;
|
282
|
-
}.property(),
|
283
|
-
|
284
|
-
/**
|
285
|
-
Recomputes the isVisibleInWindow property based on the visibility of the
|
286
|
-
view and its parent. If the recomputed value differs from the current
|
287
|
-
isVisibleInWindow state, this method will also call
|
288
|
-
recomputIsVisibleInWindow() on its child views as well. As an optional
|
289
|
-
optimization, you can pass the isVisibleInWindow state of the parentView
|
290
|
-
if you already know it.
|
291
|
-
|
292
|
-
You will not generally need to call or override this method yourself. It
|
293
|
-
is used by the SC.View hierarchy to relay window visibility changes up
|
294
|
-
and down the chain.
|
295
|
-
|
296
|
-
@property {Boolean} parentViewIsVisible
|
297
|
-
@returns {SC.View} receiver
|
298
|
-
*/
|
299
|
-
recomputeIsVisibleInWindow: function(parentViewIsVisible) {
|
300
|
-
var previous = this.get('isVisibleInWindow'),
|
301
|
-
current = this.get('isVisible'),
|
302
|
-
parentView;
|
303
|
-
|
304
|
-
// isVisibleInWindow = isVisible && parentView.isVisibleInWindow
|
305
|
-
// this approach only goes up to the parentView if necessary.
|
306
|
-
if (current) {
|
307
|
-
// If we weren't passed in 'parentViewIsVisible' (we generally aren't;
|
308
|
-
// it's an optimization), then calculate it.
|
309
|
-
if (parentViewIsVisible === undefined) {
|
310
|
-
parentView = this.get('parentView');
|
311
|
-
parentViewIsVisible = parentView ? parentView.get('isVisibleInWindow') : NO;
|
312
|
-
}
|
313
|
-
current = current && parentViewIsVisible;
|
314
|
-
}
|
315
|
-
|
316
|
-
// If our visibility has changed, then set the new value and notify our
|
317
|
-
// child views to update their value.
|
318
|
-
if (previous !== current) {
|
319
|
-
this.set('isVisibleInWindow', current);
|
320
|
-
|
321
|
-
var childViews = this.get('childViews'), len = childViews.length, idx;
|
322
|
-
for(idx=0;idx<len;idx++) {
|
323
|
-
childViews[idx].recomputeIsVisibleInWindow(current);
|
324
|
-
}
|
325
|
-
|
326
|
-
// For historical reasons, we'll also layout the child views if
|
327
|
-
// necessary.
|
328
|
-
if (current) {
|
329
|
-
if (this.get('childViewsNeedLayout')) this.invokeOnce(this.layoutChildViewsIfNeeded);
|
330
|
-
}
|
331
|
-
else {
|
332
|
-
// Also, if we were previously visible and were the first responder,
|
333
|
-
// resign it. This more appropriately belongs in a
|
334
|
-
// 'isVisibleInWindow' observer or some such helper method because
|
335
|
-
// this work is not strictly related to computing the visibility, but
|
336
|
-
// view performance is critical, so avoiding the extra observer is
|
337
|
-
// worthwhile.
|
338
|
-
if (this.get('isFirstResponder')) this.resignFirstResponder();
|
339
|
-
}
|
340
|
-
}
|
341
|
-
|
342
|
-
// If we're in this function, then that means one of our ancestor views
|
343
|
-
// changed, or changed its 'isVisibleInWindow' value. That means that if
|
344
|
-
// we are out of sync with the layer, then we need to update our state
|
345
|
-
// now.
|
346
|
-
//
|
347
|
-
// For example, say we're isVisible=NO, but we have not yet added the
|
348
|
-
// 'hidden' class to the layer because of the "don't update the layer if
|
349
|
-
// we're not visible in the window" check. If any of our parent views
|
350
|
-
// became visible, our layer would incorrectly be shown!
|
351
|
-
this.updateLayerIfNeeded(YES);
|
352
|
-
|
353
|
-
return this;
|
354
|
-
},
|
355
|
-
|
356
|
-
|
357
|
-
/** @private
|
358
|
-
Whenever the view’s visibility changes, we need to recompute whether it is
|
359
|
-
actually visible inside the window (a view is only visible in the window
|
360
|
-
if it is marked as visibile and its parent view is as well), in addition
|
361
|
-
to updating the layer accordingly.
|
362
|
-
*/
|
363
|
-
_sc_isVisibleDidChange: function() {
|
364
|
-
// 'isVisible' is effectively a displayProperty, but we'll call
|
365
|
-
// displayDidChange() manually here instead of declaring it as a
|
366
|
-
// displayProperty because that avoids having two observers on
|
367
|
-
// 'isVisible'. A single observer is:
|
368
|
-
// a. More efficient
|
369
|
-
// b. More correct, because we can guarantee the order of operations
|
370
|
-
this.displayDidChange();
|
371
|
-
|
372
|
-
this.recomputeIsVisibleInWindow();
|
373
|
-
}.observes('isVisible'),
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
// ..........................................................
|
378
|
-
// CHILD VIEW SUPPORT
|
379
|
-
//
|
380
|
-
|
381
|
-
/**
|
382
|
-
Array of child views. You should never edit this array directly unless
|
383
|
-
you are implementing createChildViews(). Most of the time, you should
|
384
|
-
use the accessor methods such as appendChild(), insertBefore() and
|
385
|
-
removeChild().
|
386
|
-
|
387
|
-
@property {Array}
|
388
|
-
*/
|
389
|
-
childViews: SC.EMPTY_CHILD_VIEWS_ARRAY,
|
390
|
-
|
391
|
-
/**
|
392
|
-
Insert the view into the the receiver's childNodes array.
|
393
|
-
|
394
|
-
The view will be added to the childNodes array before the beforeView. If
|
395
|
-
beforeView is null, then the view will be added to the end of the array.
|
396
|
-
This will also add the view's rootElement DOM node to the receivers
|
397
|
-
containerElement DOM node as a child.
|
398
|
-
|
399
|
-
If the specified view already belongs to another parent, it will be
|
400
|
-
removed from that view first.
|
401
|
-
|
402
|
-
@param {SC.View} view
|
403
|
-
@param {SC.View} beforeView
|
404
|
-
@returns {SC.View} the receiver
|
405
|
-
*/
|
406
|
-
insertBefore: function(view, beforeView) {
|
407
|
-
view.beginPropertyChanges(); // limit notifications
|
408
|
-
|
409
|
-
// remove view from old parent if needed. Also notify views.
|
410
|
-
if (view.get('parentView')) view.removeFromParent() ;
|
411
|
-
if (this.willAddChild) this.willAddChild(view, beforeView) ;
|
412
|
-
if (view.willAddToParent) view.willAddToParent(this, beforeView) ;
|
413
|
-
|
414
|
-
// set parentView of child
|
415
|
-
view.set('parentView', this);
|
416
|
-
|
417
|
-
// add to childView's array.
|
418
|
-
var idx, childViews = this.get('childViews') ;
|
419
|
-
if (childViews.needsClone) this.set(childViews = []);
|
420
|
-
idx = (beforeView) ? childViews.indexOf(beforeView) : childViews.length;
|
421
|
-
if (idx<0) idx = childViews.length ;
|
422
|
-
childViews.insertAt(idx, view) ;
|
423
|
-
|
424
|
-
// The DOM will need some fixing up, note this on the view.
|
425
|
-
view.parentViewDidChange() ;
|
426
|
-
view.layoutDidChange() ;
|
427
|
-
var pane = view.get('pane');
|
428
|
-
if(pane && pane.get('isPaneAttached')) {
|
429
|
-
view._notifyDidAppendToDocument();
|
430
|
-
}
|
431
|
-
|
432
|
-
// notify views
|
433
|
-
if (this.didAddChild) this.didAddChild(view, beforeView) ;
|
434
|
-
if (view.didAddToParent) view.didAddToParent(this, beforeView) ;
|
435
|
-
|
436
|
-
view.endPropertyChanges();
|
437
|
-
|
438
|
-
return this ;
|
439
|
-
},
|
440
|
-
|
441
|
-
/**
|
442
|
-
Removes the child view from the parent view.
|
443
|
-
|
444
|
-
@param {SC.View} view
|
445
|
-
@returns {SC.View} receiver
|
446
|
-
*/
|
447
|
-
removeChild: function(view) {
|
448
|
-
if (!view) return this; // nothing to do
|
449
|
-
if (view.parentView !== this) {
|
450
|
-
throw "%@.removeChild(%@) must belong to parent".fmt(this,view);
|
451
|
-
}
|
452
|
-
// notify views
|
453
|
-
if (view.willRemoveFromParent) view.willRemoveFromParent() ;
|
454
|
-
if (this.willRemoveChild) this.willRemoveChild(view) ;
|
455
|
-
|
456
|
-
// update parent node
|
457
|
-
view.set('parentView', null) ;
|
458
|
-
|
459
|
-
// remove view from childViews array.
|
460
|
-
var childViews = this.get('childViews'),
|
461
|
-
idx = childViews.indexOf(view) ;
|
462
|
-
if (idx>=0) childViews.removeAt(idx);
|
463
|
-
|
464
|
-
// The DOM will need some fixing up, note this on the view.
|
465
|
-
view.parentViewDidChange() ;
|
466
|
-
|
467
|
-
// notify views
|
468
|
-
if (this.didRemoveChild) this.didRemoveChild(view);
|
469
|
-
if (view.didRemoveFromParent) view.didRemoveFromParent(this) ;
|
470
|
-
|
471
|
-
return this ;
|
472
|
-
},
|
473
|
-
|
474
|
-
/**
|
475
|
-
Removes all children from the parentView.
|
476
|
-
|
477
|
-
@returns {SC.View} receiver
|
478
|
-
*/
|
479
|
-
removeAllChildren: function() {
|
480
|
-
var childViews = this.get('childViews'), view ;
|
481
|
-
while (view = childViews.objectAt(childViews.get('length')-1)) {
|
482
|
-
this.removeChild(view) ;
|
483
|
-
}
|
484
|
-
return this ;
|
485
|
-
},
|
486
|
-
|
487
|
-
/**
|
488
|
-
Removes the view from its parentView, if one is found. Otherwise
|
489
|
-
does nothing.
|
490
|
-
|
491
|
-
@returns {SC.View} receiver
|
492
|
-
*/
|
493
|
-
removeFromParent: function() {
|
494
|
-
var parent = this.get('parentView') ;
|
495
|
-
if (parent) parent.removeChild(this) ;
|
496
|
-
return this ;
|
497
|
-
},
|
498
|
-
|
499
|
-
/**
|
500
|
-
Replace the oldView with the specified view in the receivers childNodes
|
501
|
-
array. This will also replace the DOM node of the oldView with the DOM
|
502
|
-
node of the new view in the receivers DOM.
|
503
|
-
|
504
|
-
If the specified view already belongs to another parent, it will be
|
505
|
-
removed from that view first.
|
506
|
-
|
507
|
-
@param view {SC.View} the view to insert in the DOM
|
508
|
-
@param view {SC.View} the view to remove from the DOM.
|
509
|
-
@returns {SC.View} the receiver
|
510
|
-
*/
|
511
|
-
replaceChild: function(view, oldView) {
|
512
|
-
// suspend notifications
|
513
|
-
view.beginPropertyChanges();
|
514
|
-
oldView.beginPropertyChanges();
|
515
|
-
this.beginPropertyChanges();
|
516
|
-
|
517
|
-
this.insertBefore(view,oldView).removeChild(oldView) ;
|
518
|
-
|
519
|
-
// resume notifications
|
520
|
-
this.endPropertyChanges();
|
521
|
-
oldView.endPropertyChanges();
|
522
|
-
view.endPropertyChanges();
|
523
|
-
|
524
|
-
return this;
|
525
|
-
},
|
526
|
-
|
527
|
-
/**
|
528
|
-
Replaces the current array of child views with the new array of child
|
529
|
-
views.
|
530
|
-
|
531
|
-
@param {Array} views views you want to add
|
532
|
-
@returns {SC.View} receiver
|
533
|
-
*/
|
534
|
-
replaceAllChildren: function(views) {
|
535
|
-
var len = views.get('length'), idx;
|
536
|
-
|
537
|
-
this.beginPropertyChanges();
|
538
|
-
this.destroyLayer().removeAllChildren();
|
539
|
-
for(idx=0;idx<len;idx++) this.appendChild(views.objectAt(idx));
|
540
|
-
this.replaceLayer();
|
541
|
-
this.endPropertyChanges();
|
542
|
-
|
543
|
-
return this ;
|
544
|
-
},
|
545
|
-
|
546
|
-
/**
|
547
|
-
Appends the specified view to the end of the receivers childViews array.
|
548
|
-
This is equivalent to calling insertBefore(view, null);
|
549
|
-
|
550
|
-
@param view {SC.View} the view to insert
|
551
|
-
@returns {SC.View} the receiver
|
552
|
-
*/
|
553
|
-
appendChild: function(view) {
|
554
|
-
return this.insertBefore(view, null);
|
555
|
-
},
|
556
|
-
|
557
|
-
/**
|
558
|
-
This method is called whenever the receiver's parentView has changed.
|
559
|
-
The default implementation of this method marks the view's display
|
560
|
-
location as dirty so that it will update at the end of the run loop.
|
561
|
-
|
562
|
-
You will not usually need to override or call this method yourself, though
|
563
|
-
if you manually patch the parentView hierarchy for some reason, you should
|
564
|
-
call this method to notify the view that it's parentView has changed.
|
565
|
-
|
566
|
-
@returns {SC.View} receiver
|
567
|
-
*/
|
568
|
-
parentViewDidChange: function() {
|
569
|
-
this.recomputeIsVisibleInWindow() ;
|
570
|
-
|
571
|
-
this.set('layerLocationNeedsUpdate', YES) ;
|
572
|
-
this.invokeOnce(this.updateLayerLocationIfNeeded) ;
|
573
|
-
|
574
|
-
// We also need to iterate down through the view hierarchy and invalidate
|
575
|
-
// all our child view's caches for 'pane', since it could have changed.
|
576
|
-
//
|
577
|
-
// Note: In theory we could try to avoid this invalidation if we
|
578
|
-
// do this only in cases where we "know" the 'pane' value might
|
579
|
-
// have changed, but those cases are few and far between.
|
580
|
-
|
581
|
-
this._invalidatePaneCacheForSelfAndAllChildViews();
|
582
|
-
|
583
|
-
return this ;
|
584
|
-
},
|
585
|
-
|
586
|
-
/** @private
|
587
|
-
We want to cache the 'pane' property, but it's impossible for us to
|
588
|
-
declare a dependence on all properties that can affect the value. (For
|
589
|
-
example, if our grandparent gets attached to a new pane, our pane will
|
590
|
-
have changed.) So when there's the potential for the pane changing, we
|
591
|
-
need to invalidate the caches for all our child views, and their child
|
592
|
-
views, and so on.
|
593
|
-
*/
|
594
|
-
_invalidatePaneCacheForSelfAndAllChildViews: function () {
|
595
|
-
var childView, childViews = this.get('childViews'),
|
596
|
-
len = childViews.length, idx ;
|
597
|
-
|
598
|
-
this.notifyPropertyChange('pane');
|
599
|
-
|
600
|
-
for (idx=0; idx<len; ++idx) {
|
601
|
-
childView = childViews[idx];
|
602
|
-
if (childView._invalidatePaneCacheForSelfAndAllChildViews) {
|
603
|
-
childView._invalidatePaneCacheForSelfAndAllChildViews();
|
604
|
-
}
|
605
|
-
}
|
606
|
-
},
|
607
|
-
|
608
|
-
// ..........................................................
|
609
|
-
// LAYER SUPPORT
|
610
|
-
//
|
611
|
-
|
612
|
-
/**
|
613
|
-
Returns the current layer for the view. The layer for a view is only
|
614
|
-
generated when the view first becomes visible in the window and even
|
615
|
-
then it will not be computed until you request this layer property.
|
616
|
-
|
617
|
-
If the layer is not actually set on the view itself, then the layer will
|
618
|
-
be found by calling this.findLayerInParentLayer().
|
619
|
-
|
620
|
-
You can also set the layer by calling set on this property.
|
621
|
-
|
622
|
-
@property {DOMElement} the layer
|
623
|
-
*/
|
624
|
-
layer: function(key, value) {
|
625
|
-
if (value !== undefined) {
|
626
|
-
this._view_layer = value ;
|
627
|
-
|
628
|
-
// no layer...attempt to discover it...
|
629
|
-
} else {
|
630
|
-
value = this._view_layer;
|
631
|
-
if (!value) {
|
632
|
-
var parent = this.get('parentView');
|
633
|
-
if (parent) parent = parent.get('layer');
|
634
|
-
if (parent) {
|
635
|
-
this._view_layer = value = this.findLayerInParentLayer(parent);
|
636
|
-
}
|
637
|
-
parent = null ; // avoid memory leak
|
638
|
-
}
|
639
|
-
}
|
640
|
-
return value ;
|
641
|
-
}.property('isVisibleInWindow').cacheable(),
|
642
|
-
|
643
|
-
/**
|
644
|
-
Get a CoreQuery object for this view's layer, or pass in a selector string
|
645
|
-
to get a CoreQuery object for a DOM node nested within this layer.
|
646
|
-
|
647
|
-
@param {String} sel a CoreQuery-compatible selector string
|
648
|
-
@returns {SC.CoreQuery} the CoreQuery object for the DOM node
|
649
|
-
*/
|
650
|
-
$: function(sel) {
|
651
|
-
var ret, layer = this.get('layer') ;
|
652
|
-
// note: SC.$([]) returns an empty CoreQuery object. SC.$() would
|
653
|
-
// return an object selecting the document.
|
654
|
-
ret = !layer ? SC.$([]) : (sel === undefined) ? SC.$(layer) : SC.$(sel, layer) ;
|
655
|
-
layer = null ; // avoid memory leak
|
656
|
-
return ret ;
|
657
|
-
},
|
658
|
-
|
659
|
-
/**
|
660
|
-
Returns the DOM element that should be used to hold child views when they
|
661
|
-
are added/remove via DOM manipulation. The default implementation simply
|
662
|
-
returns the layer itself. You can override this to return a DOM element
|
663
|
-
within the layer.
|
664
|
-
|
665
|
-
@property {DOMElement} the container layer
|
666
|
-
*/
|
667
|
-
containerLayer: function() {
|
668
|
-
return this.get('layer') ;
|
669
|
-
}.property('layer').cacheable(),
|
670
|
-
|
671
|
-
/**
|
672
|
-
The ID to use when trying to locate the layer in the DOM. If you do not
|
673
|
-
set the layerId explicitly, then the view's GUID will be used instead.
|
674
|
-
This ID must be set at the time the view is created.
|
675
|
-
|
676
|
-
@property {String}
|
677
|
-
@readOnly
|
678
|
-
*/
|
679
|
-
layerId: function(key, value) {
|
680
|
-
if (value) this._layerId = value;
|
681
|
-
if (this._layerId) return this._layerId;
|
682
|
-
return SC.guidFor(this) ;
|
683
|
-
}.property().cacheable(),
|
684
|
-
|
685
|
-
_lastLayerId: null,
|
686
|
-
|
687
|
-
/**
|
688
|
-
Handles changes in the layer id.
|
689
|
-
*/
|
690
|
-
layerIdDidChange: function() {
|
691
|
-
var layer = this.get("layer"),
|
692
|
-
lid = this.get("layerId"),
|
693
|
-
lastId = this._lastLayerId;
|
694
|
-
if (lid !== lastId) {
|
695
|
-
// if we had an earlier one, remove from view hash.
|
696
|
-
if (lastId && SC.View.views[lastId] === this) {
|
697
|
-
delete SC.View.views[lastId];
|
698
|
-
}
|
699
|
-
|
700
|
-
// set the current one as the new old one
|
701
|
-
this._lastLayerId = lid;
|
702
|
-
|
703
|
-
// and add the new one
|
704
|
-
SC.View.views[lid] = this;
|
705
|
-
|
706
|
-
// and finally, set the actual layer id.
|
707
|
-
if (layer) layer.id = lid;
|
708
|
-
}
|
709
|
-
}.observes("layerId"),
|
710
|
-
|
711
|
-
/**
|
712
|
-
Attempts to discover the layer in the parent layer. The default
|
713
|
-
implementation looks for an element with an ID of layerId (or the view's
|
714
|
-
guid if layerId is null). You can override this method to provide your
|
715
|
-
own form of lookup. For example, if you want to discover your layer using
|
716
|
-
a CSS class name instead of an ID.
|
717
|
-
|
718
|
-
@param {DOMElement} parentLayer the parent's DOM layer
|
719
|
-
@returns {DOMElement} the discovered layer
|
720
|
-
*/
|
721
|
-
findLayerInParentLayer: function(parentLayer) {
|
722
|
-
var layerId = this.get('layerId'),
|
723
|
-
node, i, ilen, childNodes, elem, usedQuerySelector;
|
724
|
-
|
725
|
-
// first, let's try the fast path...
|
726
|
-
elem = document.getElementById(layerId) ;
|
727
|
-
|
728
|
-
// TODO: use code generation to only really do this check on IE
|
729
|
-
if (SC.browser.msie && elem && elem.id !== layerId) elem = null;
|
730
|
-
|
731
|
-
// if no element was found the fast way, search down the parentLayer for
|
732
|
-
// the element. This code should not be invoked very often. Usually a
|
733
|
-
// DOM element will be discovered by the first method above.
|
734
|
-
// This code uses a BFS algorithm as is expected to find the layer right
|
735
|
-
// below the parent.
|
736
|
-
if (!elem) {
|
737
|
-
elem = parentLayer.firstChild ;
|
738
|
-
var q = [];
|
739
|
-
q.push(parentLayer);
|
740
|
-
while (q.length !==0) {
|
741
|
-
node = q.shift();
|
742
|
-
if (node.id===layerId) {
|
743
|
-
return node;
|
744
|
-
}
|
745
|
-
childNodes = node.childNodes;
|
746
|
-
for (i=0, ilen=childNodes.length; i < ilen; ++i) {
|
747
|
-
q.push(childNodes[i]);
|
748
|
-
}
|
749
|
-
}
|
750
|
-
elem = null;
|
751
|
-
}
|
752
|
-
|
753
|
-
return elem;
|
754
|
-
},
|
755
|
-
|
756
|
-
/**
|
757
|
-
Returns YES if the receiver is a subview of a given view or if it’s
|
758
|
-
identical to that view. Otherwise, it returns NO.
|
759
|
-
|
760
|
-
@property {SC.View} view
|
761
|
-
*/
|
762
|
-
isDescendantOf: function(view) {
|
763
|
-
var parentView = this.get('parentView');
|
764
|
-
|
765
|
-
if(this===view) return YES;
|
766
|
-
else if(parentView) return parentView.isDescendantOf(view);
|
767
|
-
else return NO;
|
768
|
-
},
|
769
|
-
|
770
|
-
/**
|
771
|
-
This method is invoked whenever a display property changes. It will set
|
772
|
-
the layerNeedsUpdate method to YES. If you need to perform additional
|
773
|
-
setup whenever the display changes, you can override this method as well.
|
774
|
-
|
775
|
-
@returns {SC.View} receiver
|
776
|
-
*/
|
777
|
-
displayDidChange: function() {
|
778
|
-
this.set('layerNeedsUpdate', YES) ;
|
779
|
-
return this;
|
780
|
-
},
|
781
|
-
|
782
|
-
/**
|
783
|
-
Setting this property to YES will cause the updateLayerIfNeeded method to
|
784
|
-
be invoked at the end of the runloop. You can also force a view to update
|
785
|
-
sooner by calling updateLayerIfNeeded() directly. The method will update
|
786
|
-
the layer only if this property is YES.
|
787
|
-
|
788
|
-
@property {Boolean}
|
789
|
-
@test in updateLayer
|
790
|
-
*/
|
791
|
-
layerNeedsUpdate: NO,
|
792
|
-
|
793
|
-
/** @private
|
794
|
-
Schedules the updateLayerIfNeeded method to run at the end of the runloop
|
795
|
-
if layerNeedsUpdate is set to YES.
|
796
|
-
*/
|
797
|
-
_view_layerNeedsUpdateDidChange: function() {
|
798
|
-
if (this.get('layerNeedsUpdate')) {
|
799
|
-
this.invokeOnce(this.updateLayerIfNeeded) ;
|
800
|
-
}
|
801
|
-
}.observes('layerNeedsUpdate'),
|
802
|
-
|
803
|
-
/**
|
804
|
-
Updates the layer only if the view is visible onscreen and if
|
805
|
-
layerNeedsUpdate is set to YES. Normally you will not invoke this method
|
806
|
-
directly. Instead you set the layerNeedsUpdate property to YES and this
|
807
|
-
method will be called once at the end of the runloop.
|
808
|
-
|
809
|
-
If you need to update view's layer sooner than the end of the runloop, you
|
810
|
-
can call this method directly. If your view is not visible in the window
|
811
|
-
but you want it to update anyway, then call this method, passing YES for
|
812
|
-
the 'skipIsVisibleInWindowCheck' parameter.
|
813
|
-
|
814
|
-
You should not override this method. Instead override updateLayer() or
|
815
|
-
render().
|
816
|
-
|
817
|
-
@returns {SC.View} receiver
|
818
|
-
@test in updateLayer
|
819
|
-
*/
|
820
|
-
updateLayerIfNeeded: function(skipIsVisibleInWindowCheck) {
|
821
|
-
var needsUpdate = this.get('layerNeedsUpdate'),
|
822
|
-
shouldUpdate = needsUpdate && (skipIsVisibleInWindowCheck || this.get('isVisibleInWindow'));
|
823
|
-
if (shouldUpdate) {
|
824
|
-
// only update a layer if it already exists
|
825
|
-
if (this.get('layer')) {
|
826
|
-
this.beginPropertyChanges() ;
|
827
|
-
this.set('layerNeedsUpdate', NO) ;
|
828
|
-
this.updateLayer() ;
|
829
|
-
this.endPropertyChanges() ;
|
830
|
-
}
|
831
|
-
}
|
832
|
-
|
833
|
-
return this ;
|
834
|
-
},
|
835
|
-
|
836
|
-
/**
|
837
|
-
This is the core method invoked to update a view layer whenever it has
|
838
|
-
changed. This method simply creates a render context focused on the
|
839
|
-
layer element and then calls your render() method.
|
840
|
-
|
841
|
-
You will not usually call or override this method directly. Instead you
|
842
|
-
should set the layerNeedsUpdate property to YES to cause this method to
|
843
|
-
run at the end of the run loop, or you can call updateLayerIfNeeded()
|
844
|
-
to force the layer to update immediately.
|
845
|
-
|
846
|
-
Instead of overriding this method, consider overidding the render() method
|
847
|
-
instead, which is called both when creating and updating a layer. If you
|
848
|
-
do not want your render() method called when updating a layer, then you
|
849
|
-
should override this method instead.
|
850
|
-
|
851
|
-
@returns {SC.View} receiver
|
852
|
-
*/
|
853
|
-
updateLayer: function() {
|
854
|
-
var context = this.renderContext(this.get('layer')) ;
|
855
|
-
this.prepareContext(context, NO) ;
|
856
|
-
context.update() ;
|
857
|
-
if (context._innerHTMLReplaced) {
|
858
|
-
var pane = this.get('pane');
|
859
|
-
if(pane && pane.get('isPaneAttached')) {
|
860
|
-
this._notifyDidAppendToDocument();
|
861
|
-
}
|
862
|
-
}
|
863
|
-
|
864
|
-
// If this view uses static layout, then notify that the frame (likely)
|
865
|
-
// changed.
|
866
|
-
if (this.useStaticLayout) this.viewDidResize();
|
867
|
-
|
868
|
-
if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM
|
869
|
-
if(this.designer && this.designer.viewDidUpdateLayer) {
|
870
|
-
this.designer.viewDidUpdateLayer(); //let the designer know
|
871
|
-
}
|
872
|
-
return this ;
|
873
|
-
},
|
874
|
-
|
875
|
-
/**
|
876
|
-
Creates a new renderContext with the passed tagName or element. You
|
877
|
-
can override this method to provide further customization to the context
|
878
|
-
if needed. Normally you will not need to call or override this method.
|
879
|
-
|
880
|
-
@returns {SC.RenderContext}
|
881
|
-
*/
|
882
|
-
renderContext: function(tagNameOrElement) {
|
883
|
-
return SC.RenderContext(tagNameOrElement) ;
|
884
|
-
},
|
885
|
-
|
886
|
-
/**
|
887
|
-
Creates the layer by creating a renderContext and invoking the view's
|
888
|
-
render() method. This will only create the layer if the layer does not
|
889
|
-
already exist.
|
890
|
-
|
891
|
-
When you create a layer, it is expected that your render() method will
|
892
|
-
also render the HTML for all child views as well. This method will
|
893
|
-
notify the view along with any of its childViews that its layer has been
|
894
|
-
created.
|
895
|
-
|
896
|
-
@returns {SC.View} receiver
|
897
|
-
*/
|
898
|
-
createLayer: function() {
|
899
|
-
if (this.get('layer')) return this ; // nothing to do
|
900
|
-
|
901
|
-
var context = this.renderContext(this.get('tagName')) ;
|
902
|
-
|
903
|
-
// now prepare the content like normal.
|
904
|
-
this.prepareContext(context, YES) ;
|
905
|
-
this.set('layer', context.element()) ;
|
906
|
-
|
907
|
-
// now notify the view and its child views..
|
908
|
-
this._notifyDidCreateLayer() ;
|
909
|
-
|
910
|
-
return this ;
|
911
|
-
},
|
912
|
-
|
913
|
-
/** @private -
|
914
|
-
Invokes the receivers didCreateLayer() method if it exists and then
|
915
|
-
invokes the same on all child views.
|
916
|
-
*/
|
917
|
-
_notifyDidCreateLayer: function() {
|
918
|
-
if (this.didCreateLayer) this.didCreateLayer() ;
|
919
|
-
var mixins = this.didCreateLayerMixin, len, idx,
|
920
|
-
childViews = this.get('childViews'),
|
921
|
-
childView;
|
922
|
-
if (mixins) {
|
923
|
-
len = mixins.length ;
|
924
|
-
for (idx=0; idx<len; ++idx) mixins[idx].call(this) ;
|
925
|
-
}
|
926
|
-
|
927
|
-
len = childViews.length ;
|
928
|
-
for (idx=0; idx<len; ++idx) {
|
929
|
-
childView = childViews[idx];
|
930
|
-
if (!childView) continue;
|
931
|
-
|
932
|
-
// A parent view creating a layer might result in the creation of a
|
933
|
-
// child view's DOM node being created via a render context without
|
934
|
-
// createLayer() being invoked on the child. In such cases, if anyone
|
935
|
-
// had requested 'layer' and it was cached as null, we need to
|
936
|
-
// invalidate it.
|
937
|
-
childView.notifyPropertyChange('layer');
|
938
|
-
|
939
|
-
childView._notifyDidCreateLayer() ;
|
940
|
-
}
|
941
|
-
},
|
942
|
-
|
943
|
-
/**
|
944
|
-
Destroys any existing layer along with the layer for any child views as
|
945
|
-
well. If the view does not currently have a layer, then this method will
|
946
|
-
do nothing.
|
947
|
-
|
948
|
-
If you implement willDestroyLayer() on your view or if any mixins
|
949
|
-
implement willDestroLayerMixin(), then this method will be invoked on your
|
950
|
-
view before your layer is destroyed to give you a chance to clean up any
|
951
|
-
event handlers, etc.
|
952
|
-
|
953
|
-
If you write a willDestroyLayer() handler, you can assume that your
|
954
|
-
didCreateLayer() handler was called earlier for the same layer.
|
955
|
-
|
956
|
-
Normally you will not call or override this method yourself, but you may
|
957
|
-
want to implement the above callbacks when it is run.
|
958
|
-
|
959
|
-
@returns {SC.View} receiver
|
960
|
-
*/
|
961
|
-
destroyLayer: function() {
|
962
|
-
var layer = this.get('layer') ;
|
963
|
-
if (layer) {
|
964
|
-
// Now notify the view and its child views. It will also set the
|
965
|
-
// layer property to null.
|
966
|
-
this._notifyWillDestroyLayer() ;
|
967
|
-
|
968
|
-
// do final cleanup
|
969
|
-
if (layer.parentNode) layer.parentNode.removeChild(layer) ;
|
970
|
-
layer = null ;
|
971
|
-
}
|
972
|
-
return this ;
|
973
|
-
},
|
974
|
-
|
975
|
-
/**
|
976
|
-
Destroys and recreates the current layer. This can be more efficient than
|
977
|
-
modifying individual child views.
|
978
|
-
|
979
|
-
@returns {SC.View} receiver
|
980
|
-
*/
|
981
|
-
replaceLayer: function() {
|
982
|
-
this.destroyLayer();
|
983
|
-
this.set('layerLocationNeedsUpdate', YES) ;
|
984
|
-
this.invokeOnce(this.updateLayerLocationIfNeeded) ;
|
985
|
-
},
|
986
|
-
|
987
|
-
/** @private -
|
988
|
-
Invokes willDestroyLayer() on view and child views. Then sets layer to
|
989
|
-
null for receiver.
|
990
|
-
*/
|
991
|
-
_notifyWillDestroyLayer: function() {
|
992
|
-
if (this.willDestroyLayer) this.willDestroyLayer() ;
|
993
|
-
var mixins = this.willDestroyLayerMixin, len, idx,
|
994
|
-
childViews = this.get('childViews') ;
|
995
|
-
if (mixins) {
|
996
|
-
len = mixins.length ;
|
997
|
-
for (idx=0; idx<len; ++idx) mixins[idx].call(this) ;
|
998
|
-
}
|
999
|
-
|
1000
|
-
len = childViews.length ;
|
1001
|
-
for (idx=0; idx<len; ++idx) childViews[idx]._notifyWillDestroyLayer() ;
|
1002
|
-
|
1003
|
-
this.set('layer', null) ;
|
1004
|
-
},
|
1005
|
-
|
1006
|
-
/**
|
1007
|
-
Invoked by createLayer() and updateLayer() to actually render a context.
|
1008
|
-
This method calls the render() method on your view along with any
|
1009
|
-
renderMixin() methods supplied by mixins you might have added.
|
1010
|
-
|
1011
|
-
You should not override this method directly. However, you might call
|
1012
|
-
this method if you choose to override updateLayer() or createLayer().
|
1013
|
-
|
1014
|
-
@param {SC.RenderContext} context the render context
|
1015
|
-
@param {Boolean} firstTime YES if this is creating a layer
|
1016
|
-
@returns {void}
|
1017
|
-
*/
|
1018
|
-
prepareContext: function(context, firstTime) {
|
1019
|
-
var mixins, len, idx, layerId, bgcolor, cursor, classNames;
|
1020
|
-
|
1021
|
-
// do some initial setup only needed at create time.
|
1022
|
-
if (firstTime) {
|
1023
|
-
// TODO: seems like things will break later if SC.guidFor(this) is used
|
1024
|
-
|
1025
|
-
layerId = this.layerId ? this.get('layerId') : SC.guidFor(this) ;
|
1026
|
-
context.id(layerId).classNames(this.get('classNames'), YES) ;
|
1027
|
-
this.renderLayout(context, firstTime) ;
|
1028
|
-
}else{
|
1029
|
-
context.resetClassNames();
|
1030
|
-
context.classNames(this.get('classNames'), YES);
|
1031
|
-
}
|
1032
|
-
|
1033
|
-
// do some standard setup...
|
1034
|
-
classNames = [];
|
1035
|
-
if (this.get('isTextSelectable')) classNames.push('allow-select') ;
|
1036
|
-
if (!this.get('isEnabled')) classNames.push('disabled') ;
|
1037
|
-
if (!this.get('isVisible')) classNames.push('hidden') ;
|
1038
|
-
if (this.get('isFirstResponder')) classNames.push('focus');
|
1039
|
-
if (this.get('useStaticLayout')) classNames.push('sc-static-layout');
|
1040
|
-
|
1041
|
-
bgcolor = this.get('backgroundColor');
|
1042
|
-
if (bgcolor) context.addStyle('backgroundColor', bgcolor);
|
1043
|
-
|
1044
|
-
// Sets cursor class, if present.
|
1045
|
-
cursor = this.get('cursor');
|
1046
|
-
if (!cursor && this.get('shouldInheritCursor')) {
|
1047
|
-
// If this view has no cursor and should inherit it from the parent,
|
1048
|
-
// then it sets its own cursor view. This sets the cursor rather than
|
1049
|
-
// simply using the parent's cursor object so that its cursorless
|
1050
|
-
// childViews can also inherit it.
|
1051
|
-
cursor = this.getPath('parentView.cursor');
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
if (SC.typeOf(cursor) === SC.T_STRING) {
|
1055
|
-
cursor = SC.objectForPropertyPath(cursor);
|
1056
|
-
}
|
1057
|
-
|
1058
|
-
if (cursor instanceof SC.Cursor) {
|
1059
|
-
classNames.push(cursor.get('className')) ;
|
1060
|
-
}
|
1061
|
-
|
1062
|
-
// Doing a single call to 'addClass' is faster than multiple.
|
1063
|
-
context.addClass(classNames);
|
1064
|
-
|
1065
|
-
this.beginPropertyChanges() ;
|
1066
|
-
this.set('layerNeedsUpdate', NO) ;
|
1067
|
-
this.render(context, firstTime) ;
|
1068
|
-
if (mixins = this.renderMixin) {
|
1069
|
-
len = mixins.length;
|
1070
|
-
for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, firstTime) ;
|
1071
|
-
}
|
1072
|
-
this.endPropertyChanges() ;
|
1073
|
-
},
|
1074
|
-
|
1075
|
-
/**
|
1076
|
-
Your render method should invoke this method to render any child views,
|
1077
|
-
especially if this is the first time the view will be rendered. This will
|
1078
|
-
walk down the childView chain, rendering all of the children in a nested
|
1079
|
-
way.
|
1080
|
-
|
1081
|
-
@param {SC.RenderContext} context the context
|
1082
|
-
@param {Boolean} firstName true if the layer is being created
|
1083
|
-
@returns {SC.RenderContext} the render context
|
1084
|
-
@test in render
|
1085
|
-
*/
|
1086
|
-
renderChildViews: function(context, firstTime) {
|
1087
|
-
var cv = this.get('childViews'), len = cv.length, idx, view ;
|
1088
|
-
for (idx=0; idx<len; ++idx) {
|
1089
|
-
view = cv[idx] ;
|
1090
|
-
if (!view) continue;
|
1091
|
-
context = context.begin(view.get('tagName')) ;
|
1092
|
-
view.prepareContext(context, firstTime) ;
|
1093
|
-
context = context.end() ;
|
1094
|
-
}
|
1095
|
-
return context ;
|
1096
|
-
},
|
1097
|
-
|
1098
|
-
/**
|
1099
|
-
Invoked whenever your view needs to be rendered, including when the view's
|
1100
|
-
layer is first created and any time in the future when it needs to be
|
1101
|
-
updated.
|
1102
|
-
|
1103
|
-
You will normally override this method in your subclassed views to
|
1104
|
-
provide whatever drawing functionality you will need in order to
|
1105
|
-
render your content.
|
1106
|
-
|
1107
|
-
You can use the passed firstTime property to determine whether or not
|
1108
|
-
you need to completely re-render the view or only update the surrounding
|
1109
|
-
HTML.
|
1110
|
-
|
1111
|
-
The default implementation of this method simply calls renderChildViews()
|
1112
|
-
if this is the first time you are rendering, or null otherwise.
|
1113
|
-
|
1114
|
-
@param {SC.RenderContext} context the render context
|
1115
|
-
@param {Boolean} firstTime YES if this is creating a layer
|
1116
|
-
@returns {void}
|
1117
|
-
*/
|
1118
|
-
render: function(context, firstTime) {
|
1119
|
-
if (firstTime) this.renderChildViews(context, firstTime) ;
|
1120
|
-
},
|
1121
|
-
|
1122
|
-
|
1123
|
-
/** @private -
|
1124
|
-
Invokes the receivers didAppendLayerToDocument() method if it exists and
|
1125
|
-
then invokes the same on all child views.
|
1126
|
-
*/
|
1127
|
-
|
1128
|
-
_notifyDidAppendToDocument: function() {
|
1129
|
-
if (this.didAppendToDocument) this.didAppendToDocument();
|
1130
|
-
|
1131
|
-
var i=0, child, childLen, children = this.get('childViews');
|
1132
|
-
for(i=0, childLen=children.length; i<childLen; i++) {
|
1133
|
-
child = children[i];
|
1134
|
-
if(child._notifyDidAppendToDocument){
|
1135
|
-
child._notifyDidAppendToDocument();
|
1136
|
-
}
|
1137
|
-
}
|
1138
|
-
},
|
1139
|
-
|
1140
|
-
childViewsObserver: function(){
|
1141
|
-
var childViews = this.get('childViews'), i, iLen, child;
|
1142
|
-
for(i=0, iLen = childViews.length; i<iLen; i++){
|
1143
|
-
child = childViews[i];
|
1144
|
-
if(child._notifyDidAppendToDocument){
|
1145
|
-
child._notifyDidAppendToDocument();
|
1146
|
-
}
|
1147
|
-
}
|
1148
|
-
}.observes('childViews'),
|
1149
|
-
|
1150
|
-
// ..........................................................
|
1151
|
-
// STANDARD RENDER PROPERTIES
|
1152
|
-
//
|
1153
|
-
|
1154
|
-
/**
|
1155
|
-
Tag name for the view's outer element. The tag name is only used when
|
1156
|
-
a layer is first created. If you change the tagName for an element, you
|
1157
|
-
must destroy and recreate the view layer.
|
1158
|
-
|
1159
|
-
@property {String}
|
1160
|
-
*/
|
1161
|
-
tagName: 'div',
|
1162
|
-
|
1163
|
-
/**
|
1164
|
-
Standard CSS class names to apply to the view's outer element. This
|
1165
|
-
property automatically inherits any class names defined by the view's
|
1166
|
-
superclasses as well.
|
1167
|
-
|
1168
|
-
@property {Array}
|
1169
|
-
*/
|
1170
|
-
classNames: ['sc-view'],
|
1171
|
-
|
1172
|
-
/**
|
1173
|
-
Tool tip property that will be set to the title attribute on the HTML
|
1174
|
-
rendered element.
|
1175
|
-
|
1176
|
-
@property {String}
|
1177
|
-
*/
|
1178
|
-
toolTip: null,
|
1179
|
-
|
1180
|
-
/**
|
1181
|
-
Determines if the user can select text within the view. Normally this is
|
1182
|
-
set to NO to disable text selection. You should set this to YES if you
|
1183
|
-
are creating a view that includes editable text. Otherwise, settings this
|
1184
|
-
to YES will probably make your controls harder to use and it is not
|
1185
|
-
recommended.
|
1186
|
-
|
1187
|
-
@property {Boolean}
|
1188
|
-
@readOnly
|
1189
|
-
*/
|
1190
|
-
isTextSelectable: NO,
|
1191
|
-
|
1192
|
-
/**
|
1193
|
-
You can set this array to include any properties that should immediately
|
1194
|
-
invalidate the display. The display will be automatically invalidated
|
1195
|
-
when one of these properties change.
|
1196
|
-
|
1197
|
-
Implementation note: 'isVisible' is also effectively a display property,
|
1198
|
-
but it is not declared as such because the same effect is implemented
|
1199
|
-
inside _sc_isVisibleDidChange(). This avoids having two observers on
|
1200
|
-
'isVisible', which is:
|
1201
|
-
a. More efficient
|
1202
|
-
b. More correct, because we can guarantee the order of operations
|
1203
|
-
|
1204
|
-
@property {Array}
|
1205
|
-
@readOnly
|
1206
|
-
*/
|
1207
|
-
displayProperties: ['isFirstResponder'],
|
1208
|
-
|
1209
|
-
/**
|
1210
|
-
You can set this to an SC.Cursor instance; its class name will
|
1211
|
-
automatically be added to the layer's classNames, allowing you
|
1212
|
-
to efficiently change the cursor for a large group of views with
|
1213
|
-
just one change to the SC.Cursor object. The cursor property
|
1214
|
-
is only used when the layer is created, so if you need to change
|
1215
|
-
it to a different cursor object, you will have to destroy and
|
1216
|
-
recreate the view layer. (In this case you might investigate
|
1217
|
-
setting cursors using CSS directly instead of SC.Cursor.)
|
1218
|
-
|
1219
|
-
@property {SC.Cursor String}
|
1220
|
-
*/
|
1221
|
-
cursor: null,
|
1222
|
-
|
1223
|
-
/**
|
1224
|
-
A child view without a cursor of its own inherits its parent's cursor by
|
1225
|
-
default. Set this to NO to prevent this behavior.
|
1226
|
-
|
1227
|
-
@property {Boolean}
|
1228
|
-
*/
|
1229
|
-
shouldInheritCursor: YES,
|
1230
|
-
|
1231
|
-
// ..........................................................
|
1232
|
-
// LAYER LOCATION
|
1233
|
-
//
|
1234
|
-
|
1235
|
-
/**
|
1236
|
-
Set to YES when the view's layer location is dirty. You can call
|
1237
|
-
updateLayerLocationIfNeeded() to clear this flag if it is set.
|
1238
|
-
|
1239
|
-
@property {Boolean}
|
1240
|
-
*/
|
1241
|
-
layerLocationNeedsUpdate: NO,
|
1242
|
-
|
1243
|
-
/**
|
1244
|
-
Calls updateLayerLocation(), but only if the view's layer location
|
1245
|
-
currently needs to be updated. This method is called automatically at
|
1246
|
-
the end of a run loop if you have called parentViewDidChange() at some
|
1247
|
-
point.
|
1248
|
-
|
1249
|
-
@property {Boolean} force This property is ignored.
|
1250
|
-
@returns {SC.View} receiver
|
1251
|
-
@test in updateLayerLocation
|
1252
|
-
*/
|
1253
|
-
updateLayerLocationIfNeeded: function(force) {
|
1254
|
-
if (this.get('layerLocationNeedsUpdate')) {
|
1255
|
-
this.updateLayerLocation() ;
|
1256
|
-
}
|
1257
|
-
return this ;
|
1258
|
-
},
|
1259
|
-
|
1260
|
-
/**
|
1261
|
-
This method is called when a view changes its location in the view
|
1262
|
-
hierarchy. This method will update the underlying DOM-location of the
|
1263
|
-
layer so that it reflects the new location.
|
1264
|
-
|
1265
|
-
@returns {SC.View} receiver
|
1266
|
-
*/
|
1267
|
-
updateLayerLocation: function() {
|
1268
|
-
// collect some useful value
|
1269
|
-
// if there is no node for some reason, just exit
|
1270
|
-
var node = this.get('layer'),
|
1271
|
-
parentView = this.get('parentView'),
|
1272
|
-
parentNode = parentView ? parentView.get('containerLayer') : null ;
|
1273
|
-
|
1274
|
-
// remove node from current parentNode if the node does not match the new
|
1275
|
-
// parent node.
|
1276
|
-
if (node && node.parentNode && node.parentNode !== parentNode) {
|
1277
|
-
node.parentNode.removeChild(node);
|
1278
|
-
}
|
1279
|
-
|
1280
|
-
// CASE 1: no new parentView. just remove from parent (above).
|
1281
|
-
if (!parentView) {
|
1282
|
-
if (node && node.parentNode) node.parentNode.removeChild(node);
|
1283
|
-
|
1284
|
-
// CASE 2: parentView has no layer, view has layer. destroy layer
|
1285
|
-
// CASE 3: parentView has no layer, view has no layer, nothing to do
|
1286
|
-
} else if (!parentNode) {
|
1287
|
-
if (node) {
|
1288
|
-
if (node.parentNode) node.parentNode.removeChild(node);
|
1289
|
-
this.destroyLayer();
|
1290
|
-
}
|
1291
|
-
|
1292
|
-
// CASE 4: parentView has layer, view has no layer. create layer & add
|
1293
|
-
// CASE 5: parentView has layer, view has layer. move layer
|
1294
|
-
} else {
|
1295
|
-
if (!node) {
|
1296
|
-
this.createLayer() ;
|
1297
|
-
node = this.get('layer') ;
|
1298
|
-
if (!node) return; // can't do anything without a node.
|
1299
|
-
}
|
1300
|
-
|
1301
|
-
var siblings = parentView.get('childViews'),
|
1302
|
-
nextView = siblings.objectAt(siblings.indexOf(this)+1),
|
1303
|
-
nextNode = (nextView) ? nextView.get('layer') : null ;
|
1304
|
-
|
1305
|
-
// before we add to parent node, make sure that the nextNode exists...
|
1306
|
-
if (nextView && (!nextNode || nextNode.parentNode!==parentNode)) {
|
1307
|
-
nextView.updateLayerLocationIfNeeded() ;
|
1308
|
-
nextNode = nextView.get('layer') ;
|
1309
|
-
}
|
1310
|
-
|
1311
|
-
// add to parentNode if needed.
|
1312
|
-
if ((node.parentNode!==parentNode) || (node.nextSibling!==nextNode)) {
|
1313
|
-
parentNode.insertBefore(node, nextNode) ;
|
1314
|
-
}
|
1315
|
-
}
|
1316
|
-
|
1317
|
-
parentNode = parentView = node = nextNode = null ; // avoid memory leaks
|
1318
|
-
|
1319
|
-
this.set('layerLocationNeedsUpdate', NO) ;
|
1320
|
-
|
1321
|
-
return this ;
|
1322
|
-
},
|
1323
|
-
|
1324
|
-
// .......................................................
|
1325
|
-
// SC.RESPONDER SUPPORT
|
1326
|
-
//
|
1327
|
-
|
1328
|
-
/** @property
|
1329
|
-
The nextResponder is usually the parentView.
|
1330
|
-
*/
|
1331
|
-
nextResponder: function() {
|
1332
|
-
return this.get('parentView') ;
|
1333
|
-
}.property('parentView').cacheable(),
|
1334
|
-
|
1335
|
-
|
1336
|
-
/** @property
|
1337
|
-
Set to YES if your view is willing to accept first responder status. This
|
1338
|
-
is used when calculcating key responder loop.
|
1339
|
-
*/
|
1340
|
-
acceptsFirstResponder: NO,
|
1341
|
-
|
1342
|
-
// ..........................................................
|
1343
|
-
// KEY RESPONDER
|
1344
|
-
//
|
1345
|
-
|
1346
|
-
/** @property
|
1347
|
-
YES if the view is currently first responder and the pane the view belongs
|
1348
|
-
to is also key pane. While this property is set, you should expect to
|
1349
|
-
receive keyboard events.
|
1350
|
-
*/
|
1351
|
-
isKeyResponder: NO,
|
1352
|
-
|
1353
|
-
/**
|
1354
|
-
This method is invoked just before you lost the key responder status.
|
1355
|
-
The passed view is the view that is about to gain keyResponder status.
|
1356
|
-
This gives you a chance to do any early setup. Remember that you can
|
1357
|
-
gain/lose key responder status either because another view in the same
|
1358
|
-
pane is becoming first responder or because another pane is about to
|
1359
|
-
become key.
|
1360
|
-
|
1361
|
-
@param {SC.Responder} responder
|
1362
|
-
*/
|
1363
|
-
willLoseKeyResponderTo: function(responder) {},
|
1364
|
-
|
1365
|
-
/**
|
1366
|
-
This method is invoked just before you become the key responder. The
|
1367
|
-
passed view is the view that is about to lose keyResponder status. You
|
1368
|
-
can use this to do any setup before the view changes.
|
1369
|
-
Remember that you can gain/lose key responder status either because
|
1370
|
-
another view in the same pane is becoming first responder or because
|
1371
|
-
another pane is about to become key.
|
1372
|
-
|
1373
|
-
@param {SC.Responder} responder
|
1374
|
-
*/
|
1375
|
-
willBecomeKeyResponderFrom: function(responder) {},
|
1376
|
-
|
1377
|
-
/**
|
1378
|
-
Invokved just after the responder loses key responder status.
|
1379
|
-
*/
|
1380
|
-
didLoseKeyResponderTo: function(responder) {},
|
1381
|
-
|
1382
|
-
/**
|
1383
|
-
Invoked just after the responder gains key responder status.
|
1384
|
-
*/
|
1385
|
-
didBecomeKeyResponderFrom: function(responder) {},
|
1386
|
-
|
1387
|
-
/**
|
1388
|
-
This method will process a key input event, attempting to convert it to
|
1389
|
-
an appropriate action method and sending it up the responder chain. The
|
1390
|
-
event is converted using the SC.KEY_BINDINGS hash, which maps key events
|
1391
|
-
into method names. If no key binding is found, then the key event will
|
1392
|
-
be passed along using an insertText() method.
|
1393
|
-
|
1394
|
-
@param {SC.Event} event
|
1395
|
-
@returns {Object} object that handled event, if any
|
1396
|
-
*/
|
1397
|
-
interpretKeyEvents: function(event) {
|
1398
|
-
var codes = event.commandCodes(), cmd = codes[0], chr = codes[1], ret;
|
1399
|
-
|
1400
|
-
if (!cmd && !chr) return null ; //nothing to do.
|
1401
|
-
|
1402
|
-
// if this is a command key, try to do something about it.
|
1403
|
-
if (cmd) {
|
1404
|
-
var methodName = SC.MODIFIED_KEY_BINDINGS[cmd] || SC.BASE_KEY_BINDINGS[cmd.match(/[^_]+$/)[0]];
|
1405
|
-
if (methodName) {
|
1406
|
-
var target = this, pane = this.get('pane'), handler = null;
|
1407
|
-
while(target && !(handler = target.tryToPerform(methodName, event))){
|
1408
|
-
target = (target===pane)? null: target.get('nextResponder') ;
|
1409
|
-
}
|
1410
|
-
return handler ;
|
1411
|
-
}
|
1412
|
-
}
|
1413
|
-
|
1414
|
-
if (chr && this.respondsTo('insertText')) {
|
1415
|
-
// if we haven't returned yet and there is plain text, then do an insert
|
1416
|
-
// of the text. Since this is not an action, do not send it up the
|
1417
|
-
// responder chain.
|
1418
|
-
ret = this.insertText(chr, event);
|
1419
|
-
return ret ? (ret===YES ? this : ret) : null ; // map YES|NO => this|nil
|
1420
|
-
}
|
1421
|
-
|
1422
|
-
return null ; //nothing to do.
|
1423
|
-
},
|
1424
|
-
|
1425
|
-
/**
|
1426
|
-
This method is invoked by interpretKeyEvents() when you receive a key
|
1427
|
-
event matching some plain text. You can use this to actually insert the
|
1428
|
-
text into your application, if needed.
|
1429
|
-
|
1430
|
-
@param {SC.Event} event
|
1431
|
-
@returns {Object} receiver or object that handled event
|
1432
|
-
*/
|
1433
|
-
insertText: function(chr) {
|
1434
|
-
return NO ;
|
1435
|
-
},
|
1436
|
-
|
1437
|
-
/**
|
1438
|
-
Recursively travels down the view hierarchy looking for a view that
|
1439
|
-
implements the key equivalent (returning to YES to indicate it handled
|
1440
|
-
the event). You can override this method to handle specific key
|
1441
|
-
equivalents yourself.
|
1442
|
-
|
1443
|
-
The keystring is a string description of the key combination pressed.
|
1444
|
-
The evt is the event itself. If you handle the equivalent, return YES.
|
1445
|
-
Otherwise, you should just return sc_super.
|
1446
|
-
|
1447
|
-
@param {String} keystring
|
1448
|
-
@param {SC.Event} evt
|
1449
|
-
@returns {Boolean}
|
1450
|
-
*/
|
1451
|
-
performKeyEquivalent: function(keystring, evt) {
|
1452
|
-
var ret = NO,
|
1453
|
-
childViews = this.get('childViews'),
|
1454
|
-
len = childViews.length,
|
1455
|
-
idx = -1 ;
|
1456
|
-
while (!ret && (++idx < len)) {
|
1457
|
-
ret = childViews[idx].performKeyEquivalent(keystring, evt) ;
|
1458
|
-
}
|
1459
|
-
return ret ;
|
1460
|
-
},
|
1461
|
-
|
1462
|
-
/**
|
1463
|
-
Optionally points to the next key view that should gain focus when tabbing
|
1464
|
-
through an interface. If this is not set, then the next key view will
|
1465
|
-
be set automatically to the next child.
|
1466
|
-
*/
|
1467
|
-
nextKeyView: null,
|
1468
|
-
|
1469
|
-
/**
|
1470
|
-
Computes the next valid key view, possibly returning the receiver or null.
|
1471
|
-
This is the next key view that acceptsFirstResponder.
|
1472
|
-
|
1473
|
-
@property
|
1474
|
-
@type SC.View
|
1475
|
-
*/
|
1476
|
-
nextValidKeyView: function() {
|
1477
|
-
var seen = [],
|
1478
|
-
rootView = this.get('pane'), ret = this.get('nextKeyView');
|
1479
|
-
|
1480
|
-
if(!ret) ret = rootView._computeNextValidKeyView(this, seen);
|
1481
|
-
|
1482
|
-
if(SC.TABBING_ONLY_INSIDE_DOCUMENT && !ret) {
|
1483
|
-
ret = rootView._computeNextValidKeyView(rootView, seen);
|
1484
|
-
}
|
1485
|
-
|
1486
|
-
return ret ;
|
1487
|
-
}.property('nextKeyView'),
|
1488
|
-
|
1489
|
-
_computeNextValidKeyView: function(currentView, seen) {
|
1490
|
-
var ret = this.get('nextKeyView'),
|
1491
|
-
children, i, childLen, child;
|
1492
|
-
if(this !== currentView && seen.indexOf(currentView)!=-1 &&
|
1493
|
-
this.get('acceptsFirstResponder') && this.get('isVisibleInWindow')){
|
1494
|
-
return this;
|
1495
|
-
}
|
1496
|
-
seen.push(this); // avoid cycles
|
1497
|
-
|
1498
|
-
// find next sibling
|
1499
|
-
if (!ret) {
|
1500
|
-
children = this.get('childViews');
|
1501
|
-
for(i=0, childLen = children.length; i<childLen; i++){
|
1502
|
-
child = children[i];
|
1503
|
-
if(child.get('isVisibleInWindow') && child.get('isVisible')){
|
1504
|
-
ret = child._computeNextValidKeyView(currentView, seen);
|
1505
|
-
}
|
1506
|
-
if (ret) return ret;
|
1507
|
-
}
|
1508
|
-
ret = null;
|
1509
|
-
}
|
1510
|
-
return ret ;
|
1511
|
-
},
|
1512
|
-
|
1513
|
-
/**
|
1514
|
-
Optionally points to the previous key view that should gain focus when
|
1515
|
-
tabbing through the interface. If this is not set then the previous
|
1516
|
-
key view will be set automatically to the previous child.
|
1517
|
-
*/
|
1518
|
-
previousKeyView: null,
|
1519
|
-
|
1520
|
-
/**
|
1521
|
-
Computes the previous valid key view, possibly returning the receiver or
|
1522
|
-
null. This is the previous key view that acceptsFirstResponder.
|
1523
|
-
|
1524
|
-
@property
|
1525
|
-
@type SC.View
|
1526
|
-
*/
|
1527
|
-
previousValidKeyView: function() {
|
1528
|
-
var seen = [],
|
1529
|
-
rootView = this.pane(), ret = this.get('previousKeyView');
|
1530
|
-
if(!ret) ret = rootView._computePreviousValidKeyView(this, seen);
|
1531
|
-
return ret ;
|
1532
|
-
}.property('previousKeyView'),
|
1533
|
-
|
1534
|
-
_computePreviousValidKeyView: function(currentView, seen) {
|
1535
|
-
var ret = this.get('previousKeyView'),
|
1536
|
-
children, i, child;
|
1537
|
-
|
1538
|
-
if(this !== currentView && seen.indexOf(currentView)!=-1 &&
|
1539
|
-
this.get('acceptsFirstResponder') && this.get('isVisibleInWindow')){
|
1540
|
-
return this;
|
1541
|
-
}
|
1542
|
-
seen.push(this); // avoid cycles
|
1543
|
-
|
1544
|
-
// find next sibling
|
1545
|
-
if (!ret) {
|
1546
|
-
children = this.get('childViews');
|
1547
|
-
for(i=children.length-1; 0<=i; i--){
|
1548
|
-
child = children[i];
|
1549
|
-
if(child.get('isVisibleInWindow') && child.get('isVisible')){
|
1550
|
-
ret = child._computePreviousValidKeyView(currentView, seen);
|
1551
|
-
}
|
1552
|
-
if (ret) return ret;
|
1553
|
-
}
|
1554
|
-
ret = null;
|
1555
|
-
}
|
1556
|
-
return ret ;
|
1557
|
-
},
|
1558
|
-
|
1559
|
-
// .......................................................
|
1560
|
-
// CORE DISPLAY METHODS
|
1561
|
-
//
|
1562
|
-
|
1563
|
-
/** @private
|
1564
|
-
Setup a view, but do not finish waking it up.
|
1565
|
-
- configure childViews
|
1566
|
-
- generate DOM + plug in outlets/childViews unless rootElement is defined
|
1567
|
-
- register the view with the global views hash, which is used for mgmt
|
1568
|
-
*/
|
1569
|
-
init: function() {
|
1570
|
-
var parentView, path, root, idx, len, lp, dp ;
|
1571
|
-
|
1572
|
-
sc_super() ;
|
1573
|
-
|
1574
|
-
// Register this view for event handling
|
1575
|
-
SC.View.views[this.get('layerId')] = this ;
|
1576
|
-
|
1577
|
-
var childViews = this.get('childViews');
|
1578
|
-
|
1579
|
-
// setup child views. be sure to clone the child views array first
|
1580
|
-
this.childViews = childViews ? childViews.slice() : [] ;
|
1581
|
-
this.createChildViews() ; // setup child Views
|
1582
|
-
|
1583
|
-
// register display property observers ..
|
1584
|
-
// TODO: Optimize into class setup
|
1585
|
-
dp = this.get('displayProperties') ;
|
1586
|
-
idx = dp.length ;
|
1587
|
-
while (--idx >= 0) {
|
1588
|
-
this.addObserver(dp[idx], this, this.displayDidChange) ;
|
1589
|
-
}
|
1590
|
-
|
1591
|
-
// register for drags
|
1592
|
-
if (this.get('isDropTarget')) SC.Drag.addDropTarget(this) ;
|
1593
|
-
|
1594
|
-
// register scroll views for autoscroll during drags
|
1595
|
-
if (this.get('isScrollable')) SC.Drag.addScrollableView(this) ;
|
1596
|
-
},
|
1597
|
-
|
1598
|
-
/**
|
1599
|
-
Wakes up the view. The default implementation immediately syncs any
|
1600
|
-
bindings, which may cause the view to need its display updated. You
|
1601
|
-
can override this method to perform any additional setup. Be sure to
|
1602
|
-
call sc_super to setup bindings and to call awake on childViews.
|
1603
|
-
|
1604
|
-
It is best to awake a view before you add it to the DOM. This way when
|
1605
|
-
the DOM is generated, it will have the correct initial values and will
|
1606
|
-
not require any additional setup.
|
1607
|
-
|
1608
|
-
@returns {void}
|
1609
|
-
*/
|
1610
|
-
awake: function() {
|
1611
|
-
sc_super();
|
1612
|
-
var childViews = this.get('childViews'), len = childViews.length, idx ;
|
1613
|
-
for (idx=0; idx<len; ++idx) {
|
1614
|
-
if (!childViews[idx]) continue ;
|
1615
|
-
childViews[idx].awake() ;
|
1616
|
-
}
|
1617
|
-
},
|
1618
|
-
|
1619
|
-
/**
|
1620
|
-
You must call this method on a view to destroy the view (and all of its
|
1621
|
-
child views). This will remove the view from any parent node, then make
|
1622
|
-
sure that the DOM element managed by the view can be released by the
|
1623
|
-
memory manager.
|
1624
|
-
*/
|
1625
|
-
destroy: function() {
|
1626
|
-
if (this.get('isDestroyed')) return this; // nothing to do
|
1627
|
-
|
1628
|
-
this._destroy(); // core destroy method
|
1629
|
-
|
1630
|
-
// remove from parent if found
|
1631
|
-
this.removeFromParent() ;
|
1632
|
-
|
1633
|
-
// unregister for drags
|
1634
|
-
if (this.get('isDropTarget')) SC.Drag.removeDropTarget(this) ;
|
1635
|
-
|
1636
|
-
// unregister for autoscroll during drags
|
1637
|
-
if (this.get('isScrollable')) SC.Drag.removeScrollableView(this) ;
|
1638
|
-
|
1639
|
-
//Do generic destroy. It takes care of mixins and sets isDestroyed to YES.
|
1640
|
-
sc_super();
|
1641
|
-
return this; // done with cleanup
|
1642
|
-
},
|
1643
|
-
|
1644
|
-
_destroy: function() {
|
1645
|
-
if (this.get('isDestroyed')) return this ; // nothing to do
|
1646
|
-
|
1647
|
-
// destroy the layer -- this will avoid each child view destroying
|
1648
|
-
// the layer over and over again...
|
1649
|
-
this.destroyLayer() ;
|
1650
|
-
|
1651
|
-
// first destroy any children.
|
1652
|
-
var childViews = this.get('childViews'), len = childViews.length, idx ;
|
1653
|
-
if (len) {
|
1654
|
-
childViews = childViews.slice() ;
|
1655
|
-
for (idx=0; idx<len; ++idx) childViews[idx].destroy() ;
|
1656
|
-
}
|
1657
|
-
|
1658
|
-
// next remove view from global hash
|
1659
|
-
delete SC.View.views[this.get('layerId')] ;
|
1660
|
-
delete this._CQ ;
|
1661
|
-
delete this.page ;
|
1662
|
-
|
1663
|
-
return this ;
|
1664
|
-
},
|
1665
|
-
|
1666
|
-
/**
|
1667
|
-
This method is called when your view is first created to setup any child
|
1668
|
-
views that are already defined on your class. If any are found, it will
|
1669
|
-
instantiate them for you.
|
1670
|
-
|
1671
|
-
The default implementation of this method simply steps through your
|
1672
|
-
childViews array, which is expects to either be empty or to contain View
|
1673
|
-
designs that can be instantiated
|
1674
|
-
|
1675
|
-
Alternatively, you can implement this method yourself in your own
|
1676
|
-
subclasses to look for views defined on specific properties and then build
|
1677
|
-
a childViews array yourself.
|
1678
|
-
|
1679
|
-
Note that when you implement this method yourself, you should never
|
1680
|
-
instantiate views directly. Instead, you should use
|
1681
|
-
this.createChildView() method instead. This method can be much faster in
|
1682
|
-
a production environment than creating views yourself.
|
1683
|
-
|
1684
|
-
@returns {SC.View} receiver
|
1685
|
-
*/
|
1686
|
-
createChildViews: function() {
|
1687
|
-
var childViews = this.get('childViews'),
|
1688
|
-
len = childViews.length,
|
1689
|
-
idx, key, views, view ;
|
1690
|
-
|
1691
|
-
this.beginPropertyChanges() ;
|
1692
|
-
|
1693
|
-
// swap the array
|
1694
|
-
for (idx=0; idx<len; ++idx) {
|
1695
|
-
if (key = (view = childViews[idx])) {
|
1696
|
-
|
1697
|
-
// is this is a key name, lookup view class
|
1698
|
-
if (typeof key === SC.T_STRING) {
|
1699
|
-
view = this[key];
|
1700
|
-
} else key = null ;
|
1701
|
-
|
1702
|
-
if (!view) {
|
1703
|
-
console.error ("No view with name "+key+" has been found in "+this.toString());
|
1704
|
-
// skip this one.
|
1705
|
-
continue;
|
1706
|
-
}
|
1707
|
-
|
1708
|
-
if (view.isClass) {
|
1709
|
-
view = this.createChildView(view) ; // instantiate if needed
|
1710
|
-
if (key) this[key] = view ; // save on key name if passed
|
1711
|
-
}
|
1712
|
-
}
|
1713
|
-
childViews[idx] = view;
|
1714
|
-
}
|
1715
|
-
|
1716
|
-
this.endPropertyChanges() ;
|
1717
|
-
return this ;
|
1718
|
-
},
|
1719
|
-
|
1720
|
-
/**
|
1721
|
-
Instantiates a view to be added to the childViews array during view
|
1722
|
-
initialization. You generally will not call this method directly unless
|
1723
|
-
you are overriding createChildViews(). Note that this method will
|
1724
|
-
automatically configure the correct settings on the new view instance to
|
1725
|
-
act as a child of the parent.
|
1726
|
-
|
1727
|
-
@param {Class} viewClass
|
1728
|
-
@param {Hash} attrs optional attributes to add
|
1729
|
-
@returns {SC.View} new instance
|
1730
|
-
@test in createChildViews
|
1731
|
-
*/
|
1732
|
-
createChildView: function(view, attrs) {
|
1733
|
-
// attrs should always exist...
|
1734
|
-
if (!attrs) attrs = {} ;
|
1735
|
-
attrs.owner = attrs.parentView = this ;
|
1736
|
-
attrs.isVisibleInWindow = this.get('isVisibleInWindow');
|
1737
|
-
if (!attrs.page) attrs.page = this.page ;
|
1738
|
-
|
1739
|
-
// Now add this to the attributes and create.
|
1740
|
-
view = view.create(attrs) ;
|
1741
|
-
return view ;
|
1742
|
-
},
|
1743
|
-
|
1744
|
-
// ...........................................
|
1745
|
-
// LAYOUT
|
1746
|
-
//
|
1747
|
-
|
1748
|
-
/**
|
1749
|
-
The 'frame' property depends on the 'layout' property as well as the
|
1750
|
-
parent view’s frame. In order to properly invalidate any cached values,
|
1751
|
-
we need to invalidate the cache whenever 'layout' changes. However,
|
1752
|
-
observing 'layout' does not guarantee that; the observer might not be run
|
1753
|
-
immediately.
|
1754
|
-
|
1755
|
-
In order to avoid any window of opportunity where the cached frame could
|
1756
|
-
be invalid, we need to force layoutDidChange() to always immediately run
|
1757
|
-
whenever 'layout' is set.
|
1758
|
-
*/
|
1759
|
-
propertyDidChange: function(key, value, _keepCache) {
|
1760
|
-
// If the key is 'layout', we need to call layoutDidChange() immediately
|
1761
|
-
// so that if the frame has changed any cached values (for both this view
|
1762
|
-
// and any child views) can be appropriately invalidated.
|
1763
|
-
|
1764
|
-
// To allow layout to be a computed property, we check if any property has
|
1765
|
-
// changed and if layout is dependent on the property.
|
1766
|
-
// If it is we call layoutDidChange.
|
1767
|
-
var layoutChange=false;
|
1768
|
-
if(typeof this.layout === "function" && this._kvo_dependents) {
|
1769
|
-
var dependents = this._kvo_dependents[key];
|
1770
|
-
if(dependents && dependents.indexOf('layout')!=-1) layoutChange = true;
|
1771
|
-
}
|
1772
|
-
if(key==='layout' || layoutChange) this.layoutDidChange();
|
1773
|
-
// Resume notification as usual.
|
1774
|
-
sc_super();
|
1775
|
-
},
|
1776
|
-
|
1777
|
-
|
1778
|
-
/**
|
1779
|
-
This convenience method will take the current layout, apply any changes
|
1780
|
-
you pass and set it again. It is more convenient than having to do this
|
1781
|
-
yourself sometimes.
|
1782
|
-
|
1783
|
-
You can pass just a key/value pair or a hash with several pairs. You can
|
1784
|
-
also pass a null value to delete a property.
|
1785
|
-
|
1786
|
-
This method will avoid actually setting the layout if the value you pass
|
1787
|
-
does not edit the layout.
|
1788
|
-
|
1789
|
-
@param {String|Hash} key
|
1790
|
-
@param {Object} value
|
1791
|
-
@returns {SC.View} receiver
|
1792
|
-
*/
|
1793
|
-
adjust: function(key, value) {
|
1794
|
-
var layout = SC.clone(this.get('layout')), didChange = NO, cur ;
|
1795
|
-
|
1796
|
-
if (key === undefined) return this ; // nothing to do.
|
1797
|
-
|
1798
|
-
// handle string case
|
1799
|
-
if (SC.typeOf(key) === SC.T_STRING) {
|
1800
|
-
cur = layout[key] ;
|
1801
|
-
if (SC.none(value)) {
|
1802
|
-
if (cur !== undefined) didChange = YES ;
|
1803
|
-
delete layout[key] ;
|
1804
|
-
} else {
|
1805
|
-
if (cur !== value) didChange = YES ;
|
1806
|
-
layout[key] = value ;
|
1807
|
-
}
|
1808
|
-
|
1809
|
-
// handle hash -- do it this way to avoid creating memory unless needed
|
1810
|
-
} else {
|
1811
|
-
var hash = key;
|
1812
|
-
for(key in hash) {
|
1813
|
-
if (!hash.hasOwnProperty(key)) continue;
|
1814
|
-
value = hash[key] ;
|
1815
|
-
cur = layout[key] ;
|
1816
|
-
|
1817
|
-
if (value === null) {
|
1818
|
-
if (cur !== undefined) didChange = YES ;
|
1819
|
-
delete layout[key] ;
|
1820
|
-
} else if (value !== undefined) {
|
1821
|
-
if (cur !== value) didChange = YES ;
|
1822
|
-
layout[key] = value ;
|
1823
|
-
}
|
1824
|
-
}
|
1825
|
-
}
|
1826
|
-
// now set adjusted layout
|
1827
|
-
if (didChange) this.set('layout', layout) ;
|
1828
|
-
|
1829
|
-
return this ;
|
1830
|
-
},
|
1831
|
-
|
1832
|
-
/**
|
1833
|
-
The layout describes how you want your view to be positions on the
|
1834
|
-
screen. You can define the following properties:
|
1835
|
-
|
1836
|
-
- left: the left edge
|
1837
|
-
- top: the top edge
|
1838
|
-
- right: the right edge
|
1839
|
-
- bottom: the bottom edge
|
1840
|
-
- height: the height
|
1841
|
-
- width: the width
|
1842
|
-
- centerX: an offset from center X
|
1843
|
-
- centerY: an offset from center Y
|
1844
|
-
- minWidth: a minimum width
|
1845
|
-
- minHeight: a minimum height
|
1846
|
-
- maxWidth: a maximum width
|
1847
|
-
- maxHeight: a maximum height
|
1848
|
-
|
1849
|
-
Note that you can only use certain combinations to set layout. For
|
1850
|
-
example, you may set left/right or left/width, but not left/width/right,
|
1851
|
-
since that combination doesn't make sense.
|
1852
|
-
|
1853
|
-
Likewise, you may set a minWidth/minHeight, or maxWidth/maxHeight, but
|
1854
|
-
if you also set the width/height explicitly, then those constraints won't
|
1855
|
-
matter as much.
|
1856
|
-
|
1857
|
-
Layout is designed to maximize reliance on the browser's rendering
|
1858
|
-
engine to keep your app up to date.
|
1859
|
-
|
1860
|
-
@test in layoutStyle
|
1861
|
-
*/
|
1862
|
-
layout: { top: 0, left: 0, bottom: 0, right: 0 },
|
1863
|
-
|
1864
|
-
/**
|
1865
|
-
Converts a frame from the receiver's offset to the target offset. Both
|
1866
|
-
the receiver and the target must belong to the same pane. If you pass
|
1867
|
-
null, the conversion will be to the pane level.
|
1868
|
-
|
1869
|
-
Note that the context of a view's frame is the view's parent frame. In
|
1870
|
-
other words, if you want to convert the frame of your view to the global
|
1871
|
-
frame, then you should do:
|
1872
|
-
|
1873
|
-
{{{
|
1874
|
-
var pv = this.get('parentView'), frame = this.get('frame');
|
1875
|
-
var newFrame = pv ? pv.convertFrameToView(frame, null) : frame;
|
1876
|
-
}}}
|
1877
|
-
|
1878
|
-
@param {Rect} frame the source frame
|
1879
|
-
@param {SC.View} targetView the target view to convert to
|
1880
|
-
@returns {Rect} converted frame
|
1881
|
-
@test in converFrames
|
1882
|
-
*/
|
1883
|
-
convertFrameToView: function(frame, targetView) {
|
1884
|
-
var myX=0, myY=0, targetX=0, targetY=0, view = this, f ;
|
1885
|
-
|
1886
|
-
// walk up this side
|
1887
|
-
while (view) {
|
1888
|
-
f = view.get('frame'); myX += f.x; myY += f.y ;
|
1889
|
-
view = view.get('layoutView') ;
|
1890
|
-
}
|
1891
|
-
|
1892
|
-
// walk up other size
|
1893
|
-
if (targetView) {
|
1894
|
-
view = targetView ;
|
1895
|
-
while (view) {
|
1896
|
-
f = view.get('frame'); targetX += f.x; targetY += f.y ;
|
1897
|
-
view = view.get('layoutView') ;
|
1898
|
-
}
|
1899
|
-
}
|
1900
|
-
|
1901
|
-
// now we can figure how to translate the origin.
|
1902
|
-
myX = frame.x + myX - targetX ;
|
1903
|
-
myY = frame.y + myY - targetY ;
|
1904
|
-
return { x: myX, y: myY, width: frame.width, height: frame.height } ;
|
1905
|
-
},
|
1906
|
-
|
1907
|
-
/**
|
1908
|
-
Converts a frame offset in the coordinates of another view system to the
|
1909
|
-
receiver's view.
|
1910
|
-
|
1911
|
-
Note that the convext of a view's frame is relative to the view's
|
1912
|
-
parentFrame. For example, if you want to convert the frame of view that
|
1913
|
-
belongs to another view to the receiver's frame you would do:
|
1914
|
-
|
1915
|
-
{{{
|
1916
|
-
var frame = view.get('frame');
|
1917
|
-
var newFrame = this.convertFrameFromView(frame, view.get('parentView'));
|
1918
|
-
}}}
|
1919
|
-
|
1920
|
-
@param {Rect} frame the source frame
|
1921
|
-
@param {SC.View} targetView the target view to convert to
|
1922
|
-
@returns {Rect} converted frame
|
1923
|
-
@test in converFrames
|
1924
|
-
*/
|
1925
|
-
convertFrameFromView: function(frame, targetView) {
|
1926
|
-
var myX=0, myY=0, targetX=0, targetY=0, view = this, f ;
|
1927
|
-
|
1928
|
-
// walk up this side
|
1929
|
-
//Note: Intentional assignment of variable f
|
1930
|
-
while (view && (f = view.get('frame'))) {
|
1931
|
-
myX += f.x; myY += f.y ;
|
1932
|
-
view = view.get('parentView') ;
|
1933
|
-
}
|
1934
|
-
|
1935
|
-
// walk up other size
|
1936
|
-
if (targetView) {
|
1937
|
-
view = targetView ;
|
1938
|
-
while(view) {
|
1939
|
-
f = view.get('frame'); targetX += f.x; targetY += f.y ;
|
1940
|
-
view = view.get('parentView') ;
|
1941
|
-
}
|
1942
|
-
}
|
1943
|
-
|
1944
|
-
// now we can figure how to translate the origin.
|
1945
|
-
myX = frame.x - myX + targetX ;
|
1946
|
-
myY = frame.y - myY + targetY ;
|
1947
|
-
return { x: myX, y: myY, width: frame.width, height: frame.height } ;
|
1948
|
-
},
|
1949
|
-
|
1950
|
-
/**
|
1951
|
-
Attempt to scroll the view to visible. This will walk up the parent
|
1952
|
-
view hierarchy looking looking for a scrollable view. It will then
|
1953
|
-
call scrollToVisible() on it.
|
1954
|
-
|
1955
|
-
Returns YES if an actual scroll took place, no otherwise.
|
1956
|
-
|
1957
|
-
@returns {Boolean}
|
1958
|
-
*/
|
1959
|
-
scrollToVisible: function() {
|
1960
|
-
var pv = this.get('parentView');
|
1961
|
-
while(pv && !pv.get('isScrollable')) pv = pv.get('parentView');
|
1962
|
-
|
1963
|
-
// found view, first make it scroll itself visible then scroll this.
|
1964
|
-
if (pv) {
|
1965
|
-
pv.scrollToVisible();
|
1966
|
-
return pv.scrollToVisible(this);
|
1967
|
-
} else return NO ;
|
1968
|
-
},
|
1969
|
-
|
1970
|
-
/**
|
1971
|
-
Frame describes the current bounding rect for your view. This is always
|
1972
|
-
measured from the top-left corner of the parent view.
|
1973
|
-
|
1974
|
-
@property {Rect}
|
1975
|
-
@test in layoutStyle
|
1976
|
-
*/
|
1977
|
-
frame: function() {
|
1978
|
-
return this.computeFrameWithParentFrame(null) ;
|
1979
|
-
}.property('useStaticLayout').cacheable(), // We depend on the layout, but layoutDidChange will call viewDidChange to check the frame for us
|
1980
|
-
|
1981
|
-
/**
|
1982
|
-
Computes what the frame of this view would be if the parent were resized
|
1983
|
-
to the passed dimensions. You can use this method to project the size of
|
1984
|
-
a frame based on the resize behavior of the parent.
|
1985
|
-
|
1986
|
-
This method is used especially by the scroll view to automatically
|
1987
|
-
calculate when scrollviews should be visible.
|
1988
|
-
|
1989
|
-
Passing null for the parent dimensions will use the actual current
|
1990
|
-
parent dimensions. This is the same method used to calculate the current
|
1991
|
-
frame when it changes.
|
1992
|
-
|
1993
|
-
@param {Rect} pdim the projected parent dimensions
|
1994
|
-
@returns {Rect} the computed frame
|
1995
|
-
*/
|
1996
|
-
computeFrameWithParentFrame: function(pdim) {
|
1997
|
-
var layout = this.get('layout'),
|
1998
|
-
f = {} , error, layer, AUTO = SC.LAYOUT_AUTO,
|
1999
|
-
stLayout = this.get('useStaticLayout'),
|
2000
|
-
pv = this.get('parentView'),
|
2001
|
-
dH, dW, //shortHand for parentDimensions
|
2002
|
-
borderTop, borderLeft,
|
2003
|
-
lR = layout.right,
|
2004
|
-
lL = layout.left,
|
2005
|
-
lT = layout.top,
|
2006
|
-
lB = layout.bottom,
|
2007
|
-
lW = layout.width,
|
2008
|
-
lH = layout.height,
|
2009
|
-
lcX = layout.centerX,
|
2010
|
-
lcY = layout.centerY;
|
2011
|
-
|
2012
|
-
if (lW !== undefined &&
|
2013
|
-
lW === SC.LAYOUT_AUTO &&
|
2014
|
-
stLayout !== undefined && !stLayout) {
|
2015
|
-
error = SC.Error.desc(("%@.layout() cannot use width:auto if "+
|
2016
|
-
"staticLayout is disabled").fmt(this), "%@".fmt(this), -1);
|
2017
|
-
console.error(error.toString()) ;
|
2018
|
-
throw error ;
|
2019
|
-
}
|
2020
|
-
|
2021
|
-
if (lH !== undefined &&
|
2022
|
-
lH === SC.LAYOUT_AUTO &&
|
2023
|
-
stLayout !== undefined && !stLayout) {
|
2024
|
-
error = SC.Error.desc(("%@.layout() cannot use height:auto if "+
|
2025
|
-
"staticLayout is disabled").fmt(this),"%@".fmt(this), -1);
|
2026
|
-
console.error(error.toString()) ;
|
2027
|
-
throw error ;
|
2028
|
-
}
|
2029
|
-
|
2030
|
-
if (stLayout) {
|
2031
|
-
// need layer to be able to compute rect
|
2032
|
-
if (layer = this.get('layer')) {
|
2033
|
-
f = SC.viewportOffset(layer); // x,y
|
2034
|
-
if (pv) f = pv.convertFrameFromView(f, null);
|
2035
|
-
|
2036
|
-
/*
|
2037
|
-
TODO Can probably have some better width/height values - CC
|
2038
|
-
*/
|
2039
|
-
f.width = layer.offsetWidth;
|
2040
|
-
f.height = layer.offsetHeight;
|
2041
|
-
return f;
|
2042
|
-
}
|
2043
|
-
return null; // can't compute
|
2044
|
-
}
|
2045
|
-
|
2046
|
-
|
2047
|
-
if (!pdim) pdim = this.computeParentDimensions(layout) ;
|
2048
|
-
dH = pdim.height;
|
2049
|
-
dW = pdim.width;
|
2050
|
-
|
2051
|
-
|
2052
|
-
// handle left aligned and left/right
|
2053
|
-
if (!SC.none(lL)) {
|
2054
|
-
if(SC.isPercentage(lL)){
|
2055
|
-
f.x = dW*lL;
|
2056
|
-
}else{
|
2057
|
-
f.x = lL ;
|
2058
|
-
}
|
2059
|
-
if (lW !== undefined) {
|
2060
|
-
if(lW === AUTO) f.width = AUTO ;
|
2061
|
-
else if(SC.isPercentage(lW)) f.width = dW*lW ;
|
2062
|
-
else f.width = lW ;
|
2063
|
-
} else { // better have lR!
|
2064
|
-
f.width = dW - f.x ;
|
2065
|
-
if(lR && SC.isPercentage(lR)) f.width = f.width - (lR*dW) ;
|
2066
|
-
else f.width = f.width - (lR || 0) ;
|
2067
|
-
}
|
2068
|
-
// handle right aligned
|
2069
|
-
} else if (!SC.none(lR)) {
|
2070
|
-
if (SC.none(lW)) {
|
2071
|
-
if (SC.isPercentage(lR)) {
|
2072
|
-
f.width = dW - (dW*lR) ;
|
2073
|
-
}
|
2074
|
-
else f.width = dW - lR ;
|
2075
|
-
f.x = 0 ;
|
2076
|
-
} else {
|
2077
|
-
if(lW === AUTO) f.width = AUTO ;
|
2078
|
-
else if(SC.isPercentage(lW)) f.width = dW*lW ;
|
2079
|
-
else f.width = (lW || 0) ;
|
2080
|
-
if (SC.isPercentage(lW)) f.x = dW - (lR*dW) - f.width ;
|
2081
|
-
else f.x = dW - lR - f.width ;
|
2082
|
-
}
|
2083
|
-
|
2084
|
-
// handle centered
|
2085
|
-
} else if (!SC.none(lcX)) {
|
2086
|
-
if(lW === AUTO) f.width = AUTO ;
|
2087
|
-
else if (SC.isPercentage(lW)) f.width = lW*dW ;
|
2088
|
-
else f.width = (lW || 0) ;
|
2089
|
-
if(SC.isPercentage(lcX)) f.x = (dW - f.width)/2 + (lcX*dW) ;
|
2090
|
-
else f.x = (dW - f.width)/2 + lcX ;
|
2091
|
-
} else {
|
2092
|
-
f.x = 0 ; // fallback
|
2093
|
-
if (SC.none(lW)) {
|
2094
|
-
f.width = dW ;
|
2095
|
-
} else {
|
2096
|
-
if(lW === AUTO) f.width = AUTO ;
|
2097
|
-
if (SC.isPercentage(lW)) f.width = lW*dW ;
|
2098
|
-
else f.width = (lW || 0) ;
|
2099
|
-
}
|
2100
|
-
}
|
2101
|
-
|
2102
|
-
// handle top aligned and top/bottom
|
2103
|
-
if (!SC.none(lT)) {
|
2104
|
-
if(SC.isPercentage(lT)) f.y = lT*dH ;
|
2105
|
-
else f.y = lT ;
|
2106
|
-
if (lH !== undefined) {
|
2107
|
-
if(lH === AUTO) f.height = AUTO ;
|
2108
|
-
else if(SC.isPercentage(lH)) f.height = lH*dH ;
|
2109
|
-
else f.height = lH ;
|
2110
|
-
} else { // better have lB!
|
2111
|
-
if(lB && SC.isPercentage(lB)) f.height = dH - f.y - (lB*dH) ;
|
2112
|
-
else f.height = dH - f.y - (lB || 0) ;
|
2113
|
-
}
|
2114
|
-
|
2115
|
-
// handle bottom aligned
|
2116
|
-
} else if (!SC.none(lB)) {
|
2117
|
-
if (SC.none(lH)) {
|
2118
|
-
if (SC.isPercentage(lB)) f.height = dH - (lB*dH) ;
|
2119
|
-
else f.height = dH - lB ;
|
2120
|
-
f.y = 0 ;
|
2121
|
-
} else {
|
2122
|
-
if(lH === AUTO) f.height = AUTO ;
|
2123
|
-
if (lH && SC.isPercentage(lH)) f.height = lH*dH ;
|
2124
|
-
else f.height = (lH || 0) ;
|
2125
|
-
if (SC.isPercentage(lB)) f.y = dH - (lB*dH) - f.height ;
|
2126
|
-
else f.y = dH - lB - f.height ;
|
2127
|
-
}
|
2128
|
-
|
2129
|
-
// handle centered
|
2130
|
-
} else if (!SC.none(lcY)) {
|
2131
|
-
if(lH === AUTO) f.height = AUTO ;
|
2132
|
-
if (lH && SC.isPercentage(lH)) f.height = lH*dH ;
|
2133
|
-
else f.height = (lH || 0) ;
|
2134
|
-
if (SC.isPercentage(lcY)) f.y = (dH - f.height)/2 + (lcY*dH) ;
|
2135
|
-
else f.y = (dH - f.height)/2 + lcY ;
|
2136
|
-
|
2137
|
-
// fallback
|
2138
|
-
} else {
|
2139
|
-
f.y = 0 ; // fallback
|
2140
|
-
if (SC.none(lH)) {
|
2141
|
-
f.height = dH ;
|
2142
|
-
} else {
|
2143
|
-
if(lH === AUTO) f.height = AUTO ;
|
2144
|
-
if (SC.isPercentage(lH)) f.height = lH*dH ;
|
2145
|
-
else f.height = lH || 0 ;
|
2146
|
-
}
|
2147
|
-
}
|
2148
|
-
|
2149
|
-
f.x = Math.floor(f.x);
|
2150
|
-
f.y = Math.floor(f.y);
|
2151
|
-
if(f.height !== AUTO) f.height = Math.floor(f.height);
|
2152
|
-
if(f.width !== AUTO) f.width = Math.floor(f.width);
|
2153
|
-
|
2154
|
-
// if width or height were set to auto and we have a layer, try lookup
|
2155
|
-
if (f.height === AUTO || f.width === AUTO) {
|
2156
|
-
layer = this.get('layer');
|
2157
|
-
if (f.height === AUTO) f.height = layer ? layer.clientHeight : 0;
|
2158
|
-
if (f.width === AUTO) f.width = layer ? layer.clientWidth : 0;
|
2159
|
-
}
|
2160
|
-
|
2161
|
-
// views with SC.Border mixin applied applied
|
2162
|
-
if (this.get('hasBorder')) {
|
2163
|
-
borderTop = this.get('borderTop');
|
2164
|
-
borderLeft = this.get('borderLeft');
|
2165
|
-
f.height -= borderTop+this.get('borderBottom');
|
2166
|
-
f.y += borderTop;
|
2167
|
-
f.width -= borderLeft+this.get('borderRight');
|
2168
|
-
f.x += borderLeft;
|
2169
|
-
}
|
2170
|
-
|
2171
|
-
// Account for special cases inside ScrollView, where we adjust the
|
2172
|
-
// element's scrollTop/scrollLeft property for performance reasons.
|
2173
|
-
if (pv && pv.isScrollContainer) {
|
2174
|
-
pv = pv.get('parentView');
|
2175
|
-
f.x -= pv.get('horizontalScrollOffset');
|
2176
|
-
f.y -= pv.get('verticalScrollOffset');
|
2177
|
-
}
|
2178
|
-
|
2179
|
-
// make sure the width/height fix min/max...
|
2180
|
-
if (!SC.none(layout.maxHeight) && (f.height > layout.maxHeight)) {
|
2181
|
-
f.height = layout.maxHeight ;
|
2182
|
-
}
|
2183
|
-
|
2184
|
-
if (!SC.none(layout.minHeight) && (f.height < layout.minHeight)) {
|
2185
|
-
f.height = layout.minHeight ;
|
2186
|
-
}
|
2187
|
-
|
2188
|
-
if (!SC.none(layout.maxWidth) && (f.width > layout.maxWidth)) {
|
2189
|
-
f.width = layout.maxWidth ;
|
2190
|
-
}
|
2191
|
-
|
2192
|
-
if (!SC.none(layout.minWidth) && (f.width < layout.minWidth)) {
|
2193
|
-
f.width = layout.minWidth ;
|
2194
|
-
}
|
2195
|
-
|
2196
|
-
// make sure width/height are never < 0
|
2197
|
-
if (f.height < 0) f.height = 0 ;
|
2198
|
-
if (f.width < 0) f.width = 0 ;
|
2199
|
-
|
2200
|
-
return f;
|
2201
|
-
},
|
2202
|
-
|
2203
|
-
computeParentDimensions: function(frame) {
|
2204
|
-
var ret, pv = this.get('parentView'), pf = (pv) ? pv.get('frame') : null ;
|
2205
|
-
|
2206
|
-
if (pf) {
|
2207
|
-
ret = { width: pf.width, height: pf.height };
|
2208
|
-
} else {
|
2209
|
-
var f = frame || {};
|
2210
|
-
ret = {
|
2211
|
-
width: (f.left || 0) + (f.width || 0) + (f.right || 0),
|
2212
|
-
height: (f.top || 0) + (f.height || 0) + (f.bottom || 0)
|
2213
|
-
};
|
2214
|
-
}
|
2215
|
-
return ret ;
|
2216
|
-
},
|
2217
|
-
|
2218
|
-
/**
|
2219
|
-
The clipping frame returns the visible portion of the view, taking into
|
2220
|
-
account the contentClippingFrame of the parent view. Keep in mind that
|
2221
|
-
the clippingFrame is in the context of the view itself, not it's parent
|
2222
|
-
view.
|
2223
|
-
|
2224
|
-
Normally this will be calculated based on the intersection of your own
|
2225
|
-
clippingFrame and your parentView's contentClippingFrame.
|
2226
|
-
|
2227
|
-
@property {Rect}
|
2228
|
-
*/
|
2229
|
-
clippingFrame: function() {
|
2230
|
-
var f = this.get('frame'),
|
2231
|
-
ret = f,
|
2232
|
-
pv, cf;
|
2233
|
-
|
2234
|
-
if (!f) return null;
|
2235
|
-
pv = this.get('parentView');
|
2236
|
-
if (pv) {
|
2237
|
-
cf = pv.get('contentClippingFrame');
|
2238
|
-
if (!cf) return f;
|
2239
|
-
ret = SC.intersectRects(cf, f);
|
2240
|
-
}
|
2241
|
-
ret.x -= f.x;
|
2242
|
-
ret.y -= f.y;
|
2243
|
-
|
2244
|
-
return ret;
|
2245
|
-
}.property('parentView', 'frame').cacheable(),
|
2246
|
-
|
2247
|
-
/**
|
2248
|
-
The clipping frame child views should intersect with. Normally this is
|
2249
|
-
the same as the regular clippingFrame. However, you may override this
|
2250
|
-
method if you want the child views to actually draw more or less content
|
2251
|
-
than is actually visible for some reason.
|
2252
|
-
|
2253
|
-
Usually this is only used by the ScrollView to optimize drawing on touch
|
2254
|
-
devices.
|
2255
|
-
|
2256
|
-
@property {Rect}
|
2257
|
-
*/
|
2258
|
-
contentClippingFrame: function() {
|
2259
|
-
return this.get('clippingFrame');
|
2260
|
-
}.property('clippingFrame').cacheable(),
|
2261
|
-
|
2262
|
-
/** @private
|
2263
|
-
This method is invoked whenever the clippingFrame changes, notifying
|
2264
|
-
each child view that its clippingFrame has also changed.
|
2265
|
-
*/
|
2266
|
-
_sc_view_clippingFrameDidChange: function() {
|
2267
|
-
var cvs = this.get('childViews'), len = cvs.length, idx, cv ;
|
2268
|
-
for (idx=0; idx<len; ++idx) {
|
2269
|
-
cv = cvs[idx] ;
|
2270
|
-
|
2271
|
-
// In SC 1.0 views with static layout did not receive notifications
|
2272
|
-
// of frame changes because they didn't support frames. In SC 1.1 they
|
2273
|
-
// do support frames, so they should receive notifications. Also in
|
2274
|
-
// SC 1.1 SC.StaticLayout is merged into SC.View. The mixin is only
|
2275
|
-
// for compatibility. This property is defined on the mixin.
|
2276
|
-
//
|
2277
|
-
// frame changes should be sent all the time unless this property is
|
2278
|
-
// present to indicate that we want the old 1.0 API behavior instead.
|
2279
|
-
//
|
2280
|
-
if (!cv.hasStaticLayout) {
|
2281
|
-
cv.notifyPropertyChange('clippingFrame') ;
|
2282
|
-
cv._sc_view_clippingFrameDidChange();
|
2283
|
-
}
|
2284
|
-
}
|
2285
|
-
},
|
2286
|
-
|
2287
|
-
/**
|
2288
|
-
This method may be called on your view whenever the parent view resizes.
|
2289
|
-
|
2290
|
-
The default version of this method will reset the frame and then call
|
2291
|
-
viewDidResize(). You will not usually override this method, but you may
|
2292
|
-
override the viewDidResize() method.
|
2293
|
-
|
2294
|
-
@returns {void}
|
2295
|
-
@test in viewDidResize
|
2296
|
-
*/
|
2297
|
-
parentViewDidResize: function() {
|
2298
|
-
var frameMayHaveChanged, layout, isFixed, isPercentageFunc, isPercentage;
|
2299
|
-
|
2300
|
-
// If this view uses static layout, our "do we think the frame changed?"
|
2301
|
-
// logic is not applicable and we simply have to assume that the frame may
|
2302
|
-
// have changed.
|
2303
|
-
if (this.useStaticLayout) {
|
2304
|
-
frameMayHaveChanged = YES;
|
2305
|
-
}
|
2306
|
-
else {
|
2307
|
-
layout = this.get('layout');
|
2308
|
-
|
2309
|
-
// only resizes if the layout does something other than left/top - fixed
|
2310
|
-
// size.
|
2311
|
-
isFixed = (
|
2312
|
-
(layout.left !== undefined) && (layout.top !== undefined) &&
|
2313
|
-
(layout.width !== undefined) && (layout.height !== undefined)
|
2314
|
-
);
|
2315
|
-
|
2316
|
-
|
2317
|
-
// If it's fixed, our frame still could have changed if it's fixed to a
|
2318
|
-
// percentage of the parent.
|
2319
|
-
if (isFixed) {
|
2320
|
-
isPercentageFunc = SC.isPercentage;
|
2321
|
-
isPercentage = (isPercentageFunc(layout.left) ||
|
2322
|
-
isPercentageFunc(layout.top) ||
|
2323
|
-
isPercentageFunc(layout.width) ||
|
2324
|
-
isPercentageFunc(layout.right) ||
|
2325
|
-
isPercentageFunc(layout.centerX) ||
|
2326
|
-
isPercentageFunc(layout.centerY));
|
2327
|
-
}
|
2328
|
-
|
2329
|
-
frameMayHaveChanged = (!isFixed || isPercentage);
|
2330
|
-
}
|
2331
|
-
|
2332
|
-
// Do we think there's a chance our frame will have changed as a result?
|
2333
|
-
if (frameMayHaveChanged) {
|
2334
|
-
// There's a chance our frame changed. Invoke viewDidResize(), which
|
2335
|
-
// will notify about our change to 'frame' (if it actually changed) and
|
2336
|
-
// appropriately notify our child views.
|
2337
|
-
this.viewDidResize();
|
2338
|
-
}
|
2339
|
-
},
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
/**
|
2344
|
-
This method is invoked on your view when the view resizes due to a layout
|
2345
|
-
change or potentially due to the parent view resizing (if your view’s size
|
2346
|
-
depends on the size of your parent view). You can override this method
|
2347
|
-
to implement your own layout if you like, such as performing a grid
|
2348
|
-
layout.
|
2349
|
-
|
2350
|
-
The default implementation simply notifies about the change to 'frame' and
|
2351
|
-
then calls parentViewDidResize on all of your children.
|
2352
|
-
|
2353
|
-
@returns {void}
|
2354
|
-
*/
|
2355
|
-
viewDidResize: function() {
|
2356
|
-
this._viewFrameDidChange();
|
2357
|
-
|
2358
|
-
// Also notify our children.
|
2359
|
-
var cv = this.childViews, len = cv.length, idx, view ;
|
2360
|
-
for (idx=0; idx<len; ++idx) {
|
2361
|
-
view = cv[idx];
|
2362
|
-
view.parentViewDidResize();
|
2363
|
-
}
|
2364
|
-
},
|
2365
|
-
|
2366
|
-
/** @private
|
2367
|
-
Invoked by other views to notify this view that its frame has changed.
|
2368
|
-
|
2369
|
-
This notifies the view that its frame property has changed,
|
2370
|
-
then propagates those changes to its child views.
|
2371
|
-
*/
|
2372
|
-
_viewFrameDidChange: function() {
|
2373
|
-
this.notifyPropertyChange('frame');
|
2374
|
-
this._sc_view_clippingFrameDidChange();
|
2375
|
-
},
|
2376
|
-
|
2377
|
-
// Implementation note: As a general rule, paired method calls, such as
|
2378
|
-
// beginLiveResize/endLiveResize that are called recursively on the tree
|
2379
|
-
// should reverse the order when doing the final half of the call. This
|
2380
|
-
// ensures that the calls are propertly nested for any cleanup routines.
|
2381
|
-
//
|
2382
|
-
// -> View A.beginXXX()
|
2383
|
-
// -> View B.beginXXX()
|
2384
|
-
// -> View C.begitXXX()
|
2385
|
-
// -> View D.beginXXX()
|
2386
|
-
//
|
2387
|
-
// ...later on, endXXX methods are called in reverse order of beginXXX...
|
2388
|
-
//
|
2389
|
-
// <- View D.endXXX()
|
2390
|
-
// <- View C.endXXX()
|
2391
|
-
// <- View B.endXXX()
|
2392
|
-
// <- View A.endXXX()
|
2393
|
-
//
|
2394
|
-
// See the two methods below for an example implementation.
|
2395
|
-
|
2396
|
-
/**
|
2397
|
-
Call this method when you plan to begin a live resize. This will
|
2398
|
-
notify the receiver view and any of its children that are interested
|
2399
|
-
that the resize is about to begin.
|
2400
|
-
|
2401
|
-
@returns {SC.View} receiver
|
2402
|
-
@test in viewDidResize
|
2403
|
-
*/
|
2404
|
-
beginLiveResize: function() {
|
2405
|
-
// call before children have been notified...
|
2406
|
-
if (this.willBeginLiveResize) this.willBeginLiveResize() ;
|
2407
|
-
|
2408
|
-
// notify children in order
|
2409
|
-
var ary = this.get('childViews'), len = ary.length, idx, view ;
|
2410
|
-
for (idx=0; idx<len; ++idx) {
|
2411
|
-
view = ary[idx] ;
|
2412
|
-
if (view.beginLiveResize) view.beginLiveResize();
|
2413
|
-
}
|
2414
|
-
return this ;
|
2415
|
-
},
|
2416
|
-
|
2417
|
-
/**
|
2418
|
-
Call this method when you are finished with a live resize. This will
|
2419
|
-
notify the receiver view and any of its children that are interested
|
2420
|
-
that the live resize has ended.
|
2421
|
-
|
2422
|
-
@returns {SC.View} receiver
|
2423
|
-
@test in viewDidResize
|
2424
|
-
*/
|
2425
|
-
endLiveResize: function() {
|
2426
|
-
// notify children in *reverse* order
|
2427
|
-
var ary = this.get('childViews'), len = ary.length, idx, view ;
|
2428
|
-
for (idx=len-1; idx>=0; --idx) { // loop backwards
|
2429
|
-
view = ary[idx] ;
|
2430
|
-
if (view.endLiveResize) view.endLiveResize() ;
|
2431
|
-
}
|
2432
|
-
|
2433
|
-
// call *after* all children have been notified...
|
2434
|
-
if (this.didEndLiveResize) this.didEndLiveResize() ;
|
2435
|
-
return this ;
|
2436
|
-
},
|
2437
|
-
|
2438
|
-
/**
|
2439
|
-
Setting wantsAcceleratedLayer to YES will use 3d transforms to move the
|
2440
|
-
layer when available.
|
2441
|
-
*/
|
2442
|
-
wantsAcceleratedLayer: NO,
|
2443
|
-
|
2444
|
-
/**
|
2445
|
-
Specifies whether 3d transforms can be used to move the layer.
|
2446
|
-
*/
|
2447
|
-
hasAcceleratedLayer: function(){
|
2448
|
-
return this.get('wantsAcceleratedLayer') && SC.platform.supportsAcceleratedLayers;
|
2449
|
-
}.property('wantsAcceleratedLayer').cacheable(),
|
2450
|
-
|
2451
|
-
|
2452
|
-
/**
|
2453
|
-
layoutStyle describes the current styles to be written to your element
|
2454
|
-
based on the layout you defined. Both layoutStyle and frame reset when
|
2455
|
-
you edit the layout property. Both are read only.
|
2456
|
-
|
2457
|
-
Computes the layout style settings needed for the current anchor.
|
2458
|
-
|
2459
|
-
@property {Hash}
|
2460
|
-
@readOnly
|
2461
|
-
*/
|
2462
|
-
|
2463
|
-
|
2464
|
-
layoutStyle: function() {
|
2465
|
-
var layout = this.get('layout'), ret = {}, pdim = null, error,
|
2466
|
-
AUTO = SC.LAYOUT_AUTO,
|
2467
|
-
dims = SC._VIEW_DEFAULT_DIMS, loc = dims.length, x, value, key,
|
2468
|
-
stLayout = this.get('useStaticLayout'),
|
2469
|
-
lR = layout.right,
|
2470
|
-
lL = layout.left,
|
2471
|
-
lT = layout.top,
|
2472
|
-
lB = layout.bottom,
|
2473
|
-
lW = layout.width,
|
2474
|
-
lH = layout.height,
|
2475
|
-
lMW = layout.maxWidth,
|
2476
|
-
lMH = layout.maxHeight,
|
2477
|
-
lcX = layout.centerX,
|
2478
|
-
lcY = layout.centerY,
|
2479
|
-
hasAcceleratedLayer = this.get('hasAcceleratedLayer'),
|
2480
|
-
translateTop = 0,
|
2481
|
-
translateLeft = 0;
|
2482
|
-
if (lW !== undefined && lW === SC.LAYOUT_AUTO && !stLayout) {
|
2483
|
-
error= SC.Error.desc("%@.layout() you cannot use width:auto if "+
|
2484
|
-
"staticLayout is disabled".fmt(this),"%@".fmt(this),-1);
|
2485
|
-
console.error(error.toString()) ;
|
2486
|
-
throw error ;
|
2487
|
-
}
|
2488
|
-
|
2489
|
-
if (lH !== undefined && lH === SC.LAYOUT_AUTO && !stLayout) {
|
2490
|
-
error = SC.Error.desc("%@.layout() you cannot use height:auto if "+
|
2491
|
-
"staticLayout is disabled".fmt(this),"%@".fmt(this),-1);
|
2492
|
-
console.error(error.toString()) ;
|
2493
|
-
throw error ;
|
2494
|
-
}
|
2495
|
-
|
2496
|
-
// X DIRECTION
|
2497
|
-
|
2498
|
-
// handle left aligned and left/right
|
2499
|
-
if (!SC.none(lL)) {
|
2500
|
-
if(SC.isPercentage(lL)) {
|
2501
|
-
ret.left = (lL*100)+"%"; //percentage left
|
2502
|
-
} else if (hasAcceleratedLayer && !SC.empty(lW)) {
|
2503
|
-
translateLeft = Math.floor(lL);
|
2504
|
-
ret.left = 0;
|
2505
|
-
} else {
|
2506
|
-
ret.left = Math.floor(lL); //px left
|
2507
|
-
}
|
2508
|
-
ret.marginLeft = 0 ;
|
2509
|
-
|
2510
|
-
if (lW !== undefined) {
|
2511
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
2512
|
-
else if(SC.isPercentage(lW)) ret.width = (lW*100)+"%"; //percentage width
|
2513
|
-
else ret.width = Math.floor(lW) ; //px width
|
2514
|
-
ret.right = null ;
|
2515
|
-
} else {
|
2516
|
-
ret.width = null ;
|
2517
|
-
if(lR && SC.isPercentage(lR)) ret.right = (lR*100)+"%"; //percentage right
|
2518
|
-
else ret.right = Math.floor(lR || 0) ; //px right
|
2519
|
-
}
|
2520
|
-
|
2521
|
-
// handle right aligned
|
2522
|
-
} else if (!SC.none(lR)) {
|
2523
|
-
if(SC.isPercentage(lR)) {
|
2524
|
-
ret.right = Math.floor(lR*100)+"%"; //percentage left
|
2525
|
-
}else{
|
2526
|
-
ret.right = Math.floor(lR) ;
|
2527
|
-
}
|
2528
|
-
ret.marginLeft = 0 ;
|
2529
|
-
|
2530
|
-
if (SC.none(lW)) {
|
2531
|
-
if (SC.none(lMW)) ret.left = 0;
|
2532
|
-
ret.width = null;
|
2533
|
-
} else {
|
2534
|
-
ret.left = null ;
|
2535
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
2536
|
-
else if(lW && SC.isPercentage(lW)) ret.width = (lW*100)+"%" ; //percentage width
|
2537
|
-
else ret.width = Math.floor(lW || 0) ; //px width
|
2538
|
-
}
|
2539
|
-
|
2540
|
-
// handle centered
|
2541
|
-
} else if (!SC.none(lcX)) {
|
2542
|
-
ret.left = "50%";
|
2543
|
-
if(lW && SC.isPercentage(lW)) ret.width = (lW*100)+"%" ; //percentage width
|
2544
|
-
else ret.width = Math.floor(lW || 0) ;
|
2545
|
-
if(lW && SC.isPercentage(lW) && (SC.isPercentage(lcX) || SC.isPercentage(lcX*-1))){
|
2546
|
-
ret.marginLeft = Math.floor((lcX - lW/2)*100)+"%" ;
|
2547
|
-
}else if(lW && lW >= 1 && !SC.isPercentage(lcX)){
|
2548
|
-
ret.marginLeft = Math.floor(lcX - ret.width/2) ;
|
2549
|
-
}else {
|
2550
|
-
// This error message happens whenever width is not set.
|
2551
|
-
console.warn("You have to set width and centerX usign both percentages or pixels");
|
2552
|
-
ret.marginLeft = "50%";
|
2553
|
-
}
|
2554
|
-
ret.right = null ;
|
2555
|
-
|
2556
|
-
// if width defined, assume top/left of zero
|
2557
|
-
} else if (!SC.none(lW)) {
|
2558
|
-
ret.left = 0;
|
2559
|
-
ret.right = null;
|
2560
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
2561
|
-
else if(SC.isPercentage(lW)) ret.width = (lW*100)+"%";
|
2562
|
-
else ret.width = Math.floor(lW);
|
2563
|
-
ret.marginLeft = 0;
|
2564
|
-
|
2565
|
-
// fallback, full width.
|
2566
|
-
} else {
|
2567
|
-
ret.left = 0;
|
2568
|
-
ret.right = 0;
|
2569
|
-
ret.width = null ;
|
2570
|
-
ret.marginLeft= 0;
|
2571
|
-
}
|
2572
|
-
|
2573
|
-
|
2574
|
-
// handle min/max
|
2575
|
-
ret.minWidth = (layout.minWidth === undefined) ? null : layout.minWidth ;
|
2576
|
-
ret.maxWidth = (layout.maxWidth === undefined) ? null : layout.maxWidth ;
|
2577
|
-
|
2578
|
-
// Y DIRECTION
|
2579
|
-
|
2580
|
-
// handle top aligned and left/right
|
2581
|
-
if (!SC.none(lT)) {
|
2582
|
-
if(SC.isPercentage(lT)) {
|
2583
|
-
ret.top = (lT*100)+"%";
|
2584
|
-
} else if (hasAcceleratedLayer && !SC.empty(lH)) {
|
2585
|
-
translateTop = Math.floor(lT);
|
2586
|
-
ret.top = 0;
|
2587
|
-
} else {
|
2588
|
-
ret.top = Math.floor(lT);
|
2589
|
-
}
|
2590
|
-
if (lH !== undefined) {
|
2591
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
2592
|
-
else if(SC.isPercentage(lH)) ret.height = (lH*100)+"%" ;
|
2593
|
-
else ret.height = Math.floor(lH) ;
|
2594
|
-
ret.bottom = null ;
|
2595
|
-
} else {
|
2596
|
-
ret.height = null ;
|
2597
|
-
if(lB && SC.isPercentage(lB)) ret.bottom = (lB*100)+"%" ;
|
2598
|
-
else ret.bottom = Math.floor(lB || 0) ;
|
2599
|
-
}
|
2600
|
-
ret.marginTop = 0 ;
|
2601
|
-
|
2602
|
-
// handle bottom aligned
|
2603
|
-
} else if (!SC.none(lB)) {
|
2604
|
-
ret.marginTop = 0 ;
|
2605
|
-
if(SC.isPercentage(lB)) ret.bottom = (lB*100)+"%";
|
2606
|
-
else ret.bottom = Math.floor(lB) ;
|
2607
|
-
if (SC.none(lH)) {
|
2608
|
-
if (SC.none(lMH)) ret.top = 0;
|
2609
|
-
ret.height = null ;
|
2610
|
-
} else {
|
2611
|
-
ret.top = null ;
|
2612
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
2613
|
-
else if(lH && SC.isPercentage(lH)) ret.height = (lH*100)+"%" ;
|
2614
|
-
else ret.height = Math.floor(lH || 0) ;
|
2615
|
-
}
|
2616
|
-
|
2617
|
-
// handle centered
|
2618
|
-
} else if (!SC.none(lcY)) {
|
2619
|
-
ret.top = "50%";
|
2620
|
-
ret.bottom = null ;
|
2621
|
-
|
2622
|
-
if(lH && SC.isPercentage(lH)) ret.height = (lH*100)+ "%" ;
|
2623
|
-
else ret.height = Math.floor(lH || 0) ;
|
2624
|
-
|
2625
|
-
if(lH && SC.isPercentage(lH) && (SC.isPercentage(lcY) || SC.isPercentage(lcY*-1))){ //height is percentage and lcy too
|
2626
|
-
ret.marginTop = Math.floor((lcY - lH/2)*100)+"%" ;
|
2627
|
-
}else if(lH && lH >= 1 && !SC.isPercentage(lcY)){
|
2628
|
-
ret.marginTop = Math.floor(lcY - ret.height/2) ;
|
2629
|
-
}else {
|
2630
|
-
console.warn("You have to set height and centerY to use both percentages or pixels");
|
2631
|
-
ret.marginTop = "50%";
|
2632
|
-
}
|
2633
|
-
} else if (!SC.none(lH)) {
|
2634
|
-
ret.top = 0;
|
2635
|
-
ret.bottom = null;
|
2636
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
2637
|
-
else if(lH && SC.isPercentage(lH)) ret.height = (lH*100)+"%" ;
|
2638
|
-
else ret.height = Math.floor(lH || 0) ;
|
2639
|
-
ret.marginTop = 0;
|
2640
|
-
|
2641
|
-
// fallback, full width.
|
2642
|
-
} else {
|
2643
|
-
ret.top = 0;
|
2644
|
-
ret.bottom = 0;
|
2645
|
-
ret.height = null ;
|
2646
|
-
ret.marginTop= 0;
|
2647
|
-
}
|
2648
|
-
|
2649
|
-
// handle min/max
|
2650
|
-
ret.minHeight = (layout.minHeight === undefined) ?
|
2651
|
-
null :
|
2652
|
-
layout.minHeight ;
|
2653
|
-
ret.maxHeight = (layout.maxHeight === undefined) ?
|
2654
|
-
null :
|
2655
|
-
layout.maxHeight ;
|
2656
|
-
|
2657
|
-
// if zIndex is set, use it. otherwise let default shine through
|
2658
|
-
ret.zIndex = SC.none(layout.zIndex) ? null : layout.zIndex.toString();
|
2659
|
-
|
2660
|
-
// if backgroundPosition is set, use it.
|
2661
|
-
// otherwise let default shine through
|
2662
|
-
ret.backgroundPosition = SC.none(layout.backgroundPosition) ?
|
2663
|
-
null :
|
2664
|
-
layout.backgroundPosition.toString() ;
|
2665
|
-
|
2666
|
-
// set default values to null to allow built-in CSS to shine through
|
2667
|
-
// currently applies only to marginLeft & marginTop
|
2668
|
-
while(--loc >=0) {
|
2669
|
-
x = dims[loc];
|
2670
|
-
if (ret[x]===0) ret[x]=null;
|
2671
|
-
}
|
2672
|
-
|
2673
|
-
if (hasAcceleratedLayer) {
|
2674
|
-
var transform = 'translateX('+translateLeft+'px) translateY('+translateTop+'px)';
|
2675
|
-
if (SC.platform.supportsCSS3DTransforms) transform += ' translateZ(0px)'
|
2676
|
-
ret[SC.platform.domCSSPrefix+'Transform'] = transform;
|
2677
|
-
}
|
2678
|
-
|
2679
|
-
// convert any numbers into a number + "px".
|
2680
|
-
for(key in ret) {
|
2681
|
-
value = ret[key];
|
2682
|
-
if (typeof value === SC.T_NUMBER) ret[key] = (value + "px");
|
2683
|
-
}
|
2684
|
-
return ret ;
|
2685
|
-
}.property().cacheable(),
|
2686
|
-
|
2687
|
-
/**
|
2688
|
-
The view responsible for laying out this view. The default version
|
2689
|
-
returns the current parent view.
|
2690
|
-
*/
|
2691
|
-
layoutView: function() {
|
2692
|
-
return this.get('parentView') ;
|
2693
|
-
}.property('parentView').cacheable(),
|
2694
|
-
|
2695
|
-
/**
|
2696
|
-
This method is called whenever a property changes that invalidates the
|
2697
|
-
layout of the view. Changing the layout will do this automatically, but
|
2698
|
-
you can add others if you want.
|
2699
|
-
|
2700
|
-
Implementation Note: In a traditional setup, we would simply observe
|
2701
|
-
'layout' here, but as described above in the documentation for our custom
|
2702
|
-
implementation of propertyDidChange(), this method must always run
|
2703
|
-
immediately after 'layout' is updated to avoid the potential for stale
|
2704
|
-
(incorrect) cached 'frame' values.
|
2705
|
-
|
2706
|
-
@returns {SC.View} receiver
|
2707
|
-
*/
|
2708
|
-
layoutDidChange: function() {
|
2709
|
-
// Did our layout change in a way that could cause us to be resized? If
|
2710
|
-
// not, then there's no need to invalidate the frames of our child views.
|
2711
|
-
var previousLayout = this._previousLayout,
|
2712
|
-
currentLayout = this.get('layout'),
|
2713
|
-
didResize = YES,
|
2714
|
-
previousWidth, previousHeight, currentWidth, currentHeight;
|
2715
|
-
|
2716
|
-
if (previousLayout && previousLayout !== currentLayout) {
|
2717
|
-
// This is a simple check to see whether we think the view may have
|
2718
|
-
// resized. We could look for a number of cases, but for now we'll
|
2719
|
-
// handle only one simple case: if the width and height are both
|
2720
|
-
// specified, and they have not changed.
|
2721
|
-
previousWidth = previousLayout.width;
|
2722
|
-
if (previousWidth !== undefined) {
|
2723
|
-
currentWidth = currentLayout.width;
|
2724
|
-
if (previousWidth === currentWidth) {
|
2725
|
-
previousHeight = previousLayout.height;
|
2726
|
-
if (previousLayout !== undefined) {
|
2727
|
-
currentHeight = currentLayout.height;
|
2728
|
-
if (previousHeight === currentHeight) didResize = NO;
|
2729
|
-
}
|
2730
|
-
}
|
2731
|
-
}
|
2732
|
-
}
|
2733
|
-
|
2734
|
-
this.beginPropertyChanges() ;
|
2735
|
-
this.notifyPropertyChange('layoutStyle') ;
|
2736
|
-
if (didResize) {
|
2737
|
-
this.viewDidResize();
|
2738
|
-
}
|
2739
|
-
else {
|
2740
|
-
// Even if we didn't resize, our frame might have changed.
|
2741
|
-
// viewDidResize() handles this in the other case.
|
2742
|
-
this._viewFrameDidChange();
|
2743
|
-
}
|
2744
|
-
this.endPropertyChanges() ;
|
2745
|
-
|
2746
|
-
// notify layoutView...
|
2747
|
-
var layoutView = this.get('layoutView');
|
2748
|
-
if (layoutView) {
|
2749
|
-
layoutView.set('childViewsNeedLayout', YES);
|
2750
|
-
layoutView.layoutDidChangeFor(this) ;
|
2751
|
-
if (layoutView.get('childViewsNeedLayout')) {
|
2752
|
-
layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded);
|
2753
|
-
}
|
2754
|
-
}
|
2755
|
-
|
2756
|
-
return this ;
|
2757
|
-
},
|
2758
|
-
|
2759
|
-
/**
|
2760
|
-
This this property to YES whenever the view needs to layout its child
|
2761
|
-
views. Normally this property is set automatically whenever the layout
|
2762
|
-
property for a child view changes.
|
2763
|
-
|
2764
|
-
@property {Boolean}
|
2765
|
-
*/
|
2766
|
-
childViewsNeedLayout: NO,
|
2767
|
-
|
2768
|
-
/**
|
2769
|
-
One of two methods that are invoked whenever one of your childViews
|
2770
|
-
layout changes. This method is invoked everytime a child view's layout
|
2771
|
-
changes to give you a chance to record the information about the view.
|
2772
|
-
|
2773
|
-
Since this method may be called many times during a single run loop, you
|
2774
|
-
should keep this method pretty short. The other method called when layout
|
2775
|
-
changes, layoutChildViews(), is invoked only once at the end of
|
2776
|
-
the run loop. You should do any expensive operations (including changing
|
2777
|
-
a childView's actual layer) in this other method.
|
2778
|
-
|
2779
|
-
Note that if as a result of running this method you decide that you do not
|
2780
|
-
need your layoutChildViews() method run later, you can set the
|
2781
|
-
childViewsNeedsLayout property to NO from this method and the layout
|
2782
|
-
method will not be called layer.
|
2783
|
-
|
2784
|
-
@param {SC.View} childView the view whose layout has changed.
|
2785
|
-
@returns {void}
|
2786
|
-
*/
|
2787
|
-
layoutDidChangeFor: function(childView) {
|
2788
|
-
var set = this._needLayoutViews ;
|
2789
|
-
if (!set) set = this._needLayoutViews = SC.CoreSet.create();
|
2790
|
-
set.add(childView);
|
2791
|
-
},
|
2792
|
-
|
2793
|
-
/**
|
2794
|
-
Called your layout method if the view currently needs to layout some
|
2795
|
-
child views.
|
2796
|
-
|
2797
|
-
@param {Boolean} isVisible if true assume view is visible even if it is not.
|
2798
|
-
@returns {SC.View} receiver
|
2799
|
-
@test in layoutChildViews
|
2800
|
-
*/
|
2801
|
-
layoutChildViewsIfNeeded: function(isVisible) {
|
2802
|
-
if (!isVisible) isVisible = this.get('isVisibleInWindow');
|
2803
|
-
if (isVisible && this.get('childViewsNeedLayout')) {
|
2804
|
-
this.set('childViewsNeedLayout', NO);
|
2805
|
-
this.layoutChildViews();
|
2806
|
-
}
|
2807
|
-
return this ;
|
2808
|
-
},
|
2809
|
-
|
2810
|
-
/**
|
2811
|
-
Applies the current layout to the layer. This method is usually only
|
2812
|
-
called once per runloop. You can override this method to provide your
|
2813
|
-
own layout updating method if you want, though usually the better option
|
2814
|
-
is to override the layout method from the parent view.
|
2815
|
-
|
2816
|
-
The default implementation of this method simply calls the renderLayout()
|
2817
|
-
method on the views that need layout.
|
2818
|
-
|
2819
|
-
@returns {void}
|
2820
|
-
*/
|
2821
|
-
layoutChildViews: function() {
|
2822
|
-
var set = this._needLayoutViews,
|
2823
|
-
len = set ? set.length : 0,
|
2824
|
-
i;
|
2825
|
-
for (i = 0; i < len; ++i) {
|
2826
|
-
set[i].updateLayout();
|
2827
|
-
}
|
2828
|
-
set.clear(); // reset & reuse
|
2829
|
-
},
|
2830
|
-
|
2831
|
-
/**
|
2832
|
-
Invoked by the layoutChildViews method to update the layout on a
|
2833
|
-
particular view. This method creates a render context and calls the
|
2834
|
-
renderLayout() method, which is probably what you want to override instead
|
2835
|
-
of this.
|
2836
|
-
|
2837
|
-
You will not usually override this method, but you may call it if you
|
2838
|
-
implement layoutChildViews() in a view yourself.
|
2839
|
-
|
2840
|
-
@returns {SC.View} receiver
|
2841
|
-
@test in layoutChildViews
|
2842
|
-
*/
|
2843
|
-
updateLayout: function() {
|
2844
|
-
var layer = this.get('layer'), context;
|
2845
|
-
if (layer) {
|
2846
|
-
context = this.renderContext(layer);
|
2847
|
-
this.renderLayout(context);
|
2848
|
-
context.update();
|
2849
|
-
|
2850
|
-
// If this view uses static layout, then notify if the frame changed.
|
2851
|
-
// (viewDidResize will do a comparison)
|
2852
|
-
if (this.useStaticLayout) this.viewDidResize();
|
2853
|
-
}
|
2854
|
-
layer = null ;
|
2855
|
-
return this ;
|
2856
|
-
},
|
2857
|
-
|
2858
|
-
/**
|
2859
|
-
Default method called by the layout view to actually apply the current
|
2860
|
-
layout to the layer. The default implementation simply assigns the
|
2861
|
-
current layoutStyle to the layer. This method is also called whenever
|
2862
|
-
the layer is first created.
|
2863
|
-
|
2864
|
-
@param {SC.RenderContext} the render context
|
2865
|
-
@returns {void}
|
2866
|
-
@test in layoutChildViews
|
2867
|
-
*/
|
2868
|
-
renderLayout: function(context, firstTime) {
|
2869
|
-
context.addStyle(this.get('layoutStyle'));
|
2870
|
-
},
|
2871
|
-
|
2872
|
-
/** walk like a duck */
|
2873
|
-
isView: YES,
|
2874
|
-
|
2875
|
-
/**
|
2876
|
-
Default method called when a selectstart event is triggered. This event is
|
2877
|
-
only supported by IE. Used in sproutcore to disable text selection and
|
2878
|
-
IE8 accelerators. The accelerators will be enabled only in
|
2879
|
-
text selectable views. In FF and Safari we use the css style 'allow-select'.
|
2880
|
-
|
2881
|
-
If you want to enable text selection in certain controls is recommended
|
2882
|
-
to override this function to always return YES , instead of setting
|
2883
|
-
isTextSelectable to true.
|
2884
|
-
|
2885
|
-
For example in textfield you dont want to enable textSelection on the text
|
2886
|
-
hint only on the actual text you are entering. You can achieve that by
|
2887
|
-
only overriding this method.
|
2888
|
-
|
2889
|
-
@param evt {SC.Event} the selectstart event
|
2890
|
-
@returns YES if selectable
|
2891
|
-
*/
|
2892
|
-
selectStart: function(evt) {
|
2893
|
-
return this.get('isTextSelectable');
|
2894
|
-
},
|
2895
|
-
|
2896
|
-
/**
|
2897
|
-
Used to block the contextMenu per view.
|
2898
|
-
|
2899
|
-
@param evt {SC.Event} the contextmenu event
|
2900
|
-
@returns YES if the contextmenu can show up
|
2901
|
-
*/
|
2902
|
-
contextMenu: function(evt) {
|
2903
|
-
if(!this.get('isContextMenuEnabled')) evt.stop();
|
2904
|
-
return true;
|
2905
|
-
},
|
2906
|
-
|
2907
|
-
/**
|
2908
|
-
A boundary set of distances outside which the touch will not be considered "inside" the view anymore.
|
2909
|
-
|
2910
|
-
By default, up to 50px on each side.
|
2911
|
-
*/
|
2912
|
-
touchBoundary: { left: 50, right: 50, top: 50, bottom: 50 },
|
2913
|
-
|
2914
|
-
/**
|
2915
|
-
@private
|
2916
|
-
A computed property based on frame.
|
2917
|
-
*/
|
2918
|
-
_touchBoundaryFrame: function (){
|
2919
|
-
return this.get("parentView").convertFrameToView(this.get('frame'), null);
|
2920
|
-
}.property("frame", "parentView").cacheable(),
|
2921
|
-
|
2922
|
-
/**
|
2923
|
-
Returns YES if the provided touch is within the boundary.
|
2924
|
-
*/
|
2925
|
-
touchIsInBoundary: function(touch) {
|
2926
|
-
var f = this.get("_touchBoundaryFrame"), maxX = 0, maxY = 0, boundary = this.get("touchBoundary");
|
2927
|
-
var x = touch.pageX, y = touch.pageY;
|
2928
|
-
|
2929
|
-
if (x < f.x) {
|
2930
|
-
x = f.x - x;
|
2931
|
-
maxX = boundary.left;
|
2932
|
-
} else if (x > f.x + f.width) {
|
2933
|
-
x = x - (f.x + f.width);
|
2934
|
-
maxX = boundary.right;
|
2935
|
-
} else {
|
2936
|
-
x = 0;
|
2937
|
-
maxX = 1;
|
2938
|
-
}
|
2939
|
-
|
2940
|
-
if (y < f.y) {
|
2941
|
-
y = f.y - y;
|
2942
|
-
maxY = boundary.top;
|
2943
|
-
} else if (y > f.y + f.height) {
|
2944
|
-
y = y - (f.y + f.height);
|
2945
|
-
maxY = boundary.bottom;
|
2946
|
-
} else {
|
2947
|
-
y = 0;
|
2948
|
-
maxY = 1;
|
2949
|
-
}
|
2950
|
-
|
2951
|
-
if (x > 100 || y > 100) return NO;
|
2952
|
-
return YES;
|
2953
|
-
}
|
2954
|
-
});
|
2955
|
-
|
2956
|
-
SC.View.mixin(/** @scope SC.View */ {
|
2957
|
-
|
2958
|
-
/** @private walk like a duck -- used by SC.Page */
|
2959
|
-
isViewClass: YES,
|
2960
|
-
|
2961
|
-
/**
|
2962
|
-
This method works just like extend() except that it will also preserve
|
2963
|
-
the passed attributes in case you want to use a view builder later, if
|
2964
|
-
needed.
|
2965
|
-
|
2966
|
-
@param {Hash} attrs Attributes to add to view
|
2967
|
-
@returns {Class} SC.View subclass to create
|
2968
|
-
@function
|
2969
|
-
*/
|
2970
|
-
design: function() {
|
2971
|
-
if (this.isDesign) return this; // only run design one time
|
2972
|
-
var ret = this.extend.apply(this, arguments);
|
2973
|
-
ret.isDesign = YES ;
|
2974
|
-
if (SC.ViewDesigner) {
|
2975
|
-
SC.ViewDesigner.didLoadDesign(ret, this, SC.A(arguments));
|
2976
|
-
}
|
2977
|
-
return ret ;
|
2978
|
-
},
|
2979
|
-
|
2980
|
-
/**
|
2981
|
-
Helper applies the layout to the prototype.
|
2982
|
-
*/
|
2983
|
-
layout: function(layout) {
|
2984
|
-
this.prototype.layout = layout ;
|
2985
|
-
return this ;
|
2986
|
-
},
|
2987
|
-
|
2988
|
-
/**
|
2989
|
-
Convert any layout to a Top, Left, Width, Height layout
|
2990
|
-
*/
|
2991
|
-
convertLayoutToAnchoredLayout: function(layout, parentFrame){
|
2992
|
-
var ret = {top: 0, left: 0, width: parentFrame.width, height: parentFrame.height},
|
2993
|
-
pFW = parentFrame.width, pFH = parentFrame.height, //shortHand for parentDimensions
|
2994
|
-
lR = layout.right,
|
2995
|
-
lL = layout.left,
|
2996
|
-
lT = layout.top,
|
2997
|
-
lB = layout.bottom,
|
2998
|
-
lW = layout.width,
|
2999
|
-
lH = layout.height,
|
3000
|
-
lcX = layout.centerX,
|
3001
|
-
lcY = layout.centerY;
|
3002
|
-
|
3003
|
-
// X Conversion
|
3004
|
-
// handle left aligned and left/right
|
3005
|
-
if (!SC.none(lL)) {
|
3006
|
-
if(SC.isPercentage(lL)) ret.left = lL*pFW;
|
3007
|
-
else ret.left = lL;
|
3008
|
-
if (lW !== undefined) {
|
3009
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
3010
|
-
else if(SC.isPercentage(lW)) ret.width = lW*pFW ;
|
3011
|
-
else ret.width = lW ;
|
3012
|
-
} else {
|
3013
|
-
if (lR && SC.isPercentage(lR)) ret.width = pFW - ret.left - (lR*pFW);
|
3014
|
-
else ret.width = pFW - ret.left - (lR || 0);
|
3015
|
-
}
|
3016
|
-
|
3017
|
-
// handle right aligned
|
3018
|
-
} else if (!SC.none(lR)) {
|
3019
|
-
|
3020
|
-
// if no width, calculate it from the parent frame
|
3021
|
-
if (SC.none(lW)) {
|
3022
|
-
ret.left = 0;
|
3023
|
-
if(lR && SC.isPercentage(lR)) ret.width = pFW - (lR*pFW);
|
3024
|
-
else ret.width = pFW - (lR || 0);
|
3025
|
-
|
3026
|
-
// If has width, calculate the left anchor from the width and right and parent frame
|
3027
|
-
} else {
|
3028
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
3029
|
-
else {
|
3030
|
-
if (SC.isPercentage(lW)) ret.width = lW*pFW;
|
3031
|
-
else ret.width = lW;
|
3032
|
-
if (SC.isPercentage(lR)) ret.left = pFW - (ret.width + lR);
|
3033
|
-
else ret.left = pFW - (ret.width + lR);
|
3034
|
-
}
|
3035
|
-
}
|
3036
|
-
|
3037
|
-
// handle centered
|
3038
|
-
} else if (!SC.none(lcX)) {
|
3039
|
-
if(lW && SC.isPercentage(lW)) ret.width = (lW*pFW) ;
|
3040
|
-
else ret.width = (lW || 0) ;
|
3041
|
-
ret.left = ((pFW - ret.width)/2);
|
3042
|
-
if (SC.isPercentage(lcX)) ret.left = ret.left + lcX*pFW;
|
3043
|
-
else ret.left = ret.left + lcX;
|
3044
|
-
|
3045
|
-
// if width defined, assume left of zero
|
3046
|
-
} else if (!SC.none(lW)) {
|
3047
|
-
ret.left = 0;
|
3048
|
-
if(lW === SC.LAYOUT_AUTO) ret.width = SC.LAYOUT_AUTO ;
|
3049
|
-
else {
|
3050
|
-
if(SC.isPercentage(lW)) ret.width = lW*pFW;
|
3051
|
-
else ret.width = lW;
|
3052
|
-
}
|
3053
|
-
|
3054
|
-
// fallback, full width.
|
3055
|
-
} else {
|
3056
|
-
ret.left = 0;
|
3057
|
-
ret.width = 0;
|
3058
|
-
}
|
3059
|
-
|
3060
|
-
// handle min/max
|
3061
|
-
if (layout.minWidth !== undefined) ret.minWidth = layout.minWidth ;
|
3062
|
-
if (layout.maxWidth !== undefined) ret.maxWidth = layout.maxWidth ;
|
3063
|
-
|
3064
|
-
// Y Conversion
|
3065
|
-
// handle left aligned and top/bottom
|
3066
|
-
if (!SC.none(lT)) {
|
3067
|
-
if(SC.isPercentage(lT)) ret.top = lT*pFH;
|
3068
|
-
else ret.top = lT;
|
3069
|
-
if (lH !== undefined) {
|
3070
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
3071
|
-
else if (SC.isPercentage(lH)) ret.height = lH*pFH;
|
3072
|
-
else ret.height = lH ;
|
3073
|
-
} else {
|
3074
|
-
ret.height = pFH - ret.top;
|
3075
|
-
if(lB && SC.isPercentage(lB)) ret.height = ret.height - (lB*pFH);
|
3076
|
-
else ret.height = ret.height - (lB || 0);
|
3077
|
-
}
|
3078
|
-
|
3079
|
-
// handle bottom aligned
|
3080
|
-
} else if (!SC.none(lB)) {
|
3081
|
-
|
3082
|
-
// if no height, calculate it from the parent frame
|
3083
|
-
if (SC.none(lH)) {
|
3084
|
-
ret.top = 0;
|
3085
|
-
if (lB && SC.isPercentage(lB)) ret.height = pFH - (lB*pFH);
|
3086
|
-
else ret.height = pFH - (lB || 0);
|
3087
|
-
|
3088
|
-
// If has height, calculate the top anchor from the height and bottom and parent frame
|
3089
|
-
} else {
|
3090
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
3091
|
-
else {
|
3092
|
-
if (SC.isPercentage(lH)) ret.height = lH*pFH;
|
3093
|
-
else ret.height = lH;
|
3094
|
-
ret.top = pFH - ret.height;
|
3095
|
-
if (SC.isPercentage(lB)) ret.top = ret.top - (lB*pFH);
|
3096
|
-
else ret.top = ret.top - lB;
|
3097
|
-
}
|
3098
|
-
}
|
3099
|
-
|
3100
|
-
// handle centered
|
3101
|
-
} else if (!SC.none(lcY)) {
|
3102
|
-
if(lH && SC.isPercentage(lH)) ret.height = (lH*pFH) ;
|
3103
|
-
else ret.height = (lH || 0) ;
|
3104
|
-
ret.top = ((pFH - ret.height)/2);
|
3105
|
-
if(SC.isPercentage(lcY)) ret.top = ret.top + lcY*pFH;
|
3106
|
-
else ret.top = ret.top + lcY;
|
3107
|
-
|
3108
|
-
// if height defined, assume top of zero
|
3109
|
-
} else if (!SC.none(lH)) {
|
3110
|
-
ret.top = 0;
|
3111
|
-
if(lH === SC.LAYOUT_AUTO) ret.height = SC.LAYOUT_AUTO ;
|
3112
|
-
else if (SC.isPercentage(lH)) ret.height = lH*pFH;
|
3113
|
-
else ret.height = lH;
|
3114
|
-
|
3115
|
-
// fallback, full height.
|
3116
|
-
} else {
|
3117
|
-
ret.top = 0;
|
3118
|
-
ret.height = 0;
|
3119
|
-
}
|
3120
|
-
|
3121
|
-
if(ret.top) ret.top = Math.floor(ret.top);
|
3122
|
-
if(ret.bottom) ret.bottom = Math.floor(ret.bottom);
|
3123
|
-
if(ret.left) ret.left = Math.floor(ret.left);
|
3124
|
-
if(ret.right) ret.right = Math.floor(ret.right);
|
3125
|
-
if(ret.width !== SC.LAYOUT_AUTO) ret.width = Math.floor(ret.width);
|
3126
|
-
if(ret.height !== SC.LAYOUT_AUTO) ret.height = Math.floor(ret.height);
|
3127
|
-
|
3128
|
-
// handle min/max
|
3129
|
-
if (layout.minHeight !== undefined) ret.minHeight = layout.minHeight ;
|
3130
|
-
if (layout.maxHeight !== undefined) ret.maxHeight = layout.maxHeight ;
|
3131
|
-
|
3132
|
-
return ret;
|
3133
|
-
},
|
3134
|
-
|
3135
|
-
/**
|
3136
|
-
For now can only convert Top/Left/Width/Height to a Custom Layout
|
3137
|
-
*/
|
3138
|
-
convertLayoutToCustomLayout: function(layout, layoutParams, parentFrame){
|
3139
|
-
// TODO: [EG] Create Top/Left/Width/Height to a Custom Layout conversion
|
3140
|
-
},
|
3141
|
-
|
3142
|
-
/**
|
3143
|
-
Helper applies the classNames to the prototype
|
3144
|
-
*/
|
3145
|
-
classNames: function(sc) {
|
3146
|
-
sc = (this.prototype.classNames || []).concat(sc);
|
3147
|
-
this.prototype.classNames = sc;
|
3148
|
-
return this ;
|
3149
|
-
},
|
3150
|
-
|
3151
|
-
/**
|
3152
|
-
Help applies the tagName
|
3153
|
-
*/
|
3154
|
-
tagName: function(tg) {
|
3155
|
-
this.prototype.tagName = tg;
|
3156
|
-
return this ;
|
3157
|
-
},
|
3158
|
-
|
3159
|
-
/**
|
3160
|
-
Helper adds the childView
|
3161
|
-
*/
|
3162
|
-
childView: function(cv) {
|
3163
|
-
var childViews = this.prototype.childViews || [];
|
3164
|
-
if (childViews === this.superclass.prototype.childViews) {
|
3165
|
-
childViews = childViews.slice();
|
3166
|
-
}
|
3167
|
-
childViews.push(cv) ;
|
3168
|
-
this.prototype.childViews = childViews;
|
3169
|
-
return this ;
|
3170
|
-
},
|
3171
|
-
|
3172
|
-
/**
|
3173
|
-
Helper adds a binding to a design
|
3174
|
-
*/
|
3175
|
-
bind: function(keyName, path) {
|
3176
|
-
var p = this.prototype, s = this.superclass.prototype;
|
3177
|
-
var bindings = p._bindings ;
|
3178
|
-
if (!bindings || bindings === s._bindings) {
|
3179
|
-
bindings = p._bindings = (bindings || []).slice() ;
|
3180
|
-
}
|
3181
|
-
|
3182
|
-
keyName = keyName + "Binding";
|
3183
|
-
p[keyName] = path ;
|
3184
|
-
bindings.push(keyName);
|
3185
|
-
|
3186
|
-
return this ;
|
3187
|
-
},
|
3188
|
-
|
3189
|
-
/**
|
3190
|
-
Helper sets a generic property on a design.
|
3191
|
-
*/
|
3192
|
-
prop: function(keyName, value) {
|
3193
|
-
this.prototype[keyName] = value;
|
3194
|
-
return this ;
|
3195
|
-
},
|
3196
|
-
|
3197
|
-
/**
|
3198
|
-
Used to construct a localization for a view. The default implementation
|
3199
|
-
will simply return the passed attributes.
|
3200
|
-
*/
|
3201
|
-
localization: function(attrs, rootElement) {
|
3202
|
-
// add rootElement
|
3203
|
-
if (rootElement) attrs.rootElement = SC.$(rootElement)[0];
|
3204
|
-
return attrs;
|
3205
|
-
},
|
3206
|
-
|
3207
|
-
/**
|
3208
|
-
Creates a view instance, first finding the DOM element you name and then
|
3209
|
-
using that as the root element. You should not use this method very
|
3210
|
-
often, but it is sometimes useful if you want to attach to already
|
3211
|
-
existing HTML.
|
3212
|
-
|
3213
|
-
@param {String|Element} element
|
3214
|
-
@param {Hash} attrs
|
3215
|
-
@returns {SC.View} instance
|
3216
|
-
*/
|
3217
|
-
viewFor: function(element, attrs) {
|
3218
|
-
var args = SC.$A(arguments); // prepare to edit
|
3219
|
-
if (SC.none(element)) {
|
3220
|
-
args.shift(); // remove if no element passed
|
3221
|
-
} else args[0] = { rootElement: SC.$(element)[0] } ;
|
3222
|
-
var ret = this.create.apply(this, arguments) ;
|
3223
|
-
args = args[0] = null;
|
3224
|
-
return ret ;
|
3225
|
-
},
|
3226
|
-
|
3227
|
-
/**
|
3228
|
-
Create a new view with the passed attributes hash. If you have the
|
3229
|
-
Designer module loaded, this will also create a peer designer if needed.
|
3230
|
-
*/
|
3231
|
-
create: function() {
|
3232
|
-
var C=this, ret = new C(arguments);
|
3233
|
-
if (SC.ViewDesigner) {
|
3234
|
-
SC.ViewDesigner.didCreateView(ret, SC.$A(arguments));
|
3235
|
-
}
|
3236
|
-
return ret ;
|
3237
|
-
},
|
3238
|
-
|
3239
|
-
/**
|
3240
|
-
Applies the passed localization hash to the component views. Call this
|
3241
|
-
method before you call create(). Returns the receiver. Typically you
|
3242
|
-
will do something like this:
|
3243
|
-
|
3244
|
-
view = SC.View.design({...}).loc(localizationHash).create();
|
3245
|
-
|
3246
|
-
@param {Hash} loc
|
3247
|
-
@param rootElement {String} optional rootElement with prepped HTML
|
3248
|
-
@returns {SC.View} receiver
|
3249
|
-
*/
|
3250
|
-
loc: function(loc) {
|
3251
|
-
var childLocs = loc.childViews;
|
3252
|
-
delete loc.childViews; // clear out child views before applying to attrs
|
3253
|
-
|
3254
|
-
this.applyLocalizedAttributes(loc) ;
|
3255
|
-
if (SC.ViewDesigner) {
|
3256
|
-
SC.ViewDesigner.didLoadLocalization(this, SC.$A(arguments));
|
3257
|
-
}
|
3258
|
-
|
3259
|
-
// apply localization recursively to childViews
|
3260
|
-
var childViews = this.prototype.childViews, idx = childViews.length,
|
3261
|
-
viewClass;
|
3262
|
-
while(--idx>=0) {
|
3263
|
-
viewClass = childViews[idx];
|
3264
|
-
loc = childLocs[idx];
|
3265
|
-
if (loc && viewClass && viewClass.loc) viewClass.loc(loc) ;
|
3266
|
-
}
|
3267
|
-
|
3268
|
-
return this; // done!
|
3269
|
-
},
|
3270
|
-
|
3271
|
-
/**
|
3272
|
-
Internal method actually updates the localizated attributes on the view
|
3273
|
-
class. This is overloaded in design mode to also save the attributes.
|
3274
|
-
*/
|
3275
|
-
applyLocalizedAttributes: function(loc) {
|
3276
|
-
SC.mixin(this.prototype, loc) ;
|
3277
|
-
},
|
3278
|
-
|
3279
|
-
views: {}
|
3280
|
-
|
3281
|
-
}) ;
|
3282
|
-
|
3283
|
-
// .......................................................
|
3284
|
-
// OUTLET BUILDER
|
3285
|
-
//
|
3286
|
-
|
3287
|
-
/**
|
3288
|
-
Generates a computed property that will look up the passed property path
|
3289
|
-
the first time you try to get the value. Use this whenever you want to
|
3290
|
-
define an outlet that points to another view or object. The root object
|
3291
|
-
used for the path will be the receiver.
|
3292
|
-
*/
|
3293
|
-
SC.outlet = function(path, root) {
|
3294
|
-
return function(key) {
|
3295
|
-
return (this[key] = SC.objectForPropertyPath(path, (root !== undefined) ? root : this)) ;
|
3296
|
-
}.property();
|
3297
|
-
};
|
3298
|
-
|
3299
|
-
/** @private on unload clear cached divs. */
|
3300
|
-
SC.View.unload = function() {
|
3301
|
-
// delete view items this way to ensure the views are cleared. The hash
|
3302
|
-
// itself may be owned by multiple view subclasses.
|
3303
|
-
var views = SC.View.views;
|
3304
|
-
if (views) {
|
3305
|
-
for(var key in views) {
|
3306
|
-
if (!views.hasOwnProperty(key)) continue ;
|
3307
|
-
delete views[key];
|
3308
|
-
}
|
3309
|
-
}
|
3310
|
-
} ;
|
3311
|
-
|
3312
|
-
//unload views for IE, trying to collect memory.
|
3313
|
-
if(SC.browser.msie) SC.Event.add(window, 'unload', SC.View, SC.View.unload) ;
|