sproutcore 1.8.2.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/lib/buildtasks/helpers/file_rule_list.rb +3 -3
- data/lib/frameworks/sproutcore/Buildfile +1 -1
- data/lib/frameworks/sproutcore/CHANGELOG.md +235 -16
- data/lib/frameworks/sproutcore/apps/media_examples/Buildfile +13 -0
- data/lib/frameworks/sproutcore/apps/media_examples/core.js +35 -0
- data/lib/frameworks/sproutcore/apps/media_examples/resources/loading.rhtml +3 -0
- data/lib/frameworks/sproutcore/apps/media_examples/resources/main_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +100 -0
- data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +39 -0
- data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +116 -0
- data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +40 -0
- data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +107 -0
- data/lib/frameworks/sproutcore/apps/showcase/Buildfile +11 -0
- data/lib/frameworks/sproutcore/apps/showcase/README +15 -0
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_controller.js +15 -0
- data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +212 -0
- data/lib/frameworks/sproutcore/apps/showcase/core.js +170 -0
- data/lib/frameworks/sproutcore/apps/showcase/main.js +27 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/_theme.css +18 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/api.css +80 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/alarm-clock.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/balloon-facebook.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/balloon-twitter.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/balloon.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/bullet.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/calendar-insert.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/cross.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/example-box-bg.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/fruit-grape.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/fruit-lime.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/fruit-orange.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/fruit.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/glow.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/green-dot.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/grey-dot.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/pixels.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/red-dot.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/apps/{test_controls → showcase}/resources/loading.rhtml +1 -1
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +61 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +365 -0
- data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +64 -0
- data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +59 -0
- data/lib/frameworks/sproutcore/apps/showcase/theme.js +27 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +55 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +34 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +29 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +30 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +22 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +28 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +22 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +51 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +53 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +31 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +24 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +26 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +30 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +40 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +90 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +64 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +46 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +23 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +22 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +23 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +23 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +51 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +52 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +23 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +91 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +67 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +32 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +29 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +23 -0
- data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +91 -51
- data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +93 -27
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +196 -15
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +26 -10
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +90 -92
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +69 -39
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/color.js +769 -0
- data/lib/frameworks/sproutcore/frameworks/{desktop → core_foundation}/system/key_bindings.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/req_anim_frame.js +31 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +7 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +8 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +49 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/ext/object_test.js +106 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/color.js +448 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/escape_html.js +8 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/invokeLater.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/offset.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +90 -30
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/class_name_bindings_test.js +14 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/touch.js +113 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +64 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +20 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +58 -38
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/touch.js +32 -39
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +20 -15
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +19 -15
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +16 -16
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +53 -38
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +26 -26
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +0 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +96 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/datetime_recordattribute.js +22 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +376 -37
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +51 -53
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +108 -66
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +33 -35
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +6 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/compare.js +33 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +181 -15
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +153 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +39 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +139 -50
- data/lib/frameworks/sproutcore/frameworks/{foundation → desktop}/resources/button_view.css +3 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → desktop}/resources/checkbox_view.css +4 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css +2 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → desktop}/resources/radio_view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +23 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/web.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +3 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/collection_fast_path.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +79 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +13 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +147 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +123 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +58 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +9 -80
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +54 -130
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/observers.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +64 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/methods.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +28 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/ui.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +69 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +27 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +41 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +51 -89
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +59 -34
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +59 -49
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/views/scroll.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +8 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +13 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +21 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +26 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +68 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/user_defaults.js +10 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +0 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +24 -59
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +47 -34
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +96 -12
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +38 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +38 -50
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +211 -0
- data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/media/resources/playeras3.fla +0 -0
- data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +129 -115
- data/lib/frameworks/sproutcore/frameworks/media/resources/videoCanvas.swf +0 -0
- data/lib/frameworks/sproutcore/frameworks/media/tests/media_capabilities.js +194 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +56 -173
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +15 -18
- data/lib/frameworks/sproutcore/frameworks/media/views/media_slider.js +63 -219
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +4 -8
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +51 -160
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +138 -102
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +32 -12
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +28 -24
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +111 -12
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/compare.js +9 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable.js +160 -115
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +64 -19
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/mixin.js +83 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/collection.js +13 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/handlebars.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +5 -5
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +5 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +13 -12
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +9 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +105 -5
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_indeterminate_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +19 -15
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +93 -21
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_vertical_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_vertical_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_vertical_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_vertical_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -15
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_vertical_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_vertical_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_vertical_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_vertical_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +21 -17
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +26 -25
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/menu_item_view.css +2 -4
- data/lib/sproutcore/helpers/minifier.rb +5 -5
- data/lib/sproutcore/tools/build.rb +1 -1
- data/sproutcore.gemspec +6 -1
- data/vendor/chance/lib/chance/instance/slicing.rb +2 -2
- metadata +143 -60
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/alert.js +0 -39
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +0 -21
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +0 -125
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +0 -36
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/select.js +0 -12
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/split.js +0 -74
- data/lib/frameworks/sproutcore/apps/test_controls/core.js +0 -29
- data/lib/frameworks/sproutcore/apps/test_controls/main.js +0 -14
- data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +0 -158
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +0 -53
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +0 -85
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +0 -40
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +0 -60
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +0 -151
- data/lib/frameworks/sproutcore/apps/test_controls/resources/panels_page.js +0 -62
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +0 -33
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +0 -55
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +0 -77
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +0 -99
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +0 -75
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +0 -54
- data/lib/frameworks/sproutcore/apps/test_controls/resources/split_page.js +0 -141
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +0 -50
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +0 -53
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +0 -65
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +0 -34
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/detail.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/source.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/target.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/targets.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/controllers/tests.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/models/target.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/models/test.js +0 -15
- data/lib/frameworks/sproutcore/apps/tests/tests/views/offset_checkbox.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/console.js +0 -21
data/VERSION.yml
CHANGED
@@ -97,7 +97,7 @@ module SproutCore
|
|
97
97
|
next if line == ""
|
98
98
|
next if line =~ /^#/
|
99
99
|
|
100
|
-
target_match = /^TARGET\s+(
|
100
|
+
target_match = /^TARGET\s+(:?<target>[^\s]+)\s*$/.match line
|
101
101
|
if target_match
|
102
102
|
target = target_match[:target]
|
103
103
|
mode = :allow
|
@@ -108,7 +108,7 @@ module SproutCore
|
|
108
108
|
raise "Expected TARGET (target name) in Accept list at #{path}, line #{line_number}"
|
109
109
|
end
|
110
110
|
|
111
|
-
mode_match = /^(
|
111
|
+
mode_match = /^(:?<mode>ALLOW|DENY)(\s+(:?<what>.*))?\s*$/i.match line
|
112
112
|
if mode_match
|
113
113
|
_mode = mode_match[:mode].downcase
|
114
114
|
_mode = (_mode == "allow" ? :allow : :deny)
|
@@ -126,7 +126,7 @@ module SproutCore
|
|
126
126
|
next
|
127
127
|
end
|
128
128
|
|
129
|
-
match = /(
|
129
|
+
match = /(:?<expression>.*)$/.match(line)
|
130
130
|
raise "Invalid rule: #{line}" if match.nil?
|
131
131
|
|
132
132
|
rule = SproutCore::FileRule.new(match[:expression], mode)
|
@@ -99,7 +99,7 @@ config :core_tools, :required => [
|
|
99
99
|
# config :core_tools, :combine_javascript => false
|
100
100
|
# end
|
101
101
|
|
102
|
-
%w(tests
|
102
|
+
%w(tests welcome).each do |app_target|
|
103
103
|
config app_target,
|
104
104
|
:required => [:desktop, :datastore, :core_tools],
|
105
105
|
:theme => :ace
|
@@ -1,39 +1,258 @@
|
|
1
1
|
CHANGE LOG
|
2
2
|
==========
|
3
3
|
|
4
|
-
|
4
|
+
1.9.0
|
5
5
|
----------
|
6
6
|
|
7
7
|
### CHANGES & FEATURES
|
8
8
|
|
9
|
-
|
10
|
-
*
|
9
|
+
|
10
|
+
* Improves and adds much documentation.
|
11
|
+
* Adds the Showcase app used on http://showcase.sproutcore.com. This app contains
|
12
|
+
an up-to-date implementation of all of SproutCore's Views and Controls,
|
13
|
+
including code snippets for the many options of each. The app also links into
|
14
|
+
the SproutCore demos, which are being recovered and re-implemented.
|
15
|
+
* Introduces SC.Color:
|
16
|
+
- feature detection for rgba
|
17
|
+
- parser from rgb(a), hsl(a), hex, and argb values to a normalized rgb space
|
18
|
+
- converter from the normalized rgb space to rgb(a), hsl(a), hex, and argb notations
|
19
|
+
- hsl mutators to rotate the hue, saturate, or lighten a color
|
20
|
+
* Fixes and enhances the media framework:
|
11
21
|
- enables live scrubbing
|
12
22
|
- decouples MediaSlider and Audio/Video view
|
13
23
|
- fixes layout rendering by creating a render delegate
|
14
24
|
- adds SC.mediaCapabilities for media capability detection
|
15
25
|
- updates styling to use Chance
|
26
|
+
* Adds window.requestAnimationFrame() polyfill. This allows you to use
|
27
|
+
requestAnimationFrame on any browser, which will use the browser's version or
|
28
|
+
fallback to a basic timer version instead. This does not use the run loop,
|
29
|
+
because this is for non-event driven animations.
|
30
|
+
* Adds indeterminate SC.ProgressView support.
|
31
|
+
- updated to match new SproutCore theme
|
32
|
+
- uses CSS animation if possible or else falls back to highly optimized
|
33
|
+
JavaScript animation.
|
34
|
+
* Adds `useUnixTime` attribute to SC.DateTime record attribute handlers.
|
35
|
+
* Adds XHR2 event notification support.
|
36
|
+
|
37
|
+
Here are some example uses:
|
38
|
+
|
39
|
+
- req.notify('progress', this, this.reqDidProgress); // Handle 'progress' events
|
40
|
+
- req.notify('abort', this, this.reqDidAbort); // Handle 'abort' events
|
41
|
+
- req.notify('upload.progress', this, this.reqUploadDidProgress); // Handle 'progress' events on the XMLHttpRequestUpload
|
42
|
+
* Adds ability for SC.Query to compare through association (i.e.
|
43
|
+
query.orderBy = 'address.street' now works).
|
44
|
+
* Adds several more unit tests and fixes outdated unit tests.
|
45
|
+
* Moves base CSS for SC.ButtonView, SC.CheckboxView and SC.RadioView out of the
|
46
|
+
foundation framework and into the desktop framework where these views are
|
47
|
+
defined.
|
48
|
+
* Prevents exception when setting SC.SelectView items to null.
|
49
|
+
* Prevents exception when clicking on a content-less SC.CollectionView.
|
50
|
+
* Improves SC.SelectView handling of separator items.
|
51
|
+
- Previously, if a separator item didn't include a title, it would throw an
|
52
|
+
exception in String loc().
|
53
|
+
- Added a small improvement to the SelectView performance since separator
|
54
|
+
items can't be selected so we don't need to check them.
|
55
|
+
- Added unit test showing that the first selectable item becomes the default
|
56
|
+
value when no value is set. This prevents disabled items or separators from
|
57
|
+
being default.
|
58
|
+
* Adds binding between a tree controller and it's tree item observer to keep
|
59
|
+
the selection options between the two in sync ('allowsSelection',
|
60
|
+
'allowsMultipleSelection', 'allowsEmptySelection').
|
61
|
+
* Adds 'interpretKeyEvents' support to SC.TextFieldView allowing you to implement
|
62
|
+
special handling of many common keys. For example, it is now easy to submit
|
63
|
+
the value of a field or fields when the 'Return' key is pressed by adding
|
64
|
+
an insertNewline() method to the text field view. Other interpreted keys are:
|
65
|
+
escape, delete, backspace, tab, left arrow, right arrow, up arrow, down arrow,
|
66
|
+
home, end, page up and page down.
|
67
|
+
* Moves key_bindings to core_foundation so it can be with views/view/keyboard
|
68
|
+
(the only file that uses it).
|
69
|
+
* Refactors createNestedRecord for child records without primary keys:
|
70
|
+
- The previous version had some broken code, such as checking for the
|
71
|
+
existence of id, although it is not set anywhere previously or passed to the
|
72
|
+
function and creating an existingId variable for no purpose. It also wrapped
|
73
|
+
most of the function in a run loop, but this is not necessary.
|
74
|
+
- The previous version would create a new record even if the child record has
|
75
|
+
no primary key, which would auto-generate a new primary key and thus a new
|
76
|
+
store key each time that same child record needed to be re-accessed. It also
|
77
|
+
did extra work fixing up the store by having to manipulate the id after creation.
|
78
|
+
- This version generates a re-usable id upfront for child records that don't
|
79
|
+
have a primary key value. This means that the id is unique to that child
|
80
|
+
record and if the child record is unloaded and reloaded, even though it
|
81
|
+
doesn't have a primary key, it will still get the same generated id and thus,
|
82
|
+
get the same store key in the store, preventing the store from creating new
|
83
|
+
objects and leaking the caches on the old child record.
|
84
|
+
* Changes SC.ArrayController orderBy syntax to 'key ASC' or 'key DESC', not
|
85
|
+
'ASC key' or 'DESC key'.
|
86
|
+
- SC.Query's and MySQL's ordering syntax are both 'key DIR' and so
|
87
|
+
SC.ArrayController's syntax should be the same.
|
88
|
+
* Adds functionality to SC.routes to pull the parameters out of the location
|
89
|
+
when it is URL encoded. For example, 'videos/5?format=h264&size=small&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DG0k3kHtyoqc%26feature%3Dg-logo%26context%3DG21d2678FOAAAAAAABAA' now properly has url: 'http://www.youtube.com/watch?v=G0k3kHtyoqc&feature=g-logo&context=G21d2678FOAAAAAAABAA'
|
90
|
+
in the params object.
|
91
|
+
* Adds observer support of firstObject and lastObject on Enumerables.
|
92
|
+
Note: Any Object that mixes in SC.Enumerable must pass the start and length
|
93
|
+
arguments to enumerableContentDidChange() for firstObject and lastObject to
|
94
|
+
be independently observable.
|
95
|
+
* Fixes SC.ArrayController so that when orderBy changes, the firstObject and
|
96
|
+
lastObject properties are invalidated and thus recomputed if needed.
|
97
|
+
* Refactors SC.GridView so that the adjustment of item views only updates when
|
98
|
+
the frame changes. It is also has much better performance by only changing on
|
99
|
+
a width change, since items are positioned left to right and only changing
|
100
|
+
the items currently visible.
|
101
|
+
- This also makes SC.GridView work with sparse data, where it would previously
|
102
|
+
have requested the entire array of data each time the clipping frame changed (happens on scroll in SC.ScrollView).
|
103
|
+
- This fixes a problem rotating grid views on an iPad.
|
104
|
+
* Improves SC.DROP_ON support for SC.ListView and SC.GridView. These views now
|
105
|
+
update the target item's isDropTarget property to reflect that it is the
|
106
|
+
target of a drag and drop operation, which allows us to style the drop target
|
107
|
+
item appropriately.
|
108
|
+
- Previously the support was commented out in SC.GridView and was incorrectly
|
109
|
+
implemented in SC.ListView (it wiped out the isSelected value on the target items).
|
110
|
+
* Prevents exception on SC.CollectionFastPath when calling itemViewForContentIndex()
|
111
|
+
before the view was visible.
|
112
|
+
* Enhances SC.SegmentedView to support vertical layout and adds a vertical layout theme.
|
113
|
+
* Makes SC.DisclosureView default CSS more directly targeted to that type of
|
114
|
+
button only.
|
115
|
+
* Removes internal _observers, _bindings and _properties arrays from SC.Object
|
116
|
+
classes after they are created. This was a waste of memory.
|
117
|
+
* Reduces the default touchBoundary on touch controls from 50px outside, which
|
118
|
+
is really big, to 25px outside.
|
119
|
+
* Makes iframes scrollable in iOS by default.
|
120
|
+
* Fixes the default value of SC.MenuPane's itemSeparatorKey to be 'isSeparator'
|
121
|
+
as indicated in the documentation.
|
122
|
+
* SC.LabelView with a value of null or undefined will render an empty string "",
|
123
|
+
not "null" or "undefined".
|
124
|
+
* Adds a warning in debug mode when duplicate bindings for the same key are
|
125
|
+
detected. This warning detects when a binding is being created more than once
|
126
|
+
for the same property.
|
127
|
+
- For example, if you define 'smallBinding' inside 'MyApp.ParentClass = SC.View.extend({ smallBinding: … ' and then extend MyApp.ParentClass further like so 'childView1: MyApp.ParentClass.extend({ smallBinding: … ', then childView1 would have the same binding to small appearing twice in its bindings Array. This can lead to strange behavior when you try connect and disconnect the bindings on the fly.
|
128
|
+
* Adds support to SC.MenuPane for pgUp/pgDown/home/end to navigate the menu.
|
129
|
+
* Improves SC.ModalPane's automatic disabling of covered SC.TextFieldViews.
|
130
|
+
SC.ModalPane will disable tabbing into any fields not in the current pane, so
|
131
|
+
that tabbing won't jump "behind" the modal pane. However, if the text field
|
132
|
+
had isBrowserFocusable set to NO, SC.ModalPane would unintentionally set it to
|
133
|
+
YES when it was done. This is no longer the case and SC.ModalPane will respect
|
134
|
+
the previous value of isBrowserFocusable on each text field.
|
135
|
+
* SC.View:animate() no longer fires multiple callbacks when animating more than
|
136
|
+
one property at the same time.
|
137
|
+
* Adds support for SC.Object:invokeOnceLater() so that additional arguments that
|
138
|
+
are given are passed to the target method.
|
16
139
|
|
17
140
|
### DEPRECATIONS & REMOVALS
|
18
141
|
|
142
|
+
* The default value of SC.Menu:itemSeparatorKey has been changed from 'separator'
|
143
|
+
to 'isSeparator' to match the documentation. If a property 'separator' is found
|
144
|
+
on the menu item, it will still be used and a developer warning will appear in
|
145
|
+
debug mode.
|
146
|
+
* SC.ArrayController's orderBy direction syntax has been changed to match that
|
147
|
+
of SC.Query and MySQL. Using the previous syntax will result in a developer
|
148
|
+
warning in debug mode.
|
149
|
+
* Removes the TestControls app from SproutCore. This app was not well-maintained
|
150
|
+
and has been replaced by the Showcase app used on http://showcase.sproutcore.com.
|
151
|
+
|
19
152
|
### BUG FIXES
|
20
153
|
|
154
|
+
* Fixes touchIsInBoundary function of SC.View to account for the fact that the
|
155
|
+
screen coordinates of the view can change without its frame or parentView changing.
|
156
|
+
* Fixes critical bug in SC.View:animate() where animating a layout property and then
|
157
|
+
later animating a different layout property on the same view would throw an
|
158
|
+
exception.
|
159
|
+
* Fixes edge cases of SC.View:animate() so that callbacks are still fired if
|
160
|
+
animating to the current value or animating with a duration of zero.
|
161
|
+
* Fixes missing computed properties, bindings and observers when reopening a
|
162
|
+
class. When re-opening a class we have to also re-configure all current
|
163
|
+
subclasses of that class. If we don't, then any computed properties, bindings
|
164
|
+
or observers added in the reopen() won't be registered in instances of the
|
165
|
+
subclass.
|
166
|
+
- Makes the call to reopen() recurse through all the current class's subclasses
|
167
|
+
in order to re-extend them. If the hash given to reopen() contains computed
|
168
|
+
properties, bindings or observers, these will be registered for the subclass.
|
169
|
+
- Takes care not to override properties that the subclass may have defined
|
170
|
+
prior to the reopen().
|
171
|
+
* Fixes SC.Object.prototype.mixin so that the mixed in objects' observables are initialized.
|
172
|
+
* Prevents multiple change notifications firing with changes to SC.Array and SC.SparseArray.
|
173
|
+
* Fixes SC.ArrayController's orderBy to work with more than a single Array item.
|
174
|
+
Ex. testController.set('orderBy', ['lastName', 'firstName']) would not have ordered by firstName second.
|
175
|
+
* Fixes SC.UserDefaults readDefault for Firefox 13 to return a default value.
|
176
|
+
* Fixes memory leak in the store when removing or replacing child records.
|
177
|
+
- The first time that you access a child record, the store updates four caches:
|
178
|
+
parentRecords (parentStoreKeys => [childStoreKeys]), childRecords (childStoreKeys => parentStoreKeys), records (SC.Record instances), dataHashes (SC.record backing attributes).
|
179
|
+
- Previously, if you set the child record to null or unloaded and reloaded the
|
180
|
+
parent record or set the child record to a new child record and the child
|
181
|
+
record doesn't have a primary key, the store would create duplicates on all
|
182
|
+
these hashes, resulting in a memory leak.
|
183
|
+
- Now each time that you set the value of the child record on the parent, it
|
184
|
+
clears the old child record caches in the store.
|
185
|
+
- See previous tests to prove the memory leak, by modifying the child record
|
186
|
+
and checking the number of properties in the store's caches.
|
187
|
+
* Removes SC.SegmentedView's observers from items when they are removed from
|
188
|
+
the view. This prevents a case where a removed item calls itemContentDidChange
|
189
|
+
and puts itself back in a segment.
|
190
|
+
* Fixes customized classNameBindings. (ex. classNameBindings: ['isWorking:wkg'])
|
191
|
+
* Fixes memory leak with SC.TextFieldView accessory views and with typing large
|
192
|
+
amounts of text.
|
193
|
+
* Fixes addition of has-icon class to list items that don't actually have an
|
194
|
+
icon defined.
|
195
|
+
- There are situations where a ListItem will have `hasContentIcon` set to true,
|
196
|
+
but will not have an icon defined. It's more proper to not add the has-icon
|
197
|
+
class, which makes space for an icon, if there is no icon.
|
198
|
+
* Fixes gray background appearing on first and last segments and white background
|
199
|
+
appearing on first and last disabled segmentes of SC.SegmentedView.
|
200
|
+
* Fixes mouse move, enter, exiting on SC.SegmentedView when a segment is disabled.
|
201
|
+
- previously, the disabled segment still received the active class when the
|
202
|
+
mouse moved into it or over it
|
203
|
+
- added unit tests to show that the active class is properly applied
|
204
|
+
* Fixes the application of defaultValues to the data hash in createRecord and
|
205
|
+
also allows the provided hash to use the attribute name OR the attribute key
|
206
|
+
when there is a key.
|
207
|
+
- The previous implementation would assign 'null' data hash properties for
|
208
|
+
every property in the record, now the data hash only includes attributes.
|
209
|
+
- The default value would be applied to the attribute name in the data hash,
|
210
|
+
which didn't work if the attribute used a key.
|
211
|
+
- Previously, if a record attribute had a key, then accidentally passing the
|
212
|
+
attribute name instead of the attribute key would fail to work correctly.
|
213
|
+
Now it will accept the name and/or the key and only store the key in the
|
214
|
+
data hash.
|
215
|
+
* Fixes the default styling for SC.TextFielView on IE, Opera and Mobile Safari.
|
216
|
+
* Fixes the styling for icons on SC.LabelView.
|
217
|
+
- the previous style caused the entire label to be position relative with
|
218
|
+
middle vertical-align when an icon was included. Those styles should only
|
219
|
+
apply to the img.
|
220
|
+
* Fixes theming of SC.SegmentedView.
|
221
|
+
- fixed the disabled style wasn't being applied to the view or its segments
|
222
|
+
- changed font size of regular size view from 11px to 12px which matches the
|
223
|
+
font size of regular size button
|
224
|
+
- fixed the img positioning to be properly centred for the different size controls
|
225
|
+
* Fixes Jumbo control size style on SC.ButtonView to allow for 24px high icons.
|
226
|
+
* Fixes setting content of SC.StaticContentView to null, so that it removes
|
227
|
+
the previous content.
|
228
|
+
* Fixes default CSS on SC.ListItemView img.right-icon
|
229
|
+
* Fixes default vertical icon position for SC.SMALL_CONTROL_SIZE checkbox.
|
230
|
+
* Converts background-position CSS which is not yet supported by FireFox to CSS
|
231
|
+
which is currently supported by FireFox.
|
232
|
+
* Fixes regression with SC.offset and Mobile Safari targeted code.
|
21
233
|
|
22
|
-
|
234
|
+
|
235
|
+
1.8.2 - BUG FIX RELEASE
|
23
236
|
----------
|
24
237
|
|
25
|
-
*
|
26
|
-
|
27
|
-
*
|
28
|
-
|
29
|
-
* Changed the aria-orientation of horizontal SC.ScrollView to 'horizontal' from
|
30
|
-
|
31
|
-
*
|
32
|
-
|
33
|
-
*
|
34
|
-
|
35
|
-
|
36
|
-
|
238
|
+
* Thinned picker pane border divs so that they don't overlap the content view.
|
239
|
+
[0b06db2]
|
240
|
+
* Prevents target property conflict when configuring button targets with
|
241
|
+
SC.AlertPane. [0364b5c]
|
242
|
+
* Changed the aria-orientation of horizontal SC.ScrollView to 'horizontal' from
|
243
|
+
'vertical'. [c3ee69b]
|
244
|
+
* Allows SC.CollectionFastPath to work with sparse content by always returning
|
245
|
+
an item view even when content isn't yet available. [020653b]
|
246
|
+
* Prevents SC.GridView from iterating over its content array in order to work
|
247
|
+
with sparse content. [020653b]
|
248
|
+
* The 'mobile-safari' body class name is no longer being added in all browsers.
|
249
|
+
[b491224]
|
250
|
+
* Enables pasting in SC.TextFieldView to notify that the value changed.
|
251
|
+
[a51318b]
|
252
|
+
* Prevents default touch behavior being intercepted on <textarea> and <select>
|
253
|
+
elements in mobile Safari. [8093963]
|
254
|
+
|
255
|
+
1.8.1 - BUG FIX RELEASE
|
37
256
|
----------
|
38
257
|
|
39
258
|
* Documentation fixes.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# ==========================================================================
|
2
|
+
# Project: MediaExamples - A Media Playback Sandbox.
|
3
|
+
# Copyright: ©2012 Michael Krotscheck and contributors.
|
4
|
+
# License: Licensed under MIT license (see license.js)
|
5
|
+
# ==========================================================================
|
6
|
+
|
7
|
+
# This is your Buildfile for your app, Test. This tells SproutCore
|
8
|
+
# how to build your app. These settings override those in your project
|
9
|
+
# Buildfile, which contains default settings for all apps in your project.
|
10
|
+
|
11
|
+
# It is better to add :required targets here than in the global Buildfile.
|
12
|
+
config :media_examples, :required => [ :sproutcore, :media ]
|
13
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: Media Examples - A Media Playback sandbox.
|
3
|
+
// Copyright: ©2012 Michael Krotscheck and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals MediaExamples */
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @namespace
|
10
|
+
*
|
11
|
+
* A small demonstration app that shows different ways of consuming media. Also
|
12
|
+
* a convenient testbed for those of us who are working on improving the media
|
13
|
+
* framework.
|
14
|
+
*
|
15
|
+
* @extends SC.Object
|
16
|
+
* @author Michael Krotscheck
|
17
|
+
*/
|
18
|
+
MediaExamples = SC.Application.create(
|
19
|
+
/** @scope MediaExamples.prototype */
|
20
|
+
{
|
21
|
+
|
22
|
+
NAMESPACE: 'MediaExamples',
|
23
|
+
VERSION: '0.1.0',
|
24
|
+
|
25
|
+
init: function() {
|
26
|
+
sc_super();
|
27
|
+
SC.ready(function() {
|
28
|
+
MediaExamples.main();
|
29
|
+
});
|
30
|
+
},
|
31
|
+
|
32
|
+
main: function() {
|
33
|
+
this.getPath('mainPage.mainPane').append();
|
34
|
+
}
|
35
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: Media Examples - A Media Playback sandbox.
|
3
|
+
// Copyright: ©2012 Michael Krotscheck and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals MediaExamples */
|
7
|
+
|
8
|
+
MediaExamples.mainPage = SC.Page.design({
|
9
|
+
|
10
|
+
mainPane: SC.MainPane.design({
|
11
|
+
childViews: 'workspaceView'.w(),
|
12
|
+
|
13
|
+
workspaceView: SC.WorkspaceView.design({
|
14
|
+
topToolbar: SC.ToolbarView.extend({
|
15
|
+
childViews: ['mediaToggle'],
|
16
|
+
|
17
|
+
mediaToggle: SC.SegmentedView.design({
|
18
|
+
layout: {
|
19
|
+
height: 28,
|
20
|
+
left: 20,
|
21
|
+
centerY: 0
|
22
|
+
},
|
23
|
+
align: SC.ALIGN_LEFT,
|
24
|
+
controlSize: SC.LARGE_CONTROL_SIZE,
|
25
|
+
items: [SC.Object.create({
|
26
|
+
title: "Audio Playback",
|
27
|
+
value: "MediaExamples.AudioView",
|
28
|
+
isEnabled: SC.mediaCapabilities.get('hasAudioPlayback')
|
29
|
+
}), SC.Object.create({
|
30
|
+
title: "Video Playback",
|
31
|
+
value: "MediaExamples.VideoView",
|
32
|
+
isEnabled: SC.mediaCapabilities.get('hasVideoPlayback')
|
33
|
+
}), SC.Object.create({
|
34
|
+
title: "Video Recording",
|
35
|
+
value: "MediaExamples.CameraView",
|
36
|
+
isEnabled: SC.mediaCapabilities.get('hasVideoCamera')
|
37
|
+
}), SC.Object.create({
|
38
|
+
title: "Microphone Recording",
|
39
|
+
value: "MediaExamples.MicrophoneView",
|
40
|
+
isEnabled: SC.mediaCapabilities.get('hasMicrophone')
|
41
|
+
})],
|
42
|
+
itemTitleKey: "title",
|
43
|
+
itemValueKey: "value",
|
44
|
+
itemIsEnabledKey: 'isEnabled',
|
45
|
+
value: "MediaExamples.AudioView"
|
46
|
+
})
|
47
|
+
}),
|
48
|
+
contentView: SC.ContainerView.extend({
|
49
|
+
nowShowingBinding: SC.Binding.oneWay(".parentView.topToolbar.mediaToggle.value")
|
50
|
+
})
|
51
|
+
})
|
52
|
+
})
|
53
|
+
});
|
@@ -0,0 +1,100 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: Media Examples - A Media Playback sandbox.
|
3
|
+
// Copyright: ©2012 Michael Krotscheck and contributors.
|
4
|
+
// License: Licensed under MIT license (see license.js)
|
5
|
+
// ==========================================================================
|
6
|
+
/*globals MediaExamples */
|
7
|
+
|
8
|
+
sc_require('views/capabilities_view');
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @class
|
12
|
+
*
|
13
|
+
* (Document Your View Here)
|
14
|
+
*
|
15
|
+
* @extends SC.View
|
16
|
+
*/
|
17
|
+
MediaExamples.AudioView = SC.View.extend(
|
18
|
+
/** @scope MediaExamples.AudioView.prototype */
|
19
|
+
{
|
20
|
+
childViews: ['infoBox', 'mediaControlsContainer'],
|
21
|
+
|
22
|
+
infoBox: MediaExamples.CapabilitiesView.extend({
|
23
|
+
layout: {
|
24
|
+
right: 10,
|
25
|
+
top: 10,
|
26
|
+
height: 200,
|
27
|
+
width: 150
|
28
|
+
}
|
29
|
+
}),
|
30
|
+
|
31
|
+
mediaControlsContainer: SC.View.extend(SC.FlowedLayout, {
|
32
|
+
|
33
|
+
defaultFlowSpacing: {
|
34
|
+
bottom: 10
|
35
|
+
},
|
36
|
+
|
37
|
+
layout: {
|
38
|
+
left: 10,
|
39
|
+
top: 10,
|
40
|
+
right: 320,
|
41
|
+
bottom: 10,
|
42
|
+
},
|
43
|
+
|
44
|
+
layoutDirection: SC.LAYOUT_VERTICAL,
|
45
|
+
|
46
|
+
fillWidth: YES,
|
47
|
+
|
48
|
+
childViews: ['audioPlayer', 'mediaControlsLabel', 'mediaControls', 'miniControlsLabel', 'miniControls', 'simpleControlsLabel', 'simpleControls'],
|
49
|
+
|
50
|
+
audioPlayer: SC.AudioView.extend({
|
51
|
+
value: 'http://www.hyperion-records.co.uk/audiotest/8bec43dfc57e3cd7/1%20Sullivan%20The%20Lost%20Chord,%20Seated%20one%20day%20at%20the%20organ.MP3',
|
52
|
+
layout: {
|
53
|
+
height: 0,
|
54
|
+
},
|
55
|
+
}),
|
56
|
+
|
57
|
+
mediaControlsLabel: SC.LabelView.extend({
|
58
|
+
value: "SC.MediaControlsView",
|
59
|
+
layout: {
|
60
|
+
height: 22
|
61
|
+
}
|
62
|
+
}),
|
63
|
+
|
64
|
+
mediaControls: SC.MediaControlsView.extend({
|
65
|
+
targetBinding: SC.Binding.oneWay('.parentView.audioPlayer'),
|
66
|
+
layout: {
|
67
|
+
height: 20,
|
68
|
+
},
|
69
|
+
}),
|
70
|
+
|
71
|
+
miniControlsLabel: SC.LabelView.extend({
|
72
|
+
value: "SC.MiniMediaControlsView",
|
73
|
+
layout: {
|
74
|
+
height: 22
|
75
|
+
}
|
76
|
+
}),
|
77
|
+
|
78
|
+
miniControls: SC.MiniMediaControlsView.extend({
|
79
|
+
targetBinding: SC.Binding.oneWay('.parentView.audioPlayer'),
|
80
|
+
layout: {
|
81
|
+
height: 20,
|
82
|
+
},
|
83
|
+
}),
|
84
|
+
|
85
|
+
simpleControlsLabel: SC.LabelView.extend({
|
86
|
+
value: "SC.SimpleMediaControlsView",
|
87
|
+
layout: {
|
88
|
+
height: 22
|
89
|
+
}
|
90
|
+
}),
|
91
|
+
|
92
|
+
simpleControls: SC.SimpleMediaControlsView.extend({
|
93
|
+
targetBinding: SC.Binding.oneWay('.parentView.audioPlayer'),
|
94
|
+
layout: {
|
95
|
+
height: 20,
|
96
|
+
},
|
97
|
+
}),
|
98
|
+
})
|
99
|
+
|
100
|
+
});
|