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.
Files changed (280) hide show
  1. data/CHANGELOG +33 -0
  2. data/Rakefile +213 -10
  3. data/VERSION.yml +1 -1
  4. data/lib/Buildfile +5 -1
  5. data/lib/buildtasks/manifest.rake +7 -1
  6. data/lib/frameworks/sproutcore/Buildfile +3 -2
  7. data/lib/frameworks/sproutcore/CHANGELOG.md +154 -1
  8. data/lib/frameworks/sproutcore/README.md +1 -1
  9. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +9 -0
  10. data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +254 -207
  11. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +243 -172
  12. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +29 -0
  13. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +5 -0
  14. data/lib/frameworks/sproutcore/frameworks/core_foundation/controls/button.js +6 -2
  15. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +36 -14
  16. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -3
  17. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +14 -15
  18. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +14 -14
  19. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +2 -7
  20. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +3 -3
  21. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +2 -2
  22. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +1 -1
  23. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +20 -12
  24. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +61 -0
  25. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +20 -6
  26. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +42 -0
  27. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controls/button.js +39 -57
  28. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +5 -3
  29. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +32 -0
  30. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +25 -0
  31. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +28 -17
  32. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +396 -0
  33. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +1 -1
  34. data/lib/frameworks/sproutcore/frameworks/core_foundation/{system → views}/bindable_span.js +2 -1
  35. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +78 -51
  36. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +4 -3
  37. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +2 -1
  38. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +233 -67
  39. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +3 -1
  40. data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +8 -2
  41. data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
  42. data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +1 -1
  43. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +15 -8
  44. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
  45. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -0
  46. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +3 -2
  47. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +66 -55
  48. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/data_source.js +190 -0
  49. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +21 -0
  50. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +15 -1
  51. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +0 -1
  52. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +212 -182
  53. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +14 -16
  54. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
  55. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +23 -11
  56. data/lib/frameworks/sproutcore/frameworks/desktop/resources/alert.css +49 -0
  57. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/a_sample_image.jpg +0 -0
  58. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/apple-logo1.jpeg +0 -0
  59. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/iframe.html +0 -0
  60. data/lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css +20 -0
  61. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/drag.css +1 -1
  62. data/lib/frameworks/sproutcore/frameworks/desktop/resources/icons.css +214 -0
  63. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/cap.png +0 -0
  64. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/downbutton.png +0 -0
  65. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-16.png +0 -0
  66. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-24.png +0 -0
  67. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-48.png +0 -0
  68. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-16.png +0 -0
  69. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-24.png +0 -0
  70. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-cancel-24.png +0 -0
  71. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-16.png +0 -0
  72. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-24.png +0 -0
  73. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-down-24.png +0 -0
  74. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-error-48.png +0 -0
  75. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-16.png +0 -0
  76. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-24.png +0 -0
  77. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-16.png +0 -0
  78. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-24.png +0 -0
  79. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-16.png +0 -0
  80. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-24.png +0 -0
  81. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-16.png +0 -0
  82. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-24.png +0 -0
  83. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-16.png +0 -0
  84. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-24.png +0 -0
  85. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-48.png +0 -0
  86. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-left-24.png +0 -0
  87. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-16.png +0 -0
  88. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-24.png +0 -0
  89. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-redo-24.png +0 -0
  90. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-right-24.png +0 -0
  91. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-tools-24.png +0 -0
  92. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-16.png +0 -0
  93. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-24.png +0 -0
  94. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-undo-24.png +0 -0
  95. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-up-24.png +0 -0
  96. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-16.png +0 -0
  97. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-24.png +0 -0
  98. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-bottom.png +0 -0
  99. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-center.png +0 -0
  100. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-top.png +0 -0
  101. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/track.png +0 -0
  102. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/upbutton.png +0 -0
  103. data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +145 -0
  104. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu.css +10 -0
  105. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +88 -0
  106. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/modal.css +3 -4
  107. data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +91 -0
  108. data/lib/frameworks/sproutcore/frameworks/desktop/resources/picker.css +37 -0
  109. data/lib/frameworks/sproutcore/frameworks/desktop/resources/progress.css +29 -0
  110. data/lib/frameworks/sproutcore/frameworks/desktop/resources/radio.css +11 -0
  111. data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +121 -0
  112. data/lib/frameworks/sproutcore/frameworks/desktop/resources/separator.css +20 -0
  113. data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +34 -0
  114. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split.css +0 -0
  115. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split_divider.css +0 -0
  116. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/tab.css +0 -0
  117. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/toolbar.css +0 -0
  118. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/touch-scroller.css +13 -13
  119. data/lib/frameworks/sproutcore/frameworks/desktop/resources/well.css +65 -0
  120. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +114 -103
  121. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +3 -2
  122. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +7 -6
  123. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +18 -0
  124. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +4 -7
  125. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +9 -2
  126. data/lib/frameworks/sproutcore/frameworks/desktop/{panes → views}/select_button.js +43 -0
  127. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +35 -33
  128. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +2 -2
  129. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +15 -8
  130. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -7
  131. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +55 -13
  132. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +3 -1
  133. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +7 -7
  134. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/benchmark.css +0 -0
  135. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/blank.gif +0 -0
  136. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/bootstrap.rhtml +0 -0
  137. data/lib/frameworks/sproutcore/frameworks/foundation/resources/button_view.css +36 -0
  138. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/checkbox_view.css +0 -0
  139. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/debug/control-test-pane.css +0 -0
  140. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/favicon.ico +0 -0
  141. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-logo.png +0 -0
  142. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.jpg +0 -0
  143. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.png +0 -0
  144. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.jpg +0 -0
  145. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.png +0 -0
  146. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup.png +0 -0
  147. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore.png +0 -0
  148. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/inline_editor.css +0 -0
  149. data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +47 -0
  150. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/radio_view.css +0 -0
  151. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/static_layout.css +1 -1
  152. data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +130 -0
  153. data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +5 -1
  154. data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +0 -43
  155. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +5 -2
  156. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +4 -4
  157. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +4 -5
  158. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +1 -1
  159. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +5 -5
  160. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +6 -3
  161. data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +11 -0
  162. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
  163. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +2 -2
  164. data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +2 -2
  165. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +1 -1
  166. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +2 -2
  167. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -2
  168. data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +4 -73
  169. data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +189 -0
  170. data/lib/frameworks/sproutcore/frameworks/statechart/ext/function.js +122 -0
  171. data/lib/frameworks/sproutcore/frameworks/statechart/system/async.js +88 -0
  172. data/lib/frameworks/sproutcore/frameworks/statechart/system/empty_state.js +34 -0
  173. data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +97 -0
  174. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +7 -189
  175. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +14 -78
  176. data/lib/frameworks/sproutcore/frameworks/statechart/tests/debug/sequence_matcher.js +464 -0
  177. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +31 -11
  178. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +6 -4
  179. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +40 -6
  180. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +22 -2
  181. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +44 -3
  182. data/lib/frameworks/sproutcore/frameworks/testing/core.js +61 -9
  183. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/additions.css +0 -0
  184. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/runner.css +11 -2
  185. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/testsuite.css +0 -0
  186. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +66 -27
  187. data/lib/frameworks/sproutcore/frameworks/testing/tests/spy_on.js +41 -0
  188. data/lib/frameworks/sproutcore/frameworks/testing/tests/stub_method.js +9 -0
  189. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/core.css +24 -0
  190. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/fonts.css +39 -0
  191. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/reset.css +126 -0
  192. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/view.css +57 -0
  193. data/lib/frameworks/sproutcore/lib/index.rhtml +7 -4
  194. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
  195. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
  196. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
  197. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
  198. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
  199. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
  200. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
  201. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
  202. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
  203. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
  204. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
  205. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
  206. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +13 -4
  207. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +16 -14
  208. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
  209. data/lib/gen/app/templates/apps/@target_name@/Buildfile +1 -4
  210. data/lib/gen/app/templates/apps/@target_name@/core.js +1 -4
  211. data/lib/gen/app/templates/apps/@target_name@/main.js +1 -4
  212. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +1 -4
  213. data/lib/gen/app/templates/apps/@target_name@/theme.js +1 -4
  214. data/lib/gen/controller/templates/controllers/{@filename@.js → @filename@_controller.js} +1 -4
  215. data/lib/gen/controller/templates/tests/controllers/{@filename@.js → @filename@_test.js} +1 -4
  216. data/lib/gen/data-source/templates/data_sources/{@filename@.js → @filename@_data_source.js} +1 -4
  217. data/lib/gen/design/templates/resources/@filename@.js +1 -4
  218. data/lib/gen/framework/templates/frameworks/@target_name@/core.js +1 -4
  219. data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -4
  220. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -4
  221. data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +2 -0
  222. data/lib/gen/html_project/templates/@filename@/Buildfile +1 -4
  223. data/lib/gen/html_project/templates/@filename@/README +1 -4
  224. data/lib/gen/language/templates/@filename@/strings.js +1 -4
  225. data/lib/gen/model/templates/fixtures/{@filename@.js → @filename@_fixtures.js} +2 -5
  226. data/lib/gen/model/templates/models/{@filename@.js → @filename@_model.js} +1 -4
  227. data/lib/gen/model/templates/tests/models/{@filename@.js → @filename@_test.js} +1 -4
  228. data/lib/gen/page/templates/pages/@target_name@/Buildfile +1 -4
  229. data/lib/gen/page/templates/pages/@target_name@/core.js +1 -4
  230. data/lib/gen/page/templates/pages/@target_name@/en.lproj/strings.js +1 -4
  231. data/lib/gen/page/templates/pages/@target_name@/resources/body.css +3 -1
  232. data/lib/gen/project/templates/@filename@/Buildfile +1 -4
  233. data/lib/gen/project/templates/@filename@/README +1 -5
  234. data/lib/gen/responder/templates/states/{@filename@.js → @filename@_state.js} +1 -4
  235. data/lib/gen/test/templates/tests/{@filename@.js → @filename@_test.js} +1 -4
  236. data/lib/gen/theme/templates/themes/@target_name@/resources/theme_styles.css +1 -5
  237. data/lib/gen/theme/templates/themes/@target_name@/theme.js +1 -4
  238. data/lib/gen/view/templates/tests/views/{@filename@.js → @filename@_test.js} +1 -4
  239. data/lib/gen/view/templates/views/{@filename@.js → @filename@_view.js} +1 -4
  240. data/lib/sproutcore.rb +4 -1
  241. data/lib/sproutcore/builders/handlebars.rb +1 -1
  242. data/lib/sproutcore/builders/module.rb +2 -2
  243. data/lib/sproutcore/helpers/static_helper.rb +4 -2
  244. data/lib/sproutcore/models/generator.rb +22 -0
  245. data/lib/sproutcore/models/manifest_entry.rb +1 -0
  246. data/lib/sproutcore/models/target.rb +4 -1
  247. data/lib/sproutcore/rack/builder.rb +3 -0
  248. data/lib/sproutcore/tools.rb +11 -11
  249. data/lib/sproutcore/tools/init.rb +10 -22
  250. data/lib/sproutcore/tools/manifest.rb +21 -22
  251. data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +21 -1
  252. data/spec/fixtures/ordered_entries/apps/template_style/a.js +0 -0
  253. data/spec/fixtures/ordered_entries/apps/template_style/template_style.js +0 -0
  254. data/spec/lib/buildfile_commands/build_task_spec.rb +1 -1
  255. data/spec/lib/tools/manifest_spec.rb +11 -0
  256. data/sproutcore.gemspec +2 -2
  257. data/vendor/chance/lib/chance/instance.rb +3 -1
  258. metadata +150 -106
  259. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +0 -378
  260. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +0 -57
  261. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +0 -56
  262. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +0 -73
  263. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +0 -916
  264. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
  265. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +0 -185
  266. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +0 -12
  267. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +0 -101
  268. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +0 -91
  269. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +0 -35
  270. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +0 -33
  271. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +0 -10
  272. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +0 -132
  273. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +0 -19
  274. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +0 -69
  275. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +0 -14
  276. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/well.css +0 -71
  277. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +0 -40
  278. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +0 -47
  279. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +0 -146
  280. data/lib/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +0 -69
