sproutcore 1.4.5 → 1.5.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +35 -0
- data/VERSION.yml +2 -2
- data/lib/Buildfile +13 -4
- data/lib/buildtasks/build.rake +20 -17
- data/lib/buildtasks/manifest.rake +143 -78
- 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 +24 -13
- data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
- data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
- data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
- data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
- data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
- data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -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 +142 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -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 +144 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
- data/lib/frameworks/sproutcore/apps/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 +36 -46
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
- data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
- data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -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 +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -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 +43 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
- 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/strings.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
- data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
- data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
- data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
- data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
- data/lib/frameworks/sproutcore/license.js +31 -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/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 +27 -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 +84 -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 +66 -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 +34 -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 +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -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 +84 -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 +66 -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 +3 -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 +20 -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/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 +76 -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.js +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +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/progress/progress.js +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -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 +79 -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 +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -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 +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
- data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
- data/lib/sproutcore.rb +9 -2
- data/lib/sproutcore/builders.rb +2 -1
- data/lib/sproutcore/builders/base.rb +7 -2
- data/lib/sproutcore/builders/combine.rb +49 -1
- data/lib/sproutcore/builders/html.rb +2 -0
- data/lib/sproutcore/builders/javascript.rb +1 -1
- data/lib/sproutcore/builders/minify.rb +12 -12
- data/lib/sproutcore/builders/module.rb +72 -0
- data/lib/sproutcore/builders/string_wrapper.rb +43 -0
- data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
- data/lib/sproutcore/helpers/static_helper.rb +13 -9
- data/lib/sproutcore/models/manifest_entry.rb +2 -2
- data/lib/sproutcore/models/target.rb +25 -11
- data/lib/sproutcore/rack/dev.rb +3 -3
- data/lib/sproutcore/tools.rb +51 -2
- data/lib/sproutcore/tools/build.rb +35 -7
- data/lib/sproutcore/version.rb +1 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
- data/spec/fixtures/builder_tests/Buildfile +2 -2
- data/spec/lib/builders/bundle_spec.rb +8 -8
- data/spec/lib/builders/strings_spec.rb +1 -0
- data/sproutcore.gemspec +9 -2
- data/vendor/chance/.gitignore +5 -0
- data/vendor/chance/Gemfile +4 -0
- data/vendor/chance/Rakefile +2 -0
- data/vendor/chance/bin/chance +72 -0
- data/vendor/chance/chance.gemspec +28 -0
- data/vendor/chance/lib/chance.rb +139 -0
- data/vendor/chance/lib/chance/imager.rb +13 -0
- data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
- data/vendor/chance/lib/chance/importer.rb +64 -0
- data/vendor/chance/lib/chance/instance.rb +225 -0
- data/vendor/chance/lib/chance/parser.rb +831 -0
- data/vendor/chance/lib/chance/perf.rb +17 -0
- data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
- data/vendor/chance/lib/chance/slicing.rb +104 -0
- data/vendor/chance/lib/chance/version.rb +3 -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/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/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → 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 +686 -177
- data/lib/frameworks/sproutcore/CHANGELOG +0 -93
- 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/foundation/protocols/inline_editor_delegate.js +0 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
- 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/runtime/tests/core/isArray.js +0 -25
- 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/sproutcore/builders/bundle.rb +0 -63
@@ -11,141 +11,141 @@ sc_require('system/object') ;
|
|
11
11
|
Debug parameter you can turn on. This will log all bindings that fire to
|
12
12
|
the console. This should be disabled in production code. Note that you
|
13
13
|
can also enable this from the console or temporarily.
|
14
|
-
|
14
|
+
|
15
15
|
@property {Boolean}
|
16
16
|
*/
|
17
17
|
SC.LOG_BINDINGS = NO ;
|
18
18
|
|
19
19
|
/**
|
20
|
-
Performance paramter. This will benchmark the time spent firing each
|
20
|
+
Performance paramter. This will benchmark the time spent firing each
|
21
21
|
binding.
|
22
|
-
|
22
|
+
|
23
23
|
@property {Boolean}
|
24
24
|
*/
|
25
25
|
SC.BENCHMARK_BINDING_NOTIFICATIONS = NO ;
|
26
26
|
|
27
27
|
/**
|
28
28
|
Performance parameter. This will benchmark the time spend configuring each
|
29
|
-
binding.
|
30
|
-
|
29
|
+
binding.
|
30
|
+
|
31
31
|
@property {Boolean}
|
32
32
|
*/
|
33
33
|
SC.BENCHMARK_BINDING_SETUP = NO;
|
34
|
-
|
35
|
-
/**
|
34
|
+
|
35
|
+
/**
|
36
36
|
Default placeholder for multiple values in bindings.
|
37
|
-
|
37
|
+
|
38
38
|
@property {String}
|
39
39
|
*/
|
40
40
|
SC.MULTIPLE_PLACEHOLDER = '@@MULT@@' ;
|
41
41
|
|
42
42
|
/**
|
43
43
|
Default placeholder for null values in bindings.
|
44
|
-
|
44
|
+
|
45
45
|
@property {String}
|
46
46
|
*/
|
47
47
|
SC.NULL_PLACEHOLDER = '@@NULL@@' ;
|
48
48
|
|
49
49
|
/**
|
50
50
|
Default placeholder for empty values in bindings.
|
51
|
-
|
51
|
+
|
52
52
|
@property {String}
|
53
53
|
*/
|
54
54
|
SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
|
55
55
|
|
56
56
|
|
57
57
|
/**
|
58
|
-
@namespace
|
59
|
-
|
58
|
+
@namespace
|
59
|
+
|
60
60
|
A binding simply connects the properties of two objects so that whenever the
|
61
61
|
value of one property changes, the other property will be changed also. You
|
62
62
|
do not usually work with Binding objects directly but instead describe
|
63
63
|
bindings in your class definition using something like:
|
64
|
-
|
64
|
+
|
65
65
|
{{{
|
66
66
|
valueBinding: "MyApp.someController.title"
|
67
67
|
}}}
|
68
|
-
|
68
|
+
|
69
69
|
This will create a binding from "MyApp.someController.title" to the "value"
|
70
70
|
property of your object instance automatically. Now the two values will be
|
71
71
|
kept in sync.
|
72
|
-
|
72
|
+
|
73
73
|
h2. Customizing Your Bindings
|
74
|
-
|
75
|
-
In addition to synchronizing values, bindings can also perform some basic
|
76
|
-
transforms on values. These transforms can help to make sure the data fed
|
74
|
+
|
75
|
+
In addition to synchronizing values, bindings can also perform some basic
|
76
|
+
transforms on values. These transforms can help to make sure the data fed
|
77
77
|
into one object always meets the expectations of that object regardless of
|
78
78
|
what the other object outputs.
|
79
|
-
|
80
|
-
To customize a binding, you can use one of the many helper methods defined
|
79
|
+
|
80
|
+
To customize a binding, you can use one of the many helper methods defined
|
81
81
|
on SC.Binding like so:
|
82
|
-
|
82
|
+
|
83
83
|
{{{
|
84
|
-
valueBinding: SC.Binding.single("MyApp.someController.title")
|
84
|
+
valueBinding: SC.Binding.single("MyApp.someController.title")
|
85
85
|
}}}
|
86
|
-
|
86
|
+
|
87
87
|
This will create a binding just like the example above, except that now the
|
88
|
-
binding will convert the value of MyApp.someController.title to a single
|
88
|
+
binding will convert the value of MyApp.someController.title to a single
|
89
89
|
object (removing any arrays) before applying it to the "value" property of
|
90
90
|
your object.
|
91
|
-
|
91
|
+
|
92
92
|
You can also chain helper methods to build custom bindings like so:
|
93
|
-
|
93
|
+
|
94
94
|
{{{
|
95
95
|
valueBinding: SC.Binding.single("MyApp.someController.title").notEmpty("(EMPTY)")
|
96
96
|
}}}
|
97
|
-
|
97
|
+
|
98
98
|
This will force the value of MyApp.someController.title to be a single value
|
99
99
|
and then check to see if the value is "empty" (null, undefined, empty array,
|
100
|
-
or an empty string). If it is empty, the value will be set to the string
|
100
|
+
or an empty string). If it is empty, the value will be set to the string
|
101
101
|
"(EMPTY)".
|
102
|
-
|
102
|
+
|
103
103
|
h2. One Way Bindings
|
104
|
-
|
105
|
-
One especially useful binding customization you can use is the oneWay()
|
106
|
-
helper. This helper tells SproutCore that you are only interested in
|
104
|
+
|
105
|
+
One especially useful binding customization you can use is the oneWay()
|
106
|
+
helper. This helper tells SproutCore that you are only interested in
|
107
107
|
receiving changes on the object you are binding from. For example, if you
|
108
|
-
are binding to a preference and you want to be notified if the preference
|
108
|
+
are binding to a preference and you want to be notified if the preference
|
109
109
|
has changed, but your object will not be changing the preference itself, you
|
110
110
|
could do:
|
111
|
-
|
111
|
+
|
112
112
|
{{{
|
113
113
|
bigTitlesBinding: SC.Binding.oneWay("MyApp.preferencesController.bigTitles")
|
114
114
|
}}}
|
115
|
-
|
115
|
+
|
116
116
|
This way if the value of MyApp.preferencesController.bigTitles changes the
|
117
|
-
"bigTitles" property of your object will change also. However, if you
|
118
|
-
change the value of your "bigTitles" property, it will not update the
|
117
|
+
"bigTitles" property of your object will change also. However, if you
|
118
|
+
change the value of your "bigTitles" property, it will not update the
|
119
119
|
preferencesController.
|
120
|
-
|
121
|
-
One way bindings are almost twice as fast to setup and twice as fast to
|
120
|
+
|
121
|
+
One way bindings are almost twice as fast to setup and twice as fast to
|
122
122
|
execute because the binding only has to worry about changes to one side.
|
123
|
-
|
124
|
-
You should consider using one way bindings anytime you have an object that
|
125
|
-
may be created frequently and you do not intend to change a property; only
|
123
|
+
|
124
|
+
You should consider using one way bindings anytime you have an object that
|
125
|
+
may be created frequently and you do not intend to change a property; only
|
126
126
|
to monitor it for changes. (such as in the example above).
|
127
|
-
|
127
|
+
|
128
128
|
h2. Adding Custom Transforms
|
129
|
-
|
130
|
-
In addition to using the standard helpers provided by SproutCore, you can
|
131
|
-
also defined your own custom transform functions which will be used to
|
129
|
+
|
130
|
+
In addition to using the standard helpers provided by SproutCore, you can
|
131
|
+
also defined your own custom transform functions which will be used to
|
132
132
|
convert the value. To do this, just define your transform function and add
|
133
|
-
it to the binding with the transform() helper. The following example will
|
134
|
-
not allow Integers less than ten. Note that it checks the value of the
|
133
|
+
it to the binding with the transform() helper. The following example will
|
134
|
+
not allow Integers less than ten. Note that it checks the value of the
|
135
135
|
bindings and allows all other values to pass:
|
136
|
-
|
136
|
+
|
137
137
|
{{{
|
138
138
|
valueBinding: SC.Binding.transform(function(value, binding) {
|
139
|
-
return ((SC.typeOf(value) === SC.T_NUMBER) && (value < 10)) ? 10 : value;
|
139
|
+
return ((SC.typeOf(value) === SC.T_NUMBER) && (value < 10)) ? 10 : value;
|
140
140
|
}).from("MyApp.someController.value")
|
141
141
|
}}}
|
142
|
-
|
142
|
+
|
143
143
|
If you would like to instead use this transform on a number of bindings,
|
144
144
|
you can also optionally add your own helper method to SC.Binding. This
|
145
|
-
method should simply return the value of this.transform(). The example
|
145
|
+
method should simply return the value of this.transform(). The example
|
146
146
|
below adds a new helper called notLessThan() which will limit the value to
|
147
147
|
be not less than the passed minimum:
|
148
|
-
|
148
|
+
|
149
149
|
{{{
|
150
150
|
SC.Binding.notLessThan = function(minValue) {
|
151
151
|
return this.transform(function(value, binding) {
|
@@ -153,133 +153,133 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
|
|
153
153
|
}) ;
|
154
154
|
} ;
|
155
155
|
}}}
|
156
|
-
|
157
|
-
You could specify this in your core.js file, for example. Then anywhere in
|
156
|
+
|
157
|
+
You could specify this in your core.js file, for example. Then anywhere in
|
158
158
|
your application you can use it to define bindings like so:
|
159
|
-
|
159
|
+
|
160
160
|
{{{
|
161
161
|
valueBinding: SC.Binding.from("MyApp.someController.value").notLessThan(10)
|
162
162
|
}}}
|
163
|
-
|
163
|
+
|
164
164
|
Also, remember that helpers are chained so you can use your helper along with
|
165
|
-
any other helpers. The example below will create a one way binding that
|
165
|
+
any other helpers. The example below will create a one way binding that
|
166
166
|
does not allow empty values or values less than 10:
|
167
|
-
|
167
|
+
|
168
168
|
{{{
|
169
169
|
valueBinding: SC.Binding.oneWay("MyApp.someController.value").notEmpty().notLessThan(10)
|
170
170
|
}}}
|
171
|
-
|
172
|
-
Note that the built in helper methods all allow you to pass a "from"
|
173
|
-
property path so you don't have to use the from() helper to set the path.
|
174
|
-
You can do the same thing with your own helper methods if you like, but it
|
171
|
+
|
172
|
+
Note that the built in helper methods all allow you to pass a "from"
|
173
|
+
property path so you don't have to use the from() helper to set the path.
|
174
|
+
You can do the same thing with your own helper methods if you like, but it
|
175
175
|
is not required.
|
176
|
-
|
176
|
+
|
177
177
|
h2. Creating Custom Binding Templates
|
178
|
-
|
178
|
+
|
179
179
|
Another way you can customize bindings is to create a binding template. A
|
180
|
-
template is simply a binding that is already partially or completely
|
181
|
-
configured. You can specify this template anywhere in your app and then use
|
180
|
+
template is simply a binding that is already partially or completely
|
181
|
+
configured. You can specify this template anywhere in your app and then use
|
182
182
|
it instead of designating your own custom bindings. This is a bit faster on
|
183
183
|
app startup but it is mostly useful in making your code less verbose.
|
184
|
-
|
185
|
-
For example, let's say you will be frequently creating one way, not empty
|
184
|
+
|
185
|
+
For example, let's say you will be frequently creating one way, not empty
|
186
186
|
bindings that allow values greater than 10 throughout your app. You could
|
187
187
|
create a binding template in your core.js like this:
|
188
|
-
|
188
|
+
|
189
189
|
{{{
|
190
190
|
MyApp.LimitBinding = SC.Binding.oneWay().notEmpty().notLessThan(10);
|
191
191
|
}}}
|
192
|
-
|
193
|
-
Then anywhere you want to use this binding, just refer to the template like
|
192
|
+
|
193
|
+
Then anywhere you want to use this binding, just refer to the template like
|
194
194
|
so:
|
195
195
|
|
196
196
|
{{{
|
197
197
|
valueBinding: MyApp.LimitBinding.beget("MyApp.someController.value")
|
198
198
|
}}}
|
199
|
-
|
200
|
-
Note that when you use binding templates, it is very important that you
|
201
|
-
always start by using beget() to extend the template. If you do not do
|
202
|
-
this, you will end up using the same binding instance throughout your app
|
199
|
+
|
200
|
+
Note that when you use binding templates, it is very important that you
|
201
|
+
always start by using beget() to extend the template. If you do not do
|
202
|
+
this, you will end up using the same binding instance throughout your app
|
203
203
|
which will lead to erratic behavior.
|
204
|
-
|
204
|
+
|
205
205
|
h2. How to Manually Activate a Binding
|
206
206
|
|
207
|
-
All of the examples above show you how to configure a custom binding, but
|
208
|
-
the result of these customizations will be a binding template, not a fully
|
209
|
-
active binding. The binding will actually become active only when you
|
210
|
-
instantiate the object the binding belongs to. It is useful however, to
|
207
|
+
All of the examples above show you how to configure a custom binding, but
|
208
|
+
the result of these customizations will be a binding template, not a fully
|
209
|
+
active binding. The binding will actually become active only when you
|
210
|
+
instantiate the object the binding belongs to. It is useful however, to
|
211
211
|
understand what actually happens when the binding is activated.
|
212
|
-
|
212
|
+
|
213
213
|
For a binding to function it must have at least a "from" property and a "to"
|
214
214
|
property. The from property path points to the object/key that you want to
|
215
|
-
bind from while the to path points to the object/key you want to bind to.
|
216
|
-
|
217
|
-
When you define a custom binding, you are usually describing the property
|
215
|
+
bind from while the to path points to the object/key you want to bind to.
|
216
|
+
|
217
|
+
When you define a custom binding, you are usually describing the property
|
218
218
|
you want to bind from (such as "MyApp.someController.value" in the examples
|
219
219
|
above). When your object is created, it will automatically assign the value
|
220
|
-
you want to bind "to" based on the name of your binding key. In the
|
221
|
-
examples above, during init, SproutCore objects will effectively call
|
220
|
+
you want to bind "to" based on the name of your binding key. In the
|
221
|
+
examples above, during init, SproutCore objects will effectively call
|
222
222
|
something like this on your binding:
|
223
|
-
|
223
|
+
|
224
224
|
{{{
|
225
225
|
binding = this.valueBinding.beget().to("value", this) ;
|
226
226
|
}}}
|
227
|
-
|
228
|
-
This creates a new binding instance based on the template you provide, and
|
229
|
-
sets the to path to the "value" property of the new object. Now that the
|
227
|
+
|
228
|
+
This creates a new binding instance based on the template you provide, and
|
229
|
+
sets the to path to the "value" property of the new object. Now that the
|
230
230
|
binding is fully configured with a "from" and a "to", it simply needs to be
|
231
231
|
connected to become active. This is done through the connect() method:
|
232
|
-
|
232
|
+
|
233
233
|
{{{
|
234
234
|
binding.connect() ;
|
235
235
|
}}}
|
236
|
-
|
237
|
-
Now that the binding is connected, it will observe both the from and to side
|
236
|
+
|
237
|
+
Now that the binding is connected, it will observe both the from and to side
|
238
238
|
and relay changes.
|
239
|
-
|
240
|
-
If you ever needed to do so (you almost never will, but it is useful to
|
241
|
-
understand this anyway), you could manually create an active binding by
|
239
|
+
|
240
|
+
If you ever needed to do so (you almost never will, but it is useful to
|
241
|
+
understand this anyway), you could manually create an active binding by
|
242
242
|
doing the following:
|
243
|
-
|
243
|
+
|
244
244
|
{{{
|
245
245
|
SC.Binding.from("MyApp.someController.value")
|
246
246
|
.to("MyApp.anotherObject.value")
|
247
247
|
.connect();
|
248
248
|
}}}
|
249
|
-
|
250
|
-
You could also use the bind() helper method provided by SC.Object. (This is
|
249
|
+
|
250
|
+
You could also use the bind() helper method provided by SC.Object. (This is
|
251
251
|
the same method used by SC.Object.init() to setup your bindings):
|
252
|
-
|
252
|
+
|
253
253
|
{{{
|
254
254
|
MyApp.anotherObject.bind("value", "MyApp.someController.value") ;
|
255
255
|
}}}
|
256
256
|
|
257
257
|
Both of these code fragments have the same effect as doing the most friendly
|
258
258
|
form of binding creation like so:
|
259
|
-
|
259
|
+
|
260
260
|
{{{
|
261
261
|
MyApp.anotherObject = SC.Object.create({
|
262
262
|
valueBinding: "MyApp.someController.value",
|
263
|
-
|
263
|
+
|
264
264
|
// OTHER CODE FOR THIS OBJECT...
|
265
|
-
|
265
|
+
|
266
266
|
}) ;
|
267
267
|
}}}
|
268
|
-
|
268
|
+
|
269
269
|
SproutCore's built in binding creation method make it easy to automatically
|
270
|
-
create bindings for you. You should always use the highest-level APIs
|
270
|
+
create bindings for you. You should always use the highest-level APIs
|
271
271
|
available, even if you understand how to it works underneath.
|
272
|
-
|
272
|
+
|
273
273
|
@since SproutCore 1.0
|
274
274
|
*/
|
275
275
|
SC.Binding = {
|
276
|
-
|
276
|
+
|
277
277
|
/**
|
278
278
|
This is the core method you use to create a new binding instance. The
|
279
279
|
binding instance will have the receiver instance as its parent which means
|
280
|
-
any configuration you have there will be inherited.
|
281
|
-
|
282
|
-
The returned instance will also have its parentBinding property set to the
|
280
|
+
any configuration you have there will be inherited.
|
281
|
+
|
282
|
+
The returned instance will also have its parentBinding property set to the
|
283
283
|
receiver.
|
284
284
|
|
285
285
|
@param fromPath {String} optional from path.
|
@@ -291,9 +291,9 @@ SC.Binding = {
|
|
291
291
|
if (fromPath !== undefined) ret = ret.from(fromPath) ;
|
292
292
|
return ret ;
|
293
293
|
},
|
294
|
-
|
294
|
+
|
295
295
|
/**
|
296
|
-
Returns a builder function for compatibility.
|
296
|
+
Returns a builder function for compatibility.
|
297
297
|
*/
|
298
298
|
builder: function() {
|
299
299
|
var binding = this,
|
@@ -301,29 +301,29 @@ SC.Binding = {
|
|
301
301
|
ret.beget = function() { return binding.beget(); } ;
|
302
302
|
return ret ;
|
303
303
|
},
|
304
|
-
|
304
|
+
|
305
305
|
/**
|
306
306
|
This will set "from" property path to the specified value. It will not
|
307
307
|
attempt to resolve this property path to an actual object/property tuple
|
308
308
|
until you connect the binding.
|
309
309
|
|
310
|
-
The binding will search for the property path starting at the root level
|
311
|
-
unless you specify an alternate root object as the second paramter to this
|
310
|
+
The binding will search for the property path starting at the root level
|
311
|
+
unless you specify an alternate root object as the second paramter to this
|
312
312
|
method. Alternatively, you can begin your property path with either "." or
|
313
313
|
"*", which will use the root object of the to side be default. This special
|
314
314
|
behavior is used to support the high-level API provided by SC.Object.
|
315
|
-
|
315
|
+
|
316
316
|
@param propertyPath {String|Tuple} A property path or tuple
|
317
317
|
@param root {Object} optional root object to use when resolving the path.
|
318
318
|
@returns {SC.Binding} this
|
319
319
|
*/
|
320
320
|
from: function(propertyPath, root) {
|
321
|
-
|
321
|
+
|
322
322
|
// if the propertyPath is null/undefined, return this. This allows the
|
323
|
-
// method to be called from other methods when the fromPath might be
|
323
|
+
// method to be called from other methods when the fromPath might be
|
324
324
|
// optional. (cf single(), multiple())
|
325
325
|
if (!propertyPath) return this ;
|
326
|
-
|
326
|
+
|
327
327
|
// beget if needed.
|
328
328
|
var binding = (this === SC.Binding) ? this.beget() : this ;
|
329
329
|
binding._fromPropertyPath = propertyPath ;
|
@@ -331,12 +331,12 @@ SC.Binding = {
|
|
331
331
|
binding._fromTuple = null ;
|
332
332
|
return binding ;
|
333
333
|
},
|
334
|
-
|
334
|
+
|
335
335
|
/**
|
336
|
-
This will set the "to" property path to the specified value. It will not
|
336
|
+
This will set the "to" property path to the specified value. It will not
|
337
337
|
attempt to reoslve this property path to an actual object/property tuple
|
338
338
|
until you connect the binding.
|
339
|
-
|
339
|
+
|
340
340
|
@param propertyPath {String|Tuple} A property path or tuple
|
341
341
|
@param root {Object} optional root object to use when resolving the path.
|
342
342
|
@returns {SC.Binding} this
|
@@ -352,24 +352,24 @@ SC.Binding = {
|
|
352
352
|
|
353
353
|
/**
|
354
354
|
Attempts to connect this binding instance so that it can receive and relay
|
355
|
-
changes. This method will raise an exception if you have not set the
|
355
|
+
changes. This method will raise an exception if you have not set the
|
356
356
|
from/to properties yet.
|
357
|
-
|
357
|
+
|
358
358
|
@returns {SC.Binding} this
|
359
359
|
*/
|
360
360
|
connect: function() {
|
361
361
|
// If the binding is already connected, do nothing.
|
362
362
|
if (this.isConnected) return this ;
|
363
363
|
this.isConnected = YES ;
|
364
|
-
this._connectionPending = YES ; // its connected but not really...
|
364
|
+
this._connectionPending = YES ; // its connected but not really...
|
365
365
|
this._syncOnConnect = YES ;
|
366
366
|
SC.Binding._connectQueue.add(this) ;
|
367
|
-
return this;
|
367
|
+
return this;
|
368
368
|
},
|
369
|
-
|
369
|
+
|
370
370
|
/** @private
|
371
371
|
Actually connects the binding. This is done at the end of the runloop
|
372
|
-
to give you time to setup your entire object graph before the bindings
|
372
|
+
to give you time to setup your entire object graph before the bindings
|
373
373
|
try to activate.
|
374
374
|
*/
|
375
375
|
_connect: function() {
|
@@ -380,25 +380,25 @@ SC.Binding = {
|
|
380
380
|
bench = SC.BENCHMARK_BINDING_SETUP;
|
381
381
|
|
382
382
|
if (bench) SC.Benchmark.start("SC.Binding.connect()");
|
383
|
-
|
383
|
+
|
384
384
|
// try to connect the from side.
|
385
|
-
// as a special behavior, if the from property path begins with either a
|
386
|
-
// . or * and the fromRoot is null, use the toRoot instead. This allows
|
385
|
+
// as a special behavior, if the from property path begins with either a
|
386
|
+
// . or * and the fromRoot is null, use the toRoot instead. This allows
|
387
387
|
// for support for the SC.Object shorthand:
|
388
388
|
//
|
389
389
|
// contentBinding: "*owner.value"
|
390
390
|
//
|
391
391
|
path = this._fromPropertyPath; root = this._fromRoot ;
|
392
|
-
|
392
|
+
|
393
393
|
if (typeof path === "string") {
|
394
|
-
|
395
|
-
// if the first character is a '.', this is a static path. make the
|
394
|
+
|
395
|
+
// if the first character is a '.', this is a static path. make the
|
396
396
|
// toRoot the default root.
|
397
397
|
if (path.indexOf('.') === 0) {
|
398
398
|
path = path.slice(1);
|
399
399
|
if (!root) root = this._toRoot ;
|
400
|
-
|
401
|
-
// if the first character is a '*', then setup a tuple since this is a
|
400
|
+
|
401
|
+
// if the first character is a '*', then setup a tuple since this is a
|
402
402
|
// chained path.
|
403
403
|
} else if (path.indexOf('*') === 0) {
|
404
404
|
path = [this._fromRoot || this._toRoot, path.slice(1)] ;
|
@@ -407,7 +407,7 @@ SC.Binding = {
|
|
407
407
|
}
|
408
408
|
this._fromObserverData = [path, this, this.fromPropertyDidChange, root];
|
409
409
|
SC.Observers.addObserver.apply(SC.Observers, this._fromObserverData);
|
410
|
-
|
410
|
+
|
411
411
|
// try to connect the to side
|
412
412
|
if (!this._oneWay) {
|
413
413
|
path = this._toPropertyPath; root = this._toRoot ;
|
@@ -425,20 +425,20 @@ SC.Binding = {
|
|
425
425
|
if (bench) SC.Benchmark.end("SC.Binding.connect().sync");
|
426
426
|
}
|
427
427
|
},
|
428
|
-
|
428
|
+
|
429
429
|
/**
|
430
430
|
Disconnects the binding instance. Changes will no longer be relayed. You
|
431
431
|
will not usually need to call this method.
|
432
|
-
|
432
|
+
|
433
433
|
@returns {SC.Binding} this
|
434
434
|
*/
|
435
435
|
disconnect: function() {
|
436
436
|
if (!this.isConnected) return this; // nothing to do.
|
437
|
-
|
437
|
+
|
438
438
|
// if connection is still pending, just cancel
|
439
439
|
if (this._connectionPending) {
|
440
440
|
this._connectionPending = NO ;
|
441
|
-
|
441
|
+
|
442
442
|
// connection is completed, disconnect.
|
443
443
|
} else {
|
444
444
|
SC.Observers.removeObserver.apply(SC.Observers, this._fromObserverData);
|
@@ -446,9 +446,9 @@ SC.Binding = {
|
|
446
446
|
SC.Observers.removeObserver.apply(SC.Observers, this._toObserverData);
|
447
447
|
}
|
448
448
|
}
|
449
|
-
|
449
|
+
|
450
450
|
this.isConnected = NO ;
|
451
|
-
return this ;
|
451
|
+
return this ;
|
452
452
|
},
|
453
453
|
|
454
454
|
/**
|
@@ -459,41 +459,41 @@ SC.Binding = {
|
|
459
459
|
var v = target ? target.get(key) : null;
|
460
460
|
|
461
461
|
//console.log("fromPropertyDidChange: %@ v = %@".fmt(this, v)) ;
|
462
|
-
|
463
|
-
// if the new value is different from the current binding value, then
|
462
|
+
|
463
|
+
// if the new value is different from the current binding value, then
|
464
464
|
// schedule to register an update.
|
465
465
|
if (v !== this._bindingValue || key === '[]') {
|
466
466
|
|
467
467
|
this._setBindingValue(target, key) ;
|
468
468
|
this._changePending = YES ;
|
469
|
-
SC.Binding._changeQueue.add(this) ; // save for later.
|
469
|
+
SC.Binding._changeQueue.add(this) ; // save for later.
|
470
470
|
}
|
471
471
|
},
|
472
472
|
|
473
473
|
/**
|
474
474
|
Invoked whenever the value of the "to" property changes. This will mark the
|
475
475
|
binding as dirty only if:
|
476
|
-
|
476
|
+
|
477
477
|
- the binding is not one way
|
478
478
|
- the value does not match the stored transformedBindingValue
|
479
|
-
|
480
|
-
if the value does not match the transformedBindingValue, then it will
|
481
|
-
become the new bindingValue.
|
479
|
+
|
480
|
+
if the value does not match the transformedBindingValue, then it will
|
481
|
+
become the new bindingValue.
|
482
482
|
*/
|
483
483
|
toPropertyDidChange: function(target, key) {
|
484
484
|
if (this._oneWay) return; // nothing to do
|
485
|
-
|
485
|
+
|
486
486
|
var v = target.get(key) ;
|
487
|
-
|
488
|
-
// if the new value is different from the current binding value, then
|
487
|
+
|
488
|
+
// if the new value is different from the current binding value, then
|
489
489
|
// schedule to register an update.
|
490
490
|
if (v !== this._transformedBindingValue) {
|
491
491
|
this._setBindingValue(target, key) ;
|
492
492
|
this._changePending = YES ;
|
493
|
-
SC.Binding._changeQueue.add(this) ; // save for later.
|
493
|
+
SC.Binding._changeQueue.add(this) ; // save for later.
|
494
494
|
}
|
495
495
|
},
|
496
|
-
|
496
|
+
|
497
497
|
/** @private
|
498
498
|
Saves the source location for the binding value. This will be used later
|
499
499
|
to actually update the binding value.
|
@@ -502,8 +502,8 @@ SC.Binding = {
|
|
502
502
|
this._bindingSource = source;
|
503
503
|
this._bindingKey = key;
|
504
504
|
},
|
505
|
-
|
506
|
-
/** @private
|
505
|
+
|
506
|
+
/** @private
|
507
507
|
Updates the binding value from the current binding source if needed. This
|
508
508
|
should be called just before using this._bindingValue.
|
509
509
|
*/
|
@@ -511,9 +511,9 @@ SC.Binding = {
|
|
511
511
|
var source = this._bindingSource,
|
512
512
|
key = this._bindingKey,
|
513
513
|
v, idx;
|
514
|
-
|
514
|
+
|
515
515
|
this._bindingValue = v = (source ? source.getPath(key) : null);
|
516
|
-
|
516
|
+
|
517
517
|
// apply any transforms to get the to property value also
|
518
518
|
var transforms = this._transforms;
|
519
519
|
if (transforms) {
|
@@ -528,10 +528,10 @@ SC.Binding = {
|
|
528
528
|
// if error objects are not allowed, and the value is an error, then
|
529
529
|
// change it to null.
|
530
530
|
if (this._noError && SC.typeOf(v) === SC.T_ERROR) v = null ;
|
531
|
-
|
531
|
+
|
532
532
|
this._transformedBindingValue = v;
|
533
533
|
},
|
534
|
-
|
534
|
+
|
535
535
|
_connectQueue: SC.CoreSet.create(),
|
536
536
|
_alternateConnectQueue: SC.CoreSet.create(),
|
537
537
|
_changeQueue: SC.CoreSet.create(),
|
@@ -540,13 +540,13 @@ SC.Binding = {
|
|
540
540
|
|
541
541
|
/**
|
542
542
|
Call this method on SC.Binding to flush all bindings with changed pending.
|
543
|
-
|
543
|
+
|
544
544
|
@returns {Boolean} YES if changes were flushed.
|
545
545
|
*/
|
546
546
|
flushPendingChanges: function() {
|
547
|
-
|
547
|
+
|
548
548
|
// don't allow flushing more than one at a time
|
549
|
-
if (this._isFlushing) return NO;
|
549
|
+
if (this._isFlushing) return NO;
|
550
550
|
this._isFlushing = YES ;
|
551
551
|
SC.Observers.suspendPropertyObserving();
|
552
552
|
|
@@ -559,38 +559,38 @@ SC.Binding = {
|
|
559
559
|
this._alternateConnectQueue = queue ;
|
560
560
|
while(binding = queue.pop()) binding._connect() ;
|
561
561
|
}
|
562
|
-
|
562
|
+
|
563
563
|
// loop through the changed queue...
|
564
564
|
while ((queue = this._changeQueue).length > 0) {
|
565
565
|
if (log) console.log("Begin: Trigger changed bindings") ;
|
566
|
-
|
566
|
+
|
567
567
|
didFlush = YES ;
|
568
|
-
|
568
|
+
|
569
569
|
// first, swap the change queues. This way any binding changes that
|
570
570
|
// happen while we flush the current queue can be queued up.
|
571
571
|
this._changeQueue = this._alternateChangeQueue ;
|
572
572
|
this._alternateChangeQueue = queue ;
|
573
|
-
|
574
|
-
// next, apply any bindings in the current queue. This may cause
|
575
|
-
// additional bindings to trigger, which will end up in the new active
|
573
|
+
|
574
|
+
// next, apply any bindings in the current queue. This may cause
|
575
|
+
// additional bindings to trigger, which will end up in the new active
|
576
576
|
// queue.
|
577
577
|
while(binding = queue.pop()) binding.applyBindingValue() ;
|
578
|
-
|
578
|
+
|
579
579
|
// now loop back and see if there are additional changes pending in the
|
580
|
-
// active queue. Repeat this until all bindings that need to trigger
|
580
|
+
// active queue. Repeat this until all bindings that need to trigger
|
581
581
|
// have triggered.
|
582
582
|
if (log) console.log("End: Trigger changed bindings") ;
|
583
583
|
}
|
584
|
-
|
584
|
+
|
585
585
|
// clean up
|
586
586
|
this._isFlushing = NO ;
|
587
587
|
SC.Observers.resumePropertyObserving();
|
588
588
|
|
589
589
|
return didFlush ;
|
590
590
|
},
|
591
|
-
|
591
|
+
|
592
592
|
/**
|
593
|
-
This method is called at the end of the Run Loop to relay the changed
|
593
|
+
This method is called at the end of the Run Loop to relay the changed
|
594
594
|
binding value from one side to the other.
|
595
595
|
*/
|
596
596
|
applyBindingValue: function() {
|
@@ -599,13 +599,13 @@ SC.Binding = {
|
|
599
599
|
// compute the binding targets if needed.
|
600
600
|
this._computeBindingTargets() ;
|
601
601
|
this._computeBindingValue();
|
602
|
-
|
602
|
+
|
603
603
|
var v = this._bindingValue,
|
604
604
|
tv = this._transformedBindingValue,
|
605
605
|
bench = SC.BENCHMARK_BINDING_NOTIFICATIONS,
|
606
|
-
log = SC.LOG_BINDINGS ;
|
607
|
-
|
608
|
-
// the from property value will always be the binding value, update if
|
606
|
+
log = SC.LOG_BINDINGS ;
|
607
|
+
|
608
|
+
// the from property value will always be the binding value, update if
|
609
609
|
// needed.
|
610
610
|
if (!this._oneWay && this._fromTarget) {
|
611
611
|
if (log) console.log("%@: %@ -> %@".fmt(this, v, tv)) ;
|
@@ -613,7 +613,7 @@ SC.Binding = {
|
|
613
613
|
this._fromTarget.setPathIfChanged(this._fromPropertyKey, v) ;
|
614
614
|
if (bench) SC.Benchmark.end(this.toString() + "->") ;
|
615
615
|
}
|
616
|
-
|
616
|
+
|
617
617
|
// update the to value with the transformed value if needed.
|
618
618
|
if (this._toTarget) {
|
619
619
|
if (log) console.log("%@: %@ <- %@".fmt(this, v, tv)) ;
|
@@ -624,23 +624,23 @@ SC.Binding = {
|
|
624
624
|
},
|
625
625
|
|
626
626
|
/**
|
627
|
-
Calling this method on a binding will cause it to check the value of the
|
628
|
-
from side of the binding matches the current expected value of the
|
629
|
-
binding. If not, it will relay the change as if the from side's value has
|
627
|
+
Calling this method on a binding will cause it to check the value of the
|
628
|
+
from side of the binding matches the current expected value of the
|
629
|
+
binding. If not, it will relay the change as if the from side's value has
|
630
630
|
just changed.
|
631
|
-
|
632
|
-
This method is useful when you are dynamically connecting bindings to a
|
631
|
+
|
632
|
+
This method is useful when you are dynamically connecting bindings to a
|
633
633
|
network of objects that may have already been initialized.
|
634
634
|
*/
|
635
635
|
sync: function() {
|
636
636
|
|
637
637
|
// do nothing if not connected
|
638
638
|
if (!this.isConnected) return this;
|
639
|
-
|
639
|
+
|
640
640
|
// connection is pending, just note that we should sync also
|
641
641
|
if (this._connectionPending) {
|
642
642
|
this._syncOnConnect = YES ;
|
643
|
-
|
643
|
+
|
644
644
|
// we are connected, go ahead and sync
|
645
645
|
} else {
|
646
646
|
this._computeBindingTargets() ;
|
@@ -651,44 +651,44 @@ SC.Binding = {
|
|
651
651
|
// get the new value
|
652
652
|
var v = target.getPath(key) ;
|
653
653
|
|
654
|
-
// if the new value is different from the current binding value, then
|
654
|
+
// if the new value is different from the current binding value, then
|
655
655
|
// schedule to register an update.
|
656
656
|
if (v !== this._bindingValue || key === '[]') {
|
657
657
|
this._setBindingValue(target, key) ;
|
658
658
|
this._changePending = YES ;
|
659
|
-
SC.Binding._changeQueue.add(this) ; // save for later.
|
659
|
+
SC.Binding._changeQueue.add(this) ; // save for later.
|
660
660
|
}
|
661
661
|
}
|
662
|
-
|
662
|
+
|
663
663
|
return this ;
|
664
664
|
},
|
665
|
-
|
665
|
+
|
666
666
|
// set if you call sync() when the binding connection is still pending.
|
667
667
|
_syncOnConnect: NO,
|
668
|
-
|
668
|
+
|
669
669
|
_computeBindingTargets: function() {
|
670
670
|
if (!this._fromTarget) {
|
671
671
|
|
672
672
|
var path, root, tuple ;
|
673
|
-
|
674
|
-
// if the fromPropertyPath begins with a . or * then we may use the
|
675
|
-
// toRoot as the root object. Similar code exists in connect() so if
|
673
|
+
|
674
|
+
// if the fromPropertyPath begins with a . or * then we may use the
|
675
|
+
// toRoot as the root object. Similar code exists in connect() so if
|
676
676
|
// you make a change to one be sure to update the other.
|
677
677
|
path = this._fromPropertyPath; root = this._fromRoot ;
|
678
678
|
if (typeof path === "string") {
|
679
|
-
|
679
|
+
|
680
680
|
// static path beginning with the toRoot
|
681
681
|
if (path.indexOf('.') === 0) {
|
682
682
|
path = path.slice(1) ; // remove the .
|
683
683
|
if (!root) root = this._toRoot; // use the toRoot optionally
|
684
|
-
|
684
|
+
|
685
685
|
// chained path beginning with toRoot. Setup a tuple
|
686
686
|
} else if (path.indexOf('*') === 0) {
|
687
687
|
path = [root || this._toRoot, path.slice(1)];
|
688
688
|
root = null ;
|
689
689
|
}
|
690
690
|
}
|
691
|
-
|
691
|
+
|
692
692
|
tuple = SC.tupleForPropertyPath(path, root) ;
|
693
693
|
if (tuple) {
|
694
694
|
this._fromTarget = tuple[0]; this._fromPropertyKey = tuple[1] ;
|
@@ -703,86 +703,86 @@ SC.Binding = {
|
|
703
703
|
}
|
704
704
|
}
|
705
705
|
},
|
706
|
-
|
706
|
+
|
707
707
|
/**
|
708
708
|
Configures the binding as one way. A one-way binding will relay changes
|
709
709
|
on the "from" side to the "to" side, but not the other way around. This
|
710
|
-
means that if you change the "to" side directly, the "from" side may have
|
710
|
+
means that if you change the "to" side directly, the "from" side may have
|
711
711
|
a different value.
|
712
|
-
|
712
|
+
|
713
713
|
@param fromPath {String} optional from path to connect.
|
714
714
|
@param aFlag {Boolean} Optionally pass NO to set the binding back to two-way
|
715
715
|
@returns {SC.Binding} this
|
716
716
|
*/
|
717
717
|
oneWay: function(fromPath, aFlag) {
|
718
|
-
|
718
|
+
|
719
719
|
// If fromPath is a bool but aFlag is undefined, swap.
|
720
720
|
if ((aFlag === undefined) && (SC.typeOf(fromPath) === SC.T_BOOL)) {
|
721
721
|
aFlag = fromPath; fromPath = null ;
|
722
722
|
}
|
723
|
-
|
723
|
+
|
724
724
|
// beget if needed.
|
725
725
|
var binding = this.from(fromPath) ;
|
726
726
|
if (binding === SC.Binding) binding = binding.beget() ;
|
727
727
|
binding._oneWay = (aFlag === undefined) ? YES : aFlag ;
|
728
728
|
return binding ;
|
729
729
|
},
|
730
|
-
|
730
|
+
|
731
731
|
/**
|
732
732
|
Adds the specified transform function to the array of transform functions.
|
733
|
-
|
733
|
+
|
734
734
|
The function you pass must have the following signature:
|
735
|
-
|
735
|
+
|
736
736
|
{{{
|
737
737
|
function(value) {} ;
|
738
738
|
}}}
|
739
|
-
|
740
|
-
It must return either the transformed value or an error object.
|
741
|
-
|
739
|
+
|
740
|
+
It must return either the transformed value or an error object.
|
741
|
+
|
742
742
|
Transform functions are chained, so they are called in order. If you are
|
743
743
|
extending a binding and want to reset the transforms, you can call
|
744
744
|
resetTransform() first.
|
745
|
-
|
745
|
+
|
746
746
|
@param transformFunc {Function} the transform function.
|
747
747
|
@returns {SC.Binding} this
|
748
748
|
*/
|
749
749
|
transform: function(transformFunc) {
|
750
750
|
var binding = (this === SC.Binding) ? this.beget() : this ;
|
751
751
|
var t = binding._transforms ;
|
752
|
-
|
752
|
+
|
753
753
|
// clone the transform array if this comes from the parent
|
754
754
|
if (t && (t === binding.parentBinding._transform)) {
|
755
755
|
t = binding._transforms = t.slice() ;
|
756
756
|
}
|
757
|
-
|
757
|
+
|
758
758
|
// create the transform array if needed.
|
759
759
|
if (!t) t = binding._transforms = [] ;
|
760
|
-
|
760
|
+
|
761
761
|
// add the transform function
|
762
762
|
t.push(transformFunc) ;
|
763
763
|
return binding;
|
764
764
|
},
|
765
|
-
|
765
|
+
|
766
766
|
/**
|
767
|
-
Resets the transforms for the binding. After calling this method the
|
767
|
+
Resets the transforms for the binding. After calling this method the
|
768
768
|
binding will no longer transform values. You can then add new transforms
|
769
769
|
as needed.
|
770
|
-
|
770
|
+
|
771
771
|
@returns {SC.Binding} this
|
772
772
|
*/
|
773
773
|
resetTransforms: function() {
|
774
774
|
var binding = (this === SC.Binding) ? this.beget() : this ;
|
775
775
|
binding._transforms = null ; return binding ;
|
776
776
|
},
|
777
|
-
|
777
|
+
|
778
778
|
/**
|
779
779
|
Specifies that the binding should not return error objects. If the value
|
780
780
|
of a binding is an Error object, it will be transformed to a null value
|
781
781
|
instead.
|
782
|
-
|
782
|
+
|
783
783
|
Note that this is not a transform function since it will be called at the
|
784
784
|
end of the transform chain.
|
785
|
-
|
785
|
+
|
786
786
|
@param fromPath {String} optional from path to connect.
|
787
787
|
@param aFlag {Boolean} optionally pass NO to allow error objects again.
|
788
788
|
@returns {SC.Binding} this
|
@@ -792,31 +792,31 @@ SC.Binding = {
|
|
792
792
|
if ((aFlag === undefined) && (SC.typeOf(fromPath) === SC.T_BOOL)) {
|
793
793
|
aFlag = fromPath; fromPath = null ;
|
794
794
|
}
|
795
|
-
|
795
|
+
|
796
796
|
// beget if needed.
|
797
797
|
var binding = this.from(fromPath) ;
|
798
798
|
if (binding === SC.Binding) binding = binding.beget() ;
|
799
799
|
binding._noError = (aFlag === undefined) ? YES : aFlag ;
|
800
800
|
return binding ;
|
801
801
|
},
|
802
|
-
|
802
|
+
|
803
803
|
/**
|
804
804
|
Adds a transform to the chain that will allow only single values to pass.
|
805
805
|
This will allow single values, nulls, and error values to pass through. If
|
806
806
|
you pass an array, it will be mapped as so:
|
807
|
-
|
807
|
+
|
808
808
|
{{{
|
809
809
|
[] => null
|
810
810
|
[a] => a
|
811
811
|
[a,b,c] => Multiple Placeholder
|
812
812
|
}}}
|
813
|
-
|
814
|
-
You can pass in an optional multiple placeholder or it will use the
|
813
|
+
|
814
|
+
You can pass in an optional multiple placeholder or it will use the
|
815
815
|
default.
|
816
|
-
|
816
|
+
|
817
817
|
Note that this transform will only happen on forwarded valued. Reverse
|
818
818
|
values are send unchanged.
|
819
|
-
|
819
|
+
|
820
820
|
@param fromPath {String} from path or null
|
821
821
|
@param placeholder {Object} optional placeholder value.
|
822
822
|
@returns {SC.Binding} this
|
@@ -833,11 +833,11 @@ SC.Binding = {
|
|
833
833
|
return value ;
|
834
834
|
}) ;
|
835
835
|
},
|
836
|
-
|
837
|
-
/**
|
838
|
-
Adds a transform that will return the placeholder value if the value is
|
836
|
+
|
837
|
+
/**
|
838
|
+
Adds a transform that will return the placeholder value if the value is
|
839
839
|
null, undefined, an empty array or an empty string. See also notNull().
|
840
|
-
|
840
|
+
|
841
841
|
@param fromPath {String} from path or null
|
842
842
|
@param placeholder {Object} optional placeholder.
|
843
843
|
@returns {SC.Binding} this
|
@@ -851,11 +851,11 @@ SC.Binding = {
|
|
851
851
|
return value ;
|
852
852
|
}) ;
|
853
853
|
},
|
854
|
-
|
854
|
+
|
855
855
|
/**
|
856
856
|
Adds a transform that will return the placeholder value if the value is
|
857
857
|
null. Otherwise it will passthrough untouched. See also notEmpty().
|
858
|
-
|
858
|
+
|
859
859
|
@param fromPath {String} from path or null
|
860
860
|
@param placeholder {Object} optional placeholder;
|
861
861
|
@returns {SC.Binding} this
|
@@ -868,8 +868,8 @@ SC.Binding = {
|
|
868
868
|
}) ;
|
869
869
|
},
|
870
870
|
|
871
|
-
/**
|
872
|
-
Adds a transform that will convert the passed value to an array. If
|
871
|
+
/**
|
872
|
+
Adds a transform that will convert the passed value to an array. If
|
873
873
|
the value is null or undefined, it will be converted to an empty array.
|
874
874
|
|
875
875
|
@param fromPath {String} optional from path
|
@@ -881,12 +881,12 @@ SC.Binding = {
|
|
881
881
|
return value ;
|
882
882
|
}) ;
|
883
883
|
},
|
884
|
-
|
884
|
+
|
885
885
|
/**
|
886
886
|
Adds a transform to convert the value to a bool value. If the value is
|
887
887
|
an array it will return YES if array is not empty. If the value is a string
|
888
888
|
it will return YES if the string is not empty.
|
889
|
-
|
889
|
+
|
890
890
|
@param fromPath {String} optional from path
|
891
891
|
@returns {SC.Binding} this
|
892
892
|
*/
|
@@ -902,12 +902,12 @@ SC.Binding = {
|
|
902
902
|
Adds a transform that forwards the logical 'AND' of values at 'pathA' and
|
903
903
|
'pathB' whenever either source changes. Note that the transform acts strictly
|
904
904
|
as a one-way binding, working only in the direction
|
905
|
-
|
905
|
+
|
906
906
|
'pathA' AND 'pathB' --> value (value returned is the result of ('pathA' && 'pathB'))
|
907
907
|
|
908
908
|
Usage example where a delete button's 'isEnabled' value is determined by whether
|
909
909
|
something is selected in a list and whether the current user is allowed to delete:
|
910
|
-
|
910
|
+
|
911
911
|
deleteButton: SC.ButtonView.design({
|
912
912
|
isEnabledBinding: SC.Binding.and('MyApp.itemsController.hasSelection', 'MyApp.userController.canDelete')
|
913
913
|
})
|
@@ -938,24 +938,24 @@ SC.Binding = {
|
|
938
938
|
|
939
939
|
*/
|
940
940
|
or: function(pathA, pathB) {
|
941
|
-
|
941
|
+
|
942
942
|
// create an object to the logical computation
|
943
943
|
var gate = SC.Object.create({
|
944
944
|
valueABinding: pathA,
|
945
945
|
valueBBinding: pathB,
|
946
|
-
|
946
|
+
|
947
947
|
or: function() {
|
948
948
|
return (this.get('valueA') || this.get('valueB'));
|
949
949
|
}.property('valueA', 'valueB').cacheable()
|
950
950
|
});
|
951
|
-
|
951
|
+
|
952
952
|
return this.from('or', gate).oneWay();
|
953
953
|
},
|
954
|
-
|
954
|
+
|
955
955
|
/**
|
956
956
|
Adds a transform to convert the value to the inverse of a bool value. This
|
957
957
|
uses the same transform as bool() but inverts it.
|
958
|
-
|
958
|
+
|
959
959
|
@param fromPath {String} optional from path
|
960
960
|
@returns {SC.Binding} this
|
961
961
|
*/
|
@@ -966,32 +966,32 @@ SC.Binding = {
|
|
966
966
|
return !((t == SC.T_ARRAY) ? (v.length > 0) : (v === '') ? NO : !!v) ;
|
967
967
|
}) ;
|
968
968
|
},
|
969
|
-
|
969
|
+
|
970
970
|
/**
|
971
971
|
Adds a transform that will return YES if the value is null, NO otherwise.
|
972
|
-
|
972
|
+
|
973
973
|
@returns {SC.Binding} this
|
974
974
|
*/
|
975
975
|
isNull: function(fromPath) {
|
976
|
-
return this.from(fromPath).transform(function(v) {
|
976
|
+
return this.from(fromPath).transform(function(v) {
|
977
977
|
var t = SC.typeOf(v) ;
|
978
978
|
return (t === SC.T_ERROR) ? v : SC.none(v) ;
|
979
979
|
});
|
980
980
|
},
|
981
|
-
|
981
|
+
|
982
982
|
toString: function() {
|
983
983
|
var from = this._fromRoot ? "<%@>:%@".fmt(this._fromRoot,this._fromPropertyPath) : this._fromPropertyPath;
|
984
984
|
|
985
985
|
var to = this._toRoot ? "<%@>:%@".fmt(this._toRoot,this._toPropertyPath) : this._toPropertyPath;
|
986
|
-
|
986
|
+
|
987
987
|
var oneWay = this._oneWay ? '[oneWay]' : '';
|
988
988
|
return "SC.Binding%@(%@ -> %@)%@".fmt(SC.guidFor(this), from, to, oneWay);
|
989
|
-
}
|
989
|
+
}
|
990
990
|
} ;
|
991
991
|
|
992
|
-
/**
|
992
|
+
/**
|
993
993
|
Shorthand method to define a binding. This is the same as calling:
|
994
|
-
|
994
|
+
|
995
995
|
{{{
|
996
996
|
SC.binding(path) = SC.Binding.from(path)
|
997
997
|
}}}
|