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
@@ -0,0 +1,100 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2010-2011 Strobe Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('render_delegates/render_delegate');
|
9
|
+
|
10
|
+
/**
|
11
|
+
@class
|
12
|
+
Renders and updates DOM representations of an image.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
--------------------------
|
16
|
+
Expects these properties on the data source:
|
17
|
+
|
18
|
+
- image: An Image object which has completed loading
|
19
|
+
|
20
|
+
If any of these are not present in the data source, the render delegate
|
21
|
+
will throw an error.
|
22
|
+
|
23
|
+
Optional Parameters:
|
24
|
+
---------------------------
|
25
|
+
If present, these properties will be used.
|
26
|
+
|
27
|
+
- width: Used on the canvas element. If not provided, 0 is used and the canvas
|
28
|
+
will not be visible.
|
29
|
+
- height: Used on the canvas element. If not provided, 0 is used and the canvas
|
30
|
+
will not be visible.
|
31
|
+
- scale: If provided, the image will maintain aspect ratio as specified by this
|
32
|
+
property. One of
|
33
|
+
- SC.SCALE_NONE
|
34
|
+
- SC.FILL
|
35
|
+
- SC.FILL_PROPORTIONALLY
|
36
|
+
- SC.BEST_FIT
|
37
|
+
- SC.BEST_FIT_DOWN_ONLY
|
38
|
+
- percentage {Number}
|
39
|
+
If not provided, SC.FILL will be the default (ie. expected image behaviour)
|
40
|
+
- align: If provided, the image will align itself within its frame. One of
|
41
|
+
- SC.ALIGN_CENTER
|
42
|
+
- SC.ALIGN_TOP_LEFT
|
43
|
+
- SC.ALIGN_TOP
|
44
|
+
- SC.ALIGN_TOP_RIGHT
|
45
|
+
- SC.ALIGN_RIGHT
|
46
|
+
- SC.ALIGN_BOTTOM_RIGHT
|
47
|
+
- SC.ALIGN_BOTTOM
|
48
|
+
- SC.ALIGN_BOTTOM_LEFT
|
49
|
+
- SC.ALIGN_LEFT
|
50
|
+
- backgroundColor: If provided, the canvas will render a backgroundColor
|
51
|
+
*/
|
52
|
+
|
53
|
+
SC.BaseTheme.canvasImageRenderDelegate = SC.RenderDelegate.create({
|
54
|
+
name: 'canvasImage',
|
55
|
+
|
56
|
+
/** @private
|
57
|
+
We don't have an element yet, so we do the minimal necessary setup
|
58
|
+
here.
|
59
|
+
*/
|
60
|
+
render: function(dataSource, context) {
|
61
|
+
var width = dataSource.get('width') || 0,
|
62
|
+
height = dataSource.get('height') || 0;
|
63
|
+
|
64
|
+
context.attr('width', width);
|
65
|
+
context.attr('height', height);
|
66
|
+
},
|
67
|
+
|
68
|
+
update: function(dataSource, jquery) {
|
69
|
+
var elem = jquery[0],
|
70
|
+
image = dataSource.get('image'),
|
71
|
+
frame = dataSource.get('frame'),
|
72
|
+
backgroundColor = dataSource.get('backgroundColor'),
|
73
|
+
midX = 0, midY = 0,
|
74
|
+
context;
|
75
|
+
|
76
|
+
if (elem && elem.getContext) {
|
77
|
+
elem.height = frame.height;
|
78
|
+
elem.width = frame.width;
|
79
|
+
|
80
|
+
context = elem.getContext('2d');
|
81
|
+
|
82
|
+
context.clearRect(0, 0, frame.width, frame.height);
|
83
|
+
|
84
|
+
if (backgroundColor) {
|
85
|
+
context.fillStyle = backgroundColor;
|
86
|
+
context.fillRect(0, 0, frame.width, frame.height);
|
87
|
+
}
|
88
|
+
|
89
|
+
if (image && image.complete) {
|
90
|
+
this.updateImage(context, image, dataSource);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
},
|
94
|
+
|
95
|
+
updateImage: function(context, image, dataSource) {
|
96
|
+
var frame = dataSource.get('innerFrame');
|
97
|
+
context.drawImage(image, Math.floor(frame.x), Math.floor(frame.y), Math.floor(frame.width), Math.floor(frame.height));
|
98
|
+
}
|
99
|
+
|
100
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('render_delegates/render_delegate');
|
9
|
+
|
10
|
+
SC.BaseTheme.containerRenderDelegate = SC.RenderDelegate.create({
|
11
|
+
render: function(dataSource, context) {
|
12
|
+
|
13
|
+
},
|
14
|
+
|
15
|
+
update: function() {
|
16
|
+
|
17
|
+
}
|
18
|
+
});
|
@@ -0,0 +1,97 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
|
4
|
+
// Portions ©2010-2011 Strobe Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('render_delegates/render_delegate');
|
9
|
+
|
10
|
+
/**
|
11
|
+
@class
|
12
|
+
Renders and updates DOM representations of an image.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
--------------------------
|
16
|
+
Expects these properties on the data source:
|
17
|
+
|
18
|
+
- image: An Image object which has completed loading
|
19
|
+
|
20
|
+
If any of these are not present in the data source, the render delegate
|
21
|
+
will throw an error.
|
22
|
+
|
23
|
+
Optional Parameters:
|
24
|
+
---------------------------
|
25
|
+
If present, these properties will be used.
|
26
|
+
|
27
|
+
- imageValue: A String which represents the src or CSS class of the image
|
28
|
+
- displayToolTip: A String which is rendered as a toolTip on the element
|
29
|
+
- type: The type of image being rendered. One of:
|
30
|
+
- SC.IMAGE_TYPE_NONE
|
31
|
+
- SC.IMAGE_TYPE_URL
|
32
|
+
- SC.IMAGE_TYPE_CSS_CLASS
|
33
|
+
If not provided, SC.IMAGE_TYPE_URL is the default
|
34
|
+
*/
|
35
|
+
|
36
|
+
SC.BaseTheme.imageRenderDelegate = SC.RenderDelegate.create({
|
37
|
+
name: 'image',
|
38
|
+
|
39
|
+
render: function(dataSource, context) {
|
40
|
+
var image = dataSource.get('image'),
|
41
|
+
imageValue = dataSource.get('imageValue'),
|
42
|
+
type = dataSource.get('type') || SC.IMAGE_TYPE_URL,
|
43
|
+
toolTip = dataSource.get('toolTip');
|
44
|
+
|
45
|
+
// Place the img within a div, so that we may scale & offset the img
|
46
|
+
context = context.begin('img');
|
47
|
+
context.attr('src', image.src);
|
48
|
+
|
49
|
+
if (imageValue && type === SC.IMAGE_TYPE_CSS_CLASS) {
|
50
|
+
context.addClass(imageValue);
|
51
|
+
this._last_class = imageValue;
|
52
|
+
}
|
53
|
+
|
54
|
+
if (toolTip) {
|
55
|
+
context.attr('title', toolTip);
|
56
|
+
context.attr('alt', toolTip);
|
57
|
+
}
|
58
|
+
|
59
|
+
// Adjust the layout of the img
|
60
|
+
context.addStyle(this.imageStyles(dataSource));
|
61
|
+
|
62
|
+
context = context.end();
|
63
|
+
},
|
64
|
+
|
65
|
+
update: function(dataSource, jquery) {
|
66
|
+
var image = dataSource.get('image'),
|
67
|
+
imageValue = dataSource.get('imageValue'),
|
68
|
+
toolTip = dataSource.get('toolTip');
|
69
|
+
|
70
|
+
jquery = jquery.find('img');
|
71
|
+
jquery.attr('src', image.src);
|
72
|
+
|
73
|
+
if (imageValue !== this._last_class) jquery.setClass(this._last_class, NO);
|
74
|
+
jquery.addClass(imageValue);
|
75
|
+
this._last_class = imageValue;
|
76
|
+
|
77
|
+
if (toolTip) {
|
78
|
+
jquery.attr('title', toolTip);
|
79
|
+
jquery.attr('alt', toolTip);
|
80
|
+
}
|
81
|
+
|
82
|
+
// Adjust the layout of the img
|
83
|
+
jquery.css(this.imageStyles(dataSource));
|
84
|
+
},
|
85
|
+
|
86
|
+
imageStyles: function(dataSource) {
|
87
|
+
var innerFrame = dataSource.get('innerFrame');
|
88
|
+
return {
|
89
|
+
'position': 'absolute',
|
90
|
+
'left': Math.round(innerFrame.x),
|
91
|
+
'top': Math.round(innerFrame.y),
|
92
|
+
'width': Math.round(innerFrame.width),
|
93
|
+
'height': Math.round(innerFrame.height)
|
94
|
+
};
|
95
|
+
}
|
96
|
+
|
97
|
+
});
|
@@ -0,0 +1,111 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
sc_require('render_delegates/render_delegate');
|
9
|
+
|
10
|
+
/**
|
11
|
+
@class
|
12
|
+
Renders and updates DOM representations of a label.
|
13
|
+
|
14
|
+
Parameters
|
15
|
+
--------------------------
|
16
|
+
Expects these properties on the data source:
|
17
|
+
|
18
|
+
- title
|
19
|
+
|
20
|
+
If any of these are not present in the data source, the render delegate
|
21
|
+
will throw an error.
|
22
|
+
|
23
|
+
Optional Parameters:
|
24
|
+
---------------------------
|
25
|
+
If present, these properties will be used.
|
26
|
+
|
27
|
+
- icon: should be either a class name or a URL
|
28
|
+
- hint: allows the label to display a hint value if its title is empty.
|
29
|
+
- escapeHTML: whether the HTML should be escaped to prevent XSS attacks
|
30
|
+
and the like.
|
31
|
+
- textAlign
|
32
|
+
- fontWeight
|
33
|
+
- needsEllipsis: Whether an ellipsis (...) should be added after the title
|
34
|
+
if the title is too long.
|
35
|
+
*/
|
36
|
+
|
37
|
+
SC.BaseTheme.labelRenderDelegate = SC.RenderDelegate.create({
|
38
|
+
name: 'label',
|
39
|
+
|
40
|
+
render: function(dataSource, context) {
|
41
|
+
// CONSIDER DEPRECATING THESE PROPERTIES BECAUSE THEY ARE
|
42
|
+
// ANNOYING PAINS IN THE BUTT THAT EVERYONE HATES
|
43
|
+
context.addStyle({
|
44
|
+
'textAlign': dataSource.get('textAlign'),
|
45
|
+
'fontWeight': dataSource.get('fontWeight')
|
46
|
+
});
|
47
|
+
|
48
|
+
context.setClass('ellipsis', dataSource.get('needsEllipsis') || NO);
|
49
|
+
context.setClass('icon', dataSource.get('icon') || NO);
|
50
|
+
|
51
|
+
var html = this._htmlForTitleAndIcon(dataSource);
|
52
|
+
context.push(html);
|
53
|
+
|
54
|
+
// we could use didChangeFor, but in this case, checking the generated
|
55
|
+
// HTML will probably be faster (and definitely be simpler)
|
56
|
+
// because several properties are used.
|
57
|
+
dataSource.get('renderState')._lastHTMLForTitleAndIcon = html;
|
58
|
+
},
|
59
|
+
|
60
|
+
update: function(dataSource, jquery) {
|
61
|
+
// CONSIDER DEPRECATING THESE PROPERTIES BECAUSE THEY ARE
|
62
|
+
// ANNOYING PAINS IN THE BUTT THAT EVERYONE HATES
|
63
|
+
jquery.css({
|
64
|
+
'textAlign': dataSource.get('textAlign') || null,
|
65
|
+
'fontWeight': dataSource.get('fontWeight') || null
|
66
|
+
});
|
67
|
+
|
68
|
+
jquery.setClass('ellipsis', dataSource.get('needsEllipsis') || NO);
|
69
|
+
|
70
|
+
var html = this._htmlForTitleAndIcon(dataSource);
|
71
|
+
if (dataSource.get('renderState')._lastHTMLForTitleAndIcon !== html) {
|
72
|
+
jquery.html(html);
|
73
|
+
dataSource.get('renderState')._lastHTMLForTitleAndIcon = html;
|
74
|
+
}
|
75
|
+
},
|
76
|
+
|
77
|
+
_htmlForTitleAndIcon: function(dataSource) {
|
78
|
+
var title = dataSource.get('title'),
|
79
|
+
hint = dataSource.get('hint'),
|
80
|
+
escapeHTML = dataSource.get('escapeHTML'),
|
81
|
+
icon = dataSource.get('icon') || '';
|
82
|
+
|
83
|
+
// Escape the title of the button if needed. This prevents potential
|
84
|
+
// XSS attacks.
|
85
|
+
if (title && escapeHTML) {
|
86
|
+
title = SC.RenderContext.escapeHTML(title) ;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (hint && !title) {
|
90
|
+
if (escapeHTML) hint = SC.RenderContext.escapeHTML(hint);
|
91
|
+
title = "<span class='sc-hint'>" + hint + "</span>";
|
92
|
+
}
|
93
|
+
|
94
|
+
if (icon) {
|
95
|
+
// If the icon property is the path to an image, create an image tag
|
96
|
+
// that points to that URL.
|
97
|
+
if (icon.indexOf('/') >= 0) {
|
98
|
+
icon = '<img src="'+icon+'" alt="" class="icon" />';
|
99
|
+
|
100
|
+
// Otherwise, the icon property is a class name that should be added
|
101
|
+
// to the image tag. Display a blank image so that the user can add
|
102
|
+
// background image using CSS.
|
103
|
+
} else {
|
104
|
+
icon = '<img src="'+SC.BLANK_IMAGE_URL+'" alt="" class="icon '+icon+'" />';
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
return icon + title;
|
109
|
+
}
|
110
|
+
|
111
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2009 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
/**
|
9
|
+
@class
|
10
|
+
Base class for all render delegates.
|
11
|
+
|
12
|
+
You can mix helpers into this base class; they will be available to all
|
13
|
+
render delegates.
|
14
|
+
*/
|
15
|
+
SC.RenderDelegate = SC.Object.extend({
|
16
|
+
|
17
|
+
});
|
@@ -4,37 +4,37 @@
|
|
4
4
|
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
|
-
/*globals $A*/
|
7
|
+
/*globals $A */
|
8
8
|
|
9
9
|
sc_require('core') ;
|
10
|
-
|
10
|
+
|
11
11
|
/** @namespace
|
12
12
|
|
13
13
|
This bit of meta-programming magic can install a benchmark handler on any
|
14
14
|
object method. When a benchmark is installed, the time required to execute
|
15
|
-
the method will be printed to the console log everytime the method is
|
15
|
+
the method will be printed to the console log everytime the method is
|
16
16
|
called.
|
17
17
|
|
18
18
|
This class can be used to implement benchmarking. To use this object, just
|
19
|
-
call start() with a key name and end() with a keyname. The benchmark will
|
20
|
-
be logged. If you set verbose = true, then benchmark will log everytime it
|
19
|
+
call start() with a key name and end() with a keyname. The benchmark will
|
20
|
+
be logged. If you set verbose = true, then benchmark will log everytime it
|
21
21
|
saves a bench. Otherwise, it just keeps stats. You can get the stats by
|
22
22
|
calling report().
|
23
23
|
|
24
24
|
Benchmark does not require anything other than the date.js class. It also
|
25
25
|
does not rely on SC.Object so that you can benchmark code in that area as
|
26
26
|
well.
|
27
|
-
|
27
|
+
|
28
28
|
The benchmark has three types of reports.
|
29
|
-
|
30
|
-
report(): Returns an abbreviated list with just the durations of the bench.
|
29
|
+
|
30
|
+
report(): Returns an abbreviated list with just the durations of the bench.
|
31
31
|
Also, it averages multiple runs. Everything is reported on the top
|
32
32
|
level only.
|
33
|
-
|
33
|
+
|
34
34
|
timelineReport(): Returns an list of benchmarks and sub-benchmarks. If the
|
35
35
|
the globalStartTime is set, then it will show relative
|
36
36
|
time from that time.
|
37
|
-
|
37
|
+
|
38
38
|
timelineChart(): Displays a chart of all the benchmarks (not sub-benchmarks)
|
39
39
|
relative to the first time capture or to the globalStartTime.
|
40
40
|
Hide this by calling hideChart()
|
@@ -42,65 +42,115 @@ sc_require('core') ;
|
|
42
42
|
SC.Benchmark = {
|
43
43
|
|
44
44
|
/**
|
45
|
-
If true, then benchmarks will be logged to the console as they are
|
45
|
+
If true, then benchmarks will be logged to the console as they are
|
46
46
|
recorded.
|
47
|
-
|
47
|
+
|
48
48
|
@property {Boolean}
|
49
49
|
*/
|
50
50
|
verbose: NO,
|
51
|
-
|
51
|
+
|
52
52
|
/**
|
53
53
|
If false, benchmarking will be disabled. You might want to disable this
|
54
54
|
during production to maximize performance.
|
55
|
-
|
55
|
+
|
56
56
|
@property {Boolean}
|
57
57
|
*/
|
58
58
|
enabled: YES,
|
59
|
-
|
60
|
-
/**
|
59
|
+
|
60
|
+
/**
|
61
|
+
Events are a way of assigning specific, individual times to names, rather than
|
62
|
+
durations of time. A benchmark event can only occur once—if it occurs again, it
|
63
|
+
will overwrite the old event.
|
64
|
+
|
65
|
+
The purpose of events is different than the purpose for normal benchmarks. Normal
|
66
|
+
benchmarks may be used to benchmark a specific process, and may do so repeatedly;
|
67
|
+
events, conversely, are usually used to benchmark things like startup time, and
|
68
|
+
occur only once. For instance, an 'event' is registered when the document is ready.
|
69
|
+
|
70
|
+
Events are kept as a hash of names to timestamps. To add an event, just set it:
|
71
|
+
|
72
|
+
SC.Benchmark.events['myEventName'] = new Date().getTime();
|
73
|
+
|
74
|
+
// Or, more conveniently:
|
75
|
+
SC.Benchmark.addEvent('myEventName', [optional time]);
|
76
|
+
|
77
|
+
On a timeline chart, events are usually represented as lines rather than bars. However,
|
78
|
+
if you add eventNameStart and eventNameEnd, they will be automatically added as standard
|
79
|
+
benchmarks.
|
80
|
+
|
81
|
+
This is useful when adding preload events to SC.benchmarkPreloadEvents; as SC.Benchmark
|
82
|
+
does not yet exist, you cannot call .start() and .end(), but adding the items to
|
83
|
+
SC.benchmarkPreloadEvents will ensure they are included.
|
84
|
+
*/
|
85
|
+
events: {},
|
86
|
+
|
87
|
+
/**
|
61
88
|
This hash stores collected stats. It contains key value pairs. The value
|
62
89
|
will be a hash with the following properties:
|
63
|
-
|
90
|
+
|
64
91
|
* * *runs*: the number of times this stat has run
|
65
92
|
* * *amt*: the total time consumed by this (divide by runs to get avg)
|
66
93
|
* * *name*: an optional longer name you assigned to the stat key. Set this using name().
|
67
94
|
* * *_starts*: this array is used internally.
|
68
95
|
* * *_times*: this array is used internally.
|
69
|
-
|
96
|
+
|
70
97
|
@property {Object}
|
71
98
|
*/
|
72
99
|
stats: {},
|
73
100
|
|
74
101
|
/**
|
75
102
|
If set, one can tell when the benchmark is started relatively to the global start time.
|
76
|
-
|
103
|
+
|
104
|
+
This property is set to a default automatically (from HTML5 NavigationTiming if possible,
|
105
|
+
otherwise the SC bootstrap).
|
106
|
+
|
77
107
|
@property {Number}
|
78
108
|
*/
|
79
109
|
globalStartTime: null,
|
80
110
|
|
81
|
-
|
111
|
+
/**
|
112
|
+
Adds an 'event' to the events hash.
|
113
|
+
|
114
|
+
Unlike normal benchmarks, recorded with start/end and that represent a block of time,
|
115
|
+
events represent a single instance in time. Further, unlike normal benchmarks, which
|
116
|
+
may be run more than once for the same benchmark name, only one instance in time
|
117
|
+
will be recorded for any event name.
|
118
|
+
|
119
|
+
@param {String} name
|
120
|
+
A name that identifies the event. If addEvent is called again with the same name,
|
121
|
+
the previous call's timestamp will be overwritten.
|
122
|
+
|
123
|
+
@param {Timestamp} time
|
124
|
+
Optional. The timestamp to record for the event.
|
125
|
+
*/
|
126
|
+
addEvent: function(name, time) {
|
127
|
+
if (!time) time = new Date().getTime();
|
128
|
+
this.events[name] = time;
|
129
|
+
},
|
130
|
+
|
131
|
+
/**
|
82
132
|
Call this method at the start of whatever you want to collect.
|
83
|
-
If a parentKey is passed, then you will attach the stat to the parent,
|
84
|
-
otherwise it will be on the top level. If topLevelOnly is passed, then
|
85
|
-
recursive calls to the start will be ignored and only the top level call
|
133
|
+
If a parentKey is passed, then you will attach the stat to the parent,
|
134
|
+
otherwise it will be on the top level. If topLevelOnly is passed, then
|
135
|
+
recursive calls to the start will be ignored and only the top level call
|
86
136
|
will be benchmarked.
|
87
|
-
|
88
|
-
@param {String} key
|
89
|
-
A unique key that identifies this benchmark. All calls to start/end
|
137
|
+
|
138
|
+
@param {String} key
|
139
|
+
A unique key that identifies this benchmark. All calls to start/end
|
90
140
|
with the same key will be groups together.
|
91
|
-
|
141
|
+
|
92
142
|
@param {String} parentKey
|
93
|
-
A unique key that identifies the parent benchmark. All calls to
|
143
|
+
A unique key that identifies the parent benchmark. All calls to
|
94
144
|
start/end with the same key will be groups together.
|
95
|
-
|
145
|
+
|
96
146
|
@param {Boolean} topLevelOnly
|
97
|
-
If true then recursive calls to this method with the same key will be
|
98
|
-
ignored.
|
99
|
-
|
147
|
+
If true then recursive calls to this method with the same key will be
|
148
|
+
ignored.
|
149
|
+
|
100
150
|
@param {Number} time
|
101
|
-
Only pass if you want to explicitly set the start time. Otherwise the
|
151
|
+
Only pass if you want to explicitly set the start time. Otherwise the
|
102
152
|
start time is now.
|
103
|
-
|
153
|
+
|
104
154
|
@returns {String} the passed key
|
105
155
|
*/
|
106
156
|
start: function(key, parentKey, time, topLevelOnly) {
|
@@ -110,7 +160,7 @@ SC.Benchmark = {
|
|
110
160
|
|
111
161
|
if (parentKey) stat = this._subStatFor(key, parentKey) ;
|
112
162
|
else stat = this._statFor(key) ;
|
113
|
-
|
163
|
+
|
114
164
|
if (topLevelOnly && stat._starts.length > 0) stat._starts.push('ignore');
|
115
165
|
else stat._starts.push(start) ;
|
116
166
|
|
@@ -121,15 +171,15 @@ SC.Benchmark = {
|
|
121
171
|
/**
|
122
172
|
Call this method at the end of whatever you want to collect. This will
|
123
173
|
save the collected benchmark.
|
124
|
-
|
174
|
+
|
125
175
|
@param {String} key
|
126
176
|
The benchmark key you used when you called start()
|
127
|
-
|
177
|
+
|
128
178
|
@param {String} parentKey
|
129
179
|
The benchmark parent key you used when you called start()
|
130
|
-
|
180
|
+
|
131
181
|
@param {Number} time
|
132
|
-
Only pass if you want to explicitly set the end time. Otherwise start
|
182
|
+
Only pass if you want to explicitly set the end time. Otherwise start
|
133
183
|
time is now.
|
134
184
|
*/
|
135
185
|
end: function(key, parentKey, time) {
|
@@ -150,8 +200,8 @@ SC.Benchmark = {
|
|
150
200
|
}
|
151
201
|
|
152
202
|
// top level only.
|
153
|
-
if (start == 'ignore') return ;
|
154
|
-
|
203
|
+
if (start == 'ignore') return ;
|
204
|
+
|
155
205
|
var end = (time || Date.now()) ;
|
156
206
|
var dur = end - start;
|
157
207
|
|
@@ -160,11 +210,11 @@ SC.Benchmark = {
|
|
160
210
|
|
161
211
|
stat.amt += dur ;
|
162
212
|
stat.runs++ ;
|
163
|
-
|
213
|
+
|
164
214
|
if (this.verbose) this.log(key) ;
|
165
215
|
},
|
166
|
-
|
167
|
-
/*
|
216
|
+
|
217
|
+
/*
|
168
218
|
Set the inital global start time.
|
169
219
|
*/
|
170
220
|
setGlobalStartTime: function(time)
|
@@ -173,34 +223,34 @@ SC.Benchmark = {
|
|
173
223
|
},
|
174
224
|
|
175
225
|
/**
|
176
|
-
This is a simple way to benchmark a function. The function will be
|
226
|
+
This is a simple way to benchmark a function. The function will be
|
177
227
|
run with the name you provide the number of times you indicate. Only the
|
178
228
|
function is a required param.
|
179
|
-
*/
|
229
|
+
*/
|
180
230
|
bench: function(func, key, reps) {
|
181
231
|
if (!key) key = "bench%@".fmt(this._benchCount++) ;
|
182
232
|
if (!reps) reps = 1 ;
|
183
233
|
var ret ;
|
184
|
-
|
234
|
+
|
185
235
|
while(--reps >= 0) {
|
186
236
|
var timeKey = SC.Benchmark.start(key) ;
|
187
237
|
ret = func();
|
188
|
-
SC.Benchmark.end(timeKey) ;
|
238
|
+
SC.Benchmark.end(timeKey) ;
|
189
239
|
}
|
190
|
-
|
240
|
+
|
191
241
|
return ret ;
|
192
242
|
},
|
193
|
-
|
194
|
-
/**
|
243
|
+
|
244
|
+
/**
|
195
245
|
This bit of metaprogramming magic install a wrapper around a method and
|
196
246
|
benchmark it whenever it is run.
|
197
|
-
*/
|
247
|
+
*/
|
198
248
|
install: function(object,method, topLevelOnly) {
|
199
|
-
|
249
|
+
|
200
250
|
// vae the original method.
|
201
251
|
object['b__' + method] = object[method] ;
|
202
252
|
var __func = object['b__' + method];
|
203
|
-
|
253
|
+
|
204
254
|
// replace with this helper.
|
205
255
|
object[method] = function() {
|
206
256
|
var key = '%@(%@)'.fmt(method, $A(arguments).join(', ')) ;
|
@@ -210,18 +260,18 @@ SC.Benchmark = {
|
|
210
260
|
return ret ;
|
211
261
|
} ;
|
212
262
|
},
|
213
|
-
|
263
|
+
|
214
264
|
/**
|
215
265
|
Restore the original method, deactivating the benchmark.
|
216
|
-
|
266
|
+
|
217
267
|
@param {object} object the object to change
|
218
268
|
@param {string} method the method name as a string.
|
219
|
-
|
220
|
-
*/
|
269
|
+
|
270
|
+
*/
|
221
271
|
restore: function(object,method) {
|
222
272
|
object[method] = object['b__' + method] ;
|
223
273
|
},
|
224
|
-
|
274
|
+
|
225
275
|
/**
|
226
276
|
This method will return a string containing a report of the stats
|
227
277
|
collected so far. If you pass a key, only the stats for that key will
|
@@ -242,7 +292,7 @@ SC.Benchmark = {
|
|
242
292
|
|
243
293
|
@param {string} application name.
|
244
294
|
*/
|
245
|
-
timelineReport: function(appName)
|
295
|
+
timelineReport: function(appName)
|
246
296
|
{
|
247
297
|
appName = (appName) ? 'SproutCore Application' : appName;
|
248
298
|
var ret = [appName, 'User-Agent: %@'.fmt(navigator.userAgent), 'Report Generated: %@ (%@)'.fmt(new Date().toString(), Date.now()), ''] ;
|
@@ -263,112 +313,199 @@ SC.Benchmark = {
|
|
263
313
|
},
|
264
314
|
|
265
315
|
/**
|
266
|
-
|
316
|
+
Returns a hash containing the HTML representing the timeline chart, and
|
317
|
+
various metrics and information about the chart:
|
318
|
+
|
319
|
+
html, totalWidth, totalHeight, totalCapturedTime, pointsCaptured
|
267
320
|
|
268
321
|
*/
|
269
|
-
|
270
|
-
var i=0;
|
271
|
-
// Hide the chart if there is an existing one.
|
272
|
-
this.hideChart();
|
273
|
-
|
322
|
+
getTimelineChartContent: function() {
|
274
323
|
// Compile the data.
|
275
324
|
var chart = this._compileChartData(false);
|
276
325
|
var chartLen = chart.length;
|
277
|
-
|
326
|
+
|
278
327
|
// Return if there is nothing to draw.
|
279
328
|
if(chartLen === 0) return;
|
280
|
-
|
329
|
+
|
281
330
|
// Get the global start of the graph.
|
282
331
|
var gStart = this.globalStartTime ? this.globalStartTime : chart[0][1];
|
283
332
|
var maxDur = chart[chartLen-1][2]-gStart;
|
284
|
-
var maxHeight =
|
333
|
+
var maxHeight = 25+chartLen*30;
|
285
334
|
var incr = Math.ceil(maxDur/200)+1;
|
286
335
|
var maxWidth = incr*50;
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
//
|
294
|
-
var
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
graph.appendChild(topBox);
|
304
|
-
|
305
|
-
// Draw the tick marks.
|
306
|
-
for(i=0;i<incr; i++)
|
307
|
-
{
|
308
|
-
var tick = document.createElement('div');
|
309
|
-
tick.className = 'sc-benchmark-tick';
|
310
|
-
tick.style.left = (i*50)+'px';
|
311
|
-
tick.style.height = maxHeight+'px';
|
312
|
-
var tickLabel = document.createElement('div');
|
313
|
-
tickLabel.className = 'sc-benchmark-tick-label';
|
314
|
-
tickLabel.style.left = (i*50)+'px';
|
315
|
-
tickLabel.innerHTML = i*200+" ms";
|
316
|
-
graph.appendChild(tick);
|
317
|
-
graph.appendChild(tickLabel);
|
336
|
+
var leftPadding = 10, rightPadding = 300;
|
337
|
+
|
338
|
+
|
339
|
+
var str = "<div class = 'sc-benchmark-timeline-chart' style = 'position:relative;'>";
|
340
|
+
str += "<div class = 'sc-benchmark-top'></div>";
|
341
|
+
|
342
|
+
// add tick marks
|
343
|
+
for (var i = 0; i < incr; i++) {
|
344
|
+
str += "<div class = 'sc-benchmark-tick' style = '";
|
345
|
+
str += "left: " + (leftPadding + i * 50) + "px; ";
|
346
|
+
str += "height: " + maxHeight + "px;";
|
347
|
+
str += "'></div>";
|
348
|
+
|
349
|
+
str += "<div class = 'sc-benchmark-tick-label' style = '";
|
350
|
+
str += "left: " + (leftPadding + i * 50) + "px; ";
|
351
|
+
str += "'>" + (i * 200) + "ms</div>";
|
318
352
|
}
|
319
|
-
|
320
|
-
//
|
321
|
-
for(i=0;i<chartLen; i++)
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
graph.appendChild(row);
|
353
|
+
|
354
|
+
// print each chart item
|
355
|
+
for (i = 0; i < chartLen; i++) {
|
356
|
+
str += "<div class = 'sc-benchmark-row ";
|
357
|
+
str += (i % 2 === 0) ? 'even' : 'odd';
|
358
|
+
str += "' style = '";
|
359
|
+
str += "top: " + (50 + (i * 30)) + "px; ";
|
360
|
+
str += "'></div>";
|
328
361
|
|
329
362
|
var div = document.createElement('div');
|
330
363
|
var start = chart[i][1];
|
331
364
|
var end = chart[i][2];
|
332
365
|
var duration = chart[i][3];
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
366
|
+
|
367
|
+
|
368
|
+
str += "<div class = 'sc-benchmark-bar' style = '";
|
369
|
+
str += 'left:'+ (leftPadding + ((start-gStart)/4))+'px; width: '+((duration/4)) + 'px;';
|
370
|
+
str += 'top: '+(28+(i*30))+'px;';
|
371
|
+
|
372
|
+
str += "' title = 'start: " + (start-gStart) + " ms, end: " + (end-gStart) + ' ms, duration: ' + duration + " ms'";
|
373
|
+
str += ">";
|
374
|
+
str += ' ' + chart[i][0] + " <span class='sc-benchmark-emphasis'>";
|
375
|
+
str += duration + "ms (start: " + (start - gStart) + "ms)";
|
376
|
+
str += "</span>";
|
377
|
+
|
378
|
+
str += "</div>";
|
341
379
|
}
|
342
380
|
|
343
|
-
//
|
344
|
-
this.
|
381
|
+
// add the events
|
382
|
+
var events = this.events, idx = 0;
|
383
|
+
for (i in events) {
|
384
|
+
var t = events[i] - gStart;
|
385
|
+
str += "<div class = 'sc-benchmark-event idx" + (idx % 10) + "' style = '";
|
386
|
+
str += "left: " + (leftPadding + t / 4) + "px; height: " + maxHeight + "px; top: 20px;";
|
387
|
+
str += "' title = '" + i + ": " + t + "'></div>";
|
388
|
+
idx++;
|
389
|
+
}
|
390
|
+
|
391
|
+
str += "</div>";
|
392
|
+
|
393
|
+
return {
|
394
|
+
html: str,
|
395
|
+
totalCapturedTime: maxDur,
|
396
|
+
pointsCaptured: chartLen,
|
397
|
+
width: maxWidth + leftPadding + rightPadding,
|
398
|
+
height: maxHeight
|
399
|
+
};
|
400
|
+
},
|
401
|
+
|
402
|
+
/**
|
403
|
+
Returns a view with the timeline chart. The view has a 'reload' method to
|
404
|
+
refresh its data.
|
405
|
+
*/
|
406
|
+
getTimelineChartView: function() {
|
407
|
+
var view = SC.ScrollView.create({
|
408
|
+
contentView: SC.StaticContentView.extend({
|
409
|
+
|
410
|
+
}),
|
411
|
+
|
412
|
+
reload: function() {
|
413
|
+
var content = SC.Benchmark.getTimelineChartContent();
|
414
|
+
this.contentView.set('content', content.html);
|
415
|
+
this.contentView.adjust({
|
416
|
+
width: content.width,
|
417
|
+
height: content.height
|
418
|
+
});
|
419
|
+
|
420
|
+
this.chartContent = content;
|
421
|
+
|
422
|
+
SC.RunLoop.invokeLater(SC.Benchmark, function() {
|
423
|
+
this.contentView.notifyPropertyChange('frame');
|
424
|
+
});
|
425
|
+
}
|
426
|
+
});
|
427
|
+
|
428
|
+
view.reload();
|
429
|
+
|
430
|
+
return view;
|
345
431
|
},
|
346
|
-
|
432
|
+
|
433
|
+
/**
|
434
|
+
Generate a human readable benchmark chart. Pass in appName if you desire.
|
435
|
+
*/
|
436
|
+
timelineChart: function(appName) {
|
437
|
+
SC.RunLoop.begin();
|
438
|
+
|
439
|
+
var i=0;
|
440
|
+
// Hide the chart if there is an existing one.
|
441
|
+
this.hideChart();
|
442
|
+
|
443
|
+
// Compile the data.
|
444
|
+
var chartView = this.getTimelineChartView();
|
445
|
+
var chartLen = chartView.chartContent.pointsCaptured,
|
446
|
+
chartCapturedTime = chartView.chartContent.totalCapturedTime;
|
447
|
+
|
448
|
+
// Get the global start of the graph.
|
449
|
+
|
450
|
+
this._benchmarkChart = SC.Pane.create({
|
451
|
+
classNames: "sc-benchmark-pane".w(),
|
452
|
+
layout: { left: 20, right: 20, bottom: 20, top: 20 },
|
453
|
+
childViews: "title exit".w(),
|
454
|
+
exit: SC.ButtonView.extend({
|
455
|
+
layout: { right: 20, top: 20, width: 100, height: 30 },
|
456
|
+
title: "Hide Chart",
|
457
|
+
target: this,
|
458
|
+
action: "hideChart"
|
459
|
+
}),
|
460
|
+
|
461
|
+
title: SC.LabelView.extend({
|
462
|
+
classNames: 'sc-benchmark-title'.w(),
|
463
|
+
layout: { left: 20, top: 23, right: 200, height: 30 },
|
464
|
+
value: ((appName) ? appName : 'SproutCore Application') + (' - Total Captured Time: ' + chartCapturedTime +' ms - Points Captured: ' + chartLen),
|
465
|
+
fontWeight: 'bold'
|
466
|
+
})
|
467
|
+
|
468
|
+
}).append();
|
469
|
+
|
470
|
+
chartView.set('layout', { left: 20, top: 60, bottom: 20, right: 20 });
|
471
|
+
this._benchmarkChart.appendChild(chartView);
|
472
|
+
|
473
|
+
SC.RunLoop.end();
|
474
|
+
},
|
475
|
+
|
347
476
|
/*
|
348
477
|
Hide chart.
|
349
|
-
|
478
|
+
|
350
479
|
*/
|
351
480
|
hideChart: function()
|
352
481
|
{
|
353
|
-
if(this.
|
354
|
-
|
355
|
-
|
356
|
-
}catch(e){}
|
482
|
+
if(this._benchmarkChart) {
|
483
|
+
this._benchmarkChart.remove();
|
484
|
+
this._benchmarkChart = null;
|
357
485
|
}
|
486
|
+
|
487
|
+
return YES;
|
488
|
+
},
|
489
|
+
|
490
|
+
/**
|
491
|
+
Because we show a pane to display the chart...
|
492
|
+
*/
|
493
|
+
tryToPerform: function(action, sender) {
|
494
|
+
if (this[action]) return this[action](sender);
|
495
|
+
return NO;
|
358
496
|
},
|
359
|
-
|
360
497
|
|
361
498
|
/**
|
362
499
|
This method is just like report() except that it will log the results to
|
363
500
|
the console.
|
364
|
-
*/
|
501
|
+
*/
|
365
502
|
log: function(key) {
|
366
503
|
// log each line to make this easier to read on an iPad
|
367
504
|
var lines = this.report(key).split('\n'),
|
368
505
|
len = lines.length, idx;
|
369
506
|
for(idx=0;idx<len;idx++) console.log(lines[idx]);
|
370
507
|
},
|
371
|
-
|
508
|
+
|
372
509
|
/**
|
373
510
|
This will activate profiling if you have Firebug installed. Otherwise
|
374
511
|
does nothing.
|
@@ -377,21 +514,87 @@ SC.Benchmark = {
|
|
377
514
|
if (!this.enabled) return ;
|
378
515
|
if (console && console.profile) console.profile(key) ;
|
379
516
|
},
|
380
|
-
|
517
|
+
|
381
518
|
endProfile: function(key) {
|
382
519
|
if (!this.enabled) return ;
|
383
520
|
if (console && console.profileEnd) console.profileEnd(key) ;
|
384
521
|
},
|
385
|
-
|
522
|
+
|
386
523
|
// PRIVATE METHODS
|
387
524
|
|
388
525
|
// @private
|
389
|
-
|
526
|
+
|
527
|
+
|
528
|
+
/**
|
529
|
+
Loads data from both the browser's own event hash and SC's pre-load event hash.
|
530
|
+
*/
|
531
|
+
loadPreloadEvents: function() {
|
532
|
+
var preloadEvents = SC.benchmarkPreloadEvents, events = [], idx, len, evt;
|
533
|
+
|
534
|
+
// the browsers may have their own event hash. Ours uses the same format, so
|
535
|
+
// all that we need to do is mixin the browser's to our own.
|
536
|
+
if (typeof webkitPerformnce !== 'undefined') SC.mixin(preloadEvents, webkitPerformane.timing);
|
537
|
+
|
538
|
+
// we will attempt to find when the loading started and use that as our
|
539
|
+
// global start time, but only do so if the global start time is not already set.
|
540
|
+
if (!this.globalStartTime) {
|
541
|
+
// the potential events representing start time can be either from the browser
|
542
|
+
// or our own recordings. We prefer the browser.
|
543
|
+
var globalStartEvents = 'navigation navigationStart headStart'.w();
|
544
|
+
len = globalStartEvents.length;
|
545
|
+
|
546
|
+
for (idx = 0; idx < len; idx++) {
|
547
|
+
if (preloadEvents[globalStartEvents[idx]]) {
|
548
|
+
this.globalStartTime = preloadEvents[globalStartEvents[idx]];
|
549
|
+
break;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
}
|
553
|
+
|
554
|
+
// the JavaScript start time will be one recorded by us
|
555
|
+
// we record headStart in bootstrap.
|
556
|
+
this.javascriptStartTime = preloadEvents['headStart'];
|
557
|
+
|
558
|
+
// finally, mix in the events to our own events hash
|
559
|
+
SC.mixin(this.events, preloadEvents);
|
560
|
+
|
561
|
+
this._hasLoadedPreloadEvents = true;
|
562
|
+
},
|
563
|
+
|
564
|
+
/**
|
565
|
+
Some events represent a beginning and end. While this is not common for events
|
566
|
+
that take place after the app loads (as they can just use SC.Benchmark.start/end),
|
567
|
+
SC.Benchmark.start/end is not available before load—as such, code will add
|
568
|
+
*Start and *End events to the event hash.
|
569
|
+
|
570
|
+
This method iterates over the event hash and removes those items that represent
|
571
|
+
starts and ends, calling .start/.end for them.
|
572
|
+
*/
|
573
|
+
_loadBenchmarksFromEvents: function() {
|
574
|
+
if (!this._hasLoadedPreloadEvents) this.loadPreloadEvents();
|
575
|
+
|
576
|
+
var events = this.events;
|
577
|
+
for (var i in events) {
|
578
|
+
if (i.substr(-3) !== 'End') continue;
|
579
|
+
|
580
|
+
var stem = i.substr(0, i.length - 3);
|
581
|
+
if (!events[stem + 'Start']) continue;
|
582
|
+
|
583
|
+
SC.Benchmark.start(stem, undefined, events[stem + 'Start']);
|
584
|
+
SC.Benchmark.end(stem, undefined, events[stem + 'End']);
|
585
|
+
|
586
|
+
delete events[stem + 'Start'];
|
587
|
+
delete events[stem + 'End'];
|
588
|
+
}
|
589
|
+
},
|
590
|
+
|
390
591
|
// Generates, sorts, and returns the array of all the data that has been captured.
|
391
592
|
_compileChartData: function(showSub)
|
392
593
|
{
|
594
|
+
this._loadBenchmarksFromEvents();
|
595
|
+
|
393
596
|
var chart = [], dispKey;
|
394
|
-
for(var key in this.stats)
|
597
|
+
for(var key in this.stats)
|
395
598
|
{
|
396
599
|
var stat = this.stats[key];
|
397
600
|
for(var i=0; i<stat._times.length; i++)
|
@@ -402,25 +605,25 @@ SC.Benchmark = {
|
|
402
605
|
if(showSub)
|
403
606
|
{
|
404
607
|
var subStats = st._subStats;
|
405
|
-
for(var k in subStats)
|
608
|
+
for(var k in subStats)
|
406
609
|
{
|
407
|
-
|
610
|
+
|
408
611
|
var subStat = subStats[k];
|
409
612
|
for(var j=0; j<subStat._times.length; j++)
|
410
613
|
{
|
411
614
|
var s = subStat._times[j];
|
412
615
|
dispKey = (subStat._times.length > 1) ? (j+1)+' - '+k : k;
|
413
616
|
chart.push([dispKey, s.start, s.end, s.dur, true]);
|
414
|
-
|
617
|
+
|
415
618
|
}
|
416
619
|
}
|
417
620
|
}
|
418
621
|
}
|
419
622
|
}
|
420
|
-
|
623
|
+
|
421
624
|
chart.sort(function(a,b)
|
422
625
|
{
|
423
|
-
if(a[1] < b[1])
|
626
|
+
if(a[1] < b[1])
|
424
627
|
{
|
425
628
|
return -1;
|
426
629
|
}
|
@@ -435,41 +638,42 @@ SC.Benchmark = {
|
|
435
638
|
|
436
639
|
return chart;
|
437
640
|
},
|
438
|
-
|
641
|
+
|
439
642
|
// Generate the traditional report show multiple runs averaged.
|
440
643
|
_genReport: function(key) {
|
441
644
|
var stat = this._statFor(key) ;
|
442
645
|
var avg = (stat.runs > 0) ? (Math.floor(stat.amt * 1000 / stat.runs) / 1000) : 0 ;
|
443
|
-
|
444
|
-
|
646
|
+
var last = stat._times[stat._times.length - 1];
|
647
|
+
|
648
|
+
return 'BENCH %@ msec: %@ (%@x); latest: %@'.fmt(avg, (stat.name || key), stat.runs, last.end - last.start);
|
445
649
|
},
|
446
650
|
|
447
651
|
// Generate the report in the form of at time line. This returns the parent.
|
448
|
-
_timelineGenReport: function(val)
|
652
|
+
_timelineGenReport: function(val)
|
449
653
|
{
|
450
654
|
if(this.globalStartTime)
|
451
655
|
{
|
452
|
-
return 'BENCH start: %@ msec, duration: %@ msec, %@'.fmt((val[1]-this.globalStartTime), val[3], val[0]) ;
|
453
|
-
}
|
656
|
+
return 'BENCH start: %@ msec, duration: %@ msec, %@'.fmt((val[1]-this.globalStartTime), val[3], val[0]) ;
|
657
|
+
}
|
454
658
|
else
|
455
659
|
{
|
456
|
-
return 'BENCH duration: %@ msec, %@'.fmt( val[3], val[0]) ;
|
660
|
+
return 'BENCH duration: %@ msec, %@'.fmt( val[3], val[0]) ;
|
457
661
|
}
|
458
662
|
},
|
459
|
-
|
663
|
+
|
460
664
|
// Generate the report in the form of at time line. This returns the children.
|
461
|
-
_timelineGenSubReport: function(val)
|
665
|
+
_timelineGenSubReport: function(val)
|
462
666
|
{
|
463
667
|
if(this.globalStartTime)
|
464
668
|
{
|
465
|
-
return ' CHECKPOINT BENCH start: %@ msec, duration: %@ msec, %@'.fmt((val[1]-this.globalStartTime), val[3], val[0]) ;
|
466
|
-
}
|
669
|
+
return ' CHECKPOINT BENCH start: %@ msec, duration: %@ msec, %@'.fmt((val[1]-this.globalStartTime), val[3], val[0]) ;
|
670
|
+
}
|
467
671
|
else
|
468
672
|
{
|
469
|
-
return ' CHECKPOINT BENCH duration: %@ msec, %@'.fmt( val[3], val[0]) ;
|
673
|
+
return ' CHECKPOINT BENCH duration: %@ msec, %@'.fmt( val[3], val[0]) ;
|
470
674
|
}
|
471
675
|
},
|
472
|
-
|
676
|
+
|
473
677
|
// returns a stats hash for the named key and parent key. If the hash does not exist yet,
|
474
678
|
// creates it.
|
475
679
|
_subStatFor: function(key, parentKey) {
|
@@ -479,7 +683,7 @@ SC.Benchmark = {
|
|
479
683
|
var ret = parentSubStats[key] ;
|
480
684
|
if (!ret) {
|
481
685
|
parentSubStats[key] = {
|
482
|
-
runs: 0, amt: 0, name: key, _starts: [], _times: []
|
686
|
+
runs: 0, amt: 0, name: key, _starts: [], _times: []
|
483
687
|
};
|
484
688
|
ret = parentSubStats[key];
|
485
689
|
}
|
@@ -492,23 +696,23 @@ SC.Benchmark = {
|
|
492
696
|
var ret = this.stats[key] ;
|
493
697
|
if (!ret) {
|
494
698
|
ret = this.stats[key] = {
|
495
|
-
runs: 0, amt: 0, name: key, _starts: [], _times: []
|
699
|
+
runs: 0, amt: 0, name: key, _starts: [], _times: []
|
496
700
|
};
|
497
701
|
ret = this.stats[key];
|
498
702
|
}
|
499
703
|
return ret ;
|
500
704
|
},
|
501
|
-
|
705
|
+
|
502
706
|
reset: function() { this.stats = {} ; },
|
503
|
-
|
707
|
+
|
504
708
|
// This is private, but it is used in some places, so we are keeping this for
|
505
709
|
// compatibility.
|
506
710
|
_bench: function(func, name) {
|
507
711
|
SC.Benchmark.bench(func, name, 1) ;
|
508
712
|
},
|
509
|
-
|
713
|
+
|
510
714
|
_benchCount: 1
|
511
|
-
|
715
|
+
|
512
716
|
} ;
|
513
717
|
|
514
718
|
SC.Benchmark = SC.Benchmark;
|