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
@@ -430,7 +430,8 @@ SC.AudioView = SC.View.extend({
|
|
430
430
|
view=this,
|
431
431
|
dimensions;
|
432
432
|
try{
|
433
|
-
media.GetVolume();
|
433
|
+
media.GetVolume();
|
434
|
+
// add media.GetTimeScale(); ?
|
434
435
|
}catch(e){
|
435
436
|
console.log('loaded fail trying later');
|
436
437
|
this.invokeLater(this.didAppendToDocument, 100);
|
@@ -540,7 +541,8 @@ SC.AudioView = SC.View.extend({
|
|
540
541
|
seek:function(){
|
541
542
|
var timeInSecs, totaltimeInSecs, formattedTime, media=this._getAudioObject();
|
542
543
|
if(this.loaded==='html5'){
|
543
|
-
|
544
|
+
// also check for media && media.currentTime, because media.currentTime doesn't exist on value change
|
545
|
+
if(this.get('paused') && media && media.currentTime) media.currentTime=this.get('currentTime');
|
544
546
|
}
|
545
547
|
if(this.loaded==='quicktime'){
|
546
548
|
if(this.get('paused')) media.SetTime(this.get('currentTime')*media.GetTimeScale());
|
@@ -40,8 +40,7 @@ SC.MediaControlsView = SC.View.extend({
|
|
40
40
|
layout: { top: 0, left: 0, width: 20, height:20},
|
41
41
|
action: "playPause",
|
42
42
|
targetBinding: "*owner.target",
|
43
|
-
renderStyle: 'renderImage'
|
44
|
-
theme: ''
|
43
|
+
renderStyle: 'renderImage'
|
45
44
|
}),
|
46
45
|
progressView: SC.MediaSlider.design({
|
47
46
|
layout: { top: 0, left: 20, right: 220, height:20},
|
@@ -63,7 +62,6 @@ SC.MediaControlsView = SC.View.extend({
|
|
63
62
|
title: '',
|
64
63
|
icon: 'theater',
|
65
64
|
renderStyle: 'renderImage',
|
66
|
-
theme: '',
|
67
65
|
titleMinWidth: 35,
|
68
66
|
layout: { top: 0, right: 140, width: 20, height:20},
|
69
67
|
action: "fullScreen",
|
@@ -40,8 +40,7 @@ SC.SimpleMediaControlsView = SC.View.extend({
|
|
40
40
|
layout: { top: 0, left: 0, width: 20, height:20 },
|
41
41
|
action: "playPause",
|
42
42
|
targetBinding: "*owner.target",
|
43
|
-
renderStyle: 'renderImage'
|
44
|
-
theme: ''
|
43
|
+
renderStyle: 'renderImage'
|
45
44
|
}),
|
46
45
|
progressView: SC.MediaSlider.design({
|
47
46
|
layout: { top: 0, left: 25, right: 0, height:20 },
|
@@ -1,28 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* ==========================================================================
|
4
|
+
* SproutCore -- JavaScript Application Framework
|
5
|
+
* copyright 2006-2011, Strobe Inc. and contributors.
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
* copy of this software and associated documentation files (the "Software"),
|
9
|
+
* to deal in the Software without restriction, including without limitation
|
10
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
* and/or sell copies of the Software, and to permit persons to whom the
|
12
|
+
* Software is furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
* DEALINGS IN THE SOFTWARE.
|
24
|
+
*
|
25
|
+
* For more information about SproutCore, visit http://www.sproutcore.com
|
26
|
+
*
|
27
|
+
*
|
28
|
+
* ==========================================================================
|
29
|
+
*/
|
@@ -15,11 +15,11 @@ sc_require('license') ;
|
|
15
15
|
|
16
16
|
// ........................................
|
17
17
|
// GLOBAL CONSTANTS
|
18
|
-
//
|
19
|
-
// Most global constants should be defined inside of the SC namespace.
|
18
|
+
//
|
19
|
+
// Most global constants should be defined inside of the SC namespace.
|
20
20
|
// However the following two are useful enough and generally benign enough
|
21
21
|
// to put into the global object.
|
22
|
-
var YES = true ;
|
22
|
+
var YES = true ;
|
23
23
|
var NO = false ;
|
24
24
|
|
25
25
|
// prevent a console.log from blowing things up if we are on a browser that
|
@@ -31,31 +31,34 @@ if (typeof console === 'undefined') {
|
|
31
31
|
|
32
32
|
// ........................................
|
33
33
|
// BOOTSTRAP
|
34
|
-
//
|
34
|
+
//
|
35
35
|
// The root namespace and some common utility methods are defined here. The
|
36
36
|
// rest of the methods go into the mixin defined below.
|
37
37
|
|
38
38
|
/**
|
39
|
+
@version 1.5.0.pre.3
|
39
40
|
@namespace
|
40
|
-
|
41
|
+
|
41
42
|
The SproutCore namespace. All SproutCore methods and functions are defined
|
42
43
|
inside of this namespace. You generally should not add new properties to
|
43
44
|
this namespace as it may be overwritten by future versions of SproutCore.
|
44
|
-
|
45
|
+
|
45
46
|
You can also use the shorthand "SC" instead of "SproutCore".
|
46
|
-
|
47
|
+
|
47
48
|
SproutCore-Base is a framework that provides core functions for SproutCore
|
48
49
|
including cross-platform functions, support for property observing and
|
49
|
-
objects. It's focus is on small size and performance. You can use this
|
50
|
+
objects. It's focus is on small size and performance. You can use this
|
50
51
|
in place of or along-side other cross-platform libraries such as jQuery or
|
51
52
|
Prototype.
|
52
|
-
|
53
|
-
The core Base framework is based on the jQuery API with a number of
|
53
|
+
|
54
|
+
The core Base framework is based on the jQuery API with a number of
|
54
55
|
performance optimizations.
|
55
56
|
*/
|
56
|
-
var SC = SC || {} ;
|
57
|
+
var SC = SC || {} ;
|
57
58
|
var SproutCore = SproutCore || SC ;
|
58
59
|
|
60
|
+
SC.VERSION = '1.5.0.pre.3';
|
61
|
+
|
59
62
|
/**
|
60
63
|
@private
|
61
64
|
|
@@ -65,7 +68,7 @@ var SproutCore = SproutCore || SC ;
|
|
65
68
|
Used as a base function for the wrapper functions SC.mixin and SC.supplement.
|
66
69
|
|
67
70
|
@param overwrite {Boolean} if a target has a value for a property, this specifies
|
68
|
-
whether or not to overwrite that value with the copyied object's
|
71
|
+
whether or not to overwrite that value with the copyied object's
|
69
72
|
property value.
|
70
73
|
@param target {Object} the target object to extend
|
71
74
|
@param properties {Object} one or more objects with properties to copy.
|
@@ -95,14 +98,14 @@ SC._baseMixin = function (override) {
|
|
95
98
|
if (copy !== undefined && ( override || (target[key] === undefined) )) target[key] = copy ;
|
96
99
|
}
|
97
100
|
}
|
98
|
-
|
101
|
+
|
99
102
|
return target;
|
100
103
|
} ;
|
101
104
|
|
102
105
|
/**
|
103
106
|
Adds properties to a target object.
|
104
|
-
|
105
|
-
Takes the root object and adds the attributes for any additional
|
107
|
+
|
108
|
+
Takes the root object and adds the attributes for any additional
|
106
109
|
arguments passed.
|
107
110
|
|
108
111
|
@param target {Object} the target object to extend
|
@@ -119,8 +122,8 @@ SC.mixin = function() {
|
|
119
122
|
/**
|
120
123
|
Adds properties to a target object. Unlike SC.mixin, however, if the target
|
121
124
|
already has a value for a property, it will not be overwritten.
|
122
|
-
|
123
|
-
Takes the root object and adds the attributes for any additional
|
125
|
+
|
126
|
+
Takes the root object and adds the attributes for any additional
|
124
127
|
arguments passed.
|
125
128
|
|
126
129
|
@param target {Object} the target object to extend
|
@@ -134,22 +137,22 @@ SC.supplement = function() {
|
|
134
137
|
return SC._baseMixin.apply(this, args);
|
135
138
|
} ;
|
136
139
|
|
137
|
-
/**
|
140
|
+
/**
|
138
141
|
Alternative to mixin. Provided for compatibility with jQuery.
|
139
|
-
@function
|
142
|
+
@function
|
140
143
|
*/
|
141
144
|
SC.extend = SC.mixin ;
|
142
145
|
|
143
146
|
// ..........................................................
|
144
147
|
// CORE FUNCTIONS
|
145
|
-
//
|
148
|
+
//
|
146
149
|
// Enough with the bootstrap code. Let's define some core functions
|
147
150
|
|
148
151
|
SC.mixin(/** @scope SC */ {
|
149
|
-
|
152
|
+
|
150
153
|
// ........................................
|
151
154
|
// GLOBAL CONSTANTS
|
152
|
-
//
|
155
|
+
//
|
153
156
|
T_ERROR: 'error',
|
154
157
|
T_OBJECT: 'object',
|
155
158
|
T_NULL: 'null',
|
@@ -161,16 +164,16 @@ SC.mixin(/** @scope SC */ {
|
|
161
164
|
T_BOOL: 'boolean',
|
162
165
|
T_ARRAY: 'array',
|
163
166
|
T_STRING: 'string',
|
164
|
-
|
167
|
+
|
165
168
|
// ........................................
|
166
169
|
// TYPING & ARRAY MESSAGING
|
167
|
-
//
|
170
|
+
//
|
168
171
|
|
169
172
|
/**
|
170
173
|
Returns a consistant type for the passed item.
|
171
174
|
|
172
|
-
Use this instead of the built-in typeOf() to get the type of an item.
|
173
|
-
It will return the same result across all browsers and includes a bit
|
175
|
+
Use this instead of the built-in typeOf() to get the type of an item.
|
176
|
+
It will return the same result across all browsers and includes a bit
|
174
177
|
more detail. Here is what will be returned:
|
175
178
|
|
176
179
|
| Return Value Constant | Meaning |
|
@@ -187,124 +190,133 @@ SC.mixin(/** @scope SC */ {
|
|
187
190
|
|
188
191
|
@param item {Object} the item to check
|
189
192
|
@returns {String} the type
|
190
|
-
*/
|
193
|
+
*/
|
191
194
|
typeOf: function(item) {
|
192
195
|
if (item === undefined) return SC.T_UNDEFINED ;
|
193
|
-
if (item === null) return SC.T_NULL ;
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
} else if (ret === SC.T_FUNCTION) ret = (item.isClass) ? SC.T_CLASS : SC.T_FUNCTION;
|
211
|
-
return ret ;
|
196
|
+
if (item === null) return SC.T_NULL ;
|
197
|
+
|
198
|
+
var nativeType = jQuery.type(item);
|
199
|
+
|
200
|
+
if (nativeType === "function") {
|
201
|
+
return item.isClass ? SC.T_CLASS : SC.T_FUNCTION
|
202
|
+
} else if (nativeType === "object") {
|
203
|
+
if (item.isError) {
|
204
|
+
return SC.T_ERROR ;
|
205
|
+
} else if (item.isObject) {
|
206
|
+
return SC.T_OBJECT ;
|
207
|
+
} else {
|
208
|
+
return SC.T_HASH ;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
return nativeType ;
|
212
213
|
},
|
213
214
|
|
214
215
|
/**
|
215
216
|
Returns YES if the passed value is null or undefined. This avoids errors
|
216
|
-
from JSLint complaining about use of ==, which can be technically
|
217
|
+
from JSLint complaining about use of ==, which can be technically
|
217
218
|
confusing.
|
218
|
-
|
219
|
+
|
219
220
|
@param {Object} obj value to test
|
220
221
|
@returns {Boolean}
|
221
222
|
*/
|
222
223
|
none: function(obj) {
|
223
|
-
return obj
|
224
|
+
return obj == null;
|
224
225
|
},
|
225
226
|
|
226
227
|
/**
|
227
|
-
Verifies that a value is either null or an empty string.
|
228
|
+
Verifies that a value is either null or an empty string. Return false if
|
228
229
|
the object is not a string.
|
229
|
-
|
230
|
+
|
230
231
|
@param {Object} obj value to test
|
231
232
|
@returns {Boolean}
|
232
233
|
*/
|
233
234
|
empty: function(obj) {
|
234
|
-
return obj===null || obj===undefined || obj==='';
|
235
|
+
return obj === null || obj === undefined || obj === '';
|
235
236
|
},
|
236
|
-
|
237
|
+
|
237
238
|
/**
|
238
|
-
Returns YES if the passed object is an array or
|
239
|
-
of the NodeList class return NO.
|
239
|
+
Returns YES if the passed object is an array or Array-like.
|
240
240
|
|
241
|
-
|
242
|
-
|
241
|
+
SproutCore Array Protocol:
|
242
|
+
* the object has an objectAt property; or
|
243
|
+
* the object is a native Array; or
|
244
|
+
* the object is an Object, and has a length property
|
245
|
+
|
246
|
+
Unlike SC.typeOf this method returns true even if the passed object is
|
247
|
+
not formally array but appears to be array-like (i.e. has a length
|
243
248
|
property, responds to .objectAt, etc.)
|
244
249
|
|
245
250
|
@param obj {Object} the object to test
|
246
|
-
@returns {Boolean}
|
251
|
+
@returns {Boolean}
|
247
252
|
*/
|
248
253
|
isArray: function(obj) {
|
249
|
-
if (obj
|
250
|
-
|
251
|
-
|
252
|
-
|
254
|
+
if ( !obj || obj.setInterval ) {
|
255
|
+
return false;
|
256
|
+
} else if ( obj.objectAt ) {
|
257
|
+
return true ;
|
258
|
+
} else if ( obj.length && jQuery.type(obj) === "object" ) {
|
259
|
+
return true
|
260
|
+
}
|
261
|
+
|
262
|
+
return false;
|
253
263
|
},
|
254
264
|
|
255
265
|
/**
|
256
266
|
Makes an object into an Array if it is not array or array-like already.
|
257
267
|
Unlike SC.A(), this method will not clone the object if it is already
|
258
268
|
an array.
|
259
|
-
|
269
|
+
|
260
270
|
@param {Object} obj object to convert
|
261
271
|
@returns {Array} Actual array
|
262
272
|
*/
|
263
273
|
makeArray: function(obj) {
|
264
274
|
return SC.isArray(obj) ? obj : SC.A(obj);
|
265
275
|
},
|
266
|
-
|
276
|
+
|
267
277
|
/**
|
268
|
-
Converts the passed object to an Array. If the object appears to be
|
278
|
+
Converts the passed object to an Array. If the object appears to be
|
269
279
|
array-like, a new array will be cloned from it. Otherwise, a new array
|
270
280
|
will be created with the item itself as the only item in the array.
|
271
|
-
|
281
|
+
|
272
282
|
@param object {Object} any enumerable or array-like object.
|
273
283
|
@returns {Array} Array of items
|
274
284
|
*/
|
275
285
|
A: function(obj) {
|
276
286
|
// null or undefined -- fast path
|
277
|
-
if (obj === null || obj === undefined) return [] ;
|
278
|
-
|
287
|
+
if ( obj === null || obj === undefined ) return [] ;
|
288
|
+
|
279
289
|
// primitive -- fast path
|
280
|
-
if (obj.slice instanceof Function) {
|
290
|
+
if ( obj.slice instanceof Function ) {
|
281
291
|
// do we have a string?
|
282
|
-
if (typeof(obj) === 'string') return [obj] ;
|
292
|
+
if ( typeof(obj) === 'string' ) return [obj] ;
|
283
293
|
else return obj.slice() ;
|
284
294
|
}
|
285
|
-
|
295
|
+
|
286
296
|
// enumerable -- fast path
|
287
297
|
if (obj.toArray) return obj.toArray() ;
|
288
|
-
|
298
|
+
|
289
299
|
// if not array-like, then just wrap in array.
|
290
300
|
if (!SC.isArray(obj)) return [obj];
|
291
|
-
|
301
|
+
|
292
302
|
// when all else fails, do a manual convert...
|
293
303
|
var ret = [], len = obj.length;
|
294
304
|
while(--len >= 0) ret[len] = obj[len];
|
295
305
|
return ret ;
|
296
306
|
},
|
297
|
-
|
298
|
-
//
|
307
|
+
|
308
|
+
//
|
299
309
|
// GUIDS & HASHES
|
300
|
-
//
|
301
|
-
|
302
|
-
guidKey:
|
310
|
+
//
|
311
|
+
|
312
|
+
guidKey: jQuery.expando,
|
303
313
|
|
304
314
|
// Used for guid generation...
|
305
|
-
|
315
|
+
_guidPrefixes: {"number": "nu", "string": "st"},
|
316
|
+
_guidCaches: {"number": {}, "string": {}},
|
317
|
+
_numberGuids: [], _stringGuids: {}, _keyCache: {},
|
306
318
|
|
307
|
-
/**
|
319
|
+
/**"
|
308
320
|
Returns a unique GUID for the object. If the object does not yet have
|
309
321
|
a guid, one will be assigned to it. You can call this on any object,
|
310
322
|
SC.Object-based or not, but be aware that it will add a _guid property.
|
@@ -315,10 +327,25 @@ SC.mixin(/** @scope SC */ {
|
|
315
327
|
@returns {String} the unique guid for this instance.
|
316
328
|
*/
|
317
329
|
guidFor: function(obj) {
|
318
|
-
|
330
|
+
|
319
331
|
// special cases where we don't want to add a key to object
|
320
332
|
if (obj === undefined) return "(undefined)";
|
321
|
-
if (obj === null) return
|
333
|
+
if (obj === null) return "(null)";
|
334
|
+
|
335
|
+
var type = typeof obj;
|
336
|
+
|
337
|
+
// Don't allow prototype changes to String etc. to change the guidFor
|
338
|
+
if (type === SC.T_NUMBER || type === SC.T_STRING) {
|
339
|
+
cache = this._guidCaches[type];
|
340
|
+
ret = cache[obj];
|
341
|
+
if(!ret) {
|
342
|
+
ret = "st" + (jQuery.uuid++);
|
343
|
+
cache[obj] = ret;
|
344
|
+
}
|
345
|
+
return ret;
|
346
|
+
} else if (type === SC.T_BOOL) {
|
347
|
+
return (obj) ? "(true)" : "(false)"
|
348
|
+
}
|
322
349
|
|
323
350
|
var guidKey = this.guidKey;
|
324
351
|
if (obj[guidKey]) return obj[guidKey];
|
@@ -329,41 +356,19 @@ SC.mixin(/** @scope SC */ {
|
|
329
356
|
if (obj === Array) return '(Array)';
|
330
357
|
|
331
358
|
var cache, ret;
|
359
|
+
var type = typeof obj;
|
332
360
|
|
333
|
-
|
334
|
-
case SC.T_NUMBER:
|
335
|
-
cache = this._numberGuids;
|
336
|
-
ret = cache[obj];
|
337
|
-
if (!ret) {
|
338
|
-
ret = "nu" + obj;
|
339
|
-
cache[obj] = ret;
|
340
|
-
}
|
341
|
-
return ret;
|
342
|
-
|
343
|
-
case SC.T_STRING:
|
344
|
-
cache = this._stringGuids;
|
345
|
-
ret = cache[obj];
|
346
|
-
if (!ret) {
|
347
|
-
ret = "st" + obj;
|
348
|
-
cache[obj] = ret;
|
349
|
-
}
|
350
|
-
return ret;
|
351
|
-
|
352
|
-
case SC.T_BOOL:
|
353
|
-
return (obj) ? "(true)" : "(false)" ;
|
354
|
-
default:
|
355
|
-
return SC.generateGuid(obj);
|
356
|
-
}
|
361
|
+
return SC.generateGuid(obj, "sc");
|
357
362
|
},
|
358
363
|
|
359
364
|
/**
|
360
|
-
Returns a key name that combines the named key + prefix. This is more
|
361
|
-
efficient than simply combining strings because it uses a cache
|
365
|
+
Returns a key name that combines the named key + prefix. This is more
|
366
|
+
efficient than simply combining strings because it uses a cache
|
362
367
|
internally for performance.
|
363
|
-
|
368
|
+
|
364
369
|
@param {String} prefix the prefix to attach to the key
|
365
370
|
@param {String} key key
|
366
|
-
@returns {String} result
|
371
|
+
@returns {String} result
|
367
372
|
*/
|
368
373
|
keyFor: function(prefix, key) {
|
369
374
|
var ret, pcache = this._keyCache[prefix];
|
@@ -381,8 +386,8 @@ SC.mixin(/** @scope SC */ {
|
|
381
386
|
@param {Object} obj the object to assign the guid to
|
382
387
|
@returns {String} the guid
|
383
388
|
*/
|
384
|
-
generateGuid: function(obj) {
|
385
|
-
var ret = (
|
389
|
+
generateGuid: function(obj, prefix) {
|
390
|
+
var ret = (prefix + (jQuery.uuid++));
|
386
391
|
if (obj) obj[this.guidKey] = ret ;
|
387
392
|
return ret ;
|
388
393
|
},
|
@@ -391,34 +396,34 @@ SC.mixin(/** @scope SC */ {
|
|
391
396
|
Returns a unique hash code for the object. If the object implements
|
392
397
|
a hash() method, the value of that method will be returned. Otherwise,
|
393
398
|
this will return the same value as guidFor().
|
394
|
-
|
395
|
-
If you pass multiple arguments, hashFor returns a string obtained by
|
399
|
+
|
400
|
+
If you pass multiple arguments, hashFor returns a string obtained by
|
396
401
|
concatenating the hash code of each argument.
|
397
402
|
|
398
|
-
Unlike guidFor(), this method allows you to implement logic in your
|
403
|
+
Unlike guidFor(), this method allows you to implement logic in your
|
399
404
|
code to cause two separate instances of the same object to be treated as
|
400
405
|
if they were equal for comparisons and other functions.
|
401
406
|
|
402
|
-
IMPORTANT: If you implement a hash() method, it MUST NOT return a
|
403
|
-
number or a string that contains only a number. Typically hash codes
|
407
|
+
IMPORTANT: If you implement a hash() method, it MUST NOT return a
|
408
|
+
number or a string that contains only a number. Typically hash codes
|
404
409
|
are strings that begin with a "%".
|
405
410
|
|
406
411
|
@param obj {Object} the object(s)
|
407
412
|
@returns {String} the hash code for this instance.
|
408
413
|
*/
|
409
414
|
hashFor: function() {
|
410
|
-
var
|
415
|
+
var l = arguments.length,
|
411
416
|
h = '',
|
412
417
|
obj, f, i;
|
413
|
-
|
414
|
-
for (i
|
418
|
+
|
419
|
+
for (i=0 ; i<l; ++i) {
|
415
420
|
obj = arguments[i];
|
416
421
|
h += (obj && (f = obj.hash) && (typeof f === SC.T_FUNCTION)) ? f.call(obj) : this.guidFor(obj);
|
417
422
|
}
|
418
|
-
|
423
|
+
|
419
424
|
return h === '' ? null : h;
|
420
425
|
},
|
421
|
-
|
426
|
+
|
422
427
|
/**
|
423
428
|
This will compare the two object values using their hash codes.
|
424
429
|
|
@@ -428,24 +433,18 @@ SC.mixin(/** @scope SC */ {
|
|
428
433
|
|
429
434
|
*/
|
430
435
|
isEqual: function(a,b) {
|
431
|
-
//
|
432
|
-
|
433
|
-
|
434
|
-
} else if (a === undefined) {
|
435
|
-
return b === undefined ;
|
436
|
-
|
437
|
-
// finally, check their hash-codes
|
438
|
-
} else return this.hashFor(a) === this.hashFor(b) ;
|
436
|
+
// QUESTION: is there a compelling performance reason to special-case
|
437
|
+
// undefined here?
|
438
|
+
return this.hashFor(a) === this.hashFor(b) ;
|
439
439
|
},
|
440
|
-
|
441
|
-
|
440
|
+
|
442
441
|
/**
|
443
442
|
This will compare two javascript values of possibly different types.
|
444
443
|
It will tell you which one is greater than the other by returning
|
445
444
|
-1 if the first is smaller than the second,
|
446
445
|
0 if both are equal,
|
447
446
|
1 if the first is greater than the second.
|
448
|
-
|
447
|
+
|
449
448
|
The order is calculated based on SC.ORDER_DEFINITION , if types are different.
|
450
449
|
In case they have the same type an appropriate comparison for this type is made.
|
451
450
|
|
@@ -458,10 +457,10 @@ SC.mixin(/** @scope SC */ {
|
|
458
457
|
// Doing a '===' check is very cheap, so in the case of equality, checking
|
459
458
|
// this up-front is a big win.
|
460
459
|
if (v === w) return 0;
|
461
|
-
|
460
|
+
|
462
461
|
var type1 = SC.typeOf(v);
|
463
462
|
var type2 = SC.typeOf(w);
|
464
|
-
|
463
|
+
|
465
464
|
// If we haven't yet generated a reverse-mapping of SC.ORDER_DEFINITION,
|
466
465
|
// do so now.
|
467
466
|
var mapping = SC.ORDER_DEFINITION_MAPPING;
|
@@ -472,17 +471,17 @@ SC.mixin(/** @scope SC */ {
|
|
472
471
|
for (idx = 0, len = order.length; idx < len; ++idx) {
|
473
472
|
mapping[order[idx]] = idx;
|
474
473
|
}
|
475
|
-
|
474
|
+
|
476
475
|
// We no longer need SC.ORDER_DEFINITION.
|
477
476
|
delete SC.ORDER_DEFINITION;
|
478
477
|
}
|
479
|
-
|
478
|
+
|
480
479
|
var type1Index = mapping[type1];
|
481
480
|
var type2Index = mapping[type2];
|
482
|
-
|
481
|
+
|
483
482
|
if (type1Index < type2Index) return -1;
|
484
483
|
if (type1Index > type2Index) return 1;
|
485
|
-
|
484
|
+
|
486
485
|
// ok - types are equal - so we have to check values now
|
487
486
|
switch (type1) {
|
488
487
|
case SC.T_BOOL:
|
@@ -509,14 +508,14 @@ SC.mixin(/** @scope SC */ {
|
|
509
508
|
i++;
|
510
509
|
}
|
511
510
|
if (r !== 0) return r;
|
512
|
-
|
511
|
+
|
513
512
|
// all elements are equal now
|
514
513
|
// shorter array should be ordered first
|
515
514
|
if (vLen < wLen) return -1;
|
516
515
|
if (vLen > wLen) return 1;
|
517
516
|
// arrays are equal now
|
518
517
|
return 0;
|
519
|
-
|
518
|
+
|
520
519
|
case SC.T_OBJECT:
|
521
520
|
if (v.constructor.isComparable === YES) return v.constructor.compare(v, w);
|
522
521
|
return 0;
|
@@ -525,43 +524,44 @@ SC.mixin(/** @scope SC */ {
|
|
525
524
|
return 0;
|
526
525
|
}
|
527
526
|
},
|
528
|
-
|
527
|
+
|
529
528
|
// ..........................................................
|
530
529
|
// OBJECT MANAGEMENT
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
530
|
+
//
|
531
|
+
|
532
|
+
/**
|
533
|
+
Empty function. Useful for some operations.
|
534
|
+
|
535
535
|
@returns {Object}
|
536
536
|
*/
|
537
537
|
K: function() { return this; },
|
538
538
|
|
539
|
-
/**
|
539
|
+
/**
|
540
540
|
Empty array. Useful for some optimizations.
|
541
|
-
|
541
|
+
|
542
542
|
@property {Array}
|
543
543
|
*/
|
544
544
|
EMPTY_ARRAY: [],
|
545
545
|
|
546
546
|
/**
|
547
547
|
Empty hash. Useful for some optimizations.
|
548
|
-
|
548
|
+
|
549
549
|
@property {Hash}
|
550
550
|
*/
|
551
551
|
EMPTY_HASH: {},
|
552
552
|
|
553
553
|
/**
|
554
554
|
Empty range. Useful for some optimizations.
|
555
|
-
|
555
|
+
|
556
556
|
@property {Range}
|
557
557
|
*/
|
558
558
|
EMPTY_RANGE: {start: 0, length: 0},
|
559
|
-
|
559
|
+
|
560
560
|
/**
|
561
561
|
Creates a new object with the passed object as its prototype.
|
562
562
|
|
563
|
-
This method uses JavaScript's native inheritence method to create a new
|
564
|
-
object.
|
563
|
+
This method uses JavaScript's native inheritence method to create a new
|
564
|
+
object.
|
565
565
|
|
566
566
|
You cannot use beget() to create new SC.Object-based objects, but you
|
567
567
|
can use it to beget Arrays, Hashes, Sets and objects you build yourself.
|
@@ -569,10 +569,10 @@ SC.mixin(/** @scope SC */ {
|
|
569
569
|
didBeget() method on the object you passed in if it is defined. You can
|
570
570
|
use this method to perform any other setup needed.
|
571
571
|
|
572
|
-
In general, you will not use beget() often as SC.Object is much more
|
572
|
+
In general, you will not use beget() often as SC.Object is much more
|
573
573
|
useful, but for certain rare algorithms, this method can be very useful.
|
574
574
|
|
575
|
-
For more information on using beget(), see the section on beget() in
|
575
|
+
For more information on using beget(), see the section on beget() in
|
576
576
|
Crockford's JavaScript: The Good Parts.
|
577
577
|
|
578
578
|
@param obj {Object} the object to beget
|
@@ -583,7 +583,7 @@ SC.mixin(/** @scope SC */ {
|
|
583
583
|
var K = SC.K; K.prototype = obj ;
|
584
584
|
var ret = new K();
|
585
585
|
K.prototype = null ; // avoid leaks
|
586
|
-
if (typeof obj.didBeget === "function") ret = obj.didBeget(ret);
|
586
|
+
if (typeof obj.didBeget === "function") ret = obj.didBeget(ret);
|
587
587
|
return ret ;
|
588
588
|
},
|
589
589
|
|
@@ -602,26 +602,25 @@ SC.mixin(/** @scope SC */ {
|
|
602
602
|
copy: function(object, deep) {
|
603
603
|
var ret = object, idx ;
|
604
604
|
|
605
|
-
// fast
|
606
|
-
if (object) {
|
607
|
-
if (object.isCopyable) return object.copy(deep);
|
608
|
-
if (
|
605
|
+
// fast paths
|
606
|
+
if ( object ) {
|
607
|
+
if ( object.isCopyable ) return object.copy( deep );
|
608
|
+
if ( object.clone ) return object.clone();
|
609
609
|
}
|
610
610
|
|
611
|
-
switch (
|
612
|
-
case
|
613
|
-
ret = object.slice()
|
614
|
-
|
611
|
+
switch ( jQuery.type(object) ) {
|
612
|
+
case "array":
|
613
|
+
ret = object.slice();
|
614
|
+
|
615
|
+
if ( deep ) {
|
615
616
|
idx = ret.length;
|
616
|
-
while (idx--) ret[idx] = SC.copy(ret[idx], true);
|
617
|
+
while ( idx-- ) { ret[idx] = SC.copy( ret[idx], true ); }
|
618
|
+
break ;
|
617
619
|
}
|
618
|
-
break ;
|
619
620
|
|
620
|
-
case
|
621
|
-
|
622
|
-
ret =
|
623
|
-
for (var key in object) ret[key] = deep ? SC.copy(object[key], true) : object[key];
|
624
|
-
break ;
|
621
|
+
case "object":
|
622
|
+
ret = {} ;
|
623
|
+
for(var key in object) { ret[key] = deep ? SC.copy(object[key], true) : object[key] ; }
|
625
624
|
}
|
626
625
|
|
627
626
|
return ret ;
|
@@ -635,7 +634,7 @@ SC.mixin(/** @scope SC */ {
|
|
635
634
|
*/
|
636
635
|
merge: function() {
|
637
636
|
var ret = {}, len = arguments.length, idx;
|
638
|
-
for(idx=0;idx<len;idx++) SC.mixin(ret, arguments[idx]);
|
637
|
+
for(idx=0; idx<len; idx++) SC.mixin(ret, arguments[idx]);
|
639
638
|
return ret ;
|
640
639
|
},
|
641
640
|
|
@@ -653,7 +652,7 @@ SC.mixin(/** @scope SC */ {
|
|
653
652
|
},
|
654
653
|
|
655
654
|
/**
|
656
|
-
Convenience method to inspect an object. This method will attempt to
|
655
|
+
Convenience method to inspect an object. This method will attempt to
|
657
656
|
convert the object into a useful string description.
|
658
657
|
*/
|
659
658
|
inspect: function(obj) {
|
@@ -668,8 +667,8 @@ SC.mixin(/** @scope SC */ {
|
|
668
667
|
},
|
669
668
|
|
670
669
|
/**
|
671
|
-
Returns a tuple containing the object and key for the specified property
|
672
|
-
path. If no object could be found to match the property path, then
|
670
|
+
Returns a tuple containing the object and key for the specified property
|
671
|
+
path. If no object could be found to match the property path, then
|
673
672
|
returns null.
|
674
673
|
|
675
674
|
This is the standard method used throughout SproutCore to resolve property
|
@@ -695,8 +694,8 @@ SC.mixin(/** @scope SC */ {
|
|
695
694
|
return (obj && key) ? [obj,key] : null ;
|
696
695
|
},
|
697
696
|
|
698
|
-
/**
|
699
|
-
Finds the object for the passed path or array of path components. This is
|
697
|
+
/**
|
698
|
+
Finds the object for the passed path or array of path components. This is
|
700
699
|
the standard method used in SproutCore to traverse object paths.
|
701
700
|
|
702
701
|
@param path {String} the path
|
@@ -719,7 +718,7 @@ SC.mixin(/** @scope SC */ {
|
|
719
718
|
if ((nextDotAt < 0) || (nextDotAt > stopAt)) nextDotAt = stopAt;
|
720
719
|
key = path.slice(loc, nextDotAt);
|
721
720
|
root = root.get ? root.get(key) : root[key] ;
|
722
|
-
loc = nextDotAt+1;
|
721
|
+
loc = nextDotAt+1;
|
723
722
|
}
|
724
723
|
if (loc < stopAt) root = undefined; // hit a dead end. :(
|
725
724
|
|
@@ -736,23 +735,23 @@ SC.mixin(/** @scope SC */ {
|
|
736
735
|
|
737
736
|
return root ;
|
738
737
|
},
|
739
|
-
|
740
|
-
|
738
|
+
|
739
|
+
|
741
740
|
// ..........................................................
|
742
741
|
// LOCALIZATION SUPPORT
|
743
|
-
//
|
744
|
-
|
742
|
+
//
|
743
|
+
|
745
744
|
/**
|
746
745
|
Known loc strings
|
747
|
-
|
746
|
+
|
748
747
|
@property {Hash}
|
749
748
|
*/
|
750
749
|
STRINGS: {},
|
751
|
-
|
750
|
+
|
752
751
|
/**
|
753
752
|
This is a simplified handler for installing a bunch of strings. This
|
754
753
|
ignores the language name and simply applies the passed strings hash.
|
755
|
-
|
754
|
+
|
756
755
|
@param {String} lang the language the strings are for
|
757
756
|
@param {Hash} strings hash of strings
|
758
757
|
@returns {SC} receiver
|
@@ -761,8 +760,8 @@ SC.mixin(/** @scope SC */ {
|
|
761
760
|
SC.mixin(SC.STRINGS, strings);
|
762
761
|
return this ;
|
763
762
|
}
|
764
|
-
|
765
|
-
|
763
|
+
|
764
|
+
|
766
765
|
}); // end mixin
|
767
766
|
|
768
767
|
/** @private Aliasn for SC.clone() */
|
@@ -792,31 +791,77 @@ SC.ORDER_DEFINITION = [ SC.T_ERROR,
|
|
792
791
|
// FUNCTION ENHANCEMENTS
|
793
792
|
//
|
794
793
|
|
795
|
-
SC.
|
794
|
+
SC.Function = {
|
795
|
+
property: function(fn, keys) {
|
796
|
+
fn.dependentKeys = SC.$A(keys) ;
|
797
|
+
var guid = SC.guidFor(fn) ;
|
798
|
+
fn.cacheKey = "__cache__" + guid ;
|
799
|
+
fn.lastSetValueKey = "__lastValue__" + guid ;
|
800
|
+
fn.isProperty = true ;
|
801
|
+
return fn ;
|
802
|
+
},
|
803
|
+
|
804
|
+
cacheable: function(fn, aFlag) {
|
805
|
+
fn.isProperty = true ; // also make a property just in case
|
806
|
+
if (!fn.dependentKeys) fn.dependentKeys = [] ;
|
807
|
+
fn.isCacheable = (aFlag === undefined) ? true : aFlag ;
|
808
|
+
return fn ;
|
809
|
+
},
|
810
|
+
|
811
|
+
idempotent: function(fn, aFlag) {
|
812
|
+
fn.isProperty = true; // also make a property just in case
|
813
|
+
if (!fn.dependentKeys) this.dependentKeys = [] ;
|
814
|
+
fn.isVolatile = (aFlag === undefined) ? true : aFlag ;
|
815
|
+
return fn ;
|
816
|
+
},
|
817
|
+
|
818
|
+
observes: function(fn, propertyPaths) {
|
819
|
+
// sort property paths into local paths (i.e just a property name) and
|
820
|
+
// full paths (i.e. those with a . or * in them)
|
821
|
+
var loc = propertyPaths.length, local = null, paths = null ;
|
822
|
+
while(--loc >= 0) {
|
823
|
+
var path = propertyPaths[loc] ;
|
824
|
+
// local
|
825
|
+
if ((path.indexOf('.')<0) && (path.indexOf('*')<0)) {
|
826
|
+
if (!local) local = fn.localPropertyPaths = [] ;
|
827
|
+
local.push(path);
|
828
|
+
|
829
|
+
// regular
|
830
|
+
} else {
|
831
|
+
if (!paths) paths = fn.propertyPaths = [] ;
|
832
|
+
paths.push(path) ;
|
833
|
+
}
|
834
|
+
}
|
835
|
+
return fn ;
|
836
|
+
}
|
837
|
+
|
838
|
+
}
|
839
|
+
|
840
|
+
SC.mixin(Function.prototype,
|
796
841
|
/** @lends Function.prototype */ {
|
797
|
-
|
842
|
+
|
798
843
|
/**
|
799
844
|
Indicates that the function should be treated as a computed property.
|
800
|
-
|
845
|
+
|
801
846
|
Computed properties are methods that you want to treat as if they were
|
802
847
|
static properties. When you use get() or set() on a computed property,
|
803
|
-
the object will call the property method and return its value instead of
|
804
|
-
returning the method itself. This makes it easy to create "virtual
|
848
|
+
the object will call the property method and return its value instead of
|
849
|
+
returning the method itself. This makes it easy to create "virtual
|
805
850
|
properties" that are computed dynamically from other properties.
|
806
|
-
|
851
|
+
|
807
852
|
Consider the following example:
|
808
|
-
|
853
|
+
|
809
854
|
{{{
|
810
855
|
contact = SC.Object.create({
|
811
856
|
|
812
857
|
firstName: "Charles",
|
813
858
|
lastName: "Jolley",
|
814
|
-
|
859
|
+
|
815
860
|
// This is a computed property!
|
816
861
|
fullName: function() {
|
817
862
|
return this.getEach('firstName','lastName').compact().join(' ') ;
|
818
863
|
}.property('firstName', 'lastName'),
|
819
|
-
|
864
|
+
|
820
865
|
// this is not
|
821
866
|
getFullName: function() {
|
822
867
|
return this.getEach('firstName','lastName').compact().join(' ') ;
|
@@ -825,57 +870,57 @@ SC.mixin(Function.prototype,
|
|
825
870
|
|
826
871
|
contact.get('firstName') ;
|
827
872
|
--> "Charles"
|
828
|
-
|
873
|
+
|
829
874
|
contact.get('fullName') ;
|
830
875
|
--> "Charles Jolley"
|
831
|
-
|
876
|
+
|
832
877
|
contact.get('getFullName') ;
|
833
878
|
--> function()
|
834
879
|
}}}
|
835
|
-
|
880
|
+
|
836
881
|
Note that when you get the fullName property, SproutCore will call the
|
837
882
|
fullName() function and return its value whereas when you get() a property
|
838
|
-
that contains a regular method (such as getFullName above), then the
|
883
|
+
that contains a regular method (such as getFullName above), then the
|
839
884
|
function itself will be returned instead.
|
840
|
-
|
885
|
+
|
841
886
|
h2. Using Dependent Keys
|
842
887
|
|
843
|
-
Computed properties are often computed dynamically from other member
|
888
|
+
Computed properties are often computed dynamically from other member
|
844
889
|
properties. Whenever those properties change, you need to notify any
|
845
890
|
object that is observing the computed property that the computed property
|
846
891
|
has changed also. We call these properties the computed property is based
|
847
892
|
upon "dependent keys".
|
848
|
-
|
893
|
+
|
849
894
|
For example, in the contact object above, the fullName property depends on
|
850
895
|
the firstName and lastName property. If either property value changes,
|
851
|
-
any observer watching the fullName property will need to be notified as
|
896
|
+
any observer watching the fullName property will need to be notified as
|
852
897
|
well.
|
853
|
-
|
898
|
+
|
854
899
|
You inform SproutCore of these dependent keys by passing the key names
|
855
900
|
as parameters to the property() function. Whenever the value of any key
|
856
901
|
you name here changes, the computed property will be marked as changed
|
857
902
|
also.
|
858
|
-
|
859
|
-
You should always register dependent keys for computed properties to
|
903
|
+
|
904
|
+
You should always register dependent keys for computed properties to
|
860
905
|
ensure they update.
|
861
|
-
|
906
|
+
|
862
907
|
h2. Using Computed Properties as Setters
|
863
|
-
|
908
|
+
|
864
909
|
Computed properties can be used to modify the state of an object as well
|
865
|
-
as to return a value. Unlike many other key-value system, you use the
|
866
|
-
same method to both get and set values on a computed property. To
|
910
|
+
as to return a value. Unlike many other key-value system, you use the
|
911
|
+
same method to both get and set values on a computed property. To
|
867
912
|
write a setter, simply declare two extra parameters: key and value.
|
868
|
-
|
869
|
-
Whenever your property function is called as a setter, the value
|
913
|
+
|
914
|
+
Whenever your property function is called as a setter, the value
|
870
915
|
parameter will be set. Whenever your property is called as a getter the
|
871
916
|
value parameter will be undefined.
|
872
|
-
|
917
|
+
|
873
918
|
For example, the following object will split any full name that you set
|
874
919
|
into a first name and last name components and save them.
|
875
|
-
|
920
|
+
|
876
921
|
{{{
|
877
922
|
contact = SC.Object.create({
|
878
|
-
|
923
|
+
|
879
924
|
fullName: function(key, value) {
|
880
925
|
if (value !== undefined) {
|
881
926
|
var parts = value.split(' ') ;
|
@@ -886,171 +931,159 @@ SC.mixin(Function.prototype,
|
|
886
931
|
}
|
887
932
|
return this.getEach('firstName', 'lastName').compact().join(' ');
|
888
933
|
}.property('firstName','lastName')
|
889
|
-
|
934
|
+
|
890
935
|
}) ;
|
891
|
-
|
936
|
+
|
892
937
|
}}}
|
893
|
-
|
938
|
+
|
894
939
|
h2. Why Use The Same Method for Getters and Setters?
|
895
|
-
|
940
|
+
|
896
941
|
Most property-based frameworks expect you to write two methods for each
|
897
942
|
property but SproutCore only uses one. We do this because most of the time
|
898
943
|
when you write a setter is is basically a getter plus some extra work.
|
899
944
|
There is little added benefit in writing both methods when you can
|
900
945
|
conditionally exclude part of it. This helps to keep your code more
|
901
946
|
compact and easier to maintain.
|
902
|
-
|
947
|
+
|
903
948
|
@param dependentKeys {String...} optional set of dependent keys
|
904
949
|
@returns {Function} the declared function instance
|
905
950
|
*/
|
906
951
|
property: function() {
|
907
|
-
|
908
|
-
var guid = SC.guidFor(this) ;
|
909
|
-
this.cacheKey = "__cache__" + guid ;
|
910
|
-
this.lastSetValueKey = "__lastValue__" + guid ;
|
911
|
-
this.isProperty = YES ;
|
912
|
-
return this ;
|
952
|
+
return SC.Function.property(this, arguments)
|
913
953
|
},
|
914
|
-
|
954
|
+
|
915
955
|
/**
|
916
|
-
You can call this method on a computed property to indicate that the
|
917
|
-
property is cacheable (or not cacheable). By default all computed
|
956
|
+
You can call this method on a computed property to indicate that the
|
957
|
+
property is cacheable (or not cacheable). By default all computed
|
918
958
|
properties are not cached. Enabling this feature will allow SproutCore
|
919
959
|
to cache the return value of your computed property and to use that
|
920
|
-
value until one of your dependent properties changes or until you
|
960
|
+
value until one of your dependent properties changes or until you
|
921
961
|
invoke propertyDidChange() and name the computed property itself.
|
922
|
-
|
962
|
+
|
923
963
|
If you do not specify this option, computed properties are assumed to be
|
924
964
|
not cacheable.
|
925
|
-
|
965
|
+
|
926
966
|
@param {Boolean} aFlag optionally indicate cacheable or no, default YES
|
927
967
|
@returns {Function} reciever
|
928
968
|
*/
|
929
969
|
cacheable: function(aFlag) {
|
930
|
-
this
|
931
|
-
if (!this.dependentKeys) this.dependentKeys = [] ;
|
932
|
-
this.isCacheable = (aFlag === undefined) ? YES : aFlag ;
|
933
|
-
return this ;
|
970
|
+
return SC.Function.cacheable(this, aFlag);
|
934
971
|
},
|
935
|
-
|
972
|
+
|
936
973
|
/**
|
937
|
-
Indicates that the computed property is volatile. Normally SproutCore
|
938
|
-
assumes that your computed property is idempotent. That is, calling
|
974
|
+
Indicates that the computed property is volatile. Normally SproutCore
|
975
|
+
assumes that your computed property is idempotent. That is, calling
|
939
976
|
set() on your property more than once with the same value has the same
|
940
|
-
effect as calling it only once.
|
941
|
-
|
977
|
+
effect as calling it only once.
|
978
|
+
|
942
979
|
All non-computed properties are idempotent and normally you should make
|
943
980
|
your computed properties behave the same way. However, if you need to
|
944
981
|
make your property change its return value everytime your method is
|
945
982
|
called, you may chain this to your property to make it volatile.
|
946
|
-
|
947
|
-
If you do not specify this option, properties are assumed to be
|
948
|
-
non-volatile.
|
949
|
-
|
983
|
+
|
984
|
+
If you do not specify this option, properties are assumed to be
|
985
|
+
non-volatile.
|
986
|
+
|
950
987
|
@param {Boolean} aFlag optionally indicate state, default to YES
|
951
988
|
@returns {Function} receiver
|
952
989
|
*/
|
953
990
|
idempotent: function(aFlag) {
|
954
|
-
this
|
955
|
-
if (!this.dependentKeys) this.dependentKeys = [] ;
|
956
|
-
this.isVolatile = (aFlag === undefined) ? YES : aFlag ;
|
957
|
-
return this ;
|
991
|
+
return SC.Function.idempotent(this, aFlag)
|
958
992
|
},
|
959
|
-
|
993
|
+
|
960
994
|
/**
|
961
995
|
Declare that a function should observe an object at the named path. Note
|
962
996
|
that the path is used only to construct the observation one time.
|
963
|
-
|
997
|
+
|
964
998
|
@returns {Function} receiver
|
965
999
|
*/
|
966
|
-
observes: function(propertyPaths) {
|
967
|
-
|
968
|
-
// full paths (i.e. those with a . or * in them)
|
969
|
-
var loc = arguments.length, local = null, paths = null ;
|
970
|
-
while(--loc >= 0) {
|
971
|
-
var path = arguments[loc] ;
|
972
|
-
// local
|
973
|
-
if ((path.indexOf('.')<0) && (path.indexOf('*')<0)) {
|
974
|
-
if (!local) local = this.localPropertyPaths = [] ;
|
975
|
-
local.push(path);
|
976
|
-
|
977
|
-
// regular
|
978
|
-
} else {
|
979
|
-
if (!paths) paths = this.propertyPaths = [] ;
|
980
|
-
paths.push(path) ;
|
981
|
-
}
|
982
|
-
}
|
983
|
-
return this ;
|
1000
|
+
observes: function(propertyPaths) {
|
1001
|
+
return SC.Function.observes(this, arguments);
|
984
1002
|
}
|
985
|
-
|
1003
|
+
|
986
1004
|
});
|
987
1005
|
|
988
|
-
|
989
|
-
|
990
|
-
//
|
1006
|
+
SC.CoreString = {
|
1007
|
+
fmt: function(str, formats) {
|
1008
|
+
// first, replace any ORDERED replacements.
|
1009
|
+
var idx = 0; // the current index for non-numerical replacements
|
1010
|
+
return str.replace(/%@([0-9]+)?/g, function(s, argIndex) {
|
1011
|
+
argIndex = (argIndex) ? parseInt(argIndex,0) - 1 : idx++ ;
|
1012
|
+
s = formats[argIndex];
|
1013
|
+
return ((s === null) ? '(null)' : (s === undefined) ? '' : s).toString();
|
1014
|
+
}) ;
|
1015
|
+
},
|
1016
|
+
loc: function(str, formats) {
|
1017
|
+
var str = SC.STRINGS[str] || str;
|
1018
|
+
return SC.String.fmt(str, arguments) ;
|
1019
|
+
},
|
1020
|
+
w: function(str) {
|
1021
|
+
var ary = [], ary2 = str.split(' '), len = ary2.length, string, idx=0;
|
1022
|
+
for (idx=0; idx<len; ++idx) {
|
1023
|
+
string = ary2[idx] ;
|
1024
|
+
if (string.length !== 0) ary.push(string) ; // skip empty strings
|
1025
|
+
}
|
1026
|
+
return ary ;
|
1027
|
+
}
|
1028
|
+
}
|
991
1029
|
|
992
|
-
|
993
|
-
/**
|
994
|
-
Apply formatting options to the string. This will look for occurrences
|
995
|
-
of %@ in your string and substitute them with the arguments you pass into
|
996
|
-
this method. If you want to control the specific order of replacement,
|
997
|
-
you can add a number after the key as well to indicate which argument
|
998
|
-
you want to insert.
|
999
|
-
|
1000
|
-
Ordered insertions are most useful when building loc strings where values
|
1001
|
-
you need to insert may appear in different orders.
|
1002
|
-
|
1003
|
-
h3. Examples
|
1004
|
-
|
1005
|
-
{{{
|
1006
|
-
"Hello %@ %@".fmt('John', 'Doe') => "Hello John Doe"
|
1007
|
-
"Hello %@2, %@1".fmt('John', 'Doe') => "Hello Doe, John"
|
1008
|
-
}}}
|
1009
|
-
|
1010
|
-
@param args {Object...} optional arguments
|
1011
|
-
@returns {String} formatted string
|
1012
|
-
*/
|
1013
|
-
String.prototype.fmt = function() {
|
1014
|
-
// first, replace any ORDERED replacements.
|
1015
|
-
var args = arguments,
|
1016
|
-
idx = 0; // the current index for non-numerical replacements
|
1017
|
-
return this.replace(/%@([0-9]+)?/g, function(s, argIndex) {
|
1018
|
-
argIndex = (argIndex) ? parseInt(argIndex,0)-1 : idx++ ;
|
1019
|
-
s =args[argIndex];
|
1020
|
-
return ((s===null) ? '(null)' : (s===undefined) ? '' : s).toString();
|
1021
|
-
}) ;
|
1022
|
-
};
|
1030
|
+
SC.mixin(String.prototype,
|
1031
|
+
/** @lends Function.prototype */ {
|
1023
1032
|
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
used. The resulting string will also be passed through fmt() to insert
|
1028
|
-
any variables.
|
1029
|
-
|
1030
|
-
@param args {Object...} optional arguments to interpolate also
|
1031
|
-
@returns {String} the localized and formatted string.
|
1032
|
-
*/
|
1033
|
-
String.prototype.loc = function() {
|
1034
|
-
var str = SC.STRINGS[this] || this;
|
1035
|
-
return str.fmt.apply(str,arguments) ;
|
1036
|
-
};
|
1033
|
+
// ..........................................................
|
1034
|
+
// STRING ENHANCEMENT
|
1035
|
+
//
|
1037
1036
|
|
1037
|
+
// Interpolate string. looks for %@ or %@1; to control the order of params.
|
1038
|
+
/**
|
1039
|
+
Apply formatting options to the string. This will look for occurrences
|
1040
|
+
of %@ in your string and substitute them with the arguments you pass into
|
1041
|
+
this method. If you want to control the specific order of replacement,
|
1042
|
+
you can add a number after the key as well to indicate which argument
|
1043
|
+
you want to insert.
|
1038
1044
|
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1045
|
+
Ordered insertions are most useful when building loc strings where values
|
1046
|
+
you need to insert may appear in different orders.
|
1047
|
+
|
1048
|
+
h3. Examples
|
1049
|
+
|
1050
|
+
{{{
|
1051
|
+
"Hello %@ %@".fmt('John', 'Doe') => "Hello John Doe"
|
1052
|
+
"Hello %@2, %@1".fmt('John', 'Doe') => "Hello Doe, John"
|
1053
|
+
}}}
|
1054
|
+
|
1055
|
+
@param args {Object...} optional arguments
|
1056
|
+
@returns {String} formatted string
|
1057
|
+
*/
|
1058
|
+
fmt: function() {
|
1059
|
+
return SC.CoreString.fmt(this, arguments);
|
1060
|
+
},
|
1061
|
+
|
1062
|
+
/**
|
1063
|
+
Localizes the string. This will look up the reciever string as a key
|
1064
|
+
in the current Strings hash. If the key matches, the loc'd value will be
|
1065
|
+
used. The resulting string will also be passed through fmt() to insert
|
1066
|
+
any variables.
|
1067
|
+
|
1068
|
+
@param args {Object...} optional arguments to interpolate also
|
1069
|
+
@returns {String} the localized and formatted string.
|
1070
|
+
*/
|
1071
|
+
loc: function() {
|
1072
|
+
return SC.CoreString.loc(this, arguments);
|
1073
|
+
},
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
/**
|
1078
|
+
Splits the string into words, separated by spaces. Empty strings are
|
1079
|
+
removed from the results.
|
1080
|
+
|
1081
|
+
@returns {Array} an array of non-empty strings
|
1082
|
+
*/
|
1083
|
+
w: function() {
|
1084
|
+
return SC.CoreString.w(this);
|
1051
1085
|
}
|
1052
|
-
|
1053
|
-
};
|
1086
|
+
});
|
1054
1087
|
|
1055
1088
|
//
|
1056
1089
|
// DATE ENHANCEMENT
|
@@ -1060,4 +1093,4 @@ if (!Date.now) {
|
|
1060
1093
|
return new Date().getTime() ;
|
1061
1094
|
};
|
1062
1095
|
}
|
1063
|
-
|
1096
|
+
|