sproutcore 1.4.5 → 1.5.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +35 -0
- data/VERSION.yml +2 -2
- data/lib/Buildfile +13 -4
- data/lib/buildtasks/build.rake +20 -17
- data/lib/buildtasks/manifest.rake +143 -78
- data/lib/buildtasks/target.rake +1 -0
- data/lib/doc_templates/sproutcore/index.tmpl +18 -4
- data/lib/doc_templates/sproutcore/publish.js +1 -1
- data/lib/frameworks/sproutcore/Buildfile +24 -13
- data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
- data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
- data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
- data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
- data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
- data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
- data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
- data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +144 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
- data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
- data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
- data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
- data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
- data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
- data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
- data/lib/frameworks/sproutcore/license.js +31 -30
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +34 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +76 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.js +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/progress.js +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +79 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
- data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
- data/lib/sproutcore.rb +9 -2
- data/lib/sproutcore/builders.rb +2 -1
- data/lib/sproutcore/builders/base.rb +7 -2
- data/lib/sproutcore/builders/combine.rb +49 -1
- data/lib/sproutcore/builders/html.rb +2 -0
- data/lib/sproutcore/builders/javascript.rb +1 -1
- data/lib/sproutcore/builders/minify.rb +12 -12
- data/lib/sproutcore/builders/module.rb +72 -0
- data/lib/sproutcore/builders/string_wrapper.rb +43 -0
- data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
- data/lib/sproutcore/helpers/static_helper.rb +13 -9
- data/lib/sproutcore/models/manifest_entry.rb +2 -2
- data/lib/sproutcore/models/target.rb +25 -11
- data/lib/sproutcore/rack/dev.rb +3 -3
- data/lib/sproutcore/tools.rb +51 -2
- data/lib/sproutcore/tools/build.rb +35 -7
- data/lib/sproutcore/version.rb +1 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
- data/spec/fixtures/builder_tests/Buildfile +2 -2
- data/spec/lib/builders/bundle_spec.rb +8 -8
- data/spec/lib/builders/strings_spec.rb +1 -0
- data/sproutcore.gemspec +9 -2
- data/vendor/chance/.gitignore +5 -0
- data/vendor/chance/Gemfile +4 -0
- data/vendor/chance/Rakefile +2 -0
- data/vendor/chance/bin/chance +72 -0
- data/vendor/chance/chance.gemspec +28 -0
- data/vendor/chance/lib/chance.rb +139 -0
- data/vendor/chance/lib/chance/imager.rb +13 -0
- data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
- data/vendor/chance/lib/chance/importer.rb +64 -0
- data/vendor/chance/lib/chance/instance.rb +225 -0
- data/vendor/chance/lib/chance/parser.rb +831 -0
- data/vendor/chance/lib/chance/perf.rb +17 -0
- data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
- data/vendor/chance/lib/chance/slicing.rb +104 -0
- data/vendor/chance/lib/chance/version.rb +3 -0
- data/vendor/chance/test/case/abc.png +0 -0
- data/vendor/chance/test/case/more/abc.png +0 -0
- data/vendor/chance/test/case/more/another.css +4 -0
- data/vendor/chance/test/case/test1.css +22 -0
- data/vendor/chance/test/case/test2.css +6 -0
- data/vendor/sproutcore/SCCompiler.jar +0 -0
- data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
- data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar} +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
- data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
- metadata +686 -177
- data/lib/frameworks/sproutcore/CHANGELOG +0 -93
- data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
- data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
- data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
- data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
- data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
- data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
- data/lib/sproutcore/builders/bundle.rb +0 -63
@@ -1,1334 +0,0 @@
|
|
1
|
-
// ========================================================================
|
2
|
-
// CoreQuery Tests
|
3
|
-
// ========================================================================
|
4
|
-
|
5
|
-
/*
|
6
|
-
This test file incorporates most of the changes that come bundled with the
|
7
|
-
jQuery-core suite of tests, modified to fit CoreQuery's reduced API.
|
8
|
-
|
9
|
-
You should be able to update most of these tests with updated versons of the
|
10
|
-
same tests in jQuery.
|
11
|
-
*/
|
12
|
-
|
13
|
-
htmlbody('<!-- Test Styles -->\
|
14
|
-
<style>\
|
15
|
-
body, div, h1 { font-family: "trebuchet ms", verdana, arial; margin: 0; padding: 0 }\
|
16
|
-
body {font-size: 10pt; }\
|
17
|
-
h1 { padding: 15px; font-size: large; background-color: #06b; color: white; }\
|
18
|
-
h1 a { color: white; }\
|
19
|
-
h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }\
|
20
|
-
\
|
21
|
-
.pass { color: green; } \
|
22
|
-
.fail { color: red; } \
|
23
|
-
p.result { margin-left: 1em; }\
|
24
|
-
\
|
25
|
-
#banner { height: 2em; border-bottom: 1px solid white; }\
|
26
|
-
h2.pass { background-color: green; }\
|
27
|
-
h2.fail { background-color: red; }\
|
28
|
-
\
|
29
|
-
div.testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; }\
|
30
|
-
\
|
31
|
-
ol#tests > li > strong { cursor:pointer; }\
|
32
|
-
\
|
33
|
-
div#fx-tests h4 {\
|
34
|
-
background: red;\
|
35
|
-
}\
|
36
|
-
\
|
37
|
-
div#fx-tests h4.pass {\
|
38
|
-
background: green;\
|
39
|
-
}\
|
40
|
-
\
|
41
|
-
div#fx-tests div.box {\
|
42
|
-
background: red url(data/cow.jpg) no-repeat;\
|
43
|
-
overflow: hidden;\
|
44
|
-
border: 2px solid #000;\
|
45
|
-
}\
|
46
|
-
\
|
47
|
-
div#fx-tests div.overflow {\
|
48
|
-
overflow: visible;\
|
49
|
-
}\
|
50
|
-
\
|
51
|
-
div.inline {\
|
52
|
-
display: inline;\
|
53
|
-
}\
|
54
|
-
\
|
55
|
-
div.autoheight {\
|
56
|
-
height: auto;\
|
57
|
-
}\
|
58
|
-
\
|
59
|
-
div.autowidth {\
|
60
|
-
width: auto;\
|
61
|
-
}\
|
62
|
-
\
|
63
|
-
div.autoopacity {\
|
64
|
-
opacity: auto;\
|
65
|
-
}\
|
66
|
-
\
|
67
|
-
div.largewidth {\
|
68
|
-
width: 100px;\
|
69
|
-
}\
|
70
|
-
\
|
71
|
-
div.largeheight {\
|
72
|
-
height: 100px;\
|
73
|
-
}\
|
74
|
-
\
|
75
|
-
div.largeopacity {\
|
76
|
-
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);\
|
77
|
-
}\
|
78
|
-
\
|
79
|
-
div.medwidth {\
|
80
|
-
width: 50px;\
|
81
|
-
}\
|
82
|
-
\
|
83
|
-
div.medheight {\
|
84
|
-
height: 50px;\
|
85
|
-
}\
|
86
|
-
\
|
87
|
-
div.medopacity {\
|
88
|
-
opacity: 0.5;\
|
89
|
-
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);\
|
90
|
-
}\
|
91
|
-
\
|
92
|
-
div.nowidth {\
|
93
|
-
width: 0px;\
|
94
|
-
}\
|
95
|
-
\
|
96
|
-
div.noheight {\
|
97
|
-
height: 0px;\
|
98
|
-
}\
|
99
|
-
\
|
100
|
-
div.noopacity {\
|
101
|
-
opacity: 0;\
|
102
|
-
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);\
|
103
|
-
}\
|
104
|
-
\
|
105
|
-
div.hidden {\
|
106
|
-
display: none;\
|
107
|
-
}\
|
108
|
-
\
|
109
|
-
div#fx-tests div.widewidth {\
|
110
|
-
background-repeat: repeat-x;\
|
111
|
-
}\
|
112
|
-
\
|
113
|
-
div#fx-tests div.wideheight {\
|
114
|
-
background-repeat: repeat-y;\
|
115
|
-
}\
|
116
|
-
\
|
117
|
-
div#fx-tests div.widewidth.wideheight {\
|
118
|
-
background-repeat: repeat;\
|
119
|
-
}\
|
120
|
-
\
|
121
|
-
div#fx-tests div.noback {\
|
122
|
-
background-image: none;\
|
123
|
-
}\
|
124
|
-
\
|
125
|
-
div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }\
|
126
|
-
div.chain div { position: absolute; top: 0px; left: 0px; }\
|
127
|
-
\
|
128
|
-
div.chain.test { background: red; }\
|
129
|
-
div.chain.test div { background: green; }\
|
130
|
-
\
|
131
|
-
div.chain.out { background: green; }\
|
132
|
-
div.chain.out div { background: red; display: none; }\
|
133
|
-
\
|
134
|
-
div#show-tests * { display: none; }\
|
135
|
-
</style>\
|
136
|
-
<!-- Test HTML -->\
|
137
|
-
<div id="nothiddendiv" style="height:1px;background:white;">\
|
138
|
-
<div id="nothiddendivchild"></div>\
|
139
|
-
</div>\
|
140
|
-
<!-- this iframe is outside the #main so it won\'t reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves -->\
|
141
|
-
<iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>\
|
142
|
-
<dl id="dl" style="display:none;">\
|
143
|
-
<div id="main" style="display: none;">\
|
144
|
-
<p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p>\
|
145
|
-
<p id="ap">\
|
146
|
-
Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>, \
|
147
|
-
<a id="groups" href="http://groups.google.com/">Google Groups</a>. \
|
148
|
-
This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>: \
|
149
|
-
<a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>\
|
150
|
-
\
|
151
|
-
</p>\
|
152
|
-
<div id="foo">\
|
153
|
-
<p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>\
|
154
|
-
<p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>\
|
155
|
-
<p id="sap">This link has <code><a href="#2" id="anchor2">class="blog"</a></code>: <a href="http://simon.incutio.com/" class="blog link" id="simon">Simon Willison\'s Weblog</a></p>\
|
156
|
-
\
|
157
|
-
</div>\
|
158
|
-
<p id="first">Try them out:</p>\
|
159
|
-
<ul id="firstUL"></ul>\
|
160
|
-
<ol id="empty"></ol>\
|
161
|
-
<form id="form" action="formaction">\
|
162
|
-
<input type="text" name="action" value="Test" id="text1" maxlength="30"/>\
|
163
|
-
<input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>\
|
164
|
-
<input type="radio" name="radio1" id="radio1" value="on"/>\
|
165
|
-
\
|
166
|
-
<input type="radio" name="radio2" id="radio2" checked="checked"/>\
|
167
|
-
<input type="checkbox" name="check" id="check1" checked="checked"/>\
|
168
|
-
<input type="checkbox" id="check2" value="on"/>\
|
169
|
-
\
|
170
|
-
<input type="hidden" name="hidden" id="hidden1"/>\
|
171
|
-
<input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>\
|
172
|
-
\
|
173
|
-
<input type="text" id="name" name="name" value="name" />\
|
174
|
-
\
|
175
|
-
<button id="button" name="button">Button</button>\
|
176
|
-
\
|
177
|
-
<textarea id="area1" maxlength="30">foobar</textarea>\
|
178
|
-
\
|
179
|
-
<select name="select1" id="select1">\
|
180
|
-
<option id="option1a" class="emptyopt" value="">Nothing</option>\
|
181
|
-
<option id="option1b" value="1">1</option>\
|
182
|
-
<option id="option1c" value="2">2</option>\
|
183
|
-
<option id="option1d" value="3">3</option>\
|
184
|
-
</select>\
|
185
|
-
<select name="select2" id="select2">\
|
186
|
-
<option id="option2a" class="emptyopt" value="">Nothing</option>\
|
187
|
-
<option id="option2b" value="1">1</option>\
|
188
|
-
<option id="option2c" value="2">2</option>\
|
189
|
-
<option id="option2d" selected="selected" value="3">3</option>\
|
190
|
-
</select>\
|
191
|
-
<select name="select3" id="select3" multiple="multiple">\
|
192
|
-
<option id="option3a" class="emptyopt" value="">Nothing</option>\
|
193
|
-
<option id="option3b" selected="selected" value="1">1</option>\
|
194
|
-
<option id="option3c" selected="selected" value="2">2</option>\
|
195
|
-
<option id="option3d" value="3">3</option>\
|
196
|
-
<option id="option3e">no value</option>\
|
197
|
-
</select>\
|
198
|
-
\
|
199
|
-
<object id="object1" codebase="stupid">\
|
200
|
-
<param name="p1" value="x1" />\
|
201
|
-
<param name="p2" value="x2" />\
|
202
|
-
</object>\
|
203
|
-
\
|
204
|
-
<span id="台北Táiběi"></span>\
|
205
|
-
<span id="台北" lang="中文"></span>\
|
206
|
-
<span id="utf8class1" class="台北Táiběi 台北"></span>\
|
207
|
-
<span id="utf8class2" class="台北"></span>\
|
208
|
-
<span id="foo:bar" class="foo:bar"></span>\
|
209
|
-
<span id="test.foo[5]bar" class="test.foo[5]bar"></span>\
|
210
|
-
\
|
211
|
-
<foo_bar id="foobar">test element</foo_bar>\
|
212
|
-
</form>\
|
213
|
-
<b id="floatTest">Float test.</b>\
|
214
|
-
<iframe id="iframe" name="iframe"></iframe>\
|
215
|
-
<form id="lengthtest">\
|
216
|
-
<input type="text" id="idTest" name="id"/>\
|
217
|
-
</form>\
|
218
|
-
<table id="table"></table>\
|
219
|
-
\
|
220
|
-
<div id="fx-queue">\
|
221
|
-
<div id="fadein" class="chain test">fadeIn<div>fadeIn</div></div>\
|
222
|
-
<div id="fadeout" class="chain test out">fadeOut<div>fadeOut</div></div>\
|
223
|
-
\
|
224
|
-
<div id="show" class="chain test">show<div>show</div></div>\
|
225
|
-
<div id="hide" class="chain test out">hide<div>hide</div></div>\
|
226
|
-
\
|
227
|
-
<div id="togglein" class="chain test">togglein<div>togglein</div></div>\
|
228
|
-
<div id="toggleout" class="chain test out">toggleout<div>toggleout</div> </div>\
|
229
|
-
\
|
230
|
-
\
|
231
|
-
<div id="slideup" class="chain test">slideUp<div>slideUp</div></div>\
|
232
|
-
<div id="slidedown" class="chain test out">slideDown<div>slideDown</div></div>\
|
233
|
-
\
|
234
|
-
<div id="slidetogglein" class="chain test">slideToggleIn<div>slideToggleIn</div></div>\
|
235
|
-
<div id="slidetoggleout" class="chain test out">slideToggleOut<div>slideToggleOut</div></div>\
|
236
|
-
</div>\
|
237
|
-
\
|
238
|
-
<div id="fx-tests"></div>\
|
239
|
-
\
|
240
|
-
<form id="testForm" action="#" method="get">\
|
241
|
-
<textarea name="T3" rows="2" cols="15">?\
|
242
|
-
Z</textarea>\
|
243
|
-
<input type="hidden" name="H1" value="x" />\
|
244
|
-
<input type="hidden" name="H2" />\
|
245
|
-
<input name="PWD" type="password" value="" />\
|
246
|
-
<input name="T1" type="text" />\
|
247
|
-
<input name="T2" type="text" value="YES" readonly="readonly" />\
|
248
|
-
<input type="checkbox" name="C1" value="1" />\
|
249
|
-
<input type="checkbox" name="C2" />\
|
250
|
-
<input type="radio" name="R1" value="1" />\
|
251
|
-
<input type="radio" name="R1" value="2" />\
|
252
|
-
<input type="text" name="My Name" value="me" />\
|
253
|
-
<input type="reset" name="reset" value="NO" />\
|
254
|
-
<select name="S1">\
|
255
|
-
<option value="abc">ABC</option>\
|
256
|
-
<option value="abc">ABC</option>\
|
257
|
-
<option value="abc">ABC</option>\
|
258
|
-
</select>\
|
259
|
-
<select name="S2" multiple="multiple" size="3">\
|
260
|
-
<option value="abc">ABC</option>\
|
261
|
-
<option value="abc">ABC</option>\
|
262
|
-
<option value="abc">ABC</option>\
|
263
|
-
</select>\
|
264
|
-
<select name="S3">\
|
265
|
-
<option selected="selected">YES</option>\
|
266
|
-
</select>\
|
267
|
-
<select name="S4">\
|
268
|
-
<option value="" selected="selected">NO</option>\
|
269
|
-
</select>\
|
270
|
-
<input type="submit" name="sub1" value="NO" />\
|
271
|
-
<input type="submit" name="sub2" value="NO" />\
|
272
|
-
<input type="image" name="sub3" value="NO" />\
|
273
|
-
<button name="sub4" type="submit" value="NO">NO</button>\
|
274
|
-
<input name="D1" type="text" value="NO" disabled="disabled" />\
|
275
|
-
<input type="checkbox" checked="checked" disabled="disabled" name="D2" value="NO" />\
|
276
|
-
<input type="radio" name="D3" value="NO" checked="checked" disabled="disabled" />\
|
277
|
-
<select name="D4" disabled="disabled">\
|
278
|
-
<option selected="selected" value="NO">NO</option>\
|
279
|
-
</select>\
|
280
|
-
</form>\
|
281
|
-
<div id="moretests">\
|
282
|
-
<form>\
|
283
|
-
<div id="checkedtest" style="display:none;">\
|
284
|
-
<input type="radio" class="radio" name="checkedtestradios" checked="checked"/>\
|
285
|
-
<input type="radio" class="radio" name="checkedtestradios" value="on"/>\
|
286
|
-
<input type="checkbox" class="checkbox" name="checkedtestcheckboxes" checked="checked"/>\
|
287
|
-
<input type="checkbox" class="checkbox" name="checkedtestcheckboxes" />\
|
288
|
-
</div>\
|
289
|
-
</form>\
|
290
|
-
<div id="nonnodes"><span>hi</span> there <!-- mon ami --></div>\
|
291
|
-
<div id="t2037">\
|
292
|
-
<div><div class="hidden">hidden</div></div>\
|
293
|
-
</div>\
|
294
|
-
</div>\
|
295
|
-
</div>\
|
296
|
-
</dl>') ;
|
297
|
-
|
298
|
-
module("CQ core");
|
299
|
-
|
300
|
-
test("Basic requirements", function() {
|
301
|
-
expect(7);
|
302
|
-
ok( Array.prototype.push, "Array.push()" );
|
303
|
-
ok( Function.prototype.apply, "Function.apply()" );
|
304
|
-
ok( document.getElementById, "getElementById" );
|
305
|
-
ok( document.getElementsByTagName, "getElementsByTagName" );
|
306
|
-
ok( RegExp, "RegExp" );
|
307
|
-
ok( SC.CoreQuery, "SC.CoreQuery" );
|
308
|
-
ok( SC.$, "SC.$" );
|
309
|
-
});
|
310
|
-
|
311
|
-
test("SC.CoreQuery()", function() {
|
312
|
-
expect(8);
|
313
|
-
|
314
|
-
var main = SC.$("#main");
|
315
|
-
same( SC.$("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with SC.$ object as context" );
|
316
|
-
|
317
|
-
var code = SC.$("<code/>");
|
318
|
-
equals( code.length, 1, "Correct number of elements generated for code" );
|
319
|
-
var img = SC.$("<img/>");
|
320
|
-
equals( img.length, 1, "Correct number of elements generated for img" );
|
321
|
-
var div = SC.$("<div/><hr/><code/><b/>");
|
322
|
-
equals( div.length, 4, "Correct number of elements generated for div hr code b" );
|
323
|
-
|
324
|
-
// can actually yield more than one, when iframes are included, the window is an array as well
|
325
|
-
equals( SC.$(window).length, 1, "Correct number of elements generated for window" );
|
326
|
-
|
327
|
-
equals( SC.$(document).length, 1, "Correct number of elements generated for document" );
|
328
|
-
|
329
|
-
equals( SC.$([1,2,3]).get(1), 2, "Test passing an array to the factory" );
|
330
|
-
|
331
|
-
equals( SC.$(document.body).get(0), SC.$('body').get(0), "Test passing an html node to the factory" );
|
332
|
-
});
|
333
|
-
|
334
|
-
test("SC.$('html')", function() {
|
335
|
-
expect(3);
|
336
|
-
|
337
|
-
reset();
|
338
|
-
ok( SC.$("<link rel='stylesheet'/>")[0], "Creating a link" );
|
339
|
-
|
340
|
-
reset();
|
341
|
-
|
342
|
-
var j = SC.$("<span>hi</span> there <!-- mon ami -->");
|
343
|
-
ok( j.length >= 2, "Check node,textnode,comment creation (some browsers delete comments)" );
|
344
|
-
|
345
|
-
ok( !SC.$("<option>test</option>")[0].selected, "Make sure that options are auto-selected #2050" );
|
346
|
-
});
|
347
|
-
|
348
|
-
test("SC.$('html', context)", function() {
|
349
|
-
expect(1);
|
350
|
-
|
351
|
-
var $div = SC.$("<div/>");
|
352
|
-
var $span = SC.$("<span/>", $div);
|
353
|
-
equals($span.length, 1, "Verify a span created with a div context works, #1763");
|
354
|
-
});
|
355
|
-
|
356
|
-
test("length", function() {
|
357
|
-
expect(1);
|
358
|
-
equals( SC.$("p").length, 6, "Get Number of Elements Found" );
|
359
|
-
});
|
360
|
-
|
361
|
-
test("size()", function() {
|
362
|
-
expect(1);
|
363
|
-
equals( SC.$("p").size(), 6, "Get Number of Elements Found" );
|
364
|
-
});
|
365
|
-
|
366
|
-
test("get()", function() {
|
367
|
-
expect(1);
|
368
|
-
same( SC.$("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" );
|
369
|
-
});
|
370
|
-
|
371
|
-
test("get(Number)", function() {
|
372
|
-
expect(1);
|
373
|
-
equals( SC.$("p").get(0), document.getElementById("firstp"), "Get A Single Element" );
|
374
|
-
});
|
375
|
-
|
376
|
-
test("add(String|Element|Array|undefined)", function() {
|
377
|
-
expect(12);
|
378
|
-
same( SC.$("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );
|
379
|
-
same( SC.$("#sndp").add( SC.$("#en")[0] ).add( SC.$("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );
|
380
|
-
ok( SC.$([]).add(SC.$("#form")[0].elements).length >= 13, "Check elements from array" );
|
381
|
-
|
382
|
-
var x = SC.$([]).add(SC.$("<p id='x1'>xxx</p>")).add(SC.$("<p id='x2'>xxx</p>"));
|
383
|
-
equals( x[0].id, "x1", "Check on-the-fly element1" );
|
384
|
-
equals( x[1].id, "x2", "Check on-the-fly element2" );
|
385
|
-
|
386
|
-
var x = SC.$([]).add("<p id='x1'>xxx</p>").add("<p id='x2'>xxx</p>");
|
387
|
-
equals( x[0].id, "x1", "Check on-the-fly element1" );
|
388
|
-
equals( x[1].id, "x2", "Check on-the-fly element2" );
|
389
|
-
|
390
|
-
var notDefined;
|
391
|
-
equals( SC.$([]).add(notDefined).length, 0, "Check that undefined adds nothing" );
|
392
|
-
|
393
|
-
// Added after #2811
|
394
|
-
equals( SC.$([]).add([window,document,document.body,document]).length, 3, "Pass an array" );
|
395
|
-
equals( SC.$(document).add(document).length, 1, "Check duplicated elements" );
|
396
|
-
equals( SC.$(window).add(window).length, 1, "Check duplicated elements using the window" );
|
397
|
-
ok( SC.$([]).add( document.getElementById('form') ).length >= 13, "Add a form (adds the elements)" );
|
398
|
-
});
|
399
|
-
|
400
|
-
test("each(Function)", function() {
|
401
|
-
expect(1);
|
402
|
-
var div = SC.$("div");
|
403
|
-
div.each(function(){this.foo = 'zoo';});
|
404
|
-
var pass = true;
|
405
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
406
|
-
if ( div.get(i).foo != "zoo" ) pass = false;
|
407
|
-
}
|
408
|
-
ok( pass, "Execute a function, Relative" );
|
409
|
-
});
|
410
|
-
|
411
|
-
test("index(Object)", function() {
|
412
|
-
expect(10);
|
413
|
-
|
414
|
-
var elements = SC.$([window, document]),
|
415
|
-
inputElements = SC.$('#radio1,#radio2,#check1,#check2');
|
416
|
-
|
417
|
-
equals( elements.index(window), 0, "Check for index of elements" );
|
418
|
-
equals( elements.index(document), 1, "Check for index of elements" );
|
419
|
-
equals( inputElements.index(document.getElementById('radio1')), 0, "Check for index of elements" );
|
420
|
-
equals( inputElements.index(document.getElementById('radio2')), 1, "Check for index of elements" );
|
421
|
-
equals( inputElements.index(document.getElementById('check1')), 2, "Check for index of elements" );
|
422
|
-
equals( inputElements.index(document.getElementById('check2')), 3, "Check for index of elements" );
|
423
|
-
equals( inputElements.index(window), -1, "Check for not found index" );
|
424
|
-
equals( inputElements.index(document), -1, "Check for not found index" );
|
425
|
-
|
426
|
-
// enabled since [5500]
|
427
|
-
equals( elements.index( elements ), 0, "Pass in a SC.$ object" );
|
428
|
-
equals( elements.index( elements.eq(1) ), 1, "Pass in a SC.$ object" );
|
429
|
-
});
|
430
|
-
|
431
|
-
test("attr(String)", function() {
|
432
|
-
expect(26);
|
433
|
-
equals( SC.$('#text1').attr('value'), "Test", 'Check for value attribute' );
|
434
|
-
equals( SC.$('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' );
|
435
|
-
equals( SC.$('#text1').attr('type'), "text", 'Check for type attribute' );
|
436
|
-
equals( SC.$('#radio1').attr('type'), "radio", 'Check for type attribute' );
|
437
|
-
equals( SC.$('#check1').attr('type'), "checkbox", 'Check for type attribute' );
|
438
|
-
equals( SC.$('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' );
|
439
|
-
equals( SC.$('#google').attr('title'), "Google!", 'Check for title attribute' );
|
440
|
-
equals( SC.$('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' );
|
441
|
-
equals( SC.$('#en').attr('lang'), "en", 'Check for lang attribute' );
|
442
|
-
equals( SC.$('#simon').attr('class'), "blog link", 'Check for class attribute' );
|
443
|
-
equals( SC.$('#name').attr('name'), "name", 'Check for name attribute' );
|
444
|
-
equals( SC.$('#text1').attr('name'), "action", 'Check for name attribute' );
|
445
|
-
ok( SC.$('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );
|
446
|
-
equals( SC.$('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' );
|
447
|
-
equals( SC.$('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' );
|
448
|
-
equals( SC.$('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' );
|
449
|
-
equals( SC.$('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' );
|
450
|
-
equals( SC.$('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' );
|
451
|
-
equals( SC.$('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' );
|
452
|
-
|
453
|
-
SC.$('#main').append(SC.$('<a id="tAnchor5"></a>').attr('href', '#5')); // using innerHTML in IE causes href attribute to be serialized to the full path
|
454
|
-
equals( SC.$('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' );
|
455
|
-
|
456
|
-
|
457
|
-
// Related to [5574] and [5683]
|
458
|
-
var body = document.body, $body = SC.$(body);
|
459
|
-
|
460
|
-
ok( $body.attr('foo') === undefined, 'Make sure that a non existent attribute returns undefined' );
|
461
|
-
|
462
|
-
// ignore the Firebug console if present...
|
463
|
-
var nextSibling = $body.attr('nextSibling') ;
|
464
|
-
ok( (($body.attr('nextSibling') === null) || (nextSibling.id == '_firebugConsole')), 'Make sure a null expando returns null' );
|
465
|
-
|
466
|
-
$body.attr('foo', 'baz');
|
467
|
-
equals( $body.attr('foo'), 'baz', 'Make sure the dom attribute is retrieved when no expando is found' );
|
468
|
-
|
469
|
-
body.foo = 'bar';
|
470
|
-
equals( $body.attr('foo'), 'bar', 'Make sure the expando is preferred over the dom attribute' );
|
471
|
-
|
472
|
-
$body.attr('foo','cool');
|
473
|
-
equals( $body.attr('foo'), 'cool', 'Make sure that setting works well when both expando and dom attribute are available' );
|
474
|
-
|
475
|
-
body.foo = undefined;
|
476
|
-
ok( $body.attr('foo') === undefined, 'Make sure the expando is preferred over the dom attribute, even if undefined' );
|
477
|
-
|
478
|
-
body.removeAttribute('foo'); // Cleanup
|
479
|
-
});
|
480
|
-
|
481
|
-
test("attr(String, Function)", function() {
|
482
|
-
expect(2);
|
483
|
-
equals( SC.$('#text1').attr('value', function() { return this.id; })[0].value, "text1", "Set value from id" );
|
484
|
-
equals( SC.$('#text1').attr('title', function(i) { return i; }).attr('title'), "0", "Set value with an index");
|
485
|
-
});
|
486
|
-
|
487
|
-
test("attr(Hash)", function() {
|
488
|
-
expect(1);
|
489
|
-
var pass = true;
|
490
|
-
SC.$("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){
|
491
|
-
if ( this.getAttribute('foo') != "baz" && this.getAttribute('zoo') != "ping" ) pass = false;
|
492
|
-
});
|
493
|
-
ok( pass, "Set Multiple Attributes" );
|
494
|
-
});
|
495
|
-
|
496
|
-
test("attr(String, Object)", function() {
|
497
|
-
expect(17);
|
498
|
-
var div = SC.$("div").attr("foo", "bar");
|
499
|
-
fail = false;
|
500
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
501
|
-
if ( div.get(i).getAttribute('foo') != "bar" ){
|
502
|
-
fail = i;
|
503
|
-
break;
|
504
|
-
}
|
505
|
-
}
|
506
|
-
equals( fail, false, "Set Attribute, the #"+fail+" element didn't get the attribute 'foo'" );
|
507
|
-
|
508
|
-
ok( SC.$("#foo").attr({"width": null}), "Try to set an attribute to nothing" );
|
509
|
-
|
510
|
-
SC.$("#name").attr('name', 'something');
|
511
|
-
equals( SC.$("#name").attr('name'), 'something', 'Set name attribute' );
|
512
|
-
SC.$("#check2").attr('checked', true);
|
513
|
-
equals( document.getElementById('check2').checked, true, 'Set checked attribute' );
|
514
|
-
SC.$("#check2").attr('checked', false);
|
515
|
-
equals( document.getElementById('check2').checked, false, 'Set checked attribute' );
|
516
|
-
SC.$("#text1").attr('readonly', true);
|
517
|
-
equals( document.getElementById('text1').readOnly, true, 'Set readonly attribute' );
|
518
|
-
SC.$("#text1").attr('readonly', false);
|
519
|
-
equals( document.getElementById('text1').readOnly, false, 'Set readonly attribute' );
|
520
|
-
SC.$("#name").attr('maxlength', '5');
|
521
|
-
equals( document.getElementById('name').maxLength, '5', 'Set maxlength attribute' );
|
522
|
-
SC.$("#name").attr('maxLength', '10');
|
523
|
-
equals( document.getElementById('name').maxLength, '10', 'Set maxlength attribute' );
|
524
|
-
|
525
|
-
// for #1070
|
526
|
-
SC.$("#name").attr('someAttr', '0');
|
527
|
-
equals( SC.$("#name").attr('someAttr'), '0', 'Set attribute to a string of "0"' );
|
528
|
-
SC.$("#name").attr('someAttr', 0);
|
529
|
-
equals( SC.$("#name").attr('someAttr'), 0, 'Set attribute to the number 0' );
|
530
|
-
SC.$("#name").attr('someAttr', 1);
|
531
|
-
equals( SC.$("#name").attr('someAttr'), 1, 'Set attribute to the number 1' );
|
532
|
-
|
533
|
-
// using contents will get comments regular, text, and comment nodes
|
534
|
-
var j = SC.$("#nonnodes").contents();
|
535
|
-
|
536
|
-
j.attr("name", "attrvalue");
|
537
|
-
equals( j.attr("name"), "attrvalue", "Check node,textnode,comment for attr" );
|
538
|
-
j.removeAttr("name");
|
539
|
-
|
540
|
-
reset();
|
541
|
-
|
542
|
-
var type = SC.$("#check2").attr('type');
|
543
|
-
var thrown = false;
|
544
|
-
try {
|
545
|
-
SC.$("#check2").attr('type','hidden');
|
546
|
-
} catch(e) {
|
547
|
-
thrown = true;
|
548
|
-
}
|
549
|
-
ok( thrown, "Exception thrown when trying to change type property" );
|
550
|
-
equals( type, SC.$("#check2").attr('type'), "Verify that you can't change the type of an input element" );
|
551
|
-
|
552
|
-
var check = document.createElement("input");
|
553
|
-
var thrown = true;
|
554
|
-
try {
|
555
|
-
SC.$(check).attr('type','checkbox');
|
556
|
-
} catch(e) {
|
557
|
-
thrown = false;
|
558
|
-
}
|
559
|
-
ok( thrown, "Exception thrown when trying to change type property" );
|
560
|
-
equals( "checkbox", SC.$(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" );
|
561
|
-
});
|
562
|
-
|
563
|
-
test("css(String|Hash)", function() {
|
564
|
-
expect(19);
|
565
|
-
|
566
|
-
equals( SC.$('#main').css("display"), 'none', 'Check for css property "display"');
|
567
|
-
|
568
|
-
ok( SC.$('#foo').isVisible(), 'Modifying CSS display: Assert element is visible');
|
569
|
-
SC.$('#foo').css({display: 'none'});
|
570
|
-
ok( !SC.$('#foo').isVisible(), 'Modified CSS display: Assert element is hidden');
|
571
|
-
SC.$('#foo').css({display: 'block'});
|
572
|
-
ok( SC.$('#foo').isVisible(), 'Modified CSS display: Assert element is visible');
|
573
|
-
|
574
|
-
SC.$('#floatTest').css({styleFloat: 'right'});
|
575
|
-
equals( SC.$('#floatTest').css('styleFloat'), 'right', 'Modified CSS float using "styleFloat": Assert float is right');
|
576
|
-
SC.$('#floatTest').css({cssFloat: 'left'});
|
577
|
-
equals( SC.$('#floatTest').css('cssFloat'), 'left', 'Modified CSS float using "cssFloat": Assert float is left');
|
578
|
-
SC.$('#floatTest').css({'float': 'right'});
|
579
|
-
equals( SC.$('#floatTest').css('float'), 'right', 'Modified CSS float using "float": Assert float is right');
|
580
|
-
SC.$('#floatTest').css({'font-size': '30px'});
|
581
|
-
equals( SC.$('#floatTest').css('font-size'), '30px', 'Modified CSS font-size: Assert font-size is 30px');
|
582
|
-
|
583
|
-
SC.$.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {
|
584
|
-
SC.$('#foo').css({opacity: n});
|
585
|
-
equals( SC.$('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );
|
586
|
-
SC.$('#foo').css({opacity: parseFloat(n)});
|
587
|
-
equals( SC.$('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );
|
588
|
-
});
|
589
|
-
SC.$('#foo').css({opacity: ''});
|
590
|
-
equals( SC.$('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );
|
591
|
-
});
|
592
|
-
|
593
|
-
test("css(String, Object)", function() {
|
594
|
-
expect(21);
|
595
|
-
ok( SC.$('#foo').isVisible(), 'Modifying CSS display: Assert element is visible');
|
596
|
-
SC.$('#foo').css('display', 'none');
|
597
|
-
ok( !SC.$('#foo').isVisible(), 'Modified CSS display: Assert element is hidden');
|
598
|
-
SC.$('#foo').css('display', 'block');
|
599
|
-
ok( SC.$('#foo').isVisible(), 'Modified CSS display: Assert element is visible');
|
600
|
-
|
601
|
-
SC.$('#floatTest').css('styleFloat', 'left');
|
602
|
-
equals( SC.$('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left');
|
603
|
-
SC.$('#floatTest').css('cssFloat', 'right');
|
604
|
-
equals( SC.$('#floatTest').css('cssFloat'), 'right', 'Modified CSS float using "cssFloat": Assert float is right');
|
605
|
-
SC.$('#floatTest').css('float', 'left');
|
606
|
-
equals( SC.$('#floatTest').css('float'), 'left', 'Modified CSS float using "float": Assert float is left');
|
607
|
-
SC.$('#floatTest').css('font-size', '20px');
|
608
|
-
equals( SC.$('#floatTest').css('font-size'), '20px', 'Modified CSS font-size: Assert font-size is 20px');
|
609
|
-
|
610
|
-
SC.$.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {
|
611
|
-
SC.$('#foo').css('opacity', n);
|
612
|
-
equals( SC.$('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );
|
613
|
-
SC.$('#foo').css('opacity', parseFloat(n));
|
614
|
-
equals( SC.$('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );
|
615
|
-
});
|
616
|
-
SC.$('#foo').css('opacity', '');
|
617
|
-
equals( SC.$('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );
|
618
|
-
// for #1438, IE throws JS error when filter exists but doesn't have opacity in it
|
619
|
-
if (SC.browser.msie) {
|
620
|
-
SC.$('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');");
|
621
|
-
}
|
622
|
-
equals( SC.$('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" );
|
623
|
-
|
624
|
-
// using contents will get comments regular, text, and comment nodes
|
625
|
-
var j = SC.$("#nonnodes").contents();
|
626
|
-
j.css("padding-left", "1px");
|
627
|
-
equals( j.css("padding-left"), "1px", "Check node,textnode,comment css works" );
|
628
|
-
|
629
|
-
// opera sometimes doesn't update 'display' correctly, see #2037
|
630
|
-
SC.$("#t2037")[0].innerHTML = SC.$("#t2037")[0].innerHTML ;
|
631
|
-
equals( SC.$("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" );
|
632
|
-
});
|
633
|
-
|
634
|
-
test("SC.$.css(elem, 'height') doesn't clear radio buttons (bug #1095)", function () {
|
635
|
-
expect(4);
|
636
|
-
|
637
|
-
var $checkedtest = SC.$("#checkedtest");
|
638
|
-
// IE6 was clearing "checked" in SC.$.css(elem, "height");
|
639
|
-
SC.$.css($checkedtest[0], "height");
|
640
|
-
var input = SC.$("input.radio", $checkedtest);
|
641
|
-
ok( !! SC.$(input[0]).attr("checked"), "Check first radio still checked." );
|
642
|
-
ok( ! SC.$(input[input.length]).attr("checked"), "Check last radio still NOT checked." );
|
643
|
-
|
644
|
-
var input = SC.$("input.checkbox", $checkedtest);
|
645
|
-
ok( !! SC.$(input[0]).attr("checked"), "Check first checkbox still checked." );
|
646
|
-
ok( ! SC.$(input[input.length]).attr("checked"), "Check last checkbox still NOT checked." );
|
647
|
-
});
|
648
|
-
|
649
|
-
test("width()", function() {
|
650
|
-
expect(9);
|
651
|
-
|
652
|
-
var $div = SC.$("#nothiddendiv");
|
653
|
-
$div.width(30);
|
654
|
-
equals($div.width(), 30, "Test set to 30 correctly");
|
655
|
-
$div.width(-1); // handle negative numbers by ignoring #1599
|
656
|
-
equals($div.width(), 30, "Test negative width ignored");
|
657
|
-
$div.css("padding", "20px");
|
658
|
-
equals($div.width(), 30, "Test padding specified with pixels");
|
659
|
-
$div.css("border", "2px solid #fff");
|
660
|
-
equals($div.width(), 30, "Test border specified with pixels");
|
661
|
-
|
662
|
-
// IE is off by one on this. We don't really care at this point since ems
|
663
|
-
// is not really central to most SC apps.
|
664
|
-
$div.css("padding", "2em");
|
665
|
-
var e = SC.browser.msie==8 ? 29 : 30;
|
666
|
-
equals($div.width(), e, "Test padding specified with ems");
|
667
|
-
|
668
|
-
$div.css("border", "1em solid #fff");
|
669
|
-
equals($div.width(), 30, "Test border specified with ems");
|
670
|
-
|
671
|
-
$div.css("padding", "2%");
|
672
|
-
equals($div.width(), 30, "Test padding specified with percent");
|
673
|
-
$div.hide();
|
674
|
-
equals($div.width(), 30, "Test hidden div");
|
675
|
-
|
676
|
-
$div.css({ display: "", border: "", padding: "" });
|
677
|
-
|
678
|
-
SC.$("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" });
|
679
|
-
equals(SC.$("#nothiddendivchild").width(), 20, "Test child width with border and padding");
|
680
|
-
SC.$("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" });
|
681
|
-
});
|
682
|
-
|
683
|
-
test("height()", function() {
|
684
|
-
expect(8);
|
685
|
-
|
686
|
-
var $div = SC.$("#nothiddendiv");
|
687
|
-
$div.height(30);
|
688
|
-
equals($div.height(), 30, "Test set to 30 correctly");
|
689
|
-
$div.height(-1); // handle negative numbers by ignoring #1599
|
690
|
-
equals($div.height(), 30, "Test negative height ignored");
|
691
|
-
$div.css("padding", "20px");
|
692
|
-
equals($div.height(), 30, "Test padding specified with pixels");
|
693
|
-
$div.css("border", "2px solid #fff");
|
694
|
-
equals($div.height(), 30, "Test border specified with pixels");
|
695
|
-
|
696
|
-
// IE is off by one on this. We don't really care at this point since ems
|
697
|
-
// is not really central to most SC apps.
|
698
|
-
$div.css("padding", "2em");
|
699
|
-
var e = SC.browser.msie==8 ? 29 : 30;
|
700
|
-
equals($div.height(), e, "Test padding specified with ems");
|
701
|
-
|
702
|
-
$div.css("border", "1em solid #fff");
|
703
|
-
equals($div.height(), 30, "Test border specified with ems");
|
704
|
-
$div.css("padding", "2%");
|
705
|
-
equals($div.height(), 30, "Test padding specified with percent");
|
706
|
-
$div.hide();
|
707
|
-
equals($div.height(), 30, "Test hidden div");
|
708
|
-
|
709
|
-
$div.css({ display: "", border: "", padding: "", height: "1px" });
|
710
|
-
});
|
711
|
-
|
712
|
-
test("text()", function() {
|
713
|
-
expect(1);
|
714
|
-
var expected = "This link has class=\"blog\": Simon Willison's Weblog";
|
715
|
-
equals( SC.$('#sap').text(), expected, 'Check for merged text of more then one element.' );
|
716
|
-
});
|
717
|
-
|
718
|
-
test("append(String|Element|Array<Element>|SC.$)", function() {
|
719
|
-
expect(21);
|
720
|
-
var defaultText = 'Try them out:' ;
|
721
|
-
var result = SC.$('#first').append('<b>buga</b>');
|
722
|
-
equals( result.text(), defaultText + 'buga', 'Check if text appending works' );
|
723
|
-
|
724
|
-
var cq = SC.$('#select3').append('<option value="appendTest">Append Test</option>').find('option');
|
725
|
-
equals(SC.$(cq[cq.length-1]).attr('value'), 'appendTest', 'Appending html options to select element');
|
726
|
-
|
727
|
-
reset();
|
728
|
-
var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
|
729
|
-
SC.$('#sap').append(document.getElementById('first'));
|
730
|
-
equals(SC.$('#sap').text(), expected, "Check for appending of element" );
|
731
|
-
|
732
|
-
reset();
|
733
|
-
expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
|
734
|
-
SC.$('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]);
|
735
|
-
equals(SC.$('#sap').text(), expected, "Check for appending of array of elements" );
|
736
|
-
|
737
|
-
reset();
|
738
|
-
expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";
|
739
|
-
SC.$('#sap').append(SC.$("#first, #yahoo"));
|
740
|
-
equals( expected, SC.$('#sap').text(), "Check for appending of SC.$ object" );
|
741
|
-
|
742
|
-
reset();
|
743
|
-
SC.$("#sap").append( 5 );
|
744
|
-
ok( SC.$("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );
|
745
|
-
|
746
|
-
reset();
|
747
|
-
SC.$("#sap").append( " text with spaces " );
|
748
|
-
ok( SC.$("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );
|
749
|
-
|
750
|
-
reset();
|
751
|
-
ok( SC.$("#sap").append([]), "Check for appending an empty array." );
|
752
|
-
ok( SC.$("#sap").append(""), "Check for appending an empty string." );
|
753
|
-
ok( SC.$("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );
|
754
|
-
|
755
|
-
reset();
|
756
|
-
SC.$("#sap").append(document.getElementById('form'));
|
757
|
-
equals( SC.$("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910
|
758
|
-
|
759
|
-
reset();
|
760
|
-
var pass = true;
|
761
|
-
try {
|
762
|
-
SC.$( SC.$("#iframe")[0].contentWindow.document.body ).append("<div>test</div>");
|
763
|
-
} catch(e) {
|
764
|
-
pass = false;
|
765
|
-
}
|
766
|
-
|
767
|
-
ok( pass, "Test for appending a DOM node to the contents of an IFrame" );
|
768
|
-
|
769
|
-
reset();
|
770
|
-
SC.$('<fieldset/>').appendTo('#form').append('<legend id="legend">test</legend>');
|
771
|
-
t( 'Append legend', '#legend', ['legend'] );
|
772
|
-
|
773
|
-
reset();
|
774
|
-
SC.$('#select1').append('<OPTION>Test</OPTION>');
|
775
|
-
equals( SC.$('#select1 option').last().text(), "Test", "Appending <OPTION>; (all caps)" );
|
776
|
-
|
777
|
-
SC.$('#table').append('<colgroup></colgroup>');
|
778
|
-
ok( SC.$('#table colgroup').length, "Append colgroup" );
|
779
|
-
|
780
|
-
SC.$('#table colgroup').append('<col/>');
|
781
|
-
ok( SC.$('#table colgroup col').length, "Append col" );
|
782
|
-
|
783
|
-
reset();
|
784
|
-
SC.$('#table').append('<caption></caption>');
|
785
|
-
ok( SC.$('#table caption').length, "Append caption" );
|
786
|
-
|
787
|
-
reset();
|
788
|
-
SC.$('form').last()
|
789
|
-
.append('<select id="appendSelect1"></select>')
|
790
|
-
.append('<select id="appendSelect2"><option>Test</option></select>');
|
791
|
-
|
792
|
-
t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] );
|
793
|
-
|
794
|
-
// using contents will get comments regular, text, and comment nodes
|
795
|
-
var j = SC.$("#nonnodes").contents();
|
796
|
-
var d = SC.$("<div/>").appendTo("#nonnodes").append(j);
|
797
|
-
equals( SC.$("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" );
|
798
|
-
ok( d.contents().length >= 2, "Check node,textnode,comment append works" );
|
799
|
-
d.contents().appendTo("#nonnodes");
|
800
|
-
d.remove();
|
801
|
-
ok( SC.$("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" );
|
802
|
-
});
|
803
|
-
|
804
|
-
test("prepend(String|Element|Array<Element>|SC.$)", function() {
|
805
|
-
expect(5);
|
806
|
-
var defaultText = 'Try them out:' ;
|
807
|
-
var result = SC.$('#first').prepend('<b>buga</b>');
|
808
|
-
equals( result.text(), 'buga' + defaultText, 'Check if text prepending works' );
|
809
|
-
equals( SC.$('#select3').prepend('<option value="prependTest">Prepend Test</option>').find('option').first().attr('value'), 'prependTest', 'Prepending html options to select element');
|
810
|
-
|
811
|
-
reset();
|
812
|
-
var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";
|
813
|
-
SC.$('#sap').prepend(document.getElementById('first'));
|
814
|
-
equals( expected, SC.$('#sap').text(), "Check for prepending of element" );
|
815
|
-
|
816
|
-
reset();
|
817
|
-
expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
|
818
|
-
SC.$('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]);
|
819
|
-
equals( expected, SC.$('#sap').text(), "Check for prepending of array of elements" );
|
820
|
-
|
821
|
-
reset();
|
822
|
-
expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";
|
823
|
-
SC.$('#sap').prepend(SC.$("#first, #yahoo"));
|
824
|
-
equals( expected, SC.$('#sap').text(), "Check for prepending of SC.$ object" );
|
825
|
-
});
|
826
|
-
|
827
|
-
test("before(String|Element|Array<Element>|SC.$)", function() {
|
828
|
-
expect(4);
|
829
|
-
var expected = 'This is a normal link: bugaYahoo';
|
830
|
-
SC.$('#yahoo').before('<b>buga</b>');
|
831
|
-
equals( expected, SC.$('#en').text(), 'Insert String before' );
|
832
|
-
|
833
|
-
reset();
|
834
|
-
expected = "This is a normal link: Try them out:Yahoo";
|
835
|
-
SC.$('#yahoo').before(document.getElementById('first'));
|
836
|
-
equals( expected, SC.$('#en').text(), "Insert element before" );
|
837
|
-
|
838
|
-
reset();
|
839
|
-
expected = "This is a normal link: Try them out:diveintomarkYahoo";
|
840
|
-
SC.$('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]);
|
841
|
-
equals( expected, SC.$('#en').text(), "Insert array of elements before" );
|
842
|
-
|
843
|
-
reset();
|
844
|
-
expected = "This is a normal link: Try them out:diveintomarkYahoo";
|
845
|
-
SC.$('#yahoo').before(SC.$("#first, #mark"));
|
846
|
-
equals( expected, SC.$('#en').text(), "Insert SC.$ before" );
|
847
|
-
});
|
848
|
-
|
849
|
-
test("after(String|Element|Array<Element>|SC.$)", function() {
|
850
|
-
expect(4);
|
851
|
-
var expected = 'This is a normal link: Yahoobuga';
|
852
|
-
SC.$('#yahoo').after('<b>buga</b>');
|
853
|
-
equals( expected, SC.$('#en').text(), 'Insert String after' );
|
854
|
-
|
855
|
-
reset();
|
856
|
-
expected = "This is a normal link: YahooTry them out:";
|
857
|
-
SC.$('#yahoo').after(document.getElementById('first'));
|
858
|
-
equals( expected, SC.$('#en').text(), "Insert element after" );
|
859
|
-
|
860
|
-
reset();
|
861
|
-
expected = "This is a normal link: YahooTry them out:diveintomark";
|
862
|
-
SC.$('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]);
|
863
|
-
equals( expected, SC.$('#en').text(), "Insert array of elements after" );
|
864
|
-
|
865
|
-
reset();
|
866
|
-
expected = "This is a normal link: YahooTry them out:diveintomark";
|
867
|
-
SC.$('#yahoo').after(SC.$("#first, #mark"));
|
868
|
-
equals( expected, SC.$('#en').text(), "Insert SC.$ after" );
|
869
|
-
});
|
870
|
-
|
871
|
-
test("replaceWith(String|Element|Array<Element>|SC.$)", function() {
|
872
|
-
expect(10);
|
873
|
-
SC.$('#yahoo').replaceWith('<b id="replace">buga</b>');
|
874
|
-
ok( SC.$("#replace")[0], 'Replace element with string' );
|
875
|
-
ok( !SC.$("#yahoo")[0], 'Verify that original element is gone, after string' );
|
876
|
-
|
877
|
-
reset();
|
878
|
-
SC.$('#yahoo').replaceWith(document.getElementById('first'));
|
879
|
-
ok( SC.$("#first")[0], 'Replace element with element' );
|
880
|
-
ok( !SC.$("#yahoo")[0], 'Verify that original element is gone, after element' );
|
881
|
-
|
882
|
-
reset();
|
883
|
-
SC.$('#yahoo').replaceWith([document.getElementById('first'), document.getElementById('mark')]);
|
884
|
-
ok( SC.$("#first")[0], 'Replace element with array of elements' );
|
885
|
-
ok( SC.$("#mark")[0], 'Replace element with array of elements' );
|
886
|
-
ok( !SC.$("#yahoo")[0], 'Verify that original element is gone, after array of elements' );
|
887
|
-
|
888
|
-
reset();
|
889
|
-
SC.$('#yahoo').replaceWith(SC.$("#first, #mark"));
|
890
|
-
ok( SC.$("#first")[0], 'Replace element with set of elements' );
|
891
|
-
ok( SC.$("#mark")[0], 'Replace element with set of elements' );
|
892
|
-
ok( !SC.$("#yahoo")[0], 'Verify that original element is gone, after set of elements' );
|
893
|
-
});
|
894
|
-
|
895
|
-
test("end()", function() {
|
896
|
-
expect(3);
|
897
|
-
equals( 'Yahoo', SC.$('#yahoo').parent().end().text(), 'Check for end' );
|
898
|
-
ok( SC.$('#yahoo').end(), 'Check for end with nothing to end' );
|
899
|
-
|
900
|
-
var x = SC.$('#yahoo');
|
901
|
-
x.parent();
|
902
|
-
equals( 'Yahoo', SC.$('#yahoo').text(), 'Check for non-destructive behaviour' );
|
903
|
-
});
|
904
|
-
|
905
|
-
test("find(String)", function() {
|
906
|
-
expect(2);
|
907
|
-
equals( 'Yahoo', SC.$('#foo').find('.blogTest').text(), 'Check for find' );
|
908
|
-
|
909
|
-
// using contents will get comments regular, text, and comment nodes
|
910
|
-
var j = SC.$("#nonnodes").contents();
|
911
|
-
equals( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" );
|
912
|
-
});
|
913
|
-
|
914
|
-
test("clone()", function() {
|
915
|
-
expect(20);
|
916
|
-
equals( 'This is a normal link: Yahoo', SC.$('#en').text(), 'Assert text for #en' );
|
917
|
-
var clone = SC.$('#yahoo').clone();
|
918
|
-
equals( 'Try them out:Yahoo', SC.$('#first').append(clone).text(), 'Check for clone' );
|
919
|
-
equals( 'This is a normal link: Yahoo', SC.$('#en').text(), 'Reassert text for #en' );
|
920
|
-
|
921
|
-
var cloneTags = [
|
922
|
-
"<table/>", "<tr/>", "<td/>", "<div/>",
|
923
|
-
"<button/>", "<ul/>", "<ol/>", "<li/>",
|
924
|
-
"<input type='checkbox' />", "<select/>", "<option/>", "<textarea/>",
|
925
|
-
"<tbody/>", "<thead/>", "<tfoot/>", "<iframe/>"
|
926
|
-
];
|
927
|
-
for (var i = 0; i < cloneTags.length; i++) {
|
928
|
-
var j = SC.$(cloneTags[i]);
|
929
|
-
equals( j[0].tagName, j.clone()[0].tagName, 'Clone a <' + cloneTags[i].substring(1));
|
930
|
-
}
|
931
|
-
|
932
|
-
// using contents will get comments regular, text, and comment nodes
|
933
|
-
var cl = SC.$("#nonnodes").contents().clone();
|
934
|
-
ok( cl.length >= 2, "Check node,textnode,comment clone works (some browsers delete comments on clone)" );
|
935
|
-
});
|
936
|
-
|
937
|
-
test("is(String)", function() {
|
938
|
-
expect(10);
|
939
|
-
ok( SC.$('#form').is('form'), 'Check for element: A form must be a form' );
|
940
|
-
ok( !SC.$('#form').is('div'), 'Check for element: A form is not a div' );
|
941
|
-
ok( SC.$('#mark').is('.blog'), 'Check for class: Expected class "blog"' );
|
942
|
-
ok( !SC.$('#mark').is('.link'), 'Check for class: Did not expect class "link"' );
|
943
|
-
ok( SC.$('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' );
|
944
|
-
ok( !SC.$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' );
|
945
|
-
|
946
|
-
// not supported in CoreQuery
|
947
|
-
//ok( SC.$('#en').is('[lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' );
|
948
|
-
//ok( !SC.$('#en').is('[lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' );
|
949
|
-
//ok( SC.$('#text1').is('[type="text"]'), 'Check for attribute: Expected attribute type to be "text"' );
|
950
|
-
//ok( !SC.$('#text1').is('[type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' );
|
951
|
-
|
952
|
-
//ok( SC.$('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' );
|
953
|
-
//ok( !SC.$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' );
|
954
|
-
//ok( SC.$('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' );
|
955
|
-
//ok( !SC.$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' );
|
956
|
-
//ok( SC.$('#foo').is(':has(p)'), 'Check for child: Expected a child "p" element' );
|
957
|
-
//ok( !SC.$('#foo').is(':has(ul)'), 'Check for child: Did not expect "ul" element' );
|
958
|
-
//ok( SC.$('#foo').is(':has(p):has(a):has(code)'), 'Check for childs: Expected "p", "a" and "code" child elements' );
|
959
|
-
//ok( !SC.$('#foo').is(':has(p):has(a):has(code):has(ol)'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' );
|
960
|
-
ok( !SC.$('#foo').is(0), 'Expected false for an invalid expression - 0' );
|
961
|
-
ok( !SC.$('#foo').is(null), 'Expected false for an invalid expression - null' );
|
962
|
-
ok( !SC.$('#foo').is(''), 'Expected false for an invalid expression - ""' );
|
963
|
-
ok( !SC.$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' );
|
964
|
-
|
965
|
-
// test is() with comma-seperated expressions
|
966
|
-
//ok( SC.$('#en').is('[lang="en"],[lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );
|
967
|
-
//ok( SC.$('#en').is('[lang="de"],[lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );
|
968
|
-
//ok( SC.$('#en').is('[lang="en"] , [lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );
|
969
|
-
//ok( SC.$('#en').is('[lang="de"] , [lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );
|
970
|
-
});
|
971
|
-
|
972
|
-
test("val()", function() {
|
973
|
-
expect(8);
|
974
|
-
|
975
|
-
equals( SC.$("#text1").val(), "Test", "Check for value of input element" );
|
976
|
-
// ticket #1714 this caused a JS error in IE
|
977
|
-
equals( SC.$("#first").val(), "", "Check a paragraph element to see if it has a value" );
|
978
|
-
ok( SC.$([]).val() === undefined, "Check an empty SC.$ object will return undefined from val" );
|
979
|
-
|
980
|
-
equals( SC.$('#select2').val(), '3', 'Call val() on a single="single" select' );
|
981
|
-
|
982
|
-
same( SC.$('#select3').val(), ['1', '2'], 'Call val() on a multiple="multiple" select' );
|
983
|
-
|
984
|
-
equals( SC.$('#option3c').val(), '2', 'Call val() on a option element with value' );
|
985
|
-
|
986
|
-
equals( SC.$('#option3a').val(), '', 'Call val() on a option element with empty value' );
|
987
|
-
|
988
|
-
equals( SC.$('#option3e').val(), 'no value', 'Call val() on a option element with no value attribute' );
|
989
|
-
|
990
|
-
});
|
991
|
-
|
992
|
-
test("val(String/Number)", function() {
|
993
|
-
expect(6);
|
994
|
-
document.getElementById('text1').value = "bla";
|
995
|
-
equals( SC.$("#text1").val(), "bla", "Check for modified value of input element" );
|
996
|
-
|
997
|
-
SC.$("#text1").val('test');
|
998
|
-
equals( document.getElementById('text1').value, "test", "Check for modified (via val(String)) value of input element" );
|
999
|
-
|
1000
|
-
SC.$("#text1").val(67);
|
1001
|
-
equals( document.getElementById('text1').value, "67", "Check for modified (via val(Number)) value of input element" );
|
1002
|
-
|
1003
|
-
SC.$("#select1").val("3");
|
1004
|
-
equals( SC.$("#select1").val(), "3", "Check for modified (via val(String)) value of select element" );
|
1005
|
-
|
1006
|
-
SC.$("#select1").val(2);
|
1007
|
-
equals( SC.$("#select1").val(), "2", "Check for modified (via val(Number)) value of select element" );
|
1008
|
-
|
1009
|
-
// using contents will get comments regular, text, and comment nodes
|
1010
|
-
var j = SC.$("#nonnodes").contents();
|
1011
|
-
j.val("asdf");
|
1012
|
-
equals( j.val(), "asdf", "Check node,textnode,comment with val()" );
|
1013
|
-
j.removeAttr("value");
|
1014
|
-
});
|
1015
|
-
|
1016
|
-
var scriptorder = 0;
|
1017
|
-
|
1018
|
-
test("html(String)", function() {
|
1019
|
-
|
1020
|
-
expect(5);
|
1021
|
-
var div = SC.$("#main > div");
|
1022
|
-
div.html("<b>test</b>");
|
1023
|
-
var pass = true;
|
1024
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
1025
|
-
if ( div.get(i).childNodes.length != 1 ) pass = false;
|
1026
|
-
}
|
1027
|
-
ok( pass, "Set HTML" );
|
1028
|
-
|
1029
|
-
reset();
|
1030
|
-
// using contents will get comments regular, text, and comment nodes
|
1031
|
-
var j = SC.$("#nonnodes").contents();
|
1032
|
-
|
1033
|
-
j.html("<b>bold</b>");
|
1034
|
-
|
1035
|
-
// this is needed, or the expando added by SC.$ unique will yield a different html
|
1036
|
-
j.find('b').removeData();
|
1037
|
-
ok( (j.html().toLowerCase().match(/<b(\w*|\s*\=*|\"*)*>bold<\/b>/).length>0), "Check node,textnode,comment with html()" );
|
1038
|
-
|
1039
|
-
SC.$("#main").html("<select/>");
|
1040
|
-
SC.$("#main select").html("<option>O1</option><option selected='selected'>O2</option><option>O3</option>");
|
1041
|
-
equals( SC.$("#main select").val(), "O2", "Selected option correct" );
|
1042
|
-
|
1043
|
-
var $div = SC.$('<div />');
|
1044
|
-
equals( $div.html( 5 ).html(), '5', 'Setting a number as html' );
|
1045
|
-
equals( $div.html( 0 ).html(), '0', 'Setting a zero as html' );
|
1046
|
-
|
1047
|
-
// Disabled because CoreQuery does not support evaluating script tags
|
1048
|
-
// stop();
|
1049
|
-
//
|
1050
|
-
// SC.$("#main").html('<script type="text/javascript">ok( true, "SC.$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );<'+'/script>');
|
1051
|
-
//
|
1052
|
-
// SC.$("#main").html('foo <form><script type="text/javascript">ok( true, "SC.$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );<'+'/script></form>');
|
1053
|
-
//
|
1054
|
-
// // it was decided that waiting to execute ALL scripts makes sense since nested ones have to wait anyway so this test case is changed, see #1959
|
1055
|
-
// SC.$("#main").html("<script>equals(scriptorder++, 0, 'Script is executed in order');equals(SC.$('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(scriptorder++, 1, 'Script (nested) is executed in order');equals(SC.$('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(scriptorder++, 2, 'Script (unnested) is executed in order');equals(SC.$('#scriptorder').length, 1,'Execute after html')<\/script>");
|
1056
|
-
//
|
1057
|
-
// setTimeout( start, 100 );
|
1058
|
-
});
|
1059
|
-
|
1060
|
-
test("filter()", function() {
|
1061
|
-
expect(5);
|
1062
|
-
|
1063
|
-
// psuedo-selectors are not supported
|
1064
|
-
//same( SC.$("#form input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" );
|
1065
|
-
|
1066
|
-
same( SC.$("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" );
|
1067
|
-
same( SC.$("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" );
|
1068
|
-
same( SC.$("p").filter(function() { return !SC.$("a", this).length; }).get(), q("sndp", "first"), "filter(Function)" );
|
1069
|
-
|
1070
|
-
// using contents will get comments regular, text, and comment nodes
|
1071
|
-
var j = SC.$("#nonnodes").contents();
|
1072
|
-
equals( j.filter("span").length, 1, "Check node,textnode,comment to filter the one span" );
|
1073
|
-
equals( j.filter("[name]").length, 0, "Check node,textnode,comment to filter the one span" );
|
1074
|
-
});
|
1075
|
-
|
1076
|
-
test("not()", function() {
|
1077
|
-
expect(8);
|
1078
|
-
|
1079
|
-
// NOTE: These two tests were altered to use simpler selectors.
|
1080
|
-
equals( SC.$("#main p#ap a").length, 4, 'base before not should return A');
|
1081
|
-
equals( SC.$("#main p#ap a").not("#google").length, 3, "not('selector')" );
|
1082
|
-
equals( SC.$("#main p#ap a").not(document.getElementById("google")).length, 3, "not(DOMElement)" );
|
1083
|
-
|
1084
|
-
same( SC.$("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" );
|
1085
|
-
|
1086
|
-
same( SC.$("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" );
|
1087
|
-
|
1088
|
-
same( SC.$("p").not(SC.$("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(SC.$)" );
|
1089
|
-
|
1090
|
-
equals( SC.$("p").not(document.getElementsByTagName("p")).length, 0, "not(Array-like DOM collection)" );
|
1091
|
-
|
1092
|
-
// not supported selectors
|
1093
|
-
//same( SC.$("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d", "option3e" ), "not('complex selector')");
|
1094
|
-
|
1095
|
-
var selects = SC.$("#form select");
|
1096
|
-
isSet( selects.not( selects[1] ), q("select1", "select3"), "filter out DOM element");
|
1097
|
-
});
|
1098
|
-
|
1099
|
-
test("andSelf()", function() {
|
1100
|
-
expect(4);
|
1101
|
-
same( SC.$("#en").siblings().andSelf().get(), q("sndp", "sap","en"), "Check for siblings and self" );
|
1102
|
-
same( SC.$("#foo").children().andSelf().get(), q("sndp", "en", "sap", "foo"), "Check for children and self" );
|
1103
|
-
same( SC.$("#en, #sndp").parent().andSelf().get(), q("foo","en","sndp"), "Check for parent and self" );
|
1104
|
-
same( SC.$("#groups").parents("p, div").andSelf().get(), q("ap", "main", "groups"), "Check for parents and self" );
|
1105
|
-
});
|
1106
|
-
|
1107
|
-
test("siblings([String])", function() {
|
1108
|
-
expect(3);
|
1109
|
-
same( SC.$("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" );
|
1110
|
-
// no psuedo-selectors
|
1111
|
-
//same( SC.$("#sndp").siblings(":has(code)").get(), q("sap"), "Check for filtered siblings (has code child element)" );
|
1112
|
-
//same( SC.$("#sndp").siblings(":has(a)").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );
|
1113
|
-
same( SC.$("#foo").siblings("form, b").get(), q("form", "lengthtest", "testForm", "floatTest"), "Check for multiple filters" );
|
1114
|
-
same( SC.$("#en, #sndp").siblings().get(), q("sndp", "sap", "en"), "Check for unique results from siblings" );
|
1115
|
-
});
|
1116
|
-
|
1117
|
-
test("children([String])", function() {
|
1118
|
-
expect(2);
|
1119
|
-
same( SC.$("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" );
|
1120
|
-
|
1121
|
-
// no pseudo-selectors
|
1122
|
-
//same( SC.$("#foo").children(":has(code)").get(), q("sndp", "sap"), "Check for filtered children" );
|
1123
|
-
same( SC.$("#foo").children("#en, #sap").get(), q("en", "sap"), "Check for multiple filters" );
|
1124
|
-
});
|
1125
|
-
|
1126
|
-
test("parent([String])", function() {
|
1127
|
-
expect(5);
|
1128
|
-
equals( SC.$("#groups").parent()[0].id, "ap", "Simple parent check" );
|
1129
|
-
equals( SC.$("#groups").parent("p")[0].id, "ap", "Filtered parent check" );
|
1130
|
-
equals( SC.$("#groups").parent("div").length, 0, "Filtered parent check, no match" );
|
1131
|
-
equals( SC.$("#groups").parent("div, p")[0].id, "ap", "Check for multiple filters" );
|
1132
|
-
same( SC.$("#en, #sndp").parent().get(), q("foo"), "Check for unique results from parent" );
|
1133
|
-
});
|
1134
|
-
|
1135
|
-
test("parents([String])", function() {
|
1136
|
-
expect(4);
|
1137
|
-
equals( SC.$("#groups").parents()[0].id, "ap", "Simple parents check" );
|
1138
|
-
equals( SC.$("#groups").parents("p")[0].id, "ap", "Filtered parents check" );
|
1139
|
-
equals( SC.$("#groups").parents("div")[0].id, "main", "Filtered parents check2" );
|
1140
|
-
same( SC.$("#groups").parents("p, div").get(), q("ap", "main"), "Check for multiple filters" );
|
1141
|
-
//same( SC.$("#en, #sndp").parents().get(), q("foo", "main", "dl", "body", "html"), "Check for unique results from parents" );
|
1142
|
-
});
|
1143
|
-
|
1144
|
-
test("next([String])", function() {
|
1145
|
-
expect(4);
|
1146
|
-
equals( SC.$("#ap").next()[0].id, "foo", "Simple next check" );
|
1147
|
-
equals( SC.$("#ap").next("div")[0].id, "foo", "Filtered next check" );
|
1148
|
-
equals( SC.$("#ap").next("p").length, 0, "Filtered next check, no match" );
|
1149
|
-
equals( SC.$("#ap").next("div, p")[0].id, "foo", "Multiple filters" );
|
1150
|
-
});
|
1151
|
-
|
1152
|
-
test("prev([String])", function() {
|
1153
|
-
expect(4);
|
1154
|
-
equals( SC.$("#foo").prev()[0].id, "ap", "Simple prev check" );
|
1155
|
-
equals( SC.$("#foo").prev("p")[0].id, "ap", "Filtered prev check" );
|
1156
|
-
equals( SC.$("#foo").prev("div").length, 0, "Filtered prev check, no match" );
|
1157
|
-
equals( SC.$("#foo").prev("p, div")[0].id, "ap", "Multiple filters" );
|
1158
|
-
});
|
1159
|
-
|
1160
|
-
|
1161
|
-
test("addClass(String)", function() {
|
1162
|
-
expect(1);
|
1163
|
-
var div = SC.$("div");
|
1164
|
-
div.addClass("test");
|
1165
|
-
var pass = true;
|
1166
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
1167
|
-
if ( div.get(i).className.indexOf("test") == -1 ) pass = false;
|
1168
|
-
}
|
1169
|
-
ok( pass, "Add Class" );
|
1170
|
-
|
1171
|
-
// // using contents will get regular, text, and comment nodes
|
1172
|
-
// var j = SC.$("#nonnodes").contents();
|
1173
|
-
// j.addClass("asdf");
|
1174
|
-
// ok( j.hasClass("asdf"), "Check node,textnode,comment for addClass" );
|
1175
|
-
});
|
1176
|
-
|
1177
|
-
test("removeClass(String) - simple", function() {
|
1178
|
-
expect(4);
|
1179
|
-
var div = SC.$("div", SC.$('#main')).addClass("test").removeClass("test"),
|
1180
|
-
pass = true;
|
1181
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
1182
|
-
if ( div.get(i).className.indexOf("test") != -1 ) pass = false;
|
1183
|
-
}
|
1184
|
-
ok( pass, "Remove Class" );
|
1185
|
-
|
1186
|
-
reset();
|
1187
|
-
var div = SC.$("div", SC.$('#main')).addClass("test").addClass("foo").addClass("bar");
|
1188
|
-
div.removeClass("test").removeClass("bar").removeClass("foo");
|
1189
|
-
var pass = true;
|
1190
|
-
for ( var i = 0; i < div.size(); i++ ) {
|
1191
|
-
if ( div.get(i).className.match(/test|bar|foo/) ) pass = false;
|
1192
|
-
}
|
1193
|
-
ok( pass, "Remove multiple classes" );
|
1194
|
-
|
1195
|
-
reset();
|
1196
|
-
var div = SC.$("div").first().addClass("test").removeClass("");
|
1197
|
-
ok( div.is('.test'), "Empty string passed to removeClass" );
|
1198
|
-
|
1199
|
-
// using contents will get regular, text, and comment nodes
|
1200
|
-
var j = SC.$("#nonnodes").contents();
|
1201
|
-
j.removeClass("asdf");
|
1202
|
-
ok( !j.hasClass("asdf"), "Check node,textnode,comment for removeClass" );
|
1203
|
-
});
|
1204
|
-
|
1205
|
-
test("toggleClass(String)", function() {
|
1206
|
-
expect(3);
|
1207
|
-
var e = SC.$("#firstp");
|
1208
|
-
ok( !e.is(".test"), "Assert class not present" );
|
1209
|
-
e.toggleClass("test");
|
1210
|
-
ok( e.is(".test"), "Assert class present" );
|
1211
|
-
e.toggleClass("test");
|
1212
|
-
ok( !e.is(".test"), "Assert class not present" );
|
1213
|
-
});
|
1214
|
-
|
1215
|
-
test("removeAttr(String", function() {
|
1216
|
-
expect(1);
|
1217
|
-
equals( SC.$('#mark').removeAttr("class")[0].className, "", "remove class" );
|
1218
|
-
});
|
1219
|
-
|
1220
|
-
test("text(String)", function() {
|
1221
|
-
expect(4);
|
1222
|
-
equals( SC.$("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML, "<div><b>Hello</b> cruel world!</div>", "Check escaped text" );
|
1223
|
-
|
1224
|
-
// using contents will get comments regular, text, and comment nodes
|
1225
|
-
var j = SC.$("#nonnodes").contents();
|
1226
|
-
j.text("hi!");
|
1227
|
-
equals( SC.$(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );
|
1228
|
-
equals( j[1].nodeValue, " there ", "Check node,textnode,comment with text()" );
|
1229
|
-
equals( j[2].nodeType, 8, "Check node,textnode,comment with text()" );
|
1230
|
-
});
|
1231
|
-
|
1232
|
-
test("remove()", function() {
|
1233
|
-
expect(6);
|
1234
|
-
SC.$("#ap").children().remove();
|
1235
|
-
ok( SC.$("#ap").text().length > 10, "Check text is not removed" );
|
1236
|
-
equals( SC.$("#ap").children().length, 0, "Check remove" );
|
1237
|
-
|
1238
|
-
reset();
|
1239
|
-
SC.$("#ap").children().remove("a");
|
1240
|
-
ok( SC.$("#ap").text().length > 10, "Check text is not removed" );
|
1241
|
-
equals( SC.$("#ap").children().length, 1, "Check filtered remove" );
|
1242
|
-
|
1243
|
-
// using contents will get comments regular, text, and comment nodes
|
1244
|
-
equals( SC.$("#nonnodes").contents().length, 3, "Check node,textnode,comment remove works" );
|
1245
|
-
SC.$("#nonnodes").contents().remove();
|
1246
|
-
equals( SC.$("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" );
|
1247
|
-
});
|
1248
|
-
|
1249
|
-
test("empty()", function() {
|
1250
|
-
expect(3);
|
1251
|
-
equals( SC.$("#ap").children().empty().text().length, 0, "Check text is removed" );
|
1252
|
-
equals( SC.$("#ap").children().length, 4, "Check elements are not removed" );
|
1253
|
-
|
1254
|
-
// using contents will get comments regular, text, and comment nodes
|
1255
|
-
var j = SC.$("#nonnodes").contents();
|
1256
|
-
j.empty();
|
1257
|
-
equals( j.html(), "", "Check node,textnode,comment empty works" );
|
1258
|
-
});
|
1259
|
-
|
1260
|
-
test("slice()", function() {
|
1261
|
-
expect(6);
|
1262
|
-
|
1263
|
-
var $links = SC.$("#ap a");
|
1264
|
-
|
1265
|
-
isSet( $links.slice(1,2), q("groups"), "slice(1,2)" );
|
1266
|
-
isSet( $links.slice(1), q("groups", "anchor1", "mark"), "slice(1)" );
|
1267
|
-
isSet( $links.slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );
|
1268
|
-
isSet( $links.slice(-1), q("mark"), "slice(-1)" );
|
1269
|
-
|
1270
|
-
isSet( $links.eq(1), q("groups"), "eq(1)" );
|
1271
|
-
|
1272
|
-
isSet( $links.eq('2'), q("anchor1"), "eq('2')" );
|
1273
|
-
});
|
1274
|
-
|
1275
|
-
test("SC.$.makeArray", function(){
|
1276
|
-
expect(14);
|
1277
|
-
|
1278
|
-
equals( SC.$.makeArray(SC.$('html>*'))[0].nodeName, "HEAD", "Pass makeArray a SC.$ object" );
|
1279
|
-
|
1280
|
-
equals( SC.$.makeArray(document.getElementsByName("PWD")).slice(0,1)[0].name, "PWD", "Pass makeArray a nodelist" );
|
1281
|
-
|
1282
|
-
equals( (function(){ return SC.$.makeArray(arguments); })(1,2).join(""), "12", "Pass makeArray an arguments array" );
|
1283
|
-
|
1284
|
-
equals( SC.$.makeArray([1,2,3]).join(""), "123", "Pass makeArray a real array" );
|
1285
|
-
|
1286
|
-
equals( SC.$.makeArray().length, 0, "Pass nothing to makeArray and expect an empty array" );
|
1287
|
-
|
1288
|
-
equals( SC.$.makeArray( 0 )[0], 0 , "Pass makeArray a number" );
|
1289
|
-
|
1290
|
-
equals( SC.$.makeArray( "foo" )[0], "foo", "Pass makeArray a string" );
|
1291
|
-
|
1292
|
-
equals( SC.$.makeArray( true )[0].constructor, Boolean, "Pass makeArray a boolean" );
|
1293
|
-
|
1294
|
-
equals( SC.$.makeArray( document.createElement("div") )[0].nodeName, "DIV", "Pass makeArray a single node" );
|
1295
|
-
|
1296
|
-
equals( SC.$.makeArray( {length:2, 0:"a", 1:"b"} ).join(""), "ab", "Pass makeArray an array like map (with length)" );
|
1297
|
-
|
1298
|
-
ok( !!SC.$.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, "Pass makeArray a childNodes array" );
|
1299
|
-
|
1300
|
-
// function, is tricky as it has length
|
1301
|
-
// NOTE: Due to the conflict with Scriptaculous (http://dev.SC.$.com/ticket/3248)
|
1302
|
-
// We remove support for functions since SC.$ 1.3
|
1303
|
-
//equals( SC.$.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );
|
1304
|
-
|
1305
|
-
//window, also has length
|
1306
|
-
equals( SC.$.makeArray(window)[0], window, "Pass makeArray the window" );
|
1307
|
-
|
1308
|
-
equals( SC.$.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );
|
1309
|
-
|
1310
|
-
ok( SC.$.makeArray(document.getElementById('form')).length >= 13, "Pass makeArray a form (treat as elements)" );
|
1311
|
-
});
|
1312
|
-
|
1313
|
-
module("CoreQuery.map()");
|
1314
|
-
|
1315
|
-
test("should return value of function", function() {
|
1316
|
-
// create an array of object to test.
|
1317
|
-
var values = [1,2,3,4];
|
1318
|
-
var objects = values.map(function(x) { return { value: x }; }) ;
|
1319
|
-
|
1320
|
-
// Now do CoreQuery-style map
|
1321
|
-
var result = SC.CoreQuery.map(objects, function(x) { return x.value; });
|
1322
|
-
same(result, values, "return values of result") ;
|
1323
|
-
});
|
1324
|
-
|
1325
|
-
test("should exclude null values", function() {
|
1326
|
-
// create an array of object to test.
|
1327
|
-
var values = [1,null,3,null];
|
1328
|
-
var objects = values.map(function(x) { return { value: x }; }) ;
|
1329
|
-
|
1330
|
-
// Now do CoreQuery-style map
|
1331
|
-
var result = SC.CoreQuery.map(objects, function(x) { return x.value; });
|
1332
|
-
same(result.length, 2, "number of results") ;
|
1333
|
-
same(result, [1,3], "return values of result") ;
|
1334
|
-
});
|