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
@@ -8,18 +8,18 @@
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
Standard Error that should be raised when you try to modify a frozen object.
|
11
|
-
|
11
|
+
|
12
12
|
@property {Error}
|
13
13
|
*/
|
14
14
|
SC.FROZEN_ERROR = new Error("Cannot modify a frozen object");
|
15
15
|
|
16
|
-
/**
|
16
|
+
/**
|
17
17
|
@namespace
|
18
|
-
|
18
|
+
|
19
19
|
The SC.Freezable mixin implements some basic methods for marking an object
|
20
|
-
as frozen. Once an object is frozen it should be read only. No changes
|
20
|
+
as frozen. Once an object is frozen it should be read only. No changes
|
21
21
|
may be made the internal state of the object.
|
22
|
-
|
22
|
+
|
23
23
|
h2. Enforcement
|
24
24
|
|
25
25
|
To fully support freezing in your subclass, you must include this mixin and
|
@@ -31,21 +31,21 @@ SC.FROZEN_ERROR = new Error("Cannot modify a frozen object");
|
|
31
31
|
object objects, that is not the case today. Even if an object is freezable,
|
32
32
|
it is still technically possible to modify the object, even though it could
|
33
33
|
break other parts of your application that do not expect a frozen object to
|
34
|
-
change. It is, therefore, very important that you always respect the
|
34
|
+
change. It is, therefore, very important that you always respect the
|
35
35
|
isFrozen property on all freezable objects.
|
36
|
-
|
36
|
+
|
37
37
|
h2. Example
|
38
38
|
|
39
|
-
The example below shows a simple object that implement the SC.Freezable
|
40
|
-
protocol.
|
41
|
-
|
39
|
+
The example below shows a simple object that implement the SC.Freezable
|
40
|
+
protocol.
|
41
|
+
|
42
42
|
{{{
|
43
43
|
Contact = SC.Object.extend(SC.Freezable, {
|
44
|
-
|
44
|
+
|
45
45
|
firstName: null,
|
46
|
-
|
46
|
+
|
47
47
|
lastName: null,
|
48
|
-
|
48
|
+
|
49
49
|
// swaps the names
|
50
50
|
swapNames: function() {
|
51
51
|
if (this.get('isFrozen')) throw SC.FROZEN_ERROR;
|
@@ -54,55 +54,55 @@ SC.FROZEN_ERROR = new Error("Cannot modify a frozen object");
|
|
54
54
|
this.set('lastName', tmp);
|
55
55
|
return this;
|
56
56
|
}
|
57
|
-
|
57
|
+
|
58
58
|
});
|
59
|
-
|
59
|
+
|
60
60
|
c = Context.create({ firstName: "John", lastName: "Doe" });
|
61
61
|
c.swapNames(); => returns c
|
62
62
|
c.freeze();
|
63
63
|
c.swapNames(); => EXCEPTION
|
64
|
-
|
64
|
+
|
65
65
|
}}}
|
66
|
-
|
66
|
+
|
67
67
|
h2. Copying
|
68
|
-
|
68
|
+
|
69
69
|
Usually the SC.Freezable protocol is implemented in cooperation with the
|
70
70
|
SC.Copyable protocol, which defines a frozenCopy() method that will return
|
71
71
|
a frozen object, if the object implements this method as well.
|
72
|
-
|
72
|
+
|
73
73
|
*/
|
74
74
|
SC.Freezable = {
|
75
|
-
|
75
|
+
|
76
76
|
/**
|
77
77
|
Walk like a duck.
|
78
|
-
|
78
|
+
|
79
79
|
@property {Boolean}
|
80
80
|
*/
|
81
81
|
isFreezable: YES,
|
82
|
-
|
82
|
+
|
83
83
|
/**
|
84
84
|
Set to YES when the object is frozen. Use this property to detect whether
|
85
85
|
your object is frozen or not.
|
86
|
-
|
86
|
+
|
87
87
|
@property {Boolean}
|
88
88
|
*/
|
89
89
|
isFrozen: NO,
|
90
|
-
|
90
|
+
|
91
91
|
/**
|
92
92
|
Freezes the object. Once this method has been called the object should
|
93
93
|
no longer allow any properties to be edited.
|
94
|
-
|
94
|
+
|
95
95
|
@returns {Object} reciever
|
96
96
|
*/
|
97
97
|
freeze: function() {
|
98
98
|
// NOTE: Once someone actually implements Object.freeze() in the browser,
|
99
99
|
// add a call to that here also.
|
100
|
-
|
100
|
+
|
101
101
|
if (this.set) this.set('isFrozen', YES);
|
102
102
|
else this.isFrozen = YES;
|
103
103
|
return this;
|
104
104
|
}
|
105
|
-
|
105
|
+
|
106
106
|
};
|
107
107
|
|
108
108
|
|
@@ -10,38 +10,38 @@ require('private/observer_set') ;
|
|
10
10
|
/*globals logChange */
|
11
11
|
|
12
12
|
/**
|
13
|
-
Set to YES to have all observing activity logged to the console. This
|
13
|
+
Set to YES to have all observing activity logged to the console. This
|
14
14
|
should be used for debugging only.
|
15
|
-
|
15
|
+
|
16
16
|
@property {Boolean}
|
17
17
|
*/
|
18
18
|
SC.LOG_OBSERVERS = NO ;
|
19
19
|
|
20
20
|
/**
|
21
|
-
@namespace
|
22
|
-
|
23
|
-
Key-Value-Observing (KVO) simply allows one object to observe changes to a
|
24
|
-
property on another object. It is one of the fundamental ways that models,
|
25
|
-
controllers and views communicate with each other in a SproutCore
|
26
|
-
application. Any object that has this module applied to it can be used in
|
21
|
+
@namespace
|
22
|
+
|
23
|
+
Key-Value-Observing (KVO) simply allows one object to observe changes to a
|
24
|
+
property on another object. It is one of the fundamental ways that models,
|
25
|
+
controllers and views communicate with each other in a SproutCore
|
26
|
+
application. Any object that has this module applied to it can be used in
|
27
27
|
KVO-operations.
|
28
|
-
|
28
|
+
|
29
29
|
This module is applied automatically to all objects that inherit from
|
30
|
-
SC.Object, which includes most objects bundled with the SproutCore
|
30
|
+
SC.Object, which includes most objects bundled with the SproutCore
|
31
31
|
framework. You will not generally apply this module to classes yourself,
|
32
32
|
but you will use the features provided by this module frequently, so it is
|
33
33
|
important to understand how to use it.
|
34
|
-
|
34
|
+
|
35
35
|
h2. Enabling Key Value Observing
|
36
36
|
|
37
|
-
With KVO, you can write functions that will be called automatically whenever
|
37
|
+
With KVO, you can write functions that will be called automatically whenever
|
38
38
|
a property on a particular object changes. You can use this feature to
|
39
|
-
reduce the amount of "glue code" that you often write to tie the various
|
39
|
+
reduce the amount of "glue code" that you often write to tie the various
|
40
40
|
parts of your application together.
|
41
|
-
|
42
|
-
To use KVO, just use the KVO-aware methods get() and set() to access
|
41
|
+
|
42
|
+
To use KVO, just use the KVO-aware methods get() and set() to access
|
43
43
|
properties instead of accessing properties directly. Instead of writing:
|
44
|
-
|
44
|
+
|
45
45
|
{{{
|
46
46
|
var aName = contact.firstName ;
|
47
47
|
contact.firstName = 'Charles' ;
|
@@ -53,17 +53,17 @@ SC.LOG_OBSERVERS = NO ;
|
|
53
53
|
var aName = contact.get('firstName') ;
|
54
54
|
contact.set('firstName', 'Charles') ;
|
55
55
|
}}}
|
56
|
-
|
57
|
-
get() and set() work just like the normal "dot operators" provided by
|
56
|
+
|
57
|
+
get() and set() work just like the normal "dot operators" provided by
|
58
58
|
JavaScript but they provide you with much more power, including not only
|
59
59
|
observing but computed properties as well.
|
60
60
|
|
61
61
|
h2. Observing Property Changes
|
62
62
|
|
63
|
-
You typically observe property changes simply by adding the observes()
|
63
|
+
You typically observe property changes simply by adding the observes()
|
64
64
|
call to the end of your method declarations in classes that you write. For
|
65
65
|
example:
|
66
|
-
|
66
|
+
|
67
67
|
{{{
|
68
68
|
SC.Object.create({
|
69
69
|
valueObserver: function() {
|
@@ -71,55 +71,55 @@ SC.LOG_OBSERVERS = NO ;
|
|
71
71
|
}.observes('value')
|
72
72
|
}) ;
|
73
73
|
}}}
|
74
|
-
|
74
|
+
|
75
75
|
Although this is the most common way to add an observer, this capability is
|
76
76
|
actually built into the SC.Object class on top of two methods defined in
|
77
77
|
this mixin called addObserver() and removeObserver(). You can use these two
|
78
|
-
methods to add and remove observers yourself if you need to do so at run
|
79
|
-
time.
|
80
|
-
|
78
|
+
methods to add and remove observers yourself if you need to do so at run
|
79
|
+
time.
|
80
|
+
|
81
81
|
To add an observer for a property, just call:
|
82
|
-
|
82
|
+
|
83
83
|
{{{
|
84
84
|
object.addObserver('propertyKey', targetObject, targetAction) ;
|
85
85
|
}}}
|
86
|
-
|
86
|
+
|
87
87
|
This will call the 'targetAction' method on the targetObject to be called
|
88
88
|
whenever the value of the propertyKey changes.
|
89
|
-
|
89
|
+
|
90
90
|
h2. Observer Parameters
|
91
|
-
|
92
|
-
An observer function typically does not need to accept any parameters,
|
93
|
-
however you can accept certain arguments when writing generic observers.
|
91
|
+
|
92
|
+
An observer function typically does not need to accept any parameters,
|
93
|
+
however you can accept certain arguments when writing generic observers.
|
94
94
|
An observer function can have the following arguments:
|
95
|
-
|
95
|
+
|
96
96
|
{{{
|
97
97
|
propertyObserver(target, key, value, revision) ;
|
98
98
|
}}}
|
99
|
-
|
99
|
+
|
100
100
|
- *target* - This is the object whose value changed. Usually this.
|
101
101
|
- *key* - The key of the value that changed
|
102
102
|
- *value* - this property is no longer used. It will always be null
|
103
103
|
- *revision* - this is the revision of the target object
|
104
|
-
|
104
|
+
|
105
105
|
h2. Implementing Manual Change Notifications
|
106
|
-
|
107
|
-
Sometimes you may want to control the rate at which notifications for
|
108
|
-
a property are delivered, for example by checking first to make sure
|
106
|
+
|
107
|
+
Sometimes you may want to control the rate at which notifications for
|
108
|
+
a property are delivered, for example by checking first to make sure
|
109
109
|
that the value has changed.
|
110
|
-
|
111
|
-
To do this, you need to implement a computed property for the property
|
110
|
+
|
111
|
+
To do this, you need to implement a computed property for the property
|
112
112
|
you want to change and override automaticallyNotifiesObserversFor().
|
113
|
-
|
113
|
+
|
114
114
|
The example below will only notify if the "balance" property value actually
|
115
115
|
changes:
|
116
|
-
|
116
|
+
|
117
117
|
{{{
|
118
|
-
|
118
|
+
|
119
119
|
automaticallyNotifiesObserversFor: function(key) {
|
120
120
|
return (key === 'balance') ? NO : sc_super() ;
|
121
121
|
},
|
122
|
-
|
122
|
+
|
123
123
|
balance: function(key, value) {
|
124
124
|
var balance = this._balance ;
|
125
125
|
if ((value !== undefined) && (balance !== value)) {
|
@@ -129,84 +129,84 @@ SC.LOG_OBSERVERS = NO ;
|
|
129
129
|
}
|
130
130
|
return balance ;
|
131
131
|
}
|
132
|
-
|
132
|
+
|
133
133
|
}}}
|
134
|
-
|
134
|
+
|
135
135
|
h1. Implementation Details
|
136
|
-
|
136
|
+
|
137
137
|
Internally, SproutCore keeps track of observable information by adding a
|
138
138
|
number of properties to the object adopting the observable. All of these
|
139
139
|
properties begin with "_kvo_" to separate them from the rest of your object.
|
140
|
-
|
140
|
+
|
141
141
|
@static
|
142
142
|
@since SproutCore 1.0
|
143
143
|
*/
|
144
144
|
SC.Observable = {
|
145
145
|
|
146
|
-
/**
|
147
|
-
Walk like that ol' duck
|
148
|
-
|
146
|
+
/**
|
147
|
+
Walk like that ol' duck
|
148
|
+
|
149
149
|
@property {Boolean}
|
150
150
|
*/
|
151
151
|
isObservable: YES,
|
152
|
-
|
152
|
+
|
153
153
|
/**
|
154
154
|
Determines whether observers should be automatically notified of changes
|
155
155
|
to a key.
|
156
|
-
|
156
|
+
|
157
157
|
If you are manually implementing change notifications for a property, you
|
158
158
|
can override this method to return NO for properties you do not want the
|
159
159
|
observing system to automatically notify for.
|
160
|
-
|
160
|
+
|
161
161
|
The default implementation always returns YES.
|
162
|
-
|
162
|
+
|
163
163
|
@param key {String} the key that is changing
|
164
164
|
@returns {Boolean} YES if automatic notification should occur.
|
165
165
|
*/
|
166
|
-
automaticallyNotifiesObserversFor: function(key) {
|
166
|
+
automaticallyNotifiesObserversFor: function(key) {
|
167
167
|
return YES;
|
168
168
|
},
|
169
169
|
|
170
170
|
// ..........................................
|
171
171
|
// PROPERTIES
|
172
|
-
//
|
172
|
+
//
|
173
173
|
// Use these methods to get/set properties. This will handle observing
|
174
|
-
// notifications as well as allowing you to define functions that can be
|
174
|
+
// notifications as well as allowing you to define functions that can be
|
175
175
|
// used as properties.
|
176
176
|
|
177
|
-
/**
|
177
|
+
/**
|
178
178
|
Retrieves the value of key from the object.
|
179
|
-
|
179
|
+
|
180
180
|
This method is generally very similar to using object[key] or object.key,
|
181
181
|
however it supports both computed properties and the unknownProperty
|
182
182
|
handler.
|
183
|
-
|
183
|
+
|
184
184
|
*Computed Properties*
|
185
|
-
|
185
|
+
|
186
186
|
Computed properties are methods defined with the property() modifier
|
187
187
|
declared at the end, such as:
|
188
|
-
|
188
|
+
|
189
189
|
{{{
|
190
190
|
fullName: function() {
|
191
191
|
return this.getEach('firstName', 'lastName').compact().join(' ');
|
192
192
|
}.property('firstName', 'lastName')
|
193
193
|
}}}
|
194
|
-
|
194
|
+
|
195
195
|
When you call get() on a computed property, the property function will be
|
196
196
|
called and the return value will be returned instead of the function
|
197
197
|
itself.
|
198
|
-
|
198
|
+
|
199
199
|
*Unknown Properties*
|
200
|
-
|
200
|
+
|
201
201
|
Likewise, if you try to call get() on a property whose values is
|
202
202
|
undefined, the unknownProperty() method will be called on the object.
|
203
203
|
If this method reutrns any value other than undefined, it will be returned
|
204
|
-
instead. This allows you to implement "virtual" properties that are
|
204
|
+
instead. This allows you to implement "virtual" properties that are
|
205
205
|
not defined upfront.
|
206
|
-
|
206
|
+
|
207
207
|
@param key {String} the property to retrieve
|
208
208
|
@returns {Object} the property value or undefined.
|
209
|
-
|
209
|
+
|
210
210
|
*/
|
211
211
|
get: function(key) {
|
212
212
|
var ret = this[key], cache ;
|
@@ -221,59 +221,70 @@ SC.Observable = {
|
|
221
221
|
} else return ret ;
|
222
222
|
},
|
223
223
|
|
224
|
-
/**
|
224
|
+
/**
|
225
225
|
Sets the key equal to value.
|
226
|
-
|
226
|
+
|
227
227
|
This method is generally very similar to calling object[key] = value or
|
228
|
-
object.key = value, except that it provides support for computed
|
228
|
+
object.key = value, except that it provides support for computed
|
229
229
|
properties, the unknownProperty() method and property observers.
|
230
|
-
|
230
|
+
|
231
231
|
*Computed Properties*
|
232
|
-
|
232
|
+
|
233
233
|
If you try to set a value on a key that has a computed property handler
|
234
234
|
defined (see the get() method for an example), then set() will call
|
235
|
-
that method, passing both the value and key instead of simply changing
|
236
|
-
the value itself. This is useful for those times when you need to
|
235
|
+
that method, passing both the value and key instead of simply changing
|
236
|
+
the value itself. This is useful for those times when you need to
|
237
237
|
implement a property that is composed of one or more member
|
238
238
|
properties.
|
239
|
-
|
239
|
+
|
240
240
|
*Unknown Properties*
|
241
|
-
|
242
|
-
If you try to set a value on a key that is undefined in the target
|
241
|
+
|
242
|
+
If you try to set a value on a key that is undefined in the target
|
243
243
|
object, then the unknownProperty() handler will be called instead. This
|
244
244
|
gives you an opportunity to implement complex "virtual" properties that
|
245
|
-
are not predefined on the obejct. If unknownProperty() returns
|
245
|
+
are not predefined on the obejct. If unknownProperty() returns
|
246
246
|
undefined, then set() will simply set the value on the object.
|
247
|
-
|
247
|
+
|
248
248
|
*Property Observers*
|
249
|
-
|
250
|
-
In addition to changing the property, set() will also register a
|
251
|
-
property change with the object. Unless you have placed this call
|
249
|
+
|
250
|
+
In addition to changing the property, set() will also register a
|
251
|
+
property change with the object. Unless you have placed this call
|
252
252
|
inside of a beginPropertyChanges() and endPropertyChanges(), any "local"
|
253
253
|
observers (i.e. observer methods declared on the same object), will be
|
254
|
-
called immediately. Any "remote" observers (i.e. observer methods
|
254
|
+
called immediately. Any "remote" observers (i.e. observer methods
|
255
255
|
declared on another object) will be placed in a queue and called at a
|
256
256
|
later time in a coelesced manner.
|
257
|
-
|
257
|
+
|
258
258
|
*Chaining*
|
259
|
-
|
259
|
+
|
260
260
|
In addition to property changes, set() returns the value of the object
|
261
261
|
itself so you can do chaining like this:
|
262
|
-
|
262
|
+
|
263
263
|
{{{
|
264
264
|
record.set('firstName', 'Charles').set('lastName', 'Jolley');
|
265
265
|
}}}
|
266
|
-
|
267
|
-
@param key {String} the property to set
|
266
|
+
|
267
|
+
@param key {String|Hash} the property to set
|
268
268
|
@param value {Object} the value to set or null.
|
269
269
|
@returns {SC.Observable}
|
270
270
|
*/
|
271
271
|
set: function(key, value) {
|
272
|
-
var func = this[key],
|
272
|
+
var func = this[key],
|
273
273
|
notify = this.automaticallyNotifiesObserversFor(key),
|
274
|
-
ret = value,
|
274
|
+
ret = value,
|
275
275
|
cachedep, cache, idx, dfunc ;
|
276
|
-
|
276
|
+
|
277
|
+
if(value === undefined && SC.typeOf(key) === SC.T_HASH) {
|
278
|
+
var hash = key;
|
279
|
+
|
280
|
+
for(key in hash) {
|
281
|
+
if (!hash.hasOwnProperty(key)) continue;
|
282
|
+
this.set(key, hash[key]);
|
283
|
+
}
|
284
|
+
|
285
|
+
return this;
|
286
|
+
}
|
287
|
+
|
277
288
|
// if there are any dependent keys and they use caching, then clear the
|
278
289
|
// cache. (If we're notifying, then propertyDidChange will do this for
|
279
290
|
// us.)
|
@@ -285,7 +296,7 @@ SC.Observable = {
|
|
285
296
|
if (!cachedep || (cachedep = cachedep[key])===undefined) {
|
286
297
|
cachedep = this._kvo_computeCachedDependentsFor(key);
|
287
298
|
}
|
288
|
-
|
299
|
+
|
289
300
|
if (cachedep) {
|
290
301
|
idx = cachedep.length;
|
291
302
|
while(--idx>=0) {
|
@@ -326,13 +337,13 @@ SC.Observable = {
|
|
326
337
|
return this ;
|
327
338
|
},
|
328
339
|
|
329
|
-
/**
|
340
|
+
/**
|
330
341
|
Called whenever you try to get or set an undefined property.
|
331
|
-
|
342
|
+
|
332
343
|
This is a generic property handler. If you define it, it will be called
|
333
344
|
when the named property is not yet set in the object. The default does
|
334
345
|
nothing.
|
335
|
-
|
346
|
+
|
336
347
|
@param key {String} the key that was requested
|
337
348
|
@param value {Object} The value if called as a setter, undefined if called as a getter.
|
338
349
|
@returns {Object} The new value for key.
|
@@ -342,33 +353,33 @@ SC.Observable = {
|
|
342
353
|
return value ;
|
343
354
|
},
|
344
355
|
|
345
|
-
/**
|
356
|
+
/**
|
346
357
|
Begins a grouping of property changes.
|
347
|
-
|
358
|
+
|
348
359
|
You can use this method to group property changes so that notifications
|
349
|
-
will not be sent until the changes are finished. If you plan to make a
|
350
|
-
large number of changes to an object at one time, you should call this
|
360
|
+
will not be sent until the changes are finished. If you plan to make a
|
361
|
+
large number of changes to an object at one time, you should call this
|
351
362
|
method at the beginning of the changes to suspend change notifications.
|
352
|
-
When you are done making changes, all endPropertyChanges() to allow
|
363
|
+
When you are done making changes, all endPropertyChanges() to allow
|
353
364
|
notification to resume.
|
354
|
-
|
365
|
+
|
355
366
|
@returns {SC.Observable}
|
356
367
|
*/
|
357
368
|
beginPropertyChanges: function() {
|
358
|
-
this._kvo_changeLevel = (this._kvo_changeLevel || 0) + 1;
|
369
|
+
this._kvo_changeLevel = (this._kvo_changeLevel || 0) + 1;
|
359
370
|
return this;
|
360
371
|
},
|
361
372
|
|
362
|
-
/**
|
373
|
+
/**
|
363
374
|
Ends a grouping of property changes.
|
364
|
-
|
375
|
+
|
365
376
|
You can use this method to group property changes so that notifications
|
366
|
-
will not be sent until the changes are finished. If you plan to make a
|
367
|
-
large number of changes to an object at one time, you should call
|
368
|
-
beginPropertyChanges() at the beginning of the changes to suspend change
|
369
|
-
notifications. When you are done making changes, call this method to allow
|
377
|
+
will not be sent until the changes are finished. If you plan to make a
|
378
|
+
large number of changes to an object at one time, you should call
|
379
|
+
beginPropertyChanges() at the beginning of the changes to suspend change
|
380
|
+
notifications. When you are done making changes, call this method to allow
|
370
381
|
notification to resume.
|
371
|
-
|
382
|
+
|
372
383
|
@returns {SC.Observable}
|
373
384
|
*/
|
374
385
|
endPropertyChanges: function() {
|
@@ -376,23 +387,23 @@ SC.Observable = {
|
|
376
387
|
var level = this._kvo_changeLevel, changes = this._kvo_changes;
|
377
388
|
if ((level<=0) && changes && (changes.length>0) && !SC.Observers.isObservingSuspended) {
|
378
389
|
this._notifyPropertyObservers() ;
|
379
|
-
}
|
390
|
+
}
|
380
391
|
return this ;
|
381
392
|
},
|
382
393
|
|
383
|
-
/**
|
394
|
+
/**
|
384
395
|
Notify the observer system that a property is about to change.
|
385
396
|
|
386
|
-
Sometimes you need to change a value directly or indirectly without
|
387
|
-
actually calling get() or set() on it. In this case, you can use this
|
388
|
-
method and propertyDidChange() instead. Calling these two methods
|
389
|
-
together will notify all observers that the property has potentially
|
397
|
+
Sometimes you need to change a value directly or indirectly without
|
398
|
+
actually calling get() or set() on it. In this case, you can use this
|
399
|
+
method and propertyDidChange() instead. Calling these two methods
|
400
|
+
together will notify all observers that the property has potentially
|
390
401
|
changed value.
|
391
|
-
|
392
|
-
Note that you must always call propertyWillChange and propertyDidChange as
|
393
|
-
a pair. If you do not, it may get the property change groups out of order
|
402
|
+
|
403
|
+
Note that you must always call propertyWillChange and propertyDidChange as
|
404
|
+
a pair. If you do not, it may get the property change groups out of order
|
394
405
|
and cause notifications to be delivered more often than you would like.
|
395
|
-
|
406
|
+
|
396
407
|
@param key {String} The property key that is about to change.
|
397
408
|
@returns {SC.Observable}
|
398
409
|
*/
|
@@ -400,26 +411,25 @@ SC.Observable = {
|
|
400
411
|
return this ;
|
401
412
|
},
|
402
413
|
|
403
|
-
/**
|
414
|
+
/**
|
404
415
|
Notify the observer system that a property has just changed.
|
405
416
|
|
406
|
-
Sometimes you need to change a value directly or indirectly without
|
407
|
-
actually calling get() or set() on it. In this case, you can use this
|
408
|
-
method and propertyWillChange() instead. Calling these two methods
|
409
|
-
together will notify all observers that the property has potentially
|
417
|
+
Sometimes you need to change a value directly or indirectly without
|
418
|
+
actually calling get() or set() on it. In this case, you can use this
|
419
|
+
method and propertyWillChange() instead. Calling these two methods
|
420
|
+
together will notify all observers that the property has potentially
|
410
421
|
changed value.
|
411
|
-
|
412
|
-
Note that you must always call propertyWillChange and propertyDidChange as
|
413
|
-
a pair. If you do not, it may get the property change groups out of order
|
422
|
+
|
423
|
+
Note that you must always call propertyWillChange and propertyDidChange as
|
424
|
+
a pair. If you do not, it may get the property change groups out of order
|
414
425
|
and cause notifications to be delivered more often than you would like.
|
415
|
-
|
426
|
+
|
416
427
|
@param key {String} The property key that has just changed.
|
417
428
|
@param value {Object} The new value of the key. May be null.
|
418
429
|
@returns {SC.Observable}
|
419
430
|
*/
|
420
431
|
propertyDidChange: function(key,value, _keepCache) {
|
421
|
-
|
422
|
-
this._kvo_revision = (this._kvo_revision || 0) + 1;
|
432
|
+
this._kvo_revision = (this._kvo_revision || 0) + 1;
|
423
433
|
var level = this._kvo_changeLevel || 0,
|
424
434
|
cachedep, idx, dfunc, cache, func,
|
425
435
|
log = SC.LOG_OBSERVERS && !(this.LOG_OBSERVING===NO);
|
@@ -458,38 +468,38 @@ SC.Observable = {
|
|
458
468
|
var changes = this._kvo_changes ;
|
459
469
|
if (!changes) changes = this._kvo_changes = SC.CoreSet.create() ;
|
460
470
|
changes.add(key) ;
|
461
|
-
|
471
|
+
|
462
472
|
if (suspended) {
|
463
473
|
if (log) console.log("%@%@: will not notify observers because observing is suspended".fmt(SC.KVO_SPACES,this));
|
464
474
|
SC.Observers.objectHasPendingChanges(this) ;
|
465
475
|
}
|
466
|
-
|
476
|
+
|
467
477
|
// otherwise notify property observers immediately
|
468
478
|
} else this._notifyPropertyObservers(key) ;
|
469
|
-
|
479
|
+
|
470
480
|
return this ;
|
471
481
|
},
|
472
482
|
|
473
483
|
// ..........................................
|
474
484
|
// DEPENDENT KEYS
|
475
|
-
//
|
485
|
+
//
|
476
486
|
|
477
487
|
/**
|
478
|
-
Use this to indicate that one key changes if other keys it depends on
|
488
|
+
Use this to indicate that one key changes if other keys it depends on
|
479
489
|
change. Pass the key that is dependent and additional keys it depends
|
480
|
-
upon. You can either pass the additional keys inline as arguments or
|
490
|
+
upon. You can either pass the additional keys inline as arguments or
|
481
491
|
in a single array.
|
482
|
-
|
492
|
+
|
483
493
|
You generally do not call this method, but instead pass dependent keys to
|
484
494
|
your property() method when you declare a computed property.
|
485
|
-
|
495
|
+
|
486
496
|
You can call this method during your init to register the keys that should
|
487
|
-
trigger a change notification for your computed properties.
|
488
|
-
|
497
|
+
trigger a change notification for your computed properties.
|
498
|
+
|
489
499
|
@param {String} key the dependent key
|
490
|
-
@param {Array|String} dependentKeys one or more dependent keys
|
500
|
+
@param {Array|String} dependentKeys one or more dependent keys
|
491
501
|
@returns {Object} this
|
492
|
-
*/
|
502
|
+
*/
|
493
503
|
registerDependentKey: function(key, dependentKeys) {
|
494
504
|
var dependents = this._kvo_dependents,
|
495
505
|
func = this[key],
|
@@ -520,13 +530,13 @@ SC.Observable = {
|
|
520
530
|
}
|
521
531
|
},
|
522
532
|
|
523
|
-
/** @private
|
524
|
-
|
525
|
-
Helper method used by computeCachedDependents. Just loops over the
|
533
|
+
/** @private
|
534
|
+
|
535
|
+
Helper method used by computeCachedDependents. Just loops over the
|
526
536
|
array of dependent keys. If the passed function is cacheable, it will
|
527
|
-
be added to the queue. Also, recursively call on each keys dependent
|
537
|
+
be added to the queue. Also, recursively call on each keys dependent
|
528
538
|
keys.
|
529
|
-
|
539
|
+
|
530
540
|
@param {Array} queue the queue to add functions to
|
531
541
|
@param {Array} keys the array of dependent keys for this key
|
532
542
|
@param {Hash} dependents the _kvo_dependents cache
|
@@ -536,11 +546,11 @@ SC.Observable = {
|
|
536
546
|
_kvo_addCachedDependents: function(queue, keys, dependents, seen) {
|
537
547
|
var idx = keys.length,
|
538
548
|
func, key, deps ;
|
539
|
-
|
549
|
+
|
540
550
|
while(--idx >= 0) {
|
541
551
|
key = keys[idx];
|
542
552
|
seen.add(key);
|
543
|
-
|
553
|
+
|
544
554
|
// if the value for this key is a computed property, then add it to the
|
545
555
|
// set if it is cacheable, and process any of its dependent keys also.
|
546
556
|
func = this[key];
|
@@ -549,19 +559,19 @@ SC.Observable = {
|
|
549
559
|
if ((deps = dependents[key]) && deps.length>0) { // and any dependents
|
550
560
|
this._kvo_addCachedDependents(queue, deps, dependents, seen);
|
551
561
|
}
|
552
|
-
}
|
562
|
+
}
|
553
563
|
}
|
554
|
-
|
564
|
+
|
555
565
|
},
|
556
|
-
|
566
|
+
|
557
567
|
/** @private
|
558
568
|
|
559
569
|
Called by set() whenever it needs to determine which cached dependent
|
560
|
-
keys to clear. Recursively searches dependent keys to determine all
|
570
|
+
keys to clear. Recursively searches dependent keys to determine all
|
561
571
|
cached property direcly or indirectly affected.
|
562
|
-
|
572
|
+
|
563
573
|
The return value is also saved for future reference
|
564
|
-
|
574
|
+
|
565
575
|
@param {String} key the key to compute
|
566
576
|
@returns {Array}
|
567
577
|
*/
|
@@ -576,85 +586,85 @@ SC.Observable = {
|
|
576
586
|
// this mess again.
|
577
587
|
if (!keys || keys.length===0) return cached[key] = null;
|
578
588
|
|
579
|
-
// there are dependent keys, so we need to do the work to find out if
|
589
|
+
// there are dependent keys, so we need to do the work to find out if
|
580
590
|
// any of them or their dependent keys are cached.
|
581
591
|
queue = cached[key] = [];
|
582
592
|
seen = SC._TMP_SEEN_SET = (SC._TMP_SEEN_SET || SC.CoreSet.create());
|
583
593
|
seen.add(key);
|
584
594
|
this._kvo_addCachedDependents(queue, keys, dependents, seen);
|
585
595
|
seen.clear(); // reset
|
586
|
-
|
596
|
+
|
587
597
|
if (queue.length === 0) queue = cached[key] = null ; // turns out nothing
|
588
598
|
return queue ;
|
589
599
|
},
|
590
|
-
|
600
|
+
|
591
601
|
// ..........................................
|
592
602
|
// OBSERVERS
|
593
|
-
//
|
594
|
-
|
603
|
+
//
|
604
|
+
|
595
605
|
_kvo_for: function(kvoKey, type) {
|
596
606
|
var ret = this[kvoKey] ;
|
597
607
|
|
598
608
|
if (!this._kvo_cloned) this._kvo_cloned = {} ;
|
599
|
-
|
600
|
-
// if the item does not exist, create it. Unless type is passed,
|
609
|
+
|
610
|
+
// if the item does not exist, create it. Unless type is passed,
|
601
611
|
// assume array.
|
602
612
|
if (!ret) {
|
603
613
|
ret = this[kvoKey] = (type === undefined) ? [] : type.create();
|
604
614
|
this._kvo_cloned[kvoKey] = YES ;
|
605
|
-
|
615
|
+
|
606
616
|
// if item does exist but has not been cloned, then clone it. Note
|
607
617
|
// that all types must implement copy().0
|
608
618
|
} else if (!this._kvo_cloned[kvoKey]) {
|
609
619
|
ret = this[kvoKey] = ret.copy();
|
610
|
-
this._kvo_cloned[kvoKey] = YES;
|
620
|
+
this._kvo_cloned[kvoKey] = YES;
|
611
621
|
}
|
612
|
-
|
622
|
+
|
613
623
|
return ret ;
|
614
624
|
},
|
615
625
|
|
616
|
-
/**
|
626
|
+
/**
|
617
627
|
Adds an observer on a property.
|
618
|
-
|
628
|
+
|
619
629
|
This is the core method used to register an observer for a property.
|
620
|
-
|
630
|
+
|
621
631
|
Once you call this method, anytime the key's value is set, your observer
|
622
632
|
will be notified. Note that the observers are triggered anytime the
|
623
633
|
value is set, regardless of whether it has actually changed. Your
|
624
634
|
observer should be prepared to handle that.
|
625
|
-
|
626
|
-
You can also pass an optional context parameter to this method. The
|
635
|
+
|
636
|
+
You can also pass an optional context parameter to this method. The
|
627
637
|
context will be passed to your observer method whenever it is triggered.
|
628
638
|
Note that if you add the same target/method pair on a key multiple times
|
629
639
|
with different context parameters, your observer will only be called once
|
630
640
|
with the last context you passed.
|
631
|
-
|
641
|
+
|
632
642
|
h2. Observer Methods
|
633
|
-
|
643
|
+
|
634
644
|
Observer methods you pass should generally have the following signature if
|
635
645
|
you do not pass a "context" parameter:
|
636
|
-
|
646
|
+
|
637
647
|
{{{
|
638
648
|
fooDidChange: function(sender, key, value, rev);
|
639
649
|
}}}
|
640
|
-
|
650
|
+
|
641
651
|
The sender is the object that changed. The key is the property that
|
642
652
|
changes. The value property is currently reserved and unused. The rev
|
643
653
|
is the last property revision of the object when it changed, which you can
|
644
654
|
use to detect if the key value has really changed or not.
|
645
|
-
|
655
|
+
|
646
656
|
If you pass a "context" parameter, the context will be passed before the
|
647
657
|
revision like so:
|
648
|
-
|
658
|
+
|
649
659
|
{{{
|
650
660
|
fooDidChange: function(sender, key, value, context, rev);
|
651
661
|
}}}
|
652
|
-
|
653
|
-
Usually you will not need the value, context or revision parameters at
|
662
|
+
|
663
|
+
Usually you will not need the value, context or revision parameters at
|
654
664
|
the end. In this case, it is common to write observer methods that take
|
655
665
|
only a sender and key value as parameters or, if you aren't interested in
|
656
666
|
any of these values, to write an observer that has no parameters at all.
|
657
|
-
|
667
|
+
|
658
668
|
@param key {String} the key to observer
|
659
669
|
@param target {Object} the target object to invoke
|
660
670
|
@param method {String|Function} the method to invoke.
|
@@ -662,35 +672,34 @@ SC.Observable = {
|
|
662
672
|
@returns {SC.Object} self
|
663
673
|
*/
|
664
674
|
addObserver: function(key, target, method, context) {
|
665
|
-
|
666
675
|
var kvoKey, chain, chains, observers;
|
667
|
-
|
676
|
+
|
668
677
|
// normalize. if a function is passed to target, make it the method.
|
669
678
|
if (method === undefined) {
|
670
679
|
method = target; target = this ;
|
671
680
|
}
|
672
681
|
if (!target) target = this ;
|
673
|
-
|
682
|
+
|
674
683
|
if (typeof method === "string") method = target[method] ;
|
675
684
|
if (!method) throw "You must pass a method to addObserver()" ;
|
676
685
|
|
677
686
|
// Normalize key...
|
678
687
|
key = key.toString() ;
|
679
688
|
if (key.indexOf('.') >= 0) {
|
680
|
-
|
681
|
-
// create the chain and save it for later so we can tear it down if
|
689
|
+
|
690
|
+
// create the chain and save it for later so we can tear it down if
|
682
691
|
// needed.
|
683
692
|
chain = SC._ChainObserver.createChain(this, key, target, method, context);
|
684
|
-
chain.masterTarget = target;
|
693
|
+
chain.masterTarget = target;
|
685
694
|
chain.masterMethod = method ;
|
686
|
-
|
695
|
+
|
687
696
|
// Save in set for chain observers.
|
688
697
|
this._kvo_for(SC.keyFor('_kvo_chains', key)).push(chain);
|
689
|
-
|
698
|
+
|
690
699
|
// Create observers if needed...
|
691
700
|
} else {
|
692
|
-
|
693
|
-
// Special case to support reduced properties. If the property
|
701
|
+
|
702
|
+
// Special case to support reduced properties. If the property
|
694
703
|
// key begins with '@' and its value is unknown, then try to get its
|
695
704
|
// value. This will configure the dependent keys if needed.
|
696
705
|
if ((this[key] === undefined) && (key.indexOf('@') === 0)) {
|
@@ -709,35 +718,35 @@ SC.Observable = {
|
|
709
718
|
|
710
719
|
/**
|
711
720
|
Remove an observer you have previously registered on this object. Pass
|
712
|
-
the same key, target, and method you passed to addObserver() and your
|
721
|
+
the same key, target, and method you passed to addObserver() and your
|
713
722
|
target will no longer receive notifications.
|
714
|
-
|
723
|
+
|
715
724
|
@returns {SC.Observable} reciever
|
716
725
|
*/
|
717
726
|
removeObserver: function(key, target, method) {
|
718
|
-
|
727
|
+
|
719
728
|
var kvoKey, chains, chain, observers, idx ;
|
720
|
-
|
729
|
+
|
721
730
|
// normalize. if a function is passed to target, make it the method.
|
722
731
|
if (method === undefined) {
|
723
732
|
method = target; target = this ;
|
724
733
|
}
|
725
734
|
if (!target) target = this ;
|
726
|
-
|
735
|
+
|
727
736
|
if (typeof method === "string") method = target[method] ;
|
728
737
|
if (!method) throw "You must pass a method to removeObserver()" ;
|
729
738
|
|
730
739
|
// if the key contains a '.', this is a chained observer.
|
731
740
|
key = key.toString() ;
|
732
741
|
if (key.indexOf('.') >= 0) {
|
733
|
-
|
742
|
+
|
734
743
|
// try to find matching chains
|
735
744
|
kvoKey = SC.keyFor('_kvo_chains', key);
|
736
745
|
if (chains = this[kvoKey]) {
|
737
|
-
|
746
|
+
|
738
747
|
// if chains have not been cloned yet, do so now.
|
739
748
|
chains = this._kvo_for(kvoKey) ;
|
740
|
-
|
749
|
+
|
741
750
|
// remove any chains
|
742
751
|
idx = chains.length;
|
743
752
|
while(--idx >= 0) {
|
@@ -747,7 +756,7 @@ SC.Observable = {
|
|
747
756
|
}
|
748
757
|
}
|
749
758
|
}
|
750
|
-
|
759
|
+
|
751
760
|
// otherwise, just like a normal observer.
|
752
761
|
} else {
|
753
762
|
if (target === this) target = null ; // use null for observers only.
|
@@ -756,7 +765,7 @@ SC.Observable = {
|
|
756
765
|
// if observers have not been cloned yet, do so now
|
757
766
|
observers = this._kvo_for(kvoKey) ;
|
758
767
|
observers.remove(target, method) ;
|
759
|
-
if (observers.
|
768
|
+
if (observers.getMembers().length === 0) {
|
760
769
|
this._kvo_for('_kvo_observed_keys', SC.CoreSet).remove(key);
|
761
770
|
}
|
762
771
|
}
|
@@ -765,25 +774,25 @@ SC.Observable = {
|
|
765
774
|
if (this.didRemoveObserver) this.didRemoveObserver(key, target, method);
|
766
775
|
return this;
|
767
776
|
},
|
768
|
-
|
777
|
+
|
769
778
|
/**
|
770
|
-
Returns YES if the object currently has observers registered for a
|
779
|
+
Returns YES if the object currently has observers registered for a
|
771
780
|
particular key. You can use this method to potentially defer performing
|
772
781
|
an expensive action until someone begins observing a particular property
|
773
782
|
on the object.
|
774
|
-
|
783
|
+
|
775
784
|
@param {String} key key to check
|
776
785
|
@returns {Boolean}
|
777
786
|
*/
|
778
787
|
hasObserverFor: function(key) {
|
779
788
|
SC.Observers.flush(this) ; // hookup as many observers as possible.
|
780
|
-
|
789
|
+
|
781
790
|
var observers = this[SC.keyFor('_kvo_observers', key)],
|
782
791
|
locals = this[SC.keyFor('_kvo_local', key)],
|
783
792
|
members ;
|
784
793
|
|
785
794
|
if (locals && locals.length>0) return YES ;
|
786
|
-
if (observers && observers.getMembers().length>0) return YES ;
|
795
|
+
if (observers && observers.getMembers().length > 0) return YES ;
|
787
796
|
return NO ;
|
788
797
|
},
|
789
798
|
|
@@ -794,28 +803,28 @@ SC.Observable = {
|
|
794
803
|
from the init() method of SC.Object. You may choose to call this
|
795
804
|
from your own initialization method if you are using SC.Observable in
|
796
805
|
a non-SC.Object-based object.
|
797
|
-
|
806
|
+
|
798
807
|
This method looks for several private variables, which you can setup,
|
799
808
|
to initialize:
|
800
|
-
|
809
|
+
|
801
810
|
- _observers: this should contain an array of key names for observers
|
802
811
|
you need to configure.
|
803
|
-
|
812
|
+
|
804
813
|
- _bindings: this should contain an array of key names that configure
|
805
814
|
bindings.
|
806
|
-
|
815
|
+
|
807
816
|
- _properties: this should contain an array of key names for computed
|
808
817
|
properties.
|
809
|
-
|
818
|
+
|
810
819
|
@returns {Object} this
|
811
820
|
*/
|
812
821
|
initObservable: function() {
|
813
822
|
if (this._observableInited) return ;
|
814
823
|
this._observableInited = YES ;
|
815
|
-
|
824
|
+
|
816
825
|
var loc, keys, key, value, observer, propertyPaths, propertyPathsLength,
|
817
826
|
len, ploc, path, dotIndex, root, propertyKey, keysLen;
|
818
|
-
|
827
|
+
|
819
828
|
// Loop through observer functions and register them
|
820
829
|
if (keys = this._observers) {
|
821
830
|
len = keys.length ;
|
@@ -833,13 +842,13 @@ SC.Observable = {
|
|
833
842
|
// next most common case, use a chained observer
|
834
843
|
} else if (path.indexOf('*') === 0) {
|
835
844
|
this.addObserver(path.slice(1), this, observer) ;
|
836
|
-
|
837
|
-
// otherwise register the observer in the observers queue. This
|
845
|
+
|
846
|
+
// otherwise register the observer in the observers queue. This
|
838
847
|
// will add the observer now or later when the named path becomes
|
839
848
|
// available.
|
840
849
|
} else {
|
841
850
|
root = null ;
|
842
|
-
|
851
|
+
|
843
852
|
// handle special cases for observers that look to the local root
|
844
853
|
if (dotIndex === 0) {
|
845
854
|
root = this; path = path.slice(1) ;
|
@@ -848,8 +857,8 @@ SC.Observable = {
|
|
848
857
|
} else if (dotIndex<0 && path.length===4 && path === 'this') {
|
849
858
|
root = this; path = '';
|
850
859
|
}
|
851
|
-
|
852
|
-
SC.Observers.addObserver(path, this, observer, root);
|
860
|
+
|
861
|
+
SC.Observers.addObserver(path, this, observer, root);
|
853
862
|
}
|
854
863
|
}
|
855
864
|
}
|
@@ -873,7 +882,7 @@ SC.Observable = {
|
|
873
882
|
if (value = this[key]) {
|
874
883
|
|
875
884
|
// activate cacheable only if needed for perf reasons
|
876
|
-
if (value.isCacheable) this._kvo_cacheable = YES;
|
885
|
+
if (value.isCacheable) this._kvo_cacheable = YES;
|
877
886
|
|
878
887
|
// register dependent keys
|
879
888
|
if (value.dependentKeys && (value.dependentKeys.length>0)) {
|
@@ -882,32 +891,31 @@ SC.Observable = {
|
|
882
891
|
}
|
883
892
|
}
|
884
893
|
}
|
885
|
-
|
894
|
+
|
886
895
|
},
|
887
|
-
|
896
|
+
|
888
897
|
// ..........................................
|
889
898
|
// NOTIFICATION
|
890
|
-
//
|
899
|
+
//
|
891
900
|
|
892
901
|
/**
|
893
902
|
Returns an array with all of the observers registered for the specified
|
894
903
|
key. This is intended for debugging purposes only. You generally do not
|
895
904
|
want to rely on this method for production code.
|
896
|
-
|
905
|
+
|
897
906
|
@params key {String} the key to evaluate
|
898
907
|
@returns {Array} array of Observer objects, describing the observer.
|
899
908
|
*/
|
900
909
|
observersForKey: function(key) {
|
901
910
|
var observers = this._kvo_for('_kvo_observers', key) ;
|
902
|
-
return observers.getMembers()
|
911
|
+
return observers.getMembers() ;
|
903
912
|
},
|
904
|
-
|
913
|
+
|
905
914
|
// this private method actually notifies the observers for any keys in the
|
906
915
|
// observer queue. If you pass a key it will be added to the queue.
|
907
916
|
_notifyPropertyObservers: function(key) {
|
908
|
-
|
909
917
|
if (!this._observableInited) this.initObservable() ;
|
910
|
-
|
918
|
+
|
911
919
|
SC.Observers.flush(this) ; // hookup as many observers as possible.
|
912
920
|
|
913
921
|
var log = SC.LOG_OBSERVERS && !(this.LOG_OBSERVING===NO),
|
@@ -919,19 +927,19 @@ SC.Observable = {
|
|
919
927
|
spaces = SC.KVO_SPACES = (SC.KVO_SPACES || '') + ' ';
|
920
928
|
console.log('%@%@: notifying observers after change to key "%@"'.fmt(spaces, this, key));
|
921
929
|
}
|
922
|
-
|
930
|
+
|
923
931
|
// Get any starObservers -- they will be notified of all changes.
|
924
932
|
starObservers = this['_kvo_observers_*'] ;
|
925
|
-
|
933
|
+
|
926
934
|
// prevent notifications from being sent until complete
|
927
|
-
this._kvo_changeLevel = (this._kvo_changeLevel || 0) + 1;
|
935
|
+
this._kvo_changeLevel = (this._kvo_changeLevel || 0) + 1;
|
928
936
|
|
929
937
|
// keep sending notifications as long as there are changes
|
930
938
|
while(((changes = this._kvo_changes) && (changes.length > 0)) || key) {
|
931
|
-
|
939
|
+
|
932
940
|
// increment revision
|
933
941
|
rev = ++this.propertyRevision ;
|
934
|
-
|
942
|
+
|
935
943
|
// save the current set of changes and swap out the kvo_changes so that
|
936
944
|
// any set() calls by observers will be saved in a new set.
|
937
945
|
if (!changes) changes = SC.CoreSet.create() ;
|
@@ -954,7 +962,7 @@ SC.Observable = {
|
|
954
962
|
for(idx=0;idx<changes.length;idx++) {
|
955
963
|
key = changes[idx] ;
|
956
964
|
keys = dependents[key] ;
|
957
|
-
|
965
|
+
|
958
966
|
// for each dependent key, add to set of changes. Also, if key
|
959
967
|
// value is a cacheable property, clear the cached value...
|
960
968
|
if (keys && (loc = keys.length)) {
|
@@ -970,7 +978,7 @@ SC.Observable = {
|
|
970
978
|
cache[func.cacheKey] = cache[func.lastSetValueKey] = undefined;
|
971
979
|
} // if (func=)
|
972
980
|
} // while (--loc)
|
973
|
-
} // if (keys &&
|
981
|
+
} // if (keys &&
|
974
982
|
} // for(idx...
|
975
983
|
} // if (dependents...)
|
976
984
|
|
@@ -980,18 +988,31 @@ SC.Observable = {
|
|
980
988
|
|
981
989
|
// find any observers and notify them...
|
982
990
|
observers = this[SC.keyFor('_kvo_observers', key)];
|
991
|
+
|
983
992
|
if (observers) {
|
984
|
-
members
|
993
|
+
// We need to clone the 'members' structure here in case any of the
|
994
|
+
// observers we're about to notify happen to remove observers for
|
995
|
+
// this key, which would mutate the structure underneath us.
|
996
|
+
// (Cloning it rather than mutating gives us a clear policy: if you
|
997
|
+
// were registered as an observer at the time notification begins,
|
998
|
+
// you will be notified, regardless of whether you're removed as an
|
999
|
+
// observer during that round of notification. Similarly, if you're
|
1000
|
+
// added as an observer during the notification round by another
|
1001
|
+
// observer, you will not be notified until the next time.)
|
1002
|
+
members = SC.clone(observers.getMembers()) ;
|
985
1003
|
membersLength = members.length ;
|
986
1004
|
for(memberLoc=0;memberLoc < membersLength; memberLoc++) {
|
987
1005
|
member = members[memberLoc] ;
|
1006
|
+
|
988
1007
|
if (member[3] === rev) continue ; // skip notified items.
|
989
1008
|
|
990
|
-
|
991
|
-
|
1009
|
+
if(!member[1]) console.log(member);
|
1010
|
+
|
1011
|
+
target = member[0] || this;
|
1012
|
+
method = member[1] ;
|
992
1013
|
context = member[2];
|
993
1014
|
member[3] = rev;
|
994
|
-
|
1015
|
+
|
995
1016
|
if (log) console.log('%@...firing observer on %@ for key "%@"'.fmt(spaces, target, key));
|
996
1017
|
if (context !== undefined) {
|
997
1018
|
method.call(target, this, key, null, context, rev);
|
@@ -1002,10 +1023,12 @@ SC.Observable = {
|
|
1002
1023
|
}
|
1003
1024
|
|
1004
1025
|
// look for local observers. Local observers are added by SC.Object
|
1005
|
-
// as an optimization to avoid having to add observers for every
|
1026
|
+
// as an optimization to avoid having to add observers for every
|
1006
1027
|
// instance when you are just observing your local object.
|
1007
1028
|
members = this[SC.keyFor('_kvo_local', key)];
|
1008
1029
|
if (members) {
|
1030
|
+
// Note: Since, unlike above, we don't expect local observers to be
|
1031
|
+
// removed in general, we will not clone 'members'.
|
1009
1032
|
membersLength = members.length ;
|
1010
1033
|
for(memberLoc=0;memberLoc<membersLength;memberLoc++) {
|
1011
1034
|
member = members[memberLoc];
|
@@ -1016,17 +1039,19 @@ SC.Observable = {
|
|
1016
1039
|
}
|
1017
1040
|
}
|
1018
1041
|
}
|
1019
|
-
|
1042
|
+
|
1020
1043
|
// if there are starObservers, do the same thing for them
|
1021
|
-
if (starObservers && key !== '*') {
|
1022
|
-
|
1044
|
+
if (starObservers && key !== '*') {
|
1045
|
+
// We clone the structure per the justification, above, for regular
|
1046
|
+
// observers.
|
1047
|
+
members = SC.clone(starObservers.getMembers()) ;
|
1023
1048
|
membersLength = members.length ;
|
1024
1049
|
for(memberLoc=0;memberLoc < membersLength; memberLoc++) {
|
1025
1050
|
member = members[memberLoc] ;
|
1026
|
-
target = member[0] || this;
|
1051
|
+
target = member[0] || this;
|
1027
1052
|
method = member[1] ;
|
1028
1053
|
context = member[2] ;
|
1029
|
-
|
1054
|
+
|
1030
1055
|
if (log) console.log('%@...firing * observer on %@ for key "%@"'.fmt(spaces, target, key));
|
1031
1056
|
if (context !== undefined) {
|
1032
1057
|
method.call(target, this, key, null, context, rev);
|
@@ -1045,28 +1070,28 @@ SC.Observable = {
|
|
1045
1070
|
|
1046
1071
|
// changes set should be empty. release it for reuse
|
1047
1072
|
if (changes) changes.destroy() ;
|
1048
|
-
|
1073
|
+
|
1049
1074
|
// key is no longer needed; clear it to avoid infinite loops
|
1050
|
-
key = null ;
|
1051
|
-
|
1075
|
+
key = null ;
|
1076
|
+
|
1052
1077
|
} // while (changes)
|
1053
|
-
|
1078
|
+
|
1054
1079
|
// done with loop, reduce change level so that future sets can resume
|
1055
|
-
this._kvo_changeLevel = (this._kvo_changeLevel || 1) - 1;
|
1056
|
-
|
1080
|
+
this._kvo_changeLevel = (this._kvo_changeLevel || 1) - 1;
|
1081
|
+
|
1057
1082
|
if (log) SC.KVO_SPACES = spaces.slice(0, -2);
|
1058
|
-
|
1083
|
+
|
1059
1084
|
return YES ; // finished successfully
|
1060
1085
|
},
|
1061
1086
|
|
1062
1087
|
// ..........................................
|
1063
1088
|
// BINDINGS
|
1064
|
-
//
|
1065
|
-
|
1066
|
-
/**
|
1089
|
+
//
|
1090
|
+
|
1091
|
+
/**
|
1067
1092
|
Manually add a new binding to an object. This is the same as doing
|
1068
1093
|
the more familiar propertyBinding: 'property.path' approach.
|
1069
|
-
|
1094
|
+
|
1070
1095
|
@param {String} toKey the key to bind to
|
1071
1096
|
@param {Object} target target or property path to bind from
|
1072
1097
|
@param {String|Function} method method for target to bind from
|
@@ -1082,7 +1107,7 @@ SC.Observable = {
|
|
1082
1107
|
// if a string or array (i.e. tuple) is passed, convert this into a
|
1083
1108
|
// binding. If a binding default was provided, use that.
|
1084
1109
|
pathType = typeof target;
|
1085
|
-
|
1110
|
+
|
1086
1111
|
if (pathType === "string" || (pathType === "object" && (target instanceof Array))) {
|
1087
1112
|
binding = this[toKey + 'BindingDefault'] || SC.Binding;
|
1088
1113
|
binding = binding.beget().from(target) ;
|
@@ -1091,24 +1116,40 @@ SC.Observable = {
|
|
1091
1116
|
// finish configuring the binding and then connect it.
|
1092
1117
|
binding = binding.to(toKey, this).connect() ;
|
1093
1118
|
this.bindings.push(binding) ;
|
1094
|
-
|
1119
|
+
|
1095
1120
|
return binding ;
|
1096
1121
|
},
|
1097
|
-
|
1098
|
-
/**
|
1099
|
-
didChangeFor
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1122
|
+
|
1123
|
+
/**
|
1124
|
+
didChangeFor allows you to determine if a property has changed since the
|
1125
|
+
last time the method was called. You must pass a unique context as the
|
1126
|
+
first parameter (so didChangeFor can identify which method is calling it),
|
1127
|
+
followed by a list of keys that should be checked for changes.
|
1128
|
+
|
1129
|
+
For example, in your render method you might pass the following context:
|
1103
1130
|
if (this.didChangeFor('render','height','width')) {
|
1104
|
-
//
|
1131
|
+
// Only render if changed
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
In your view's update method, you might instead pass 'update':
|
1135
|
+
|
1136
|
+
if (this.didChangeFor('update', 'height', 'width')) {
|
1137
|
+
// Only update height and width properties
|
1105
1138
|
}
|
1106
|
-
|
1107
|
-
|
1139
|
+
|
1140
|
+
This method works by comparing property revision counts. Every time a
|
1141
|
+
property changes, an internal counter is incremented. When didChangeFor is
|
1142
|
+
invoked, the current revision count of the property is compared to the
|
1143
|
+
revision count from the last time this method was called.
|
1144
|
+
|
1145
|
+
@param {String|Object} context a unique identifier
|
1146
|
+
@param {String…} propertyNames one or more property names
|
1147
|
+
*/
|
1148
|
+
didChangeFor: function(context) {
|
1108
1149
|
var valueCache, revisionCache, seenValues, seenRevisions, ret,
|
1109
1150
|
currentRevision, idx, key, value;
|
1110
1151
|
context = SC.hashFor(context) ; // get a hash key we can use in caches.
|
1111
|
-
|
1152
|
+
|
1112
1153
|
// setup caches...
|
1113
1154
|
valueCache = this._kvo_didChange_valueCache ;
|
1114
1155
|
if (!valueCache) valueCache = this._kvo_didChange_valueCache = {};
|
@@ -1118,14 +1159,14 @@ SC.Observable = {
|
|
1118
1159
|
// get the cache of values and revisions already seen in this context
|
1119
1160
|
seenValues = valueCache[context] || {} ;
|
1120
1161
|
seenRevisions = revisionCache[context] || {} ;
|
1121
|
-
|
1162
|
+
|
1122
1163
|
// prepare too loop!
|
1123
1164
|
ret = false ;
|
1124
1165
|
currentRevision = this._kvo_revision || 0 ;
|
1125
1166
|
idx = arguments.length ;
|
1126
1167
|
while(--idx >= 1) { // NB: loop only to 1 to ignore context arg.
|
1127
1168
|
key = arguments[idx];
|
1128
|
-
|
1169
|
+
|
1129
1170
|
// has the kvo revision changed since the last time we did this?
|
1130
1171
|
if (seenRevisions[key] != currentRevision) {
|
1131
1172
|
// yes, check the value with the last seen value
|
@@ -1137,34 +1178,43 @@ SC.Observable = {
|
|
1137
1178
|
}
|
1138
1179
|
seenRevisions[key] = currentRevision;
|
1139
1180
|
}
|
1140
|
-
|
1181
|
+
|
1141
1182
|
valueCache[context] = seenValues ;
|
1142
1183
|
revisionCache[context] = seenRevisions ;
|
1143
1184
|
return ret ;
|
1144
1185
|
},
|
1145
1186
|
|
1146
|
-
|
1147
|
-
|
1148
1187
|
/**
|
1149
1188
|
Sets the property only if the passed value is different from the
|
1150
1189
|
current value. Depending on how expensive a get() is on this property,
|
1151
1190
|
this may be more efficient.
|
1152
1191
|
|
1153
1192
|
NOTE: By default, the set() method will not set the value unless it has
|
1154
|
-
changed. However, this check can skipped by setting .property().
|
1193
|
+
changed. However, this check can skipped by setting .property().idempotent(NO)
|
1155
1194
|
setIfChanged() may be useful in this case.
|
1156
1195
|
|
1157
|
-
@param key {String} the key to change
|
1196
|
+
@param key {String|Hash} the key to change
|
1158
1197
|
@param value {Object} the value to change
|
1159
1198
|
@returns {SC.Observable}
|
1160
1199
|
*/
|
1161
1200
|
setIfChanged: function(key, value) {
|
1201
|
+
if(value === undefined && SC.typeOf(key) === SC.T_HASH) {
|
1202
|
+
var hash = key;
|
1203
|
+
|
1204
|
+
for(key in hash) {
|
1205
|
+
if (!hash.hasOwnProperty(key)) continue;
|
1206
|
+
this.setIfChanged(key, hash[key]);
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
return this;
|
1210
|
+
}
|
1211
|
+
|
1162
1212
|
return (this.get(key) !== value) ? this.set(key, value) : this ;
|
1163
1213
|
},
|
1164
|
-
|
1165
|
-
/**
|
1214
|
+
|
1215
|
+
/**
|
1166
1216
|
Navigates the property path, returning the value at that point.
|
1167
|
-
|
1217
|
+
|
1168
1218
|
If any object in the path is undefined, returns undefined.
|
1169
1219
|
*/
|
1170
1220
|
getPath: function(path) {
|
@@ -1172,10 +1222,10 @@ SC.Observable = {
|
|
1172
1222
|
if (tuple === null || tuple[0] === null) return undefined ;
|
1173
1223
|
return tuple[0].get(tuple[1]) ;
|
1174
1224
|
},
|
1175
|
-
|
1225
|
+
|
1176
1226
|
/**
|
1177
1227
|
Navigates the property path, finally setting the value.
|
1178
|
-
|
1228
|
+
|
1179
1229
|
@param path {String} the property path to set
|
1180
1230
|
@param value {Object} the value to set
|
1181
1231
|
@returns {SC.Observable}
|
@@ -1190,10 +1240,10 @@ SC.Observable = {
|
|
1190
1240
|
},
|
1191
1241
|
|
1192
1242
|
/**
|
1193
|
-
Navigates the property path, finally setting the value but only if
|
1243
|
+
Navigates the property path, finally setting the value but only if
|
1194
1244
|
the value does not match the current value. This will avoid sending
|
1195
1245
|
unecessary change notifications.
|
1196
|
-
|
1246
|
+
|
1197
1247
|
@param path {String} the property path to set
|
1198
1248
|
@param value {Object} the value to set
|
1199
1249
|
@returns {Object} this
|
@@ -1208,10 +1258,10 @@ SC.Observable = {
|
|
1208
1258
|
} else this.setIfChanged(path, value) ; // shortcut
|
1209
1259
|
return this;
|
1210
1260
|
},
|
1211
|
-
|
1212
|
-
/**
|
1261
|
+
|
1262
|
+
/**
|
1213
1263
|
Convenience method to get an array of properties.
|
1214
|
-
|
1264
|
+
|
1215
1265
|
Pass in multiple property keys or an array of property keys. This
|
1216
1266
|
method uses getPath() so you can also pass key paths.
|
1217
1267
|
|
@@ -1225,24 +1275,24 @@ SC.Observable = {
|
|
1225
1275
|
}
|
1226
1276
|
return ret ;
|
1227
1277
|
},
|
1228
|
-
|
1229
|
-
|
1230
|
-
/**
|
1278
|
+
|
1279
|
+
|
1280
|
+
/**
|
1231
1281
|
Increments the value of a property.
|
1232
|
-
|
1282
|
+
|
1233
1283
|
@param key {String} property name
|
1234
1284
|
@param increment {Number} the amount to increment (optional)
|
1235
1285
|
@returns {Number} new value of property
|
1236
1286
|
*/
|
1237
1287
|
incrementProperty: function(key,increment) {
|
1238
1288
|
if (!increment) increment = 1;
|
1239
|
-
this.set(key,(this.get(key) || 0)+increment);
|
1289
|
+
this.set(key,(this.get(key) || 0)+increment);
|
1240
1290
|
return this.get(key) ;
|
1241
1291
|
},
|
1242
1292
|
|
1243
|
-
/**
|
1293
|
+
/**
|
1244
1294
|
Decrements the value of a property.
|
1245
|
-
|
1295
|
+
|
1246
1296
|
@param key {String} property name
|
1247
1297
|
@param increment {Number} the amount to decrement (optional)
|
1248
1298
|
@returns {Number} new value of property
|
@@ -1253,15 +1303,15 @@ SC.Observable = {
|
|
1253
1303
|
return this.get(key) ;
|
1254
1304
|
},
|
1255
1305
|
|
1256
|
-
/**
|
1306
|
+
/**
|
1257
1307
|
Inverts a property. Property should be a bool.
|
1258
|
-
|
1308
|
+
|
1259
1309
|
@param key {String} property name
|
1260
1310
|
@param value {Object} optional parameter for "true" value
|
1261
1311
|
@param alt {Object} optional parameter for "false" value
|
1262
1312
|
@returns {Object} new value
|
1263
1313
|
*/
|
1264
|
-
toggleProperty: function(key,value,alt) {
|
1314
|
+
toggleProperty: function(key,value,alt) {
|
1265
1315
|
if (value === undefined) value = true ;
|
1266
1316
|
if (alt === undefined) alt = false ;
|
1267
1317
|
value = (this.get(key) == value) ? alt : value ;
|
@@ -1271,12 +1321,12 @@ SC.Observable = {
|
|
1271
1321
|
|
1272
1322
|
/**
|
1273
1323
|
Convenience method to call propertyWillChange/propertyDidChange.
|
1274
|
-
|
1275
|
-
Sometimes you need to notify observers that a property has changed value
|
1276
|
-
without actually changing this value. In those cases, you can use this
|
1277
|
-
method as a convenience instead of calling propertyWillChange() and
|
1324
|
+
|
1325
|
+
Sometimes you need to notify observers that a property has changed value
|
1326
|
+
without actually changing this value. In those cases, you can use this
|
1327
|
+
method as a convenience instead of calling propertyWillChange() and
|
1278
1328
|
propertyDidChange().
|
1279
|
-
|
1329
|
+
|
1280
1330
|
@param key {String} The property key that has just changed.
|
1281
1331
|
@param value {Object} The new value of the key. May be null.
|
1282
1332
|
@returns {SC.Observable}
|
@@ -1284,19 +1334,19 @@ SC.Observable = {
|
|
1284
1334
|
notifyPropertyChange: function(key, value) {
|
1285
1335
|
this.propertyWillChange(key) ;
|
1286
1336
|
this.propertyDidChange(key, value) ;
|
1287
|
-
return this;
|
1337
|
+
return this;
|
1288
1338
|
},
|
1289
|
-
|
1290
|
-
/**
|
1339
|
+
|
1340
|
+
/**
|
1291
1341
|
Notifies all of observers of a property changes.
|
1292
|
-
|
1342
|
+
|
1293
1343
|
Sometimes when you make a major update to your object, it is cheaper to
|
1294
1344
|
simply notify all observers that their property might have changed than
|
1295
1345
|
to figure out specifically which properties actually did change.
|
1296
|
-
|
1346
|
+
|
1297
1347
|
In those cases, you can simply call this method to notify all property
|
1298
1348
|
observers immediately. Note that this ignores property groups.
|
1299
|
-
|
1349
|
+
|
1300
1350
|
@returns {SC.Observable}
|
1301
1351
|
*/
|
1302
1352
|
allPropertiesDidChange: function() {
|
@@ -1310,7 +1360,7 @@ SC.Observable = {
|
|
1310
1360
|
|
1311
1361
|
/**
|
1312
1362
|
Logs the named properties to the console.
|
1313
|
-
|
1363
|
+
|
1314
1364
|
@param {String...} propertyNames one or more property names
|
1315
1365
|
*/
|
1316
1366
|
logProperty: function() {
|
@@ -1323,7 +1373,7 @@ SC.Observable = {
|
|
1323
1373
|
},
|
1324
1374
|
|
1325
1375
|
propertyRevision: 1
|
1326
|
-
|
1376
|
+
|
1327
1377
|
} ;
|
1328
1378
|
|
1329
1379
|
/** @private used by addProbe/removeProbe */
|