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
@@ -1252,9 +1252,9 @@ SC.CoreView.mixin(/** @scope SC.View.prototype */ {
1252
1252
  */
1253
1253
  design: function() {
1254
1254
  if (this.isDesign) {
1255
- //@ if (debug)
1255
+ // @if (debug)
1256
1256
  SC.Logger.warn("SC.View#design called twice for %@.".fmt(this));
1257
- //@ endif
1257
+ // @endif
1258
1258
  return this;
1259
1259
  }
1260
1260
 
@@ -1472,7 +1472,8 @@ SC.CoreView.unload = function() {
1472
1472
  2. They act as first responders for incoming keyboard, mouse, and
1473
1473
  touch events.
1474
1474
 
1475
- ## View Initialization
1475
+ View Initialization
1476
+ ====
1476
1477
 
1477
1478
  When a view is setup, there are several methods you can override that
1478
1479
  will be called at different times depending on how your view is created.
@@ -1,6 +1,7 @@
1
1
  sc_require("views/view");
2
2
 
3
- SC.View.reopen({
3
+ SC.View.reopen(
4
+ /** @scope SC.View.prototype */ {
4
5
  // ..........................................................
5
6
  // IS ENABLED SUPPORT
6
7
  //
@@ -1,6 +1,7 @@
1
1
  sc_require("views/view");
2
2
 
3
- SC.View.reopen({
3
+ SC.View.reopen(
4
+ /** @scope SC.View.prototype */ {
4
5
  // ..........................................................
5
6
  // KEY RESPONDER
6
7
  //
@@ -124,100 +125,265 @@ SC.View.reopen({
124
125
  return ret ;
125
126
  },
126
127
 
128
+ /**
129
+ The first child of this view for the purposes of tab ordering. If not
130
+ provided, the first element of childViews is used. Override this if
131
+ your view displays its child views in an order different from that
132
+ given in childViews.
133
+
134
+ @type SC.View
135
+ @default null
136
+ */
137
+ firstKeyView: null,
138
+
139
+ /**
140
+ @private
141
+
142
+ Actually calculates the firstKeyView as described in firstKeyView.
143
+
144
+ @returns {SC.View}
145
+ */
146
+ _getFirstKeyView: function() {
147
+ // if first was given, just return it
148
+ var firstKeyView = this.get('firstKeyView');
149
+ if(firstKeyView) return firstKeyView;
150
+
151
+ // otherwise return the first childView
152
+ var childViews = this.get('childViews');
153
+ if(childViews) return childViews[0];
154
+ },
155
+
156
+ /**
157
+ The last child of this view for the purposes of tab ordering. If not set, can be generated two different ways:
158
+ 1. If firstKeyView is provided, it will be generated by starting from firstKeyView and traversing the childViews nextKeyView properties.
159
+ 2. If firstKeyView is not provided, it will simply return the last element of childViews.
160
+
161
+ The first way is not very efficient, so if you provide firstKeyView you should also provide lastKeyView.
162
+
163
+ @type SC.View
164
+ @default null
165
+ */
166
+ lastKeyView: null,
167
+
168
+ /**
169
+ @private
170
+
171
+ Actually calculates the lastKeyView as described in lastKeyView.
172
+
173
+ @returns {SC.View}
174
+ */
175
+ _getLastKeyView: function() {
176
+ // if last was given, just return it
177
+ var lastKeyView = this.get('lastKeyView');
178
+ if(lastKeyView) return lastKeyView;
179
+
180
+ var view,
181
+ prev = this.get('firstKeyView');
182
+
183
+ // if first was given but not last, build by starting from first and
184
+ // traversing until we hit the end. this is obviously the least efficient
185
+ // way
186
+ if(prev) {
187
+ while(view = prev._getNextKeyView()) {
188
+ prev = view;
189
+ }
190
+
191
+ return prev;
192
+ }
193
+
194
+ // if neither was given, it's more efficient to just return the last
195
+ // childView
196
+ else {
197
+ var childViews = this.get('childViews');
198
+
199
+ if(childViews) return childViews[childViews.length - 1];
200
+ }
201
+ },
202
+
127
203
  /**
128
204
  Optionally points to the next key view that should gain focus when tabbing
129
205
  through an interface. If this is not set, then the next key view will
130
- be set automatically to the next child.
206
+ be set automatically to the next sibling as defined by its parent's
207
+ childViews property.
208
+
209
+ If any views define this, all of their siblings should define it as well,
210
+ otherwise undefined behavior may occur. Their parent view should also define
211
+ a firstKeyView.
212
+
213
+ This may also be set to a view that is not a sibling, but once again all
214
+ views in the chain must define it or undefined behavior will occur.
215
+
216
+ Likewise, any view that sets nextKeyView should also set previousKeyView.
217
+
218
+ @type SC.View
219
+ @default null
220
+ */
221
+
222
+ nextKeyView: undefined,
223
+
224
+ /**
225
+ @private
226
+
227
+ Gets the next key view by checking if the user set it and otherwise just
228
+ getting the next by index in childViews.
229
+
230
+ @return {SC.View}
131
231
  */
132
- nextKeyView: null,
232
+ _getNextKeyView: function() {
233
+ var pv = this.get('parentView'),
234
+ nextKeyView = this.get('nextKeyView');
235
+
236
+ // if the parent defines lastKeyView, it takes priority over this views
237
+ // nextKeyView
238
+ if(pv && pv.get('lastKeyView') === this) return null;
239
+
240
+ // if this view defines a nextKeyView, use it
241
+ if(nextKeyView !== undefined) return nextKeyView;
242
+
243
+ // otherwise generate one based on parent view's childViews
244
+ if(pv) {
245
+ var childViews = pv.get('childViews');
246
+ return childViews[childViews.indexOf(this) + 1];
247
+ }
248
+ },
133
249
 
134
250
  /**
135
- Computes the next valid key view, possibly returning the receiver or null.
136
- This is the next key view that acceptsFirstResponder.
251
+ Computes the next valid key view. This is the next key view that
252
+ acceptsFirstResponder. Computed using depth first search. If the current view
253
+ is not valid, it will first traverse its children before trying siblings. If
254
+ the current view is the only valid view, the current view will be returned. Will
255
+ return null if no valid view can be found.
137
256
 
138
257
  @property
139
258
  @type SC.View
140
259
  */
141
260
  nextValidKeyView: function() {
142
- var seen = [],
143
- rootView = this.get('pane'), ret = this.get('nextKeyView');
261
+ var cur = this, next;
144
262
 
145
- if(!ret) { ret = rootView._computeNextValidKeyView(this, seen); }
263
+ while(next !== this) {
264
+ next = null;
146
265
 
147
- if(SC.TABBING_ONLY_INSIDE_DOCUMENT && !ret) {
148
- ret = rootView._computeNextValidKeyView(rootView, seen);
149
- }
266
+ // only bother to check children if we are visible
267
+ if(cur.get('isVisibleInWindow')) next = cur._getFirstKeyView();
150
268
 
151
- return ret ;
152
- }.property('nextKeyView'),
269
+ // if we have no children, check our sibling
270
+ if(!next) next = cur._getNextKeyView();
153
271
 
154
- _computeNextValidKeyView: function(currentView, seen) {
155
- var ret = this.get('nextKeyView'),
156
- children, i, childLen, child;
157
- if(this !== currentView && seen.indexOf(currentView)!=-1 &&
158
- this.get('acceptsFirstResponder') && this.get('isVisibleInWindow')){
159
- return this;
160
- }
161
- seen.push(this); // avoid cycles
162
-
163
- // find next sibling
164
- if (!ret) {
165
- children = this.get('childViews');
166
- for(i=0, childLen = children.length; i<childLen; i++){
167
- child = children[i];
168
- if(child._computeNextValidKeyView && child.get('isVisibleInWindow') && child.get('isVisible')){
169
- ret = child._computeNextValidKeyView(currentView, seen);
170
- }
171
- if (ret) { return ret; }
272
+ // if we have no children or siblings, unroll up closest parent that has a
273
+ // next sibling
274
+ if(!next) while(cur = cur.get('parentView')) {
275
+ if(next = cur._getNextKeyView()) break;
172
276
  }
173
- ret = null;
277
+
278
+ // if no parents have a next sibling, start over from the beginning
279
+ if(!next) next = this.get('pane');
280
+
281
+ // if it's a valid firstResponder, we're done!
282
+ if(next.get('isVisibleInWindow') && next.get('acceptsFirstResponder')) return next;
283
+
284
+ // otherwise keep looking
285
+ cur = next;
174
286
  }
175
- return ret ;
176
- },
287
+
288
+ // this will only happen if no views are visible and accept first responder
289
+ return null;
290
+
291
+ }.property('nextKeyView'),
177
292
 
178
293
  /**
179
- Optionally points to the previous key view that should gain focus when
180
- tabbing through the interface. If this is not set then the previous
181
- key view will be set automatically to the previous child.
294
+ Optionally points to the previous key view that should gain focus when tabbing
295
+ through an interface. If this is not set, then the previous key view will
296
+ be set automatically to the previous sibling as defined by its parent's
297
+ childViews property.
298
+
299
+ If any views define this, all of their siblings should define it as well,
300
+ otherwise undefined behavior may occur. Their parent view should also define
301
+ a lastKeyView.
302
+
303
+ This may also be set to a view that is not a sibling, but once again all
304
+ views in the chain must define it or undefined behavior will occur.
305
+
306
+ Likewise, any view that sets previousKeyView should also set nextKeyView.
307
+
308
+ @type SC.View
309
+ @default null
310
+ */
311
+ previousKeyView: undefined,
312
+
313
+ /**
314
+ @private
315
+
316
+ Gets the previous key view by checking if the user set it and otherwise just
317
+ getting the previous by index in childViews.
318
+
319
+ @return {SC.View}
182
320
  */
183
- previousKeyView: null,
321
+ _getPreviousKeyView: function() {
322
+ var pv = this.get('parentView'),
323
+ previousKeyView = this.get('previousKeyView');
324
+
325
+ // if the parent defines firstKeyView, it takes priority over this views
326
+ // previousKeyView
327
+ if(pv && pv.get('firstKeyView') === this) return null;
328
+
329
+ // if this view defines a previousKeyView, use it
330
+ if(previousKeyView !== undefined) return previousKeyView;
331
+
332
+ // otherwise generate one based on parent view's childViews
333
+ if(pv) {
334
+ var childViews = pv.get('childViews');
335
+ return childViews[childViews.indexOf(this) - 1];
336
+ }
337
+ },
184
338
 
185
339
  /**
186
- Computes the previous valid key view, possibly returning the receiver or
187
- null. This is the previous key view that acceptsFirstResponder.
340
+ Computes the previous valid key view. This is the previous key view that
341
+ acceptsFirstResponder. Traverse views in the opposite order from
342
+ nextValidKeyView. If the current view is the pane, tries deepest child. If the
343
+ current view has a previous view, tries its last child. If this view is the
344
+ first child, tries the parent. Will return null if no valid view can be
345
+ found.
188
346
 
189
347
  @property
190
348
  @type SC.View
191
349
  */
350
+ // TODO: clean this up
192
351
  previousValidKeyView: function() {
193
- var seen = [],
194
- rootView = this.pane(), ret = this.get('previousKeyView');
195
- if(!ret) { ret = rootView._computePreviousValidKeyView(this, seen); }
196
- return ret ;
197
- }.property('previousKeyView'),
352
+ var cur = this, prev;
353
+
354
+ while(prev !== this) {
355
+ // normally, just try to get previous view's last child
356
+ if(cur.get('parentView')) prev = cur._getPreviousKeyView();
357
+
358
+ // if we are the pane, get our own last child
359
+ else prev = cur;
360
+
361
+ // loop down to the last valid child
362
+ if(prev) {
363
+ do {
364
+ cur = prev;
365
+ prev = prev._getLastKeyView();
366
+ } while(prev && prev.get('isVisibleInWindow'));
367
+
368
+ // if we ended on a null, unroll to the last one
369
+ // we don't unroll if we ended on a hidden view because we need
370
+ // to traverse to its previous view next iteration
371
+ if(!prev) prev = cur;
372
+ }
198
373
 
199
- _computePreviousValidKeyView: function(currentView, seen) {
200
- var ret = this.get('previousKeyView'),
201
- children, i, child;
374
+ // if there is no previous view, traverse to the parent
375
+ else prev = cur.get('parentView');
202
376
 
203
- if(this !== currentView && seen.indexOf(currentView)!=-1 &&
204
- this.get('acceptsFirstResponder') && this.get('isVisibleInWindow')){
205
- return this;
206
- }
207
- seen.push(this); // avoid cycles
208
-
209
- // find next sibling
210
- if (!ret) {
211
- children = this.get('childViews');
212
- for(i=children.length-1; 0<=i; i--){
213
- child = children[i];
214
- if(child._computePreviousValidKeyView && child.get('isVisibleInWindow') && child.get('isVisible')){
215
- ret = child._computePreviousValidKeyView(currentView, seen);
216
- }
217
- if (ret) { return ret; }
218
- }
219
- ret = null;
377
+ // if the view is valid, return it
378
+ if(prev.get('isVisibleInWindow') && prev.get('acceptsFirstResponder')) return prev;
379
+
380
+ // otherwise, try to find its previous valid keyview
381
+ cur = prev;
220
382
  }
221
- return ret ;
222
- }
383
+
384
+ // if none of the views accept first responder and we make it back to where
385
+ // we started, just return null
386
+ return null;
387
+ }.property('previousKeyView')
223
388
  });
389
+
@@ -1,6 +1,8 @@
1
1
  sc_require("views/view");
2
2
 
3
- SC.View.reopen({
3
+ SC.View.reopen(
4
+ /** @scope SC.View.prototype */{
5
+
4
6
  /**
5
7
  This code exists to make it possible to pool SC.Views. We are not going to pool SC.Views in Amber
6
8
  */
@@ -15,6 +15,12 @@
15
15
  CoreTools = SC.Object.create( /** @scope CoreTools.prototype */ {
16
16
 
17
17
  NAMESPACE: 'CoreTools',
18
- VERSION: '1.0.0'
19
-
18
+ VERSION: '1.0.0',
19
+
20
+ attachUrlPrefix: function(url) {
21
+ if(url && SC.urlPrefix) {
22
+ url = SC.urlPrefix + url;
23
+ }
24
+ return url;
25
+ }
20
26
  }) ;
@@ -41,7 +41,7 @@ CoreTools.DataSource = SC.DataSource.extend({
41
41
 
42
42
  if (!query.get('isRemote')) return NO ;
43
43
 
44
- SC.Request.getUrl('/sc/targets.json')
44
+ SC.Request.getUrl(CoreTools.attachUrlPrefix('/sc/targets.json'))
45
45
  .set('isJSON', YES)
46
46
  .notify(this, 'fetchTargetsDidComplete', { query: query, store: store })
47
47
  .send();
@@ -34,7 +34,7 @@ CoreTools.Target = SC.Record.extend(
34
34
  URL to use to load the app. If no an app, returns null
35
35
  */
36
36
  appUrl: function() {
37
- return (this.get('kind') === 'app') ? this.get('name') : null;
37
+ return (this.get('kind') === 'app') ? CoreTools.attachUrlPrefix(this.get('name')) : null;
38
38
  }.property('kind', 'name').cacheable(),
39
39
 
40
40
  /**
@@ -5,6 +5,12 @@
5
5
  // License: Licensed under MIT license (see license.js)
6
6
  // ==========================================================================
7
7
 
8
+ /**
9
+ Indicates a value has a mixed state of both on and off.
10
+
11
+ @property {String}
12
+ */
13
+ SC.MIXED_STATE = '__MIXED__';
8
14
 
9
15
  /** @class
10
16
 
@@ -327,20 +333,22 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
327
333
  @returns {Boolean} YES if data source can handle keys
328
334
  */
329
335
  commitRecords: function(store, createStoreKeys, updateStoreKeys, destroyStoreKeys, params) {
330
- var cret, uret, dret;
336
+ var uret, dret, ret;
331
337
  if (createStoreKeys.length>0) {
332
- cret = this.createRecords.call(this, store, createStoreKeys, params);
338
+ ret = this.createRecords.call(this, store, createStoreKeys, params);
333
339
  }
334
340
 
335
341
  if (updateStoreKeys.length>0) {
336
342
  uret = this.updateRecords.call(this, store, updateStoreKeys, params);
343
+ ret = SC.none(ret) ? uret : (ret === uret) ? ret : SC.MIXED_STATE;
337
344
  }
338
345
 
339
346
  if (destroyStoreKeys.length>0) {
340
347
  dret = this.destroyRecords.call(this, store, destroyStoreKeys, params);
348
+ ret = SC.none(ret) ? dret : (ret === dret) ? ret : SC.MIXED_STATE;
341
349
  }
342
350
 
343
- return ((cret === uret) && (cret === dret)) ? cret : SC.MIXED_STATE;
351
+ return ret || NO;
344
352
  },
345
353
 
346
354
  /**
@@ -441,13 +449,12 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
441
449
  invokes the named action for each store key. returns proper value
442
450
  */
443
451
  _handleEach: function(store, storeKeys, action, ids, params) {
444
- var len = storeKeys.length, idx, ret, cur, lastArg;
445
- if(!ids) ids = [];
452
+ var len = storeKeys.length, idx, ret, cur, idOrParams;
446
453
 
447
454
  for(idx=0;idx<len;idx++) {
448
- lastArg = ids[idx] ? ids[idx] : params;
455
+ idOrParams = ids ? ids[idx] : params;
449
456
 
450
- cur = action.call(this, store, storeKeys[idx], lastArg, params);
457
+ cur = action.call(this, store, storeKeys[idx], idOrParams);
451
458
  if (ret === undefined) {
452
459
  ret = cur ;
453
460
  } else if (ret === YES) {
@@ -456,7 +463,7 @@ SC.DataSource = SC.Object.extend( /** @scope SC.DataSource.prototype */ {
456
463
  ret = (cur === NO) ? NO : SC.MIXED_STATE ;
457
464
  }
458
465
  }
459
- return ret ? ret : null ;
466
+ return !SC.none(ret) ? ret : null ;
460
467
  },
461
468
 
462
469