sproutcore 1.0.1049.pre.2 → 1.4.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +4 -4
- data/lib/Buildfile +1 -1
- data/lib/frameworks/sproutcore/Buildfile +13 -27
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/library.js +0 -42
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/view_configs.js +100 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/dialogs.js +33 -9
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +5 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +1 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +21 -11
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +0 -7
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +6 -24
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +46 -36
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -50
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +2 -7
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +66 -42
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +4 -12
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{desktop/tests → datastore/tests/models}/datetime_recordattribute.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +3 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/touch-scroller.css +196 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +21 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +15 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +22 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +54 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +45 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +52 -32
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +3 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +10 -30
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +17 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +20 -128
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +39 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +47 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +90 -59
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +39 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +15 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +16 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +278 -457
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +101 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +87 -85
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +278 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +146 -60
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +80 -211
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +10 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +34 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +248 -331
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +12 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/object.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +2 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/ext/run_loop.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +6 -12
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +9 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +1 -83
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +7 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/panes/main.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/panes/pane.js +107 -143
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +8 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/event.js +44 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/image_cache.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/system/platform.js +114 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +37 -38
- data/lib/frameworks/sproutcore/frameworks/foundation/system/render_context.js +5 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +17 -19
- data/lib/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +311 -255
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +53 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/keyEquivalents.js +17 -16
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/end.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_style.js +3 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/update.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invokeLater.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendEvent.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/createLayer.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +56 -118
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/prepareContext.js +4 -12
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/render.js +5 -48
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayer.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayerLocation.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/viewDidResize.js +2 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +49 -21
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +85 -54
- data/lib/frameworks/sproutcore/frameworks/foundation/views/view.js +256 -1174
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +81 -74
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/miniControls.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/mobile/tests/views/button/ui.js +1 -8
- data/lib/frameworks/sproutcore/frameworks/mobile/views/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +54 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +1 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +8 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +24 -25
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +9 -6
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +13 -6
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +26 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +140 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +33 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/base.js +48 -1
- data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +1 -1
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/scroller.css +8 -4
- data/lib/sproutcore/helpers/entry_sorter.rb +14 -1
- data/sproutcore.gemspec +0 -2
- metadata +12 -443
- data/lib/frameworks/sproutcore/Gemfile +0 -8
- data/lib/frameworks/sproutcore/Gemfile.lock +0 -33
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +0 -108
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +0 -31
- 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 -124
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +0 -45
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +0 -77
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +0 -40
- data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +0 -9
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +0 -54
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +0 -136
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +0 -42
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +0 -41
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +0 -76
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +0 -75
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +0 -60
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +0 -53
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +0 -50
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +0 -15
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +0 -40
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/bin/edit_json.rb +0 -14
- data/lib/frameworks/sproutcore/bin/erubis +0 -14
- data/lib/frameworks/sproutcore/bin/prettify_json.rb +0 -14
- data/lib/frameworks/sproutcore/bin/rackup +0 -14
- data/lib/frameworks/sproutcore/bin/rake2thor +0 -14
- data/lib/frameworks/sproutcore/bin/sc-build +0 -14
- data/lib/frameworks/sproutcore/bin/sc-build-number +0 -14
- data/lib/frameworks/sproutcore/bin/sc-docs +0 -14
- data/lib/frameworks/sproutcore/bin/sc-gen +0 -14
- data/lib/frameworks/sproutcore/bin/sc-init +0 -14
- data/lib/frameworks/sproutcore/bin/sc-manifest +0 -14
- data/lib/frameworks/sproutcore/bin/sc-server +0 -14
- data/lib/frameworks/sproutcore/bin/sproutcore +0 -14
- data/lib/frameworks/sproutcore/bin/thin +0 -14
- data/lib/frameworks/sproutcore/bin/thor +0 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +0 -130
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/button.js +0 -147
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/checkbox.js +0 -87
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/checkbox_control.js +0 -103
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/disclosure.js +0 -82
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/disclosure_control.js +0 -103
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/image_button.js +0 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/list_item.js +0 -334
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/masterDetail.js +0 -23
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/panel.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/picker.js +0 -50
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/segment.js +0 -79
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/segmented.js +0 -172
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/slider.js +0 -86
- data/lib/frameworks/sproutcore/frameworks/desktop/renderers/workspace.js +0 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +0 -112
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +0 -249
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +0 -237
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +0 -181
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +0 -270
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +0 -5
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/auto_hide.js +0 -85
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +0 -43
- data/lib/frameworks/sproutcore/frameworks/forms/renderers/form.js +0 -24
- data/lib/frameworks/sproutcore/frameworks/forms/renderers/form_row.js +0 -24
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +0 -266
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +0 -188
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +0 -81
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +0 -142
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +0 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +0 -74
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +0 -415
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +0 -106
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/control.js +0 -122
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/image.js +0 -51
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/label.js +0 -96
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/renderer.js +0 -316
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/title.js +0 -108
- data/lib/frameworks/sproutcore/frameworks/foundation/renderers/view.js +0 -62
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +0 -245
- data/lib/frameworks/sproutcore/frameworks/foundation/system/theme.js +0 -108
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/renderers/renderer/base.js +0 -170
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/renderers/renderer/inheritance.js +0 -39
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/theme.js +0 -86
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendTouchEvent.js +0 -267
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/animation.js +0 -321
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/build.js +0 -85
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/build_children.js +0 -89
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/renderer.js +0 -443
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/view/theme.js +0 -41
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -6240
- data/lib/frameworks/sproutcore/frameworks/test +0 -77
- data/lib/frameworks/sproutcore/themes/ace/Buildfile +0 -0
- data/lib/frameworks/sproutcore/themes/ace/README.md +0 -161
- data/lib/frameworks/sproutcore/themes/ace/build +0 -2
- data/lib/frameworks/sproutcore/themes/ace/build-d +0 -2
- data/lib/frameworks/sproutcore/themes/ace/chance/README.md +0 -113
- data/lib/frameworks/sproutcore/themes/ace/chance/chance.rb +0 -203
- data/lib/frameworks/sproutcore/themes/ace/chance/lib/css.rb +0 -202
- data/lib/frameworks/sproutcore/themes/ace/chance/lib/slicedice.rb +0 -391
- data/lib/frameworks/sproutcore/themes/ace/chance/sc-theme.rb +0 -0
- data/lib/frameworks/sproutcore/themes/ace/chance/scripts/setup.rb +0 -126
- data/lib/frameworks/sproutcore/themes/ace/mockups/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/mockups/dark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/mockups/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/mockups/light.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/images/1.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/images/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/images/3.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/theme.css +0 -1832
- data/lib/frameworks/sproutcore/themes/ace/scroll_test/resources/images/1.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/scroll_test/resources/images/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/scroll_test/resources/images/3.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/scroll_test/resources/theme.css +0 -147
- data/lib/frameworks/sproutcore/themes/ace/scroll_test/scrollbars.html +0 -326
- data/lib/frameworks/sproutcore/themes/ace/src/body.css +0 -13
- data/lib/frameworks/sproutcore/themes/ace/src/collections/list.css +0 -4
- data/lib/frameworks/sproutcore/themes/ace/src/collections/list_item.css +0 -7
- data/lib/frameworks/sproutcore/themes/ace/src/collections/source_list/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/collections/source_list/selection.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/collections/source_list/source_list_view.css +0 -37
- data/lib/frameworks/sproutcore/themes/ace/src/containers/container.css +0 -3
- data/lib/frameworks/sproutcore/themes/ace/src/containers/masterdetail/master-detail.css +0 -26
- data/lib/frameworks/sproutcore/themes/ace/src/containers/split/split.css +0 -4
- data/lib/frameworks/sproutcore/themes/ace/src/containers/tab/tab.css +0 -9
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button.js +0 -23
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/button_view.css +0 -53
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/18px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/button_view.css +0 -144
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/button_view_30.css +0 -111
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/button_view.css +0 -57
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/44px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/button_view/button_view.css +0 -56
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_closed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_open_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/buttons/disclosure_view/disclosure_view.css +0 -64
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox.css +0 -25
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/14px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox.css +0 -25
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/16px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/checkbox.css +0 -4
- data/lib/frameworks/sproutcore/themes/ace/src/controls/checkboxes/checkbox_control.css +0 -31
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view.css +0 -70
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_indeterminate_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/progress/progress_view/progress_view_track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio.css +0 -61
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_unselected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/radio/radio_unselected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/horizontal.css +0 -77
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/horizontal/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/scroll/vertical/vertical.css +0 -74
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented.css +0 -92
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/18px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented.css +0 -87
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/24px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented.css +0 -93
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/30px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented.css +0 -101
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/44px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/segmented.css +0 -73
- data/lib/frameworks/sproutcore/themes/ace/src/controls/segmented/segmented.js +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/active_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/active_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/normal_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/normal_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/select/select.css +0 -45
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/14px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/14px/slider.css +0 -43
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/16px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/16px/slider.css +0 -44
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/slider.css +0 -44
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/22px/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/slider.css +0 -3
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/slider.js +0 -27
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/slider/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_handle.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_off.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/controls/switch/24px/switch_on.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/core/loading.css +0 -50
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/button_view.css +0 -142
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/button_view_30.css +0 -111
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/button.css +0 -20
- data/lib/frameworks/sproutcore/themes/ace/src/dark/buttons/button.js +0 -3
- data/lib/frameworks/sproutcore/themes/ace/src/form/iphone/form.js +0 -21
- data/lib/frameworks/sproutcore/themes/ace/src/form/iphone/form_row.js +0 -24
- data/lib/frameworks/sproutcore/themes/ace/src/form/iphone/iphone.css +0 -51
- data/lib/frameworks/sproutcore/themes/ace/src/form/iphone/iphone.js +0 -14
- data/lib/frameworks/sproutcore/themes/ace/src/form/iphone/label.js +0 -32
- data/lib/frameworks/sproutcore/themes/ace/src/panels/pane.css +0 -3
- data/lib/frameworks/sproutcore/themes/ace/src/panels/panel.css +0 -70
- data/lib/frameworks/sproutcore/themes/ace/src/panels/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/panel.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/checkmark_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/down.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/down.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.css +0 -154
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu_item.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/menu_item.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/up.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/menu/up.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/picker.css +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/picker.js +0 -1
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/picker.js +0 -14
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.css +0 -271
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.js +0 -5
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_empty.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_empty.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/popover_sourcelist.css +0 -5
- data/lib/frameworks/sproutcore/themes/ace/src/panels/picker/popover/workspace.js +0 -51
- data/lib/frameworks/sproutcore/themes/ace/src/theme.js +0 -12
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/normal/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.css +0 -8
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/normal/toolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/panel_header/panel_header.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/src/toolbars/panel_header/panel_header.psd +0 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +0 -16
@@ -102,9 +102,9 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
|
|
102
102
|
},
|
103
103
|
|
104
104
|
_field_fieldValueDidChange: function(evt) {
|
105
|
-
SC.
|
106
|
-
|
107
|
-
|
105
|
+
SC.run(function() {
|
106
|
+
this.fieldValueDidChange(NO);
|
107
|
+
}, this);
|
108
108
|
},
|
109
109
|
|
110
110
|
/**
|
@@ -8,6 +8,10 @@
|
|
8
8
|
sc_require('views/view') ;
|
9
9
|
sc_require('mixins/control') ;
|
10
10
|
|
11
|
+
SC.ALIGN_LEFT = 'left';
|
12
|
+
SC.ALIGN_RIGHT = 'right';
|
13
|
+
SC.ALIGN_CENTER = 'center';
|
14
|
+
|
11
15
|
SC.REGULAR_WEIGHT = 'normal';
|
12
16
|
SC.BOLD_WEIGHT = 'bold';
|
13
17
|
|
@@ -242,13 +246,6 @@ SC.LabelView = SC.View.extend(SC.Control,
|
|
242
246
|
return SC.InlineTextFieldView.commitEditing() ;
|
243
247
|
},
|
244
248
|
|
245
|
-
/** @private
|
246
|
-
Allow editing.
|
247
|
-
*/
|
248
|
-
inlineEditorShouldBeginEditing: function(inlineEditor) {
|
249
|
-
return YES ;
|
250
|
-
},
|
251
|
-
|
252
249
|
/** @private
|
253
250
|
Set editing to true so edits will no longer be allowed.
|
254
251
|
*/
|
@@ -293,19 +290,50 @@ SC.LabelView = SC.View.extend(SC.Control,
|
|
293
290
|
|
294
291
|
_TEMPORARY_CLASS_HASH: {},
|
295
292
|
|
296
|
-
|
297
|
-
|
298
|
-
|
293
|
+
render: function(context, firstTime) {
|
294
|
+
var value = this.get('displayValue'),
|
295
|
+
icon = this.get('icon'),
|
296
|
+
hint = this.get('hintValue'),
|
297
|
+
classes, stylesHash, text,
|
298
|
+
iconChanged = false, textChanged = false;
|
299
|
+
|
300
|
+
if (icon) {
|
301
|
+
var url = (icon.indexOf('/')>=0) ? icon : SC.BLANK_IMAGE_URL,
|
302
|
+
className = (url === icon) ? '' : icon ;
|
303
|
+
icon = '<img src="'+url+'" alt="" class="icon '+className+'" />';
|
304
|
+
if(icon!==this._iconCache) {
|
305
|
+
this._iconCache=icon;
|
306
|
+
iconChanged = true;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
if (hint && (!value || value === '')) {
|
311
|
+
text = '<span class="sc-hint">'+hint+'</span>';
|
312
|
+
}else{
|
313
|
+
text = value;
|
314
|
+
}
|
315
|
+
if(text!==this._textCache) {
|
316
|
+
this._textCache=text;
|
317
|
+
textChanged = true;
|
318
|
+
}
|
319
|
+
|
320
|
+
if(firstTime || textChanged || iconChanged){
|
321
|
+
context.push(icon, text);
|
322
|
+
}
|
323
|
+
|
324
|
+
// and setup alignment and font-weight on styles
|
325
|
+
stylesHash = {
|
326
|
+
'text-align': this.get('textAlign'),
|
327
|
+
'font-weight': this.get('fontWeight')
|
328
|
+
};
|
329
|
+
|
330
|
+
// if we are editing, set the opacity to 0
|
331
|
+
if (this.get('isEditing')) stylesHash['opacity']=0;
|
332
|
+
context.addStyle(stylesHash);
|
333
|
+
|
334
|
+
classes = this._TEMPORARY_CLASS_HASH;
|
335
|
+
classes.icon = !!this.get('icon');
|
336
|
+
context.setClass(classes);
|
337
|
+
}
|
299
338
|
|
300
|
-
updateRenderer: function(r) {
|
301
|
-
r.attr({
|
302
|
-
"value": this.get("displayValue"),
|
303
|
-
"icon": this.get("icon"),
|
304
|
-
"hint": this.get("hint"),
|
305
|
-
"escapeHTML": this.get("escapeHTML"),
|
306
|
-
"isEditing": this.get("isEditing"),
|
307
|
-
"textAlign": this.get("textAlign"),
|
308
|
-
"fontWeight": this.get("fontWeight")
|
309
|
-
});
|
310
|
-
}
|
311
339
|
});
|
@@ -8,6 +8,7 @@
|
|
8
8
|
sc_require('views/field') ;
|
9
9
|
sc_require('system/text_selection') ;
|
10
10
|
sc_require('mixins/static_layout') ;
|
11
|
+
sc_require('mixins/editable');
|
11
12
|
|
12
13
|
/**
|
13
14
|
@class
|
@@ -24,6 +25,7 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
24
25
|
|
25
26
|
tagName: 'label',
|
26
27
|
classNames: ['sc-text-field-view'],
|
28
|
+
isTextField: YES,
|
27
29
|
|
28
30
|
// ..........................................................
|
29
31
|
// PROPERTIES
|
@@ -66,21 +68,6 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
66
68
|
*/
|
67
69
|
isContextMenuEnabled: YES,
|
68
70
|
|
69
|
-
/**
|
70
|
-
If true, every change to the text in the text field updates 'value'.
|
71
|
-
If false, 'value' is only updated when commitEditing() is called (this
|
72
|
-
is called automatically when the text field loses focus), or whenever
|
73
|
-
the return key is pressed while editing the field.
|
74
|
-
*/
|
75
|
-
continuouslyUpdatesValue: YES,
|
76
|
-
|
77
|
-
/**
|
78
|
-
If no, will not allow transform or validation errors (SC.Error objects)
|
79
|
-
to be passed to 'value'. Upon focus lost, the text field will revert
|
80
|
-
to its previous value.
|
81
|
-
*/
|
82
|
-
allowsErrorAsValue: YES,
|
83
|
-
|
84
71
|
/**
|
85
72
|
An optional view instance, or view class reference, which will be visible
|
86
73
|
on the left side of the text field. Visually the accessory view will look
|
@@ -396,10 +383,15 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
396
383
|
var hint = this.get('hint'), disabled, name, adjustmentStyle, type,
|
397
384
|
hintElements, element, paddingElementStyle, fieldClassNames,
|
398
385
|
spellCheckEnabled=this.get('spellCheckEnabled'), spellCheckString,
|
399
|
-
maxLength = this.get('maxLength');
|
386
|
+
maxLength = this.get('maxLength'), isOldSafari;
|
400
387
|
|
401
388
|
context.setClass('text-area', this.get('isTextArea'));
|
402
389
|
|
390
|
+
//Adding this to differentiate between older and newer versions of safari
|
391
|
+
//since the internal default field padding changed
|
392
|
+
isOldSafari= (parseInt(SC.browser.safari,0)<532);
|
393
|
+
context.setClass('oldWebKitFieldPadding', isOldSafari);
|
394
|
+
|
403
395
|
spellCheckString = spellCheckEnabled ? ' spellcheck="true"' : ' spellcheck="false"';
|
404
396
|
if (firstTime || this._forceRenderFirstTime) {
|
405
397
|
this._forceRenderFirstTime = NO;
|
@@ -449,23 +441,26 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
449
441
|
|
450
442
|
}
|
451
443
|
else {
|
444
|
+
var input= this.$input();
|
452
445
|
if(!this.get('_supportsPlaceHolder')){
|
453
446
|
var val = this.get('value');
|
454
447
|
if((!val || (val && val.length===0))){
|
455
448
|
if(this.get('hintON') && !this.get('isFirstResponder')){
|
456
449
|
//console.log('hint on render');
|
457
450
|
context.setClass('sc-hint', YES);
|
458
|
-
|
451
|
+
input.val(hint);
|
459
452
|
}else{
|
460
453
|
// console.log('removing hint on render');
|
461
454
|
context.setClass('sc-hint', NO);
|
462
|
-
|
455
|
+
input.val('');
|
463
456
|
}
|
464
457
|
}
|
458
|
+
}else{
|
459
|
+
input.attr('placeholder', hint);
|
465
460
|
}
|
466
461
|
|
467
462
|
// Enable/disable the actual input/textarea as appropriate.
|
468
|
-
element =
|
463
|
+
element = input[0];
|
469
464
|
if (element) {
|
470
465
|
if (!this.get('isEnabled')) {
|
471
466
|
element.disabled = 'true' ;
|
@@ -613,15 +608,15 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
613
608
|
*/
|
614
609
|
|
615
610
|
_textField_fieldDidFocus: function(evt) {
|
616
|
-
SC.
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
611
|
+
SC.run(function() {
|
612
|
+
this.set('focused',YES);
|
613
|
+
this.fieldDidFocus(evt);
|
614
|
+
var val = this.get('value');
|
615
|
+
if(!this.get('_supportsPlaceHolder') && ((!val) || (val && val.length===0))){
|
616
|
+
// console.log('turn off hint');
|
617
|
+
this.set('hintON', NO);
|
618
|
+
}
|
619
|
+
}, this);
|
625
620
|
},
|
626
621
|
|
627
622
|
/**
|
@@ -629,43 +624,57 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
629
624
|
*/
|
630
625
|
|
631
626
|
_textField_fieldDidBlur: function(evt) {
|
632
|
-
SC.
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
627
|
+
SC.run(function() {
|
628
|
+
this.set('focused',NO);
|
629
|
+
// passing the original event here instead that was potentially set from
|
630
|
+
// loosing the responder on the inline text editor so that we can
|
631
|
+
// use it for the delegate to end editing
|
632
|
+
this.fieldDidBlur(this._origEvent);
|
633
|
+
var val = this.get('value');
|
634
|
+
if(!this.get('_supportsPlaceHolder') && ((!val) || (val && val.length===0))){
|
635
|
+
// console.log('turn on hint');
|
636
|
+
this.set('hintON', YES);
|
637
|
+
}
|
638
|
+
}, this);
|
644
639
|
},
|
645
640
|
|
646
641
|
fieldDidFocus: function(evt) {
|
647
642
|
this.beginEditing(evt);
|
648
643
|
|
649
|
-
//
|
650
|
-
|
651
|
-
|
644
|
+
// We have to hide the intercept pane, as it blocks the events.
|
645
|
+
// However, show any that we previously hid, first just in case something wacky happened.
|
646
|
+
if (this._didHideInterceptForPane) {
|
647
|
+
this._didHideInterceptForPane.showTouchIntercept();
|
648
|
+
this._didHideInterceptForPane = null;
|
649
|
+
}
|
650
|
+
|
651
|
+
// now, hide the intercept on this pane if it has one
|
652
|
+
var pane = this.get('pane');
|
653
|
+
if (pane && pane.get("usingTouchIntercept")) {
|
654
|
+
// hide
|
655
|
+
pane.hideTouchIntercept();
|
656
|
+
|
657
|
+
// and set our internal one so we can unhide it (even if the pane somehow changes)
|
658
|
+
this._didHideInterceptForPane = this.get("pane");
|
652
659
|
}
|
653
660
|
},
|
654
661
|
|
655
662
|
fieldDidBlur: function(evt) {
|
656
663
|
this.commitEditing(evt);
|
657
664
|
|
658
|
-
//
|
659
|
-
|
660
|
-
|
665
|
+
// get the pane we hid intercept pane for (if any)
|
666
|
+
var touchPane = this._didHideInterceptForPane;
|
667
|
+
if (touchPane) {
|
668
|
+
touchPane.showTouchIntercept();
|
669
|
+
touchPane = null;
|
661
670
|
}
|
662
671
|
},
|
663
672
|
|
664
673
|
_field_fieldValueDidChange: function(evt) {
|
665
674
|
if(this.get('focused')){
|
666
|
-
SC.
|
667
|
-
|
668
|
-
|
675
|
+
SC.run(function() {
|
676
|
+
this.fieldValueDidChange(NO);
|
677
|
+
}, this);
|
669
678
|
}
|
670
679
|
},
|
671
680
|
|
@@ -794,6 +803,22 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
794
803
|
didLoseKeyResponderTo: function(keyView) {
|
795
804
|
var el = this.$input()[0];
|
796
805
|
if (el) el.blur();
|
806
|
+
|
807
|
+
this.invokeLater("scrollToOriginIfNeeded", 100);
|
808
|
+
},
|
809
|
+
|
810
|
+
/**
|
811
|
+
@private
|
812
|
+
Scrolls to origin if necessary (if the pane's current firstResponder is not a text field).
|
813
|
+
*/
|
814
|
+
scrollToOriginIfNeeded: function() {
|
815
|
+
var pane = this.get("pane");
|
816
|
+
if (!pane) return;
|
817
|
+
|
818
|
+
var first = pane.get("firstResponder");
|
819
|
+
if (!first || !first.get("isTextField")) {
|
820
|
+
document.body.scrollTop = document.body.scrollLeft = 0;
|
821
|
+
}
|
797
822
|
},
|
798
823
|
|
799
824
|
parentViewDidResize: function() {
|
@@ -812,20 +837,27 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
812
837
|
// responder chain.
|
813
838
|
// If the event is triggered by a return while entering IME input,
|
814
839
|
// don't got through this path.
|
815
|
-
var which = evt.which;
|
840
|
+
var which = evt.which, maxLengthReached = false;
|
816
841
|
if ((which === 13 && !evt.isIMEInput) && !this.get('isTextArea')) return NO ;
|
817
842
|
if (which === 27) return NO ;
|
818
843
|
|
819
844
|
// handle tab key
|
820
|
-
if (
|
845
|
+
if (which === 9 && this.get('defaultTabbingEnabled')) {
|
821
846
|
var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView');
|
822
847
|
if (view) view.becomeFirstResponder();
|
823
848
|
else evt.allowDefault();
|
824
849
|
return YES ; // handled
|
825
850
|
}
|
826
|
-
|
851
|
+
// maxlength for textareas
|
852
|
+
if(!SC.browser.safari && this.get('isTextArea')){
|
853
|
+
var val = this.get('value');
|
854
|
+
if(val && evt.which>47 && (val.length >= this.get('maxLength'))) {
|
855
|
+
maxLengthReached = true;
|
856
|
+
}
|
857
|
+
}
|
827
858
|
// validate keyDown...
|
828
|
-
|
859
|
+
// do not validate on touch, as it prevents return.
|
860
|
+
if ((this.performValidateKeyDown(evt) || SC.platform.touch) && !maxLengthReached) {
|
829
861
|
this._isKeyDown = YES ;
|
830
862
|
evt.allowDefault();
|
831
863
|
} else {
|
@@ -894,7 +926,6 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
|
|
894
926
|
return YES;
|
895
927
|
},
|
896
928
|
|
897
|
-
|
898
929
|
/**
|
899
930
|
This function is to notify if the browser supports the placeholder attribute
|
900
931
|
or not. Currently is disabled as in webkit there is a bug where the color
|
@@ -9,7 +9,6 @@ sc_require('system/browser');
|
|
9
9
|
sc_require('system/event');
|
10
10
|
sc_require('system/cursor');
|
11
11
|
sc_require('system/responder') ;
|
12
|
-
sc_require('system/theme');
|
13
12
|
|
14
13
|
sc_require('mixins/string') ;
|
15
14
|
|
@@ -79,7 +78,7 @@ SC.LAYOUT_AUTO = 'auto';
|
|
79
78
|
/**
|
80
79
|
Default property to disable or enable by default the contextMenu
|
81
80
|
*/
|
82
|
-
SC.CONTEXT_MENU_ENABLED =
|
81
|
+
SC.CONTEXT_MENU_ENABLED = YES;
|
83
82
|
|
84
83
|
/**
|
85
84
|
Default property to disable or enable if the focus can jump to the address
|
@@ -87,34 +86,10 @@ SC.CONTEXT_MENU_ENABLED = NO;
|
|
87
86
|
*/
|
88
87
|
SC.TABBING_ONLY_INSIDE_DOCUMENT = YES;
|
89
88
|
|
90
|
-
/**
|
91
|
-
Tells the property (when fetched with themed()) to get its value from the renderer (if any).
|
92
|
-
*/
|
93
|
-
SC.FROM_THEME = "__FROM_THEME__"; // doesn't really matter what it is, so long as it is unique. Readability is a plus.
|
94
|
-
|
95
89
|
/** @private - custom array used for child views */
|
96
90
|
SC.EMPTY_CHILD_VIEWS_ARRAY = [];
|
97
91
|
SC.EMPTY_CHILD_VIEWS_ARRAY.needsClone = YES;
|
98
92
|
|
99
|
-
/**
|
100
|
-
Map to CSS Transforms
|
101
|
-
*/
|
102
|
-
SC.CSS_TRANSFORM_MAP = {
|
103
|
-
rotate: function(val){
|
104
|
-
if (SC.typeOf(val) === SC.T_NUMBER || val === 0) val += 'deg';
|
105
|
-
return 'rotate('+val+')';
|
106
|
-
},
|
107
|
-
scale: function(val){
|
108
|
-
if (SC.typeOf(val) === SC.T_ARRAY) val = val.join(', ');
|
109
|
-
return 'scale('+val+')';
|
110
|
-
}
|
111
|
-
};
|
112
|
-
|
113
|
-
/**
|
114
|
-
Properties that can be animated
|
115
|
-
*/
|
116
|
-
SC.ANIMATABLE_PROPERTIES = ["top", "left", "bottom", "right", "width", "height", "centerX", "centerY", "opacity", "scale", "rotate"];
|
117
|
-
|
118
93
|
/**
|
119
94
|
@class
|
120
95
|
|
@@ -170,7 +145,7 @@ SC.ANIMATABLE_PROPERTIES = ["top", "left", "bottom", "right", "width", "height",
|
|
170
145
|
SC.View = SC.Responder.extend(SC.DelegateSupport,
|
171
146
|
/** @scope SC.View.prototype */ {
|
172
147
|
|
173
|
-
concatenatedProperties: 'outlets displayProperties layoutProperties classNames renderMixin didCreateLayerMixin willDestroyLayerMixin
|
148
|
+
concatenatedProperties: 'outlets displayProperties layoutProperties classNames renderMixin didCreateLayerMixin willDestroyLayerMixin'.w(),
|
174
149
|
|
175
150
|
/**
|
176
151
|
The current pane.
|
@@ -217,184 +192,14 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
217
192
|
backgroundColor: null,
|
218
193
|
|
219
194
|
/**
|
220
|
-
Activates use of brower's static layout.
|
195
|
+
Activates use of brower's static layout. You can apply this mixin and
|
196
|
+
still use absolute positioning. To activate static positioning, set this
|
221
197
|
property to YES.
|
222
198
|
|
223
199
|
@property {Boolean}
|
224
200
|
*/
|
225
201
|
useStaticLayout: NO,
|
226
202
|
|
227
|
-
// ..........................................................
|
228
|
-
// THEME SUPPORT
|
229
|
-
//
|
230
|
-
|
231
|
-
_baseThemeName: false,
|
232
|
-
|
233
|
-
/**
|
234
|
-
The base theme to start from; the "theme" property looks in this theme.
|
235
|
-
baseTheme is inherited from parent's theme property.
|
236
|
-
*/
|
237
|
-
baseTheme: null,
|
238
|
-
|
239
|
-
/**
|
240
|
-
This sets the base theme
|
241
|
-
*/
|
242
|
-
_baseThemeProperty: function(key, value) {
|
243
|
-
if (SC.typeOf(value) === SC.T_STRING) {
|
244
|
-
this.set("_baseThemeName", value);
|
245
|
-
}
|
246
|
-
|
247
|
-
// find the base theme by name if we have a name.
|
248
|
-
if (this.get("_baseThemeName")) {
|
249
|
-
var theme = SC.Theme.find(this.get("_baseThemeName"));
|
250
|
-
if (theme) return theme;
|
251
|
-
}
|
252
|
-
|
253
|
-
// otherwise, return parent's theme.
|
254
|
-
var parent = this.get("parentView");
|
255
|
-
if (parent) return parent.get("theme");
|
256
|
-
|
257
|
-
return SC.Theme.find("sc-base");
|
258
|
-
}.property().cacheable(),
|
259
|
-
|
260
|
-
|
261
|
-
_last_theme: null, // used to determine if theme has changed since last time the property was evaluated.
|
262
|
-
_themeName: false,
|
263
|
-
|
264
|
-
// baseTheme is a "property"; since it gets set after extension of the view,
|
265
|
-
// we need an observer in addition to it to actually do notifications.
|
266
|
-
_baseThemeDidChange: function() {
|
267
|
-
this.notifyPropertyChange("theme");
|
268
|
-
}.observes("baseTheme"),
|
269
|
-
|
270
|
-
_themeProperty: function(key, value) {
|
271
|
-
// if it is a string, set theme name
|
272
|
-
if (SC.typeOf(value) === SC.T_STRING) {
|
273
|
-
this.set("_themeName", value);
|
274
|
-
}
|
275
|
-
|
276
|
-
// get the base theme
|
277
|
-
var base = this.get("baseTheme");
|
278
|
-
|
279
|
-
// find theme, if possible
|
280
|
-
if (this.get("_themeName")) {
|
281
|
-
// Note: theme instance "find" function will search every parent
|
282
|
-
// _except_ global (which is not a parent)
|
283
|
-
var theme;
|
284
|
-
if (base) {
|
285
|
-
theme = base.find(this.get("_themeName"));
|
286
|
-
if (theme) return theme;
|
287
|
-
}
|
288
|
-
|
289
|
-
theme = SC.Theme.find(this.get("_themeName"));
|
290
|
-
if (theme) return theme;
|
291
|
-
}
|
292
|
-
|
293
|
-
// can't find anything, return base.
|
294
|
-
return base;
|
295
|
-
}.property().cacheable(),
|
296
|
-
|
297
|
-
_notifyThemeDidChange: function() {
|
298
|
-
var len, idx, childViews = this.get("childViews");
|
299
|
-
len = childViews.length;
|
300
|
-
for (idx = 0; idx < len; idx++){
|
301
|
-
childViews[idx].notifyPropertyChange("baseTheme");
|
302
|
-
childViews[idx].notifyPropertyChange("theme");
|
303
|
-
}
|
304
|
-
},
|
305
|
-
|
306
|
-
/**
|
307
|
-
The current theme. You may only set this to a string, and during runtime, the value
|
308
|
-
(from get()) will always be a theme object or null.
|
309
|
-
*/
|
310
|
-
theme: null,
|
311
|
-
|
312
|
-
/**
|
313
|
-
Detects when the theme changes. Replaces the layer if necessary.
|
314
|
-
*/
|
315
|
-
_themeDidChange: function() {
|
316
|
-
var theme = this.get("theme");
|
317
|
-
if (theme === this._last_theme) return;
|
318
|
-
this._last_theme = theme;
|
319
|
-
|
320
|
-
// replace the layer
|
321
|
-
if (this.get("layer")) this.replaceLayer();
|
322
|
-
|
323
|
-
// notify child views
|
324
|
-
if (this._hasCreatedChildViews) this._notifyThemeDidChange();
|
325
|
-
|
326
|
-
// and now, regenerate renderer
|
327
|
-
this._generateRenderer();
|
328
|
-
}.observes("theme"),
|
329
|
-
|
330
|
-
/**
|
331
|
-
Like "get", but if the value is SC.FROM_THEME, it will find the value from the view's
|
332
|
-
renderer, if any; if none, then it will look for <property>Default and return that.
|
333
|
-
*/
|
334
|
-
themed: function(property) {
|
335
|
-
var val = this.get(property);
|
336
|
-
if (val === SC.FROM_THEME) {
|
337
|
-
if (this.renderer) return this.renderer[property];
|
338
|
-
else return this.get(property + "Default");
|
339
|
-
}
|
340
|
-
return val;
|
341
|
-
},
|
342
|
-
|
343
|
-
/**
|
344
|
-
@private
|
345
|
-
Generates the view's renderer (calling _destroyRenderer on any old ones if needed).
|
346
|
-
*/
|
347
|
-
_generateRenderer: function() {
|
348
|
-
var theme = this.get("theme"); // renderers need a theme
|
349
|
-
|
350
|
-
// reset the renderer (the theme changed, hello!)
|
351
|
-
this._destroyRenderer();
|
352
|
-
|
353
|
-
// now, if we do have a theme, we can try to create the renderer.
|
354
|
-
if (theme && theme.isTheme) {
|
355
|
-
this._viewRenderer = theme.view();
|
356
|
-
|
357
|
-
if (this.createRenderer) {
|
358
|
-
this.renderer = this.createRenderer(theme);
|
359
|
-
|
360
|
-
// the renderer was not necessarily successfully created.
|
361
|
-
if (this.renderer) {
|
362
|
-
var mixins, idx, len;
|
363
|
-
this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed)
|
364
|
-
if (mixins = this.createRendererMixin) {
|
365
|
-
len = mixins.length;
|
366
|
-
for (idx = 0; idx < len; idx++) mixins[idx].call(this, theme);
|
367
|
-
}
|
368
|
-
}
|
369
|
-
}
|
370
|
-
}
|
371
|
-
|
372
|
-
// update!
|
373
|
-
this._updateViewRenderer();
|
374
|
-
this._updateRenderer();
|
375
|
-
},
|
376
|
-
|
377
|
-
/**
|
378
|
-
@private
|
379
|
-
Updates the view's renderer, if one exists, calling all mixins to renderer as well.
|
380
|
-
*/
|
381
|
-
_updateRenderer: function() {
|
382
|
-
var mixins, idx, len;
|
383
|
-
if (this.renderer){
|
384
|
-
this.updateRenderer(this.renderer);
|
385
|
-
if (mixins = this.updateRendererMixin) {
|
386
|
-
len = mixins.length;
|
387
|
-
for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer);
|
388
|
-
}
|
389
|
-
}
|
390
|
-
},
|
391
|
-
|
392
|
-
_destroyRenderer: function() {
|
393
|
-
if (!this.renderer) return;
|
394
|
-
this.renderer.destroy();
|
395
|
-
this.renderer = null;
|
396
|
-
},
|
397
|
-
|
398
203
|
// ..........................................................
|
399
204
|
// IS ENABLED SUPPORT
|
400
205
|
//
|
@@ -442,25 +247,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
442
247
|
}
|
443
248
|
}.observes('isEnabled'),
|
444
249
|
|
445
|
-
// ..........................................................
|
446
|
-
// MULTITOUCH SUPPORT
|
447
|
-
//
|
448
|
-
/**
|
449
|
-
Set to YES if you want to receive touch events for each distinct touch (rather than only
|
450
|
-
the first touch start and last touch end).
|
451
|
-
*/
|
452
|
-
acceptsMultitouch: NO,
|
453
|
-
|
454
|
-
/**
|
455
|
-
Is YES if the view is currently being touched. NO otherwise.
|
456
|
-
*/
|
457
|
-
hasTouch: NO,
|
458
|
-
|
459
|
-
/**
|
460
|
-
Whether to route touch events to mouse events (defaults to YES)
|
461
|
-
*/
|
462
|
-
routeTouch: YES,
|
463
|
-
|
464
250
|
// ..........................................................
|
465
251
|
// IS VISIBLE IN WINDOW SUPPORT
|
466
252
|
//
|
@@ -526,45 +312,44 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
526
312
|
}
|
527
313
|
current = current && parentViewIsVisible;
|
528
314
|
}
|
529
|
-
|
315
|
+
|
530
316
|
// If our visibility has changed, then set the new value and notify our
|
531
317
|
// child views to update their value.
|
532
|
-
|
533
|
-
this.set('isVisibleInWindow', current)
|
534
|
-
|
318
|
+
if (previous !== current) {
|
319
|
+
this.set('isVisibleInWindow', current);
|
320
|
+
|
535
321
|
var childViews = this.get('childViews'), len = childViews.length, idx;
|
536
322
|
for(idx=0;idx<len;idx++) {
|
537
323
|
childViews[idx].recomputeIsVisibleInWindow(current);
|
538
324
|
}
|
539
325
|
|
540
|
-
|
541
|
-
//
|
542
|
-
// This more appropriately belongs in a 'isVisibleInWindow' observer or
|
543
|
-
// some such helper method because this work is not strictly related to
|
544
|
-
// computing the visibility, but view performance is critical, so
|
545
|
-
// avoiding the extra observer is worthwhile.
|
326
|
+
// For historical reasons, we'll also layout the child views if
|
327
|
+
// necessary.
|
546
328
|
if (current) {
|
547
|
-
|
548
|
-
this.displayDidChange();
|
549
|
-
|
550
|
-
if (this.get('childViewsNeedLayout')) {
|
551
|
-
this.invokeOnce(this.layoutChildViewsIfNeeded);
|
552
|
-
}
|
329
|
+
if (this.get('childViewsNeedLayout')) this.invokeOnce(this.layoutChildViewsIfNeeded);
|
553
330
|
}
|
554
331
|
else {
|
555
|
-
//
|
556
|
-
//
|
557
|
-
//
|
558
|
-
//
|
559
|
-
//
|
560
|
-
//
|
561
|
-
this._forceLayerUpdateDueToVisibilityChange = YES;
|
562
|
-
this.displayDidChange();
|
563
|
-
|
564
|
-
// Also, if we were previously 'firstResponder', resign it.
|
332
|
+
// Also, if we were previously visible and were the first responder,
|
333
|
+
// resign it. This more appropriately belongs in a
|
334
|
+
// 'isVisibleInWindow' observer or some such helper method because
|
335
|
+
// this work is not strictly related to computing the visibility, but
|
336
|
+
// view performance is critical, so avoiding the extra observer is
|
337
|
+
// worthwhile.
|
565
338
|
if (this.get('isFirstResponder')) this.resignFirstResponder();
|
566
339
|
}
|
567
|
-
|
340
|
+
}
|
341
|
+
|
342
|
+
// If we're in this function, then that means one of our ancestor views
|
343
|
+
// changed, or changed its 'isVisibleInWindow' value. That means that if
|
344
|
+
// we are out of sync with the layer, then we need to update our state
|
345
|
+
// now.
|
346
|
+
//
|
347
|
+
// For example, say we're isVisible=NO, but we have not yet added the
|
348
|
+
// 'hidden' class to the layer because of the "don't update the layer if
|
349
|
+
// we're not visible in the window" check. If any of our parent views
|
350
|
+
// became visible, our layer would incorrectly be shown!
|
351
|
+
this.updateLayerIfNeeded(YES);
|
352
|
+
|
568
353
|
return this;
|
569
354
|
},
|
570
355
|
|
@@ -572,9 +357,18 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
572
357
|
/** @private
|
573
358
|
Whenever the view’s visibility changes, we need to recompute whether it is
|
574
359
|
actually visible inside the window (a view is only visible in the window
|
575
|
-
if it is marked as visibile and its parent view is as well)
|
360
|
+
if it is marked as visibile and its parent view is as well), in addition
|
361
|
+
to updating the layer accordingly.
|
576
362
|
*/
|
577
363
|
_sc_isVisibleDidChange: function() {
|
364
|
+
// 'isVisible' is effectively a displayProperty, but we'll call
|
365
|
+
// displayDidChange() manually here instead of declaring it as a
|
366
|
+
// displayProperty because that avoids having two observers on
|
367
|
+
// 'isVisible'. A single observer is:
|
368
|
+
// a. More efficient
|
369
|
+
// b. More correct, because we can guarantee the order of operations
|
370
|
+
this.displayDidChange();
|
371
|
+
|
578
372
|
this.recomputeIsVisibleInWindow();
|
579
373
|
}.observes('isVisible'),
|
580
374
|
|
@@ -655,10 +449,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
655
449
|
if (view.parentView !== this) {
|
656
450
|
throw "%@.removeChild(%@) must belong to parent".fmt(this,view);
|
657
451
|
}
|
658
|
-
|
659
|
-
// Animation cleanup
|
660
|
-
if (SC.platform.supportsCSSTransitions) this.resetAnimation();
|
661
|
-
|
662
452
|
// notify views
|
663
453
|
if (view.willRemoveFromParent) view.willRemoveFromParent() ;
|
664
454
|
if (this.willRemoveChild) this.willRemoveChild(view) ;
|
@@ -778,8 +568,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
778
568
|
parentViewDidChange: function() {
|
779
569
|
this.recomputeIsVisibleInWindow() ;
|
780
570
|
|
781
|
-
this.resetBuildState();
|
782
|
-
this.notifyPropertyChange("baseTheme");
|
783
571
|
this.set('layerLocationNeedsUpdate', YES) ;
|
784
572
|
this.invokeOnce(this.updateLayerLocationIfNeeded) ;
|
785
573
|
|
@@ -888,28 +676,35 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
888
676
|
@property {String}
|
889
677
|
@readOnly
|
890
678
|
*/
|
891
|
-
layerId: function() {
|
679
|
+
layerId: function(key, value) {
|
680
|
+
if (value) this._layerId = value;
|
681
|
+
if (this._layerId) return this._layerId;
|
892
682
|
return SC.guidFor(this) ;
|
893
683
|
}.property().cacheable(),
|
894
684
|
|
895
685
|
_lastLayerId: null,
|
686
|
+
|
896
687
|
/**
|
897
688
|
Handles changes in the layer id.
|
898
689
|
*/
|
899
690
|
layerIdDidChange: function() {
|
900
|
-
var layer
|
901
|
-
|
691
|
+
var layer = this.get("layer"),
|
692
|
+
lid = this.get("layerId"),
|
693
|
+
lastId = this._lastLayerId;
|
694
|
+
if (lid !== lastId) {
|
902
695
|
// if we had an earlier one, remove from view hash.
|
903
|
-
if (
|
696
|
+
if (lastId && SC.View.views[lastId] === this) {
|
697
|
+
delete SC.View.views[lastId];
|
698
|
+
}
|
904
699
|
|
905
700
|
// set the current one as the new old one
|
906
|
-
this._lastLayerId =
|
701
|
+
this._lastLayerId = lid;
|
907
702
|
|
908
703
|
// and add the new one
|
909
|
-
SC.View.views[
|
704
|
+
SC.View.views[lid] = this;
|
910
705
|
|
911
706
|
// and finally, set the actual layer id.
|
912
|
-
layer.id =
|
707
|
+
if (layer) layer.id = lid;
|
913
708
|
}
|
914
709
|
}.observes("layerId"),
|
915
710
|
|
@@ -925,20 +720,13 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
925
720
|
*/
|
926
721
|
findLayerInParentLayer: function(parentLayer) {
|
927
722
|
var layerId = this.get('layerId'),
|
928
|
-
node, i, ilen,
|
723
|
+
node, i, ilen, childNodes, elem, usedQuerySelector;
|
929
724
|
|
930
725
|
// first, let's try the fast path...
|
931
|
-
|
932
|
-
else elem = document.getElementById(layerId) ;
|
726
|
+
elem = document.getElementById(layerId) ;
|
933
727
|
|
934
728
|
// TODO: use code generation to only really do this check on IE
|
935
|
-
if (SC.browser.msie && elem && elem.id !== layerId) elem = null
|
936
|
-
|
937
|
-
// if browser supports querySelector use that.
|
938
|
-
if (!elem && parentLayer.querySelector) {
|
939
|
-
// TODO: make querySelector work on all platforms...
|
940
|
-
elem = parentLayer.querySelector('#' + layerId);
|
941
|
-
}
|
729
|
+
if (SC.browser.msie && elem && elem.id !== layerId) elem = null;
|
942
730
|
|
943
731
|
// if no element was found the fast way, search down the parentLayer for
|
944
732
|
// the element. This code should not be invoked very often. Usually a
|
@@ -947,21 +735,19 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
947
735
|
// below the parent.
|
948
736
|
if (!elem) {
|
949
737
|
elem = parentLayer.firstChild ;
|
950
|
-
var q=[];
|
738
|
+
var q = [];
|
951
739
|
q.push(parentLayer);
|
952
|
-
while(q.length!==0){
|
953
|
-
node=q
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
for(i=0, ilen=node.childNodes.length; i<ilen; i++){
|
961
|
-
q.push(node.childNodes[i]);
|
740
|
+
while (q.length !==0) {
|
741
|
+
node = q.shift();
|
742
|
+
if (node.id===layerId) {
|
743
|
+
return node;
|
744
|
+
}
|
745
|
+
childNodes = node.childNodes;
|
746
|
+
for (i=0, ilen=childNodes.length; i < ilen; ++i) {
|
747
|
+
q.push(childNodes[i]);
|
962
748
|
}
|
963
749
|
}
|
964
|
-
|
750
|
+
elem = null;
|
965
751
|
}
|
966
752
|
|
967
753
|
return elem;
|
@@ -1023,7 +809,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1023
809
|
If you need to update view's layer sooner than the end of the runloop, you
|
1024
810
|
can call this method directly. If your view is not visible in the window
|
1025
811
|
but you want it to update anyway, then call this method, passing YES for
|
1026
|
-
the '
|
812
|
+
the 'skipIsVisibleInWindowCheck' parameter.
|
1027
813
|
|
1028
814
|
You should not override this method. Instead override updateLayer() or
|
1029
815
|
render().
|
@@ -1031,9 +817,9 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1031
817
|
@returns {SC.View} receiver
|
1032
818
|
@test in updateLayer
|
1033
819
|
*/
|
1034
|
-
updateLayerIfNeeded: function() {
|
1035
|
-
var
|
1036
|
-
shouldUpdate = (
|
820
|
+
updateLayerIfNeeded: function(skipIsVisibleInWindowCheck) {
|
821
|
+
var needsUpdate = this.get('layerNeedsUpdate'),
|
822
|
+
shouldUpdate = needsUpdate && (skipIsVisibleInWindowCheck || this.get('isVisibleInWindow'));
|
1037
823
|
if (shouldUpdate) {
|
1038
824
|
// only update a layer if it already exists
|
1039
825
|
if (this.get('layer')) {
|
@@ -1043,10 +829,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1043
829
|
this.endPropertyChanges() ;
|
1044
830
|
}
|
1045
831
|
}
|
1046
|
-
else this.set('layerNeedsUpdate', NO) ;
|
1047
|
-
|
1048
|
-
// If we were forcing the layer update for this round, clear the flag.
|
1049
|
-
this._forceLayerUpdateDueToVisibilityChange = NO;
|
1050
832
|
|
1051
833
|
return this ;
|
1052
834
|
},
|
@@ -1066,42 +848,22 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1066
848
|
do not want your render() method called when updating a layer, then you
|
1067
849
|
should override this method instead.
|
1068
850
|
|
1069
|
-
@param optionalContext provided only for backwards-compatibility.
|
1070
|
-
|
1071
851
|
@returns {SC.View} receiver
|
1072
852
|
*/
|
1073
|
-
updateLayer: function(
|
1074
|
-
var
|
1075
|
-
this.
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
// Now, update using renderer if possible; render() otherwise
|
1082
|
-
if (!this._useRenderFirst && this.createRenderer) {
|
1083
|
-
if (renderer) renderer.update();
|
1084
|
-
if (viewRenderer) viewRenderer.update();
|
1085
|
-
} else {
|
1086
|
-
var context = optionalContext || this.renderContext(this.get('layer')) ;
|
1087
|
-
this.render(context, NO) ;
|
1088
|
-
if (mixins = this.renderMixin) {
|
1089
|
-
len = mixins.length;
|
1090
|
-
for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ;
|
1091
|
-
}
|
1092
|
-
|
1093
|
-
context.update() ;
|
1094
|
-
if (context._innerHTMLReplaced) {
|
1095
|
-
var pane = this.get('pane');
|
1096
|
-
if(pane && pane.get('isPaneAttached')) {
|
1097
|
-
this._notifyDidAppendToDocument();
|
1098
|
-
}
|
853
|
+
updateLayer: function() {
|
854
|
+
var context = this.renderContext(this.get('layer')) ;
|
855
|
+
this.prepareContext(context, NO) ;
|
856
|
+
context.update() ;
|
857
|
+
if (context._innerHTMLReplaced) {
|
858
|
+
var pane = this.get('pane');
|
859
|
+
if(pane && pane.get('isPaneAttached')) {
|
860
|
+
this._notifyDidAppendToDocument();
|
1099
861
|
}
|
1100
862
|
}
|
1101
863
|
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
864
|
+
// If this view uses static layout, then notify that the frame (likely)
|
865
|
+
// changed.
|
866
|
+
if (this.useStaticLayout) this.viewDidResize();
|
1105
867
|
|
1106
868
|
if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM
|
1107
869
|
if(this.designer && this.designer.viewDidUpdateLayer) {
|
@@ -1139,7 +901,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1139
901
|
var context = this.renderContext(this.get('tagName')) ;
|
1140
902
|
|
1141
903
|
// now prepare the content like normal.
|
1142
|
-
this.
|
904
|
+
this.prepareContext(context, YES) ;
|
1143
905
|
this.set('layer', context.element()) ;
|
1144
906
|
|
1145
907
|
// now notify the view and its child views..
|
@@ -1153,22 +915,10 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1153
915
|
invokes the same on all child views.
|
1154
916
|
*/
|
1155
917
|
_notifyDidCreateLayer: function() {
|
1156
|
-
// notify, not just the view, but also the view renderers
|
1157
|
-
this.notifyPropertyChange("layer");
|
1158
|
-
this._viewRenderer.attachLayer(this);
|
1159
|
-
if (this.renderer) this.renderer.attachLayer(this);
|
1160
918
|
if (this.didCreateLayer) this.didCreateLayer() ;
|
1161
|
-
|
1162
|
-
// Animation prep
|
1163
|
-
if (SC.platform.supportsCSSTransitions) {
|
1164
|
-
this.resetAnimation();
|
1165
|
-
SC.Event.add(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this._scv_animationEnd);
|
1166
|
-
SC.Event.add(this.get('layer'), "transitionEnd", this, this._scv_animationEnd);
|
1167
|
-
}
|
1168
|
-
|
1169
|
-
// and notify others
|
1170
919
|
var mixins = this.didCreateLayerMixin, len, idx,
|
1171
|
-
childViews = this.get('childViews')
|
920
|
+
childViews = this.get('childViews'),
|
921
|
+
childView;
|
1172
922
|
if (mixins) {
|
1173
923
|
len = mixins.length ;
|
1174
924
|
for (idx=0; idx<len; ++idx) mixins[idx].call(this) ;
|
@@ -1176,8 +926,17 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1176
926
|
|
1177
927
|
len = childViews.length ;
|
1178
928
|
for (idx=0; idx<len; ++idx) {
|
1179
|
-
|
1180
|
-
|
929
|
+
childView = childViews[idx];
|
930
|
+
if (!childView) continue;
|
931
|
+
|
932
|
+
// A parent view creating a layer might result in the creation of a
|
933
|
+
// child view's DOM node being created via a render context without
|
934
|
+
// createLayer() being invoked on the child. In such cases, if anyone
|
935
|
+
// had requested 'layer' and it was cached as null, we need to
|
936
|
+
// invalidate it.
|
937
|
+
childView.notifyPropertyChange('layer');
|
938
|
+
|
939
|
+
childView._notifyDidCreateLayer() ;
|
1181
940
|
}
|
1182
941
|
},
|
1183
942
|
|
@@ -1202,26 +961,10 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1202
961
|
destroyLayer: function() {
|
1203
962
|
var layer = this.get('layer') ;
|
1204
963
|
if (layer) {
|
1205
|
-
|
1206
|
-
// Teardown animations
|
1207
|
-
if (SC.platform.supportsCSSTransitions) {
|
1208
|
-
SC.Event.remove(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this._scv_animationEnd);
|
1209
|
-
SC.Event.remove(this.get('layer'), "transitionEnd", this, this._scv_animationEnd);
|
1210
|
-
}
|
1211
|
-
|
1212
964
|
// Now notify the view and its child views. It will also set the
|
1213
965
|
// layer property to null.
|
1214
966
|
this._notifyWillDestroyLayer() ;
|
1215
967
|
|
1216
|
-
if (this._viewRenderer) {
|
1217
|
-
this._viewRenderer.detachLayer();
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
// tell the renderer the layer has gone away
|
1221
|
-
if (this.renderer) {
|
1222
|
-
this.renderer.detachLayer();
|
1223
|
-
}
|
1224
|
-
|
1225
968
|
// do final cleanup
|
1226
969
|
if (layer.parentNode) layer.parentNode.removeChild(layer) ;
|
1227
970
|
layer = null ;
|
@@ -1260,134 +1003,73 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1260
1003
|
this.set('layer', null) ;
|
1261
1004
|
},
|
1262
1005
|
|
1263
|
-
|
1264
|
-
isLayerProvider: YES,
|
1265
|
-
/**
|
1266
|
-
@private (semi)
|
1267
|
-
Returns the layer. Meant only for use from renderers and such—this is a layer provider function.
|
1268
|
-
*/
|
1269
|
-
getLayer: function() {
|
1270
|
-
return this.get("layer");
|
1271
|
-
},
|
1272
|
-
|
1273
1006
|
/**
|
1274
|
-
@private
|
1275
|
-
|
1276
|
-
Renders to a context.
|
1277
|
-
Rendering only happens for the initial rendering. Further updates happen in updateLayer,
|
1278
|
-
and are not done to contexts, but to layers.
|
1279
|
-
|
1280
|
-
Both renderToContext and updateLayer will call render(context, firstTime) as needed
|
1281
|
-
to maintain backwards compatibility, but prefer calling createRenderer.
|
1282
|
-
|
1283
|
-
Note: You should not generally override nor directly call this method. This method is only
|
1284
|
-
called by createLayer to set up the layer initially, and by renderChildViews, to write to
|
1285
|
-
a context.
|
1286
|
-
|
1287
|
-
@param {SC.RenderContext} context the render context.
|
1288
|
-
@param {Boolean} firstTime Provided for compatibility when rendering legacy views only.
|
1289
|
-
*/
|
1290
|
-
renderToContext: function(context, firstTime) {
|
1291
|
-
var mixins, idx, len;
|
1292
|
-
|
1293
|
-
this.beginPropertyChanges() ;
|
1294
|
-
this.set('layerNeedsUpdate', NO) ;
|
1295
|
-
|
1296
|
-
this.renderViewSettings(context);
|
1297
|
-
|
1298
|
-
/* Now, the actual rendering, which will use a renderer if possible */
|
1299
|
-
// the renderer will have been created when the theme was found; if it is around,
|
1300
|
-
// we just need to ensure it is up-to-date
|
1301
|
-
if (this.createRenderer) {
|
1302
|
-
// our private version does mixins too! Yay!
|
1303
|
-
this._updateRenderer();
|
1304
|
-
}
|
1305
|
-
|
1306
|
-
if (!this._useRenderFirst && this.createRenderer) {
|
1307
|
-
if (this.renderer) this.renderer.render(context);
|
1308
|
-
} else {
|
1309
|
-
if (SC.none(firstTime)) firstTime = YES;
|
1310
|
-
|
1311
|
-
this.render(context, firstTime);
|
1312
|
-
if (mixins = this.renderMixin) {
|
1313
|
-
len = mixins.length;
|
1314
|
-
for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, firstTime) ;
|
1315
|
-
}
|
1316
|
-
}
|
1317
|
-
|
1318
|
-
this.endPropertyChanges() ;
|
1319
|
-
},
|
1320
|
-
|
1321
|
-
/**
|
1322
|
-
@private
|
1323
|
-
Updates the properties of the renderer used for the view
|
1324
|
-
*/
|
1325
|
-
_updateViewRenderer: function() {
|
1326
|
-
if (!this._viewRenderer) return;
|
1327
|
-
|
1328
|
-
var classNames = this.get('classNames');
|
1329
|
-
if (this.get('theme')) {
|
1330
|
-
classNames = classNames.concat(this.get("theme").classNames);
|
1331
|
-
}
|
1332
|
-
|
1333
|
-
this._scv_willRenderAnimations();
|
1334
|
-
|
1335
|
-
this._viewRenderer.attr({
|
1336
|
-
layerId: this.layerId ? this.get('layerId') : SC.guidFor(this),
|
1337
|
-
classNames: classNames,
|
1338
|
-
backgroundColor: this.get('backgroundColor'),
|
1339
|
-
cursor: this.get('cursor'),
|
1340
|
-
layoutStyle: this.get('layoutStyle'),
|
1341
|
-
isTextSelectable: this.get('isTextSelectable'),
|
1342
|
-
isEnabled: this.get('isEnabled'),
|
1343
|
-
isVisible: this.get('isVisible'),
|
1344
|
-
isFirstResponder: this.get('isFirstResponder'),
|
1345
|
-
hasStaticLayout: this.get('useStaticLayout')
|
1346
|
-
});
|
1347
|
-
},
|
1348
|
-
|
1349
|
-
/**
|
1350
|
-
@private
|
1351
|
-
Renders view settings (class names and id, for instance) to the context.
|
1352
|
-
*/
|
1353
|
-
renderViewSettings: function(context) {
|
1354
|
-
this._updateViewRenderer();
|
1355
|
-
this.renderLayout(context, YES); // provide backwards compatibility
|
1356
|
-
this._viewRenderer.render(context);
|
1357
|
-
},
|
1358
|
-
|
1359
|
-
/**
|
1360
|
-
@private
|
1361
|
-
Updates view settings on the context (including class names).
|
1362
|
-
*/
|
1363
|
-
updateViewSettings: function() {
|
1364
|
-
this._updateViewRenderer();
|
1365
|
-
this._viewRenderer.update();
|
1366
|
-
},
|
1367
|
-
|
1368
|
-
/**
|
1369
|
-
@private
|
1370
|
-
|
1371
1007
|
Invoked by createLayer() and updateLayer() to actually render a context.
|
1372
1008
|
This method calls the render() method on your view along with any
|
1373
1009
|
renderMixin() methods supplied by mixins you might have added.
|
1374
1010
|
|
1375
|
-
You should not override this method directly.
|
1011
|
+
You should not override this method directly. However, you might call
|
1012
|
+
this method if you choose to override updateLayer() or createLayer().
|
1376
1013
|
|
1377
1014
|
@param {SC.RenderContext} context the render context
|
1378
1015
|
@param {Boolean} firstTime YES if this is creating a layer
|
1379
1016
|
@returns {void}
|
1380
1017
|
*/
|
1381
1018
|
prepareContext: function(context, firstTime) {
|
1382
|
-
|
1383
|
-
|
1384
|
-
//
|
1385
|
-
if (SC.none(firstTime)) firstTime = YES; // the GOOD code path :)
|
1019
|
+
var mixins, len, idx, layerId, bgcolor, cursor, classNames;
|
1020
|
+
|
1021
|
+
// do some initial setup only needed at create time.
|
1386
1022
|
if (firstTime) {
|
1387
|
-
|
1388
|
-
|
1389
|
-
this.
|
1023
|
+
// TODO: seems like things will break later if SC.guidFor(this) is used
|
1024
|
+
|
1025
|
+
layerId = this.layerId ? this.get('layerId') : SC.guidFor(this) ;
|
1026
|
+
context.id(layerId).classNames(this.get('classNames'), YES) ;
|
1027
|
+
this.renderLayout(context, firstTime) ;
|
1028
|
+
}else{
|
1029
|
+
context.resetClassNames();
|
1030
|
+
context.classNames(this.get('classNames'), YES);
|
1390
1031
|
}
|
1032
|
+
|
1033
|
+
// do some standard setup...
|
1034
|
+
classNames = [];
|
1035
|
+
if (this.get('isTextSelectable')) classNames.push('allow-select') ;
|
1036
|
+
if (!this.get('isEnabled')) classNames.push('disabled') ;
|
1037
|
+
if (!this.get('isVisible')) classNames.push('hidden') ;
|
1038
|
+
if (this.get('isFirstResponder')) classNames.push('focus');
|
1039
|
+
if (this.get('useStaticLayout')) classNames.push('sc-static-layout');
|
1040
|
+
|
1041
|
+
bgcolor = this.get('backgroundColor');
|
1042
|
+
if (bgcolor) context.addStyle('backgroundColor', bgcolor);
|
1043
|
+
|
1044
|
+
// Sets cursor class, if present.
|
1045
|
+
cursor = this.get('cursor');
|
1046
|
+
if (!cursor && this.get('shouldInheritCursor')) {
|
1047
|
+
// If this view has no cursor and should inherit it from the parent,
|
1048
|
+
// then it sets its own cursor view. This sets the cursor rather than
|
1049
|
+
// simply using the parent's cursor object so that its cursorless
|
1050
|
+
// childViews can also inherit it.
|
1051
|
+
cursor = this.getPath('parentView.cursor');
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
if (SC.typeOf(cursor) === SC.T_STRING) {
|
1055
|
+
cursor = SC.objectForPropertyPath(cursor);
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
if (cursor instanceof SC.Cursor) {
|
1059
|
+
classNames.push(cursor.get('className')) ;
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
// Doing a single call to 'addClass' is faster than multiple.
|
1063
|
+
context.addClass(classNames);
|
1064
|
+
|
1065
|
+
this.beginPropertyChanges() ;
|
1066
|
+
this.set('layerNeedsUpdate', NO) ;
|
1067
|
+
this.render(context, firstTime) ;
|
1068
|
+
if (mixins = this.renderMixin) {
|
1069
|
+
len = mixins.length;
|
1070
|
+
for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, firstTime) ;
|
1071
|
+
}
|
1072
|
+
this.endPropertyChanges() ;
|
1391
1073
|
},
|
1392
1074
|
|
1393
1075
|
/**
|
@@ -1396,62 +1078,21 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1396
1078
|
walk down the childView chain, rendering all of the children in a nested
|
1397
1079
|
way.
|
1398
1080
|
|
1399
|
-
If a context is provided, it is always assumed to be firstTime.
|
1400
|
-
|
1401
|
-
@deprecated In SproutCore 1.1. Use renderContent and updateContent explicitly instead.
|
1402
1081
|
@param {SC.RenderContext} context the context
|
1403
1082
|
@param {Boolean} firstName true if the layer is being created
|
1404
1083
|
@returns {SC.RenderContext} the render context
|
1405
|
-
@test in render
|
1084
|
+
@test in render
|
1406
1085
|
*/
|
1407
1086
|
renderChildViews: function(context, firstTime) {
|
1408
|
-
if (firstTime || context) {
|
1409
|
-
// we pass along firstTime for compatibility. Some older (less wise) views may
|
1410
|
-
// think it will work. Well, it wouldn't, but we'll make it work.
|
1411
|
-
this.renderContent(context, firstTime);
|
1412
|
-
} else {
|
1413
|
-
this.updateContent(context);
|
1414
|
-
}
|
1415
|
-
return context;
|
1416
|
-
},
|
1417
|
-
|
1418
|
-
/**
|
1419
|
-
@private
|
1420
|
-
Views are content suppliers for renderers. That is, views pass themselves to renderers
|
1421
|
-
for renderers' "content" properties. Content providers have two functions: renderContent and updateContent.
|
1422
|
-
This is the first of those.
|
1423
|
-
|
1424
|
-
@param {SC.RenderContext} context
|
1425
|
-
@param {Boolean} firstTime For compatibility (do not use; if not first time, call updateContent).
|
1426
|
-
*/
|
1427
|
-
renderContent: function(context, firstTime) {
|
1428
1087
|
var cv = this.get('childViews'), len = cv.length, idx, view ;
|
1429
1088
|
for (idx=0; idx<len; ++idx) {
|
1430
1089
|
view = cv[idx] ;
|
1431
1090
|
if (!view) continue;
|
1432
1091
|
context = context.begin(view.get('tagName')) ;
|
1433
|
-
view.
|
1092
|
+
view.prepareContext(context, firstTime) ;
|
1434
1093
|
context = context.end() ;
|
1435
1094
|
}
|
1436
|
-
|
1437
|
-
|
1438
|
-
/**
|
1439
|
-
@private
|
1440
|
-
Views are content suppliers for renderers. That is, views pass themselves to renderers
|
1441
|
-
for renderers' "content" properties. Content providers have two functions: renderContent and updateContent.
|
1442
|
-
This is the first of those.
|
1443
|
-
|
1444
|
-
For old-style rendering, the render context created by the parent renderer is passed along
|
1445
|
-
as well.
|
1446
|
-
*/
|
1447
|
-
updateContent: function(optionalContext) {
|
1448
|
-
var cv = this.get('childViews'), len = cv.length, idx, view ;
|
1449
|
-
for (idx=0; idx<len; ++idx) {
|
1450
|
-
view = cv[idx] ;
|
1451
|
-
if (!view) continue;
|
1452
|
-
|
1453
|
-
view.updateLayer(optionalContext);
|
1454
|
-
}
|
1095
|
+
return context ;
|
1455
1096
|
},
|
1456
1097
|
|
1457
1098
|
/**
|
@@ -1473,18 +1114,9 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1473
1114
|
@param {SC.RenderContext} context the render context
|
1474
1115
|
@param {Boolean} firstTime YES if this is creating a layer
|
1475
1116
|
@returns {void}
|
1476
|
-
*/
|
1117
|
+
*/
|
1477
1118
|
render: function(context, firstTime) {
|
1478
|
-
|
1479
|
-
if (this.createRenderer && renderer) {
|
1480
|
-
if (firstTime) {
|
1481
|
-
renderer.render(context);
|
1482
|
-
} else {
|
1483
|
-
renderer.update();
|
1484
|
-
}
|
1485
|
-
} else {
|
1486
|
-
if (firstTime) this.renderChildViews(context, firstTime);
|
1487
|
-
}
|
1119
|
+
if (firstTime) this.renderChildViews(context, firstTime) ;
|
1488
1120
|
},
|
1489
1121
|
|
1490
1122
|
|
@@ -1505,6 +1137,16 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1505
1137
|
}
|
1506
1138
|
},
|
1507
1139
|
|
1140
|
+
childViewsObserver: function(){
|
1141
|
+
var childViews = this.get('childViews'), i, iLen, child;
|
1142
|
+
for(i=0, iLen = childViews.length; i<iLen; i++){
|
1143
|
+
child = childViews[i];
|
1144
|
+
if(child._notifyDidAppendToDocument){
|
1145
|
+
child._notifyDidAppendToDocument();
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
}.observes('childViews'),
|
1149
|
+
|
1508
1150
|
// ..........................................................
|
1509
1151
|
// STANDARD RENDER PROPERTIES
|
1510
1152
|
//
|
@@ -1551,11 +1193,18 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1551
1193
|
You can set this array to include any properties that should immediately
|
1552
1194
|
invalidate the display. The display will be automatically invalidated
|
1553
1195
|
when one of these properties change.
|
1554
|
-
|
1196
|
+
|
1197
|
+
Implementation note: 'isVisible' is also effectively a display property,
|
1198
|
+
but it is not declared as such because the same effect is implemented
|
1199
|
+
inside _sc_isVisibleDidChange(). This avoids having two observers on
|
1200
|
+
'isVisible', which is:
|
1201
|
+
a. More efficient
|
1202
|
+
b. More correct, because we can guarantee the order of operations
|
1203
|
+
|
1555
1204
|
@property {Array}
|
1556
1205
|
@readOnly
|
1557
1206
|
*/
|
1558
|
-
displayProperties: ['isFirstResponder'
|
1207
|
+
displayProperties: ['isFirstResponder'],
|
1559
1208
|
|
1560
1209
|
/**
|
1561
1210
|
You can set this to an SC.Cursor instance; its class name will
|
@@ -1603,7 +1252,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1603
1252
|
*/
|
1604
1253
|
updateLayerLocationIfNeeded: function(force) {
|
1605
1254
|
if (this.get('layerLocationNeedsUpdate')) {
|
1606
|
-
this.set('layerLocationNeedsUpdate', NO) ;
|
1607
1255
|
this.updateLayerLocation() ;
|
1608
1256
|
}
|
1609
1257
|
return this ;
|
@@ -1667,6 +1315,9 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1667
1315
|
}
|
1668
1316
|
|
1669
1317
|
parentNode = parentView = node = nextNode = null ; // avoid memory leaks
|
1318
|
+
|
1319
|
+
this.set('layerLocationNeedsUpdate', NO) ;
|
1320
|
+
|
1670
1321
|
return this ;
|
1671
1322
|
},
|
1672
1323
|
|
@@ -1824,7 +1475,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1824
1475
|
*/
|
1825
1476
|
nextValidKeyView: function() {
|
1826
1477
|
var seen = [],
|
1827
|
-
rootView = this.pane
|
1478
|
+
rootView = this.get('pane'), ret = this.get('nextKeyView');
|
1828
1479
|
|
1829
1480
|
if(!ret) ret = rootView._computeNextValidKeyView(this, seen);
|
1830
1481
|
|
@@ -1889,7 +1540,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1889
1540
|
return this;
|
1890
1541
|
}
|
1891
1542
|
seen.push(this); // avoid cycles
|
1892
|
-
|
1543
|
+
|
1893
1544
|
// find next sibling
|
1894
1545
|
if (!ret) {
|
1895
1546
|
children = this.get('childViews');
|
@@ -1904,7 +1555,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1904
1555
|
}
|
1905
1556
|
return ret ;
|
1906
1557
|
},
|
1907
|
-
|
1558
|
+
|
1908
1559
|
// .......................................................
|
1909
1560
|
// CORE DISPLAY METHODS
|
1910
1561
|
//
|
@@ -1919,45 +1570,15 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
1919
1570
|
var parentView, path, root, idx, len, lp, dp ;
|
1920
1571
|
|
1921
1572
|
sc_super() ;
|
1922
|
-
|
1923
|
-
//
|
1924
|
-
|
1925
|
-
|
1926
|
-
this.set("baseTheme", baseTheme);
|
1927
|
-
|
1928
|
-
var theme = this.theme;
|
1929
|
-
this.theme = this._themeProperty;
|
1930
|
-
this.set("theme", theme);
|
1931
|
-
|
1932
|
-
// find render path (to be removed in SC 2.0?)
|
1933
|
-
var renderAge = -1, rendererAge = -1, currentAge = 0, c = this.constructor;
|
1934
|
-
while (c && c.prototype.render) {
|
1935
|
-
if (renderAge < 0 && c.prototype.render !== this.render) renderAge = currentAge;
|
1936
|
-
if (rendererAge < 0 && c.prototype.createRenderer !== this.createRenderer) rendererAge = currentAge;
|
1937
|
-
if (rendererAge >= 0 && renderAge >= 0) break;
|
1938
|
-
currentAge = currentAge + 1;
|
1939
|
-
c = c.superclass;
|
1940
|
-
}
|
1941
|
-
|
1942
|
-
// which one?
|
1943
|
-
if (renderAge < rendererAge && renderAge >= 0) {
|
1944
|
-
this._useRenderFirst = YES;
|
1945
|
-
} else {
|
1946
|
-
this._useRenderFirst = NO;
|
1947
|
-
}
|
1948
|
-
|
1949
|
-
// register for event handling now if we're not a materialized view
|
1950
|
-
// (materialized views register themselves as needed)
|
1951
|
-
if (!this.get('isMaterialized')) {
|
1952
|
-
SC.View.views[this.get('layerId')] = this ;
|
1953
|
-
}
|
1954
|
-
|
1573
|
+
|
1574
|
+
// Register this view for event handling
|
1575
|
+
SC.View.views[this.get('layerId')] = this ;
|
1576
|
+
|
1955
1577
|
var childViews = this.get('childViews');
|
1956
1578
|
|
1957
1579
|
// setup child views. be sure to clone the child views array first
|
1958
1580
|
this.childViews = childViews ? childViews.slice() : [] ;
|
1959
1581
|
this.createChildViews() ; // setup child Views
|
1960
|
-
this._hasCreatedChildViews = YES;
|
1961
1582
|
|
1962
1583
|
// register display property observers ..
|
1963
1584
|
// TODO: Optimize into class setup
|
@@ -2139,8 +1760,16 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2139
1760
|
// If the key is 'layout', we need to call layoutDidChange() immediately
|
2140
1761
|
// so that if the frame has changed any cached values (for both this view
|
2141
1762
|
// and any child views) can be appropriately invalidated.
|
2142
|
-
|
2143
|
-
|
1763
|
+
|
1764
|
+
// To allow layout to be a computed property, we check if any property has
|
1765
|
+
// changed and if layout is dependent on the property.
|
1766
|
+
// If it is we call layoutDidChange.
|
1767
|
+
var layoutChange=false;
|
1768
|
+
if(typeof this.layout === "function" && this._kvo_dependents) {
|
1769
|
+
var dependents = this._kvo_dependents[key];
|
1770
|
+
if(dependents && dependents.indexOf('layout')!=-1) layoutChange = true;
|
1771
|
+
}
|
1772
|
+
if(key==='layout' || layoutChange) this.layoutDidChange();
|
2144
1773
|
// Resume notification as usual.
|
2145
1774
|
sc_super();
|
2146
1775
|
},
|
@@ -2199,216 +1828,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2199
1828
|
|
2200
1829
|
return this ;
|
2201
1830
|
},
|
2202
|
-
|
2203
|
-
|
2204
|
-
/**
|
2205
|
-
Animate a given property using CSS animations.
|
2206
|
-
|
2207
|
-
Takes a key, value and either a duration, or a hash of options.
|
2208
|
-
The options hash has the following parameters
|
2209
|
-
- duration: Duration of animation in seconds
|
2210
|
-
- callback: Callback method to run when animation completes
|
2211
|
-
- timing: Animation timing function
|
2212
|
-
|
2213
|
-
@param {String|Hash} key
|
2214
|
-
@param {Object} value
|
2215
|
-
@params {Number|Hash} duration or options
|
2216
|
-
@returns {SC.View} receiver
|
2217
|
-
*/
|
2218
|
-
animate: function(keyOrHash, valueOrOptions, optionsOrCallback, callback) {
|
2219
|
-
var hash, options;
|
2220
|
-
|
2221
|
-
if (SC.typeOf(keyOrHash) === SC.T_HASH) {
|
2222
|
-
hash = keyOrHash;
|
2223
|
-
options = valueOrOptions;
|
2224
|
-
callback = optionsOrCallback;
|
2225
|
-
} else {
|
2226
|
-
hash = {};
|
2227
|
-
hash[keyOrHash] = valueOrOptions;
|
2228
|
-
options = optionsOrCallback;
|
2229
|
-
}
|
2230
|
-
|
2231
|
-
if (SC.typeOf(options) === SC.T_NUMBER) {
|
2232
|
-
options = { duration: options };
|
2233
|
-
} else if (SC.typeOf(options) !== SC.T_HASH) {
|
2234
|
-
throw "Must provide options hash or duration!";
|
2235
|
-
}
|
2236
|
-
|
2237
|
-
if (callback) options.callback = callback;
|
2238
|
-
|
2239
|
-
|
2240
|
-
var layout = SC.clone(this.get('layout')), didChange = NO, value, cur, animValue, curAnim;
|
2241
|
-
|
2242
|
-
for(key in hash) {
|
2243
|
-
if (!hash.hasOwnProperty(key)) continue;
|
2244
|
-
value = hash[key];
|
2245
|
-
cur = layout[key];
|
2246
|
-
|
2247
|
-
if (SC.ANIMATABLE_PROPERTIES.contains(key)) {
|
2248
|
-
curAnim = layout['animate'+key.capitalize()];
|
2249
|
-
|
2250
|
-
if (value === null || value === undefined) {
|
2251
|
-
throw "Can only animate to an actual value!";
|
2252
|
-
} else {
|
2253
|
-
if (cur !== value) didChange = YES;
|
2254
|
-
|
2255
|
-
// FIXME: We should check more than duration
|
2256
|
-
// Also, will we allow people to just set a number instead of a hash? If so, we have to account for that.
|
2257
|
-
if (curAnim && curAnim.duration !== options.duration) didChange = YES ;
|
2258
|
-
|
2259
|
-
layout[key] = value ;
|
2260
|
-
|
2261
|
-
// I'm pretty sure we want to be cloning this because we may be applying it
|
2262
|
-
// to multiple properties which can be edited independently
|
2263
|
-
layout['animate'+key.capitalize()] = SC.clone(options);
|
2264
|
-
}
|
2265
|
-
} else {
|
2266
|
-
if (cur !== value) didChange = YES;
|
2267
|
-
layout[key] = value;
|
2268
|
-
}
|
2269
|
-
}
|
2270
|
-
|
2271
|
-
// now set adjusted layout
|
2272
|
-
if (didChange) this.set('layout', layout) ;
|
2273
|
-
|
2274
|
-
return this ;
|
2275
|
-
},
|
2276
|
-
|
2277
|
-
/**
|
2278
|
-
Resets animation, stopping all existing animations.
|
2279
|
-
*/
|
2280
|
-
resetAnimation: function() {
|
2281
|
-
var layout = this.get('layout'), didChange = NO, key;
|
2282
|
-
for (key in layout) {
|
2283
|
-
if (key.substring(0,7) === 'animate') {
|
2284
|
-
didChange = YES;
|
2285
|
-
delete layout[key];
|
2286
|
-
}
|
2287
|
-
}
|
2288
|
-
if (didChange) {
|
2289
|
-
this.set('layout', layout);
|
2290
|
-
this.notifyPropertyChange('layout');
|
2291
|
-
}
|
2292
|
-
return this;
|
2293
|
-
},
|
2294
|
-
|
2295
|
-
_scv_willRenderAnimations: function(){
|
2296
|
-
if (SC.platform.supportsCSSTransitions) {
|
2297
|
-
var layer = this.get('layer'),
|
2298
|
-
currentStyle = layer ? layer.style : null,
|
2299
|
-
newStyle = this.get('layoutStyle'),
|
2300
|
-
transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"],
|
2301
|
-
layout = this.get('layout'),
|
2302
|
-
key;
|
2303
|
-
|
2304
|
-
// Handle existing animations
|
2305
|
-
if (this._activeAnimations) {
|
2306
|
-
for(key in this._activeAnimations){
|
2307
|
-
// TODO: Check for more than duration
|
2308
|
-
if (
|
2309
|
-
newStyle[key] !== currentStyle[key] ||
|
2310
|
-
!this._pendingAnimations || !this._pendingAnimations[key] ||
|
2311
|
-
this._activeAnimations[key].duration !== this._pendingAnimations[key].duration
|
2312
|
-
) {
|
2313
|
-
var callback = this._activeAnimations[key].callback;
|
2314
|
-
if (callback) {
|
2315
|
-
if (this._animatedTransforms && this._animatedTransforms.length > 0) {
|
2316
|
-
for (idx=0; idx < this._animatedTransforms.length; idx++) {
|
2317
|
-
this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES);
|
2318
|
-
}
|
2319
|
-
this._animatedTransforms = null;
|
2320
|
-
} else {
|
2321
|
-
this._scv_runAnimationCallback(callback, null, key, YES);
|
2322
|
-
}
|
2323
|
-
}
|
2324
|
-
|
2325
|
-
this._scv_removeAnimationFromLayout(key, YES);
|
2326
|
-
}
|
2327
|
-
}
|
2328
|
-
}
|
2329
|
-
|
2330
|
-
this._activeAnimations = this._pendingAnimations;
|
2331
|
-
this._pendingAnimations = null;
|
2332
|
-
} else {
|
2333
|
-
// Transitions not supported
|
2334
|
-
var key;
|
2335
|
-
for (key in this._pendingAnimations) {
|
2336
|
-
var callback = this._pendingAnimations[key].callback;
|
2337
|
-
if (callback) this._scv_runAnimationCallback(callback, null, key, NO);
|
2338
|
-
this._scv_removeAnimationFromLayout(key, NO, YES);
|
2339
|
-
}
|
2340
|
-
this._activeAnimations = this._pendingAnimations = null;
|
2341
|
-
}
|
2342
|
-
},
|
2343
|
-
|
2344
|
-
_scv_removeAnimationFromLayout: function(propertyName, updateStyle, isPending) {
|
2345
|
-
|
2346
|
-
if (updateStyle) {
|
2347
|
-
var layer = this.get('layer'),
|
2348
|
-
updatedCSS = [], key;
|
2349
|
-
for(key in this._activeAnimations) {
|
2350
|
-
if (key !== propertyName) updatedCSS.push(this._activeAnimations[key].css);
|
2351
|
-
}
|
2352
|
-
|
2353
|
-
// FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update
|
2354
|
-
layer.style[SC.platform.domCSSPrefix+"Transition"] = updatedCSS.join(', ');
|
2355
|
-
}
|
2356
|
-
|
2357
|
-
|
2358
|
-
var layout = this.get('layout');
|
2359
|
-
|
2360
|
-
if (propertyName === '-'+SC.platform.cssPrefix+'-transform' && this._animatedTransforms && this._animatedTransforms.length > 0) {
|
2361
|
-
for(idx=0; idx < this._animatedTransforms.length; idx++) {
|
2362
|
-
delete layout['animate'+this._animatedTransforms[idx].capitalize()];
|
2363
|
-
}
|
2364
|
-
this._animatedTransforms = null;
|
2365
|
-
}
|
2366
|
-
delete layout['animate'+propertyName.capitalize()];
|
2367
|
-
|
2368
|
-
if (!isPending) delete this._activeAnimations[propertyName];
|
2369
|
-
},
|
2370
|
-
|
2371
|
-
_scv_runAnimationCallback: function(callback, evt, propertyName, cancelled) {
|
2372
|
-
if (callback) {
|
2373
|
-
if (SC.typeOf(callback) !== SC.T_HASH) callback = { action: callback };
|
2374
|
-
callback.source = this;
|
2375
|
-
if (!callback.target) callback.target = this;
|
2376
|
-
}
|
2377
|
-
SC.View.runCallback(callback, { event: evt, propertyName: propertyName, view: this, isCancelled: cancelled });
|
2378
|
-
},
|
2379
|
-
|
2380
|
-
/**
|
2381
|
-
Called when animation ends, should not usually be called manually
|
2382
|
-
*/
|
2383
|
-
_scv_animationEnd: function(evt){
|
2384
|
-
// WARNING: Sometimes this will get called more than once for a property. Not sure why.
|
2385
|
-
|
2386
|
-
var propertyName = evt.originalEvent.propertyName,
|
2387
|
-
layout = this.get('layout'),
|
2388
|
-
animation;
|
2389
|
-
|
2390
|
-
animation = this._activeAnimations ? this._activeAnimations[propertyName] : null;
|
2391
|
-
|
2392
|
-
if(animation) {
|
2393
|
-
if (animation.callback) {
|
2394
|
-
// Charles says this is a good idea
|
2395
|
-
SC.RunLoop.begin();
|
2396
|
-
// We're using invokeLater so we don't trigger any layout changes from the callbacks until the animations are done
|
2397
|
-
if (this._animatedTransforms && this._animatedTransforms.length > 0) {
|
2398
|
-
for (idx=0; idx < this._animatedTransforms.length; idx++) {
|
2399
|
-
this.invokeLater('_scv_runAnimationCallback', 1, animation.callback, evt, this._animatedTransforms[idx], NO);
|
2400
|
-
}
|
2401
|
-
} else {
|
2402
|
-
this.invokeLater('_scv_runAnimationCallback', 1, animation.callback, evt, propertyName, NO);
|
2403
|
-
}
|
2404
|
-
SC.RunLoop.end();
|
2405
|
-
}
|
2406
|
-
|
2407
|
-
this._scv_removeAnimationFromLayout(propertyName, YES);
|
2408
|
-
}
|
2409
|
-
},
|
2410
|
-
|
2411
|
-
|
1831
|
+
|
2412
1832
|
/**
|
2413
1833
|
The layout describes how you want your view to be positions on the
|
2414
1834
|
screen. You can define the following properties:
|
@@ -2486,7 +1906,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2486
1906
|
|
2487
1907
|
/**
|
2488
1908
|
Converts a frame offset in the coordinates of another view system to the
|
2489
|
-
|
1909
|
+
receiver's view.
|
2490
1910
|
|
2491
1911
|
Note that the convext of a view's frame is relative to the view's
|
2492
1912
|
parentFrame. For example, if you want to convert the frame of view that
|
@@ -2628,6 +2048,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2628
2048
|
dH = pdim.height;
|
2629
2049
|
dW = pdim.width;
|
2630
2050
|
|
2051
|
+
|
2631
2052
|
// handle left aligned and left/right
|
2632
2053
|
if (!SC.none(lL)) {
|
2633
2054
|
if(SC.isPercentage(lL)){
|
@@ -2647,7 +2068,9 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2647
2068
|
// handle right aligned
|
2648
2069
|
} else if (!SC.none(lR)) {
|
2649
2070
|
if (SC.none(lW)) {
|
2650
|
-
if (SC.isPercentage(
|
2071
|
+
if (SC.isPercentage(lR)) {
|
2072
|
+
f.width = dW - (dW*lR) ;
|
2073
|
+
}
|
2651
2074
|
else f.width = dW - lR ;
|
2652
2075
|
f.x = 0 ;
|
2653
2076
|
} else {
|
@@ -2833,7 +2256,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2833
2256
|
@property {Rect}
|
2834
2257
|
*/
|
2835
2258
|
contentClippingFrame: function() {
|
2836
|
-
return this.get(
|
2259
|
+
return this.get('clippingFrame');
|
2837
2260
|
}.property('clippingFrame').cacheable(),
|
2838
2261
|
|
2839
2262
|
/** @private
|
@@ -2854,7 +2277,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2854
2277
|
// frame changes should be sent all the time unless this property is
|
2855
2278
|
// present to indicate that we want the old 1.0 API behavior instead.
|
2856
2279
|
//
|
2857
|
-
if (!cv.
|
2280
|
+
if (!cv.hasStaticLayout) {
|
2858
2281
|
cv.notifyPropertyChange('clippingFrame') ;
|
2859
2282
|
cv._sc_view_clippingFrameDidChange();
|
2860
2283
|
}
|
@@ -2872,25 +2295,42 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2872
2295
|
@test in viewDidResize
|
2873
2296
|
*/
|
2874
2297
|
parentViewDidResize: function() {
|
2875
|
-
var
|
2876
|
-
|
2877
|
-
//
|
2878
|
-
//
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2298
|
+
var frameMayHaveChanged, layout, isFixed, isPercentageFunc, isPercentage;
|
2299
|
+
|
2300
|
+
// If this view uses static layout, our "do we think the frame changed?"
|
2301
|
+
// logic is not applicable and we simply have to assume that the frame may
|
2302
|
+
// have changed.
|
2303
|
+
if (this.useStaticLayout) {
|
2304
|
+
frameMayHaveChanged = YES;
|
2305
|
+
}
|
2306
|
+
else {
|
2307
|
+
layout = this.get('layout');
|
2308
|
+
|
2309
|
+
// only resizes if the layout does something other than left/top - fixed
|
2310
|
+
// size.
|
2311
|
+
isFixed = (
|
2312
|
+
(layout.left !== undefined) && (layout.top !== undefined) &&
|
2313
|
+
(layout.width !== undefined) && (layout.height !== undefined)
|
2314
|
+
);
|
2315
|
+
|
2316
|
+
|
2317
|
+
// If it's fixed, our frame still could have changed if it's fixed to a
|
2318
|
+
// percentage of the parent.
|
2319
|
+
if (isFixed) {
|
2320
|
+
isPercentageFunc = SC.isPercentage;
|
2321
|
+
isPercentage = (isPercentageFunc(layout.left) ||
|
2322
|
+
isPercentageFunc(layout.top) ||
|
2323
|
+
isPercentageFunc(layout.width) ||
|
2324
|
+
isPercentageFunc(layout.right) ||
|
2325
|
+
isPercentageFunc(layout.centerX) ||
|
2326
|
+
isPercentageFunc(layout.centerY));
|
2327
|
+
}
|
2883
2328
|
|
2884
|
-
|
2885
|
-
|
2886
|
-
isPercentageFunc(layout.top) ||
|
2887
|
-
isPercentageFunc(layout.width) ||
|
2888
|
-
isPercentageFunc(layout.right) ||
|
2889
|
-
isPercentageFunc(layout.centerX) ||
|
2890
|
-
isPercentageFunc(layout.centerY));
|
2329
|
+
frameMayHaveChanged = (!isFixed || isPercentage);
|
2330
|
+
}
|
2891
2331
|
|
2892
2332
|
// Do we think there's a chance our frame will have changed as a result?
|
2893
|
-
if (
|
2333
|
+
if (frameMayHaveChanged) {
|
2894
2334
|
// There's a chance our frame changed. Invoke viewDidResize(), which
|
2895
2335
|
// will notify about our change to 'frame' (if it actually changed) and
|
2896
2336
|
// appropriately notify our child views.
|
@@ -2996,16 +2436,16 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
2996
2436
|
},
|
2997
2437
|
|
2998
2438
|
/**
|
2999
|
-
Setting wantsAcceleratedLayer to YES will use transforms to move the
|
3000
|
-
layer when available.
|
2439
|
+
Setting wantsAcceleratedLayer to YES will use 3d transforms to move the
|
2440
|
+
layer when available.
|
3001
2441
|
*/
|
3002
2442
|
wantsAcceleratedLayer: NO,
|
3003
2443
|
|
3004
2444
|
/**
|
3005
|
-
Specifies whether transforms can be used to move the layer.
|
2445
|
+
Specifies whether 3d transforms can be used to move the layer.
|
3006
2446
|
*/
|
3007
2447
|
hasAcceleratedLayer: function(){
|
3008
|
-
return this.get('wantsAcceleratedLayer') && SC.platform.
|
2448
|
+
return this.get('wantsAcceleratedLayer') && SC.platform.supportsAcceleratedLayers;
|
3009
2449
|
}.property('wantsAcceleratedLayer').cacheable(),
|
3010
2450
|
|
3011
2451
|
|
@@ -3036,66 +2476,30 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3036
2476
|
lMH = layout.maxHeight,
|
3037
2477
|
lcX = layout.centerX,
|
3038
2478
|
lcY = layout.centerY,
|
3039
|
-
|
3040
|
-
translateTop =
|
3041
|
-
translateLeft =
|
2479
|
+
hasAcceleratedLayer = this.get('hasAcceleratedLayer'),
|
2480
|
+
translateTop = 0,
|
2481
|
+
translateLeft = 0;
|
3042
2482
|
if (lW !== undefined && lW === SC.LAYOUT_AUTO && !stLayout) {
|
3043
|
-
error= SC.Error.desc("%@.layout() you cannot use width:auto if "
|
3044
|
-
"staticLayout is disabled","%@".fmt(this),-1);
|
2483
|
+
error= SC.Error.desc("%@.layout() you cannot use width:auto if "+
|
2484
|
+
"staticLayout is disabled".fmt(this),"%@".fmt(this),-1);
|
3045
2485
|
console.error(error.toString()) ;
|
3046
2486
|
throw error ;
|
3047
2487
|
}
|
3048
2488
|
|
3049
2489
|
if (lH !== undefined && lH === SC.LAYOUT_AUTO && !stLayout) {
|
3050
|
-
error = SC.Error.desc("%@.layout() you cannot use height:auto if "
|
3051
|
-
"staticLayout is disabled","%@".fmt(this),-1);
|
2490
|
+
error = SC.Error.desc("%@.layout() you cannot use height:auto if "+
|
2491
|
+
"staticLayout is disabled".fmt(this),"%@".fmt(this),-1);
|
3052
2492
|
console.error(error.toString()) ;
|
3053
2493
|
throw error ;
|
3054
2494
|
}
|
3055
2495
|
|
3056
|
-
if (SC.platform.supportsCSSTransforms) {
|
3057
|
-
// Check to see if we're using transforms
|
3058
|
-
var animatingTransforms = NO, transformAnimationDuration;
|
3059
|
-
for(key in layout){
|
3060
|
-
if (key.substring(0,7) === 'animate') {
|
3061
|
-
if (SC.CSS_TRANSFORM_MAP[key.substring(7).camelize()]) {
|
3062
|
-
animatingTransforms = YES;
|
3063
|
-
|
3064
|
-
if (this._pendingAnimations && this._pendingAnimations['-'+SC.platform.cssPrefix+'-transform']) {
|
3065
|
-
throw "Animations of transforms must be executed simultaneously!";
|
3066
|
-
}
|
3067
|
-
|
3068
|
-
// TODO: If we want to allow it to be set as just a number for duration we need to add support here
|
3069
|
-
if (transformAnimationDuration && layout[key].duration !== transformAnimationDuration) {
|
3070
|
-
console.warn("Can't animate transforms with different durations! Using first duration specified.");
|
3071
|
-
layout[key].duration = transformAnimationDuration;
|
3072
|
-
}
|
3073
|
-
transformAnimationDuration = layout[key].duration;
|
3074
|
-
|
3075
|
-
// FIXME: There will also be problems if we have conflicting timings and callbacks
|
3076
|
-
}
|
3077
|
-
}
|
3078
|
-
}
|
3079
|
-
|
3080
|
-
// If we're animating other transforms at different speeds, don't use acceleratedLayer
|
3081
|
-
if (
|
3082
|
-
animatingTransforms &&
|
3083
|
-
(
|
3084
|
-
(layout['animateTop'] && layout['animateTop'].duration !== transformAnimationDuration) ||
|
3085
|
-
(layout['animateLeft'] && layout['animateLeft'].duration !== transformAnimationDuration)
|
3086
|
-
)
|
3087
|
-
) {
|
3088
|
-
canUseAcceleratedLayer = NO;
|
3089
|
-
}
|
3090
|
-
}
|
3091
|
-
|
3092
2496
|
// X DIRECTION
|
3093
|
-
|
2497
|
+
|
3094
2498
|
// handle left aligned and left/right
|
3095
2499
|
if (!SC.none(lL)) {
|
3096
2500
|
if(SC.isPercentage(lL)) {
|
3097
2501
|
ret.left = (lL*100)+"%"; //percentage left
|
3098
|
-
} else if (
|
2502
|
+
} else if (hasAcceleratedLayer && SC.empty(lR)) {
|
3099
2503
|
translateLeft = Math.floor(lL);
|
3100
2504
|
ret.left = 0;
|
3101
2505
|
} else {
|
@@ -3144,7 +2548,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3144
2548
|
ret.marginLeft = Math.floor(lcX - ret.width/2) ;
|
3145
2549
|
}else {
|
3146
2550
|
// This error message happens whenever width is not set.
|
3147
|
-
console.warn("You have to set width and centerX
|
2551
|
+
console.warn("You have to set width and centerX usign both percentages or pixels");
|
3148
2552
|
ret.marginLeft = "50%";
|
3149
2553
|
}
|
3150
2554
|
ret.right = null ;
|
@@ -3177,7 +2581,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3177
2581
|
if (!SC.none(lT)) {
|
3178
2582
|
if(SC.isPercentage(lT)) {
|
3179
2583
|
ret.top = (lT*100)+"%";
|
3180
|
-
} else if (
|
2584
|
+
} else if (hasAcceleratedLayer && SC.empty(lB)) {
|
3181
2585
|
translateTop = Math.floor(lT);
|
3182
2586
|
ret.top = 0;
|
3183
2587
|
} else {
|
@@ -3252,11 +2656,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3252
2656
|
|
3253
2657
|
// if zIndex is set, use it. otherwise let default shine through
|
3254
2658
|
ret.zIndex = SC.none(layout.zIndex) ? null : layout.zIndex.toString();
|
3255
|
-
|
3256
|
-
// if opacity is set, use it. otherwise let default shine through
|
3257
|
-
ret.opacity = SC.none(layout.opacity) ? null : layout.opacity.toString();
|
3258
|
-
ret.mozOpacity = ret.opacity; // older Firefox?
|
3259
|
-
|
2659
|
+
|
3260
2660
|
// if backgroundPosition is set, use it.
|
3261
2661
|
// otherwise let default shine through
|
3262
2662
|
ret.backgroundPosition = SC.none(layout.backgroundPosition) ?
|
@@ -3270,114 +2670,17 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3270
2670
|
if (ret[x]===0) ret[x]=null;
|
3271
2671
|
}
|
3272
2672
|
|
3273
|
-
if (
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
// FIXME: This is not the best way to do it, we should track these locally
|
3278
|
-
currentTransforms = (layer ? layer.style[transformAttribute] : '').split(' '),
|
3279
|
-
halTransforms, specialTransforms = [], idx;
|
3280
|
-
|
3281
|
-
if (canUseAcceleratedLayer) {
|
3282
|
-
// Remove previous transforms
|
3283
|
-
if (this._lastAcceleratedTransforms) currentTransforms.removeObjects(this._lastAcceleratedTransforms);
|
3284
|
-
|
3285
|
-
halTransforms = ['translateX('+(translateLeft || 0)+'px)', 'translateY('+(translateTop || 0)+'px)'];
|
3286
|
-
|
3287
|
-
// FIXME: This join.match is a bit hackish
|
3288
|
-
if (SC.platform.supportsCSS3DTransforms && !currentTransforms.join(' ').match('translateZ')) {
|
3289
|
-
halTransforms.push('translateZ(0px)');
|
3290
|
-
}
|
3291
|
-
|
3292
|
-
// Store for next time
|
3293
|
-
this._lastAcceleratedTransforms = halTransforms;
|
3294
|
-
}
|
3295
|
-
|
3296
|
-
// Handle special CSS transform attributes
|
3297
|
-
var specialTransforms = [], transformName;
|
3298
|
-
for(transformName in SC.CSS_TRANSFORM_MAP) {
|
3299
|
-
var cleanedTransforms = [], idx;
|
3300
|
-
for(idx=0; idx < currentTransforms.length; idx++) {
|
3301
|
-
if (!currentTransforms[idx].match(new RegExp('^'+transformName+'\\\('))) {
|
3302
|
-
cleanedTransforms.push(currentTransforms[idx]);
|
3303
|
-
}
|
3304
|
-
}
|
3305
|
-
currentTransforms = cleanedTransforms;
|
3306
|
-
|
3307
|
-
if (layout[transformName]) {
|
3308
|
-
specialTransforms.push(SC.CSS_TRANSFORM_MAP[transformName](layout[transformName]));
|
3309
|
-
}
|
3310
|
-
}
|
3311
|
-
specialTransforms = specialTransforms.join(' ');
|
3312
|
-
|
3313
|
-
var allTransforms = currentTransforms.concat(halTransforms, specialTransforms).without(undefined).without('').join(' ');
|
3314
|
-
|
3315
|
-
// Set transform attribute
|
3316
|
-
if (allTransforms !== '') ret[transformAttribute] = allTransforms;
|
3317
|
-
}
|
3318
|
-
|
3319
|
-
// Temporary fix to not break SC.Animatable
|
3320
|
-
if (!this.isAnimatable) {
|
3321
|
-
|
3322
|
-
// Handle animations
|
3323
|
-
var transitions = [], animation, propertyKey;
|
3324
|
-
this._animatedTransforms = [];
|
3325
|
-
|
3326
|
-
for(key in layout) {
|
3327
|
-
if (key.substring(0,7) === 'animate') {
|
3328
|
-
// FIXME: If we want to allow it to be set as just a number for duration we need to add support here
|
3329
|
-
animation = layout[key];
|
3330
|
-
|
3331
|
-
if (animation.timing) {
|
3332
|
-
if (SC.typeOf(animation.timing) != SC.T_STRING) {
|
3333
|
-
animation.timing = "cubic-bezier("+animation.timing[0]+", "+animation.timing[1]+", "+
|
3334
|
-
animation.timing[2]+", "+animation.timing[3]+")";
|
3335
|
-
}
|
3336
|
-
} else {
|
3337
|
-
animation.timing = 'linear';
|
3338
|
-
}
|
3339
|
-
|
3340
|
-
propertyKey = key.substring(7).camelize();
|
3341
|
-
|
3342
|
-
// TODO: This is a weird conditional, we can probably clean it up
|
3343
|
-
if (
|
3344
|
-
SC.platform.supportsCSSTransforms &&
|
3345
|
-
(
|
3346
|
-
(
|
3347
|
-
canUseAcceleratedLayer && (
|
3348
|
-
(propertyKey === 'top' && !SC.empty(translateTop)) ||
|
3349
|
-
(propertyKey === 'left' && !SC.empty(translateLeft))
|
3350
|
-
)
|
3351
|
-
) ||
|
3352
|
-
SC.CSS_TRANSFORM_MAP[propertyKey]
|
3353
|
-
)
|
3354
|
-
) {
|
3355
|
-
this._animatedTransforms.push(propertyKey);
|
3356
|
-
propertyKey = '-'+SC.platform.cssPrefix+'-transform';
|
3357
|
-
}
|
3358
|
-
|
3359
|
-
animation.css = propertyKey + " " + animation.duration + "s " + animation.timing;
|
3360
|
-
|
3361
|
-
// If it's a transform this may have already been set
|
3362
|
-
if (!this._pendingAnimations) this._pendingAnimations = {};
|
3363
|
-
if (!this._pendingAnimations[propertyKey]) {
|
3364
|
-
this._pendingAnimations[propertyKey] = animation;
|
3365
|
-
transitions.push(animation.css);
|
3366
|
-
}
|
3367
|
-
}
|
3368
|
-
}
|
3369
|
-
|
3370
|
-
if (SC.platform.supportsCSSTransitions) ret[SC.platform.domCSSPrefix+"Transition"] = transitions.length > 0 ? transitions.join(", ") : null;
|
3371
|
-
|
2673
|
+
if (hasAcceleratedLayer) {
|
2674
|
+
var transform = 'translateX('+translateLeft+'px) translateY('+translateTop+'px)';
|
2675
|
+
if (SC.platform.supportsCSS3DTransforms) transform += ' translateZ(0px)'
|
2676
|
+
ret[SC.platform.domCSSPrefix+'Transform'] = transform;
|
3372
2677
|
}
|
3373
2678
|
|
3374
|
-
|
3375
2679
|
// convert any numbers into a number + "px".
|
3376
2680
|
for(key in ret) {
|
3377
2681
|
value = ret[key];
|
3378
2682
|
if (typeof value === SC.T_NUMBER) ret[key] = (value + "px");
|
3379
2683
|
}
|
3380
|
-
|
3381
2684
|
return ret ;
|
3382
2685
|
}.property().cacheable(),
|
3383
2686
|
|
@@ -3563,11 +2866,7 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3563
2866
|
@test in layoutChildViews
|
3564
2867
|
*/
|
3565
2868
|
renderLayout: function(context, firstTime) {
|
3566
|
-
this.
|
3567
|
-
layoutStyle: this.get('layoutStyle')
|
3568
|
-
});
|
3569
|
-
this._scv_willRenderAnimations();
|
3570
|
-
this._viewRenderer.render(context);
|
2869
|
+
context.addStyle(this.get('layoutStyle'));
|
3571
2870
|
},
|
3572
2871
|
|
3573
2872
|
/** walk like a duck */
|
@@ -3651,188 +2950,6 @@ SC.View = SC.Responder.extend(SC.DelegateSupport,
|
|
3651
2950
|
|
3652
2951
|
if (x > 100 || y > 100) return NO;
|
3653
2952
|
return YES;
|
3654
|
-
},
|
3655
|
-
|
3656
|
-
///
|
3657
|
-
/// BUILDING IN/OUT
|
3658
|
-
///
|
3659
|
-
|
3660
|
-
/**
|
3661
|
-
Call this to append a child while building it in. If the child is not
|
3662
|
-
buildable, this is the same as calling appendChild.
|
3663
|
-
*/
|
3664
|
-
buildInChild: function(view) {
|
3665
|
-
view.willBuildInToView(this);
|
3666
|
-
this.appendChild(view);
|
3667
|
-
view.buildInToView(this);
|
3668
|
-
},
|
3669
|
-
|
3670
|
-
/**
|
3671
|
-
Call to remove a child after building it out. If the child is not buildable,
|
3672
|
-
this will simply call removeChild.
|
3673
|
-
*/
|
3674
|
-
buildOutChild: function(view) {
|
3675
|
-
view.buildOutFromView(this);
|
3676
|
-
},
|
3677
|
-
|
3678
|
-
/**
|
3679
|
-
Called by child view when build in finishes. By default, does nothing.
|
3680
|
-
|
3681
|
-
*/
|
3682
|
-
buildInDidFinishFor: function(child) {
|
3683
|
-
},
|
3684
|
-
|
3685
|
-
/**
|
3686
|
-
@private
|
3687
|
-
Called by child view when build out finishes. By default removes the child view.
|
3688
|
-
*/
|
3689
|
-
buildOutDidFinishFor: function(child) {
|
3690
|
-
this.removeChild(child);
|
3691
|
-
},
|
3692
|
-
|
3693
|
-
/**
|
3694
|
-
Whether the view is currently building in.
|
3695
|
-
*/
|
3696
|
-
isBuildingIn: NO,
|
3697
|
-
|
3698
|
-
/**
|
3699
|
-
Whether the view is currently building out.
|
3700
|
-
*/
|
3701
|
-
isBuildingOut: NO,
|
3702
|
-
|
3703
|
-
/**
|
3704
|
-
Implement this, and call didFinishBuildIn when you are done.
|
3705
|
-
*/
|
3706
|
-
buildIn: function() {
|
3707
|
-
this.buildInDidFinish();
|
3708
|
-
},
|
3709
|
-
|
3710
|
-
/**
|
3711
|
-
Implement this, and call didFinsihBuildOut when you are done.
|
3712
|
-
*/
|
3713
|
-
buildOut: function() {
|
3714
|
-
this.buildOutDidFinish();
|
3715
|
-
},
|
3716
|
-
|
3717
|
-
/**
|
3718
|
-
This should reset (without animation) any internal states; sometimes called before.
|
3719
|
-
|
3720
|
-
It is usually called before a build in, by the parent view.
|
3721
|
-
*/
|
3722
|
-
resetBuild: function() {
|
3723
|
-
|
3724
|
-
},
|
3725
|
-
|
3726
|
-
/**
|
3727
|
-
Implement this if you need to do anything special when cancelling build out;
|
3728
|
-
note that buildIn will subsequently be called, so you usually won't need to do
|
3729
|
-
anything.
|
3730
|
-
|
3731
|
-
This is basically called whenever build in happens.
|
3732
|
-
*/
|
3733
|
-
buildOutDidCancel: function() {
|
3734
|
-
|
3735
|
-
},
|
3736
|
-
|
3737
|
-
/**
|
3738
|
-
Implement this if you need to do anything special when cancelling build in.
|
3739
|
-
You probably won't be able to do anything. I mean, what are you gonna do?
|
3740
|
-
|
3741
|
-
If build in was cancelled, it means build out is probably happening.
|
3742
|
-
So, any timers or anything you had going, you can cancel.
|
3743
|
-
Then buildOut will happen.
|
3744
|
-
*/
|
3745
|
-
buildInDidCancel: function() {
|
3746
|
-
|
3747
|
-
},
|
3748
|
-
|
3749
|
-
/**
|
3750
|
-
Call this when you have built in.
|
3751
|
-
*/
|
3752
|
-
buildInDidFinish: function() {
|
3753
|
-
this.isBuildingIn = NO;
|
3754
|
-
this._buildingInTo.buildInDidFinishFor(this);
|
3755
|
-
this._buildingInTo = null;
|
3756
|
-
},
|
3757
|
-
|
3758
|
-
/**
|
3759
|
-
Call this when you have finished building out.
|
3760
|
-
*/
|
3761
|
-
buildOutDidFinish: function() {
|
3762
|
-
this.isBuildingOut = NO;
|
3763
|
-
this._buildingOutFrom.buildOutDidFinishFor(this);
|
3764
|
-
this._buildingOutFrom = null;
|
3765
|
-
},
|
3766
|
-
|
3767
|
-
/**
|
3768
|
-
Usually called by parentViewDidChange, this resets the build state (calling resetBuild in the process).
|
3769
|
-
*/
|
3770
|
-
resetBuildState: function() {
|
3771
|
-
if (this.isBuildingIn) {
|
3772
|
-
this.buildInDidCancel();
|
3773
|
-
this.isBuildingIn = NO;
|
3774
|
-
}
|
3775
|
-
if (this.isBuildingOut) {
|
3776
|
-
this.buildOutDidCancel();
|
3777
|
-
this.isBuildingOut = NO;
|
3778
|
-
}
|
3779
|
-
|
3780
|
-
// finish cleaning up
|
3781
|
-
this.buildingInTo = null;
|
3782
|
-
this.buildingOutFrom = null;
|
3783
|
-
|
3784
|
-
this.resetBuild();
|
3785
|
-
},
|
3786
|
-
|
3787
|
-
/**
|
3788
|
-
@private (semi)
|
3789
|
-
Called by building parent view's buildInChild method. This prepares
|
3790
|
-
to build in, but unlike buildInToView, this is called _before_ the child
|
3791
|
-
is appended.
|
3792
|
-
|
3793
|
-
Mostly, this cancels any build out _before_ the view is removed through parent change.
|
3794
|
-
*/
|
3795
|
-
willBuildInToView: function(view) {
|
3796
|
-
// stop any current build outs (and if we need to, we also need to build in again)
|
3797
|
-
if (this.isBuildingOut) {
|
3798
|
-
this.buildOutDidCancel();
|
3799
|
-
}
|
3800
|
-
},
|
3801
|
-
|
3802
|
-
/**
|
3803
|
-
@private (semi)
|
3804
|
-
Called by building parent view's buildInChild method.
|
3805
|
-
*/
|
3806
|
-
buildInToView: function(view) {
|
3807
|
-
// if we are already building in, do nothing.
|
3808
|
-
if (this.isBuildingIn) return;
|
3809
|
-
|
3810
|
-
this._buildingInTo = view;
|
3811
|
-
this.isBuildingOut = NO;
|
3812
|
-
this.isBuildingIn = YES;
|
3813
|
-
this.buildIn();
|
3814
|
-
},
|
3815
|
-
|
3816
|
-
/**
|
3817
|
-
@private (semi)
|
3818
|
-
Called by building parent view's buildOutChild method.
|
3819
|
-
|
3820
|
-
The supplied view should always be the parent view.
|
3821
|
-
*/
|
3822
|
-
buildOutFromView: function(view) {
|
3823
|
-
// if we are already building out, do nothing.
|
3824
|
-
if (this.isBuildingOut) return;
|
3825
|
-
|
3826
|
-
// cancel any build ins
|
3827
|
-
if (this.isBuildingIn) {
|
3828
|
-
this.buildInDidCancel();
|
3829
|
-
}
|
3830
|
-
|
3831
|
-
// in any case, we need to build out
|
3832
|
-
this.isBuildingOut = YES;
|
3833
|
-
this.isBuildingIn = NO;
|
3834
|
-
this._buildingOutFrom = view;
|
3835
|
-
this.buildOut();
|
3836
2953
|
}
|
3837
2954
|
});
|
3838
2955
|
|
@@ -4192,40 +3309,5 @@ SC.View.unload = function() {
|
|
4192
3309
|
}
|
4193
3310
|
} ;
|
4194
3311
|
|
4195
|
-
SC.View.runCallback = function(callback){
|
4196
|
-
var additionalArgs = SC.$A(arguments).slice(1),
|
4197
|
-
typeOfAction = SC.typeOf(callback.action);
|
4198
|
-
|
4199
|
-
// if the action is a function, just try to call it.
|
4200
|
-
if (typeOfAction == SC.T_FUNCTION) {
|
4201
|
-
callback.action.apply(callback.target, additionalArgs);
|
4202
|
-
|
4203
|
-
// otherwise, action should be a string. If it has a period, treat it
|
4204
|
-
// like a property path.
|
4205
|
-
} else if (typeOfAction === SC.T_STRING) {
|
4206
|
-
if (callback.action.indexOf('.') >= 0) {
|
4207
|
-
var path = callback.action.split('.') ;
|
4208
|
-
var property = path.pop() ;
|
4209
|
-
|
4210
|
-
var target = SC.objectForPropertyPath(path, window) ;
|
4211
|
-
var action = target.get ? target.get(property) : target[property];
|
4212
|
-
if (action && SC.typeOf(action) == SC.T_FUNCTION) {
|
4213
|
-
action.apply(target, additionalArgs);
|
4214
|
-
} else {
|
4215
|
-
throw 'SC.Animator could not find a function at %@'.fmt(callback.action) ;
|
4216
|
-
}
|
4217
|
-
|
4218
|
-
// otherwise, try to execute action direction on target or send down
|
4219
|
-
// responder chain.
|
4220
|
-
// FIXME: Add support for additionalArgs to this
|
4221
|
-
// } else {
|
4222
|
-
// SC.RootResponder.responder.sendAction(callback.action, callback.target, callback.source, callback.source.get("pane"), null, callback.source);
|
4223
|
-
}
|
4224
|
-
}
|
4225
|
-
};
|
4226
|
-
|
4227
|
-
|
4228
3312
|
//unload views for IE, trying to collect memory.
|
4229
3313
|
if(SC.browser.msie) SC.Event.add(window, 'unload', SC.View, SC.View.unload) ;
|
4230
|
-
|
4231
|
-
|