@@ -63,7 +63,8 @@ SC.ContainerView = SC.View.extend(
63
63
  @param {SC.View} newContent the new content view or null.
64
64
  */
65
65
  replaceContent: function(newContent) {
66
- this.replaceAllChildren(newContent ? [newContent] : []);
66
+ this.removeAllChildren() ;
67
+ if (newContent) this.appendChild(newContent) ;
67
68
  },
68
69
 
69
70
  /** @private */
@@ -83,9 +84,7 @@ SC.ContainerView = SC.View.extend(
83
84
  awake: function() {
84
85
  sc_super();
85
86
  var nowShowing = this.get('nowShowing') ;
86
- if (nowShowing && nowShowing.length>0) {
87
- this.nowShowingDidChange();
88
- }
87
+ if (nowShowing && nowShowing.length>0) this.nowShowingDidChange();
89
88
  },
90
89
 
91
90
  /**
@@ -117,7 +116,7 @@ SC.ContainerView = SC.View.extend(
117
116
  // If it's an uninstantiated view, then attempt to instantiate it.
118
117
  // (Uninstantiated views have a create() method; instantiated ones do not.)
119
118
  if (SC.typeOf(content) === SC.T_CLASS) {
120
- if (content.kindOf(SC.CoreView)) content = content.create();
119
+ if (content.kindOf(SC.CoreView)) content = this.createChildView(content);
121
120
  else content = null;
122
121
  }
123
122
 
@@ -112,7 +112,7 @@ SC.LabelView = SC.View.extend(SC.Control, SC.InlineEditable,
112
112
  /**
113
113
  Set the alignment of the label view.
114
114
 
115
- @property {String} SC.ALIGN_LEFT|SC.ALIGN_MIDDLE|SC.ALIGN_RIGHT
115
+ @property {String} SC.ALIGN_LEFT|SC.ALIGN_CENTER|SC.ALIGN_RIGHT
116
116
  @default null
117
117
  @deprecated
118
118
  */
@@ -245,9 +245,9 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
245
245
  if (continuouslyUpdatesValue !== null && continuouslyUpdatesValue !== undefined) {
246
246
  this.set('applyImmediately', continuouslyUpdatesValue);
247
247
 
248
- //@ if (debug)
248
+ // @if (debug)
249
249
  SC.Logger.warn("SC.TextFieldView#continuouslyUpdatesValue is deprecated. Please use #applyImmediately instead.");
250
- //@ endif
250
+ // @endif
251
251
  }
252
252
 
253
253
  return sc_super();
@@ -526,7 +526,7 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
526
526
 
527
527
  //Adding this to differentiate between older and newer versions of safari
528
528
  //since the internal default field padding changed
529
- isOldSafari= (parseInt(SC.browser.webkit,0)<532);
529
+ isOldSafari= SC.browser.isWebkit && (parseInt(SC.browser.webkit,0)<532);
530
530
  context.setClass('oldWebKitFieldPadding', isOldSafari);
531
531
 
532
532
  spellCheckString = spellCheckEnabled ? ' spellcheck="true"' : ' spellcheck="false"';
@@ -775,14 +775,14 @@ SC.TextFieldView = SC.FieldView.extend(SC.StaticLayout, SC.Editable,
775
775
  // passing the original event here instead that was potentially set from
776
776
  // loosing the responder on the inline text editor so that we can
777
777
  // use it for the delegate to end editing
778
- this.fieldDidBlur(this._origEvent);
778
+ this.fieldDidBlur(this._origEvent || evt);
779
779
  var val = this.get('value');
780
780
  if(!SC.platform.input.placeholder && ((!val) || (val && val.length===0))) {
781
781
  this._hintON = YES;
782
782
  }
783
783
  }, this);
784
784
  },
