sproutcore 1.6.0.beta.3-x86-mingw32 → 1.6.0.rc.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +33 -0
- data/Rakefile +213 -10
- data/VERSION.yml +1 -1
- data/lib/Buildfile +5 -1
- data/lib/buildtasks/manifest.rake +7 -1
- data/lib/frameworks/sproutcore/Buildfile +3 -2
- data/lib/frameworks/sproutcore/CHANGELOG.md +154 -1
- data/lib/frameworks/sproutcore/README.md +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +9 -0
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +254 -207
- data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +243 -172
- data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controls/button.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +36 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +14 -15
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +2 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +20 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +61 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +20 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +42 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controls/button.js +39 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +5 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +32 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +28 -17
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +396 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/{system → views}/bindable_span.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +78 -51
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +233 -67
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +15 -8
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +66 -55
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/data_source.js +190 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +15 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +212 -182
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +14 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +23 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/alert.css +49 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/a_sample_image.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/apple-logo1.jpeg +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/iframe.html +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css +20 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/drag.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/icons.css +214 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/cap.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/downbutton.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-cancel-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-down-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-error-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-48.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-left-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-redo-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-right-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-tools-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-undo-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-up-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-16.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-24.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-bottom.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-center.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-top.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/track.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/upbutton.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +145 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu.css +10 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +88 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/modal.css +3 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +91 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/picker.css +37 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/progress.css +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/radio.css +11 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +121 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/separator.css +20 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split_divider.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/tab.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/toolbar.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/touch-scroller.css +13 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/well.css +65 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +114 -103
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +7 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +4 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +9 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/{panes → views}/select_button.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +35 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +15 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +55 -13
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/benchmark.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/blank.gif +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/bootstrap.rhtml +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/button_view.css +36 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/checkbox_view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/debug/control-test-pane.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-logo.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/inline_editor.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +47 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/radio_view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/static_layout.css +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +130 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +5 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +0 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +6 -3
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +4 -73
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +189 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/ext/function.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/async.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/empty_state.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +7 -189
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +14 -78
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/debug/sequence_matcher.js +464 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +31 -11
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +6 -4
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +40 -6
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +22 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +44 -3
- data/lib/frameworks/sproutcore/frameworks/testing/core.js +61 -9
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/additions.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/runner.css +11 -2
- data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/testsuite.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +66 -27
- data/lib/frameworks/sproutcore/frameworks/testing/tests/spy_on.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/testing/tests/stub_method.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/core.css +24 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/fonts.css +39 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/reset.css +126 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/view.css +57 -0
- data/lib/frameworks/sproutcore/lib/index.rhtml +7 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +13 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +16 -14
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/gen/app/templates/apps/@target_name@/Buildfile +1 -4
- data/lib/gen/app/templates/apps/@target_name@/core.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/main.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +1 -4
- data/lib/gen/app/templates/apps/@target_name@/theme.js +1 -4
- data/lib/gen/controller/templates/controllers/{@filename@.js → @filename@_controller.js} +1 -4
- data/lib/gen/controller/templates/tests/controllers/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/data-source/templates/data_sources/{@filename@.js → @filename@_data_source.js} +1 -4
- data/lib/gen/design/templates/resources/@filename@.js +1 -4
- data/lib/gen/framework/templates/frameworks/@target_name@/core.js +1 -4
- data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -4
- data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -4
- data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +2 -0
- data/lib/gen/html_project/templates/@filename@/Buildfile +1 -4
- data/lib/gen/html_project/templates/@filename@/README +1 -4
- data/lib/gen/language/templates/@filename@/strings.js +1 -4
- data/lib/gen/model/templates/fixtures/{@filename@.js → @filename@_fixtures.js} +2 -5
- data/lib/gen/model/templates/models/{@filename@.js → @filename@_model.js} +1 -4
- data/lib/gen/model/templates/tests/models/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/page/templates/pages/@target_name@/Buildfile +1 -4
- data/lib/gen/page/templates/pages/@target_name@/core.js +1 -4
- data/lib/gen/page/templates/pages/@target_name@/en.lproj/strings.js +1 -4
- data/lib/gen/page/templates/pages/@target_name@/resources/body.css +3 -1
- data/lib/gen/project/templates/@filename@/Buildfile +1 -4
- data/lib/gen/project/templates/@filename@/README +1 -5
- data/lib/gen/responder/templates/states/{@filename@.js → @filename@_state.js} +1 -4
- data/lib/gen/test/templates/tests/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/theme/templates/themes/@target_name@/resources/theme_styles.css +1 -5
- data/lib/gen/theme/templates/themes/@target_name@/theme.js +1 -4
- data/lib/gen/view/templates/tests/views/{@filename@.js → @filename@_test.js} +1 -4
- data/lib/gen/view/templates/views/{@filename@.js → @filename@_view.js} +1 -4
- data/lib/sproutcore.rb +4 -1
- data/lib/sproutcore/builders/handlebars.rb +1 -1
- data/lib/sproutcore/builders/module.rb +2 -2
- data/lib/sproutcore/helpers/static_helper.rb +4 -2
- data/lib/sproutcore/models/generator.rb +22 -0
- data/lib/sproutcore/models/manifest_entry.rb +1 -0
- data/lib/sproutcore/models/target.rb +4 -1
- data/lib/sproutcore/rack/builder.rb +3 -0
- data/lib/sproutcore/tools.rb +11 -11
- data/lib/sproutcore/tools/init.rb +10 -22
- data/lib/sproutcore/tools/manifest.rb +21 -22
- data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +21 -1
- data/spec/fixtures/ordered_entries/apps/template_style/a.js +0 -0
- data/spec/fixtures/ordered_entries/apps/template_style/template_style.js +0 -0
- data/spec/lib/buildfile_commands/build_task_spec.rb +1 -1
- data/spec/lib/tools/manifest_spec.rb +11 -0
- data/sproutcore.gemspec +2 -2
- data/vendor/chance/lib/chance/instance.rb +3 -1
- metadata +150 -106
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +0 -378
- data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +0 -57
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +0 -56
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +0 -73
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +0 -916
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +0 -185
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +0 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +0 -101
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +0 -91
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +0 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +0 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +0 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +0 -132
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +0 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +0 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +0 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/well.css +0 -71
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +0 -40
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +0 -47
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +0 -146
- data/lib/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +0 -69
@@ -14,6 +14,8 @@ SC.STRING_TITLEIZE_REGEXP = (/([\s|\-|\_|\n])([^\s|\-|\_|\n]?)/g);
|
|
14
14
|
SC.STRING_DECAMELIZE_REGEXP = (/([a-z])([A-Z])/g);
|
15
15
|
SC.STRING_DASHERIZE_REGEXP = (/[ _]/g);
|
16
16
|
SC.STRING_DASHERIZE_CACHE = {};
|
17
|
+
SC.STRING_TRIM_LEFT_REGEXP = (/^\s+/g);
|
18
|
+
SC.STRING_TRIM_RIGHT_REGEXP = (/\s+$/g);
|
17
19
|
|
18
20
|
/**
|
19
21
|
@namespace
|
@@ -134,6 +136,8 @@ SC.mixin(SC.String, {
|
|
134
136
|
|
135
137
|
var args = SC.$A(arguments);
|
136
138
|
args.shift(); // remove str param
|
139
|
+
//to extend String.prototype
|
140
|
+
if(args.length>0 && args[0].isSCArray) args=args[0];
|
137
141
|
|
138
142
|
return SC.String.fmt(localized, args);
|
139
143
|
},
|
@@ -158,5 +162,62 @@ SC.mixin(SC.String, {
|
|
158
162
|
args.shift(); // remove def param
|
159
163
|
|
160
164
|
return SC.String.fmt(localized, args);
|
165
|
+
},
|
166
|
+
|
167
|
+
/**
|
168
|
+
Removes any extra whitespace from the edges of the string. This method is
|
169
|
+
also aliased as strip().
|
170
|
+
|
171
|
+
@returns {String} the trimmed string
|
172
|
+
*/
|
173
|
+
trim: jQuery.trim,
|
174
|
+
|
175
|
+
/**
|
176
|
+
Removes any extra whitespace from the left edge of the string.
|
177
|
+
|
178
|
+
@returns {String} the trimmed string
|
179
|
+
*/
|
180
|
+
trimLeft: function (str) {
|
181
|
+
return str.replace(SC.STRING_TRIM_LEFT_REGEXP,"");
|
182
|
+
},
|
183
|
+
|
184
|
+
/**
|
185
|
+
Removes any extra whitespace from the right edge of the string.
|
186
|
+
|
187
|
+
@returns {String} the trimmed string
|
188
|
+
*/
|
189
|
+
trimRight: function (str) {
|
190
|
+
return str.replace(SC.STRING_TRIM_RIGHT_REGEXP,"");
|
161
191
|
}
|
162
192
|
});
|
193
|
+
|
194
|
+
|
195
|
+
// IE doesn't support string trimming
|
196
|
+
if(String.prototype.trim) {
|
197
|
+
SC.supplement(String.prototype,
|
198
|
+
/** @scope String.prototype */ {
|
199
|
+
|
200
|
+
trim: function() {
|
201
|
+
return SC.String.trim(this, arguments);
|
202
|
+
},
|
203
|
+
|
204
|
+
trimLeft: function() {
|
205
|
+
return SC.String.trimLeft(this, arguments);
|
206
|
+
},
|
207
|
+
|
208
|
+
trimRight: function() {
|
209
|
+
return SC.String.trimRight(this, arguments);
|
210
|
+
}
|
211
|
+
});
|
212
|
+
}
|
213
|
+
|
214
|
+
// We want the version defined here, not in Runtime
|
215
|
+
SC.mixin(String.prototype,
|
216
|
+
/** @scope String.prototype */ {
|
217
|
+
|
218
|
+
loc: function() {
|
219
|
+
return SC.String.loc(this.toString(), SC.$A(arguments));
|
220
|
+
}
|
221
|
+
|
222
|
+
});
|
223
|
+
|
@@ -117,21 +117,35 @@ SC.mixin( /** @scope SC */ {
|
|
117
117
|
mobileBuildNumber = userAgent.substring(index + 7, index + 9);
|
118
118
|
|
119
119
|
if (parseInt(SC.browser.mobileSafari, 0) <= 532 || (mobileBuildNumber <= "8A")) {
|
120
|
-
result.left
|
121
|
-
result.top
|
120
|
+
result.left -= window.pageXOffset;
|
121
|
+
result.top -= window.pageYOffset;
|
122
122
|
}
|
123
123
|
}
|
124
124
|
|
125
125
|
// Subtract the scroll offset for viewport coordinates
|
126
126
|
if (relativeToFlag === 'viewport') {
|
127
|
-
|
128
|
-
|
127
|
+
|
128
|
+
if(SC.browser.isIE8OrLower){
|
129
|
+
result.left -= $(window).scrollLeft();
|
130
|
+
result.top -= $(window).scrollTop();
|
131
|
+
}else{
|
132
|
+
result.left -= window.pageXOffset;
|
133
|
+
result.top -= window.pageYOffset;
|
134
|
+
}
|
129
135
|
}
|
130
136
|
}
|
131
137
|
|
132
138
|
// Translate 'left', 'top' to 'x', 'y'
|
133
|
-
|
134
|
-
|
139
|
+
|
140
|
+
try{
|
141
|
+
result.x = result.left;
|
142
|
+
result.y = result.top;
|
143
|
+
} catch (e) {
|
144
|
+
// We need this for IE, when the element is detached, for some strange
|
145
|
+
// reason the object returned by element.getBoundingClientRect()
|
146
|
+
// is read-only
|
147
|
+
result = {x:result.left, y:result.top};
|
148
|
+
}
|
135
149
|
delete result.left;
|
136
150
|
delete result.top;
|
137
151
|
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js
CHANGED
@@ -287,6 +287,48 @@ test("should invalidate property when property on any enumerable changes", funct
|
|
287
287
|
equals(recomputed, 0, "does not recalculate after changing key on removed item");
|
288
288
|
});
|
289
289
|
|
290
|
+
test("should invalidate property when property of array item changes after content has changed", function() {
|
291
|
+
var inventory = [];
|
292
|
+
var recomputed = 0;
|
293
|
+
|
294
|
+
for (var idx = 0; idx < 20; idx++) {
|
295
|
+
inventory.pushObject(SC.Object.create({
|
296
|
+
price: 5
|
297
|
+
}));
|
298
|
+
}
|
299
|
+
var restaurant = SC.ArrayController.create({
|
300
|
+
content: [],
|
301
|
+
|
302
|
+
totalCost: function() {
|
303
|
+
recomputed++;
|
304
|
+
return inventory.reduce(function(prev, item) {
|
305
|
+
return prev+item.get('price');
|
306
|
+
}, 0);
|
307
|
+
}.property('@each.price').cacheable()
|
308
|
+
});
|
309
|
+
|
310
|
+
restaurant.set('content', inventory);
|
311
|
+
|
312
|
+
equals(restaurant.get('totalCost'), 100, "precond - computes cost of all items");
|
313
|
+
inventory[0].set('price', 6);
|
314
|
+
|
315
|
+
equals(restaurant.get('totalCost'), 101, "recalculates after dependent key on an enumerable item changes");
|
316
|
+
inventory[19].set('price', 6);
|
317
|
+
|
318
|
+
equals(restaurant.get('totalCost'), 102, "recalculates after dependent key on a different item changes");
|
319
|
+
inventory.pushObject(SC.Object.create({
|
320
|
+
price: 5
|
321
|
+
}));
|
322
|
+
equals(restaurant.get('totalCost'), 107, "recalculates after adding an item to the enumerable");
|
323
|
+
|
324
|
+
var item = inventory.popObject();
|
325
|
+
equals(restaurant.get('totalCost'), 102, "recalculates after removing an item from the enumerable");
|
326
|
+
|
327
|
+
recomputed = 0;
|
328
|
+
item.set('price', 0);
|
329
|
+
equals(recomputed, 0, "does not recalculate after changing key on removed item");
|
330
|
+
});
|
331
|
+
|
290
332
|
// ..........................................................
|
291
333
|
// VERIFY SC.ARRAY COMPLIANCE
|
292
334
|
//
|
@@ -1,78 +1,60 @@
|
|
1
|
-
var button;
|
1
|
+
var button, rootResponder, pane, expectedAction, targetObject, sendActionSpy;
|
2
2
|
|
3
3
|
module("SC.Button", {
|
4
4
|
setup: function() {
|
5
|
-
|
5
|
+
expectedAction = 'myAction';
|
6
|
+
targetObject = SC.Object.create({
|
7
|
+
myAction: function() {
|
8
|
+
}
|
9
|
+
});
|
10
|
+
|
11
|
+
var rootResponder = {sendAction: function(){} };
|
12
|
+
sendActionSpy = CoreTest.spyOn(rootResponder, 'sendAction');
|
6
13
|
|
7
|
-
pane = SC.
|
8
|
-
|
14
|
+
pane = SC.Object.create({
|
15
|
+
rootResponder: rootResponder
|
9
16
|
});
|
10
|
-
pane.append();
|
11
|
-
},
|
12
17
|
|
13
|
-
|
14
|
-
|
18
|
+
button = SC.Button.create({
|
19
|
+
target: targetObject,
|
20
|
+
action: 'myAction',
|
21
|
+
pane: pane
|
22
|
+
});
|
15
23
|
}
|
16
24
|
});
|
17
25
|
|
18
|
-
|
19
|
-
|
20
|
-
type: type,
|
21
|
-
target: view.get('layer')
|
22
|
-
});
|
23
|
-
SC.RootResponder.responder[type](event);
|
24
|
-
}
|
25
|
-
|
26
|
-
test("should trigger an action when clicked", function() {
|
27
|
-
var wasClicked = false;
|
28
|
-
|
29
|
-
var actionObject = SC.Object.create({
|
30
|
-
myAction: function() {
|
31
|
-
wasClicked = true;
|
32
|
-
}
|
33
|
-
});
|
34
|
-
|
35
|
-
button.target = actionObject;
|
36
|
-
button.action = 'myAction';
|
26
|
+
test("#mouseUp - triggers the action when mouse is over the button", function() {
|
27
|
+
button.set('isActive', true);
|
37
28
|
|
38
|
-
|
39
|
-
synthesizeEvent('mouseup', button);
|
29
|
+
button.mouseUp();
|
40
30
|
|
41
|
-
ok(
|
31
|
+
ok(sendActionSpy.wasCalledWith(expectedAction, targetObject, button, pane, null, button), 'triggers the action');
|
42
32
|
});
|
43
33
|
|
44
|
-
test("
|
45
|
-
|
34
|
+
test("#mouseUp - does not trigger action if mouse is not over the button", function() {
|
35
|
+
button.set('isActive', false);
|
46
36
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}
|
51
|
-
});
|
52
|
-
|
53
|
-
var otherButton = SC.Button.create();
|
54
|
-
pane.appendChild(otherButton);
|
37
|
+
button.mouseUp();
|
38
|
+
ok(!sendActionSpy.wasCalled, 'should not trigger the action');
|
39
|
+
});
|
55
40
|
|
56
|
-
|
57
|
-
button.
|
41
|
+
test('#mouseUp - makes the button no longer active', function () {
|
42
|
+
button.set('isActive', true);
|
43
|
+
button.mouseUp();
|
58
44
|
|
59
|
-
|
60
|
-
|
61
|
-
ok(button.get('isActive'), "becomes active when hovered");
|
62
|
-
synthesizeEvent('mousemove', otherButton);
|
63
|
-
ok(!button.get('isActive'), "loses active state if mouse exits");
|
64
|
-
synthesizeEvent('mouseup', button);
|
45
|
+
equals(button.get('isActive'), false, 'should set the button to not be active');
|
46
|
+
});
|
65
47
|
|
66
|
-
|
48
|
+
test('#mouseDown - makes the button active', function() {
|
49
|
+
button.set('isActive', false);
|
50
|
+
button.mouseDown();
|
67
51
|
|
68
|
-
|
52
|
+
equals(button.get('isActive'), true, 'should set the button to be active');
|
53
|
+
});
|
69
54
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
synthesizeEvent('mousemove', button);
|
74
|
-
synthesizeEvent('mouseup', button);
|
55
|
+
test('#mouseExited - makes but button no longer active', function() {
|
56
|
+
button.set('isActive', false);
|
57
|
+
button.mouseExited();
|
75
58
|
|
76
|
-
|
59
|
+
equals(button.get('isActive'), false, 'should set the button to no longer be active');
|
77
60
|
});
|
78
|
-
|
@@ -52,9 +52,11 @@ test("extracts styles from element on first retrieval", function() {
|
|
52
52
|
|
53
53
|
var result = context.styles();
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
if(SC.browser.msie){
|
56
|
+
same(result, { color: 'black', height: '20px', borderTop: 'hotpink 1px solid', WebkitColumnCount: '3' }, 'extracted style. This is failing in IE8 because it return styles like cOLOR.');
|
57
|
+
}else{
|
58
|
+
same(result, { color: 'black', height: '20px', borderTop: '1px solid hotpink', WebkitColumnCount: '3' }, 'extracted style. This is failing in IE8 because it return styles like cOLOR.');
|
59
|
+
}
|
58
60
|
equals(context.styles(), result, "should reuse same instance thereafter");
|
59
61
|
});
|
60
62
|
|
@@ -77,6 +77,38 @@ test("element to be added is at idx < length of array ", function() {
|
|
77
77
|
equals(5, ary.get('length'), "length") ;
|
78
78
|
});
|
79
79
|
|
80
|
+
test("should work with @each dependent keys", function() {
|
81
|
+
var array = SC.SparseArray.create();
|
82
|
+
|
83
|
+
array.pushObject(SC.Object.create({
|
84
|
+
value: 5
|
85
|
+
}));
|
86
|
+
array.provideLength(1);
|
87
|
+
|
88
|
+
var obj = SC.Object.create({
|
89
|
+
total: function() {
|
90
|
+
return this.get('content').reduce(function(prev, item) {
|
91
|
+
return prev + item.get('value');
|
92
|
+
}, 0);
|
93
|
+
}.property('content.@each.value'),
|
94
|
+
|
95
|
+
content: array
|
96
|
+
});
|
97
|
+
|
98
|
+
equals(obj.get('total'), 5, "precond - computes total of all objects");
|
99
|
+
|
100
|
+
array.pushObject(SC.Object.create({
|
101
|
+
value: 10
|
102
|
+
}));
|
103
|
+
|
104
|
+
equals(obj.get('total'), 15, "recomputes when a new object is added");
|
105
|
+
|
106
|
+
array.objectAt(1).set('value', 15);
|
107
|
+
|
108
|
+
equals(obj.get('total'), 20, "recomputes when value property on child object changes");
|
109
|
+
|
110
|
+
});
|
111
|
+
|
80
112
|
|
81
113
|
test("modifying a range should not require the rest of the array to refetch", function() {
|
82
114
|
var del = {
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js
CHANGED
@@ -247,3 +247,28 @@ test("should re-render when the content object changes", function() {
|
|
247
247
|
equals(view.$('li:eq(0)').text(), "ramalamadingdong");
|
248
248
|
|
249
249
|
});
|
250
|
+
|
251
|
+
test("should allow changes to content object before layer is created", function() {
|
252
|
+
var view = SC.TemplateCollectionView.create({
|
253
|
+
content: null
|
254
|
+
});
|
255
|
+
|
256
|
+
view.set('content', []);
|
257
|
+
view.set('content', [1, 2, 3]);
|
258
|
+
view.set('content', [1, 2]);
|
259
|
+
|
260
|
+
view.createLayer();
|
261
|
+
ok(view.$('li').length);
|
262
|
+
});
|
263
|
+
|
264
|
+
test("should allow changing content property to be null", function() {
|
265
|
+
var view = SC.TemplateCollectionView.create({
|
266
|
+
content: [1, 2, 3]
|
267
|
+
});
|
268
|
+
|
269
|
+
view.createLayer();
|
270
|
+
equals(view.$('li').length, 3, "precond - creates three elements");
|
271
|
+
|
272
|
+
view.set('content', null);
|
273
|
+
equals(view.$('li').length, 0, "should not create any li elements");
|
274
|
+
});
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
// ==========================================================================
|
2
2
|
// Project: SproutCore - JavaScript Application Framework
|
3
3
|
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
-
// ©2008-2011 Apple Inc. All rights reserved.
|
5
4
|
// License: Licensed under MIT license (see license.js)
|
6
5
|
// ==========================================================================
|
6
|
+
|
7
|
+
/*globals TemplateTests module */
|
7
8
|
/**
|
8
9
|
This module specifically tests integration with Handlebars and SproutCore-specific
|
9
10
|
Handlebars extensions.
|
@@ -293,23 +294,29 @@ test("Handlebars templates update properties if a content object changes", funct
|
|
293
294
|
equals(view.$('h2').text(), "brown coffee", "precond - renders color correctly");
|
294
295
|
equals(view.$('#price').text(), '$4', "precond - renders price correctly");
|
295
296
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
297
|
+
SC.run(function() {
|
298
|
+
view.set('coffee', SC.Object.create({
|
299
|
+
color: "mauve",
|
300
|
+
price: "$4.50"
|
301
|
+
}));
|
302
|
+
});
|
300
303
|
|
301
304
|
equals(view.$('h2').text(), "mauve coffee", "should update name field when content changes");
|
302
305
|
equals(view.$('#price').text(), "$4.50", "should update price field when content changes");
|
303
306
|
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
307
|
+
SC.run(function() {
|
308
|
+
view.set('coffee', SC.Object.create({
|
309
|
+
color: "mauve",
|
310
|
+
price: "$5.50"
|
311
|
+
}));
|
312
|
+
});
|
308
313
|
|
309
314
|
equals(view.$('h2').text(), "mauve coffee", "should update name field when content changes");
|
310
315
|
equals(view.$('#price').text(), "$5.50", "should update price field when content changes");
|
311
316
|
|
312
|
-
|
317
|
+
SC.run(function() {
|
318
|
+
view.setPath('coffee.price', "$5");
|
319
|
+
});
|
313
320
|
|
314
321
|
equals(view.$('#price').text(), "$5", "should update price field when price property is changed");
|
315
322
|
});
|
@@ -334,11 +341,11 @@ test("Template updates correctly if a path is passed to the bind helper", functi
|
|
334
341
|
|
335
342
|
equals(view.$('h1').text(), "$4", "precond - renders price");
|
336
343
|
|
337
|
-
view.setPath('coffee.price', "$5");
|
344
|
+
SC.run(function() { view.setPath('coffee.price', "$5"); });
|
338
345
|
|
339
346
|
equals(view.$('h1').text(), "$5", "updates when property changes");
|
340
347
|
|
341
|
-
view.set('coffee', { price: "$6" });
|
348
|
+
SC.run(function() { view.set('coffee', { price: "$6" }); });
|
342
349
|
equals(view.$('h1').text(), "$6", "updates when parent property changes");
|
343
350
|
});
|
344
351
|
|
@@ -354,7 +361,7 @@ test("Template updates correctly if a path is passed to the bind helper and the
|
|
354
361
|
price: "$4"
|
355
362
|
});
|
356
363
|
|
357
|
-
controller.set('content', realObject);
|
364
|
+
SC.run(function() { controller.set('content', realObject); });
|
358
365
|
|
359
366
|
var view = SC.TemplateView.create({
|
360
367
|
templateName: 'menu',
|
@@ -367,7 +374,7 @@ test("Template updates correctly if a path is passed to the bind helper and the
|
|
367
374
|
|
368
375
|
equals(view.$('h1').text(), "$4", "precond - renders price");
|
369
376
|
|
370
|
-
realObject.set('price', "$5");
|
377
|
+
SC.run(function() { realObject.set('price', "$5"); });
|
371
378
|
|
372
379
|
equals(view.$('h1').text(), "$5", "updates when property is set on real object");
|
373
380
|
|
@@ -907,8 +914,10 @@ test("should be able to bind boolean element attributes using {{bindAttr}}", fun
|
|
907
914
|
ok(!view.$('input').attr('disabled'), 'attribute does not exist upon initial render');
|
908
915
|
ok(view.$('input').attr('checked'), 'attribute is present upon initial render');
|
909
916
|
|
910
|
-
|
911
|
-
|
917
|
+
SC.run(function() {
|
918
|
+
content.set('isDisabled', true);
|
919
|
+
content.set('isChecked', false);
|
920
|
+
});
|
912
921
|
|
913
922
|
ok(view.$('input').attr('disabled'), 'attribute exists after update');
|
914
923
|
ok(!view.$('input').attr('checked'), 'attribute is not present after update');
|
@@ -931,7 +940,9 @@ test("should be able to add multiple classes using {{bindAttr class}}", function
|
|
931
940
|
ok(view.$('div').hasClass('is-awesome-sauce'), "dasherizes first property and sets classname");
|
932
941
|
ok(view.$('div').hasClass('is-also-cool'), "dasherizes second property and sets classname");
|
933
942
|
|
934
|
-
|
943
|
+
SC.run(function() {
|
944
|
+
content.set('isAwesomeSauce', false);
|
945
|
+
});
|
935
946
|
|
936
947
|
ok(!view.$('div').hasClass('is-awesome-sauce'), "removes dasherized class when property is set to false");
|
937
948
|
});
|