sproutcore 1.4.5 → 1.5.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +35 -0
- data/VERSION.yml +2 -2
- data/lib/Buildfile +13 -4
- data/lib/buildtasks/build.rake +20 -17
- data/lib/buildtasks/manifest.rake +143 -78
- data/lib/buildtasks/target.rake +1 -0
- data/lib/doc_templates/sproutcore/index.tmpl +18 -4
- data/lib/doc_templates/sproutcore/publish.js +1 -1
- data/lib/frameworks/sproutcore/Buildfile +24 -13
- data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
- data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
- data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
- data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
- data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
- data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
- data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
- data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +144 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
- data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
- data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
- data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
- data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
- data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
- data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
- data/lib/frameworks/sproutcore/license.js +31 -30
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +34 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +76 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.js +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/progress.js +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +79 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
- data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
- data/lib/sproutcore.rb +9 -2
- data/lib/sproutcore/builders.rb +2 -1
- data/lib/sproutcore/builders/base.rb +7 -2
- data/lib/sproutcore/builders/combine.rb +49 -1
- data/lib/sproutcore/builders/html.rb +2 -0
- data/lib/sproutcore/builders/javascript.rb +1 -1
- data/lib/sproutcore/builders/minify.rb +12 -12
- data/lib/sproutcore/builders/module.rb +72 -0
- data/lib/sproutcore/builders/string_wrapper.rb +43 -0
- data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
- data/lib/sproutcore/helpers/static_helper.rb +13 -9
- data/lib/sproutcore/models/manifest_entry.rb +2 -2
- data/lib/sproutcore/models/target.rb +25 -11
- data/lib/sproutcore/rack/dev.rb +3 -3
- data/lib/sproutcore/tools.rb +51 -2
- data/lib/sproutcore/tools/build.rb +35 -7
- data/lib/sproutcore/version.rb +1 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
- data/spec/fixtures/builder_tests/Buildfile +2 -2
- data/spec/lib/builders/bundle_spec.rb +8 -8
- data/spec/lib/builders/strings_spec.rb +1 -0
- data/sproutcore.gemspec +9 -2
- data/vendor/chance/.gitignore +5 -0
- data/vendor/chance/Gemfile +4 -0
- data/vendor/chance/Rakefile +2 -0
- data/vendor/chance/bin/chance +72 -0
- data/vendor/chance/chance.gemspec +28 -0
- data/vendor/chance/lib/chance.rb +139 -0
- data/vendor/chance/lib/chance/imager.rb +13 -0
- data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
- data/vendor/chance/lib/chance/importer.rb +64 -0
- data/vendor/chance/lib/chance/instance.rb +225 -0
- data/vendor/chance/lib/chance/parser.rb +831 -0
- data/vendor/chance/lib/chance/perf.rb +17 -0
- data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
- data/vendor/chance/lib/chance/slicing.rb +104 -0
- data/vendor/chance/lib/chance/version.rb +3 -0
- data/vendor/chance/test/case/abc.png +0 -0
- data/vendor/chance/test/case/more/abc.png +0 -0
- data/vendor/chance/test/case/more/another.css +4 -0
- data/vendor/chance/test/case/test1.css +22 -0
- data/vendor/chance/test/case/test2.css +6 -0
- data/vendor/sproutcore/SCCompiler.jar +0 -0
- data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
- data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar} +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
- data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
- metadata +686 -177
- data/lib/frameworks/sproutcore/CHANGELOG +0 -93
- data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
- data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
- data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
- data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
- data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
- data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
- data/lib/sproutcore/builders/bundle.rb +0 -63
@@ -0,0 +1,77 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2010 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
/*global main */
|
9
|
+
|
10
|
+
SC.BENCHMARK_LOG_READY = YES;
|
11
|
+
|
12
|
+
sc_require('system/event') ;
|
13
|
+
|
14
|
+
SC.mixin({
|
15
|
+
isReady: NO,
|
16
|
+
|
17
|
+
/**
|
18
|
+
Add the passed target and method to the queue of methods to invoke when
|
19
|
+
the document is ready. These methods will be called after the document
|
20
|
+
has loaded and parsed, but before the main() function is called.
|
21
|
+
|
22
|
+
Methods are called in the order they are added.
|
23
|
+
|
24
|
+
If you add a ready handler when the main document is already ready, then
|
25
|
+
your handler will be called immediately.
|
26
|
+
|
27
|
+
@param target {Object} optional target object
|
28
|
+
@param method {Function} method name or function to execute
|
29
|
+
@returns {SC}
|
30
|
+
*/
|
31
|
+
ready: function(target, method) {
|
32
|
+
var queue = this._readyQueue;
|
33
|
+
|
34
|
+
// normalize
|
35
|
+
if (method === undefined) {
|
36
|
+
method = target; target = null ;
|
37
|
+
} else if (SC.typeOf(method) === SC.T_STRING) {
|
38
|
+
method = target[method] ;
|
39
|
+
}
|
40
|
+
|
41
|
+
jQuery(document).ready(function() { method.call(target); });
|
42
|
+
|
43
|
+
return this ;
|
44
|
+
},
|
45
|
+
|
46
|
+
onReady: {
|
47
|
+
startRunLoop: function() {
|
48
|
+
SC.RunLoop.begin();
|
49
|
+
},
|
50
|
+
setupLocales: function() {
|
51
|
+
SC.Locale.createCurrentLocale();
|
52
|
+
jQuery("body").addClass(SC.Locale.currentLanguage.toLowerCase());
|
53
|
+
},
|
54
|
+
removeLoading: function() {
|
55
|
+
jQuery("#loading").remove();
|
56
|
+
},
|
57
|
+
done: function() {
|
58
|
+
SC.isReady = true;
|
59
|
+
if(window.main) { main(); }
|
60
|
+
SC.RunLoop.end();
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
}) ;
|
65
|
+
|
66
|
+
jQuery(document)
|
67
|
+
.ready(SC.onReady.startRunLoop)
|
68
|
+
.ready(SC.onReady.setupLocales)
|
69
|
+
.ready(SC.onReady.removeLoading);
|
70
|
+
jQuery.event.special.ready._default = SC.onReady.done;
|
71
|
+
|
72
|
+
SC.removeLoading = YES;
|
73
|
+
|
74
|
+
// default to app mode. When loading unit tests, this will run in test mode
|
75
|
+
SC.APP_MODE = "APP_MODE";
|
76
|
+
SC.TEST_MODE = "TEST_MODE";
|
77
|
+
SC.mode = SC.APP_MODE;
|
@@ -16,60 +16,68 @@ SC.MODE_APPEND = 'append';
|
|
16
16
|
/** set update mode on context to prepend content */
|
17
17
|
SC.MODE_PREPEND = 'prepend';
|
18
18
|
|
19
|
+
/** list of numeric properties that should not have 'px' appended */
|
20
|
+
SC.NON_PIXEL_PROPERTIES = 'zIndex fontWeight opacity'.w();
|
21
|
+
|
22
|
+
/** a list of styles that get expanded into multiple properties, add more as you discover them */
|
23
|
+
SC.COMBO_STYLES = {
|
24
|
+
WebkitTransition: 'WebkitTransitionProperty WebkitTransitionDuration WebkitTransitionDelay WebkitTransitionTimingFunction'.w()
|
25
|
+
};
|
26
|
+
|
19
27
|
/**
|
20
28
|
@namespace
|
21
|
-
|
29
|
+
|
22
30
|
A RenderContext is a builder that can be used to generate HTML for views or
|
23
31
|
to update an existing element. Rather than making changes to an element
|
24
|
-
directly, you use a RenderContext to queue up changes to the element,
|
32
|
+
directly, you use a RenderContext to queue up changes to the element,
|
25
33
|
finally applying those changes or rendering the new element when you are
|
26
34
|
finished.
|
27
|
-
|
35
|
+
|
28
36
|
You will not usually create a render context yourself but you will be passed
|
29
37
|
a render context as the first parameter of your render() method on custom
|
30
38
|
views.
|
31
|
-
|
39
|
+
|
32
40
|
Render contexts are essentially arrays of strings. You can add a string to
|
33
|
-
the context by calling push(). You can retrieve the entire array as a
|
34
|
-
single string using join(). This is basically the way the context is used
|
41
|
+
the context by calling push(). You can retrieve the entire array as a
|
42
|
+
single string using join(). This is basically the way the context is used
|
35
43
|
for views. You are passed a render context and expected to add strings of
|
36
44
|
HTML to the context like a normal array. Later, the context will be joined
|
37
45
|
into a single string and converted into real HTML for display on screen.
|
38
|
-
|
39
|
-
In addition to the core push and join methods, the render context also
|
40
|
-
supports some extra methods that make it easy to build tags.
|
41
|
-
|
46
|
+
|
47
|
+
In addition to the core push and join methods, the render context also
|
48
|
+
supports some extra methods that make it easy to build tags.
|
49
|
+
|
42
50
|
context.begin() <-- begins a new tag context
|
43
51
|
context.end() <-- ends the tag context...
|
44
52
|
*/
|
45
53
|
SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
46
|
-
|
54
|
+
|
47
55
|
SELF_CLOSING: SC.CoreSet.create().addEach('area base basefront br hr input img link meta'.w()),
|
48
|
-
|
49
|
-
/**
|
56
|
+
|
57
|
+
/**
|
50
58
|
When you create a context you should pass either a tag name or an element
|
51
59
|
that should be used as the basis for building the context. If you pass
|
52
60
|
an element, then the element will be inspected for class names, styles
|
53
|
-
and other attributes. You can also call update() or replace() to
|
61
|
+
and other attributes. You can also call update() or replace() to
|
54
62
|
modify the element with you context contents.
|
55
|
-
|
63
|
+
|
56
64
|
If you do not pass any parameters, then we assume the tag name is 'div'.
|
57
|
-
|
65
|
+
|
58
66
|
A second parameter, parentContext, is used internally for chaining. You
|
59
67
|
should never pass a second argument.
|
60
|
-
|
61
|
-
@param {String|DOMElement} tagNameOrElement
|
68
|
+
|
69
|
+
@param {String|DOMElement} tagNameOrElement
|
62
70
|
@returns {SC.RenderContext} receiver
|
63
71
|
*/
|
64
72
|
init: function(tagNameOrElement, prevContext) {
|
65
73
|
var strings, tagNameOrElementIsString;
|
66
|
-
|
74
|
+
|
67
75
|
// if a prevContext was passed, setup with that first...
|
68
76
|
if (prevContext) {
|
69
77
|
this.prevObject = prevContext ;
|
70
78
|
this.strings = prevContext.strings ;
|
71
79
|
this.offset = prevContext.length + prevContext.offset ;
|
72
|
-
}
|
80
|
+
}
|
73
81
|
|
74
82
|
if (!this.strings) this.strings = [] ;
|
75
83
|
|
@@ -86,16 +94,16 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
86
94
|
tagNameOrElement = tagNameOrElement.toLowerCase() ;
|
87
95
|
tagNameOrElementIsString = YES ;
|
88
96
|
}
|
89
|
-
|
97
|
+
|
90
98
|
if (tagNameOrElementIsString) {
|
91
99
|
this._tagName = tagNameOrElement ;
|
92
100
|
this._needsTag = YES ; // used to determine if end() needs to wrap tag
|
93
101
|
this.needsContent = YES ;
|
94
|
-
|
102
|
+
|
95
103
|
// increase length of all contexts to leave space for opening tag
|
96
104
|
var c = this;
|
97
105
|
while(c) { c.length++; c = c.prevObject; }
|
98
|
-
|
106
|
+
|
99
107
|
this.strings.push(null);
|
100
108
|
this._selfClosing = this.SELF_CLOSING.contains(tagNameOrElement);
|
101
109
|
}
|
@@ -107,65 +115,65 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
107
115
|
}
|
108
116
|
return this ;
|
109
117
|
},
|
110
|
-
|
118
|
+
|
111
119
|
// ..........................................................
|
112
120
|
// PROPERTIES
|
113
|
-
//
|
114
|
-
|
121
|
+
//
|
122
|
+
|
115
123
|
// NOTE: We store this as an actual array of strings so that browsers that
|
116
124
|
// support dense arrays will use them.
|
117
|
-
/**
|
125
|
+
/**
|
118
126
|
The current working array of strings.
|
119
|
-
|
127
|
+
|
120
128
|
@property {Array}
|
121
129
|
*/
|
122
130
|
strings: null,
|
123
|
-
|
124
|
-
/**
|
131
|
+
|
132
|
+
/**
|
125
133
|
this initial offset into the strings array where this context instance
|
126
134
|
has its opening tag.
|
127
|
-
|
135
|
+
|
128
136
|
@property {Number}
|
129
137
|
*/
|
130
138
|
offset: 0,
|
131
|
-
|
132
|
-
/**
|
139
|
+
|
140
|
+
/**
|
133
141
|
the current number of strings owned by the context, including the opening
|
134
142
|
tag.
|
135
|
-
|
143
|
+
|
136
144
|
@property {Number}
|
137
145
|
*/
|
138
146
|
length: 0,
|
139
|
-
|
147
|
+
|
140
148
|
/**
|
141
149
|
Specify the method that should be used to update content on the element.
|
142
|
-
In almost all cases you want to replace the content. Very carefully
|
150
|
+
In almost all cases you want to replace the content. Very carefully
|
143
151
|
managed code (such as in CollectionView) can append or prepend content
|
144
152
|
instead.
|
145
|
-
|
153
|
+
|
146
154
|
You probably do not want to change this propery unless you know what you
|
147
155
|
are doing.
|
148
|
-
|
156
|
+
|
149
157
|
@property {String}
|
150
158
|
*/
|
151
159
|
updateMode: SC.MODE_REPLACE,
|
152
160
|
|
153
161
|
/**
|
154
|
-
YES if the context needs its content filled in, not just its outer
|
162
|
+
YES if the context needs its content filled in, not just its outer
|
155
163
|
attributes edited. This will be set to YES anytime you push strings into
|
156
164
|
the context or if you don't create it with an element to start with.
|
157
165
|
*/
|
158
166
|
needsContent: NO,
|
159
|
-
|
167
|
+
|
160
168
|
// ..........................................................
|
161
169
|
// CORE STRING API
|
162
|
-
//
|
163
|
-
|
170
|
+
//
|
171
|
+
|
164
172
|
/**
|
165
173
|
Returns the string at the designated index. If you do not pass anything
|
166
174
|
returns the string array. This index is an offset from the start of the
|
167
175
|
strings owned by this context.
|
168
|
-
|
176
|
+
|
169
177
|
@param {Number} idx the index
|
170
178
|
@returns {String|Array}
|
171
179
|
*/
|
@@ -173,35 +181,35 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
173
181
|
var strings = this.strings || [];
|
174
182
|
return (idx === undefined) ? strings.slice(this.offset, this.length) : strings[idx+this.offset];
|
175
183
|
},
|
176
|
-
|
184
|
+
|
177
185
|
/**
|
178
186
|
Adds a string to the render context for later joining. Note that you can
|
179
187
|
pass multiple arguments to this method and each item will be pushed.
|
180
|
-
|
188
|
+
|
181
189
|
@param {String} line the liene to add to the string.
|
182
190
|
@returns {SC.RenderContext} receiver
|
183
191
|
*/
|
184
192
|
push: function(line) {
|
185
193
|
var strings = this.strings, len = arguments.length;
|
186
194
|
if (!strings) this.strings = strings = []; // create array lazily
|
187
|
-
|
195
|
+
|
188
196
|
if (len > 1) {
|
189
197
|
strings.push.apply(strings, arguments) ;
|
190
198
|
} else strings.push(line);
|
191
|
-
|
199
|
+
|
192
200
|
// adjust string length for context and all parents...
|
193
201
|
var c = this;
|
194
202
|
while(c) { c.length += len; c = c.prevObject; }
|
195
|
-
|
196
|
-
this.needsContent = YES;
|
197
|
-
|
203
|
+
|
204
|
+
this.needsContent = YES;
|
205
|
+
|
198
206
|
return this;
|
199
207
|
},
|
200
|
-
|
208
|
+
|
201
209
|
/**
|
202
210
|
Pushes the passed string onto the array, but first escapes the string
|
203
211
|
to ensure that no user-entered HTML is processed as HTML.
|
204
|
-
|
212
|
+
|
205
213
|
@param {String} line one or mroe lines of text to add
|
206
214
|
@returns {SC.RenderContext} receiver
|
207
215
|
*/
|
@@ -212,45 +220,45 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
212
220
|
}
|
213
221
|
return this ;
|
214
222
|
},
|
215
|
-
|
223
|
+
|
216
224
|
/**
|
217
225
|
Joins the strings together, returning the result. But first, this will
|
218
226
|
end any open tags.
|
219
|
-
|
227
|
+
|
220
228
|
@param {String} joinChar optional string to use in joins. def empty string
|
221
229
|
@returns {String} joined string
|
222
230
|
*/
|
223
231
|
join: function(joinChar) {
|
224
232
|
// generate tag if needed...
|
225
233
|
if (this._needsTag) this.end();
|
226
|
-
|
234
|
+
|
227
235
|
var strings = this.strings;
|
228
236
|
return strings ? strings.join(joinChar || '') : '' ;
|
229
237
|
},
|
230
|
-
|
238
|
+
|
231
239
|
// ..........................................................
|
232
240
|
// GENERATING
|
233
|
-
//
|
234
|
-
|
241
|
+
//
|
242
|
+
|
235
243
|
/**
|
236
244
|
Begins a new render context based on the passed tagName or element.
|
237
245
|
Generate said context using end().
|
238
|
-
|
246
|
+
|
239
247
|
@returns {SC.RenderContext} new context
|
240
248
|
*/
|
241
249
|
begin: function(tagNameOrElement) {
|
242
250
|
// console.log('%@.begin(%@) called'.fmt(this, tagNameOrElement));
|
243
251
|
return SC.RenderContext(tagNameOrElement, this);
|
244
252
|
},
|
245
|
-
|
253
|
+
|
246
254
|
/**
|
247
|
-
If the current context targets an element, this method returns the
|
248
|
-
element. If the context does not target an element, this method will
|
255
|
+
If the current context targets an element, this method returns the
|
256
|
+
element. If the context does not target an element, this method will
|
249
257
|
render the context into an offscreen element and return it.
|
250
|
-
|
258
|
+
|
251
259
|
@returns {DOMElement} the element
|
252
260
|
*/
|
253
|
-
element: function() {
|
261
|
+
element: function() {
|
254
262
|
if (this._elem) return this._elem;
|
255
263
|
|
256
264
|
// create factory div if needed
|
@@ -262,7 +270,7 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
262
270
|
factory = K.factory = document.createElement('div');
|
263
271
|
}
|
264
272
|
factory.innerHTML = this.join();
|
265
|
-
|
273
|
+
|
266
274
|
// In IE something weird happens when reusing the same element.
|
267
275
|
// After setting innerHTML, the innerHTML of the element in the previous
|
268
276
|
// view turns blank. It seems that there is something weird with their
|
@@ -286,60 +294,60 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
286
294
|
|
287
295
|
return child ;
|
288
296
|
},
|
289
|
-
|
297
|
+
|
290
298
|
/**
|
291
299
|
Removes an element with the passed id in the currently managed element.
|
292
300
|
*/
|
293
301
|
remove: function(elementId) {
|
294
302
|
// console.log('remove('+elementId+')');
|
295
303
|
if (!elementId) return ;
|
296
|
-
|
304
|
+
|
297
305
|
var el, elem = this._elem ;
|
298
306
|
if (!elem || !elem.removeChild) return ;
|
299
|
-
|
307
|
+
|
300
308
|
el = document.getElementById(elementId) ;
|
301
309
|
if (el) {
|
302
310
|
el = elem.removeChild(el) ;
|
303
311
|
el = null;
|
304
312
|
}
|
305
313
|
},
|
306
|
-
|
314
|
+
|
307
315
|
/**
|
308
|
-
If an element was set on this context when it was created, this method
|
316
|
+
If an element was set on this context when it was created, this method
|
309
317
|
will actually apply any changes to the element itself. If you have not
|
310
|
-
written any inner html into the context, then the innerHTML of the
|
318
|
+
written any inner html into the context, then the innerHTML of the
|
311
319
|
element will not be changed, otherwise it will be replaced with the new
|
312
320
|
innerHTML.
|
313
|
-
|
314
|
-
Also, any attributes, id, classNames or styles you've set will be
|
321
|
+
|
322
|
+
Also, any attributes, id, classNames or styles you've set will be
|
315
323
|
updated as well. This also ends the editing context session and cleans
|
316
324
|
up.
|
317
|
-
|
318
|
-
@returns {SC.RenderContext} previous context or null if top
|
325
|
+
|
326
|
+
@returns {SC.RenderContext} previous context or null if top
|
319
327
|
*/
|
320
328
|
update: function() {
|
321
|
-
var elem = this._elem,
|
329
|
+
var elem = this._elem,
|
322
330
|
mode = this.updateMode,
|
323
331
|
cq, key, value, attr, styles, factory, cur, next, before;
|
324
|
-
|
332
|
+
|
325
333
|
this._innerHTMLReplaced = NO;
|
326
|
-
|
334
|
+
|
327
335
|
if (!elem) {
|
328
336
|
// throw "Cannot update context because there is no source element";
|
329
337
|
return ;
|
330
338
|
}
|
331
339
|
|
332
|
-
cq =
|
333
|
-
|
340
|
+
cq = this.$();
|
341
|
+
|
334
342
|
// console.log('%@#update() called'.fmt(this));
|
335
343
|
// if (this.length>0) console.log(this.join());
|
336
344
|
// else console.log('<no length>');
|
337
|
-
|
345
|
+
|
338
346
|
// replace innerHTML
|
339
347
|
if (this.length>0) {
|
340
348
|
this._innerHTMLReplaced = YES;
|
341
349
|
if (mode === SC.MODE_REPLACE) {
|
342
|
-
|
350
|
+
cq.html(this.join());
|
343
351
|
} else {
|
344
352
|
factory = elem.cloneNode(false);
|
345
353
|
factory.innerHTML = this.join() ;
|
@@ -350,75 +358,42 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
350
358
|
elem.insertBefore(cur, next);
|
351
359
|
cur = next ;
|
352
360
|
}
|
353
|
-
cur = next = factory = before = null ; // cleanup
|
361
|
+
cur = next = factory = before = null ; // cleanup
|
354
362
|
}
|
355
363
|
}
|
356
|
-
|
357
|
-
//
|
358
|
-
|
359
|
-
// some point during the build)
|
360
|
-
|
361
|
-
// if we have attrs, apply them
|
362
|
-
if (this._attrsDidChange && (value = this._attrs)) {
|
363
|
-
for(key in value) {
|
364
|
-
if (!value.hasOwnProperty(key)) continue;
|
365
|
-
attr = value[key];
|
366
|
-
if (attr === null) { // remove empty attrs
|
367
|
-
elem.removeAttribute(key);
|
368
|
-
} else {
|
369
|
-
cq.attr(key, attr);
|
370
|
-
}
|
371
|
-
}
|
372
|
-
}
|
373
|
-
|
374
|
-
// class="foo bar"
|
375
|
-
if (this._classNamesDidChange && (value = this._classNames)) {
|
376
|
-
cq.attr('class', value.join(' '));
|
377
|
-
}
|
378
|
-
|
364
|
+
|
365
|
+
// attributes, styles, and class naems will already have been set.
|
366
|
+
|
379
367
|
// id="foo"
|
380
368
|
if (this._idDidChange && (value = this._id)) {
|
381
369
|
cq.attr('id', value);
|
382
370
|
}
|
383
|
-
|
384
|
-
//
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
if (!styles.hasOwnProperty(key)) continue ;
|
389
|
-
value = styles[key];
|
390
|
-
if (value === null) continue; // skip empty styles
|
391
|
-
if (typeof value === SC.T_NUMBER && key !== "zIndex") value += "px";
|
392
|
-
pair[0] = this._dasherizeStyleName(key);
|
393
|
-
pair[1] = value;
|
394
|
-
joined.push(pair.join(': '));
|
395
|
-
}
|
396
|
-
|
397
|
-
cq.attr('style', joined.join('; '));
|
398
|
-
joined.length = 0; // reset temporary object
|
399
|
-
}
|
400
|
-
|
371
|
+
|
372
|
+
// flush jQuery buffers
|
373
|
+
jQuery.Buffer.flush();
|
374
|
+
|
375
|
+
|
401
376
|
// now cleanup element...
|
402
377
|
elem = this._elem = null ;
|
403
|
-
return this.prevObject || this ;
|
378
|
+
return this.prevObject || this ;
|
404
379
|
},
|
405
|
-
|
380
|
+
|
406
381
|
// these are temporary objects are reused by end() to avoid memory allocs.
|
407
382
|
_DEFAULT_ATTRS: {},
|
408
383
|
_TAG_ARRAY: [],
|
409
384
|
_JOIN_ARRAY: [],
|
410
385
|
_STYLE_PAIR_ARRAY: [],
|
411
|
-
|
386
|
+
|
412
387
|
/**
|
413
388
|
Ends the current tag editing context. This will generate the tag string
|
414
389
|
including any attributes you might have set along with a closing tag.
|
415
|
-
|
390
|
+
|
416
391
|
The generated HTML will be added to the render context strings. This will
|
417
392
|
also return the previous context if there is one or the receiver.
|
418
|
-
|
393
|
+
|
419
394
|
If you do not have a current tag, this does nothing.
|
420
|
-
|
421
|
-
@returns {SC.RenderContext}
|
395
|
+
|
396
|
+
@returns {SC.RenderContext}
|
422
397
|
*/
|
423
398
|
end: function() {
|
424
399
|
// console.log('%@.end() called'.fmt(this));
|
@@ -427,22 +402,22 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
427
402
|
// and we want it to be as fast as possible.
|
428
403
|
|
429
404
|
// generate opening tag.
|
430
|
-
|
405
|
+
|
431
406
|
// get attributes first. Copy in className + styles...
|
432
407
|
var tag = this._TAG_ARRAY, pair, joined, key , value,
|
433
408
|
attrs = this._attrs, className = this._classNames,
|
434
409
|
id = this._id, styles = this._styles;
|
435
|
-
|
410
|
+
|
436
411
|
// add tag to tag array
|
437
412
|
tag[0] = '<'; tag[1] = this._tagName ;
|
438
|
-
|
413
|
+
|
439
414
|
// add any attributes...
|
440
415
|
if (attrs || className || styles || id) {
|
441
416
|
if (!attrs) attrs = this._DEFAULT_ATTRS ;
|
442
417
|
if (id) attrs.id = id ;
|
443
418
|
if (className) attrs['class'] = className.join(' ');
|
444
|
-
|
445
|
-
// add in styles. note how we avoid memory allocs here to keep things
|
419
|
+
|
420
|
+
// add in styles. note how we avoid memory allocs here to keep things
|
446
421
|
// fast...
|
447
422
|
if (styles) {
|
448
423
|
joined = this._JOIN_ARRAY ;
|
@@ -451,19 +426,19 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
451
426
|
if(!styles.hasOwnProperty(key)) continue ;
|
452
427
|
value = styles[key];
|
453
428
|
if (value === null) continue; // skip empty styles
|
454
|
-
if (
|
429
|
+
if (typeof value === SC.T_NUMBER && !SC.NON_PIXEL_PROPERTIES.contains(key)) value += "px";
|
455
430
|
|
456
431
|
pair[0] = this._dasherizeStyleName(key);
|
457
432
|
pair[1] = value;
|
458
433
|
joined.push(pair.join(': '));
|
459
434
|
}
|
460
435
|
attrs.style = joined.join('; ') ;
|
461
|
-
|
462
|
-
// reset temporary object. pair does not need to be reset since it
|
436
|
+
|
437
|
+
// reset temporary object. pair does not need to be reset since it
|
463
438
|
// is always overwritten
|
464
439
|
joined.length = 0;
|
465
440
|
}
|
466
|
-
|
441
|
+
|
467
442
|
// now convert attrs hash to tag array...
|
468
443
|
tag.push(' '); // add space for joining0
|
469
444
|
for(key in attrs) {
|
@@ -472,62 +447,61 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
472
447
|
if (value === null) continue ; // skip empty attrs
|
473
448
|
tag.push(key, '="', value, '" ');
|
474
449
|
}
|
475
|
-
|
476
|
-
// if we are using the DEFAULT_ATTRS temporary object, make sure we
|
450
|
+
|
451
|
+
// if we are using the DEFAULT_ATTRS temporary object, make sure we
|
477
452
|
// reset.
|
478
453
|
if (attrs === this._DEFAULT_ATTRS) {
|
479
454
|
delete attrs.style; delete attrs['class']; delete attrs.id;
|
480
455
|
}
|
481
|
-
|
456
|
+
|
482
457
|
}
|
483
|
-
|
458
|
+
|
484
459
|
// this is self closing if there is no content in between and selfClosing
|
485
460
|
// is not set to false.
|
486
461
|
var strings = this.strings;
|
487
462
|
var selfClosing = (this._selfClosing === NO) ? NO : (this.length === 1) ;
|
488
463
|
tag.push(selfClosing ? ' />' : '>') ;
|
489
|
-
|
464
|
+
|
490
465
|
// console.log('selfClosing == %@'.fmt(selfClosing));
|
491
|
-
|
492
466
|
strings[this.offset] = tag.join('');
|
493
467
|
tag.length = 0 ; // reset temporary object
|
494
|
-
|
468
|
+
|
495
469
|
// now generate closing tag if needed...
|
496
470
|
if (!selfClosing) {
|
497
471
|
tag[0] = '</' ;
|
498
472
|
tag[1] = this._tagName;
|
499
473
|
tag[2] = '>';
|
500
474
|
strings.push(tag.join(''));
|
501
|
-
|
475
|
+
|
502
476
|
// increase length of receiver and all parents
|
503
477
|
var c = this;
|
504
478
|
while(c) { c.length++; c = c.prevObject; }
|
505
479
|
tag.length = 0; // reset temporary object again
|
506
480
|
}
|
507
|
-
|
481
|
+
|
508
482
|
// if there was a source element, cleanup to avoid memory leaks
|
509
483
|
this._elem = null;
|
510
484
|
return this.prevObject || this ;
|
511
485
|
},
|
512
|
-
|
486
|
+
|
513
487
|
/**
|
514
488
|
Generates a tag with the passed options. Like calling context.begin().end().
|
515
|
-
|
489
|
+
|
516
490
|
@param {String} tagName optional tag name. default 'div'
|
517
491
|
@param {Hash} opts optional tag options. defaults to empty options.
|
518
|
-
@returns {SC.RenderContext} receiver
|
492
|
+
@returns {SC.RenderContext} receiver
|
519
493
|
*/
|
520
494
|
tag: function(tagName, opts) {
|
521
495
|
return this.begin(tagName, opts).end();
|
522
496
|
},
|
523
|
-
|
497
|
+
|
524
498
|
// ..........................................................
|
525
499
|
// BASIC HELPERS
|
526
|
-
//
|
527
|
-
|
500
|
+
//
|
501
|
+
|
528
502
|
/**
|
529
503
|
Reads outer tagName if no param is passed, sets tagName otherwise.
|
530
|
-
|
504
|
+
|
531
505
|
@param {String} tagName pass to set tag name.
|
532
506
|
@returns {String|SC.RenderContext} tag name or receiver
|
533
507
|
*/
|
@@ -541,10 +515,10 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
541
515
|
return this ;
|
542
516
|
}
|
543
517
|
},
|
544
|
-
|
518
|
+
|
545
519
|
/**
|
546
520
|
Reads the outer tag id if no param is passed, sets the id otherwise.
|
547
|
-
|
521
|
+
|
548
522
|
@param {String} idName the id or set
|
549
523
|
@returns {String|SC.RenderContext} id or receiver
|
550
524
|
*/
|
@@ -558,33 +532,38 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
558
532
|
return this;
|
559
533
|
}
|
560
534
|
},
|
561
|
-
|
535
|
+
|
562
536
|
// ..........................................................
|
563
537
|
// CSS CLASS NAMES SUPPORT
|
564
|
-
//
|
565
|
-
|
538
|
+
//
|
539
|
+
|
566
540
|
/**
|
567
541
|
Reads the current classNames array or sets the array if a param is passed.
|
568
|
-
Note that if you get the classNames array and then modify it, you MUST
|
542
|
+
Note that if you get the classNames array and then modify it, you MUST
|
569
543
|
call this method again to set the array or else it may not be copied to
|
570
544
|
the element.
|
571
545
|
|
572
|
-
If you do pass a classNames array, you can also pass YES for the
|
546
|
+
If you do pass a classNames array, you can also pass YES for the
|
573
547
|
cloneOnModify param. This will cause the context to clone the class names
|
574
|
-
before making any further edits. This is useful is you have a shared
|
548
|
+
before making any further edits. This is useful is you have a shared
|
575
549
|
array of class names you want to start with but edits should not change
|
576
550
|
the shared array.
|
577
|
-
|
578
|
-
@param {Array} classNames array
|
551
|
+
|
552
|
+
@param {Array} classNames array
|
579
553
|
@param {Boolean} cloneOnModify
|
580
554
|
@returns {Array|SC.RenderContext} classNames array or receiver
|
581
555
|
*/
|
582
556
|
classNames: function(classNames, cloneOnModify) {
|
583
|
-
if (
|
584
|
-
if (
|
585
|
-
this
|
557
|
+
if (this._elem) {
|
558
|
+
if (classNames) {
|
559
|
+
this.$().resetClassNames().addClass(classNames);
|
560
|
+
return this;
|
561
|
+
} else {
|
562
|
+
return this.$().attr('class').split(' ');
|
586
563
|
}
|
587
|
-
|
564
|
+
}
|
565
|
+
|
566
|
+
if (classNames === undefined) {
|
588
567
|
if (this._cloneClassNames) {
|
589
568
|
this._classNames = (this._classNames || []).slice();
|
590
569
|
this._cloneClassNames = NO ;
|
@@ -592,7 +571,7 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
592
571
|
|
593
572
|
// if there are no class names, create an empty array but don't modify.
|
594
573
|
if (!this._classNames) this._classNames = [];
|
595
|
-
|
574
|
+
|
596
575
|
return this._classNames ;
|
597
576
|
} else {
|
598
577
|
this._classNames = classNames ;
|
@@ -601,22 +580,28 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
601
580
|
return this ;
|
602
581
|
}
|
603
582
|
},
|
604
|
-
|
583
|
+
|
605
584
|
/**
|
606
|
-
Returns YES if the outer tag current has the passed class name, NO
|
585
|
+
Returns YES if the outer tag current has the passed class name, NO
|
607
586
|
otherwise.
|
608
|
-
|
587
|
+
|
609
588
|
@param {String} className the class name
|
610
589
|
@returns {Boolean}
|
611
590
|
*/
|
612
591
|
hasClass: function(className) {
|
613
|
-
|
592
|
+
if (this._elem) {
|
593
|
+
return this.$().hasClass(className);
|
594
|
+
}
|
595
|
+
return this.classNames().indexOf(className) >= 0;
|
614
596
|
},
|
615
|
-
|
597
|
+
|
616
598
|
/**
|
617
599
|
Adds the specified className to the current tag, if it does not already
|
618
600
|
exist. This method has no effect if there is no open tag.
|
619
|
-
|
601
|
+
|
602
|
+
If there is an element backing this RenderContext, buffered jQuery is
|
603
|
+
used to perform the update.
|
604
|
+
|
620
605
|
@param {String|Array} nameOrClasses the class name or an array of classes
|
621
606
|
@returns {SC.RenderContext} receiver
|
622
607
|
*/
|
@@ -625,7 +610,17 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
625
610
|
console.warn('You are adding an undefined or empty class'+ this.toString());
|
626
611
|
return this;
|
627
612
|
}
|
628
|
-
|
613
|
+
|
614
|
+
if (this._elem) {
|
615
|
+
if (SC.typeOf(nameOrClasses) === SC.T_STRING) {
|
616
|
+
this.$().addClass(nameOrClasses);
|
617
|
+
} else {
|
618
|
+
var idx, len = nameOrClasses.length;
|
619
|
+
for (idx = 0; idx < len; idx++) this.$().addClass(nameOrClasses[idx]);
|
620
|
+
}
|
621
|
+
return this;
|
622
|
+
}
|
623
|
+
|
629
624
|
var classNames = this.classNames() ; // handles cloning ,etc.
|
630
625
|
if(SC.typeOf(nameOrClasses) === SC.T_STRING){
|
631
626
|
if (classNames.indexOf(nameOrClasses)<0) {
|
@@ -641,24 +636,27 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
641
636
|
}
|
642
637
|
}
|
643
638
|
}
|
644
|
-
|
639
|
+
|
645
640
|
return this;
|
646
641
|
},
|
647
|
-
|
642
|
+
|
648
643
|
/**
|
649
|
-
Removes the specified className from the current tag. This method has
|
644
|
+
Removes the specified className from the current tag. This method has
|
650
645
|
no effect if there is not an open tag.
|
651
|
-
|
646
|
+
|
647
|
+
If there is an actual DOM element backing this render context,
|
648
|
+
the modification will be written immediately to a buffered jQuery instance.
|
649
|
+
|
652
650
|
@param {String} className the class to add
|
653
651
|
@returns {SC.RenderContext} receiver
|
654
652
|
*/
|
655
653
|
removeClass: function(className) {
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
(SC.$(this._elem).attr('class')||'').split(' ');
|
654
|
+
if (this._elem) {
|
655
|
+
this.$().removeClass(className);
|
656
|
+
return this;
|
660
657
|
}
|
661
658
|
|
659
|
+
var classNames = this._classNames, idx;
|
662
660
|
if (classNames && (idx=classNames.indexOf(className))>=0) {
|
663
661
|
if (this._cloneClassNames) {
|
664
662
|
classNames = this._classNames = classNames.slice();
|
@@ -666,55 +664,63 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
666
664
|
}
|
667
665
|
|
668
666
|
// if className is found, just null it out. This will end up adding an
|
669
|
-
// extra space to the generated HTML but it is faster than trying to
|
667
|
+
// extra space to the generated HTML but it is faster than trying to
|
670
668
|
// recompact the array.
|
671
669
|
classNames[idx] = null;
|
672
670
|
this._classNamesDidChange = YES ;
|
673
671
|
}
|
674
|
-
|
672
|
+
|
675
673
|
return this;
|
676
674
|
},
|
677
|
-
|
675
|
+
|
678
676
|
/**
|
679
|
-
Removes all classnames from the
|
680
|
-
|
677
|
+
Removes all classnames from the context. If the context represents an
|
678
|
+
element, this will be handled in CoreQuery.
|
679
|
+
|
681
680
|
@returns {SC.RenderContext} receiver
|
682
681
|
*/
|
683
682
|
resetClassNames: function() {
|
683
|
+
if (this._elem) {
|
684
|
+
this.$().resetClassNames();
|
685
|
+
return this;
|
686
|
+
}
|
687
|
+
|
684
688
|
this._classNames = [];
|
685
689
|
this._classNamesDidChange = YES ;
|
686
690
|
return this;
|
687
691
|
},
|
688
|
-
|
692
|
+
|
689
693
|
/**
|
690
694
|
You can either pass a single class name and a boolean indicating whether
|
691
695
|
the value should be added or removed, or you can pass a hash with all
|
692
|
-
the class names you want to add or remove with a boolean indicating
|
696
|
+
the class names you want to add or remove with a boolean indicating
|
693
697
|
whether they should be there or not.
|
694
|
-
|
698
|
+
|
695
699
|
This is far more efficient than using addClass/removeClass.
|
696
|
-
|
700
|
+
|
701
|
+
If this context represents an element, this uses the buffered jQuery to
|
702
|
+
ensure all planned DOM operations stay in-sync.
|
703
|
+
|
697
704
|
@param {String|Hash} className class name or hash of classNames + bools
|
698
705
|
@param {Boolean} shouldAdd for class name if a string was passed
|
699
706
|
@returns {SC.RenderContext} receiver
|
700
707
|
*/
|
701
708
|
setClass: function(className, shouldAdd) {
|
709
|
+
if (this._elem) {
|
710
|
+
this.$().setClass(className, shouldAdd);
|
711
|
+
return this;
|
712
|
+
}
|
713
|
+
|
702
714
|
var classNames, idx, key, didChange;
|
703
|
-
|
715
|
+
|
704
716
|
// simple form
|
705
717
|
if (shouldAdd !== undefined) {
|
706
718
|
return shouldAdd ? this.addClass(className) : this.removeClass(className);
|
707
|
-
|
708
719
|
// bulk form
|
709
720
|
} else {
|
710
|
-
|
711
721
|
classNames = this._classNames ;
|
712
|
-
if (!classNames && this._elem) {
|
713
|
-
classNames = this._classNames =
|
714
|
-
(SC.$(this._elem).attr('class')||'').split(' ');
|
715
|
-
}
|
716
722
|
if (!classNames) classNames = this._classNames = [];
|
717
|
-
|
723
|
+
|
718
724
|
if (this._cloneClassNames) {
|
719
725
|
classNames = this._classNames = classNames.slice();
|
720
726
|
this._cloneClassNames = NO ;
|
@@ -732,58 +738,65 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
732
738
|
}
|
733
739
|
if (didChange) this._classNamesDidChange = YES;
|
734
740
|
}
|
735
|
-
|
741
|
+
|
736
742
|
return this ;
|
737
743
|
},
|
738
|
-
|
744
|
+
|
739
745
|
// ..........................................................
|
740
746
|
// CSS Styles Support
|
741
|
-
//
|
742
|
-
|
747
|
+
//
|
748
|
+
|
743
749
|
_STYLE_REGEX: /-?\s*([^:\s]+)\s*:\s*([^;]+)\s*;?/g,
|
744
|
-
|
750
|
+
|
745
751
|
/**
|
746
752
|
Retrieves or sets the current styles for the outer tag. If you retrieve
|
747
|
-
the styles hash to edit it, you must set the hash again in order for it
|
753
|
+
the styles hash to edit it, you must set the hash again in order for it
|
748
754
|
to be applied to the element on rendering.
|
749
|
-
|
755
|
+
|
750
756
|
Optionally you can also pass YES to the cloneOnModify param to cause the
|
751
757
|
styles has to be cloned before it is edited. This is useful if you want
|
752
758
|
to start with a shared style hash and then optionally modify it for each
|
753
759
|
context.
|
754
|
-
|
760
|
+
|
755
761
|
@param {Hash} styles styles hash
|
756
762
|
@param {Boolean} cloneOnModify
|
757
763
|
@returns {Hash|SC.RenderContext} styles hash or receiver
|
758
764
|
*/
|
759
765
|
styles: function(styles, cloneOnModify) {
|
766
|
+
if (this._elem) {
|
767
|
+
if (styles) {
|
768
|
+
this.$().resetStyles().css(styles);
|
769
|
+
}
|
770
|
+
return this.$().styles();
|
771
|
+
}
|
772
|
+
|
760
773
|
var attr, regex, match;
|
761
774
|
if (styles === undefined) {
|
762
|
-
|
775
|
+
|
763
776
|
// no styles are defined yet but we do have a source element. Lazily
|
764
777
|
// extract styles from element.
|
765
778
|
if (!this._styles && this._elem) {
|
766
779
|
// parse style...
|
767
|
-
attr =
|
768
|
-
|
780
|
+
attr = this.$().attr('style');
|
781
|
+
|
769
782
|
if (attr && (attr = attr.toString()).length>0) {
|
770
|
-
if(SC.browser.msie){
|
783
|
+
if(SC.browser.msie){
|
771
784
|
attr = attr.toLowerCase();
|
772
785
|
}
|
773
786
|
styles = {};
|
774
|
-
|
787
|
+
|
775
788
|
regex = this._STYLE_REGEX ;
|
776
789
|
regex.lastIndex = 0;
|
777
|
-
|
790
|
+
|
778
791
|
while(match = regex.exec(attr)) styles[this._camelizeStyleName(match[1])] = match[2];
|
779
|
-
|
792
|
+
|
780
793
|
this._styles = styles;
|
781
794
|
this._cloneStyles = NO;
|
782
|
-
|
795
|
+
|
783
796
|
} else {
|
784
797
|
this._styles = {};
|
785
798
|
}
|
786
|
-
|
799
|
+
|
787
800
|
// if there is no element or we do have styles, possibly clone them
|
788
801
|
// before returning.
|
789
802
|
} else {
|
@@ -796,9 +809,9 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
796
809
|
}
|
797
810
|
}
|
798
811
|
}
|
799
|
-
|
812
|
+
|
800
813
|
return this._styles ;
|
801
|
-
|
814
|
+
|
802
815
|
// set the styles if passed.
|
803
816
|
} else {
|
804
817
|
this._styles = styles ;
|
@@ -807,38 +820,71 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
807
820
|
return this ;
|
808
821
|
}
|
809
822
|
},
|
810
|
-
|
823
|
+
|
824
|
+
_deleteComboStyles: function(styles, key) {
|
825
|
+
var comboStyles = SC.COMBO_STYLES[key],
|
826
|
+
didChange = NO;
|
827
|
+
|
828
|
+
if (comboStyles) {
|
829
|
+
var idx;
|
830
|
+
for (idx=0; idx < comboStyles.length; idx++) {
|
831
|
+
if (styles[comboStyles[idx]]) {
|
832
|
+
delete styles[comboStyles[idx]];
|
833
|
+
didChange = YES;
|
834
|
+
}
|
835
|
+
}
|
836
|
+
}
|
837
|
+
return didChange;
|
838
|
+
},
|
839
|
+
|
840
|
+
/**
|
841
|
+
Clears all of the tag's styles.
|
842
|
+
@returns {SC.RenderContext} receiver
|
843
|
+
*/
|
844
|
+
resetStyles: function() {
|
845
|
+
this.styles({});
|
846
|
+
return this;
|
847
|
+
},
|
848
|
+
|
849
|
+
|
811
850
|
/**
|
812
851
|
Apply the passed styles to the tag. You can pass either a single key
|
813
|
-
value pair or a hash of styles. Note that if you set a style on an
|
852
|
+
value pair or a hash of styles. Note that if you set a style on an
|
814
853
|
existing element, it will replace any existing styles on the element.
|
815
|
-
|
854
|
+
|
816
855
|
@param {String|Hash} nameOrStyles the style name or a hash of styles
|
817
856
|
@param {String|Number} value style value if string name was passed
|
818
857
|
@returns {SC.RenderContext} receiver
|
819
858
|
*/
|
820
859
|
addStyle: function(nameOrStyles, value) {
|
821
|
-
|
822
|
-
|
860
|
+
if (this._elem) {
|
861
|
+
this.$().css(nameOrStyles, value);
|
862
|
+
return this;
|
863
|
+
}
|
864
|
+
|
865
|
+
// get the current hash of styles. This will extract the styles and
|
823
866
|
// clone them if needed. This will get the actual styles hash so we can
|
824
867
|
// edit it directly.
|
825
868
|
var key, didChange = NO, styles = this.styles();
|
826
|
-
|
869
|
+
|
827
870
|
// simple form
|
828
871
|
if (typeof nameOrStyles === SC.T_STRING) {
|
829
872
|
if (value === undefined) { // reader
|
830
873
|
return styles[nameOrStyles];
|
831
874
|
} else { // writer
|
875
|
+
didChange = this._deleteComboStyles(styles, nameOrStyles);
|
832
876
|
if (styles[nameOrStyles] !== value) {
|
833
877
|
styles[nameOrStyles] = value ;
|
834
|
-
|
878
|
+
didChange = YES ;
|
835
879
|
}
|
880
|
+
if (didChange) this._stylesDidChange = YES;
|
836
881
|
}
|
837
|
-
|
882
|
+
|
838
883
|
// bulk form
|
839
884
|
} else {
|
840
885
|
for(key in nameOrStyles) {
|
841
886
|
if (!nameOrStyles.hasOwnProperty(key)) continue ;
|
887
|
+
didChange = didChange || this._deleteComboStyles(styles, key);
|
842
888
|
value = nameOrStyles[key];
|
843
889
|
if (styles[key] !== value) {
|
844
890
|
styles[key] = value;
|
@@ -847,23 +893,28 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
847
893
|
}
|
848
894
|
if (didChange) this._stylesDidChange = YES ;
|
849
895
|
}
|
850
|
-
|
896
|
+
|
851
897
|
return this ;
|
852
898
|
},
|
853
|
-
|
899
|
+
|
854
900
|
/**
|
855
901
|
Removes the named style from the style hash.
|
856
|
-
|
902
|
+
|
857
903
|
Note that if you delete a style, the style will not actually be removed
|
858
904
|
from the style hash. Instead, its value will be set to null.
|
859
|
-
|
905
|
+
|
860
906
|
@param {String} styleName
|
861
907
|
@returns {SC.RenderContext} receiver
|
862
908
|
*/
|
863
909
|
removeStyle: function(styleName) {
|
910
|
+
if (this._elem) {
|
911
|
+
this.$().css(styleName, null);
|
912
|
+
return this;
|
913
|
+
}
|
914
|
+
|
864
915
|
// avoid case where no styles have been defined
|
865
|
-
if (!this._styles
|
866
|
-
|
916
|
+
if (!this._styles) return this;
|
917
|
+
|
867
918
|
// get styles hash. this will clone if needed.
|
868
919
|
var styles = this.styles();
|
869
920
|
if (styles[styleName]) {
|
@@ -871,24 +922,30 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
871
922
|
this._stylesDidChange = YES ;
|
872
923
|
}
|
873
924
|
},
|
874
|
-
|
925
|
+
|
875
926
|
// ..........................................................
|
876
927
|
// ARBITRARY ATTRIBUTES SUPPORT
|
877
|
-
//
|
878
|
-
|
928
|
+
//
|
929
|
+
|
879
930
|
/**
|
880
931
|
Sets the named attribute on the tag. Note that if you set the 'class'
|
881
|
-
attribute or the 'styles' attribute, it will be ignored. Use the
|
932
|
+
attribute or the 'styles' attribute, it will be ignored. Use the
|
882
933
|
relevant class name and style methods instead.
|
883
|
-
|
934
|
+
|
884
935
|
@param {String|Hash} nameOrAttrs the attr name or hash of attrs.
|
885
936
|
@param {String} value attribute value if attribute name was passed
|
886
937
|
@returns {SC.RenderContext} receiver
|
887
938
|
*/
|
888
939
|
attr: function(nameOrAttrs, value) {
|
940
|
+
if (this._elem) {
|
941
|
+
this.$().attr(nameOrAttrs, value);
|
942
|
+
return this;
|
943
|
+
}
|
944
|
+
|
945
|
+
|
889
946
|
var key, attrs = this._attrs, didChange = NO ;
|
890
947
|
if (!attrs) this._attrs = attrs = {} ;
|
891
|
-
|
948
|
+
|
892
949
|
// simple form
|
893
950
|
if (typeof nameOrAttrs === SC.T_STRING) {
|
894
951
|
if (value === undefined) { // getter
|
@@ -899,7 +956,7 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
899
956
|
this._attrsDidChange = YES ;
|
900
957
|
}
|
901
958
|
}
|
902
|
-
|
959
|
+
|
903
960
|
// bulk form
|
904
961
|
} else {
|
905
962
|
for(key in nameOrAttrs) {
|
@@ -912,10 +969,28 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
912
969
|
}
|
913
970
|
if (didChange) this._attrsDidChange = YES ;
|
914
971
|
}
|
915
|
-
|
972
|
+
|
916
973
|
return this ;
|
917
974
|
},
|
918
975
|
|
976
|
+
//
|
977
|
+
// COREQUERY SUPPORT
|
978
|
+
//
|
979
|
+
/**
|
980
|
+
Returns a CoreQuery instance for the element this context wraps (if
|
981
|
+
it wraps any). If a selector is passed, the CoreQuery instance will
|
982
|
+
be for nodes matching that selector.
|
983
|
+
|
984
|
+
Renderers may use this to modify DOM.
|
985
|
+
*/
|
986
|
+
$: function(sel) {
|
987
|
+
var ret, elem = this._elem;
|
988
|
+
ret = !elem ? SC.$.buffer([]) : (sel === undefined) ? SC.$.buffer(elem) : SC.$.buffer(sel, elem);
|
989
|
+
elem = null;
|
990
|
+
return ret;
|
991
|
+
},
|
992
|
+
|
993
|
+
|
919
994
|
/** @private
|
920
995
|
*/
|
921
996
|
_camelizeStyleName: function(name) {
|
@@ -935,10 +1010,10 @@ SC.RenderContext = SC.Builder.create(/** SC.RenderContext.fn */ {
|
|
935
1010
|
*/
|
936
1011
|
_dasherizeStyleName: function(name) {
|
937
1012
|
var dasherized = name.dasherize();
|
938
|
-
if (dasherized.match(/^(webkit|moz|ms|o)-/)) dasherized = '-'+dasherized;
|
1013
|
+
if (dasherized.match(/^(webkit|moz|ms|o)-/)) { dasherized = '-'+dasherized; }
|
939
1014
|
return dasherized;
|
940
1015
|
}
|
941
|
-
|
1016
|
+
|
942
1017
|
});
|
943
1018
|
|
944
1019
|
/**
|
@@ -951,8 +1026,8 @@ SC.RenderContext.fn.html = SC.RenderContext.fn.push;
|
|
951
1026
|
*/
|
952
1027
|
SC.RenderContext.fn.css = SC.RenderContext.fn.addStyle;
|
953
1028
|
|
954
|
-
/**
|
955
|
-
Helper method escapes the passed string to ensure HTML is displayed as
|
1029
|
+
/**
|
1030
|
+
Helper method escapes the passed string to ensure HTML is displayed as
|
956
1031
|
plain text. You should make sure you pass all user-entered data through
|
957
1032
|
this method to avoid errors. You can also do this with the text() helper
|
958
1033
|
method on a render context.
|
@@ -965,21 +1040,21 @@ if (!SC.browser.isSafari || parseInt(SC.browser.version, 10) < 526) {
|
|
965
1040
|
|
966
1041
|
SC.RenderContext.escapeHTML = function(text) {
|
967
1042
|
var elem, node, ret ;
|
968
|
-
|
969
|
-
if (SC.none(text)) return text; // ignore empty
|
970
|
-
|
1043
|
+
|
1044
|
+
if (SC.none(text)) { return text; } // ignore empty
|
1045
|
+
|
971
1046
|
elem = this.escapeHTMLElement;
|
972
|
-
if (!elem) elem = this.escapeHTMLElement = document.createElement('div');
|
973
|
-
|
1047
|
+
if (!elem) { elem = this.escapeHTMLElement = document.createElement('div'); }
|
1048
|
+
|
974
1049
|
node = this.escapeTextNode;
|
975
1050
|
if (!node) {
|
976
1051
|
node = this.escapeTextNode = document.createTextNode('');
|
977
1052
|
elem.appendChild(node);
|
978
1053
|
}
|
979
|
-
|
1054
|
+
|
980
1055
|
node.data = text ;
|
981
1056
|
ret = elem.innerHTML ;
|
982
|
-
|
1057
|
+
|
983
1058
|
// Safari 3 does not escape the '>' character
|
984
1059
|
if (SC.RenderContext._safari3) { ret = ret.replace(/>/g, '>'); }
|
985
1060
|
|