sproutcore 1.5.0.pre.3 → 1.5.0.pre.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. data/.rspec +1 -0
  2. data/CHANGELOG +42 -0
  3. data/README.txt +25 -0
  4. data/VERSION.yml +1 -1
  5. data/bin/sc-build +1 -1
  6. data/bin/sc-build-number +1 -1
  7. data/bin/sc-docs +1 -1
  8. data/bin/sc-gen +1 -1
  9. data/bin/sc-init +1 -1
  10. data/bin/sc-manifest +1 -1
  11. data/bin/sc-server +1 -1
  12. data/bin/sproutcore +1 -1
  13. data/lib/buildtasks/build.rake +5 -0
  14. data/lib/buildtasks/manifest.rake +20 -1
  15. data/lib/frameworks/sproutcore/Buildfile +12 -9
  16. data/lib/frameworks/sproutcore/CHANGELOG.md +48 -0
  17. data/lib/frameworks/sproutcore/apps/greenhouse/README +2 -9
  18. data/lib/frameworks/sproutcore/apps/greenhouse/TODO +11 -27
  19. data/lib/frameworks/sproutcore/apps/greenhouse/controllers/library.js +3 -10
  20. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/main-page.css +4 -31
  21. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/dialogs.js +5 -4
  22. data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +3 -3
  23. data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
  24. data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +31 -14
  25. data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +2 -1
  26. data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +27 -1
  27. data/lib/frameworks/sproutcore/apps/greenhouse/tests/views/list_item.js +1 -0
  28. data/lib/frameworks/sproutcore/apps/greenhouse/tests/views/plist_item.js +20 -0
  29. data/lib/frameworks/sproutcore/apps/greenhouse/theme.js +25 -0
  30. data/lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js +161 -24
  31. data/lib/frameworks/sproutcore/apps/greenhouse/views/tear_off_picker.js +1 -1
  32. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +37 -25
  33. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +135 -26
  34. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/controllers/array.js +0 -0
  35. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/controllers/controller.js +0 -0
  36. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/controllers/object.js +1 -1
  37. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/core.js +0 -0
  38. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/ext/object.js +0 -0
  39. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/ext/run_loop.js +1 -0
  40. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/mixins/delegate_support.js +0 -0
  41. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/mixins/responder_context.js +0 -0
  42. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/mixins/selection_support.js +0 -0
  43. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/mixins/string.js +0 -0
  44. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/keyboard.js +68 -0
  45. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +108 -0
  46. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/panes/main.js +2 -2
  47. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +27 -0
  48. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/panes/pane.js +215 -505
  49. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +24 -0
  50. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +11 -0
  51. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/protocols/observable_protocol.js +0 -0
  52. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/protocols/sparse_array_delegate.js +0 -0
  53. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/resources/core.css +0 -0
  54. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/resources/view.css +0 -0
  55. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/application.js +0 -0
  56. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/browser.js +1 -0
  57. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/builder.js +0 -0
  58. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/core_query.js +1 -1
  59. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/cursor.js +0 -0
  60. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +210 -0
  61. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/event.js +5 -5
  62. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/json.js +0 -0
  63. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/locale.js +0 -0
  64. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/page.js +0 -0
  65. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/platform.js +31 -5
  66. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/ready.js +1 -1
  67. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/render_context.js +0 -0
  68. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/responder.js +0 -0
  69. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/root_responder.js +83 -110
  70. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/selection_set.js +7 -4
  71. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/sparse_array.js +0 -0
  72. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/theme.js +0 -0
  73. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/timer.js +0 -0
  74. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/system/utils/rect.js +0 -0
  75. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +151 -0
  76. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/array/array_case.js +0 -0
  77. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/array/enum_case.js +0 -0
  78. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/array/null_case.js +0 -0
  79. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/array/selection_support.js +26 -0
  80. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/array/single_case.js +0 -0
  81. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/object/empty_case.js +0 -0
  82. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/object/multiple_case.js +0 -0
  83. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/object/single_case.js +0 -0
  84. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/controllers/object/single_enumerable_case.js +0 -0
  85. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/mixins/responder_context.js +0 -0
  86. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/mixins/string.js +0 -0
  87. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/panes/template.js +14 -0
  88. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/builder.js +0 -0
  89. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/core_query/within.js +0 -0
  90. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/json.js +0 -0
  91. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/locale.js +0 -0
  92. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/begin.js +0 -0
  93. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/element.js +0 -0
  94. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/end.js +0 -0
  95. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/get.js +0 -0
  96. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/helpers_attr.js +0 -0
  97. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/helpers_basic.js +0 -0
  98. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/helpers_className.js +0 -0
  99. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/helpers_style.js +0 -0
  100. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/init.js +0 -0
  101. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/join.js +0 -0
  102. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/push_text.js +0 -0
  103. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/tag.js +0 -0
  104. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/render_context/update.js +0 -0
  105. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/root_responder/makeKeyPane.js +0 -0
  106. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/root_responder/makeMainPane.js +0 -0
  107. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/root_responder/makeMenuPane.js +0 -0
  108. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/root_responder/root_responder.js +0 -0
  109. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/root_responder/targetForAction.js +0 -0
  110. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/selection_set/add.js +0 -0
  111. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/selection_set/copy.js +0 -0
  112. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/selection_set/indexSetForSource.js +0 -0
  113. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/selection_set/isEqual.js +0 -0
  114. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/selection_set/remove.js +0 -0
  115. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/sparse_array.js +0 -0
  116. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/theme.js +0 -0
  117. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/timer/invalidate.js +0 -0
  118. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/timer/invokeLater.js +0 -0
  119. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/timer/isPaused.js +0 -0
  120. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/timer/performAction.js +0 -0
  121. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/timer/schedule.js +0 -0
  122. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/utils/normalizeURL.js +0 -0
  123. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/offset.js +268 -0
  124. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/system/utils/rect.js +0 -0
  125. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +43 -0
  126. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/pane/append_remove.js +107 -18
  127. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +20 -0
  128. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/pane/firstResponder.js +0 -0
  129. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/pane/keyPane.js +0 -0
  130. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/pane/layout.js +0 -0
  131. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/pane/sendEvent.js +0 -0
  132. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/checkbox_support.js +32 -0
  133. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/text_field_support.js +73 -0
  134. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template_view/collection.js +65 -0
  135. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template_view/core.js +67 -0
  136. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template_view/handlebars.js +295 -0
  137. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/animation.js +19 -18
  138. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/build.js +0 -0
  139. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/build_children.js +0 -0
  140. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/clippingFrame.js +0 -0
  141. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/convertFrames.js +0 -0
  142. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/convertLayouts.js +0 -0
  143. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/createChildViews.js +18 -15
  144. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/createLayer.js +0 -0
  145. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/destroyLayer.js +0 -0
  146. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/didAppendToDocument.js +11 -8
  147. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/findLayerInParentLayer.js +0 -0
  148. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/init.js +0 -0
  149. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/insertBefore.js +0 -0
  150. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/isVisible.js +28 -0
  151. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/isVisibleInWindow.js +0 -0
  152. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +22 -0
  153. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/layer.js +0 -0
  154. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/layoutChildViews.js +0 -0
  155. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +180 -0
  156. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +640 -0
  157. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/parentViewDidChange.js +0 -0
  158. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/prepareContext.js +0 -0
  159. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/removeChild.js +0 -0
  160. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +125 -0
  161. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/render_delegate_support.js +0 -0
  162. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/replaceChild.js +0 -0
  163. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/static_layout.js +21 -0
  164. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/theme.js +0 -0
  165. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/updateLayer.js +0 -0
  166. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/updateLayerLocation.js +0 -0
  167. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/view.js +0 -0
  168. data/lib/frameworks/sproutcore/frameworks/{amber → core_foundation}/tests/views/view/viewDidResize.js +0 -0
  169. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template/checkbox_support.js +20 -0
  170. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template/collection.js +99 -0
  171. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template/text_field_support.js +35 -0
  172. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template.js +77 -0
  173. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +187 -0
  174. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/base.js +1 -0
  175. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +41 -0
  176. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +57 -0
  177. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +223 -0
  178. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +1150 -0
  179. data/lib/frameworks/sproutcore/frameworks/{amber/views → core_foundation/views/view}/layout_style.js +93 -1
  180. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +489 -0
  181. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +362 -0
  182. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/touch.js +67 -0
  183. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +113 -0
  184. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +1280 -0
  185. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +27 -53
  186. data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +13 -19
  187. data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +1 -0
  188. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +183 -71
  189. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -2
  190. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +26 -46
  191. data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +25 -4
  192. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +139 -21
  193. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +6 -1
  194. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/cyclical_relationship.js +1 -1
  195. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/{parentless.js → data_store.js} +62 -16
  196. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +51 -17
  197. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +36 -10
  198. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +11 -11
  199. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +8 -8
  200. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/normalize.js +2 -2
  201. data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → datetime/resources}/strings.js +1 -0
  202. data/lib/frameworks/sproutcore/frameworks/{foundation → datetime}/system/datetime.js +5 -37
  203. data/lib/frameworks/sproutcore/frameworks/{foundation → datetime}/tests/system/datetime.js +1 -0
  204. data/lib/frameworks/sproutcore/frameworks/debug/core.js +1 -1
  205. data/lib/frameworks/sproutcore/frameworks/designer/controllers/designs.js +1 -2
  206. data/lib/frameworks/sproutcore/frameworks/designer/designers/object_designer.js +3 -3
  207. data/lib/frameworks/sproutcore/frameworks/designer/designers/view_designer.js +3 -3
  208. data/lib/frameworks/sproutcore/frameworks/designer/views/designer_drop_target.js +9 -3
  209. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +71 -70
  210. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +10 -2
  211. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -19
  212. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +33 -14
  213. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +25 -0
  214. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +1 -1
  215. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +25 -103
  216. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +102 -92
  217. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +22 -25
  218. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +38 -25
  219. data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +1 -1
  220. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +1 -1
  221. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +42 -22
  222. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +513 -230
  223. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +0 -2
  224. data/lib/frameworks/sproutcore/frameworks/experimental/README.md +23 -0
  225. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/README.md +11 -0
  226. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +215 -0
  227. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +67 -0
  228. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/README.md +34 -0
  229. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/polymorphic_single_attribute.js +183 -0
  230. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +23 -0
  231. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphic/single.js +124 -0
  232. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +0 -2
  233. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +151 -0
  234. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +27 -17
  235. data/lib/frameworks/sproutcore/frameworks/foundation/system/image_queue.js +6 -3
  236. data/lib/frameworks/sproutcore/frameworks/foundation/system/logger.js +163 -0
  237. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +6 -3
  238. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +1 -0
  239. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/logger.js +44 -0
  240. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +200 -167
  241. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +1 -1
  242. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +52 -137
  243. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +7 -11
  244. data/lib/frameworks/sproutcore/frameworks/handlebars/extensions.js +138 -0
  245. data/lib/frameworks/sproutcore/frameworks/handlebars/handlebars.js +1338 -0
  246. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +32 -26
  247. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +162 -3
  248. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +10 -5
  249. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +123 -3
  250. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +12 -5
  251. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +50 -13
  252. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +163 -333
  253. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +58 -8
  254. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +2 -0
  255. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +9 -6
  256. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/makeArray.js +15 -1
  257. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +2 -0
  258. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +31 -0
  259. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +18 -0
  260. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/logger.js +31 -143
  261. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/concatenated_properties.js +71 -0
  262. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +177 -0
  263. data/lib/frameworks/sproutcore/frameworks/table/views/table.js +5 -4
  264. data/lib/frameworks/sproutcore/frameworks/table/views/table_header.js +5 -3
  265. data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +8 -2
  266. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +2 -3
  267. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +1 -1
  268. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +1 -1
  269. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +1 -1
  270. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +1 -1
  271. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +2 -2
  272. data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +62 -62
  273. data/lib/gen/html_app/Buildfile +36 -0
  274. data/lib/gen/html_app/README +1 -0
  275. data/lib/gen/html_app/USAGE +15 -0
  276. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +14 -0
  277. data/lib/gen/html_app/templates/apps/@target_name@/resources/images/.gitkeep +0 -0
  278. data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +0 -0
  279. data/lib/gen/html_app/templates/apps/@target_name@/resources/templates/@target_name@.handlebars +1 -0
  280. data/lib/gen/html_project/Buildfile +45 -0
  281. data/lib/gen/html_project/INIT +3 -0
  282. data/lib/gen/html_project/README +1 -0
  283. data/lib/gen/html_project/USAGE +2 -0
  284. data/lib/gen/html_project/templates/@filename@/Buildfile +8 -0
  285. data/lib/gen/html_project/templates/@filename@/README +7 -0
  286. data/lib/sproutcore/builders/handlebars.rb +30 -0
  287. data/lib/sproutcore/builders.rb +1 -1
  288. data/lib/sproutcore/helpers/static_helper.rb +3 -3
  289. data/lib/sproutcore/tools/init.rb +25 -9
  290. data/spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb +39 -0
  291. data/spec/fixtures/builder_tests/apps/handlebars_test/template.handlebars +5 -0
  292. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/templates/demo.handlebars +4 -0
  293. data/spec/lib/builders/handlebars_spec.rb +29 -0
  294. data/vendor/chance/lib/chance/imagers/data_url.rb +20 -7
  295. data/vendor/chance/lib/chance/instance.rb +4 -1
  296. data/vendor/chance/lib/chance/parser.rb +31 -31
  297. data/vendor/chance/lib/chance/slicing.rb +38 -8
  298. metadata +195 -225
  299. data/lib/frameworks/sproutcore/frameworks/amber/system/device.js +0 -143
  300. data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +0 -174
  301. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/main_pane.js +0 -31
  302. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +0 -267
  303. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/layoutDidChange.js +0 -149
  304. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/layoutStyle.js +0 -602
  305. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render.js +0 -115
  306. data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +0 -1
  307. data/lib/frameworks/sproutcore/frameworks/amber/views/view.js +0 -4003
  308. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +0 -105
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/CHANGELOG CHANGED
@@ -1,3 +1,45 @@
1
+ *SproutCore 1.5.0.pre.4 (February 28, 2011)*
2
+
3
+ * We are beginning to move API that we don't believe will be ready before 1.5
4
+ release into the `experimental` framework. If your apps rely on code that is
5
+ migrated to experimental, please make sure you include it as a dependency. For
6
+ more, please see frameworks/experimental/README.md.
7
+ * Support for extending classes after they've been created with the
8
+ reopen()/enhance() combo. For more, see: [this
9
+ discussion](http://groups.google.com/group/sproutcore-dev/browse_thread/thread/d65ad54d6fddef5d)
10
+ * This change may break existing code if you call sc_super() in your mixins.
11
+ If your app throws exceptions after updating, please see [this post](http://groups.google.com/group/sproutcore-dev/browse_thread/thread/cc6a97e6133cb8cc).
12
+ * Added SC.TemplateView and Handlebars. These allow you to specify the content
13
+ of your views using templates.
14
+ * {{#view}} helper allows you to define child views
15
+ * {{#bind}} helper allows you to render a property, and automatically update DOM if that
16
+ property ever changes.
17
+ * {{#collection}} helpers allows you to render a simple collection of items
18
+ using templates
19
+ * SC.TextFieldSupport and SC.CheckboxSupport mixins for SC.TemplateViews
20
+ that wrap <input> elements.
21
+ * Split SC.View into units of functionality. SC.View remains functionally the
22
+ same, but you can now use SC.CoreView, a light-weight subset of SC.View.
23
+ * SC.ImageView will use a <canvas> tag on platforms that support it, which
24
+ improves performance significantly.
25
+ * SC.SegmentedView now creates an overflow menu if there are too many segments
26
+ to display.
27
+ * Class names for SC.SegmentedView have been cleaned up. You may need to
28
+ update your CSS if you were theming SC.SegmentedView.
29
+ * You can now observe the contents of enumerables using the special `@each`
30
+ key.
31
+ * Dependent keys can accept property paths. For example, you can say
32
+ .property('foo.bar'), and it will be invalidated if the `bar` property of
33
+ `foo` changes.
34
+ * Deprecated SC.viewportOffset(). Please use SC.offset() instead, which is
35
+ more explicit about what it returns.
36
+ * SC.browser now detects Android devices.
37
+ * SC.device.orientation now works reliably on desktop, iOS, and Android 2.1
38
+ and above.
39
+ * Experimental support for gyroscope information, if provided by the browser.
40
+ * Unit tests for runtime, desktop, foundation, core_foundation, and datastore
41
+ are all passing.
42
+
1
43
  *SproutCore 1.5.0.pre.3 (February 3, 2011)*
2
44
 
3
45
  * More fixes to Ruby 1.8/1.9 compat
data/README.txt CHANGED
@@ -39,6 +39,31 @@ This gem includes both the Abbot build tools and a copy of the SproutCore
39
39
  JavaScript framework. You can use built-in commands to create, develop,
40
40
  build, and deploy SproutCore-based applications.
41
41
 
42
+ == USING ABBOT FROM SOURCE:
43
+
44
+ These steps will allow the use of a development release of abbot rather than an installed gem.
45
+
46
+ 1. Inside a empty project folder create a file named 'Gemfile' (no extension)
47
+
48
+ Modify the file so that it contains:
49
+ source "http://rubygems.org"
50
+ gem "sproutcore", :git => "git://github.com/sproutcore/abbot.git"
51
+ # if you want to use a version of abbot already checked out into your system rather than the remote repository
52
+ # gem "sproutcore", :path => "/path/to/abbot"
53
+
54
+ 2. Install Abbot and its dependencies by running these commands
55
+
56
+ $ sudo gem install bundler
57
+ $ bundle install --binstubs
58
+
59
+ This will install the Ruby 'bundler' gem (if it is not already), then add a 'bin' directory to your project containing executables like "sc-server".
60
+ The bundle install command will take care of locating, installing and linking to either the remote git or locally installed version of abbot and dependencies.
61
+
62
+ 3. Init the Sproutcore project and start the server
63
+
64
+ $ bin/sc-init .
65
+ $ bin/sc-server
66
+
42
67
  == KNOWN LIMITATIONS:
43
68
 
44
69
  * Currently does not support sites using relative-links. You must specify
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 5
4
- :patch: 0.pre.3
4
+ :patch: 0.pre.4
data/bin/sc-build CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-build from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-build from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sc-build-number CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-build-number from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-build-number from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sc-docs CHANGED
@@ -8,7 +8,7 @@
8
8
  # ===========================================================================
9
9
 
10
10
  if caller.empty?
11
- puts "FATAL: You need to invoke sc-docs from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
11
+ puts "FATAL: You need to invoke sc-docs from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
12
12
  exit
13
13
  end
14
14
 
data/bin/sc-gen CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-gen from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-gen from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sc-init CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-init from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-init from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sc-manifest CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-manifest from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-manifest from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sc-server CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sc-server from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sc-server from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
data/bin/sproutcore CHANGED
@@ -7,7 +7,7 @@
7
7
  # ===========================================================================
8
8
 
9
9
  if caller.empty?
10
- puts "FATAL: You need to invoke sproutcore from an installed gem or through bundler. For more information, please visit http://github.com/sproutcore/abbot/wiki/Using-Abbot-1.4-From-Source"
10
+ puts "FATAL: You need to invoke sproutcore from an installed gem or through bundler. For more information, please view the README 'Using Abbot From Source'."
11
11
  exit
12
12
  end
13
13
 
@@ -20,6 +20,11 @@ namespace :build do
20
20
  SC::Builder::Stylesheet.build env[:entry], env[:dst_path]
21
21
  end
22
22
 
23
+ desc "converts a Handlebars file to JavaScript"
24
+ build_task :handlebars do |task, env|
25
+ SC::Builder::Handlebars.build env[:entry], env[:dst_path]
26
+ end
27
+
23
28
  desc "stub task for images"
24
29
  build_task :image do |task, env|
25
30
 
@@ -202,7 +202,7 @@ namespace :manifest do
202
202
  namespace :prepare_build_tasks do
203
203
 
204
204
  desc "main entrypoint for preparing all build tasks. This should invoke all needed tasks"
205
- task :all => %w(css javascript module_info sass scss less combine string_wrap minify string_wrap html strings tests packed)
205
+ task :all => %w(css handlebars javascript module_info sass scss less combine string_wrap minify string_wrap html strings tests packed)
206
206
 
207
207
  desc "executes prerequisites needed before one of the subtasks can be invoked. All subtasks that have this as a prereq"
208
208
  task :setup => %w(manifest:catalog manifest:hide_buildfiles manifest:localize)
@@ -311,6 +311,25 @@ namespace :manifest do
311
311
  end
312
312
  end
313
313
 
314
+ desc "scans for Handlebars templates and converts them to JavaScript"
315
+ task :handlebars => %w(setup) do |task, env|
316
+ manifest = env[:manifest]
317
+
318
+ entries = manifest.entries.select do |e|
319
+ e[:ext] == 'handlebars'
320
+ end
321
+
322
+ entries.each do |entry|
323
+ entry = manifest.add_transform entry,
324
+ :filename => ['source', entry[:filename]].join('/'),
325
+ :build_path => File.join(manifest[:build_root], 'source', entry[:filename].ext('js')),
326
+ :url => [manifest[:url_root], 'source', entry[:filename]].join("/"),
327
+ :build_task => 'build:handlebars',
328
+ :resource => 'javascript',
329
+ :entry_type => :javascript
330
+ end
331
+ end
332
+
314
333
  desc "adds a module_info.js entry for all deferred and prefetched modules"
315
334
  task :module_info => %w(setup) do |task, env|
316
335
  target = env[:target]
@@ -27,14 +27,16 @@ end
27
27
  # CORE FRAMEWORKS
28
28
  config :bootstrap, :required => [], :use_modules => false
29
29
 
30
- config :jquery, :required => []
31
- config :runtime, :required => [:jquery]
32
- config :amber, :required => [:runtime]
33
- config :foundation, :required => [:amber]
34
- config :datastore, :required => [:foundation]
35
- config :statechart, :required => [:amber]
36
- config :desktop, :required => [:foundation]
37
- config :media, :required => [:desktop]
30
+ config :jquery, :required => []
31
+ config :handlebars, :required => []
32
+ config :runtime, :required => [:jquery]
33
+ config :datetime, :required => [:runtime]
34
+ config :core_foundation, :required => [:runtime, :handlebars]
35
+ config :foundation, :required => [:core_foundation, :datetime]
36
+ config :datastore, :required => [:runtime, :datetime]
37
+ config :statechart, :required => [:core_foundation]
38
+ config :desktop, :required => [:foundation]
39
+ config :media, :required => [:desktop]
38
40
 
39
41
  # APP-LEVEL FRAMEWORKS
40
42
  %w(mobile designer).each do |app_framework|
@@ -109,4 +111,5 @@ config :test_controls, :css_theme => 'ace.test-controls'
109
111
 
110
112
  config :greenhouse,
111
113
  :required => [:sproutcore, :'sproutcore/designer', :statechart],
112
- :theme => :standard_theme
114
+ :theme => :ace,
115
+ :css_theme => 'ace.greenhouse'
@@ -1,3 +1,51 @@
1
+
2
+ CHANGE LOG FOR 1.5
3
+ ==================
4
+
5
+ 1.5.0.pre.4
6
+ -----------
7
+
8
+ * We are beginning to move API that we don't believe will be ready before 1.5
9
+ release into the `experimental` framework. If your apps rely on code that is
10
+ migrated to experimental, please make sure you include it as a dependency. For
11
+ more, please see frameworks/experimental/README.md.
12
+ * Support for extending classes after they've been created with the
13
+ reopen()/enhance() combo. For more, see: [this
14
+ discussion](http://groups.google.com/group/sproutcore-dev/browse_thread/thread/d65ad54d6fddef5d)
15
+ - This change may break existing code if you call sc_super() in your mixins.
16
+ If your app throws exceptions after updating, please see [this post](http://groups.google.com/group/sproutcore-dev/browse_thread/thread/cc6a97e6133cb8cc).
17
+ * Added SC.TemplateView and Handlebars. These allow you to specify the content
18
+ of your views using templates.
19
+ - {{#view}} helper allows you to define child views
20
+ - {{#bind}} helper allows you to render a property, and automatically update DOM if that
21
+ property ever changes.
22
+ - {{#collection}} helpers allows you to render a simple collection of items
23
+ using templates
24
+ - SC.TextFieldSupport and SC.CheckboxSupport mixins for SC.TemplateViews
25
+ that wrap <input> elements.
26
+ * Split SC.View into units of functionality. SC.View remains functionally the
27
+ same, but you can now use SC.CoreView, a light-weight subset of SC.View.
28
+ * SC.ImageView will use a <canvas> tag on platforms that support it, which
29
+ improves performance significantly.
30
+ * SC.SegmentedView now creates an overflow menu if there are too many segments
31
+ to display.
32
+ - Class names for SC.SegmentedView have been cleaned up. You may need to
33
+ update your CSS if you were theming SC.SegmentedView.
34
+ * You can now observe the contents of enumerables using the special `@each`
35
+ key.
36
+ * Dependent keys can accept property paths. For example, you can say
37
+ .property('foo.bar'), and it will be invalidated if the `bar` property of
38
+ `foo` changes.
39
+ * Deprecated SC.viewportOffset(). Please use SC.offset() instead, which is
40
+ more explicit about what it returns.
41
+ * SC.browser now detects Android devices.
42
+ * SC.device.orientation now works reliably on desktop, iOS, and Android 2.1
43
+ and above.
44
+ * Experimental support for gyroscope information, if provided by the browser.
45
+ * Unit tests for runtime, desktop, foundation, core_foundation, and datastore
46
+ are all passing.
47
+
48
+
1
49
  CHANGE LOG FOR 1.4
2
50
  ==================
3
51
 
@@ -1,16 +1,9 @@
1
1
  Getting Started with Greenhouse (PageDesigner)
2
2
  ==============================================================================
3
3
 
4
- git clone git://github.com/sproutit/sproutcore-abbot.git abbot
5
- cd abbot
6
- mkdir frameworks
7
- cd frameworks
8
- git clone git://github.com/sproutit/sproutcore.git sproutcore
9
- git checkout greenhouse
10
-
11
4
  to run:
12
- cd into/your/project
13
- ../abbot/bin/sc-server --filesystem
5
+ cd into/your/sc_project
6
+ sc-server
14
7
 
15
8
  visit:
16
9
  http://localhost:4020/sproutcore/greenhouse
@@ -1,28 +1,3 @@
1
- -JS config file to store all custom files (in design/greenhouse.json or ./greenhouse.json) and load all configs of all frameworks currently required
2
- - move all desingers into the /designer folder of their respective frameworks
3
- - open main page if it exists
4
-
5
-
6
-
7
-
8
-
9
-
10
- DEMO Punch-list:
11
- - adding a base view to a new page [MB] @Done
12
- - exceptions when dragging view or controller into page [MB] @Done
13
- - cleanup dimensions of modals [EG] @Done
14
- - finish tear-off picker panes [MB/EG] @Done
15
- - binding value is undefined [EG/MB]
16
- - fix add custom view event [MB] @Done
17
- - add js beautifier [MB] @Done
18
-
19
-
20
-
21
- - Inner run loop not triggering re-draw of anchor view [CJ]
22
- - figure out location for SC meetup [MB/EG]
23
-
24
-
25
-
26
1
  TODO for demo:
27
2
  - delete views from page
28
3
  v change view type inline
@@ -35,12 +10,21 @@ v View hierarchy inchworm view...
35
10
  - routes that choose project
36
11
 
37
12
  New UI Changes:
38
- - move (tools) inspector to picker/tear-off menu
39
13
  - update grid view to have horizontal scroll
40
- - dock tear-off pickers to side
41
14
 
42
15
  Done stuff...
43
16
  =========================
17
+ - dock tear-off pickers to side
18
+ - move (tools) inspector to picker/tear-off menu
19
+ - Inner run loop not triggering re-draw of anchor view [MB] @Done
20
+ - adding a base view to a new page [MB] @Done
21
+ - exceptions when dragging view or controller into page [MB] @Done
22
+ - cleanup dimensions of modals [EG] @Done
23
+ - finish tear-off picker panes [MB/EG] @Done
24
+ - binding value is undefined [EG/MB]
25
+ - fix add custom view event [MB] @Done
26
+ - add js beautifier [MB] @Done
27
+ -JS config file to store all custom files (in design/greenhouse.json or ./greenhouse.json) and load all configs of all frameworks currently required
44
28
  v add a controller (or execute any sc-gen command via greenhouse) @Done
45
29
  - page creation broken! @Done
46
30
  ^ draw lines to hook up bindings @Done
@@ -73,10 +73,6 @@ Greenhouse.libraryController = SC.TreeController.create( SC.CollectionViewDelega
73
73
  @returns {Object} the data object or null if the data could not be provided.
74
74
  */
75
75
  collectionViewDragDataForType: function(view, drag, dataType) {
76
- //store the iframe's frame for use on drop
77
- var webView = Greenhouse.appPage.getPath('webView');
78
-
79
- drag.iframeFrame = webView.get('parentView').convertFrameToView(webView.get('frame'), null);
80
76
  var ret = (dataType === 'SC.Object') ? this.get('selection').firstObject() : null;
81
77
  return ret ;
82
78
  },
@@ -92,12 +88,9 @@ Greenhouse.libraryController = SC.TreeController.create( SC.CollectionViewDelega
92
88
  @returns {SC.View} view or null
93
89
  */
94
90
  collectionViewDragViewFor: function(view, dragContent) {
95
- var dragView = view.itemViewForContentIndex(dragContent.firstObject());
96
- var layer = view.get('layer').cloneNode(false) ;
97
- dragView.set('parentView', view) ;
98
- dragView.set('layer', layer) ;
99
- dragView.adjust({height: view.get('rowHeight'), top: (dragContent.firstObject()*view.get('rowHeight')) }) ;
100
- return dragView ;
91
+ var selectedItemIndex = dragContent.firstObject();
92
+ var itemView = view.itemViewForContentIndex(selectedItemIndex);
93
+ return itemView;
101
94
  },
102
95
 
103
96
  /**
@@ -8,8 +8,9 @@
8
8
 
9
9
  /* Toolbar */
10
10
 
11
- .toolbar {
11
+ .ace .toolbar {
12
12
  background: static_url('images/toolbar-bg.png') repeat-x;
13
+ border-bottom: none;
13
14
  }
14
15
 
15
16
  .greenhouse-logo-s {
@@ -29,61 +30,33 @@
29
30
  background: static_url('images/icons/projects.png') no-repeat;
30
31
  width: 28px;
31
32
  height: 14px;
32
- position: absolute;
33
- top: 50%;
34
- margin-top: -7px;
35
- left: 50%;
36
- margin-left: -14px;
37
33
  }
38
34
  .toolbar .save {
39
35
  background: static_url('images/icons/save.png') no-repeat;
40
36
  width: 14px;
41
37
  height: 15px;
42
- position: absolute;
43
- top: 50%;
44
- margin-top: -8px;
45
- left: 50%;
46
- margin-left: -7px;
47
38
  }
48
39
  .toolbar .run {
49
40
  background: static_url('images/icons/run.png') no-repeat;
50
41
  width: 10px;
51
42
  height: 12px;
52
- position: absolute;
53
- top: 50%;
54
- margin-top: -6px;
55
- left: 50%;
56
- margin-left: -5px;
57
43
  }
58
44
  .toolbar .library {
59
45
  background: static_url('images/icons/library.png') no-repeat;
60
46
  width: 21px;
61
47
  height: 16px;
62
- position: absolute;
63
- top: 50%;
64
- margin-top: -8px;
65
- left: 50%;
66
- margin-left: -10px;
67
48
  }
68
49
  .toolbar .inspector {
69
50
  background: static_url('images/icons/inspector.png') no-repeat;
70
51
  width: 25px;
71
52
  height: 17px;
72
- position: absolute;
73
- top: 50%;
74
- margin-top: -8px;
75
- left: 50%;
76
- margin-left: -12px;
53
+
77
54
  }
78
55
  .toolbar .actions {
79
56
  background: static_url('images/icons/actions.png') no-repeat;
80
57
  width: 28px;
81
58
  height: 17px;
82
- position: absolute;
83
- top: 50%;
84
- margin-top: -8px;
85
- left: 50%;
86
- margin-left: -14px;
59
+
87
60
  }
88
61
 
89
62
  .toolbar .projects.active {
@@ -81,8 +81,9 @@ Greenhouse.dialogPage = SC.Page.design({
81
81
  }),
82
82
 
83
83
  propertyEditor: SC.View.design({
84
- childViews: 'title keyLabel key valueLabel value update cancel'.w(),
85
-
84
+ // childViews: 'title keyLabel key valueLabel value update cancel'.w(),
85
+ childViews: 'title keyLabel key valueLabel value updateButton cancelButton'.w(),
86
+
86
87
  title: SC.LabelView.design({
87
88
  layout: {top: 2, left: 15, right: 5, height: 22},
88
89
  value: "_Edit Property:".loc(),
@@ -123,7 +124,7 @@ Greenhouse.dialogPage = SC.Page.design({
123
124
  valueBinding: 'Greenhouse.propertyEditorController.value',
124
125
  isTextArea: YES
125
126
  }),
126
- cancel: SC.ButtonView.design({
127
+ cancelButton: SC.ButtonView.design({
127
128
  layout: {bottom: 5, right: 105, width: 84, height: 24},
128
129
  isDefault: NO,
129
130
  action: 'cancel',
@@ -131,7 +132,7 @@ Greenhouse.dialogPage = SC.Page.design({
131
132
  keyEquivalent: 'escape',
132
133
  title: "_Cancel".loc()
133
134
  }),
134
- update: SC.ButtonView.design({
135
+ updateButton: SC.ButtonView.design({
135
136
  layout: {bottom: 5, right: 15, width: 84, height: 24},
136
137
  isDefault: YES,
137
138
  action: 'update',
@@ -13,13 +13,13 @@ require('core');
13
13
  @property name
14
14
  @property contents
15
15
 
16
- @extends SC.ChildRecord
16
+ @extends SC.Record
17
17
  @version 0.1
18
18
  */
19
- Greenhouse.Dir = SC.ChildRecord.extend(
19
+ Greenhouse.Dir = SC.Record.extend(
20
20
  /** @scope Greenhouse.Dir.prototype */ {
21
21
  type: 'Dir',
22
- childRecordNamespace: Greenhouse,
22
+ nestedRecordNamespace: Greenhouse,
23
23
 
24
24
  name: SC.Record.attr(String),
25
25
  dir: SC.Record.attr(String),
@@ -15,10 +15,10 @@ require('core');
15
15
  @extends SC.ChildRecord
16
16
  @version 0.1
17
17
  */
18
- Greenhouse.File = SC.ChildRecord.extend(
18
+ Greenhouse.File = SC.Record.extend(
19
19
  /** @scope Greenhouse.File.prototype */ {
20
20
  type: 'File',
21
- childRecordNamespace: Greenhouse,
21
+ nestedRecordNamespace: Greenhouse,
22
22
  name: SC.Record.attr(String),
23
23
  dir: SC.Record.attr(String),
24
24
  body: SC.Record.attr(String),
@@ -194,13 +194,22 @@ Greenhouse.mixin( /** @scope Greenhouse */{
194
194
  var iframe = Greenhouse.get('iframe'),
195
195
  innerTargets,
196
196
  webViewFrame,
197
+ dropContainerLayout,
197
198
  webView = Greenhouse.appPage.get('webView');
198
199
 
199
200
  var pv = webView.get('parentView');
200
201
  webViewFrame = webView.get('frame');
201
202
  webViewFrame = pv.convertFrameToView(webViewFrame, null);
202
-
203
-
203
+ //add the drop container to the adjusted layout
204
+ dropContainerLayout = iframe.SC.designPage.getPath('designMainPane.container').layout;
205
+
206
+ if(dropContainerLayout){
207
+ webViewFrame.x += dropContainerLayout.left;
208
+ webViewFrame.y += dropContainerLayout.top;
209
+ }
210
+ //assign this to
211
+ Greenhouse._webViewFrame = webViewFrame;
212
+
204
213
  //add existing targets
205
214
  innerTargets = iframe.SC.Drag._dropTargets;
206
215
 
@@ -221,33 +230,41 @@ Greenhouse.mixin( /** @scope Greenhouse */{
221
230
  delete iframe.SC.Drag._dropTargets[iframe.SC.guidFor(target)] ;
222
231
  delete SC.Drag._dropTargets[iframe.SC.guidFor(target)];
223
232
  };
233
+
234
+ //make sure all drags have an iframeTargetOffset...
235
+ SC.Drag.start = function(ops) {
236
+ var ret = this.create(ops);
237
+ ret.globalTargetOffset = Greenhouse._webViewFrame;
238
+ ret.startDrag();
239
+ return ret;
240
+ };
241
+
242
+ //all inner drags are actually outer drags
243
+ iframe.SC.Drag.start = SC.Drag.start;
224
244
 
225
245
 
226
246
  SC.Drag.prototype._findDropTarget = function(evt) {
227
- var loc = { x: evt.pageX, y: evt.pageY } ;
228
-
247
+ var loc = { x: evt.pageX, y: evt.pageY }, globalOffset = this.globalTargetOffset ;
229
248
  var target, frame ;
230
249
  var ary = this._dropTargets() ;
231
250
  for (var idx=0, len=ary.length; idx<len; idx++) {
232
251
  target = ary[idx] ;
233
-
234
252
  // If the target is not visible, it is not valid.
235
253
  if (!target.get('isVisibleInWindow')) continue ;
236
254
 
237
255
  // get clippingFrame, converted to the pane.
238
256
  frame = target.convertFrameToView(target.get('clippingFrame'), null) ;
239
-
240
- //if this is in the iframe adjust the frame accordingly
241
- if(target.get('targetIsInIFrame')){
242
- frame.x = frame.x + webViewFrame.x;
243
- frame.y = frame.y + webViewFrame.y;
244
- }
257
+ //convert to iframe pane if it is in the winodw
258
+ if(globalOffset && target.inGlobalOffset){
259
+ frame.x += globalOffset.x;
260
+ frame.y += globalOffset.y;
261
+ }
245
262
  // check to see if loc is inside. If so, then make this the drop target
246
263
  // unless there is a drop target and the current one is not deeper.
247
- if (SC.pointInRect(loc, frame)) return target;
264
+ if(SC.pointInRect(loc, frame)) return target;
265
+
248
266
  }
249
- return null ;
250
- };
267
+ return null ; };
251
268
  //all inner drags are actually outer drags
252
269
  iframe.SC.Drag.start = SC.Drag.start;
253
270
  },
@@ -210,7 +210,8 @@ Greenhouse.mixin( /** @scope Greenhouse */{
210
210
 
211
211
  enterState: function(){
212
212
  var picker = Greenhouse.dialogPage.get('propertyPicker');
213
- picker.set('contentView', Greenhouse.dialogPage.get('propertyEditor'));
213
+ var cv = Greenhouse.dialogPage.get('propertyEditor');
214
+ picker.set('contentView', cv);
214
215
  var list = Greenhouse.inspectorsPage.getPath('propertiesInspector.list.contentView');
215
216
  var content = Greenhouse.propertyController.get('content');
216
217