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
@@ -1,197 +0,0 @@
|
|
1
|
-
// ==========================================================================
|
2
|
-
// Project: SproutCore - JavaScript Application Framework
|
3
|
-
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
-
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
-
// License: Licensed under MIT license (see license.js)
|
6
|
-
// ==========================================================================
|
7
|
-
|
8
|
-
/*global main */
|
9
|
-
|
10
|
-
SC.BENCHMARK_LOG_READY = YES;
|
11
|
-
|
12
|
-
sc_require('system/event') ;
|
13
|
-
|
14
|
-
SC.mixin({
|
15
|
-
_isReadyBound: NO,
|
16
|
-
|
17
|
-
/** @private configures the ready event handler if needed */
|
18
|
-
_bindReady: function() {
|
19
|
-
if (this._isReadyBound) return;
|
20
|
-
this._isReadyBound = YES ;
|
21
|
-
|
22
|
-
// Mozilla, Opera (see further below for it) and webkit nightlies
|
23
|
-
// currently support this event. Use the handy event callback
|
24
|
-
if ( document.addEventListener && !SC.browser.opera) {
|
25
|
-
document.addEventListener( "DOMContentLoaded", SC._didBecomeReady, NO );
|
26
|
-
}
|
27
|
-
|
28
|
-
// If IE is used and is not in a frame
|
29
|
-
// Continually check to see if the document is ready
|
30
|
-
if (SC.browser.msie && (window === top)) {
|
31
|
-
(function() {
|
32
|
-
if (SC.isReady) return;
|
33
|
-
try {
|
34
|
-
// If IE is used, use the trick by Diego Perini
|
35
|
-
// http://javascript.nwbox.com/IEContentLoaded/
|
36
|
-
document.documentElement.doScroll("left");
|
37
|
-
} catch( error ) {
|
38
|
-
setTimeout( arguments.callee, 0 );
|
39
|
-
return;
|
40
|
-
}
|
41
|
-
// and execute any waiting functions
|
42
|
-
SC._didBecomeReady();
|
43
|
-
})();
|
44
|
-
}
|
45
|
-
|
46
|
-
if ( SC.browser.opera ) {
|
47
|
-
document.addEventListener( "DOMContentLoaded", function () {
|
48
|
-
if (SC.isReady) return;
|
49
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
50
|
-
if (document.styleSheets[i].disabled) {
|
51
|
-
setTimeout( arguments.callee, 0 );
|
52
|
-
return;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
// and execute any waiting functions
|
56
|
-
SC._didBecomeReady();
|
57
|
-
}, NO);
|
58
|
-
}
|
59
|
-
|
60
|
-
if (SC.browser.safari && SC.browser.safari < 530.0 ) {
|
61
|
-
console.error("ready() is not yet supported on Safari 3.1 and earlier");
|
62
|
-
// TODO: implement ready() in < Safari 4
|
63
|
-
// var numStyles;
|
64
|
-
// (function(){
|
65
|
-
// if (SC.isReady) return;
|
66
|
-
// if ( document.readyState != "loaded" && document.readyState != "complete" ) {
|
67
|
-
// setTimeout( arguments.callee, 0 );
|
68
|
-
// return;
|
69
|
-
// }
|
70
|
-
// if ( numStyles === undefined ) numStyles = 0 ;
|
71
|
-
// //numStyles = SC.$("style, link[rel=stylesheet]").length;
|
72
|
-
// if ( document.styleSheets.length != numStyles ) {
|
73
|
-
// setTimeout( arguments.callee, 0 );
|
74
|
-
// return;
|
75
|
-
// }
|
76
|
-
// // and execute any waiting functions
|
77
|
-
// SC._didBecomeReady();
|
78
|
-
// })();
|
79
|
-
}
|
80
|
-
|
81
|
-
// A fallback to window.onload, that will always work
|
82
|
-
SC.Event.add( window, "load", SC._didBecomeReady);
|
83
|
-
},
|
84
|
-
|
85
|
-
/** @private handlers scheduled to execute on ready. */
|
86
|
-
_readyQueue: [],
|
87
|
-
|
88
|
-
_afterReadyQueue: [],
|
89
|
-
|
90
|
-
isReady: NO,
|
91
|
-
|
92
|
-
/** @private invoked when the document becomes ready. */
|
93
|
-
_didBecomeReady: function() {
|
94
|
-
// Only call once
|
95
|
-
if (SC.isReady) return ;
|
96
|
-
if (typeof SC.mapDisplayNames === SC.T_FUNCTION) SC.mapDisplayNames();
|
97
|
-
if (typeof SC.addInvokeOnceLastDebuggingInfo === SC.T_FUNCTION) SC.addInvokeOnceLastDebuggingInfo();
|
98
|
-
|
99
|
-
// setup locale
|
100
|
-
SC.Locale.createCurrentLocale();
|
101
|
-
|
102
|
-
// if there is a body tag on the document, set the language
|
103
|
-
if (document && document.getElementsByTagName) {
|
104
|
-
var body = document.getElementsByTagName('body')[0];
|
105
|
-
if (body) {
|
106
|
-
var className = body.className ;
|
107
|
-
var language = SC.Locale.currentLanguage.toLowerCase() ;
|
108
|
-
body.className = (className && className.length>0) ? [className, language].join(' ') : language ;
|
109
|
-
}
|
110
|
-
}
|
111
|
-
|
112
|
-
SC.Benchmark.start('ready') ;
|
113
|
-
|
114
|
-
// Begin runloop
|
115
|
-
SC.run(function() {
|
116
|
-
var handler, ary, idx, len ;
|
117
|
-
|
118
|
-
// correctly handle queueing new SC.ready() calls
|
119
|
-
do {
|
120
|
-
ary = SC._readyQueue ;
|
121
|
-
SC._readyQueue = [] ; // reset
|
122
|
-
for (idx=0, len=ary.length; idx<len; idx++) {
|
123
|
-
handler = ary[idx] ;
|
124
|
-
var target = handler[0] || document ;
|
125
|
-
var method = handler[1] ;
|
126
|
-
if (method) method.call(target) ;
|
127
|
-
}
|
128
|
-
} while (SC._readyQueue.length > 0) ;
|
129
|
-
|
130
|
-
// okay, now we're ready (any SC.ready() calls will now be called immediately)
|
131
|
-
SC.isReady = YES ;
|
132
|
-
|
133
|
-
// clear the queue
|
134
|
-
SC._readyQueue = null ;
|
135
|
-
|
136
|
-
// trigger any bound ready events
|
137
|
-
SC.Event.trigger(document, "ready", null, NO);
|
138
|
-
|
139
|
-
// Remove any loading div
|
140
|
-
if (SC.removeLoading) SC.$('#loading').remove();
|
141
|
-
|
142
|
-
// Now execute main, if defined and SC.UserDefaults is ready
|
143
|
-
if(SC.userDefaults.get('ready')){
|
144
|
-
if ((SC.mode === SC.APP_MODE) && (typeof main != "undefined") && (main instanceof Function) && !SC.suppressMain) main();
|
145
|
-
}
|
146
|
-
else {
|
147
|
-
SC.userDefaults.readyCallback(window, main);
|
148
|
-
}
|
149
|
-
}, this);
|
150
|
-
|
151
|
-
SC.Benchmark.end('ready') ;
|
152
|
-
if (SC.BENCHMARK_LOG_READY) SC.Benchmark.log();
|
153
|
-
},
|
154
|
-
|
155
|
-
/**
|
156
|
-
Add the passed target and method to the queue of methods to invoke when
|
157
|
-
the document is ready. These methods will be called after the document
|
158
|
-
has loaded and parsed, but before the main() function is called.
|
159
|
-
|
160
|
-
Methods are called in the order they are added.
|
161
|
-
|
162
|
-
If you add a ready handler when the main document is already ready, then
|
163
|
-
your handler will be called immediately.
|
164
|
-
|
165
|
-
@param target {Object} optional target object
|
166
|
-
@param method {Function} method name or function to execute
|
167
|
-
@returns {SC}
|
168
|
-
*/
|
169
|
-
ready: function(target, method) {
|
170
|
-
var queue = this._readyQueue;
|
171
|
-
|
172
|
-
// normalize
|
173
|
-
if (method === undefined) {
|
174
|
-
method = target; target = null ;
|
175
|
-
} else if (SC.typeOf(method) === SC.T_STRING) {
|
176
|
-
method = target[method] ;
|
177
|
-
}
|
178
|
-
|
179
|
-
if (!method) return this; // nothing to do.
|
180
|
-
|
181
|
-
// if isReady, execute now.
|
182
|
-
if (this.isReady) return method.call(target || document) ;
|
183
|
-
|
184
|
-
// otherwise, add to queue.
|
185
|
-
queue.push([target, method]) ;
|
186
|
-
return this ;
|
187
|
-
}
|
188
|
-
|
189
|
-
}) ;
|
190
|
-
|
191
|
-
SC._bindReady() ;
|
192
|
-
SC.removeLoading = YES;
|
193
|
-
|
194
|
-
// default to app mode. When loading unit tests, this will run in test mode
|
195
|
-
SC.APP_MODE = "APP_MODE";
|
196
|
-
SC.TEST_MODE = "TEST_MODE";
|
197
|
-
SC.mode = SC.APP_MODE;
|
@@ -1,710 +0,0 @@
|
|
1
|
-
// ==========================================================================
|
2
|
-
// Project: SproutCore - JavaScript Application Framework
|
3
|
-
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
-
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
-
// License: Licensed under MIT license (see license.js)
|
6
|
-
// ==========================================================================
|
7
|
-
|
8
|
-
// These are helpful utility functions for calculating range and rect values
|
9
|
-
sc_require('system/browser');
|
10
|
-
|
11
|
-
SC.mixin( /** @scope SC */ {
|
12
|
-
|
13
|
-
_downloadFrames: 0, // count of download frames inserted into document
|
14
|
-
|
15
|
-
_copy_computed_props: [
|
16
|
-
"maxWidth", "maxHeight", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom",
|
17
|
-
"fontFamily", "fontSize", "fontStyle", "fontWeight", "fontVariant", "lineHeight",
|
18
|
-
"whiteSpace"
|
19
|
-
],
|
20
|
-
|
21
|
-
/**
|
22
|
-
Starts a download of the file at the named path.
|
23
|
-
|
24
|
-
Use this method when you want to cause a file to be downloaded to a users
|
25
|
-
desktop instead of having it display in the web browser. Note that your
|
26
|
-
server must return a header indicating that the file is intended for
|
27
|
-
download also.
|
28
|
-
*/
|
29
|
-
download: function(path) {
|
30
|
-
var tempDLIFrame=document.createElement('iframe'),
|
31
|
-
frameId = 'DownloadFrame_' + this._downloadFrames;
|
32
|
-
SC.$(tempDLIFrame).attr('id',frameId);
|
33
|
-
tempDLIFrame.style.border='10px';
|
34
|
-
tempDLIFrame.style.width='0px';
|
35
|
-
tempDLIFrame.style.height='0px';
|
36
|
-
tempDLIFrame.style.position='absolute';
|
37
|
-
tempDLIFrame.style.top='-10000px';
|
38
|
-
tempDLIFrame.style.left='-10000px';
|
39
|
-
// Don't set the iFrame content yet if this is Safari
|
40
|
-
if (!SC.browser.isSafari) {
|
41
|
-
SC.$(tempDLIFrame).attr('src',path);
|
42
|
-
}
|
43
|
-
document.getElementsByTagName('body')[0].appendChild(tempDLIFrame);
|
44
|
-
if (SC.browser.isSafari) {
|
45
|
-
SC.$(tempDLIFrame).attr('src',path);
|
46
|
-
}
|
47
|
-
this._downloadFrames = this._downloadFrames + 1;
|
48
|
-
if (!SC.browser.isSafari) {
|
49
|
-
var r = function() {
|
50
|
-
document.body.removeChild(document.getElementById(frameId));
|
51
|
-
frameId = null;
|
52
|
-
} ;
|
53
|
-
r.invokeLater(null, 2000);
|
54
|
-
}
|
55
|
-
//remove possible IE7 leak
|
56
|
-
tempDLIFrame = null;
|
57
|
-
},
|
58
|
-
|
59
|
-
/**
|
60
|
-
Takes a URL of any type and normalizes it into a fully qualified URL with
|
61
|
-
hostname. For example:
|
62
|
-
|
63
|
-
{{{
|
64
|
-
"some/path" => "http://localhost:4020/some/path"
|
65
|
-
"/some/path" => "http://localhost:4020/some/path"
|
66
|
-
"http://localhost:4020/some/path" => "http://localhost:4020/some/path"
|
67
|
-
}}}
|
68
|
-
|
69
|
-
@param url {String} the URL
|
70
|
-
@returns {String} the normalized URL
|
71
|
-
*/
|
72
|
-
normalizeURL: function(url) {
|
73
|
-
if (url.slice(0,1) == '/') {
|
74
|
-
url = window.location.protocol + '//' + window.location.host + url ;
|
75
|
-
} else if ((url.slice(0,5) == 'http:') || (url.slice(0,6) == 'https:')) {
|
76
|
-
// no change
|
77
|
-
} else {
|
78
|
-
url = window.location.href + '/' + url ;
|
79
|
-
}
|
80
|
-
return url ;
|
81
|
-
},
|
82
|
-
|
83
|
-
/** Return true if the number is between 0 and 1 */
|
84
|
-
isPercentage: function(val){
|
85
|
-
return (val<1 && val>0);
|
86
|
-
},
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
/** Return the left edge of the frame */
|
91
|
-
minX: function(frame) {
|
92
|
-
return frame.x || 0;
|
93
|
-
},
|
94
|
-
|
95
|
-
/** Return the right edge of the frame. */
|
96
|
-
maxX: function(frame) {
|
97
|
-
return (frame.x || 0) + (frame.width || 0);
|
98
|
-
},
|
99
|
-
|
100
|
-
/** Return the midpoint of the frame. */
|
101
|
-
midX: function(frame) {
|
102
|
-
return (frame.x || 0) + ((frame.width || 0) / 2) ;
|
103
|
-
},
|
104
|
-
|
105
|
-
/** Return the top edge of the frame */
|
106
|
-
minY: function(frame) {
|
107
|
-
return frame.y || 0 ;
|
108
|
-
},
|
109
|
-
|
110
|
-
/** Return the bottom edge of the frame */
|
111
|
-
maxY: function(frame) {
|
112
|
-
return (frame.y || 0) + (frame.height || 0) ;
|
113
|
-
},
|
114
|
-
|
115
|
-
/** Return the midpoint of the frame */
|
116
|
-
midY: function(frame) {
|
117
|
-
return (frame.y || 0) + ((frame.height || 0) / 2) ;
|
118
|
-
},
|
119
|
-
|
120
|
-
/** Returns the point that will center the frame X within the passed frame. */
|
121
|
-
centerX: function(innerFrame, outerFrame) {
|
122
|
-
return (outerFrame.width - innerFrame.width) / 2 ;
|
123
|
-
},
|
124
|
-
|
125
|
-
/** Return the point that will center the frame Y within the passed frame. */
|
126
|
-
centerY: function(innerFrame, outerFrame) {
|
127
|
-
return (outerFrame.height - innerFrame.height) /2 ;
|
128
|
-
},
|
129
|
-
|
130
|
-
/** Check if the given point is inside the rect. */
|
131
|
-
pointInRect: function(point, f) {
|
132
|
-
return (point.x >= SC.minX(f)) &&
|
133
|
-
(point.y >= SC.minY(f)) &&
|
134
|
-
(point.x <= SC.maxX(f)) &&
|
135
|
-
(point.y <= SC.maxY(f)) ;
|
136
|
-
},
|
137
|
-
|
138
|
-
/** Return true if the two frames match. You can also pass only points or sizes.
|
139
|
-
|
140
|
-
@param r1 {Rect} the first rect
|
141
|
-
@param r2 {Rect} the second rect
|
142
|
-
@param delta {Float} an optional delta that allows for rects that do not match exactly. Defaults to 0.1
|
143
|
-
@returns {Boolean} true if rects match
|
144
|
-
*/
|
145
|
-
rectsEqual: function(r1, r2, delta) {
|
146
|
-
if (!r1 || !r2) return (r1 == r2) ;
|
147
|
-
if (!delta && delta !== 0) delta = 0.1;
|
148
|
-
if ((r1.y != r2.y) && (Math.abs(r1.y - r2.y) > delta)) return NO ;
|
149
|
-
if ((r1.x != r2.x) && (Math.abs(r1.x - r2.x) > delta)) return NO ;
|
150
|
-
if ((r1.width != r2.width) && (Math.abs(r1.width - r2.width) > delta)) return NO ;
|
151
|
-
if ((r1.height != r2.height) && (Math.abs(r1.height - r2.height) > delta)) return NO ;
|
152
|
-
return YES ;
|
153
|
-
},
|
154
|
-
|
155
|
-
/** Returns the insersection between two rectangles.
|
156
|
-
|
157
|
-
@param r1 {Rect} The first rect
|
158
|
-
@param r2 {Rect} the second rect
|
159
|
-
@returns {Rect} the intersection rect. width || height will be 0 if they do not interset.
|
160
|
-
*/
|
161
|
-
intersectRects: function(r1, r2) {
|
162
|
-
// find all four edges
|
163
|
-
var ret = {
|
164
|
-
x: Math.max(SC.minX(r1), SC.minX(r2)),
|
165
|
-
y: Math.max(SC.minY(r1), SC.minY(r2)),
|
166
|
-
width: Math.min(SC.maxX(r1), SC.maxX(r2)),
|
167
|
-
height: Math.min(SC.maxY(r1), SC.maxY(r2))
|
168
|
-
} ;
|
169
|
-
|
170
|
-
// convert edges to w/h
|
171
|
-
ret.width = Math.max(0, ret.width - ret.x) ;
|
172
|
-
ret.height = Math.max(0, ret.height - ret.y) ;
|
173
|
-
return ret ;
|
174
|
-
},
|
175
|
-
|
176
|
-
/** Returns the union between two rectangles
|
177
|
-
|
178
|
-
@param r1 {Rect} The first rect
|
179
|
-
@param r2 {Rect} The second rect
|
180
|
-
@returns {Rect} The union rect.
|
181
|
-
*/
|
182
|
-
unionRects: function(r1, r2) {
|
183
|
-
// find all four edges
|
184
|
-
var ret = {
|
185
|
-
x: Math.min(SC.minX(r1), SC.minX(r2)),
|
186
|
-
y: Math.min(SC.minY(r1), SC.minY(r2)),
|
187
|
-
width: Math.max(SC.maxX(r1), SC.maxX(r2)),
|
188
|
-
height: Math.max(SC.maxY(r1), SC.maxY(r2))
|
189
|
-
} ;
|
190
|
-
|
191
|
-
// convert edges to w/h
|
192
|
-
ret.width = Math.max(0, ret.width - ret.x) ;
|
193
|
-
ret.height = Math.max(0, ret.height - ret.y) ;
|
194
|
-
return ret ;
|
195
|
-
},
|
196
|
-
|
197
|
-
/** Duplicates the passed rect.
|
198
|
-
|
199
|
-
This is faster than Object.clone().
|
200
|
-
|
201
|
-
@param r {Rect} The rect to clone.
|
202
|
-
@returns {Rect} The cloned rect
|
203
|
-
*/
|
204
|
-
cloneRect: function(r) {
|
205
|
-
return { x: r.x, y: r.y, width: r.width, height: r.height } ;
|
206
|
-
},
|
207
|
-
|
208
|
-
/** Returns a string representation of the rect as {x, y, width, height}.
|
209
|
-
|
210
|
-
@param r {Rect} The rect to stringify.
|
211
|
-
@returns {String} A string representation of the rect.
|
212
|
-
*/
|
213
|
-
stringFromRect: function(r) {
|
214
|
-
if (!r) {
|
215
|
-
return "(null)";
|
216
|
-
}
|
217
|
-
else {
|
218
|
-
return '{x:'+r.x+', y:'+r.y+', width:'+r.width+', height:'+r.height+'}';
|
219
|
-
}
|
220
|
-
},
|
221
|
-
|
222
|
-
/**
|
223
|
-
Returns a string representation of the layout hash.
|
224
|
-
|
225
|
-
Layouts can contain the following keys:
|
226
|
-
- left: the left edge
|
227
|
-
- top: the top edge
|
228
|
-
- right: the right edge
|
229
|
-
- bottom: the bottom edge
|
230
|
-
- height: the height
|
231
|
-
- width: the width
|
232
|
-
- centerX: an offset from center X
|
233
|
-
- centerY: an offset from center Y
|
234
|
-
- minWidth: a minimum width
|
235
|
-
- minHeight: a minimum height
|
236
|
-
- maxWidth: a maximum width
|
237
|
-
- maxHeight: a maximum height
|
238
|
-
|
239
|
-
@param layout {Hash} The layout hash to stringify.
|
240
|
-
@returns {String} A string representation of the layout hash.
|
241
|
-
*/
|
242
|
-
stringFromLayout: function(layout) {
|
243
|
-
// Put them in the reverse order that we want to display them, because
|
244
|
-
// iterating in reverse is faster for CPUs that can compare against zero
|
245
|
-
// quickly.
|
246
|
-
var keys = ['maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'centerY',
|
247
|
-
'centerX', 'width', 'height', 'bottom', 'right', 'top',
|
248
|
-
'left'],
|
249
|
-
keyValues = [], key,
|
250
|
-
i = keys.length;
|
251
|
-
while (--i >= 0) {
|
252
|
-
key = keys[i];
|
253
|
-
if (layout.hasOwnProperty(key)) {
|
254
|
-
keyValues.push(key + ':' + layout[key]);
|
255
|
-
}
|
256
|
-
}
|
257
|
-
|
258
|
-
return '{' + keyValues.join(', ') + '}';
|
259
|
-
},
|
260
|
-
|
261
|
-
/**
|
262
|
-
Given a string and a fixed width, calculates the height of that
|
263
|
-
block of text using a style string, a set of class names,
|
264
|
-
or both.
|
265
|
-
|
266
|
-
@param str {String} The text to calculate
|
267
|
-
@param width {Number} The fixed width to assume the text will fill
|
268
|
-
@param style {String} A CSS style declaration. E.g., 'font-weight: bold'
|
269
|
-
@param classNames {Array} An array of class names that may affect the style
|
270
|
-
@param ignoreEscape {Boolean} To NOT html escape the string.
|
271
|
-
@returns {Number} The height of the text given the passed parameters
|
272
|
-
*/
|
273
|
-
heightForString: function(str, width, style, classNames, ignoreEscape) {
|
274
|
-
var elem = this._heightCalcElement, classes, height;
|
275
|
-
|
276
|
-
if(!ignoreEscape) str = SC.RenderContext.escapeHTML(str);
|
277
|
-
|
278
|
-
// Coalesce the array of class names to one string, if the array exists
|
279
|
-
classes = (classNames && SC.typeOf(classNames) === SC.T_ARRAY) ? classNames.join(' ') : '';
|
280
|
-
|
281
|
-
if (!width) width = 100; // default to 100 pixels
|
282
|
-
|
283
|
-
// Only create the offscreen element once, then cache it
|
284
|
-
if (!elem) {
|
285
|
-
elem = this._heightCalcElement = document.createElement('div');
|
286
|
-
document.body.insertBefore(elem, null);
|
287
|
-
}
|
288
|
-
|
289
|
-
style = style+'; width: '+width+'px; left: '+(-1*width)+'px; position: absolute';
|
290
|
-
var cqElem = SC.$(elem);
|
291
|
-
cqElem.attr('style', style);
|
292
|
-
|
293
|
-
if (classes !== '') {
|
294
|
-
cqElem.attr('class', classes);
|
295
|
-
}
|
296
|
-
|
297
|
-
elem.innerHTML = str;
|
298
|
-
height = elem.clientHeight;
|
299
|
-
|
300
|
-
elem = null; // don't leak memory
|
301
|
-
return height;
|
302
|
-
},
|
303
|
-
|
304
|
-
/**
|
305
|
-
Sets up a string measuring environment.
|
306
|
-
|
307
|
-
You may want to use this, in conjunction with teardownStringMeasurement and
|
308
|
-
measureString, instead of metricsForString, if you will be measuring many
|
309
|
-
strings with the same settings. It would be a lot more efficient, as it
|
310
|
-
would only prepare and teardown once instead of several times.
|
311
|
-
|
312
|
-
@param exampleElement The example element to grab styles from, or the style
|
313
|
-
string to use.
|
314
|
-
@param classNames {String} (Optional) Class names to add to the test element.
|
315
|
-
*/
|
316
|
-
prepareStringMeasurement: function(exampleElement, classNames) {
|
317
|
-
var element = this._metricsCalculationElement, classes, styles, style,
|
318
|
-
cqElem;
|
319
|
-
|
320
|
-
// collect the class names
|
321
|
-
classes = SC.A(classNames).join(' ');
|
322
|
-
|
323
|
-
// get the calculation element
|
324
|
-
if (!element) {
|
325
|
-
element = this._metricsCalculationElement = document.createElement("div");
|
326
|
-
document.body.insertBefore(element, null);
|
327
|
-
}
|
328
|
-
|
329
|
-
cqElem = SC.$(element);
|
330
|
-
// two possibilities: example element or type string
|
331
|
-
if (SC.typeOf(exampleElement) != SC.T_STRING) {
|
332
|
-
var computed = null;
|
333
|
-
if (document.defaultView && document.defaultView.getComputedStyle) {
|
334
|
-
computed = document.defaultView.getComputedStyle(exampleElement, null);
|
335
|
-
} else {
|
336
|
-
computed = exampleElement.currentStyle;
|
337
|
-
}
|
338
|
-
|
339
|
-
// set (lovely cssText property here helps a lot—if it works. Unfortunately, only Safari supplies it.)
|
340
|
-
style = computed.cssText;
|
341
|
-
|
342
|
-
|
343
|
-
// if that didn't work (Safari-only?) go alternate route. This is SLOW code...
|
344
|
-
if (!style || style.trim() === "") {
|
345
|
-
// there is only one way to do it...
|
346
|
-
var props = this._copy_computed_props;
|
347
|
-
|
348
|
-
// firefox ONLY allows this method
|
349
|
-
for (var i = 0; i < props.length; i++) {
|
350
|
-
var prop = props[i], val = computed[prop];
|
351
|
-
element.style[prop] = val;
|
352
|
-
}
|
353
|
-
|
354
|
-
// and why does firefox specifically need "font" set?
|
355
|
-
var cs = element.style; // cached style
|
356
|
-
if (cs.font === "") {
|
357
|
-
var font = "";
|
358
|
-
if (cs.fontStyle) font += cs.fontStyle + " ";
|
359
|
-
if (cs.fontVariant) font += cs.fontVariant + " ";
|
360
|
-
if (cs.fontWeight) font += cs.fontWeight + " ";
|
361
|
-
if (cs.fontSize) font += cs.fontSize; else font += "10px"; //force a default
|
362
|
-
if (cs.lineHeight) font += "/" + cs.lineHeight;
|
363
|
-
font += " ";
|
364
|
-
if (cs.fontFamily) font += cs.fontFamily; else cs += "sans-serif";
|
365
|
-
|
366
|
-
element.style.font = font;
|
367
|
-
}
|
368
|
-
|
369
|
-
SC.mixin(element.style, {
|
370
|
-
left: "0px", top: "0px", position: "absolute", bottom: "auto", right: "auto", width: "auto", height: "auto"
|
371
|
-
});
|
372
|
-
}
|
373
|
-
else
|
374
|
-
{
|
375
|
-
// set style
|
376
|
-
cqElem.attr("style", style + "; position:absolute; left: 0px; top: 0px; bottom: auto; right: auto; width: auto; height: auto;");
|
377
|
-
}
|
378
|
-
|
379
|
-
// clean up
|
380
|
-
computed = null;
|
381
|
-
} else {
|
382
|
-
// it is a style string already
|
383
|
-
style = exampleElement;
|
384
|
-
|
385
|
-
// set style
|
386
|
-
cqElem.attr("style", style + "; position:absolute; left: 0px; top: 0px; bottom: auto; right: auto; width: auto; height: auto;");
|
387
|
-
}
|
388
|
-
|
389
|
-
element.className = classes;
|
390
|
-
element = null;
|
391
|
-
},
|
392
|
-
|
393
|
-
/**
|
394
|
-
Tears down the string measurement environment. Usually, this doesn't _have_
|
395
|
-
to be called, but there are too many what ifs: for example, what if the measurement
|
396
|
-
environment has a bright green background and is over 10,000px wide? Guess what: it will
|
397
|
-
become visible on the screen.
|
398
|
-
|
399
|
-
So, generally, we tear the measurement environment down so that it doesn't cause issue.
|
400
|
-
However, we keep the DOM element for efficiency.
|
401
|
-
*/
|
402
|
-
teardownStringMeasurement: function() {
|
403
|
-
var element = this._metricsCalculationElement;
|
404
|
-
|
405
|
-
// clear element
|
406
|
-
element.innerHTML = "";
|
407
|
-
element.className = "";
|
408
|
-
element.setAttribute("style", ""); // get rid of any junk from computed style.
|
409
|
-
element = null;
|
410
|
-
},
|
411
|
-
|
412
|
-
/**
|
413
|
-
Measures a string in the prepared environment.
|
414
|
-
|
415
|
-
An easier and simpler alternative (but less efficient for bulk measuring) is metricsForString.
|
416
|
-
|
417
|
-
@param string {String} The string to measure.
|
418
|
-
@param ignoreEscape {Boolean} To NOT html escape the string.
|
419
|
-
*/
|
420
|
-
measureString: function(string, ignoreEscape) {
|
421
|
-
if(!ignoreEscape) string = SC.RenderContext.escapeHTML(string);
|
422
|
-
|
423
|
-
var element = this._metricsCalculationElement;
|
424
|
-
if (!element) {
|
425
|
-
throw "measureString requires a string measurement environment to be set up. Did you mean metricsForString?";
|
426
|
-
}
|
427
|
-
|
428
|
-
// the conclusion of which to use (innerText or textContent) should be cached
|
429
|
-
if (typeof element.innerText != "undefined") element.innerText = string;
|
430
|
-
else element.textContent = string;
|
431
|
-
|
432
|
-
// generate result
|
433
|
-
var result = {
|
434
|
-
width: element.clientWidth,
|
435
|
-
height: element.clientHeight
|
436
|
-
};
|
437
|
-
|
438
|
-
element = null;
|
439
|
-
return result;
|
440
|
-
},
|
441
|
-
|
442
|
-
/**
|
443
|
-
Given a string and an example element or style string, and an optional
|
444
|
-
set of class names, calculates the width and height of that block of text.
|
445
|
-
|
446
|
-
To constrain the width, set max-width on the exampleElement or in the style string.
|
447
|
-
|
448
|
-
@param string {String} The string to measure.
|
449
|
-
@param exampleElement The example element to grab styles from, or the style string to use.
|
450
|
-
@param classNames {String} (Optional) Class names to add to the test element.
|
451
|
-
@param ignoreEscape {Boolean} To NOT html escape the string.
|
452
|
-
*/
|
453
|
-
metricsForString: function(string, exampleElement, classNames, ignoreEscape) {
|
454
|
-
if(!ignoreEscape) string = SC.RenderContext.escapeHTML(string);
|
455
|
-
|
456
|
-
SC.prepareStringMeasurement(exampleElement, classNames);
|
457
|
-
var result = SC.measureString(string);
|
458
|
-
SC.teardownStringMeasurement();
|
459
|
-
return result;
|
460
|
-
},
|
461
|
-
|
462
|
-
/** Finds the absolute viewportOffset for a given element.
|
463
|
-
This method is more accurate than the version provided by prototype.
|
464
|
-
|
465
|
-
If you pass NULL to this method, it will return a { x:0, y:0 }
|
466
|
-
@param el The DOM element
|
467
|
-
@returns {Point} A hash with x,y offsets.
|
468
|
-
*/
|
469
|
-
viewportOffset: function(el) {
|
470
|
-
// Some browsers natively implement getBoundingClientRect, so if it's
|
471
|
-
// available we'll use it for speed.
|
472
|
-
if (el.getBoundingClientRect) {
|
473
|
-
var boundingRect = el.getBoundingClientRect();
|
474
|
-
return { x:boundingRect.left, y:boundingRect.top };
|
475
|
-
}
|
476
|
-
|
477
|
-
var valueL = 0, valueT = 0, cqElement, overflow, left, top, offsetParent,
|
478
|
-
element = el, isFirefox3 = SC.browser.mozilla >= 3 ;
|
479
|
-
// add up all the offsets for the element.
|
480
|
-
|
481
|
-
while (element) {
|
482
|
-
cqElement = SC.$(element);
|
483
|
-
valueT += (element.offsetTop || 0);
|
484
|
-
if (!isFirefox3 || (element !== el)) {
|
485
|
-
valueT += (element.clientTop || 0);
|
486
|
-
}
|
487
|
-
|
488
|
-
valueL += (element.offsetLeft || 0);
|
489
|
-
if (!isFirefox3 || (element !== el)) {
|
490
|
-
valueL += (element.clientLeft || 0);
|
491
|
-
}
|
492
|
-
|
493
|
-
// bizarely for FireFox if your offsetParent has a border, then it can
|
494
|
-
// impact the offset.
|
495
|
-
if (SC.browser.mozilla) {
|
496
|
-
overflow = cqElement.attr('overflow') ;
|
497
|
-
if (overflow !== 'visible') {
|
498
|
-
left = parseInt(cqElement.attr('borderLeftWidth'),0) || 0 ;
|
499
|
-
top = parseInt(cqElement.attr('borderTopWidth'),0) || 0 ;
|
500
|
-
if (el !== element) {
|
501
|
-
left *= 2; top *= 2 ;
|
502
|
-
}
|
503
|
-
valueL += left; valueT += top ;
|
504
|
-
}
|
505
|
-
|
506
|
-
// In FireFox 3 -- the offsetTop/offsetLeft subtracts the clientTop/
|
507
|
-
// clientLeft of the offset parent.
|
508
|
-
offsetParent = element.offsetParent ;
|
509
|
-
if (SC.browser.mozilla.match(/1[.]9/) && offsetParent) {
|
510
|
-
valueT -= offsetParent.clientTop ;
|
511
|
-
valueL -= offsetParent.clientLeft;
|
512
|
-
}
|
513
|
-
}
|
514
|
-
|
515
|
-
// Safari fix
|
516
|
-
if (element.offsetParent == document.body &&
|
517
|
-
cqElement.attr('position') === 'absolute') break;
|
518
|
-
|
519
|
-
element = element.offsetParent ;
|
520
|
-
|
521
|
-
}
|
522
|
-
|
523
|
-
element = el;
|
524
|
-
while (element) {
|
525
|
-
if (!SC.browser.isOpera || element.tagName === 'BODY') {
|
526
|
-
valueT -= element.scrollTop || 0;
|
527
|
-
valueL -= element.scrollLeft || 0;
|
528
|
-
}
|
529
|
-
|
530
|
-
element = element.parentNode ;
|
531
|
-
}
|
532
|
-
|
533
|
-
return { x: valueL, y: valueT } ;
|
534
|
-
},
|
535
|
-
|
536
|
-
/** A Point at {0,0} */
|
537
|
-
ZERO_POINT: { x: 0, y: 0 },
|
538
|
-
|
539
|
-
/** A zero length range at zero. */
|
540
|
-
ZERO_RANGE: { start: 0, length: 0 },
|
541
|
-
|
542
|
-
RANGE_NOT_FOUND: { start: 0, length: -1 },
|
543
|
-
|
544
|
-
/** Returns true if the passed index is in the specified range */
|
545
|
-
valueInRange: function(value, range) {
|
546
|
-
return (value >= 0) && (value >= range.start) && (value < (range.start + range.length));
|
547
|
-
},
|
548
|
-
|
549
|
-
/** Returns first value of the range. */
|
550
|
-
minRange: function(range) { return range.start; },
|
551
|
-
|
552
|
-
/** Returns the first value outside of the range. */
|
553
|
-
maxRange: function(range) { return (range.length < 0) ? -1 : (range.start + range.length); },
|
554
|
-
|
555
|
-
/** Returns the union of two ranges. If one range is null, the other
|
556
|
-
range will be returned. */
|
557
|
-
unionRanges: function(r1, r2) {
|
558
|
-
if ((r1 == null) || (r1.length < 0)) return r2 ;
|
559
|
-
if ((r2 == null) || (r2.length < 0)) return r1 ;
|
560
|
-
|
561
|
-
var min = Math.min(r1.start, r2.start),
|
562
|
-
max = Math.max(SC.maxRange(r1), SC.maxRange(r2)) ;
|
563
|
-
return { start: min, length: max - min } ;
|
564
|
-
},
|
565
|
-
|
566
|
-
/** Returns the intersection of the two ranges or SC.RANGE_NOT_FOUND */
|
567
|
-
intersectRanges: function(r1, r2) {
|
568
|
-
if ((r1 == null) || (r2 == null)) return SC.RANGE_NOT_FOUND ;
|
569
|
-
if ((r1.length < 0) || (r2.length < 0)) return SC.RANGE_NOT_FOUND;
|
570
|
-
var min = Math.max(SC.minRange(r1), SC.minRange(r2)),
|
571
|
-
max = Math.min(SC.maxRange(r1), SC.maxRange(r2)) ;
|
572
|
-
if (max < min) return SC.RANGE_NOT_FOUND ;
|
573
|
-
return { start: min, length: max-min };
|
574
|
-
},
|
575
|
-
|
576
|
-
/** Returns the difference of the two ranges or SC.RANGE_NOT_FOUND */
|
577
|
-
subtractRanges: function(r1, r2) {
|
578
|
-
if ((r1 == null) || (r2 == null)) return SC.RANGE_NOT_FOUND ;
|
579
|
-
if ((r1.length < 0) || (r2.length < 0)) return SC.RANGE_NOT_FOUND;
|
580
|
-
var max = Math.max(SC.minRange(r1), SC.minRange(r2)),
|
581
|
-
min = Math.min(SC.maxRange(r1), SC.maxRange(r2)) ;
|
582
|
-
if (max < min) return SC.RANGE_NOT_FOUND ;
|
583
|
-
return { start: min, length: max-min };
|
584
|
-
},
|
585
|
-
|
586
|
-
/** Returns a clone of the range. */
|
587
|
-
cloneRange: function(r) {
|
588
|
-
return { start: r.start, length: r.length };
|
589
|
-
},
|
590
|
-
|
591
|
-
/** Returns true if the two passed ranges are equal. A null value is
|
592
|
-
treated like RANGE_NOT_FOUND.
|
593
|
-
*/
|
594
|
-
rangesEqual: function(r1, r2) {
|
595
|
-
if (r1===r2) return true ;
|
596
|
-
if (r1 == null) return r2.length < 0 ;
|
597
|
-
if (r2 == null) return r1.length < 0 ;
|
598
|
-
return (r1.start == r2.start) && (r1.length == r2.length) ;
|
599
|
-
},
|
600
|
-
|
601
|
-
/** Returns hex color from hsv value */
|
602
|
-
convertHsvToHex: function (h, s, v) {
|
603
|
-
var r = 0, g = 0, b = 0;
|
604
|
-
|
605
|
-
if (v > 0) {
|
606
|
-
var i = (h == 1) ? 0 : Math.floor(h * 6),
|
607
|
-
f = (h == 1) ? 0 : (h * 6) - i,
|
608
|
-
p = v * (1 - s),
|
609
|
-
q = v * (1 - (s * f)),
|
610
|
-
t = v * (1 - (s * (1 - f))),
|
611
|
-
rgb = [[v,t,p],[q,v,p],[p,v,t],[p,q,v],[t,p,v],[v,p,q]];
|
612
|
-
r = Math.round(255 * rgb[i][0]);
|
613
|
-
g = Math.round(255 * rgb[i][1]);
|
614
|
-
b = Math.round(255 * rgb[i][2]);
|
615
|
-
}
|
616
|
-
return this.parseColor('rgb(' + r + ',' + g + ',' + b + ')');
|
617
|
-
},
|
618
|
-
|
619
|
-
/** Returns hsv color from hex value */
|
620
|
-
convertHexToHsv: function (hex) {
|
621
|
-
var rgb = this.expandColor(hex),
|
622
|
-
max = Math.max(Math.max(rgb[0], rgb[1]), rgb[2]),
|
623
|
-
min = Math.min(Math.min(rgb[0], rgb[1]), rgb[2]),
|
624
|
-
s = (max === 0) ? 0 : (1 - min/max),
|
625
|
-
v = max/255,
|
626
|
-
h = (max == min) ? 0 : ((max == rgb[0]) ? ((rgb[1]-rgb[2])/(max-min)/6) : ((max == rgb[1]) ? ((rgb[2]-rgb[0])/(max-min)/6+1/3) : ((rgb[0]-rgb[1])/(max-min)/6+2/3)));
|
627
|
-
h = (h < 0) ? (h + 1) : ((h > 1) ? (h - 1) : h);
|
628
|
-
return [h, s, v];
|
629
|
-
},
|
630
|
-
|
631
|
-
/** regular expression for parsing color: rgb, hex */
|
632
|
-
PARSE_COLOR_RGBRE: /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i,
|
633
|
-
PARSE_COLOR_HEXRE: /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,
|
634
|
-
|
635
|
-
// return an array of r,g,b colour
|
636
|
-
expandColor: function(color) {
|
637
|
-
var hexColor, red, green, blue;
|
638
|
-
hexColor = this.parseColor(color);
|
639
|
-
if (hexColor) {
|
640
|
-
red = parseInt(hexColor.slice(1, 3), 16);
|
641
|
-
green = parseInt(hexColor.slice(3, 5), 16);
|
642
|
-
blue = parseInt(hexColor.slice(5, 7), 16);
|
643
|
-
return [red,green,blue];
|
644
|
-
}
|
645
|
-
},
|
646
|
-
|
647
|
-
// parse rgb color or 3-digit hex color to return a properly formatted 6-digit hex colour spec, or false
|
648
|
-
parseColor: function(string) {
|
649
|
-
var i=0, color = '#', match, part;
|
650
|
-
if(match = this.PARSE_COLOR_RGBRE.exec(string)) {
|
651
|
-
for (i=1; i<=3; i++) {
|
652
|
-
part = Math.max(0, Math.min(255, parseInt(match[i],0)));
|
653
|
-
color += this.toColorPart(part);
|
654
|
-
}
|
655
|
-
return color;
|
656
|
-
}
|
657
|
-
if (match = this.PARSE_COLOR_HEXRE.exec(string)) {
|
658
|
-
if(match[1].length == 3) {
|
659
|
-
for (i=0; i<3; i++) {
|
660
|
-
color += match[1].charAt(i) + match[1].charAt(i);
|
661
|
-
}
|
662
|
-
return color;
|
663
|
-
}
|
664
|
-
return '#' + match[1];
|
665
|
-
}
|
666
|
-
return false;
|
667
|
-
},
|
668
|
-
|
669
|
-
// convert one r,g,b number to a 2 digit hex string
|
670
|
-
toColorPart: function(number) {
|
671
|
-
if (number > 255) number = 255;
|
672
|
-
var digits = number.toString(16);
|
673
|
-
if (number < 16) return '0' + digits;
|
674
|
-
return digits;
|
675
|
-
},
|
676
|
-
|
677
|
-
|
678
|
-
// Get the computed style from specific element. Useful for cloning styles
|
679
|
-
getStyle: function(oElm, strCssRule){
|
680
|
-
var strValue = "";
|
681
|
-
if(document.defaultView && document.defaultView.getComputedStyle){
|
682
|
-
strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
|
683
|
-
}
|
684
|
-
else if(oElm.currentStyle){
|
685
|
-
strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
|
686
|
-
return p1.toUpperCase();
|
687
|
-
});
|
688
|
-
strValue = oElm.currentStyle[strCssRule];
|
689
|
-
}
|
690
|
-
return strValue;
|
691
|
-
},
|
692
|
-
|
693
|
-
// Convert double byte characters to standard Unicode. Considers only
|
694
|
-
// conversions from zenkaku to hankaky roomaji
|
695
|
-
uniJapaneseConvert: function (str){
|
696
|
-
var nChar, cString= '', j, jLen;
|
697
|
-
//here we cycle through the characters in the current value
|
698
|
-
for (j=0, jLen = str.length; j<jLen; j++){
|
699
|
-
nChar = str.charCodeAt(j);
|
700
|
-
|
701
|
-
//here we do the unicode conversion from zenkaku to hankaku roomaji
|
702
|
-
nChar = ((nChar>=65281 && nChar<=65392)?nChar-65248:nChar);
|
703
|
-
|
704
|
-
//MS IME seems to put this character in as the hyphen from keyboard but not numeric pad...
|
705
|
-
nChar = ( nChar===12540?45:nChar) ;
|
706
|
-
cString = cString + String.fromCharCode(nChar);
|
707
|
-
}
|
708
|
-
return cString;
|
709
|
-
}
|
710
|
-
}) ;
|