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,25 +0,0 @@
|
|
1
|
-
/*! @license Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|
20
|
-
|
21
|
-
See also:
|
22
|
-
http://www.datejs.com/license/
|
23
|
-
http://www.datejs.com/
|
24
|
-
|
25
|
-
*/
|
@@ -1,1116 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @version: 1.0 Alpha-1
|
3
|
-
* @author: Coolite Inc. http://www.coolite.com/
|
4
|
-
* @date: 2008-04-13
|
5
|
-
* @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
6
|
-
* @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
7
|
-
* @website: http://www.datejs.com/
|
8
|
-
*/
|
9
|
-
|
10
|
-
(function () {
|
11
|
-
Date.Parsing = {
|
12
|
-
Exception: function (s) {
|
13
|
-
this.message = "Parse error at '" + s.substring(0, 10) + " ...'";
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
var $P = Date.Parsing;
|
18
|
-
var _ = $P.Operators = {
|
19
|
-
//
|
20
|
-
// Tokenizers
|
21
|
-
//
|
22
|
-
rtoken: function (r) { // regex token
|
23
|
-
return function (s) {
|
24
|
-
var mx = s.match(r);
|
25
|
-
if (mx) {
|
26
|
-
return ([ mx[0], s.substring(mx[0].length) ]);
|
27
|
-
} else {
|
28
|
-
throw new $P.Exception(s);
|
29
|
-
}
|
30
|
-
};
|
31
|
-
},
|
32
|
-
token: function (s) { // whitespace-eating token
|
33
|
-
return function (s) {
|
34
|
-
return _.rtoken(new RegExp("^\s*" + s + "\s*"))(s);
|
35
|
-
// Removed .strip()
|
36
|
-
// return _.rtoken(new RegExp("^\s*" + s + "\s*"))(s).strip();
|
37
|
-
};
|
38
|
-
},
|
39
|
-
stoken: function (s) { // string token
|
40
|
-
return _.rtoken(new RegExp("^" + s));
|
41
|
-
},
|
42
|
-
|
43
|
-
//
|
44
|
-
// Atomic Operators
|
45
|
-
//
|
46
|
-
|
47
|
-
until: function (p) {
|
48
|
-
return function (s) {
|
49
|
-
var qx = [], rx = null;
|
50
|
-
while (s.length) {
|
51
|
-
try {
|
52
|
-
rx = p.call(this, s);
|
53
|
-
} catch (e) {
|
54
|
-
qx.push(rx[0]);
|
55
|
-
s = rx[1];
|
56
|
-
continue;
|
57
|
-
}
|
58
|
-
break;
|
59
|
-
}
|
60
|
-
return [ qx, s ];
|
61
|
-
};
|
62
|
-
},
|
63
|
-
many: function (p) {
|
64
|
-
return function (s) {
|
65
|
-
var rx = [], r = null;
|
66
|
-
while (s.length) {
|
67
|
-
try {
|
68
|
-
r = p.call(this, s);
|
69
|
-
} catch (e) {
|
70
|
-
return [ rx, s ];
|
71
|
-
}
|
72
|
-
rx.push(r[0]);
|
73
|
-
s = r[1];
|
74
|
-
}
|
75
|
-
return [ rx, s ];
|
76
|
-
};
|
77
|
-
},
|
78
|
-
|
79
|
-
// generator operators -- see below
|
80
|
-
optional: function (p) {
|
81
|
-
return function (s) {
|
82
|
-
var r = null;
|
83
|
-
try {
|
84
|
-
r = p.call(this, s);
|
85
|
-
} catch (e) {
|
86
|
-
return [ null, s ];
|
87
|
-
}
|
88
|
-
return [ r[0], r[1] ];
|
89
|
-
};
|
90
|
-
},
|
91
|
-
not: function (p) {
|
92
|
-
return function (s) {
|
93
|
-
try {
|
94
|
-
p.call(this, s);
|
95
|
-
} catch (e) {
|
96
|
-
return [null, s];
|
97
|
-
}
|
98
|
-
throw new $P.Exception(s);
|
99
|
-
};
|
100
|
-
},
|
101
|
-
ignore: function (p) {
|
102
|
-
return p ?
|
103
|
-
function (s) {
|
104
|
-
var r = null;
|
105
|
-
r = p.call(this, s);
|
106
|
-
return [null, r[1]];
|
107
|
-
} : null;
|
108
|
-
},
|
109
|
-
product: function () {
|
110
|
-
var px = arguments[0],
|
111
|
-
qx = Array.prototype.slice.call(arguments, 1), rx = [];
|
112
|
-
for (var i = 0 ; i < px.length ; i++) {
|
113
|
-
rx.push(_.each(px[i], qx));
|
114
|
-
}
|
115
|
-
return rx;
|
116
|
-
},
|
117
|
-
cache: function (rule) {
|
118
|
-
var cache = {}, r = null;
|
119
|
-
return function (s) {
|
120
|
-
try {
|
121
|
-
r = cache[s] = (cache[s] || rule.call(this, s));
|
122
|
-
} catch (e) {
|
123
|
-
r = cache[s] = e;
|
124
|
-
}
|
125
|
-
if (r instanceof $P.Exception) {
|
126
|
-
throw r;
|
127
|
-
} else {
|
128
|
-
return r;
|
129
|
-
}
|
130
|
-
};
|
131
|
-
},
|
132
|
-
|
133
|
-
// vector operators -- see below
|
134
|
-
any: function () {
|
135
|
-
var px = arguments;
|
136
|
-
return function (s) {
|
137
|
-
var r = null;
|
138
|
-
for (var i = 0; i < px.length; i++) {
|
139
|
-
if (px[i] == null) {
|
140
|
-
continue;
|
141
|
-
}
|
142
|
-
try {
|
143
|
-
r = (px[i].call(this, s));
|
144
|
-
} catch (e) {
|
145
|
-
r = null;
|
146
|
-
}
|
147
|
-
if (r) {
|
148
|
-
return r;
|
149
|
-
}
|
150
|
-
}
|
151
|
-
throw new $P.Exception(s);
|
152
|
-
};
|
153
|
-
},
|
154
|
-
each: function () {
|
155
|
-
var px = arguments;
|
156
|
-
return function (s) {
|
157
|
-
var rx = [], r = null;
|
158
|
-
for (var i = 0; i < px.length ; i++) {
|
159
|
-
if (px[i] == null) {
|
160
|
-
continue;
|
161
|
-
}
|
162
|
-
try {
|
163
|
-
r = (px[i].call(this, s));
|
164
|
-
} catch (e) {
|
165
|
-
throw new $P.Exception(s);
|
166
|
-
}
|
167
|
-
rx.push(r[0]);
|
168
|
-
s = r[1];
|
169
|
-
}
|
170
|
-
return [ rx, s];
|
171
|
-
};
|
172
|
-
},
|
173
|
-
all: function () {
|
174
|
-
var px = arguments, _ = _;
|
175
|
-
return _.each(_.optional(px));
|
176
|
-
},
|
177
|
-
|
178
|
-
// delimited operators
|
179
|
-
sequence: function (px, d, c) {
|
180
|
-
d = d || _.rtoken(/^\s*/);
|
181
|
-
c = c || null;
|
182
|
-
|
183
|
-
if (px.length == 1) {
|
184
|
-
return px[0];
|
185
|
-
}
|
186
|
-
return function (s) {
|
187
|
-
var r = null, q = null;
|
188
|
-
var rx = [];
|
189
|
-
for (var i = 0; i < px.length ; i++) {
|
190
|
-
try {
|
191
|
-
r = px[i].call(this, s);
|
192
|
-
} catch (e) {
|
193
|
-
break;
|
194
|
-
}
|
195
|
-
rx.push(r[0]);
|
196
|
-
try {
|
197
|
-
q = d.call(this, r[1]);
|
198
|
-
} catch (ex) {
|
199
|
-
q = null;
|
200
|
-
break;
|
201
|
-
}
|
202
|
-
s = q[1];
|
203
|
-
}
|
204
|
-
if (!r) {
|
205
|
-
throw new $P.Exception(s);
|
206
|
-
}
|
207
|
-
if (q) {
|
208
|
-
throw new $P.Exception(q[1]);
|
209
|
-
}
|
210
|
-
if (c) {
|
211
|
-
try {
|
212
|
-
r = c.call(this, r[1]);
|
213
|
-
} catch (ey) {
|
214
|
-
throw new $P.Exception(r[1]);
|
215
|
-
}
|
216
|
-
}
|
217
|
-
return [ rx, (r?r[1]:s) ];
|
218
|
-
};
|
219
|
-
},
|
220
|
-
|
221
|
-
//
|
222
|
-
// Composite Operators
|
223
|
-
//
|
224
|
-
|
225
|
-
between: function (d1, p, d2) {
|
226
|
-
d2 = d2 || d1;
|
227
|
-
var _fn = _.each(_.ignore(d1), p, _.ignore(d2));
|
228
|
-
return function (s) {
|
229
|
-
var rx = _fn.call(this, s);
|
230
|
-
return [[rx[0][0], r[0][2]], rx[1]];
|
231
|
-
};
|
232
|
-
},
|
233
|
-
list: function (p, d, c) {
|
234
|
-
d = d || _.rtoken(/^\s*/);
|
235
|
-
c = c || null;
|
236
|
-
return (p instanceof Array ?
|
237
|
-
_.each(_.product(p.slice(0, -1), _.ignore(d)), p.slice(-1), _.ignore(c)) :
|
238
|
-
_.each(_.many(_.each(p, _.ignore(d))), px, _.ignore(c)));
|
239
|
-
},
|
240
|
-
set: function (px, d, c) {
|
241
|
-
d = d || _.rtoken(/^\s*/);
|
242
|
-
c = c || null;
|
243
|
-
return function (s) {
|
244
|
-
// r is the current match, best the current 'best' match
|
245
|
-
// which means it parsed the most amount of input
|
246
|
-
var r = null, p = null, q = null, rx = null, best = [[], s], last = false;
|
247
|
-
|
248
|
-
// go through the rules in the given set
|
249
|
-
for (var i = 0; i < px.length ; i++) {
|
250
|
-
|
251
|
-
// last is a flag indicating whether this must be the last element
|
252
|
-
// if there is only 1 element, then it MUST be the last one
|
253
|
-
q = null;
|
254
|
-
p = null;
|
255
|
-
r = null;
|
256
|
-
last = (px.length == 1);
|
257
|
-
|
258
|
-
// first, we try simply to match the current pattern
|
259
|
-
// if not, try the next pattern
|
260
|
-
try {
|
261
|
-
r = px[i].call(this, s);
|
262
|
-
} catch (e) {
|
263
|
-
continue;
|
264
|
-
}
|
265
|
-
|
266
|
-
// since we are matching against a set of elements, the first
|
267
|
-
// thing to do is to add r[0] to matched elements
|
268
|
-
rx = [[r[0]], r[1]];
|
269
|
-
|
270
|
-
// if we matched and there is still input to parse and
|
271
|
-
// we don't already know this is the last element,
|
272
|
-
// we're going to next check for the delimiter ...
|
273
|
-
// if there's none, or if there's no input left to parse
|
274
|
-
// than this must be the last element after all ...
|
275
|
-
if (r[1].length > 0 && ! last) {
|
276
|
-
try {
|
277
|
-
q = d.call(this, r[1]);
|
278
|
-
} catch (ex) {
|
279
|
-
last = true;
|
280
|
-
}
|
281
|
-
} else {
|
282
|
-
last = true;
|
283
|
-
}
|
284
|
-
|
285
|
-
// if we parsed the delimiter and now there's no more input,
|
286
|
-
// that means we shouldn't have parsed the delimiter at all
|
287
|
-
// so don't update r and mark this as the last element ...
|
288
|
-
if (!last && q[1].length === 0) {
|
289
|
-
last = true;
|
290
|
-
}
|
291
|
-
|
292
|
-
|
293
|
-
// so, if this isn't the last element, we're going to see if
|
294
|
-
// we can get any more matches from the remaining (unmatched)
|
295
|
-
// elements ...
|
296
|
-
if (!last) {
|
297
|
-
|
298
|
-
// build a list of the remaining rules we can match against,
|
299
|
-
// i.e., all but the one we just matched against
|
300
|
-
var qx = [];
|
301
|
-
for (var j = 0; j < px.length ; j++) {
|
302
|
-
if (i != j) {
|
303
|
-
qx.push(px[j]);
|
304
|
-
}
|
305
|
-
}
|
306
|
-
|
307
|
-
// now invoke recursively set with the remaining input
|
308
|
-
// note that we don't include the closing delimiter ...
|
309
|
-
// we'll check for that ourselves at the end
|
310
|
-
p = _.set(qx, d).call(this, q[1]);
|
311
|
-
|
312
|
-
// if we got a non-empty set as a result ...
|
313
|
-
// (otw rx already contains everything we want to match)
|
314
|
-
if (p[0].length > 0) {
|
315
|
-
// update current result, which is stored in rx ...
|
316
|
-
// basically, pick up the remaining text from p[1]
|
317
|
-
// and concat the result from p[0] so that we don't
|
318
|
-
// get endless nesting ...
|
319
|
-
rx[0] = rx[0].concat(p[0]);
|
320
|
-
rx[1] = p[1];
|
321
|
-
}
|
322
|
-
}
|
323
|
-
|
324
|
-
// at this point, rx either contains the last matched element
|
325
|
-
// or the entire matched set that starts with this element.
|
326
|
-
|
327
|
-
// now we just check to see if this variation is better than
|
328
|
-
// our best so far, in terms of how much of the input is parsed
|
329
|
-
if (rx[1].length < best[1].length) {
|
330
|
-
best = rx;
|
331
|
-
}
|
332
|
-
|
333
|
-
// if we've parsed all the input, then we're finished
|
334
|
-
if (best[1].length === 0) {
|
335
|
-
break;
|
336
|
-
}
|
337
|
-
}
|
338
|
-
|
339
|
-
// so now we've either gone through all the patterns trying them
|
340
|
-
// as the initial match; or we found one that parsed the entire
|
341
|
-
// input string ...
|
342
|
-
|
343
|
-
// if best has no matches, just return empty set ...
|
344
|
-
if (best[0].length === 0) {
|
345
|
-
return best;
|
346
|
-
}
|
347
|
-
|
348
|
-
// if a closing delimiter is provided, then we have to check it also
|
349
|
-
if (c) {
|
350
|
-
// we try this even if there is no remaining input because the pattern
|
351
|
-
// may well be optional or match empty input ...
|
352
|
-
try {
|
353
|
-
q = c.call(this, best[1]);
|
354
|
-
} catch (ey) {
|
355
|
-
throw new $P.Exception(best[1]);
|
356
|
-
}
|
357
|
-
|
358
|
-
// it parsed ... be sure to update the best match remaining input
|
359
|
-
best[1] = q[1];
|
360
|
-
}
|
361
|
-
|
362
|
-
// if we're here, either there was no closing delimiter or we parsed it
|
363
|
-
// so now we have the best match; just return it!
|
364
|
-
return best;
|
365
|
-
};
|
366
|
-
},
|
367
|
-
forward: function (gr, fname) {
|
368
|
-
return function (s) {
|
369
|
-
return gr[fname].call(this, s);
|
370
|
-
};
|
371
|
-
},
|
372
|
-
|
373
|
-
//
|
374
|
-
// Translation Operators
|
375
|
-
//
|
376
|
-
replace: function (rule, repl) {
|
377
|
-
return function (s) {
|
378
|
-
var r = rule.call(this, s);
|
379
|
-
return [repl, r[1]];
|
380
|
-
};
|
381
|
-
},
|
382
|
-
process: function (rule, fn) {
|
383
|
-
return function (s) {
|
384
|
-
var r = rule.call(this, s);
|
385
|
-
return [fn.call(this, r[0]), r[1]];
|
386
|
-
};
|
387
|
-
},
|
388
|
-
min: function (min, rule) {
|
389
|
-
return function (s) {
|
390
|
-
var rx = rule.call(this, s);
|
391
|
-
if (rx[0].length < min) {
|
392
|
-
throw new $P.Exception(s);
|
393
|
-
}
|
394
|
-
return rx;
|
395
|
-
};
|
396
|
-
}
|
397
|
-
};
|
398
|
-
|
399
|
-
|
400
|
-
// Generator Operators And Vector Operators
|
401
|
-
|
402
|
-
// Generators are operators that have a signature of F(R) => R,
|
403
|
-
// taking a given rule and returning another rule, such as
|
404
|
-
// ignore, which parses a given rule and throws away the result.
|
405
|
-
|
406
|
-
// Vector operators are those that have a signature of F(R1,R2,...) => R,
|
407
|
-
// take a list of rules and returning a new rule, such as each.
|
408
|
-
|
409
|
-
// Generator operators are converted (via the following _generator
|
410
|
-
// function) into functions that can also take a list or array of rules
|
411
|
-
// and return an array of new rules as though the function had been
|
412
|
-
// called on each rule in turn (which is what actually happens).
|
413
|
-
|
414
|
-
// This allows generators to be used with vector operators more easily.
|
415
|
-
// Example:
|
416
|
-
// each(ignore(foo, bar)) instead of each(ignore(foo), ignore(bar))
|
417
|
-
|
418
|
-
// This also turns generators into vector operators, which allows
|
419
|
-
// constructs like:
|
420
|
-
// not(cache(foo, bar))
|
421
|
-
|
422
|
-
var _generator = function (op) {
|
423
|
-
return function () {
|
424
|
-
var args = null, rx = [];
|
425
|
-
if (arguments.length > 1) {
|
426
|
-
args = Array.prototype.slice.call(arguments);
|
427
|
-
} else if (arguments[0] instanceof Array) {
|
428
|
-
args = arguments[0];
|
429
|
-
}
|
430
|
-
if (args) {
|
431
|
-
for (var i = 0, px = args.shift() ; i < px.length ; i++) {
|
432
|
-
args.unshift(px[i]);
|
433
|
-
rx.push(op.apply(null, args));
|
434
|
-
args.shift();
|
435
|
-
return rx;
|
436
|
-
}
|
437
|
-
} else {
|
438
|
-
return op.apply(null, arguments);
|
439
|
-
}
|
440
|
-
};
|
441
|
-
};
|
442
|
-
|
443
|
-
var gx = "optional not ignore cache".split(/\s/);
|
444
|
-
|
445
|
-
for (var i = 0 ; i < gx.length ; i++) {
|
446
|
-
_[gx[i]] = _generator(_[gx[i]]);
|
447
|
-
}
|
448
|
-
|
449
|
-
var _vector = function (op) {
|
450
|
-
return function () {
|
451
|
-
if (arguments[0] instanceof Array) {
|
452
|
-
return op.apply(null, arguments[0]);
|
453
|
-
} else {
|
454
|
-
return op.apply(null, arguments);
|
455
|
-
}
|
456
|
-
};
|
457
|
-
};
|
458
|
-
|
459
|
-
var vx = "each any all".split(/\s/);
|
460
|
-
|
461
|
-
for (var j = 0 ; j < vx.length ; j++) {
|
462
|
-
_[vx[j]] = _vector(_[vx[j]]);
|
463
|
-
}
|
464
|
-
|
465
|
-
}());
|
466
|
-
|
467
|
-
(function () {
|
468
|
-
var $D = Date, $P = $D.prototype, $C = $D.CultureInfo;
|
469
|
-
|
470
|
-
var flattenAndCompact = function (ax) {
|
471
|
-
var rx = [];
|
472
|
-
for (var i = 0; i < ax.length; i++) {
|
473
|
-
if (ax[i] instanceof Array) {
|
474
|
-
rx = rx.concat(flattenAndCompact(ax[i]));
|
475
|
-
} else {
|
476
|
-
if (ax[i]) {
|
477
|
-
rx.push(ax[i]);
|
478
|
-
}
|
479
|
-
}
|
480
|
-
}
|
481
|
-
return rx;
|
482
|
-
};
|
483
|
-
|
484
|
-
$D.Grammar = {};
|
485
|
-
|
486
|
-
$D.Translator = {
|
487
|
-
hour: function (s) {
|
488
|
-
return function () {
|
489
|
-
this.hour = Number(s);
|
490
|
-
};
|
491
|
-
},
|
492
|
-
minute: function (s) {
|
493
|
-
return function () {
|
494
|
-
this.minute = Number(s);
|
495
|
-
};
|
496
|
-
},
|
497
|
-
second: function (s) {
|
498
|
-
return function () {
|
499
|
-
this.second = Number(s);
|
500
|
-
};
|
501
|
-
},
|
502
|
-
meridian: function (s) {
|
503
|
-
return function () {
|
504
|
-
this.meridian = s.slice(0, 1).toLowerCase();
|
505
|
-
};
|
506
|
-
},
|
507
|
-
timezone: function (s) {
|
508
|
-
return function () {
|
509
|
-
var n = s.replace(/[^\d\+\-]/g, "");
|
510
|
-
if (n.length) {
|
511
|
-
this.timezoneOffset = Number(n);
|
512
|
-
} else {
|
513
|
-
this.timezone = s.toLowerCase();
|
514
|
-
}
|
515
|
-
};
|
516
|
-
},
|
517
|
-
day: function (x) {
|
518
|
-
var s = x[0];
|
519
|
-
return function () {
|
520
|
-
this.day = Number(s.match(/\d+/)[0]);
|
521
|
-
};
|
522
|
-
},
|
523
|
-
month: function (s) {
|
524
|
-
return function () {
|
525
|
-
this.month = (s.length == 3) ? "jan feb mar apr may jun jul aug sep oct nov dec".indexOf(s)/4 : Number(s) - 1;
|
526
|
-
};
|
527
|
-
},
|
528
|
-
year: function (s) {
|
529
|
-
return function () {
|
530
|
-
var n = Number(s);
|
531
|
-
this.year = ((s.length > 2) ? n :
|
532
|
-
(n + (((n + 2000) < $C.twoDigitYearMax) ? 2000 : 1900)));
|
533
|
-
};
|
534
|
-
},
|
535
|
-
rday: function (s) {
|
536
|
-
return function () {
|
537
|
-
switch (s) {
|
538
|
-
case "yesterday":
|
539
|
-
this.days = -1;
|
540
|
-
break;
|
541
|
-
case "tomorrow":
|
542
|
-
this.days = 1;
|
543
|
-
break;
|
544
|
-
case "today":
|
545
|
-
this.days = 0;
|
546
|
-
break;
|
547
|
-
case "now":
|
548
|
-
this.days = 0;
|
549
|
-
this.now = true;
|
550
|
-
break;
|
551
|
-
}
|
552
|
-
};
|
553
|
-
},
|
554
|
-
finishExact: function (x) {
|
555
|
-
x = (x instanceof Array) ? x : [ x ];
|
556
|
-
|
557
|
-
for (var i = 0 ; i < x.length ; i++) {
|
558
|
-
if (x[i]) {
|
559
|
-
x[i].call(this);
|
560
|
-
}
|
561
|
-
}
|
562
|
-
|
563
|
-
var now = new Date();
|
564
|
-
|
565
|
-
if ((this.hour || this.minute) && (!this.month && !this.year && !this.day)) {
|
566
|
-
this.day = now.getDate();
|
567
|
-
}
|
568
|
-
|
569
|
-
if (!this.year) {
|
570
|
-
this.year = now.getFullYear();
|
571
|
-
}
|
572
|
-
|
573
|
-
if (!this.month && this.month !== 0) {
|
574
|
-
this.month = now.getMonth();
|
575
|
-
}
|
576
|
-
|
577
|
-
if (!this.day) {
|
578
|
-
this.day = 1;
|
579
|
-
}
|
580
|
-
|
581
|
-
if (!this.hour) {
|
582
|
-
this.hour = 0;
|
583
|
-
}
|
584
|
-
|
585
|
-
if (!this.minute) {
|
586
|
-
this.minute = 0;
|
587
|
-
}
|
588
|
-
|
589
|
-
if (!this.second) {
|
590
|
-
this.second = 0;
|
591
|
-
}
|
592
|
-
|
593
|
-
if (this.meridian && this.hour) {
|
594
|
-
if (this.meridian == "p" && this.hour < 12) {
|
595
|
-
this.hour = this.hour + 12;
|
596
|
-
} else if (this.meridian == "a" && this.hour == 12) {
|
597
|
-
this.hour = 0;
|
598
|
-
}
|
599
|
-
}
|
600
|
-
|
601
|
-
if (this.day > $D.getDaysInMonth(this.year, this.month)) {
|
602
|
-
throw new RangeError(this.day + " is not a valid value for days.");
|
603
|
-
}
|
604
|
-
|
605
|
-
var r = new Date(this.year, this.month, this.day, this.hour, this.minute, this.second);
|
606
|
-
|
607
|
-
if (this.timezone) {
|
608
|
-
r.set({ timezone: this.timezone });
|
609
|
-
} else if (this.timezoneOffset) {
|
610
|
-
r.set({ timezoneOffset: this.timezoneOffset });
|
611
|
-
}
|
612
|
-
|
613
|
-
return r;
|
614
|
-
},
|
615
|
-
finish: function (x) {
|
616
|
-
x = (x instanceof Array) ? flattenAndCompact(x) : [ x ];
|
617
|
-
|
618
|
-
if (x.length === 0) {
|
619
|
-
return null;
|
620
|
-
}
|
621
|
-
|
622
|
-
for (var i = 0 ; i < x.length ; i++) {
|
623
|
-
if (typeof x[i] == "function") {
|
624
|
-
x[i].call(this);
|
625
|
-
}
|
626
|
-
}
|
627
|
-
|
628
|
-
var today = $D.today();
|
629
|
-
|
630
|
-
if (this.now && !this.unit && !this.operator) {
|
631
|
-
return new Date();
|
632
|
-
} else if (this.now) {
|
633
|
-
today = new Date();
|
634
|
-
}
|
635
|
-
|
636
|
-
var expression = !!(this.days && this.days !== null || this.orient || this.operator);
|
637
|
-
|
638
|
-
var gap, mod, orient;
|
639
|
-
orient = ((this.orient == "past" || this.operator == "subtract") ? -1 : 1);
|
640
|
-
|
641
|
-
if(!this.now && "hour minute second".indexOf(this.unit) != -1) {
|
642
|
-
today.setTimeToNow();
|
643
|
-
}
|
644
|
-
|
645
|
-
if (this.month || this.month === 0) {
|
646
|
-
if ("year day hour minute second".indexOf(this.unit) != -1) {
|
647
|
-
this.value = this.month + 1;
|
648
|
-
this.month = null;
|
649
|
-
expression = true;
|
650
|
-
}
|
651
|
-
}
|
652
|
-
|
653
|
-
if (!expression && this.weekday && !this.day && !this.days) {
|
654
|
-
var temp = Date[this.weekday]();
|
655
|
-
this.day = temp.getDate();
|
656
|
-
if (!this.month) {
|
657
|
-
this.month = temp.getMonth();
|
658
|
-
}
|
659
|
-
this.year = temp.getFullYear();
|
660
|
-
}
|
661
|
-
|
662
|
-
if (expression && this.weekday && this.unit != "month") {
|
663
|
-
this.unit = "day";
|
664
|
-
gap = ($D.getDayNumberFromName(this.weekday) - today.getDay());
|
665
|
-
mod = 7;
|
666
|
-
this.days = gap ? ((gap + (orient * mod)) % mod) : (orient * mod);
|
667
|
-
}
|
668
|
-
|
669
|
-
if (this.month && this.unit == "day" && this.operator) {
|
670
|
-
this.value = (this.month + 1);
|
671
|
-
this.month = null;
|
672
|
-
}
|
673
|
-
|
674
|
-
if (this.value != null && this.month != null && this.year != null) {
|
675
|
-
this.day = this.value * 1;
|
676
|
-
}
|
677
|
-
|
678
|
-
if (this.month && !this.day && this.value) {
|
679
|
-
today.set({ day: this.value * 1 });
|
680
|
-
if (!expression) {
|
681
|
-
this.day = this.value * 1;
|
682
|
-
}
|
683
|
-
}
|
684
|
-
|
685
|
-
if (!this.month && this.value && this.unit == "month" && !this.now) {
|
686
|
-
this.month = this.value;
|
687
|
-
expression = true;
|
688
|
-
}
|
689
|
-
|
690
|
-
if (expression && (this.month || this.month === 0) && this.unit != "year") {
|
691
|
-
this.unit = "month";
|
692
|
-
gap = (this.month - today.getMonth());
|
693
|
-
mod = 12;
|
694
|
-
this.months = gap ? ((gap + (orient * mod)) % mod) : (orient * mod);
|
695
|
-
this.month = null;
|
696
|
-
}
|
697
|
-
|
698
|
-
if (!this.unit) {
|
699
|
-
this.unit = "day";
|
700
|
-
}
|
701
|
-
|
702
|
-
if (!this.value && this.operator && this.operator !== null && this[this.unit + "s"] && this[this.unit + "s"] !== null) {
|
703
|
-
this[this.unit + "s"] = this[this.unit + "s"] + ((this.operator == "add") ? 1 : -1) + (this.value||0) * orient;
|
704
|
-
} else if (this[this.unit + "s"] == null || this.operator != null) {
|
705
|
-
if (!this.value) {
|
706
|
-
this.value = 1;
|
707
|
-
}
|
708
|
-
this[this.unit + "s"] = this.value * orient;
|
709
|
-
}
|
710
|
-
|
711
|
-
if (this.meridian && this.hour) {
|
712
|
-
if (this.meridian == "p" && this.hour < 12) {
|
713
|
-
this.hour = this.hour + 12;
|
714
|
-
} else if (this.meridian == "a" && this.hour == 12) {
|
715
|
-
this.hour = 0;
|
716
|
-
}
|
717
|
-
}
|
718
|
-
|
719
|
-
if (this.weekday && !this.day && !this.days) {
|
720
|
-
var temp = Date[this.weekday]();
|
721
|
-
this.day = temp.getDate();
|
722
|
-
if (temp.getMonth() !== today.getMonth()) {
|
723
|
-
this.month = temp.getMonth();
|
724
|
-
}
|
725
|
-
}
|
726
|
-
|
727
|
-
if ((this.month || this.month === 0) && !this.day) {
|
728
|
-
this.day = 1;
|
729
|
-
}
|
730
|
-
|
731
|
-
if (!this.orient && !this.operator && this.unit == "week" && this.value && !this.day && !this.month) {
|
732
|
-
return Date.today().setWeek(this.value);
|
733
|
-
}
|
734
|
-
|
735
|
-
if (expression && this.timezone && this.day && this.days) {
|
736
|
-
this.day = this.days;
|
737
|
-
}
|
738
|
-
|
739
|
-
return (expression) ? today.add(this) : today.set(this);
|
740
|
-
}
|
741
|
-
};
|
742
|
-
|
743
|
-
var _ = $D.Parsing.Operators, g = $D.Grammar, t = $D.Translator, _fn;
|
744
|
-
|
745
|
-
g.datePartDelimiter = _.rtoken(/^([\s\-\.\,\/\x27]+)/);
|
746
|
-
g.timePartDelimiter = _.stoken(":");
|
747
|
-
g.whiteSpace = _.rtoken(/^\s*/);
|
748
|
-
g.generalDelimiter = _.rtoken(/^(([\s\,]|at|@|on)+)/);
|
749
|
-
|
750
|
-
var _C = {};
|
751
|
-
g.ctoken = function (keys) {
|
752
|
-
var fn = _C[keys];
|
753
|
-
if (! fn) {
|
754
|
-
var c = $C.regexPatterns;
|
755
|
-
var kx = keys.split(/\s+/), px = [];
|
756
|
-
for (var i = 0; i < kx.length ; i++) {
|
757
|
-
px.push(_.replace(_.rtoken(c[kx[i]]), kx[i]));
|
758
|
-
}
|
759
|
-
fn = _C[keys] = _.any.apply(null, px);
|
760
|
-
}
|
761
|
-
return fn;
|
762
|
-
};
|
763
|
-
g.ctoken2 = function (key) {
|
764
|
-
return _.rtoken($C.regexPatterns[key]);
|
765
|
-
};
|
766
|
-
|
767
|
-
// hour, minute, second, meridian, timezone
|
768
|
-
g.h = _.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/), t.hour));
|
769
|
-
g.hh = _.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/), t.hour));
|
770
|
-
g.H = _.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/), t.hour));
|
771
|
-
g.HH = _.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/), t.hour));
|
772
|
-
g.m = _.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/), t.minute));
|
773
|
-
g.mm = _.cache(_.process(_.rtoken(/^[0-5][0-9]/), t.minute));
|
774
|
-
g.s = _.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/), t.second));
|
775
|
-
g.ss = _.cache(_.process(_.rtoken(/^[0-5][0-9]/), t.second));
|
776
|
-
g.hms = _.cache(_.sequence([g.H, g.m, g.s], g.timePartDelimiter));
|
777
|
-
|
778
|
-
// _.min(1, _.set([ g.H, g.m, g.s ], g._t));
|
779
|
-
g.t = _.cache(_.process(g.ctoken2("shortMeridian"), t.meridian));
|
780
|
-
g.tt = _.cache(_.process(g.ctoken2("longMeridian"), t.meridian));
|
781
|
-
g.z = _.cache(_.process(_.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/), t.timezone));
|
782
|
-
g.zz = _.cache(_.process(_.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/), t.timezone));
|
783
|
-
|
784
|
-
g.zzz = _.cache(_.process(g.ctoken2("timezone"), t.timezone));
|
785
|
-
g.timeSuffix = _.each(_.ignore(g.whiteSpace), _.set([ g.tt, g.zzz ]));
|
786
|
-
g.time = _.each(_.optional(_.ignore(_.stoken("T"))), g.hms, g.timeSuffix);
|
787
|
-
|
788
|
-
// days, months, years
|
789
|
-
g.d = _.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),
|
790
|
-
_.optional(g.ctoken2("ordinalSuffix"))), t.day));
|
791
|
-
g.dd = _.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),
|
792
|
-
_.optional(g.ctoken2("ordinalSuffix"))), t.day));
|
793
|
-
g.ddd = g.dddd = _.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),
|
794
|
-
function (s) {
|
795
|
-
return function () {
|
796
|
-
this.weekday = s;
|
797
|
-
};
|
798
|
-
}
|
799
|
-
));
|
800
|
-
g.M = _.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/), t.month));
|
801
|
-
g.MM = _.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/), t.month));
|
802
|
-
g.MMM = g.MMMM = _.cache(_.process(
|
803
|
-
g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"), t.month));
|
804
|
-
g.y = _.cache(_.process(_.rtoken(/^(\d\d?)/), t.year));
|
805
|
-
g.yy = _.cache(_.process(_.rtoken(/^(\d\d)/), t.year));
|
806
|
-
g.yyy = _.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/), t.year));
|
807
|
-
g.yyyy = _.cache(_.process(_.rtoken(/^(\d\d\d\d)/), t.year));
|
808
|
-
|
809
|
-
// rolling these up into general purpose rules
|
810
|
-
_fn = function () {
|
811
|
-
return _.each(_.any.apply(null, arguments), _.not(g.ctoken2("timeContext")));
|
812
|
-
};
|
813
|
-
|
814
|
-
g.day = _fn(g.d, g.dd);
|
815
|
-
g.month = _fn(g.M, g.MMM);
|
816
|
-
g.year = _fn(g.yyyy, g.yy);
|
817
|
-
|
818
|
-
// relative date / time expressions
|
819
|
-
g.orientation = _.process(g.ctoken("past future"),
|
820
|
-
function (s) {
|
821
|
-
return function () {
|
822
|
-
this.orient = s;
|
823
|
-
};
|
824
|
-
}
|
825
|
-
);
|
826
|
-
g.operator = _.process(g.ctoken("add subtract"),
|
827
|
-
function (s) {
|
828
|
-
return function () {
|
829
|
-
this.operator = s;
|
830
|
-
};
|
831
|
-
}
|
832
|
-
);
|
833
|
-
g.rday = _.process(g.ctoken("yesterday tomorrow today now"), t.rday);
|
834
|
-
g.unit = _.process(g.ctoken("second minute hour day week month year"),
|
835
|
-
function (s) {
|
836
|
-
return function () {
|
837
|
-
this.unit = s;
|
838
|
-
};
|
839
|
-
}
|
840
|
-
);
|
841
|
-
g.value = _.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),
|
842
|
-
function (s) {
|
843
|
-
return function () {
|
844
|
-
this.value = s.replace(/\D/g, "");
|
845
|
-
};
|
846
|
-
}
|
847
|
-
);
|
848
|
-
g.expression = _.set([ g.rday, g.operator, g.value, g.unit, g.orientation, g.ddd, g.MMM ]);
|
849
|
-
|
850
|
-
// pre-loaded rules for different date part order preferences
|
851
|
-
_fn = function () {
|
852
|
-
return _.set(arguments, g.datePartDelimiter);
|
853
|
-
};
|
854
|
-
g.mdy = _fn(g.ddd, g.month, g.day, g.year);
|
855
|
-
g.ymd = _fn(g.ddd, g.year, g.month, g.day);
|
856
|
-
g.dmy = _fn(g.ddd, g.day, g.month, g.year);
|
857
|
-
g.date = function (s) {
|
858
|
-
return ((g[$C.dateElementOrder] || g.mdy).call(this, s));
|
859
|
-
};
|
860
|
-
|
861
|
-
// parsing date format specifiers - ex: "h:m:s tt"
|
862
|
-
// this little guy will generate a custom parser based
|
863
|
-
// on the format string, ex: g.format("h:m:s tt")
|
864
|
-
g.format = _.process(_.many(
|
865
|
-
_.any(
|
866
|
-
// translate format specifiers into grammar rules
|
867
|
-
_.process(
|
868
|
-
_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),
|
869
|
-
function (fmt) {
|
870
|
-
if (g[fmt]) {
|
871
|
-
return g[fmt];
|
872
|
-
} else {
|
873
|
-
throw $D.Parsing.Exception(fmt);
|
874
|
-
}
|
875
|
-
}
|
876
|
-
),
|
877
|
-
// translate separator tokens into token rules
|
878
|
-
_.process(
|
879
|
-
_.rtoken(/^[^dMyhHmstz]+/), // all legal separators
|
880
|
-
function (s) {
|
881
|
-
return _.ignore(_.stoken(s));
|
882
|
-
}
|
883
|
-
)
|
884
|
-
)),
|
885
|
-
// construct the parser ...
|
886
|
-
function (rules) {
|
887
|
-
return _.process(_.each.apply(null, rules), t.finishExact);
|
888
|
-
}
|
889
|
-
);
|
890
|
-
|
891
|
-
var _F = {
|
892
|
-
//"M/d/yyyy": function (s) {
|
893
|
-
// var m = s.match(/^([0-2]\d|3[0-1]|\d)\/(1[0-2]|0\d|\d)\/(\d\d\d\d)/);
|
894
|
-
// if (m!=null) {
|
895
|
-
// var r = [ t.month.call(this,m[1]), t.day.call(this,m[2]), t.year.call(this,m[3]) ];
|
896
|
-
// r = t.finishExact.call(this,r);
|
897
|
-
// return [ r, "" ];
|
898
|
-
// } else {
|
899
|
-
// throw new Date.Parsing.Exception(s);
|
900
|
-
// }
|
901
|
-
//}
|
902
|
-
//"M/d/yyyy": function (s) { return [ new Date(Date._parse(s)), ""]; }
|
903
|
-
};
|
904
|
-
var _get = function (f) {
|
905
|
-
return _F[f] = (_F[f] || g.format(f)[0]);
|
906
|
-
};
|
907
|
-
|
908
|
-
g.formats = function (fx) {
|
909
|
-
if (fx instanceof Array) {
|
910
|
-
var rx = [];
|
911
|
-
for (var i = 0 ; i < fx.length ; i++) {
|
912
|
-
rx.push(_get(fx[i]));
|
913
|
-
}
|
914
|
-
return _.any.apply(null, rx);
|
915
|
-
} else {
|
916
|
-
return _get(fx);
|
917
|
-
}
|
918
|
-
};
|
919
|
-
|
920
|
-
// check for these formats first
|
921
|
-
g._formats = g.formats([
|
922
|
-
"\"yyyy-MM-ddTHH:mm:ssZ\"",
|
923
|
-
"yyyy-MM-ddTHH:mm:ssZ",
|
924
|
-
"yyyy-MM-ddTHH:mm:ssz",
|
925
|
-
"yyyy-MM-ddTHH:mm:ss",
|
926
|
-
"yyyy-MM-ddTHH:mmZ",
|
927
|
-
"yyyy-MM-ddTHH:mmz",
|
928
|
-
"yyyy-MM-ddTHH:mm",
|
929
|
-
"ddd, MMM dd, yyyy H:mm:ss tt",
|
930
|
-
"ddd MMM d yyyy HH:mm:ss zzz",
|
931
|
-
"MMddyyyy",
|
932
|
-
"ddMMyyyy",
|
933
|
-
"Mddyyyy",
|
934
|
-
"ddMyyyy",
|
935
|
-
"Mdyyyy",
|
936
|
-
"dMyyyy",
|
937
|
-
"yyyy",
|
938
|
-
"Mdyy",
|
939
|
-
"dMyy",
|
940
|
-
"d"
|
941
|
-
]);
|
942
|
-
|
943
|
-
// starting rule for general purpose grammar
|
944
|
-
g._start = _.process(_.set([ g.date, g.time, g.expression ],
|
945
|
-
g.generalDelimiter, g.whiteSpace), t.finish);
|
946
|
-
|
947
|
-
// real starting rule: tries selected formats first,
|
948
|
-
// then general purpose rule
|
949
|
-
g.start = function (s) {
|
950
|
-
try {
|
951
|
-
var r = g._formats.call({}, s);
|
952
|
-
if (r[1].length === 0) {
|
953
|
-
return r;
|
954
|
-
}
|
955
|
-
} catch (e) {}
|
956
|
-
return g._start.call({}, s);
|
957
|
-
};
|
958
|
-
|
959
|
-
$D._parse = $D.parse;
|
960
|
-
|
961
|
-
/**
|
962
|
-
* Converts the specified string value into its JavaScript Date equivalent using CultureInfo specific format information.
|
963
|
-
*
|
964
|
-
* Example
|
965
|
-
<pre><code>
|
966
|
-
///////////
|
967
|
-
// Dates //
|
968
|
-
///////////
|
969
|
-
|
970
|
-
// 15-Oct-2004
|
971
|
-
var d1 = Date.parse("10/15/2004");
|
972
|
-
|
973
|
-
// 15-Oct-2004
|
974
|
-
var d1 = Date.parse("15-Oct-2004");
|
975
|
-
|
976
|
-
// 15-Oct-2004
|
977
|
-
var d1 = Date.parse("2004.10.15");
|
978
|
-
|
979
|
-
//Fri Oct 15, 2004
|
980
|
-
var d1 = Date.parse("Fri Oct 15, 2004");
|
981
|
-
|
982
|
-
///////////
|
983
|
-
// Times //
|
984
|
-
///////////
|
985
|
-
|
986
|
-
// Today at 10 PM.
|
987
|
-
var d1 = Date.parse("10 PM");
|
988
|
-
|
989
|
-
// Today at 10:30 PM.
|
990
|
-
var d1 = Date.parse("10:30 P.M.");
|
991
|
-
|
992
|
-
// Today at 6 AM.
|
993
|
-
var d1 = Date.parse("06am");
|
994
|
-
|
995
|
-
/////////////////////
|
996
|
-
// Dates and Times //
|
997
|
-
/////////////////////
|
998
|
-
|
999
|
-
// 8-July-2004 @ 10:30 PM
|
1000
|
-
var d1 = Date.parse("July 8th, 2004, 10:30 PM");
|
1001
|
-
|
1002
|
-
// 1-July-2004 @ 10:30 PM
|
1003
|
-
var d1 = Date.parse("2004-07-01T22:30:00");
|
1004
|
-
|
1005
|
-
////////////////////
|
1006
|
-
// Relative Dates //
|
1007
|
-
////////////////////
|
1008
|
-
|
1009
|
-
// Returns today's date. The string "today" is culture specific.
|
1010
|
-
var d1 = Date.parse("today");
|
1011
|
-
|
1012
|
-
// Returns yesterday's date. The string "yesterday" is culture specific.
|
1013
|
-
var d1 = Date.parse("yesterday");
|
1014
|
-
|
1015
|
-
// Returns the date of the next thursday.
|
1016
|
-
var d1 = Date.parse("Next thursday");
|
1017
|
-
|
1018
|
-
// Returns the date of the most previous monday.
|
1019
|
-
var d1 = Date.parse("last monday");
|
1020
|
-
|
1021
|
-
// Returns today's day + one year.
|
1022
|
-
var d1 = Date.parse("next year");
|
1023
|
-
|
1024
|
-
///////////////
|
1025
|
-
// Date Math //
|
1026
|
-
///////////////
|
1027
|
-
|
1028
|
-
// Today + 2 days
|
1029
|
-
var d1 = Date.parse("t+2");
|
1030
|
-
|
1031
|
-
// Today + 2 days
|
1032
|
-
var d1 = Date.parse("today + 2 days");
|
1033
|
-
|
1034
|
-
// Today + 3 months
|
1035
|
-
var d1 = Date.parse("t+3m");
|
1036
|
-
|
1037
|
-
// Today - 1 year
|
1038
|
-
var d1 = Date.parse("today - 1 year");
|
1039
|
-
|
1040
|
-
// Today - 1 year
|
1041
|
-
var d1 = Date.parse("t-1y");
|
1042
|
-
|
1043
|
-
|
1044
|
-
/////////////////////////////
|
1045
|
-
// Partial Dates and Times //
|
1046
|
-
/////////////////////////////
|
1047
|
-
|
1048
|
-
// July 15th of this year.
|
1049
|
-
var d1 = Date.parse("July 15");
|
1050
|
-
|
1051
|
-
// 15th day of current day and year.
|
1052
|
-
var d1 = Date.parse("15");
|
1053
|
-
|
1054
|
-
// July 1st of current year at 10pm.
|
1055
|
-
var d1 = Date.parse("7/1 10pm");
|
1056
|
-
</code></pre>
|
1057
|
-
*
|
1058
|
-
* @param {String} The string value to convert into a Date object [Required]
|
1059
|
-
* @return {Date} A Date object or null if the string cannot be converted into a Date.
|
1060
|
-
*/
|
1061
|
-
$D.parse = function (s) {
|
1062
|
-
var r = null;
|
1063
|
-
if (!s) {
|
1064
|
-
return null;
|
1065
|
-
}
|
1066
|
-
if (s instanceof Date) {
|
1067
|
-
return s;
|
1068
|
-
}
|
1069
|
-
try {
|
1070
|
-
r = $D.Grammar.start.call({}, s.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
|
1071
|
-
} catch (e) {
|
1072
|
-
return null;
|
1073
|
-
}
|
1074
|
-
return ((r[1].length === 0) ? r[0] : null);
|
1075
|
-
};
|
1076
|
-
|
1077
|
-
$D.getParseFunction = function (fx) {
|
1078
|
-
var fn = $D.Grammar.formats(fx);
|
1079
|
-
return function (s) {
|
1080
|
-
var r = null;
|
1081
|
-
try {
|
1082
|
-
r = fn.call({}, s);
|
1083
|
-
} catch (e) {
|
1084
|
-
return null;
|
1085
|
-
}
|
1086
|
-
return ((r[1].length === 0) ? r[0] : null);
|
1087
|
-
};
|
1088
|
-
};
|
1089
|
-
|
1090
|
-
/**
|
1091
|
-
* Converts the specified string value into its JavaScript Date equivalent using the specified format {String} or formats {Array} and the CultureInfo specific format information.
|
1092
|
-
* The format of the string value must match one of the supplied formats exactly.
|
1093
|
-
*
|
1094
|
-
* Example
|
1095
|
-
<pre><code>
|
1096
|
-
// 15-Oct-2004
|
1097
|
-
var d1 = Date.parseExact("10/15/2004", "M/d/yyyy");
|
1098
|
-
|
1099
|
-
// 15-Oct-2004
|
1100
|
-
var d1 = Date.parse("15-Oct-2004", "M-ddd-yyyy");
|
1101
|
-
|
1102
|
-
// 15-Oct-2004
|
1103
|
-
var d1 = Date.parse("2004.10.15", "yyyy.MM.dd");
|
1104
|
-
|
1105
|
-
// Multiple formats
|
1106
|
-
var d1 = Date.parseExact("10/15/2004", ["M/d/yyyy", "MMMM d, yyyy"]);
|
1107
|
-
</code></pre>
|
1108
|
-
*
|
1109
|
-
* @param {String} The string value to convert into a Date object [Required].
|
1110
|
-
* @param {Object} The expected format {String} or an array of expected formats {Array} of the date string [Required].
|
1111
|
-
* @return {Date} A Date object or null if the string cannot be converted into a Date.
|
1112
|
-
*/
|
1113
|
-
$D.parseExact = function (s, fx) {
|
1114
|
-
return $D.getParseFunction(fx)(s);
|
1115
|
-
};
|
1116
|
-
}());
|