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
@@ -134,15 +134,13 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
134
134
|
@property {Number}
|
135
135
|
*/
|
136
136
|
maximumHorizontalScrollOffset: function() {
|
137
|
-
var view = this.get('contentView')
|
138
|
-
|
139
|
-
|
140
|
-
if (view && view.get('frame')) contentWidth = view.get('frame').width;
|
141
|
-
if (view) calculatedWidth = view.calculatedWidth || 0;
|
137
|
+
var view = this.get('contentView') ;
|
138
|
+
var contentWidth = view ? view.get('frame').width : 0,
|
139
|
+
calculatedWidth = view ? view.get('calculatedWidth') : 0;
|
142
140
|
|
143
141
|
// The following code checks if there is a calculatedWidth (collections)
|
144
142
|
// to avoid looking at the incorrect value calculated by frame.
|
145
|
-
if(
|
143
|
+
if (calculatedWidth) {
|
146
144
|
contentWidth = view.calculatedWidth;
|
147
145
|
}
|
148
146
|
contentWidth *= this._scale;
|
@@ -164,15 +162,13 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
164
162
|
*/
|
165
163
|
maximumVerticalScrollOffset: function() {
|
166
164
|
var view = this.get('contentView'),
|
167
|
-
contentHeight =
|
168
|
-
|
169
|
-
if (view && view.get('frame')) contentHeight = view.get('frame').height;
|
170
|
-
if (view) calculatedHeight = view.calculatedHeight || 0;
|
165
|
+
contentHeight = (view && view.get('frame')) ? view.get('frame').height : 0,
|
166
|
+
calculatedHeight = view ? view.get('calculatedHeight') : 0;
|
171
167
|
|
172
168
|
// The following code checks if there is a calculatedWidth (collections)
|
173
169
|
// to avoid looking at the incorrect value calculated by frame.
|
174
|
-
if(
|
175
|
-
contentHeight =
|
170
|
+
if(calculatedHeight){
|
171
|
+
contentHeight = calculatedHeight;
|
176
172
|
}
|
177
173
|
contentHeight *= this._scale;
|
178
174
|
|
@@ -194,12 +190,12 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
194
190
|
*/
|
195
191
|
minimumHorizontalScrollOffset: function() {
|
196
192
|
var view = this.get('contentView') ;
|
197
|
-
var contentWidth = view ? view.get('frame').width : 0
|
198
|
-
|
193
|
+
var contentWidth = view ? view.get('frame').width : 0,
|
194
|
+
calculatedWidth = view ? view.get('calculatedWidth') : 0;
|
199
195
|
// The following code checks if there is a calculatedWidth (collections)
|
200
196
|
// to avoid looking at the incorrect value calculated by frame.
|
201
|
-
if(
|
202
|
-
contentWidth =
|
197
|
+
if(calculatedWidth){
|
198
|
+
contentWidth = calculatedWidth;
|
203
199
|
}
|
204
200
|
contentWidth *= this._scale;
|
205
201
|
|
@@ -220,11 +216,12 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
220
216
|
*/
|
221
217
|
minimumVerticalScrollOffset: function() {
|
222
218
|
var view = this.get('contentView') ;
|
223
|
-
var contentHeight = (view && view.get('frame')) ? view.get('frame').height : 0
|
219
|
+
var contentHeight = (view && view.get('frame')) ? view.get('frame').height : 0,
|
220
|
+
calculatedHeight = view ? view.get('calculatedHeight') : 0;
|
224
221
|
|
225
222
|
// The following code checks if there is a calculatedWidth (collections)
|
226
223
|
// to avoid looking at the incorrect value calculated by frame.
|
227
|
-
if(
|
224
|
+
if(calculatedHeight){
|
228
225
|
contentHeight = view.calculatedHeight;
|
229
226
|
}
|
230
227
|
contentHeight *= this._scale;
|
@@ -924,8 +921,10 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
924
921
|
this.updateScale(this._scale);
|
925
922
|
transform += 'translate3d('+ -this._scroll_horizontalScrollOffset +'px, '+ -Math.round(this._scroll_verticalScrollOffset)+'px,0) ';
|
926
923
|
transform += this._scale_css;
|
927
|
-
layer
|
928
|
-
|
924
|
+
if (layer) {
|
925
|
+
layer.style.webkitTransform = transform;
|
926
|
+
layer.style.webkitTransformOrigin = "top left";
|
927
|
+
}
|
929
928
|
},
|
930
929
|
|
931
930
|
captureTouch: function(touch) {
|
@@ -1011,16 +1010,19 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1011
1010
|
var globalFrame = this.convertFrameToView(this.get("frame"), null),
|
1012
1011
|
positionInContentX = (horizontalScrollOffset + (avg.x - globalFrame.x)) / this._scale,
|
1013
1012
|
positionInContentY = (verticalScrollOffset + (avg.y - globalFrame.y)) / this._scale;
|
1014
|
-
|
1013
|
+
|
1015
1014
|
this.touch = {
|
1016
1015
|
startTime: touch.timeStamp,
|
1017
1016
|
notCalculated: YES,
|
1018
1017
|
|
1019
1018
|
enableScrolling: {
|
1020
1019
|
x: contentWidth * this._scale > containerWidth || this.get("alwaysBounceHorizontal"),
|
1021
|
-
y: contentHeight * this._scale > containerHeight || this.get("alwaysBounceVertical")
|
1020
|
+
y: contentHeight * this._scale > containerHeight || this.get("alwaysBounceVertical")
|
1021
|
+
},
|
1022
1022
|
scrolling: { x: NO, y: NO },
|
1023
1023
|
|
1024
|
+
enableBouncing: SC.platform.bounceOnScroll,
|
1025
|
+
|
1024
1026
|
// offsets and velocities
|
1025
1027
|
startClipOffset: { x: startClipOffsetX, y: startClipOffsetY },
|
1026
1028
|
lastScrollOffset: { x: horizontalScrollOffset, y: verticalScrollOffset },
|
@@ -1034,7 +1036,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1034
1036
|
|
1035
1037
|
startScale: this._scale,
|
1036
1038
|
startDistance: avg.d,
|
1037
|
-
canScale: this.get("canScale"),
|
1039
|
+
canScale: this.get("canScale") && SC.platform.pinchToZoom,
|
1038
1040
|
minimumScale: this.get("minimumScale"),
|
1039
1041
|
maximumScale: this.get("maximumScale"),
|
1040
1042
|
|
@@ -1160,7 +1162,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1160
1162
|
if (deltaY > touch.scrollLock && !touch.scrolling.x) touch.enableScrolling.x = NO;
|
1161
1163
|
}
|
1162
1164
|
|
1163
|
-
// handle scaling
|
1165
|
+
// handle scaling through pinch gesture
|
1164
1166
|
if (touch.canScale) {
|
1165
1167
|
|
1166
1168
|
var startDistance = touch.startDistance, dd = distance - startDistance;
|
@@ -1180,30 +1182,46 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1180
1182
|
}
|
1181
1183
|
}
|
1182
1184
|
|
1183
|
-
|
1185
|
+
// these do exactly what they sound like. So, this comment is just to
|
1186
|
+
// block off the code a bit
|
1187
|
+
// In english, these calculate the minimum X/Y offsets
|
1184
1188
|
minOffsetX = this.minimumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1185
1189
|
minOffsetY = this.minimumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1186
1190
|
|
1191
|
+
// and now, maximum...
|
1187
1192
|
maxOffsetX = this.maximumScrollOffset(touch.contentSize.width * this._scale, touch.containerSize.width, this.get("horizontalAlign"));
|
1188
1193
|
maxOffsetY = this.maximumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1189
1194
|
|
1195
|
+
|
1196
|
+
// So, the following is the completely written out algebra:
|
1190
1197
|
// (offsetY + touchYInFrame) / this._scale = touch.startTouchOffsetInContent.y
|
1191
1198
|
// offsetY + touchYInFrame = touch.startTouchOffsetInContent.y * this._scale;
|
1192
1199
|
// offsetY = touch.startTouchOffset * this._scale - touchYInFrame
|
1200
|
+
|
1201
|
+
// and the result applied:
|
1193
1202
|
offsetX = touch.startTouchOffsetInContent.x * this._scale - touchXInFrame;
|
1194
1203
|
offsetY = touch.startTouchOffsetInContent.y * this._scale - touchYInFrame;
|
1195
1204
|
|
1196
1205
|
|
1197
|
-
//
|
1198
|
-
|
1199
|
-
|
1206
|
+
// we need to adjust for edge resistance, or, if bouncing is disabled, just stop flat.
|
1207
|
+
if (touch.enableBouncing) {
|
1208
|
+
offsetX = this._adjustForEdgeResistance(offsetX, minOffsetX, maxOffsetX, touch.resistanceCoefficient, touch.resistanceAsymptote);
|
1209
|
+
offsetY = this._adjustForEdgeResistance(offsetY, minOffsetY, maxOffsetY, touch.resistanceCoefficient, touch.resistanceAsymptote);
|
1210
|
+
} else {
|
1211
|
+
offsetX = Math.max(minOffsetX, Math.min(maxOffsetX, offsetX));
|
1212
|
+
offsetY = Math.max(minOffsetY, Math.min(maxOffsetY, offsetY));
|
1213
|
+
}
|
1200
1214
|
|
1215
|
+
// and now, _if_ scrolling is enabled, set the new coordinates
|
1201
1216
|
if (touch.scrolling.x) this._scroll_horizontalScrollOffset = offsetX;
|
1202
1217
|
if (touch.scrolling.y) this._scroll_verticalScrollOffset = offsetY;
|
1203
1218
|
|
1219
|
+
// and apply the CSS transforms.
|
1204
1220
|
this._applyCSSTransforms(touch.layer);
|
1205
1221
|
this._touchScrollDidChange();
|
1206
1222
|
|
1223
|
+
|
1224
|
+
// now we must prepare for momentum scrolling by calculating the momentum.
|
1207
1225
|
if (timeStamp - touch.lastEventTime >= 1 || touch.notCalculated) {
|
1208
1226
|
touch.notCalculated = NO;
|
1209
1227
|
var horizontalOffset = this._scroll_horizontalScrollOffset;
|
@@ -1354,6 +1372,11 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1354
1372
|
|
1355
1373
|
var de = touch.decelerationFromEdge, ac = touch.accelerationToEdge;
|
1356
1374
|
|
1375
|
+
// under a few circumstances, we may want to force a valid X/Y position.
|
1376
|
+
// For instance, if bouncing is disabled, or if position was okay before
|
1377
|
+
// adjusting scale.
|
1378
|
+
var forceValidXPosition = !touch.enableBouncing, forceValidYPosition = !touch.enableBouncing;
|
1379
|
+
|
1357
1380
|
// determine if position was okay before adjusting scale (which we do, in
|
1358
1381
|
// a lovely, animated way, for the scaled out/in too far bounce-back).
|
1359
1382
|
// if the position was okay, then we are going to make sure that we keep the
|
@@ -1361,8 +1384,8 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1361
1384
|
//
|
1362
1385
|
// Position OKness, here, referring to if the position is valid (within
|
1363
1386
|
// minimum and maximum scroll offsets)
|
1364
|
-
|
1365
|
-
|
1387
|
+
if (newX >= minOffsetX && newX <= maxOffsetX) forceValidXPosition = YES;
|
1388
|
+
if (newY >= minOffsetY && newY <= maxOffsetY) forceValidYPosition = YES;
|
1366
1389
|
|
1367
1390
|
// We are going to change scale in a moment, but the position should stay the
|
1368
1391
|
// same, if possible (unless it would be more jarring, as described above, in
|
@@ -1410,15 +1433,21 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1410
1433
|
maxOffsetY = this.maximumScrollOffset(touch.contentSize.height * this._scale, touch.containerSize.height, this.get("verticalAlign"));
|
1411
1434
|
|
1412
1435
|
// see if scaling messed up the X position (but ignore if 'tweren't right to begin with).
|
1413
|
-
if (
|
1436
|
+
if (forceValidXPosition && (newX < minOffsetX || newX > maxOffsetX)) {
|
1414
1437
|
// Correct the position
|
1415
1438
|
newX = Math.max(minOffsetX, Math.min(newX, maxOffsetX));
|
1439
|
+
|
1440
|
+
// also, make the velocity be ZERO; it is obviously not needed...
|
1441
|
+
touch.decelerationVelocity.x = 0;
|
1416
1442
|
}
|
1417
1443
|
|
1418
1444
|
// now the y
|
1419
|
-
if (
|
1445
|
+
if (forceValidYPosition && (newY < minOffsetY || newY > maxOffsetY)) {
|
1420
1446
|
// again, correct it...
|
1421
1447
|
newY = Math.max(minOffsetY, Math.min(newY, maxOffsetY));
|
1448
|
+
|
1449
|
+
// also, make the velocity be ZERO; it is obviously not needed...
|
1450
|
+
touch.decelerationVelocity.y = 0;
|
1422
1451
|
}
|
1423
1452
|
|
1424
1453
|
|
@@ -1428,9 +1457,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1428
1457
|
|
1429
1458
|
this._applyCSSTransforms(touch.layer); // <- Does what it sounds like.
|
1430
1459
|
|
1431
|
-
SC.RunLoop.begin();
|
1432
1460
|
this._touchScrollDidChange();
|
1433
|
-
SC.RunLoop.end();
|
1434
1461
|
|
1435
1462
|
// Now we have to adjust the velocities. The velocities are simple x and y numbers that
|
1436
1463
|
// get added to the scroll X/Y positions each frame.
|
@@ -1460,15 +1487,11 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1460
1487
|
// as well.
|
1461
1488
|
var absXVelocity = Math.abs(touch.decelerationVelocity.x);
|
1462
1489
|
var absYVelocity = Math.abs(touch.decelerationVelocity.y);
|
1463
|
-
if (absYVelocity < 0.
|
1490
|
+
if (absYVelocity < 0.05 && absXVelocity < 0.05 && Math.abs(sv) < 0.05) {
|
1464
1491
|
// we can reset the timeout, as it will no longer be required, and we don't want to re-cancel it later.
|
1465
1492
|
touch.timeout = null;
|
1466
1493
|
this.touch = null;
|
1467
1494
|
|
1468
|
-
// we aren't in a run loop right now (see below, where we trigger the timer)
|
1469
|
-
// so, we must start one.
|
1470
|
-
SC.RunLoop.begin();
|
1471
|
-
|
1472
1495
|
// trigger scroll end
|
1473
1496
|
this._touchScrollDidEnd();
|
1474
1497
|
|
@@ -1480,8 +1503,6 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1480
1503
|
this.set("horizontalScrollOffset", this._scroll_horizontalScrollOffset);
|
1481
1504
|
this.endPropertyChanges();
|
1482
1505
|
|
1483
|
-
// and now we're done, so just end the run loop and return.
|
1484
|
-
SC.RunLoop.end();
|
1485
1506
|
return;
|
1486
1507
|
}
|
1487
1508
|
|
@@ -1493,7 +1514,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1493
1514
|
var self = this;
|
1494
1515
|
touch.lastEventTime = Date.now();
|
1495
1516
|
this.touch.timeout = setTimeout(function(){
|
1496
|
-
self.decelerateAnimation();
|
1517
|
+
SC.run(self.decelerateAnimation(), self);
|
1497
1518
|
}, 10);
|
1498
1519
|
},
|
1499
1520
|
|
@@ -1561,7 +1582,9 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1561
1582
|
var contentView = this._scroll_contentView ;
|
1562
1583
|
|
1563
1584
|
if (contentView) {
|
1564
|
-
contentView.addObserver('frame', this, this.contentViewFrameDidChange)
|
1585
|
+
contentView.addObserver('frame', this, this.contentViewFrameDidChange);
|
1586
|
+
contentView.addObserver('calculatedWidth', this, this.contentViewFrameDidChange);
|
1587
|
+
contentView.addObserver('calculatedHeight', this, this.contentViewFrameDidChange);
|
1565
1588
|
}
|
1566
1589
|
|
1567
1590
|
if (this.get('isVisibleInWindow')) this._scsv_registerAutoscroll() ;
|
@@ -1587,6 +1610,8 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1587
1610
|
|
1588
1611
|
// stop observing old content view
|
1589
1612
|
if (oldView) {
|
1613
|
+
oldView.removeObserver('calculatedWidth', this, this.contentViewFrameDidChange);
|
1614
|
+
oldView.removeObserver('calculatedHeight', this, this.contentViewFrameDidChange);
|
1590
1615
|
oldView.removeObserver('frame', this, frameObserver);
|
1591
1616
|
oldView.removeObserver('layer', this, layerObserver);
|
1592
1617
|
}
|
@@ -1595,6 +1620,8 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1595
1620
|
this._scroll_contentView = newView;
|
1596
1621
|
if (newView) {
|
1597
1622
|
newView.addObserver('frame', this, frameObserver);
|
1623
|
+
newView.addObserver('calculatedWidth', this, this.contentViewFrameDidChange);
|
1624
|
+
newView.addObserver('calculatedHeight', this, this.contentViewFrameDidChange);
|
1598
1625
|
newView.addObserver('layer', this, layerObserver);
|
1599
1626
|
}
|
1600
1627
|
|
@@ -1635,10 +1662,18 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1635
1662
|
var view = this.get('contentView'),
|
1636
1663
|
f = (view) ? view.get('frame') : null,
|
1637
1664
|
scale = this._scale,
|
1638
|
-
width =
|
1639
|
-
height =
|
1665
|
+
width = 0,
|
1666
|
+
height = 0,
|
1640
1667
|
dim, dimWidth, dimHeight;
|
1641
1668
|
|
1669
|
+
if (view) {
|
1670
|
+
width = view.get('calculatedWidth') || f.width || 0;
|
1671
|
+
height = view.get('calculatedHeight') || f.height || 0;
|
1672
|
+
}
|
1673
|
+
|
1674
|
+
width *= scale;
|
1675
|
+
height *= scale;
|
1676
|
+
|
1642
1677
|
// cache out scroll settings...
|
1643
1678
|
if (!force && (width === this._scroll_contentWidth) && (height === this._scroll_contentHeight)) return ;
|
1644
1679
|
this._scroll_contentWidth = width;
|
@@ -1742,9 +1777,7 @@ SC.ScrollView = SC.View.extend(SC.Border, {
|
|
1742
1777
|
// This gives views that use incremental rendering a chance to render
|
1743
1778
|
// newly-appearing elements before they come into view.
|
1744
1779
|
if (content) {
|
1745
|
-
SC.RunLoop.begin();
|
1746
1780
|
content._viewFrameDidChange();
|
1747
|
-
SC.RunLoop.end();
|
1748
1781
|
|
1749
1782
|
// Use accelerated drawing if the browser supports it
|
1750
1783
|
if (SC.platform.touch) {
|
@@ -0,0 +1,84 @@
|
|
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
|
+
@class
|
9
|
+
|
10
|
+
SegmentViews are the views used and arranged by SC.SegmentedView and are very similar to a SC.ButtonView
|
11
|
+
without any event handling. The event handling is done by the parent view.
|
12
|
+
|
13
|
+
@extends SC.View
|
14
|
+
@since SproutCore 1.5
|
15
|
+
*/
|
16
|
+
SC.SegmentView = SC.View.extend(SC.Control, {
|
17
|
+
/* SC.Control (note: this brings its own display properties: 'isEnabled', 'isSelected', 'isActive', 'controlSize') */
|
18
|
+
isEnabled: YES,
|
19
|
+
|
20
|
+
isActive: NO,
|
21
|
+
|
22
|
+
isSelected: NO,
|
23
|
+
|
24
|
+
controlSize: null,
|
25
|
+
|
26
|
+
/* SC.Button (note: we don't actually mix this in, because it doesn't define displayProperties or renderMixin) */
|
27
|
+
title: '',
|
28
|
+
|
29
|
+
value: null,
|
30
|
+
|
31
|
+
icon: null,
|
32
|
+
|
33
|
+
localize: NO,
|
34
|
+
|
35
|
+
keyEquivalent: null,
|
36
|
+
|
37
|
+
// TODO: Modification currently unsupported in SegmentedView
|
38
|
+
escapeHTML: YES,
|
39
|
+
|
40
|
+
// TODO: Modification currently unsupported in SegmentedView
|
41
|
+
needsEllipsis: YES,
|
42
|
+
|
43
|
+
/* SC.ButtonView */
|
44
|
+
// TODO: Modification currently unsupported in SegmentedView (this may be deprecated in SC.ButtonView and should also be so here)
|
45
|
+
supportFocusRing: NO,
|
46
|
+
|
47
|
+
/* SC.View */
|
48
|
+
renderDelegateName: 'segmentRenderDelegate',
|
49
|
+
|
50
|
+
useStaticLayout: YES,
|
51
|
+
|
52
|
+
// TODO: isDefault, isCancel, value not really used by render delegate
|
53
|
+
displayProperties: ['icon', 'title', 'value', 'displayToolTip', 'isDefault', 'isCancel', 'width', 'isFirstSegment', 'isMiddleSegment', 'isLastSegment', 'index'],
|
54
|
+
|
55
|
+
/* SC.SegmentView */
|
56
|
+
|
57
|
+
width: null,
|
58
|
+
|
59
|
+
/**
|
60
|
+
Whenever the width property changes, adjust our layout accordingly.
|
61
|
+
*/
|
62
|
+
widthDidChange: function() {
|
63
|
+
this.adjust('width', this.get('width'));
|
64
|
+
}.observes('width'),
|
65
|
+
|
66
|
+
/**
|
67
|
+
Update our properties according to our matching item.
|
68
|
+
*/
|
69
|
+
updateItem: function(parentView, item) {
|
70
|
+
var itemKeys = parentView.get('itemKeys'),
|
71
|
+
itemKey,
|
72
|
+
viewKeys = parentView.get('viewKeys'),
|
73
|
+
viewKey,
|
74
|
+
i;
|
75
|
+
|
76
|
+
for (i = itemKeys.get('length') - 1; i >= 0; i--) {
|
77
|
+
itemKey = parentView.get(itemKeys.objectAt(i));
|
78
|
+
viewKey = viewKeys.objectAt(i);
|
79
|
+
|
80
|
+
// Don't overwrite the default value if none exists in the item
|
81
|
+
if (!SC.none(item.get(itemKey))) this.set(viewKey, item.get(itemKey));
|
82
|
+
}
|
83
|
+
}
|
84
|
+
});
|
@@ -92,14 +92,20 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
92
92
|
//
|
93
93
|
|
94
94
|
/**
|
95
|
-
The array of items to display. This
|
96
|
-
|
95
|
+
The array of items to display. This may be a simple array of strings, objects
|
96
|
+
or SC.Objects. If you pass objects or SC.Objects, you must also set the
|
97
97
|
various itemKey properties to tell the SegmentedView how to extract the
|
98
98
|
information it needs.
|
99
99
|
|
100
|
+
Note: only SC.Object items support key-value coding and therefore can be
|
101
|
+
observered by the view for changes to titles, values, icons, widths,
|
102
|
+
isEnabled values & tooltips.
|
103
|
+
|
104
|
+
TODO: explain how to notify the view of changes to String & Object items
|
105
|
+
|
100
106
|
@property {Array}
|
101
107
|
*/
|
102
|
-
items:
|
108
|
+
items: null,
|
103
109
|
|
104
110
|
/**
|
105
111
|
The key that contains the title for each item.
|
@@ -164,212 +170,165 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
164
170
|
equivalent in the tab.
|
165
171
|
*/
|
166
172
|
itemKeyEquivalentKey: null,
|
167
|
-
|
168
|
-
/**
|
169
|
-
The
|
170
|
-
|
171
|
-
|
173
|
+
|
174
|
+
/** @private
|
175
|
+
The following properties are used to map items to child views. Item keys
|
176
|
+
are looked up on the item based on this view's value for each 'itemKey'.
|
177
|
+
If a value in the item is found, then that value is mapped to a child
|
178
|
+
view using the matching viewKey.
|
172
179
|
|
173
180
|
@property {Array}
|
174
181
|
*/
|
175
|
-
itemKeys: 'itemTitleKey itemValueKey itemIsEnabledKey itemIconKey itemWidthKey itemToolTipKey'.w(),
|
182
|
+
itemKeys: 'itemTitleKey itemValueKey itemIsEnabledKey itemIconKey itemWidthKey itemToolTipKey itemKeyEquivalentKey'.w(),
|
183
|
+
viewKeys: 'title value isEnabled icon width toolTip keyEquivalent'.w(),
|
176
184
|
|
177
185
|
/**
|
178
|
-
|
179
|
-
|
180
|
-
that contain private information used by the SegmentedView to render.
|
181
|
-
|
182
|
-
You will not generally need to access or edit this property.
|
183
|
-
|
184
|
-
@property {Array}
|
186
|
+
Call itemsDidChange once to initialize segment child views for the items that exist at
|
187
|
+
creation time.
|
185
188
|
*/
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
189
|
+
init: function() {
|
190
|
+
sc_super();
|
191
|
+
|
192
|
+
this.itemsDidChange();
|
193
|
+
},
|
194
|
+
|
195
|
+
/**
|
196
|
+
Called whenever the number of items changes. This method populates SegmentedView's childViews, taking
|
197
|
+
care to re-use existing childViews if possible.
|
198
|
+
|
199
|
+
*/
|
200
|
+
itemsDidChange: function() {
|
201
|
+
var items = this.get('items') || [],
|
202
|
+
item,
|
203
|
+
localItem, // Used to avoid altering the original items
|
204
|
+
childViews = this.get('childViews'),
|
205
|
+
childView,
|
206
|
+
value = this.get('value'), // The value can change if items that were once selected are removed
|
207
|
+
isSelected,
|
208
|
+
itemKeys = this.get('itemKeys'),
|
209
|
+
itemKey,
|
210
|
+
viewKeys = this.get('viewKeys'),
|
211
|
+
viewKey,
|
212
|
+
i, j;
|
213
|
+
|
214
|
+
// Update childViews
|
215
|
+
if (childViews.get('length') > items.get('length')) { // We've lost segments (ie. childViews)
|
195
216
|
|
196
|
-
//
|
197
|
-
|
198
|
-
|
199
|
-
cur = [item.humanize().titleize(), item, YES, null, null, null, idx] ;
|
217
|
+
// Remove unneeded segments from the end back
|
218
|
+
for (i = childViews.get('length') - 1; i >= items.get('length'); i--) {
|
219
|
+
childView = childViews.objectAt(i);
|
200
220
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
if (
|
205
|
-
|
221
|
+
// If a selected childView has been removed then update our value
|
222
|
+
if (SC.isArray(value)) {
|
223
|
+
value.removeObject(childView.get('value'));
|
224
|
+
} else if (value === childView.get('value')) {
|
225
|
+
value = null;
|
206
226
|
}
|
227
|
+
|
228
|
+
this.removeChild(childView);
|
229
|
+
}
|
230
|
+
|
231
|
+
// Update our value which may have changed
|
232
|
+
this.set('value', value);
|
233
|
+
|
234
|
+
} else if (childViews.get('length') < items.get('length')) { // We've gained segments
|
235
|
+
|
236
|
+
// Create the new segments
|
237
|
+
for (i = childViews.get('length'); i < items.get('length'); i++) {
|
238
|
+
|
239
|
+
// We create a default SC.ButtonView-like object for each segment
|
240
|
+
childView = SC.SegmentView.create({
|
241
|
+
controlSize: this.get('controlSize'),
|
242
|
+
localize: this.get('localize')
|
243
|
+
});
|
244
|
+
|
245
|
+
// Attach the child
|
246
|
+
this.appendChild(childView);
|
247
|
+
}
|
248
|
+
}
|
249
|
+
|
250
|
+
// Because the items array can be altered with insertAt or removeAt, we can't be sure that the items
|
251
|
+
// continue to match 1-to-1 the existing views, so once we have the correct number of childViews,
|
252
|
+
// simply update them all
|
253
|
+
childViews = this.get('childViews');
|
254
|
+
|
255
|
+
for (i = 0; i < items.get('length'); i++) {
|
256
|
+
localItem = items.objectAt(i);
|
257
|
+
childView = childViews.objectAt(i);
|
258
|
+
|
259
|
+
// Skip null/undefined items (but don't skip empty strings)
|
260
|
+
if (SC.none(localItem)) continue;
|
261
|
+
|
262
|
+
// Normalize the item (may be a String, Object or SC.Object)
|
263
|
+
if (SC.typeOf(localItem) === SC.T_STRING) {
|
207
264
|
|
208
|
-
|
209
|
-
|
210
|
-
|
265
|
+
localItem = SC.Object.create({
|
266
|
+
'title': localItem.humanize().titleize(),
|
267
|
+
'value': localItem
|
268
|
+
});
|
211
269
|
|
212
|
-
//
|
213
|
-
|
270
|
+
// Update our keys accordingly
|
271
|
+
this.set('itemTitleKey', 'title');
|
272
|
+
this.set('itemValueKey', 'value');
|
273
|
+
} else if (SC.typeOf(localItem) === SC.T_HASH) {
|
214
274
|
|
215
|
-
|
216
|
-
|
275
|
+
localItem = SC.Object.create(localItem);
|
276
|
+
} else if (localItem instanceof SC.Object) {
|
277
|
+
|
278
|
+
// We don't need to make any changes to SC.Object items, but we can observe them
|
279
|
+
for (j = itemKeys.get('length') - 1; j >= 0; j--) {
|
280
|
+
itemKey = this.get(itemKeys.objectAt(j));
|
217
281
|
|
218
|
-
|
219
|
-
|
282
|
+
if (itemKey) {
|
283
|
+
localItem.removeObserver(itemKey, this, this.itemContentDidChange);
|
284
|
+
localItem.addObserver(itemKey, this, this.itemContentDidChange, i);
|
285
|
+
}
|
286
|
+
}
|
287
|
+
} else {
|
288
|
+
SC.Logger.error('SC.SegmentedView items may be Strings, Objects (ie. Hashes) or SC.Objects only');
|
220
289
|
}
|
221
290
|
|
222
|
-
//
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
291
|
+
// Determine whether this segment is selected based on the view's existing value(s)
|
292
|
+
isSelected = NO;
|
293
|
+
if (SC.isArray(value) ? value.indexOf(localItem.get(this.get('itemValueKey'))) >= 0 : value === localItem.get(this.get('itemValueKey'))) {
|
294
|
+
isSelected = YES;
|
295
|
+
}
|
296
|
+
childView.set('isSelected', isSelected);
|
297
|
+
|
298
|
+
// Assign segment specific properties based on position
|
299
|
+
childView.set('index', i);
|
300
|
+
childView.set('isFirstSegment', i === 0);
|
301
|
+
childView.set('isMiddleSegment', i < items.get('length') - 1 && i > 0);
|
302
|
+
childView.set('isLastSegment', i === items.get('length') - 1);
|
227
303
|
|
228
|
-
//
|
229
|
-
|
230
|
-
}
|
231
|
-
|
232
|
-
// all done, return!
|
233
|
-
return ret ;
|
234
|
-
}.property('items', 'itemTitleKey', 'itemValueKey', 'itemIsEnabledKey', 'localize', 'itemIconKey', 'itemWidthKey', 'itemToolTipKey'),
|
235
|
-
|
236
|
-
/** If the items array itself changes, add/remove observer on item... */
|
237
|
-
itemsDidChange: function() {
|
238
|
-
if (this._items) {
|
239
|
-
this._items.removeObserver('[]',this,this.itemContentDidChange) ;
|
240
|
-
}
|
241
|
-
this._items = this.get('items') ;
|
242
|
-
if (this._items) {
|
243
|
-
this._items.addObserver('[]', this, this.itemContentDidChange) ;
|
304
|
+
// Be sure to update the view's properties for the (possibly new) matched item
|
305
|
+
childView.updateItem(this, localItem);
|
244
306
|
}
|
245
307
|
|
246
|
-
|
247
|
-
}.observes('items'),
|
248
|
-
|
249
|
-
/**
|
250
|
-
Invoked whenever the item array or an item in the array is changed. This method will reginerate the list of items.
|
251
|
-
*/
|
252
|
-
itemContentDidChange: function() {
|
253
|
-
this.set('renderLikeFirstTime', YES);
|
254
|
-
this.notifyPropertyChange('displayItems');
|
255
|
-
},
|
308
|
+
}.observes('*items.[]'),
|
256
309
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
310
|
+
itemContentDidChange: function(item, key, alwaysNull, index) {
|
311
|
+
var items = this.get('items'),
|
312
|
+
childViews = this.get('childViews'),
|
313
|
+
childView;
|
261
314
|
|
315
|
+
childView = childViews.objectAt(index);
|
316
|
+
if (childView) {
|
317
|
+
|
318
|
+
// Update the childView
|
319
|
+
childView.updateItem(this, item);
|
320
|
+
} else {
|
321
|
+
SC.Logger.warn("Item content change was observed on item without matching segment child view.");
|
322
|
+
}
|
323
|
+
},
|
262
324
|
|
263
325
|
// ..........................................................
|
264
326
|
// RENDERING/DISPLAY SUPPORT
|
265
327
|
//
|
266
328
|
|
267
|
-
displayProperties: ['
|
329
|
+
displayProperties: ['align'],
|
268
330
|
|
269
|
-
|
270
|
-
render: function(context, firstTime) {
|
271
|
-
|
272
|
-
// collect some data
|
273
|
-
var items = this.get('displayItems');
|
274
|
-
|
275
|
-
var theme = this.get('theme');
|
276
|
-
if (theme) context.addClass(theme);
|
277
|
-
if (firstTime || this.get('renderLikeFirstTime')) {
|
278
|
-
this._seg_displayItems = items; // save for future
|
279
|
-
this.renderDisplayItems(context, items) ;
|
280
|
-
context.addStyle('text-align', this.get('align'));
|
281
|
-
this.set('renderLikeFirstTime',NO);
|
282
|
-
}else{
|
283
|
-
// update selection and active state
|
284
|
-
var activeIndex = this.get('activeIndex'),
|
285
|
-
value = this.get('value'),
|
286
|
-
isArray = SC.isArray(value);
|
287
|
-
if (isArray && value.get('length')===1) {
|
288
|
-
value = value.objectAt(0); isArray = NO ;
|
289
|
-
}
|
290
|
-
var names = {}, // reuse
|
291
|
-
loc = items.length, cq = this.$('.sc-segment'), item;
|
292
|
-
while(--loc>=0) {
|
293
|
-
item = items[loc];
|
294
|
-
names.sel = isArray ? (value.indexOf(item[1])>=0) : (item[1]===value);
|
295
|
-
names.active = (activeIndex === loc);
|
296
|
-
names.disabled = !item[2];
|
297
|
-
SC.$(cq[loc]).setClass(names);
|
298
|
-
}
|
299
|
-
names = items = value = items = null; // cleanup
|
300
|
-
}
|
301
|
-
},
|
302
|
-
|
303
|
-
/**
|
304
|
-
Actually generates the segment HTML for the display items. This method
|
305
|
-
is called the first time a view is constructed and any time the display
|
306
|
-
items change thereafter. This will construct the HTML but will not set
|
307
|
-
any "transient" states such as the global isEnabled property or selection.
|
308
|
-
*/
|
309
|
-
renderDisplayItems: function(context, items) {
|
310
|
-
var value = this.get('value'),
|
311
|
-
isArray = SC.isArray(value),
|
312
|
-
activeIndex = this.get('activeIndex'),
|
313
|
-
len = items.length,
|
314
|
-
title, icon, url, className, ic, item, toolTip, width, i, stylesHash,
|
315
|
-
classArray;
|
316
|
-
|
317
|
-
for(i=0; i< len; i++){
|
318
|
-
ic = context.begin('a').attr('role', 'button');
|
319
|
-
item=items[i];
|
320
|
-
title = item[0];
|
321
|
-
icon = item[3];
|
322
|
-
toolTip = item[5];
|
323
|
-
|
324
|
-
stylesHash = {};
|
325
|
-
classArray = [];
|
326
|
-
|
327
|
-
if (this.get('layoutDirection') == SC.LAYOUT_HORIZONTAL) {
|
328
|
-
stylesHash['display'] = 'inline-block' ;
|
329
|
-
}
|
330
|
-
|
331
|
-
classArray.push('sc-segment');
|
332
|
-
|
333
|
-
if(!item[2]){
|
334
|
-
classArray.push('disabled');
|
335
|
-
}
|
336
|
-
if(i===0){
|
337
|
-
classArray.push('sc-first-segment');
|
338
|
-
}
|
339
|
-
if(i===(len-1)){
|
340
|
-
classArray.push('sc-last-segment');
|
341
|
-
}
|
342
|
-
if(i!==0 && i!==(len-1)){
|
343
|
-
classArray.push('sc-middle-segment');
|
344
|
-
}
|
345
|
-
if( isArray ? (value.indexOf(item[1])>=0) : (item[1]===value)){
|
346
|
-
classArray.push('sel');
|
347
|
-
}
|
348
|
-
if(activeIndex === i) {
|
349
|
-
classArray.push('active') ;
|
350
|
-
}
|
351
|
-
if(item[4]){
|
352
|
-
width=item[4];
|
353
|
-
stylesHash['width'] = width+'px';
|
354
|
-
}
|
355
|
-
ic.addClass(classArray);
|
356
|
-
ic.addStyle(stylesHash);
|
357
|
-
if(toolTip) {
|
358
|
-
ic.attr('title', toolTip) ;
|
359
|
-
}
|
360
|
-
|
361
|
-
if (icon) {
|
362
|
-
url = (icon.indexOf('/')>=0) ? icon : SC.BLANK_IMAGE_URL;
|
363
|
-
className = (url === icon) ? '' : icon ;
|
364
|
-
icon = '<img src="'+url+'" alt="" class="icon '+className+'" />';
|
365
|
-
} else {
|
366
|
-
icon = '';
|
367
|
-
}
|
368
|
-
ic.push('<span class="sc-button-inner"><label class="sc-button-label">',
|
369
|
-
icon+title, '</label></span>');
|
370
|
-
ic.end();
|
371
|
-
}
|
372
|
-
},
|
331
|
+
renderDelegateName: 'segmentedRenderDelegate',
|
373
332
|
|
374
333
|
// ..........................................................
|
375
334
|
// EVENT HANDLING
|
@@ -380,60 +339,32 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
380
339
|
event occurred.
|
381
340
|
*/
|
382
341
|
displayItemIndexForEvent: function(evt) {
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
Determines an item index based on a position. The position does not have to be within the view's
|
388
|
-
bounding rectangle. If no item is at that position, this will return -1.
|
389
|
-
|
390
|
-
NOTE: Eventually, this sort of function should be implemented in a renderer.
|
391
|
-
*/
|
392
|
-
displayItemIndexForPosition: function(pageX, pageY) {
|
393
|
-
// find the segments
|
394
|
-
var segments = this.$('.sc-segment'), len = segments.length, idx, segment, r;
|
395
|
-
|
396
|
-
// loop through them (yes, this comment is mostly because it looks nice in TextMate)
|
397
|
-
for (idx = 0; idx < len; idx++) {
|
398
|
-
// get the segment
|
399
|
-
segment = segments[idx];
|
400
|
-
|
401
|
-
// get its rectangle
|
402
|
-
r = segment.getBoundingClientRect();
|
403
|
-
|
404
|
-
// based on orientation, check the position left-to-right or up-to-down.
|
405
|
-
if (this.get('layoutDirection') == SC.LAYOUT_VERTICAL) {
|
406
|
-
// if it fits, return it right away
|
407
|
-
if (pageY > r.top && pageY < r.bottom) return idx;
|
408
|
-
}
|
409
|
-
else {
|
410
|
-
// if it fits, return it right away.
|
411
|
-
if (pageX > r.left && pageX < r.right) return idx;
|
412
|
-
}
|
342
|
+
var renderDelegate = this.get('renderDelegate');
|
343
|
+
|
344
|
+
if (renderDelegate && renderDelegate.indexForClientPosition) {
|
345
|
+
return renderDelegate.indexForClientPosition(this, evt.clientX, evt.clientY);
|
413
346
|
}
|
414
|
-
|
415
|
-
// if we didn't find anything, return the old standard -1 for "not found."
|
416
|
-
return -1;
|
417
347
|
},
|
418
348
|
|
419
349
|
keyDown: function(evt) {
|
420
350
|
// handle tab key
|
421
351
|
var i, item, items, len, value, isArray;
|
422
|
-
if (evt.which === 9) {
|
352
|
+
if (evt.which === 9 || evt.keyCode === 9) {
|
423
353
|
var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView');
|
424
354
|
if(view) view.becomeFirstResponder();
|
425
355
|
else evt.allowDefault();
|
426
356
|
return YES ; // handled
|
427
357
|
}
|
428
358
|
if (!this.get('allowsMultipleSelection') && !this.get('allowsEmptySelection')){
|
429
|
-
items = this.get('displayItems');
|
430
|
-
|
359
|
+
items = this.get('displayItems').slice(0);
|
360
|
+
|
361
|
+
len = items.get('length');
|
431
362
|
value = this.get('value');
|
432
363
|
isArray = SC.isArray(value);
|
433
364
|
if (evt.which === 39 || evt.which === 40) {
|
434
365
|
for(i=0; i< len-1; i++){
|
435
|
-
item=items
|
436
|
-
if( isArray ? (value.indexOf(item
|
366
|
+
item=items.objectAt(i);
|
367
|
+
if( isArray ? (value.indexOf(item.get('value'))>=0) : (item.get('value')===value)){
|
437
368
|
this.triggerItemAtIndex(i+1);
|
438
369
|
}
|
439
370
|
}
|
@@ -441,8 +372,8 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
441
372
|
}
|
442
373
|
else if (evt.which === 37 || evt.which === 38) {
|
443
374
|
for(i=1; i< len; i++){
|
444
|
-
item=items
|
445
|
-
if( isArray ? (value.indexOf(item
|
375
|
+
item=items.objectAt(i);
|
376
|
+
if( isArray ? (value.indexOf(item.get('value'))>=0) : (item.get('value')===value)){
|
446
377
|
this.triggerItemAtIndex(i-1);
|
447
378
|
}
|
448
379
|
}
|
@@ -453,92 +384,167 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
453
384
|
},
|
454
385
|
|
455
386
|
mouseDown: function(evt) {
|
387
|
+
var childViews = this.get('childViews'),
|
388
|
+
childView,
|
389
|
+
index;
|
390
|
+
|
456
391
|
if (!this.get('isEnabled')) return YES; // nothing to do
|
457
|
-
var idx = this.displayItemIndexForEvent(evt);
|
458
392
|
|
459
|
-
|
460
|
-
if (
|
461
|
-
|
462
|
-
|
393
|
+
index = this.displayItemIndexForEvent(evt);
|
394
|
+
if (index >= 0) {
|
395
|
+
|
396
|
+
childView = childViews[index];
|
397
|
+
childView.set('isActive', YES);
|
398
|
+
|
399
|
+
this.activeChildView = childView;
|
400
|
+
|
401
|
+
// if mouse was pressed on a button, then start detecting pressed events
|
402
|
+
this._isMouseDown = YES;
|
463
403
|
}
|
464
404
|
|
465
405
|
return YES ;
|
466
406
|
},
|
467
407
|
|
468
408
|
mouseUp: function(evt) {
|
469
|
-
var
|
470
|
-
|
471
|
-
|
472
|
-
|
409
|
+
var activeChildView,
|
410
|
+
index;
|
411
|
+
|
412
|
+
index = this.displayItemIndexForEvent(evt);
|
473
413
|
|
474
|
-
|
475
|
-
|
476
|
-
|
414
|
+
if (this._isMouseDown && (index >= 0)) {
|
415
|
+
|
416
|
+
// Clean up
|
417
|
+
this.triggerItemAtIndex(index);
|
418
|
+
|
419
|
+
activeChildView = this.activeChildView;
|
420
|
+
activeChildView.set('isActive', NO);
|
421
|
+
this.activeChildView = null;
|
422
|
+
|
423
|
+
this._isMouseDown = NO;
|
424
|
+
}
|
425
|
+
|
477
426
|
return YES ;
|
478
427
|
},
|
479
428
|
|
480
429
|
mouseMoved: function(evt) {
|
430
|
+
var childViews = this.get('childViews'),
|
431
|
+
activeChildView,
|
432
|
+
childView,
|
433
|
+
index;
|
434
|
+
|
481
435
|
if (this._isMouseDown) {
|
482
|
-
|
483
|
-
this.
|
436
|
+
// Update the last segment
|
437
|
+
index = this.displayItemIndexForEvent(evt);
|
438
|
+
|
439
|
+
activeChildView = this.activeChildView;
|
440
|
+
childView = childViews[index];
|
441
|
+
|
442
|
+
if (childView && childView !== activeChildView) {
|
443
|
+
// Changed
|
444
|
+
if (activeChildView) activeChildView.set('isActive', NO);
|
445
|
+
childView.set('isActive', YES);
|
446
|
+
|
447
|
+
this.activeChildView = childView;
|
448
|
+
}
|
484
449
|
}
|
485
450
|
return YES;
|
486
451
|
},
|
487
452
|
|
488
|
-
|
453
|
+
mouseEntered: function(evt) {
|
454
|
+
var childViews = this.get('childViews'),
|
455
|
+
childView,
|
456
|
+
index;
|
457
|
+
|
489
458
|
// if mouse was pressed down initially, start detection again
|
490
459
|
if (this._isMouseDown) {
|
491
|
-
|
492
|
-
|
460
|
+
index = this.displayItemIndexForEvent(evt);
|
461
|
+
|
462
|
+
if (index >= 0) {
|
463
|
+
childView = childViews[index];
|
464
|
+
childView.set('isActive', YES);
|
465
|
+
|
466
|
+
this.activeChildView = childView;
|
467
|
+
}
|
493
468
|
}
|
494
469
|
return YES;
|
495
470
|
},
|
496
471
|
|
497
|
-
|
472
|
+
mouseExited: function(evt) {
|
473
|
+
var activeChildView;
|
474
|
+
|
498
475
|
// if mouse was down, hide active index
|
499
476
|
if (this._isMouseDown) {
|
500
|
-
|
501
|
-
|
477
|
+
activeChildView = this.activeChildView;
|
478
|
+
if (activeChildView) activeChildView.set('isActive', NO);
|
479
|
+
|
480
|
+
this.activeChildView = null;
|
502
481
|
}
|
503
|
-
|
482
|
+
|
483
|
+
return YES;
|
504
484
|
},
|
505
485
|
|
506
|
-
|
507
|
-
|
508
486
|
touchStart: function(touch) {
|
487
|
+
var childViews = this.get('childViews'),
|
488
|
+
childView,
|
489
|
+
index;
|
490
|
+
|
509
491
|
if (!this.get('isEnabled')) return YES; // nothing to do
|
510
|
-
var idx = this.displayItemIndexForEvent(touch);
|
511
492
|
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
493
|
+
index = this.displayItemIndexForEvent(touch);
|
494
|
+
|
495
|
+
if (index >= 0) {
|
496
|
+
childView = childViews[index];
|
497
|
+
childView.set('isActive', YES);
|
498
|
+
this.activeChildView = childView;
|
499
|
+
|
500
|
+
this._isTouching = YES;
|
516
501
|
}
|
517
502
|
|
518
503
|
return YES ;
|
519
504
|
},
|
520
505
|
|
521
506
|
touchEnd: function(touch) {
|
522
|
-
var
|
507
|
+
var activeChildView,
|
508
|
+
index;
|
509
|
+
|
510
|
+
index = this.displayItemIndexForEvent(touch);
|
523
511
|
// if mouse was pressed on a button then detect where we where when we
|
524
512
|
// release and use that one.
|
525
|
-
if (this._isTouching && (
|
513
|
+
if (this._isTouching && (index >= 0)) this.triggerItemAtIndex(index);
|
526
514
|
|
527
515
|
// cleanup
|
528
|
-
|
529
|
-
|
516
|
+
activeChildView = this.activeChildView;
|
517
|
+
activeChildView.set('isActive', NO);
|
518
|
+
this.activeChildView = null;
|
519
|
+
|
520
|
+
this._isTouching = NO;
|
521
|
+
|
530
522
|
return YES ;
|
531
523
|
},
|
532
524
|
|
533
525
|
touchesDragged: function(evt, touches) {
|
534
|
-
var isTouching = this.touchIsInBoundary(evt)
|
526
|
+
var isTouching = this.touchIsInBoundary(evt),
|
527
|
+
childViews = this.get('childViews'),
|
528
|
+
activeChildView,
|
529
|
+
childView,
|
530
|
+
index;
|
535
531
|
|
536
532
|
if (isTouching) {
|
537
533
|
if (!this._isTouching) {
|
538
534
|
this._touchDidEnter(evt);
|
539
535
|
}
|
540
|
-
|
541
|
-
|
536
|
+
index = this.displayItemIndexForEvent(evt);
|
537
|
+
|
538
|
+
activeChildView = this.activeChildView;
|
539
|
+
childView = childViews[index];
|
540
|
+
|
541
|
+
if (childView && childView !== activeChildView) {
|
542
|
+
// Changed
|
543
|
+
if (activeChildView) activeChildView.set('isActive', NO);
|
544
|
+
childView.set('isActive', YES);
|
545
|
+
|
546
|
+
this.activeChildView = childView;
|
547
|
+
}
|
542
548
|
} else {
|
543
549
|
if (this._isTouching) this._touchDidExit(evt);
|
544
550
|
}
|
@@ -549,53 +555,70 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
549
555
|
},
|
550
556
|
|
551
557
|
_touchDidExit: function(evt) {
|
552
|
-
var
|
553
|
-
|
558
|
+
var activeChildView;
|
559
|
+
|
560
|
+
activeChildView = this.activeChildView;
|
561
|
+
activeChildView.set('isActive', NO);
|
562
|
+
this.activeChildView = null;
|
554
563
|
|
555
564
|
return YES;
|
556
565
|
},
|
557
566
|
|
558
567
|
_touchDidEnter: function(evt) {
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
568
|
+
var childViews = this.get('childViews'),
|
569
|
+
childView,
|
570
|
+
index;
|
571
|
+
|
572
|
+
index = this.displayItemIndexForEvent(evt);
|
573
|
+
|
574
|
+
if (index >= 0) {
|
575
|
+
childView = childViews[index];
|
576
|
+
childView.set('isActive', YES);
|
577
|
+
this.activeChildView = childView;
|
578
|
+
}
|
579
|
+
|
580
|
+
return YES;
|
564
581
|
},
|
565
582
|
|
566
583
|
/**
|
567
584
|
Simulates the user clicking on the segment at the specified index. This
|
568
585
|
will update the value if possible and fire the action.
|
569
586
|
*/
|
570
|
-
triggerItemAtIndex: function(
|
571
|
-
var
|
572
|
-
|
587
|
+
triggerItemAtIndex: function(index) {
|
588
|
+
var childViews = this.get('childViews'),
|
589
|
+
childView,
|
573
590
|
sel, value, val, empty, mult;
|
574
|
-
|
575
|
-
|
591
|
+
|
592
|
+
childView = childViews[index];
|
593
|
+
|
594
|
+
if (!childView.get('isEnabled')) return this; // nothing to do!
|
576
595
|
|
577
596
|
empty = this.get('allowsEmptySelection');
|
578
597
|
mult = this.get('allowsMultipleSelection');
|
579
598
|
|
580
599
|
|
581
600
|
// get new value... bail if not enabled. Also save original for later.
|
582
|
-
sel =
|
601
|
+
sel = childView.get('value');
|
583
602
|
value = val = this.get('value') ;
|
584
|
-
|
603
|
+
|
604
|
+
if (SC.empty(value)) {
|
605
|
+
value = [];
|
606
|
+
} else if (!SC.isArray(value)) {
|
607
|
+
value = [value]; // force to array
|
608
|
+
}
|
585
609
|
|
586
610
|
// if we do not allow multiple selection, either replace the current
|
587
611
|
// selection or deselect it
|
588
612
|
if (!mult) {
|
589
613
|
// if we allow empty selection and the current value is the same as
|
590
614
|
// the selected value, then deselect it.
|
591
|
-
if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){
|
615
|
+
if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)) {
|
592
616
|
value = [];
|
593
617
|
|
594
618
|
// otherwise, simply replace the value.
|
595
619
|
} else value = [sel] ;
|
596
620
|
|
597
|
-
// if we do allow multiple selection, then add or remove item to the
|
598
|
-
// array.
|
621
|
+
// if we do allow multiple selection, then add or remove item to the array.
|
599
622
|
} else {
|
600
623
|
if (value.indexOf(sel) >= 0) {
|
601
624
|
if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) {
|
@@ -620,9 +643,10 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
620
643
|
var actionKey = this.get('itemActionKey'),
|
621
644
|
targetKey = this.get('itemTargetKey'),
|
622
645
|
action, target = null,
|
623
|
-
resp = this.getPath('pane.rootResponder')
|
646
|
+
resp = this.getPath('pane.rootResponder'),
|
647
|
+
item;
|
624
648
|
|
625
|
-
if (actionKey && (item = this.get('items').objectAt(item
|
649
|
+
if (actionKey && (item = this.get('items').objectAt(item.index))) {
|
626
650
|
// get the source item from the item array. use the index stored...
|
627
651
|
action = item.get ? item.get(actionKey) : item[actionKey];
|
628
652
|
if (targetKey) {
|
@@ -643,6 +667,24 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
643
667
|
}
|
644
668
|
},
|
645
669
|
|
670
|
+
/** @private
|
671
|
+
Whenever the value changes, update the segments accordingly.
|
672
|
+
*/
|
673
|
+
valueDidChange: function() {
|
674
|
+
var value = this.get('value'),
|
675
|
+
childViews = this.get('childViews'),
|
676
|
+
childView;
|
677
|
+
|
678
|
+
for (var i = childViews.get('length') - 1; i >= 0; i--) {
|
679
|
+
childView = childViews.objectAt(i);
|
680
|
+
if (SC.isArray(value) ? value.indexOf(childView.get('value')) >= 0 : value === childView.get('value')) {
|
681
|
+
childView.set('isSelected', YES);
|
682
|
+
} else {
|
683
|
+
childView.set('isSelected', NO);
|
684
|
+
}
|
685
|
+
}
|
686
|
+
}.observes('value'),
|
687
|
+
|
646
688
|
/** tied to the isEnabled state */
|
647
689
|
acceptsFirstResponder: function() {
|
648
690
|
if(!SC.SAFARI_FOCUS_BEHAVIOR) return this.get('isEnabled');
|
@@ -664,15 +706,4 @@ SC.SegmentedView = SC.View.extend(SC.Control,
|
|
664
706
|
if (this._isFocused) this._isFocused = NO ;
|
665
707
|
}
|
666
708
|
|
667
|
-
})
|
668
|
-
|
669
|
-
// Helpers defined here to avoid creating lots of closures...
|
670
|
-
SC._segmented_fetchKeys = function(k) { return this.get(k); };
|
671
|
-
SC._segmented_fetchItem = function(k) {
|
672
|
-
if (!k) return null;
|
673
|
-
return this.get ? this.get(k) : this[k];
|
674
|
-
};
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
709
|
+
});
|