785
-
785
+
786
786
  fieldDidFocus: function(evt) {
787
787
  this.becomeFirstResponder();
788
788
 
@@ -6,6 +6,8 @@
6
6
  // ==========================================================================
7
7
 
8
8
  /**
9
+ @class
10
+
9
11
  SC.routes manages the browser location. You can change the hash part of the
10
12
  current location. The following code
11
13
 
@@ -35,7 +37,8 @@
35
37
  SC.routes also supports HTML5 history, which uses a '/' instead of a '#'
36
38
  in the URLs, so that all your website's URLs are consistent.
37
39
  */
38
- SC.routes = SC.Object.create({
40
+ SC.routes = SC.Object.create(
41
+ /** @scope SC.routes.prototype */{
39
42
 
40
43
  /**
41
44
  Set this property to YES if you want to use HTML5 history, if available on
@@ -387,8 +390,8 @@ SC.routes = SC.Object.create({
387
390
  delete params.route;
388
391
  delete params.params;
389
392
  route = firstRoute.routeForParts(location.split('/'), params);
390
- if (route && route.target && route.method) {
391
- route.method.call(route.target, params);
393
+ if (route && route.method) {
394
+ route.method.call(route.target || this, params);
392
395
  }
393
396
  }
394
397
  },
@@ -169,6 +169,17 @@ module('SC.routes defined routes', {
169
169
 
170
170
  });
171
171
 
172
+ test('setting location triggers function when only passed function', function() {
173
+ var barred = false;
174
+
175
+ SC.routes.add('bar', function(params) {
176
+ barred = true;
177
+ });
178
+ SC.routes.set('location', 'bar');
179
+
180
+ ok(barred, 'Function was called');
181
+ });
182
+
172
183
  test('setting location simply triggers route', function() {
173
184
  SC.routes.add("foo", router, "triggerRoute");
174
185
  SC.routes.set('location', 'bar');
@@ -36,7 +36,7 @@ if (typeof console === 'undefined') {
36
36
  // rest of the methods go into the mixin defined below.
37
37
 
38
38
  /**
39
- @version 1.6.0.beta.3
39
+ @version 1.6.0.rc.1
40
40
  @namespace
41
41
 
42
42
  All SproutCore methods and functions are defined
@@ -57,7 +57,7 @@ if (typeof console === 'undefined') {
57
57
  window.SC = window.SC || {} ;
58
58
  window.SproutCore = window.SproutCore || SC ;
59
59
 
60
- SC.VERSION = '1.6.0.beta.3';
60
+ SC.VERSION = '1.6.0.rc.1';
61
61
 
62
62
  /**
63
63
  @private
@@ -662,7 +662,7 @@ SC.CoreArray = /** @lends SC.Array.prototype */ {
662
662
  chain.notifyPropertyDidChange();
663
663
 
664
664
  for (idx = 0; idx < len; idx++) {
665
- item = removedObjects[idx];
665
+ item = removedObjects.objectAt(idx);
666
666
  clonedChain = item[kvoChainList][chainGuid];
667
667
  clonedChain.deactivate();
668
668
  delete item[kvoChainList][chainGuid];
@@ -691,7 +691,7 @@ SC.CoreArray = /** @lends SC.Array.prototype */ {
691
691
 
692
692
  len = addedObjects.get('length');
693
693
  for (idx = 0; idx < len; idx++) {
694
- this._clonePropertyChainToItem(chain, addedObjects[idx]);
694
+ this._clonePropertyChainToItem(chain, addedObjects.objectAt(idx));
695
695
  }
696
696
  }, this);
697
697
  }
@@ -151,7 +151,7 @@ SC._PropertyChain = SC.Object.extend(
151
151
  }
152
152
  },
153
153
 
154
- //@ if (debug)
154
+ // @if (debug)
155
155
  /**
156
156
  Returns a string representation of the chain segment.
157
157
 
@@ -161,7 +161,7 @@ SC._PropertyChain = SC.Object.extend(
161
161
  return "SC._PropertyChain(target: %@, property: %@)".fmt(
162
162
  this.get('target'), this.get('property'));
163
163
  }
164
- //@ endif
164
+ // @endif
165
165
  });
166
166
 
167
167
  SC._PropertyChain.createChain = function(path, target, toInvalidate) {
@@ -124,7 +124,7 @@ SC.$error = function(description, label, value, c) {
124
124
  } ;
125
125
 
126
126
  /**
127
- Returns YES if the passed value is an error object or false.
127
+ Returns NO if the passed value is an error object or false.
128
128
 
129
129
  @param {Object} ret object value
130
130
  @returns {Boolean}
@@ -710,7 +710,7 @@ SC.Logger = SC.Object.create(
710
710
  type = entry.type;
711
711
 
712
712
  if (includeTimestamps) {
713
- timestampStr = timestampFormat.fmt(entry.timestamp.utcFormat());
713
+ timestampStr = timestampFormat.fmt(entry.timestamp.toUTCString());
714
714
  }
715
715
 
716
716
  // Is this a message or a group directive?
@@ -797,7 +797,7 @@ SC.Logger = SC.Object.create(
797
797
  type = entry.type;
798
798
 
799
799
  // First determine the prefix.
800
- prefix = timestampFormat.fmt(entry.timestamp.utcFormat());
800
+ prefix = timestampFormat.fmt(entry.timestamp.toUTCString());
801
801
  prefix += prefixMapping[type] || "";
802
802
 
803
803
  // Is this a message or a group directive?
@@ -456,9 +456,9 @@ SC.mixin(SC.Object, /** @scope SC.Object */ {
456
456
  */
457
457
  design: function() {
458
458
  if (this.isDesign) {
459
- //@ if (debug)
459
+ // @if (debug)
460
460
  SC.Logger.warn("SC.Object#design called twice for %@.".fmt(this));
461
- //@ endif
461
+ // @endif
462
462
  return this;
463
463
  }
464
464
 
@@ -1,6 +1,7 @@
1
1
  // ==========================================================================
2
2
  // Project: SC.Statechart - A Statechart Framework for SproutCore
3
3
  // Copyright: ©2010, 2011 Michael Cohen, and contributors.
4
+ // Portions @2011 Apple Inc. All rights reserved.
4
5
  // License: Licensed under MIT license (see license.js)
5
6
  // ==========================================================================
6
7
 
@@ -29,13 +30,13 @@ SC.StatechartMonitor = SC.Object.extend({
29
30
 
30
31
  pushEnteredState: function(state) {
31
32
  this.propertyWillChange('length');
32
- this.sequence.push({ entered: state });
33
+ this.sequence.push({ action: 'entered', state: state });
33
34
  this.propertyDidChange('length');
34
35
  },
35
36
 
36
37
  pushExitedState: function(state) {
37
38
  this.propertyWillChange('length');
38
- this.sequence.push({ exited: state });
39
+ this.sequence.push({ action: 'exited', state: state });
39
40
  this.propertyDidChange('length');
40
41
  },
41
42
 
@@ -73,12 +74,7 @@ SC.StatechartMonitor = SC.Object.extend({
73
74
  len = this.sequence.length;
74
75
  for (i = 0; i < len; i += 1) {
75
76
  item = this.sequence[i];
76
- if (item.exited) {
77
- seq += "exited %@".fmt(item.exited.get('fullPath'));
78
- }
79
- else if (item.entered) {
80
- seq += "entered %@".fmt(item.entered.get('fullPath'));
81
- }
77
+ seq += "%@ %@".fmt(item.action, item.state.get('fullPath'));
82
78
  if (i < len - 1) seq += ", ";
83
79
  }
84
80
 
@@ -87,69 +83,4 @@ SC.StatechartMonitor = SC.Object.extend({
87
83
  return seq;
88
84
  }
89
85
 
90
- });
91
-
92
- SC.StatechartSequenceMatcher = SC.Object.extend({
93
-
94
- statechartMonitor: null,
95
-
96
- position: 0,
97
-
98
- match: YES,
99
-
100
- begin: function() {
101
- this.position = -1;
102
- this.match = YES;
103
- return this;
104
- },
105
-
106
- end: function() {
107
- return this.match;
108
- },
109
-
110
- entered: function() {
111
- return this._doCheck('entered', arguments);
112
- },
113
-
114
- exited: function() {
115
- return this._doCheck('exited', arguments);
116
- },
117
-
118
- _doCheck: function(event, args) {
119
- var i = 0,
120
- len = args.length,
121
- seqItem = null,
122
- arg = null,
123
- seq = this.statechartMonitor.sequence;
124
-
125
- for (; i < len; i += 1) {
126
- this.position += 1;
127
-
128
- if (this.position >= seq.length) {
129
- this.match = NO;
130
- return this;
131
- }
132
-
133
- seqItem = seq[this.position];
134
- if (!seqItem[event]) {
135
- this.match = NO;
136
- return this;
137
- }
138
-
139
- arg = args[i];
140
- if (SC.typeOf(arg) === SC.T_OBJECT) {
141
- if (seqItem[event] !== arg) {
142
- this.match = NO;
143
- return this;
144
- }
145
- }
146
- else if (seqItem[event].get('name') !== arg) {
147
- this.match = NO;
148
- return this;
149
- }
150
- }
151
-
152
- return this;
153
- }
154
-
155
86
  });
@@ -0,0 +1,189 @@
1
+ // ==========================================================================
2
+ // Project: SC.Statechart - A Statechart Framework for SproutCore
3
+ // Copyright: ©2010, 2011 Michael Cohen, and contributors.
4
+ // Portions @2011 Apple Inc. All rights reserved.
5
+ // License: Licensed under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ /*globals SC */
9
+
10
+ SC.StatechartSequenceMatcher = SC.Object.extend({
11
+
12
+ statechartMonitor: null,
13
+
14
+ match: null,
15
+
16
+ MISMATCH: {},
17
+
18
+ begin: function() {
19
+ this._stack = [];
20
+ this.beginSequence();
21
+ this._start = this._stack[0];
22
+ return this;
23
+ },
24
+
25
+ end: function() {
26
+ this.endSequence();
27
+
28
+ if (this._stack.length > 0) {
29
+ throw "can not match sequence. sequence matcher has been left in an invalid state";
30
+ }
31
+
32
+ var monitor = this.statechartMonitor,
33
+ result = this._matchSequence(this._start, 0) === monitor.sequence.length;
34
+
35
+ this.set('match', result);
36
+
37
+ return result;
38
+ },
39
+
40
+ entered: function() {
41
+ this._addStatesToCurrentGroup('entered', arguments);
42
+ return this;
43
+ },
44
+
45
+ exited: function() {
46
+ this._addStatesToCurrentGroup('exited', arguments);
47
+ return this;
48
+ },
49
+
50
+ beginConcurrent: function() {
51
+ var group = {
52
+ type: 'concurrent',
53
+ values: []
54
+ };
55
+ if (this._peek()) this._peek().values.push(group);
56
+ this._stack.push(group);
57
+ return this;
58
+ },
59
+
60
+ endConcurrent: function() {
61
+ this._stack.pop();
62
+ return this;
63
+ },
64
+
65
+ beginSequence: function() {
66
+ var group = {
67
+ type: 'sequence',
68
+ values: []
69
+ };
70
+ if (this._peek()) this._peek().values.push(group);
71
+ this._stack.push(group);
72
+ return this;
73
+ },
74
+
75
+ endSequence: function() {
76
+ this._stack.pop();
77
+ return this;
78
+ },
79
+
80
+ _peek: function() {
81
+ var len = this._stack.length;
82
+ return len === 0 ? null : this._stack[len - 1];
83
+ },
84
+
85
+ _addStatesToCurrentGroup: function(action, states) {
86
+ var group = this._peek(), len = states.length, i = 0;
87
+ for (; i < len; i += 1) {
88
+ group.values.push({ action: action, state: states[i] });
89
+ }
90
+ },
91
+
92
+ _matchSequence: function(sequence, marker) {
93
+ var values = sequence.values,
94
+ len = values.length,
95
+ i = 0, val,
96
+ monitor = this.statechartMonitor;
97
+
98
+ if (len === 0) return marker;
99
+ if (marker > monitor.sequence.length) return this.MISMATCH;
100
+
101
+ for (; i < len; i += 1) {
102
+ val = values[i];
103
+
104
+ if (val.type === 'sequence') {
105
+ marker = this._matchSequence(val, marker);
106
+ } else if (val.type === 'concurrent') {
107
+ marker = this._matchConcurrent(val, marker);
108
+ } else if (!this._matchItems(val, monitor.sequence[marker])){
109
+ return this.MISMATCH;
110
+ } else {
111
+ marker += 1;
112
+ }
113
+
114
+ if (marker === this.MISMATCH) return this.MISMATCH;
115
+ }
116
+
117
+ return marker;
118
+ },
119
+
120
+ // A
121
+ // B (concurrent [X, Y])
122
+ // X
123
+ // M
124
+ // N
125
+ // Y
126
+ // O
127
+ // P
128
+ // C
129
+ //
130
+ // 0 1 2 3 4 5 6 7 8
131
+ // ^ ^
132
+ // A B (X M N) (Y O P) C
133
+ // ^ ^
134
+ // A B (Y O P) (X M N) C
135
+
136
+ _matchConcurrent: function(concurrent, marker) {
137
+ var values = SC.clone(concurrent.values),
138
+ len = values.length,
139
+ i = 0, val, tempMarker = marker, match = false,
140
+ monitor = this.statechartMonitor;
141
+
142
+ if (len === 0) return marker;
143
+ if (marker > monitor.sequence.length) return this.MISMATCH;
144
+
145
+ while (values.length > 0) {
146
+ for (i = 0; i < len; i += 1) {
147
+ val = values[i];
148
+
149
+ if (val.type === 'sequence') {
150
+ tempMarker = this._matchSequence(val, marker);
151
+ } else if (val.type === 'concurrent') {
152
+ tempMarker = this._matchConcurrent(val, marker);
153
+ } else if (!this._matchItems(val, monitor.sequence[marker])){
154
+ tempMarker = this.MISMATCH;
155
+ } else {
156
+ tempMarker = marker + 1;
157
+ }
158
+
159
+ if (tempMarker !== this.MISMATCH) break;
160
+ }
161
+
162
+ if (tempMarker === this.MISMATCH) return this.MISMATCH;
163
+ values.removeAt(i);
164
+ len = values.length;
165
+ marker = tempMarker;
166
+ }
167
+
168
+ return marker;
169
+ },
170
+
171
+ _matchItems: function(matcherItem, monitorItem) {
172
+ if (!matcherItem || !monitorItem) return false;
173
+
174
+ if (matcherItem.action !== monitorItem.action) {
175
+ return false;
176
+ }
177
+
178
+ if (SC.typeOf(matcherItem.state) === SC.T_OBJECT && matcherItem.state === monitorItem.state) {
179
+ return true;
180
+ }
181
+
182
+ if (matcherItem.state === monitorItem.state.get('name')) {
183
+ return true;
184
+ }
185
+
186
+ return false;
187
+ }
188
+
189
+ });