sproutcore 1.6.0.beta.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2105) hide show
  1. data/.mailmap +32 -0
  2. data/.rspec +1 -0
  3. data/CHANGELOG +170 -0
  4. data/Gemfile +3 -0
  5. data/History.txt +54 -0
  6. data/README.txt +129 -0
  7. data/Rakefile +62 -0
  8. data/Todo.txt +1 -0
  9. data/VERSION.yml +4 -0
  10. data/bin/sc-build +13 -0
  11. data/bin/sc-build-number +13 -0
  12. data/bin/sc-docs +14 -0
  13. data/bin/sc-gen +13 -0
  14. data/bin/sc-init +13 -0
  15. data/bin/sc-manifest +13 -0
  16. data/bin/sc-server +13 -0
  17. data/bin/sproutcore +13 -0
  18. data/lib/Buildfile +152 -0
  19. data/lib/buildtasks/build.rake +119 -0
  20. data/lib/buildtasks/entry.rake +68 -0
  21. data/lib/buildtasks/manifest.rake +893 -0
  22. data/lib/buildtasks/render.rake +21 -0
  23. data/lib/buildtasks/target.rake +66 -0
  24. data/lib/doc_templates/jsdoc/allclasses.tmpl +17 -0
  25. data/lib/doc_templates/jsdoc/allfiles.tmpl +56 -0
  26. data/lib/doc_templates/jsdoc/class.tmpl +487 -0
  27. data/lib/doc_templates/jsdoc/index.tmpl +38 -0
  28. data/lib/doc_templates/jsdoc/publish.js +170 -0
  29. data/lib/doc_templates/jsdoc/static/default.css +162 -0
  30. data/lib/doc_templates/jsdoc/static/header.html +2 -0
  31. data/lib/doc_templates/jsdoc/static/index.html +19 -0
  32. data/lib/doc_templates/jsdoc/symbol.tmpl +35 -0
  33. data/lib/doc_templates/sproutcore/allclasses.tmpl +0 -0
  34. data/lib/doc_templates/sproutcore/allfiles.tmpl +56 -0
  35. data/lib/doc_templates/sproutcore/class.tmpl +674 -0
  36. data/lib/doc_templates/sproutcore/classes-json.tmpl +55 -0
  37. data/lib/doc_templates/sproutcore/index.tmpl +62 -0
  38. data/lib/doc_templates/sproutcore/publish.js +346 -0
  39. data/lib/doc_templates/sproutcore/static/default.css +258 -0
  40. data/lib/doc_templates/sproutcore/static/header.html +2 -0
  41. data/lib/doc_templates/sproutcore/static/index.html +19 -0
  42. data/lib/doc_templates/sproutcore/symbol.tmpl +35 -0
  43. data/lib/frameworks/sproutcore/Buildfile +104 -0
  44. data/lib/frameworks/sproutcore/CHANGELOG.md +435 -0
  45. data/lib/frameworks/sproutcore/README.md +139 -0
  46. data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
  47. data/lib/frameworks/sproutcore/apps/test_controls/controllers/alert.js +39 -0
  48. data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
  49. data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +125 -0
  50. data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
  51. data/lib/frameworks/sproutcore/apps/test_controls/controllers/split.js +74 -0
  52. data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
  53. data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
  54. data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +158 -0
  55. data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +53 -0
  56. data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +85 -0
  57. data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
  58. data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
  59. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
  60. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +151 -0
  61. data/lib/frameworks/sproutcore/apps/test_controls/resources/panels_page.js +62 -0
  62. data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +33 -0
  63. data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +55 -0
  64. data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +77 -0
  65. data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +99 -0
  66. data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +61 -0
  67. data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +54 -0
  68. data/lib/frameworks/sproutcore/apps/test_controls/resources/split_page.js +141 -0
  69. data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
  70. data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +53 -0
  71. data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +65 -0
  72. data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
  73. data/lib/frameworks/sproutcore/apps/tests/controllers/detail.js +25 -0
  74. data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +29 -0
  75. data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +26 -0
  76. data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +86 -0
  77. data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +33 -0
  78. data/lib/frameworks/sproutcore/apps/tests/core.js +133 -0
  79. data/lib/frameworks/sproutcore/apps/tests/english.lproj/loading.rhtml +9 -0
  80. data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +48 -0
  81. data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +233 -0
  82. data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +26 -0
  83. data/lib/frameworks/sproutcore/apps/tests/main.js +27 -0
  84. data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +26 -0
  85. data/lib/frameworks/sproutcore/apps/tests/states/ready.js +56 -0
  86. data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +41 -0
  87. data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +48 -0
  88. data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +41 -0
  89. data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +44 -0
  90. data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +31 -0
  91. data/lib/frameworks/sproutcore/apps/tests/states/start.js +39 -0
  92. data/lib/frameworks/sproutcore/apps/tests/tests/controllers/detail.js +15 -0
  93. data/lib/frameworks/sproutcore/apps/tests/tests/controllers/source.js +15 -0
  94. data/lib/frameworks/sproutcore/apps/tests/tests/controllers/target.js +15 -0
  95. data/lib/frameworks/sproutcore/apps/tests/tests/controllers/targets.js +15 -0
  96. data/lib/frameworks/sproutcore/apps/tests/tests/controllers/tests.js +15 -0
  97. data/lib/frameworks/sproutcore/apps/tests/tests/models/target.js +15 -0
  98. data/lib/frameworks/sproutcore/apps/tests/tests/models/test.js +15 -0
  99. data/lib/frameworks/sproutcore/apps/tests/tests/views/offset_checkbox.js +15 -0
  100. data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +26 -0
  101. data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +55 -0
  102. data/lib/frameworks/sproutcore/apps/welcome/core.js +30 -0
  103. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
  104. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/loading.rhtml +10 -0
  105. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +25 -0
  106. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +67 -0
  107. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/strings.js +15 -0
  108. data/lib/frameworks/sproutcore/apps/welcome/main.js +19 -0
  109. data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +15 -0
  110. data/lib/frameworks/sproutcore/design/Record State Table.numbers +0 -0
  111. data/lib/frameworks/sproutcore/design/greenhouse-statechart.pdf +0 -0
  112. data/lib/frameworks/sproutcore/frameworks/ajax/fixtures/file_exists.json +1 -0
  113. data/lib/frameworks/sproutcore/frameworks/ajax/fixtures/malformed.json +11 -0
  114. data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +609 -0
  115. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +550 -0
  116. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +276 -0
  117. data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +3 -0
  118. data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +25 -0
  119. data/lib/frameworks/sproutcore/frameworks/animation/README.md +79 -0
  120. data/lib/frameworks/sproutcore/frameworks/animation/core.js +1205 -0
  121. data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +152 -0
  122. data/lib/frameworks/sproutcore/frameworks/bootstrap/README +9 -0
  123. data/lib/frameworks/sproutcore/frameworks/bootstrap/core.js +7 -0
  124. data/lib/frameworks/sproutcore/frameworks/bootstrap/setup_body_class_names.js +10 -0
  125. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
  126. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +225 -0
  127. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +50 -0
  128. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +187 -0
  129. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +524 -0
  130. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +44 -0
  131. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +342 -0
  132. data/lib/frameworks/sproutcore/frameworks/core_foundation/controls/button.js +49 -0
  133. data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +189 -0
  134. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/function.js +39 -0
  135. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +293 -0
  136. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +57 -0
  137. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/localization.js +5 -0
  138. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/view.js +96 -0
  139. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars.js +73 -0
  140. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +81 -0
  141. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +163 -0
  142. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/string.js +60 -0
  143. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/delegate_support.js +110 -0
  144. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/responder_context.js +268 -0
  145. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +249 -0
  146. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +63 -0
  147. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +174 -0
  148. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/keyboard.js +74 -0
  149. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +95 -0
  150. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +50 -0
  151. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +33 -0
  152. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +670 -0
  153. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +43 -0
  154. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +17 -0
  155. data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/observable_protocol.js +40 -0
  156. data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/sparse_array_delegate.js +131 -0
  157. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +378 -0
  158. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +57 -0
  159. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +33 -0
  160. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/bindable_span.js +164 -0
  161. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +36 -0
  162. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/builder.js +202 -0
  163. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +141 -0
  164. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +131 -0
  165. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/datetime.js +0 -0
  166. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +210 -0
  167. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +991 -0
  168. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +289 -0
  169. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/page.js +106 -0
  170. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +419 -0
  171. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +103 -0
  172. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +1030 -0
  173. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +124 -0
  174. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +2180 -0
  175. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +693 -0
  176. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +401 -0
  177. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +162 -0
  178. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +316 -0
  179. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +548 -0
  180. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +104 -0
  181. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +155 -0
  182. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +301 -0
  183. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/enum_case.js +206 -0
  184. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/null_case.js +64 -0
  185. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +344 -0
  186. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/single_case.js +136 -0
  187. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/empty_case.js +82 -0
  188. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/multiple_case.js +111 -0
  189. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_case.js +193 -0
  190. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_enumerable_case.js +265 -0
  191. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controls/button.js +78 -0
  192. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/responder_context.js +76 -0
  193. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/string.js +78 -0
  194. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/checkbox_support.js +64 -0
  195. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +193 -0
  196. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/panes/template.js +20 -0
  197. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/builder.js +49 -0
  198. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/core_query/within.js +71 -0
  199. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/locale.js +140 -0
  200. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/ready/done.js +40 -0
  201. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/begin.js +47 -0
  202. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/element.js +44 -0
  203. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +124 -0
  204. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/get.js +51 -0
  205. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +50 -0
  206. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js +28 -0
  207. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +177 -0
  208. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +109 -0
  209. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/init.js +55 -0
  210. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/join.js +28 -0
  211. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/push_text.js +74 -0
  212. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/tag.js +46 -0
  213. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +219 -0
  214. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeKeyPane.js +124 -0
  215. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMainPane.js +68 -0
  216. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/makeMenuPane.js +48 -0
  217. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/root_responder.js +108 -0
  218. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/root_responder/targetForAction.js +288 -0
  219. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/add.js +92 -0
  220. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/copy.js +17 -0
  221. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/indexSetForSource.js +98 -0
  222. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/isEqual.js +60 -0
  223. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/remove.js +111 -0
  224. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +256 -0
  225. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +78 -0
  226. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/invalidate.js +44 -0
  227. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/invokeLater.js +209 -0
  228. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/isPaused.js +77 -0
  229. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/performAction.js +75 -0
  230. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/timer/schedule.js +176 -0
  231. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/normalizeURL.js +24 -0
  232. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/offset.js +284 -0
  233. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/utils/rect.js +105 -0
  234. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +49 -0
  235. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +224 -0
  236. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +26 -0
  237. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +148 -0
  238. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +133 -0
  239. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +31 -0
  240. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +206 -0
  241. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +249 -0
  242. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/core.js +160 -0
  243. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +937 -0
  244. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +382 -0
  245. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +85 -0
  246. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build_children.js +89 -0
  247. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +117 -0
  248. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +248 -0
  249. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertLayouts.js +153 -0
  250. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +132 -0
  251. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +97 -0
  252. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +83 -0
  253. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +83 -0
  254. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +50 -0
  255. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +50 -0
  256. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +217 -0
  257. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +85 -0
  258. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +122 -0
  259. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +28 -0
  260. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +146 -0
  261. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +162 -0
  262. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +180 -0
  263. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +745 -0
  264. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +67 -0
  265. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +203 -0
  266. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +189 -0
  267. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +203 -0
  268. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +163 -0
  269. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceChild.js +29 -0
  270. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/static_layout.js +28 -0
  271. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js +45 -0
  272. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +148 -0
  273. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +213 -0
  274. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +64 -0
  275. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +202 -0
  276. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template.js +132 -0
  277. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +244 -0
  278. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +182 -0
  279. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/base.js +4 -0
  280. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +48 -0
  281. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +57 -0
  282. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +223 -0
  283. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +1116 -0
  284. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +624 -0
  285. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +401 -0
  286. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +400 -0
  287. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/touch.js +67 -0
  288. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +118 -0
  289. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +1521 -0
  290. data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +20 -0
  291. data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +99 -0
  292. data/lib/frameworks/sproutcore/frameworks/core_tools/english.lproj/strings.js +15 -0
  293. data/lib/frameworks/sproutcore/frameworks/core_tools/fixtures/target.js +87 -0
  294. data/lib/frameworks/sproutcore/frameworks/core_tools/fixtures/test.js +44 -0
  295. data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +108 -0
  296. data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +48 -0
  297. data/lib/frameworks/sproutcore/frameworks/datastore/core.js +8 -0
  298. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +176 -0
  299. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +530 -0
  300. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +393 -0
  301. data/lib/frameworks/sproutcore/frameworks/datastore/debug/json.js +71 -0
  302. data/lib/frameworks/sproutcore/frameworks/datastore/debug/standard_setup.js +96 -0
  303. data/lib/frameworks/sproutcore/frameworks/datastore/fixtures/author_fixtures.js +2503 -0
  304. data/lib/frameworks/sproutcore/frameworks/datastore/fixtures/sample.js +17 -0
  305. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +105 -0
  306. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +21 -0
  307. data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +74 -0
  308. data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +100 -0
  309. data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +152 -0
  310. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +1441 -0
  311. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +604 -0
  312. data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +157 -0
  313. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +277 -0
  314. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +453 -0
  315. data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +613 -0
  316. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +1526 -0
  317. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +758 -0
  318. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +2860 -0
  319. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +133 -0
  320. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +122 -0
  321. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/contact_model.js +131 -0
  322. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/cyclical_relationship.js +119 -0
  323. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/mail_model.js +91 -0
  324. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +56 -0
  325. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/datetime_recordattribute.js +73 -0
  326. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +423 -0
  327. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +180 -0
  328. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +313 -0
  329. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +363 -0
  330. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +421 -0
  331. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +304 -0
  332. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/core_methods.js +55 -0
  333. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +92 -0
  334. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/error_methods.js +56 -0
  335. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/normalize.js +336 -0
  336. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +53 -0
  337. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +48 -0
  338. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +170 -0
  339. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +66 -0
  340. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +112 -0
  341. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +252 -0
  342. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +284 -0
  343. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +204 -0
  344. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +180 -0
  345. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +173 -0
  346. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +158 -0
  347. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/core_methods.js +70 -0
  348. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +113 -0
  349. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +102 -0
  350. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +180 -0
  351. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +126 -0
  352. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +163 -0
  353. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +166 -0
  354. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +219 -0
  355. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/compare.js +144 -0
  356. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/contains.js +131 -0
  357. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/containsRecordTypes.js +81 -0
  358. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/copy.js +30 -0
  359. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +197 -0
  360. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation_of_records.js +117 -0
  361. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/expandedRecordTypes.js +64 -0
  362. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/parse.js +224 -0
  363. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/queryWithScope.js +57 -0
  364. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/record_type_is.js +47 -0
  365. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_comparisons.js +70 -0
  366. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/registered_query_extensions.js +71 -0
  367. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/array_observers.js +82 -0
  368. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +177 -0
  369. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/error_methods.js +50 -0
  370. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +230 -0
  371. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +54 -0
  372. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +137 -0
  373. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +221 -0
  374. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/core_methods.js +156 -0
  375. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +76 -0
  376. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +157 -0
  377. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +278 -0
  378. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +110 -0
  379. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/error_methods.js +62 -0
  380. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/find.js +530 -0
  381. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +23 -0
  382. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +64 -0
  383. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecords.js +100 -0
  384. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +61 -0
  385. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +74 -0
  386. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +74 -0
  387. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +76 -0
  388. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +144 -0
  389. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +200 -0
  390. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/unloadRecord.js +55 -0
  391. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/unloadRecords.js +90 -0
  392. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +125 -0
  393. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +1103 -0
  394. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +390 -0
  395. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +14 -0
  396. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +91 -0
  397. data/lib/frameworks/sproutcore/frameworks/debug/core.js +114 -0
  398. data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +259 -0
  399. data/lib/frameworks/sproutcore/frameworks/desktop/core.js +34 -0
  400. data/lib/frameworks/sproutcore/frameworks/desktop/debug/drag.js +42 -0
  401. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +56 -0
  402. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/a_sample_image.jpg +0 -0
  403. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/apple-logo1.jpeg +0 -0
  404. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/iframe.html +23 -0
  405. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +73 -0
  406. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/drag.css +7 -0
  407. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +916 -0
  408. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/cap.png +0 -0
  409. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/downbutton.png +0 -0
  410. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
  411. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-bottom.png +0 -0
  412. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-center.png +0 -0
  413. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/thumb-top.png +0 -0
  414. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/track.png +0 -0
  415. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/upbutton.png +0 -0
  416. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +185 -0
  417. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +12 -0
  418. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +101 -0
  419. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/modal.css +9 -0
  420. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +91 -0
  421. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +35 -0
  422. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +33 -0
  423. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +10 -0
  424. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +132 -0
  425. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +19 -0
  426. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +69 -0
  427. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/split.css +0 -0
  428. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/split_divider.css +6 -0
  429. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +14 -0
  430. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/tab.css +7 -0
  431. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/toolbar.css +5 -0
  432. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/touch-scroller.css +196 -0
  433. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/well.css +71 -0
  434. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +161 -0
  435. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +711 -0
  436. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +25 -0
  437. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +97 -0
  438. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +300 -0
  439. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +138 -0
  440. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +267 -0
  441. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +589 -0
  442. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +1081 -0
  443. data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +76 -0
  444. data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +96 -0
  445. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +193 -0
  446. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +939 -0
  447. data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +950 -0
  448. data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +237 -0
  449. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +43 -0
  450. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +79 -0
  451. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +187 -0
  452. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +301 -0
  453. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +112 -0
  454. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +98 -0
  455. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +25 -0
  456. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +59 -0
  457. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +35 -0
  458. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +51 -0
  459. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +29 -0
  460. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +60 -0
  461. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
  462. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +44 -0
  463. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +21 -0
  464. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +100 -0
  465. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +84 -0
  466. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +116 -0
  467. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +58 -0
  468. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +80 -0
  469. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +83 -0
  470. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
  471. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
  472. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +17 -0
  473. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
  474. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +1017 -0
  475. data/lib/frameworks/sproutcore/frameworks/desktop/system/key_bindings.js +42 -0
  476. data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +224 -0
  477. data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +64 -0
  478. data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +106 -0
  479. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +10 -0
  480. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +320 -0
  481. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +136 -0
  482. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +283 -0
  483. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +10 -0
  484. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +35 -0
  485. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +42 -0
  486. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +10 -0
  487. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +69 -0
  488. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +98 -0
  489. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +92 -0
  490. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +194 -0
  491. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +220 -0
  492. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +10 -0
  493. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +46 -0
  494. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/content.js +189 -0
  495. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +89 -0
  496. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +57 -0
  497. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +166 -0
  498. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +236 -0
  499. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +126 -0
  500. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +121 -0
  501. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +249 -0
  502. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deleteSelection.js +82 -0
  503. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deselect.js +215 -0
  504. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/displayProperties.js +31 -0
  505. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +300 -0
  506. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/layerIdFor.js +65 -0
  507. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/length.js +88 -0
  508. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +262 -0
  509. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/nowShowing.js +121 -0
  510. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +177 -0
  511. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/select.js +240 -0
  512. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js +205 -0
  513. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +211 -0
  514. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +141 -0
  515. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +188 -0
  516. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +76 -0
  517. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +456 -0
  518. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +10 -0
  519. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +102 -0
  520. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +10 -0
  521. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/ui.js +10 -0
  522. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +52 -0
  523. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +92 -0
  524. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowDelegate.js +183 -0
  525. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +133 -0
  526. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowOffsetForContentIndex.js +131 -0
  527. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +130 -0
  528. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +56 -0
  529. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +205 -0
  530. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +131 -0
  531. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +396 -0
  532. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +10 -0
  533. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +46 -0
  534. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +128 -0
  535. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +418 -0
  536. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +119 -0
  537. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +338 -0
  538. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/integration.js +50 -0
  539. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +143 -0
  540. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +162 -0
  541. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroller.js +118 -0
  542. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +62 -0
  543. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +457 -0
  544. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/methods.js +144 -0
  545. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +224 -0
  546. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +163 -0
  547. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +180 -0
  548. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +44 -0
  549. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +10 -0
  550. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +10 -0
  551. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +60 -0
  552. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +59 -0
  553. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +238 -0
  554. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +46 -0
  555. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +54 -0
  556. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +92 -0
  557. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/method.js +33 -0
  558. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +29 -0
  559. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/methods.js +10 -0
  560. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +110 -0
  561. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/well/ui.js +54 -0
  562. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +944 -0
  563. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +120 -0
  564. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +3186 -0
  565. data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +343 -0
  566. data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +85 -0
  567. data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +243 -0
  568. data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +82 -0
  569. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +657 -0
  570. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +995 -0
  571. data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +313 -0
  572. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +720 -0
  573. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +702 -0
  574. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +261 -0
  575. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +191 -0
  576. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +303 -0
  577. data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +259 -0
  578. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +404 -0
  579. data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +211 -0
  580. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +1987 -0
  581. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +995 -0
  582. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +193 -0
  583. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +1088 -0
  584. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +907 -0
  585. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +400 -0
  586. data/lib/frameworks/sproutcore/frameworks/desktop/views/separator.js +52 -0
  587. data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +299 -0
  588. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +61 -0
  589. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +176 -0
  590. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +897 -0
  591. data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +58 -0
  592. data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +121 -0
  593. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +148 -0
  594. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +286 -0
  595. data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +65 -0
  596. data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +138 -0
  597. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +103 -0
  598. data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +81 -0
  599. data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +285 -0
  600. data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
  601. data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +8 -0
  602. data/lib/frameworks/sproutcore/frameworks/experimental/README.md +23 -0
  603. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/README +18 -0
  604. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/TODO +56 -0
  605. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/beautify.js +1058 -0
  606. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/design.js +20 -0
  607. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/file.js +35 -0
  608. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/files.js +40 -0
  609. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/layout.js +53 -0
  610. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/library.js +194 -0
  611. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/page.js +18 -0
  612. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/property.js +19 -0
  613. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/property_editor.js +17 -0
  614. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/target.js +20 -0
  615. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js +43 -0
  616. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/view_configs.js +100 -0
  617. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core.js +65 -0
  618. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/core_file.js +124 -0
  619. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/data_source.js +250 -0
  620. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/app_page.js +399 -0
  621. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/app-selector.css +107 -0
  622. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/button.css +314 -0
  623. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/dock.css +90 -0
  624. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/general.css +51 -0
  625. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/main-page.css +93 -0
  626. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/menu.css +49 -0
  627. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/modal.css +41 -0
  628. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/picker.css +195 -0
  629. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/search.css +60 -0
  630. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/css/text-field.css +67 -0
  631. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/dialogs.js +303 -0
  632. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
  633. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
  634. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
  635. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
  636. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
  637. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
  638. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
  639. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
  640. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
  641. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
  642. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
  643. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
  644. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
  645. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
  646. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
  647. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
  648. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
  649. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
  650. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
  651. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
  652. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
  653. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
  654. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
  655. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
  656. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
  657. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
  658. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
  659. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
  660. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
  661. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
  662. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
  663. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
  664. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
  665. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
  666. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
  667. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
  668. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
  669. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
  670. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
  671. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
  672. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
  673. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
  674. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
  675. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
  676. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
  677. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
  678. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
  679. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
  680. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
  681. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
  682. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
  683. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
  684. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
  685. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
  686. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
  687. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
  688. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
  689. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
  690. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
  691. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
  692. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
  693. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
  694. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
  695. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
  696. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
  697. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
  698. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
  699. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
  700. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
  701. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
  702. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
  703. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/actions.png +0 -0
  704. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
  705. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/inspector.png +0 -0
  706. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/library-active.png +0 -0
  707. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/library.png +0 -0
  708. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
  709. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/projects.png +0 -0
  710. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/run-active.png +0 -0
  711. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/run.png +0 -0
  712. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/save-active.png +0 -0
  713. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/icons/save.png +0 -0
  714. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
  715. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
  716. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
  717. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/main-bg.png +0 -0
  718. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
  719. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
  720. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/bottom.png +0 -0
  721. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/close-active.png +0 -0
  722. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/close.png +0 -0
  723. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/left.png +0 -0
  724. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
  725. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
  726. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
  727. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
  728. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/right.png +0 -0
  729. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/search-active.png +0 -0
  730. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/search.png +0 -0
  731. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/top-left.png +0 -0
  732. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/top-right.png +0 -0
  733. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/picker/top.png +0 -0
  734. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
  735. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/inspectors.js +365 -0
  736. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/loading.rhtml +9 -0
  737. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/main_page.js +95 -0
  738. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/english.lproj/strings.js +93 -0
  739. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/fixtures/file.js +35 -0
  740. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/main.js +28 -0
  741. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/mixins/drop_down.js +97 -0
  742. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/design.js +26 -0
  743. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/dir.js +93 -0
  744. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/file.js +51 -0
  745. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/target.js +82 -0
  746. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/models/view_config.js +49 -0
  747. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/resources/test_page.js +37 -0
  748. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/inspector.js +152 -0
  749. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/library.js +142 -0
  750. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/main.js +283 -0
  751. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/modals.js +299 -0
  752. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/ready.js +235 -0
  753. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/controllers/design.js +15 -0
  754. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/controllers/designs.js +15 -0
  755. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/controllers/file.js +15 -0
  756. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/controllers/files.js +15 -0
  757. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/models/file.js +15 -0
  758. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/models/view_config.js +15 -0
  759. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/views/list_item.js +16 -0
  760. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/tests/views/plist_item.js +20 -0
  761. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/theme.js +25 -0
  762. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/anchor.js +277 -0
  763. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/application_list_item.js +19 -0
  764. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/event_blocker.js +32 -0
  765. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/label_designer.js +16 -0
  766. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/list_item.js +42 -0
  767. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/plist_item.js +178 -0
  768. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/simple_button.js +157 -0
  769. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/tear_off_picker.js +56 -0
  770. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/web.js +44 -0
  771. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/coders/design.js +22 -0
  772. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/coders/object.js +349 -0
  773. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/controllers.js +23 -0
  774. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/design.js +43 -0
  775. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/designs.js +139 -0
  776. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_design.js +172 -0
  777. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_files.js +28 -0
  778. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/core.js +28 -0
  779. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_rule.js +22 -0
  780. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style.js +29 -0
  781. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style_sheet.js +199 -0
  782. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/button.js +23 -0
  783. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/label.js +18 -0
  784. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/object_designer.js +298 -0
  785. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/tab.js +20 -0
  786. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/text_field.js +17 -0
  787. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/view_designer.js +1269 -0
  788. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/css/designer.css +96 -0
  789. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/design_page.js +55 -0
  790. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/high_light.css +10 -0
  791. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/controller.png +0 -0
  792. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/dock-bg.png +0 -0
  793. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/dock-item-bg.png +0 -0
  794. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/dock-item-divider.png +0 -0
  795. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/dock-item-sel-bg.png +0 -0
  796. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/dock-item-sel-divider.png +0 -0
  797. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/main-bg.png +0 -0
  798. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/page.png +0 -0
  799. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/pane.png +0 -0
  800. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/images/view.png +0 -0
  801. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/english.lproj/selection_handles.css +58 -0
  802. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/binding.js +39 -0
  803. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/object.js +29 -0
  804. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/page.js +60 -0
  805. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/ext/view.js +30 -0
  806. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/button.js +13 -0
  807. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/snap_lines.js +228 -0
  808. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/tests/coders/page.js +54 -0
  809. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/tests/designers/view_designer.js +47 -0
  810. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/designer_drop_target.js +144 -0
  811. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/drawing.js +226 -0
  812. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/high_light.js +66 -0
  813. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/page_item_view.js +130 -0
  814. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/selection_handles.js +78 -0
  815. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/README.md +11 -0
  816. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +215 -0
  817. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +67 -0
  818. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/english.lproj/default_styles.css +5 -0
  819. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/english.lproj/strings.js +15 -0
  820. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/mixins/edit_mode.js +48 -0
  821. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/mixins/emptiness.js +94 -0
  822. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/render_delegates/form.js +21 -0
  823. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/render_delegates/form_row.js +20 -0
  824. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form.js +17 -0
  825. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_checkbox_field.js +17 -0
  826. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_field.js +17 -0
  827. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_label.js +17 -0
  828. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_radio_field.js +17 -0
  829. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_row.js +17 -0
  830. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_text_field.js +17 -0
  831. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +285 -0
  832. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form_row.js +187 -0
  833. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/README.md +46 -0
  834. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +110 -0
  835. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/many.js +79 -0
  836. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +76 -0
  837. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/single.js +67 -0
  838. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_child.js +229 -0
  839. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_thumb.js +236 -0
  840. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split.js +18 -0
  841. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split_divider.js +26 -0
  842. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/children.js +100 -0
  843. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/dividers.js +243 -0
  844. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +294 -0
  845. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/split_child.js +135 -0
  846. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/split_thumb.js +160 -0
  847. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +929 -0
  848. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +40 -0
  849. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +26 -0
  850. data/lib/frameworks/sproutcore/frameworks/foundation/TESTING +46 -0
  851. data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +133 -0
  852. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +23 -0
  853. data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +201 -0
  854. data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +90 -0
  855. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
  856. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/blank.gif +0 -0
  857. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +67 -0
  858. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +40 -0
  859. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/checkbox_view.css +5 -0
  860. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/debug/control-test-pane.css +9 -0
  861. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
  862. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-logo.png +0 -0
  863. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.jpg +0 -0
  864. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-landscape.png +0 -0
  865. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.jpg +0 -0
  866. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup-portrait.png +0 -0
  867. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-startup.png +0 -0
  868. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
  869. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/inline_editor.css +12 -0
  870. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +47 -0
  871. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/radio_view.css +7 -0
  872. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/static_layout.css +5 -0
  873. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +146 -0
  874. data/lib/frameworks/sproutcore/frameworks/foundation/ext/string.js +89 -0
  875. data/lib/frameworks/sproutcore/frameworks/foundation/fixtures/file_exists.json +1 -0
  876. data/lib/frameworks/sproutcore/frameworks/foundation/fixtures/malformed.json +11 -0
  877. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +119 -0
  878. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +234 -0
  879. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +157 -0
  880. data/lib/frameworks/sproutcore/frameworks/foundation/license.js +28 -0
  881. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +41 -0
  882. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +355 -0
  883. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +14 -0
  884. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +180 -0
  885. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +113 -0
  886. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +227 -0
  887. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +282 -0
  888. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +153 -0
  889. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +745 -0
  890. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
  891. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +254 -0
  892. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor.js +188 -0
  893. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +195 -0
  894. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +194 -0
  895. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +75 -0
  896. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/tree_item_content.js +164 -0
  897. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +198 -0
  898. data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +916 -0
  899. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +110 -0
  900. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
  901. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/helpers/sizing.js +174 -0
  902. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +99 -0
  903. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +119 -0
  904. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +386 -0
  905. data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +727 -0
  906. data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +65 -0
  907. data/lib/frameworks/sproutcore/frameworks/foundation/system/cookie.js +176 -0
  908. data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +63 -0
  909. data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +91 -0
  910. data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
  911. data/lib/frameworks/sproutcore/frameworks/foundation/system/image_queue.js +429 -0
  912. data/lib/frameworks/sproutcore/frameworks/foundation/system/math.js +57 -0
  913. data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +591 -0
  914. data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +422 -0
  915. data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +153 -0
  916. data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +103 -0
  917. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +392 -0
  918. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +87 -0
  919. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +157 -0
  920. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +71 -0
  921. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +254 -0
  922. data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +41 -0
  923. data/lib/frameworks/sproutcore/frameworks/foundation/tasks/task.js +17 -0
  924. data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/outline_case.js +108 -0
  925. data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +340 -0
  926. data/lib/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +10 -0
  927. data/lib/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +113 -0
  928. data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +150 -0
  929. data/lib/frameworks/sproutcore/frameworks/foundation/tests/integration/creating_views.js +118 -0
  930. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +57 -0
  931. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_value_support/content.js +168 -0
  932. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +89 -0
  933. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/editable/ui.js +44 -0
  934. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/beginEditing.js +194 -0
  935. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/commitEditing.js +150 -0
  936. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/discardEditing.js +151 -0
  937. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/beginEditing.js +114 -0
  938. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/commitEditing.js +151 -0
  939. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/discardEditing.js +152 -0
  940. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js +52 -0
  941. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +228 -0
  942. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/ui.js +64 -0
  943. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +149 -0
  944. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +74 -0
  945. data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/flat_case.js +325 -0
  946. data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/group_case.js +718 -0
  947. data/lib/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/outline_case.js +484 -0
  948. data/lib/frameworks/sproutcore/frameworks/foundation/tests/render_delegates/render_delegate.js +78 -0
  949. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/cookie.js +182 -0
  950. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +65 -0
  951. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/math.js +39 -0
  952. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/string.js +34 -0
  953. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/task_queue.js +49 -0
  954. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/user_defaults.js +30 -0
  955. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +241 -0
  956. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/range.js +68 -0
  957. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/credit_card.js +41 -0
  958. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/date.js +24 -0
  959. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/not_empty.js +56 -0
  960. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/number.js +53 -0
  961. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/password.js +19 -0
  962. data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/validator.js +26 -0
  963. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +18 -0
  964. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +180 -0
  965. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +512 -0
  966. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +173 -0
  967. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +87 -0
  968. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/nextValidKeyView.js +110 -0
  969. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +614 -0
  970. data/lib/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +125 -0
  971. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +79 -0
  972. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +48 -0
  973. data/lib/frameworks/sproutcore/frameworks/foundation/validators/email.js +45 -0
  974. data/lib/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +33 -0
  975. data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +99 -0
  976. data/lib/frameworks/sproutcore/frameworks/foundation/validators/password.js +86 -0
  977. data/lib/frameworks/sproutcore/frameworks/foundation/validators/positive_integer.js +85 -0
  978. data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +328 -0
  979. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +141 -0
  980. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +337 -0
  981. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +382 -0
  982. data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +648 -0
  983. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +225 -0
  984. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +1117 -0
  985. data/lib/frameworks/sproutcore/frameworks/handlebars/handlebars.js +1435 -0
  986. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +390 -0
  987. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +210 -0
  988. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +12 -0
  989. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
  990. data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +40 -0
  991. data/lib/frameworks/sproutcore/frameworks/media/resources/controls.png +0 -0
  992. data/lib/frameworks/sproutcore/frameworks/media/resources/playeras3.fla +0 -0
  993. data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +124 -0
  994. data/lib/frameworks/sproutcore/frameworks/media/resources/videoCanvas.swf +0 -0
  995. data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +741 -0
  996. data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +88 -0
  997. data/lib/frameworks/sproutcore/frameworks/media/views/media_slider.js +243 -0
  998. data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +63 -0
  999. data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +54 -0
  1000. data/lib/frameworks/sproutcore/frameworks/media/views/video.js +832 -0
  1001. data/lib/frameworks/sproutcore/frameworks/mini/license.js +30 -0
  1002. data/lib/frameworks/sproutcore/frameworks/qunit/README.md +24 -0
  1003. data/lib/frameworks/sproutcore/frameworks/qunit/package.json +21 -0
  1004. data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.css +215 -0
  1005. data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.js +1442 -0
  1006. data/lib/frameworks/sproutcore/frameworks/qunit/test/headless.html +24 -0
  1007. data/lib/frameworks/sproutcore/frameworks/qunit/test/index.html +18 -0
  1008. data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.html +17 -0
  1009. data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.js +150 -0
  1010. data/lib/frameworks/sproutcore/frameworks/qunit/test/same.js +1421 -0
  1011. data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +314 -0
  1012. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +503 -0
  1013. data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +362 -0
  1014. data/lib/frameworks/sproutcore/frameworks/runtime/README +12 -0
  1015. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +758 -0
  1016. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +391 -0
  1017. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/indexOf.js +33 -0
  1018. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/insertAt.js +121 -0
  1019. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/objectAt.js +34 -0
  1020. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/popObject.js +50 -0
  1021. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/pushObject.js +46 -0
  1022. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +371 -0
  1023. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeAt.js +100 -0
  1024. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/removeObject.js +49 -0
  1025. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/replace.js +94 -0
  1026. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/shiftObject.js +50 -0
  1027. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/unshiftObject.js +47 -0
  1028. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array.js +14 -0
  1029. data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +92 -0
  1030. data/lib/frameworks/sproutcore/frameworks/runtime/ext/date.js +15 -0
  1031. data/lib/frameworks/sproutcore/frameworks/runtime/ext/function.js +189 -0
  1032. data/lib/frameworks/sproutcore/frameworks/runtime/ext/string.js +31 -0
  1033. data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -0
  1034. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +911 -0
  1035. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +48 -0
  1036. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +79 -0
  1037. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +1341 -0
  1038. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +109 -0
  1039. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1499 -0
  1040. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +181 -0
  1041. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +179 -0
  1042. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +124 -0
  1043. data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +195 -0
  1044. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +1013 -0
  1045. data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +107 -0
  1046. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +162 -0
  1047. data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +76 -0
  1048. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +1209 -0
  1049. data/lib/frameworks/sproutcore/frameworks/runtime/system/json.js +515 -0
  1050. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +1585 -0
  1051. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +940 -0
  1052. data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +273 -0
  1053. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +308 -0
  1054. data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +538 -0
  1055. data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +60 -0
  1056. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +36 -0
  1057. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js +29 -0
  1058. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/clone.js +108 -0
  1059. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/compare.js +44 -0
  1060. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/console.js +21 -0
  1061. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +115 -0
  1062. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/inspect.js +33 -0
  1063. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +27 -0
  1064. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +77 -0
  1065. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/keys.js +26 -0
  1066. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/makeArray.js +50 -0
  1067. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +25 -0
  1068. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +43 -0
  1069. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +81 -0
  1070. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js +23 -0
  1071. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/comparable.js +44 -0
  1072. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable.js +623 -0
  1073. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable_observers.js +81 -0
  1074. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +44 -0
  1075. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +868 -0
  1076. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observersForKey.js +36 -0
  1077. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +161 -0
  1078. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +155 -0
  1079. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +87 -0
  1080. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +55 -0
  1081. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +474 -0
  1082. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/error.js +59 -0
  1083. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +212 -0
  1084. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/addEach.js +49 -0
  1085. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/clone.js +43 -0
  1086. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/contains.js +74 -0
  1087. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/create.js +42 -0
  1088. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexAfter.js +38 -0
  1089. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/indexBefore.js +38 -0
  1090. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/intersects.js +74 -0
  1091. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/max.js +40 -0
  1092. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/min.js +50 -0
  1093. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/rangeStartForIndex.js +36 -0
  1094. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +189 -0
  1095. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/removeEach.js +49 -0
  1096. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/without.js +89 -0
  1097. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/json.js +21 -0
  1098. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/logger.js +265 -0
  1099. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/base.js +201 -0
  1100. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +385 -0
  1101. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/concatenated_properties.js +77 -0
  1102. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +196 -0
  1103. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +56 -0
  1104. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +59 -0
  1105. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/destroy.js +75 -0
  1106. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/objectPropertyDidChange.js +117 -0
  1107. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/rangeDidChange.js +110 -0
  1108. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/update.js +65 -0
  1109. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +126 -0
  1110. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +324 -0
  1111. data/lib/frameworks/sproutcore/frameworks/statechart/core.js +5 -0
  1112. data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +155 -0
  1113. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +1253 -0
  1114. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +1546 -0
  1115. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/respond_to_event.js +401 -0
  1116. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/without_concurrent_states.js +306 -0
  1117. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +183 -0
  1118. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/without_concurrent_states.js +122 -0
  1119. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/pane.js +89 -0
  1120. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/responder_chain.js +109 -0
  1121. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/root_responder.js +74 -0
  1122. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/initial_substate.js +67 -0
  1123. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +60 -0
  1124. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/namespacing.js +248 -0
  1125. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/plugin/mixin.js +68 -0
  1126. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/plugin/nesting.js +95 -0
  1127. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/state_observes.js +235 -0
  1128. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/core.js +94 -0
  1129. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +123 -0
  1130. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/without_concurrent_states.js +191 -0
  1131. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/initial_substate/core.js +48 -0
  1132. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/initial_substate/without_concurrent_states.js +218 -0
  1133. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/with_concurrent_states.js +88 -0
  1134. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/without_concurrent_states/context.js +191 -0
  1135. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/without_concurrent_states/core.js +200 -0
  1136. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +239 -0
  1137. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +131 -0
  1138. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +120 -0
  1139. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/without_concurrent_states/context.js +144 -0
  1140. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/without_concurrent_states/core.js +281 -0
  1141. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/transient/without_concurrent_states.js +162 -0
  1142. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/create/assigned_root_state.js +76 -0
  1143. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/create/unassigned_root_state.js +162 -0
  1144. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/destroy.js +73 -0
  1145. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/invoke_state_method.js +241 -0
  1146. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/owner.js +236 -0
  1147. data/lib/frameworks/sproutcore/frameworks/table/mixins/table_delegate.js +41 -0
  1148. data/lib/frameworks/sproutcore/frameworks/table/system/table_column.js +125 -0
  1149. data/lib/frameworks/sproutcore/frameworks/table/views/table.js +440 -0
  1150. data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +63 -0
  1151. data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +158 -0
  1152. data/lib/frameworks/sproutcore/frameworks/table/views/table_header.js +214 -0
  1153. data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +155 -0
  1154. data/lib/frameworks/sproutcore/frameworks/testing/core.js +199 -0
  1155. data/lib/frameworks/sproutcore/frameworks/testing/english.lproj/additions.css +8 -0
  1156. data/lib/frameworks/sproutcore/frameworks/testing/english.lproj/runner.css +128 -0
  1157. data/lib/frameworks/sproutcore/frameworks/testing/english.lproj/testsuite.css +136 -0
  1158. data/lib/frameworks/sproutcore/frameworks/testing/extras.js +17 -0
  1159. data/lib/frameworks/sproutcore/frameworks/testing/system/dump.js +205 -0
  1160. data/lib/frameworks/sproutcore/frameworks/testing/system/equiv.js +201 -0
  1161. data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +708 -0
  1162. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +219 -0
  1163. data/lib/frameworks/sproutcore/frameworks/testing/system/suite.js +222 -0
  1164. data/lib/frameworks/sproutcore/frameworks/testing/utils.js +62 -0
  1165. data/lib/frameworks/sproutcore/lib/index.rhtml +167 -0
  1166. data/lib/frameworks/sproutcore/license.js +32 -0
  1167. data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
  1168. data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
  1169. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
  1170. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
  1171. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
  1172. data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
  1173. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
  1174. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +33 -0
  1175. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
  1176. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
  1177. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
  1178. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
  1179. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
  1180. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
  1181. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +102 -0
  1182. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
  1183. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
  1184. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
  1185. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
  1186. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
  1187. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
  1188. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
  1189. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
  1190. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
  1191. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
  1192. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
  1193. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +78 -0
  1194. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
  1195. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
  1196. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
  1197. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
  1198. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
  1199. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
  1200. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
  1201. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +39 -0
  1202. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
  1203. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
  1204. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
  1205. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +41 -0
  1206. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
  1207. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
  1208. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
  1209. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +93 -0
  1210. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
  1211. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
  1212. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
  1213. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
  1214. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
  1215. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
  1216. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
  1217. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
  1218. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
  1219. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
  1220. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
  1221. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +72 -0
  1222. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
  1223. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
  1224. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
  1225. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
  1226. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
  1227. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
  1228. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
  1229. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +5 -0
  1230. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
  1231. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
  1232. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +21 -0
  1233. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
  1234. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
  1235. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
  1236. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
  1237. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
  1238. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
  1239. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
  1240. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
  1241. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
  1242. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
  1243. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
  1244. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
  1245. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
  1246. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
  1247. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
  1248. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
  1249. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
  1250. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
  1251. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
  1252. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
  1253. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
  1254. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
  1255. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
  1256. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
  1257. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
  1258. data/lib/frameworks/sproutcore/themes/ace/resources/imagebutton/ace/imagebutton.css +11 -0
  1259. data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
  1260. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
  1261. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
  1262. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
  1263. data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
  1264. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +79 -0
  1265. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
  1266. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
  1267. data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
  1268. data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
  1269. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
  1270. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
  1271. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
  1272. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +41 -0
  1273. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
  1274. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
  1275. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
  1276. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
  1277. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
  1278. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
  1279. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
  1280. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
  1281. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
  1282. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
  1283. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
  1284. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
  1285. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
  1286. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
  1287. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +57 -0
  1288. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
  1289. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
  1290. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
  1291. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
  1292. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
  1293. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
  1294. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
  1295. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
  1296. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
  1297. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
  1298. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
  1299. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
  1300. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
  1301. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
  1302. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
  1303. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
  1304. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
  1305. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
  1306. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
  1307. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
  1308. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
  1309. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
  1310. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
  1311. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
  1312. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
  1313. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
  1314. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
  1315. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
  1316. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
  1317. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
  1318. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
  1319. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
  1320. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
  1321. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
  1322. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
  1323. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
  1324. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +83 -0
  1325. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
  1326. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
  1327. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
  1328. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
  1329. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
  1330. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
  1331. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
  1332. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
  1333. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
  1334. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
  1335. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +8 -0
  1336. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
  1337. data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +31 -0
  1338. data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
  1339. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
  1340. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
  1341. data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +7 -0
  1342. data/lib/frameworks/sproutcore/themes/ace/theme.js +30 -0
  1343. data/lib/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +69 -0
  1344. data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
  1345. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/button.css +41 -0
  1346. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/core.css +8 -0
  1347. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/backButton.png +0 -0
  1348. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/blueButton.png +0 -0
  1349. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/cancel.png +0 -0
  1350. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/grayButton.png +0 -0
  1351. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/leftButton.png +0 -0
  1352. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrow.png +0 -0
  1353. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrowSel.png +0 -0
  1354. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listGroup.png +0 -0
  1355. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/loading.gif +0 -0
  1356. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/pinstripes.png +0 -0
  1357. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/rightButton.png +0 -0
  1358. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/selection.png +0 -0
  1359. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/thumb.png +0 -0
  1360. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggle.png +0 -0
  1361. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggleOn.png +0 -0
  1362. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolButton.png +0 -0
  1363. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolbar.png +0 -0
  1364. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/whiteButton.png +0 -0
  1365. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/strings.js +15 -0
  1366. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/10.png +0 -0
  1367. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/100.png +0 -0
  1368. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/102.png +0 -0
  1369. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/110.png +0 -0
  1370. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/120.png +0 -0
  1371. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/127.png +0 -0
  1372. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/18.png +0 -0
  1373. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/19.png +0 -0
  1374. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/2.png +0 -0
  1375. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/24.png +0 -0
  1376. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/26.png +0 -0
  1377. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/27.png +0 -0
  1378. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/28.png +0 -0
  1379. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/29.png +0 -0
  1380. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/30.png +0 -0
  1381. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/31.png +0 -0
  1382. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/33.png +0 -0
  1383. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/37.png +0 -0
  1384. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/41.png +0 -0
  1385. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/99.png +0 -0
  1386. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/10.png +0 -0
  1387. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/100.png +0 -0
  1388. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/102.png +0 -0
  1389. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/110.png +0 -0
  1390. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/120.png +0 -0
  1391. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/127.png +0 -0
  1392. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/18.png +0 -0
  1393. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/19.png +0 -0
  1394. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/2.png +0 -0
  1395. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/24.png +0 -0
  1396. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/26.png +0 -0
  1397. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/27.png +0 -0
  1398. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/28.png +0 -0
  1399. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/29.png +0 -0
  1400. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/30.png +0 -0
  1401. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/31.png +0 -0
  1402. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/33.png +0 -0
  1403. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/37.png +0 -0
  1404. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/41.png +0 -0
  1405. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/99.png +0 -0
  1406. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/10.png +0 -0
  1407. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/100.png +0 -0
  1408. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/102.png +0 -0
  1409. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/110.png +0 -0
  1410. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/120.png +0 -0
  1411. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/127.png +0 -0
  1412. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/18.png +0 -0
  1413. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/19.png +0 -0
  1414. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/2.png +0 -0
  1415. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/24.png +0 -0
  1416. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/26.png +0 -0
  1417. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/27.png +0 -0
  1418. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/28.png +0 -0
  1419. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/29.png +0 -0
  1420. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/30.png +0 -0
  1421. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/31.png +0 -0
  1422. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/33.png +0 -0
  1423. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/37.png +0 -0
  1424. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/41.png +0 -0
  1425. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/99.png +0 -0
  1426. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/10.png +0 -0
  1427. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/18.png +0 -0
  1428. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/19.png +0 -0
  1429. data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/2.png +0 -0
  1430. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/button.css +399 -0
  1431. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/checkbox.css +78 -0
  1432. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/collection.css +135 -0
  1433. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/core.css +76 -0
  1434. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/disclosure.css +57 -0
  1435. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/icons/mini_222222.png +0 -0
  1436. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/icons/mini_454545.png +0 -0
  1437. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/icons/mini_888888.png +0 -0
  1438. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/icons/mini_ffffff.png +0 -0
  1439. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/panels/sprite-x.png +0 -0
  1440. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/panels/sprite-y.png +0 -0
  1441. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-scroller-repeat-x.png +0 -0
  1442. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-scroller-repeat-y.png +0 -0
  1443. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-scroller-sprite.png +0 -0
  1444. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-theme-repeat-x.png +0 -0
  1445. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-theme-ysprite.png +0 -0
  1446. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/images/sc-toolbar-view.png +0 -0
  1447. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/label.css +11 -0
  1448. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/list_item.css +82 -0
  1449. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/menu.css +20 -0
  1450. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/menu_item_view.css +36 -0
  1451. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/pane.css +18 -0
  1452. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/panel.css +33 -0
  1453. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/picker.css +17 -0
  1454. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/progress.css +27 -0
  1455. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/radio.css +125 -0
  1456. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/scroller.css +159 -0
  1457. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/segmented.css +270 -0
  1458. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/slider.css +94 -0
  1459. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/split_view.css +11 -0
  1460. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/tab.css +14 -0
  1461. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/table.css +14 -0
  1462. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/text_field.css +5 -0
  1463. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/toolbar.css +7 -0
  1464. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/well.css +36 -0
  1465. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +89 -0
  1466. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/panel.js +28 -0
  1467. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +194 -0
  1468. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +67 -0
  1469. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/well.js +27 -0
  1470. data/lib/frameworks/sproutcore/themes/legacy_theme/theme.js +13 -0
  1471. data/lib/gen/Buildfile +16 -0
  1472. data/lib/gen/app/Buildfile +36 -0
  1473. data/lib/gen/app/README +1 -0
  1474. data/lib/gen/app/USAGE +13 -0
  1475. data/lib/gen/app/templates/apps/@target_name@/Buildfile +14 -0
  1476. data/lib/gen/app/templates/apps/@target_name@/core.js +27 -0
  1477. data/lib/gen/app/templates/apps/@target_name@/main.js +30 -0
  1478. data/lib/gen/app/templates/apps/@target_name@/resources/loading.rhtml +9 -0
  1479. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +24 -0
  1480. data/lib/gen/app/templates/apps/@target_name@/theme.js +27 -0
  1481. data/lib/gen/controller/Buildfile +18 -0
  1482. data/lib/gen/controller/README +1 -0
  1483. data/lib/gen/controller/USAGE +13 -0
  1484. data/lib/gen/controller/templates/controllers/@filename@.js +18 -0
  1485. data/lib/gen/controller/templates/tests/controllers/@filename@.js +15 -0
  1486. data/lib/gen/data-source/Buildfile +18 -0
  1487. data/lib/gen/data-source/README +1 -0
  1488. data/lib/gen/data-source/USAGE +15 -0
  1489. data/lib/gen/data-source/templates/data_sources/@filename@.js +64 -0
  1490. data/lib/gen/design/Buildfile +23 -0
  1491. data/lib/gen/design/README +1 -0
  1492. data/lib/gen/design/USAGE +10 -0
  1493. data/lib/gen/design/templates/resources/@filename@.js +16 -0
  1494. data/lib/gen/framework/Buildfile +36 -0
  1495. data/lib/gen/framework/README +1 -0
  1496. data/lib/gen/framework/USAGE +13 -0
  1497. data/lib/gen/framework/templates/frameworks/@target_name@/core.js +21 -0
  1498. data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +15 -0
  1499. data/lib/gen/html_app/Buildfile +36 -0
  1500. data/lib/gen/html_app/README +1 -0
  1501. data/lib/gen/html_app/USAGE +15 -0
  1502. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +14 -0
  1503. data/lib/gen/html_app/templates/apps/@target_name@/resources/images/.gitkeep +0 -0
  1504. data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +4 -0
  1505. data/lib/gen/html_app/templates/apps/@target_name@/resources/templates/@target_name@.handlebars +1 -0
  1506. data/lib/gen/html_project/Buildfile +45 -0
  1507. data/lib/gen/html_project/INIT +3 -0
  1508. data/lib/gen/html_project/README +1 -0
  1509. data/lib/gen/html_project/USAGE +2 -0
  1510. data/lib/gen/html_project/templates/@filename@/Buildfile +8 -0
  1511. data/lib/gen/html_project/templates/@filename@/README +7 -0
  1512. data/lib/gen/language/Buildfile +26 -0
  1513. data/lib/gen/language/README +1 -0
  1514. data/lib/gen/language/USAGE +13 -0
  1515. data/lib/gen/language/templates/@filename@/strings.js +14 -0
  1516. data/lib/gen/model/Buildfile +16 -0
  1517. data/lib/gen/model/README +1 -0
  1518. data/lib/gen/model/USAGE +15 -0
  1519. data/lib/gen/model/templates/fixtures/@filename@.js +35 -0
  1520. data/lib/gen/model/templates/models/@filename@.js +19 -0
  1521. data/lib/gen/model/templates/tests/models/@filename@.js +15 -0
  1522. data/lib/gen/page/Buildfile +36 -0
  1523. data/lib/gen/page/README +1 -0
  1524. data/lib/gen/page/USAGE +15 -0
  1525. data/lib/gen/page/templates/pages/@target_name@/Buildfile +16 -0
  1526. data/lib/gen/page/templates/pages/@target_name@/core.js +22 -0
  1527. data/lib/gen/page/templates/pages/@target_name@/en.lproj/strings.js +14 -0
  1528. data/lib/gen/page/templates/pages/@target_name@/resources/body.css +1 -0
  1529. data/lib/gen/page/templates/pages/@target_name@/resources/body.rhtml +7 -0
  1530. data/lib/gen/project/Buildfile +45 -0
  1531. data/lib/gen/project/INIT +3 -0
  1532. data/lib/gen/project/README +1 -0
  1533. data/lib/gen/project/USAGE +2 -0
  1534. data/lib/gen/project/templates/@filename@/Buildfile +12 -0
  1535. data/lib/gen/project/templates/@filename@/README +7 -0
  1536. data/lib/gen/responder/Buildfile +18 -0
  1537. data/lib/gen/responder/README +1 -0
  1538. data/lib/gen/responder/USAGE +15 -0
  1539. data/lib/gen/responder/templates/states/@filename@.js +39 -0
  1540. data/lib/gen/test/Buildfile +25 -0
  1541. data/lib/gen/test/README +1 -0
  1542. data/lib/gen/test/USAGE +12 -0
  1543. data/lib/gen/test/templates/tests/@filename@.js +15 -0
  1544. data/lib/gen/theme/Buildfile +36 -0
  1545. data/lib/gen/theme/README +1 -0
  1546. data/lib/gen/theme/USAGE +13 -0
  1547. data/lib/gen/theme/templates/themes/@target_name@/Buildfile +3 -0
  1548. data/lib/gen/theme/templates/themes/@target_name@/resources/theme_styles.css +11 -0
  1549. data/lib/gen/theme/templates/themes/@target_name@/theme.js +23 -0
  1550. data/lib/gen/view/Buildfile +18 -0
  1551. data/lib/gen/view/README +1 -0
  1552. data/lib/gen/view/USAGE +13 -0
  1553. data/lib/gen/view/templates/tests/views/@filename@.js +15 -0
  1554. data/lib/gen/view/templates/views/@filename@.js +18 -0
  1555. data/lib/sproutcore/builders/base.rb +97 -0
  1556. data/lib/sproutcore/builders/chance_file.rb +78 -0
  1557. data/lib/sproutcore/builders/combine.rb +61 -0
  1558. data/lib/sproutcore/builders/handlebars.rb +30 -0
  1559. data/lib/sproutcore/builders/html.rb +213 -0
  1560. data/lib/sproutcore/builders/javascript.rb +107 -0
  1561. data/lib/sproutcore/builders/less.rb +41 -0
  1562. data/lib/sproutcore/builders/minify.rb +148 -0
  1563. data/lib/sproutcore/builders/module.rb +74 -0
  1564. data/lib/sproutcore/builders/sass.rb +65 -0
  1565. data/lib/sproutcore/builders/string_wrapper.rb +41 -0
  1566. data/lib/sproutcore/builders/strings.rb +45 -0
  1567. data/lib/sproutcore/builders/stylesheet.rb +49 -0
  1568. data/lib/sproutcore/builders/test.rb +59 -0
  1569. data/lib/sproutcore/builders/test_index.rb +26 -0
  1570. data/lib/sproutcore/builders.rb +15 -0
  1571. data/lib/sproutcore/buildfile/build_task.rb +33 -0
  1572. data/lib/sproutcore/buildfile/buildfile_dsl.rb +169 -0
  1573. data/lib/sproutcore/buildfile/early_time.rb +30 -0
  1574. data/lib/sproutcore/buildfile/invocation_chain.rb +64 -0
  1575. data/lib/sproutcore/buildfile/namespace.rb +33 -0
  1576. data/lib/sproutcore/buildfile/string_ext.rb +202 -0
  1577. data/lib/sproutcore/buildfile/task.rb +325 -0
  1578. data/lib/sproutcore/buildfile/task_arguments.rb +106 -0
  1579. data/lib/sproutcore/buildfile/task_manager.rb +204 -0
  1580. data/lib/sproutcore/buildfile.rb +490 -0
  1581. data/lib/sproutcore/deprecated/view_helper.rb +662 -0
  1582. data/lib/sproutcore/helpers/capture_helper.rb +30 -0
  1583. data/lib/sproutcore/helpers/cssmin.rb +202 -0
  1584. data/lib/sproutcore/helpers/dom_id_helper.rb +21 -0
  1585. data/lib/sproutcore/helpers/entry_sorter.rb +125 -0
  1586. data/lib/sproutcore/helpers/html5_manifest.rb +88 -0
  1587. data/lib/sproutcore/helpers/minifier.rb +106 -0
  1588. data/lib/sproutcore/helpers/packed_optimizer.rb +102 -0
  1589. data/lib/sproutcore/helpers/static_helper.rb +444 -0
  1590. data/lib/sproutcore/helpers/tag_helper.rb +182 -0
  1591. data/lib/sproutcore/helpers/text_helper.rb +303 -0
  1592. data/lib/sproutcore/helpers.rb +11 -0
  1593. data/lib/sproutcore/models/generator.rb +509 -0
  1594. data/lib/sproutcore/models/hash_struct.rb +124 -0
  1595. data/lib/sproutcore/models/manifest.rb +387 -0
  1596. data/lib/sproutcore/models/manifest_entry.rb +362 -0
  1597. data/lib/sproutcore/models/project.rb +267 -0
  1598. data/lib/sproutcore/models/target.rb +870 -0
  1599. data/lib/sproutcore/models.rb +8 -0
  1600. data/lib/sproutcore/rack/builder.rb +344 -0
  1601. data/lib/sproutcore/rack/dev.rb +92 -0
  1602. data/lib/sproutcore/rack/docs.rb +24 -0
  1603. data/lib/sproutcore/rack/filesystem.rb +324 -0
  1604. data/lib/sproutcore/rack/proxy.rb +165 -0
  1605. data/lib/sproutcore/rack/service.rb +153 -0
  1606. data/lib/sproutcore/rack/test_runner.rb +24 -0
  1607. data/lib/sproutcore/rack.rb +7 -0
  1608. data/lib/sproutcore/render_engines/erubis.rb +55 -0
  1609. data/lib/sproutcore/render_engines/haml.rb +39 -0
  1610. data/lib/sproutcore/tools/build.rb +100 -0
  1611. data/lib/sproutcore/tools/build_number.rb +23 -0
  1612. data/lib/sproutcore/tools/docs.rb +53 -0
  1613. data/lib/sproutcore/tools/gen.rb +101 -0
  1614. data/lib/sproutcore/tools/init.rb +56 -0
  1615. data/lib/sproutcore/tools/manifest.rb +85 -0
  1616. data/lib/sproutcore/tools/server.rb +56 -0
  1617. data/lib/sproutcore/tools.rb +419 -0
  1618. data/lib/sproutcore/version.rb +12 -0
  1619. data/lib/sproutcore.rb +169 -0
  1620. data/spec/buildtasks/build/copy_spec.rb +60 -0
  1621. data/spec/buildtasks/build/spec_helper.rb +36 -0
  1622. data/spec/buildtasks/manifest/catalog_spec.rb +48 -0
  1623. data/spec/buildtasks/manifest/hide_buildfiles_spec.rb +126 -0
  1624. data/spec/buildtasks/manifest/localize_spec.rb +97 -0
  1625. data/spec/buildtasks/manifest/prepare_build_tasks/chance_2x_spec.rb +100 -0
  1626. data/spec/buildtasks/manifest/prepare_build_tasks/chance_spec.rb +104 -0
  1627. data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +331 -0
  1628. data/spec/buildtasks/manifest/prepare_build_tasks/css_spec.rb +87 -0
  1629. data/spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb +39 -0
  1630. data/spec/buildtasks/manifest/prepare_build_tasks/html_spec.rb +175 -0
  1631. data/spec/buildtasks/manifest/prepare_build_tasks/javascript_spec.rb +65 -0
  1632. data/spec/buildtasks/manifest/prepare_build_tasks/minify_spec.rb +70 -0
  1633. data/spec/buildtasks/manifest/prepare_build_tasks/module_info_spec.rb +96 -0
  1634. data/spec/buildtasks/manifest/prepare_build_tasks/module_spec.rb +83 -0
  1635. data/spec/buildtasks/manifest/prepare_build_tasks/packed_2x_indirect_spec.rb +191 -0
  1636. data/spec/buildtasks/manifest/prepare_build_tasks/packed_2x_spec.rb +185 -0
  1637. data/spec/buildtasks/manifest/prepare_build_tasks/packed_spec.rb +187 -0
  1638. data/spec/buildtasks/manifest/prepare_build_tasks/sass_spec.rb +98 -0
  1639. data/spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb +64 -0
  1640. data/spec/buildtasks/manifest/prepare_build_tasks/tests_spec.rb +163 -0
  1641. data/spec/buildtasks/manifest/prepare_spec.rb +43 -0
  1642. data/spec/buildtasks/manifest/spec_helper.rb +39 -0
  1643. data/spec/buildtasks/target_spec.rb +270 -0
  1644. data/spec/fixtures/builder_tests/Buildfile +22 -0
  1645. data/spec/fixtures/builder_tests/apps/chance_test/Buildfile +14 -0
  1646. data/spec/fixtures/builder_tests/apps/chance_test/core.js +27 -0
  1647. data/spec/fixtures/builder_tests/apps/chance_test/main.js +30 -0
  1648. data/spec/fixtures/builder_tests/apps/chance_test/resources/demo.css +6 -0
  1649. data/spec/fixtures/builder_tests/apps/chance_test/resources/force@2x.png +0 -0
  1650. data/spec/fixtures/builder_tests/apps/chance_test/resources/last_file.css +7 -0
  1651. data/spec/fixtures/builder_tests/apps/chance_test/resources/loading.rhtml +9 -0
  1652. data/spec/fixtures/builder_tests/apps/chance_test/resources/main_page.js +24 -0
  1653. data/spec/fixtures/builder_tests/apps/chance_test/resources/z_first_file.css +6 -0
  1654. data/spec/fixtures/builder_tests/apps/chance_test/theme.js +27 -0
  1655. data/spec/fixtures/builder_tests/apps/combine_test/a.js +1 -0
  1656. data/spec/fixtures/builder_tests/apps/combine_test/b.js +1 -0
  1657. data/spec/fixtures/builder_tests/apps/combine_test/c.js +1 -0
  1658. data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/a.css +1 -0
  1659. data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/b.css +1 -0
  1660. data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/c.css +1 -0
  1661. data/spec/fixtures/builder_tests/apps/handlebars_test/template.handlebars +5 -0
  1662. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/bar1_sample.rhtml +2 -0
  1663. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/erb_sample.html.erb +1 -0
  1664. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/icons/image.png +0 -0
  1665. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/image.jpg +0 -0
  1666. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/rhtml_sample.rhtml +1 -0
  1667. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/strings.js +4 -0
  1668. data/spec/fixtures/builder_tests/apps/html_test/english.lproj/style.css +0 -0
  1669. data/spec/fixtures/builder_tests/apps/html_test/french.lproj/french-icons/fr.png +0 -0
  1670. data/spec/fixtures/builder_tests/apps/html_test/french.lproj/strings.js +4 -0
  1671. data/spec/fixtures/builder_tests/apps/html_test/lib/layout_template.rhtml +1 -0
  1672. data/spec/fixtures/builder_tests/apps/html_test/scripts.js +0 -0
  1673. data/spec/fixtures/builder_tests/apps/javascript_test/sc_static.js +15 -0
  1674. data/spec/fixtures/builder_tests/apps/javascript_test/sc_super.js +4 -0
  1675. data/spec/fixtures/builder_tests/apps/javascript_test/strings.js +7 -0
  1676. data/spec/fixtures/builder_tests/apps/less_test/sample.less +4 -0
  1677. data/spec/fixtures/builder_tests/apps/module_test/module.js +1 -0
  1678. data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/english.lproj/req_style_2.css +0 -0
  1679. data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/english.lproj/test.rhtml +1 -0
  1680. data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/javascript.js +1 -0
  1681. data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/lib/alt_layout.rhtml +0 -0
  1682. data/spec/fixtures/builder_tests/apps/module_test/modules/deferred_module/req_js_2.js +0 -0
  1683. data/spec/fixtures/builder_tests/apps/module_test/modules/dynamic_req_target_1/dynamic_req_js_1.js +0 -0
  1684. data/spec/fixtures/builder_tests/apps/module_test/modules/dynamic_req_target_1/english.lproj/dynamic_req_style_1.css +0 -0
  1685. data/spec/fixtures/builder_tests/apps/module_test/modules/inlined_module/README +0 -0
  1686. data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/req_style_1.css +0 -0
  1687. data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/strings.js +4 -0
  1688. data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/english.lproj/test.rhtml +1 -0
  1689. data/spec/fixtures/builder_tests/apps/module_test/modules/required_target/req_js_1.js +0 -0
  1690. data/spec/fixtures/builder_tests/apps/sass_test/sample.sass +4 -0
  1691. data/spec/fixtures/builder_tests/apps/sass_test/sample.scss +4 -0
  1692. data/spec/fixtures/builder_tests/apps/strings_test/lproj/strings.js +8 -0
  1693. data/spec/fixtures/builder_tests/apps/stylesheet_test/build_directives.css +9 -0
  1694. data/spec/fixtures/builder_tests/apps/stylesheet_test/sc_static.css +12 -0
  1695. data/spec/fixtures/builder_tests/apps/test_test/lib/alt_layout.rhtml +1 -0
  1696. data/spec/fixtures/builder_tests/apps/test_test/lib/test_layout.rhtml +3 -0
  1697. data/spec/fixtures/builder_tests/apps/test_test/tests/qunit_test.js +1 -0
  1698. data/spec/fixtures/builder_tests/apps/test_test/tests/qunit_test2.js +1 -0
  1699. data/spec/fixtures/builder_tests/apps/test_test/tests/rhtml_test.rhtml +4 -0
  1700. data/spec/fixtures/builder_tests/frameworks/debug/core.js +0 -0
  1701. data/spec/fixtures/builder_tests/frameworks/debug/english.lproj/dummy.css +0 -0
  1702. data/spec/fixtures/builder_tests/frameworks/dynamic_req_target_1/dynamic_req_js_1.js +0 -0
  1703. data/spec/fixtures/builder_tests/frameworks/dynamic_req_target_1/english.lproj/dynamic_req_style_1.css +0 -0
  1704. data/spec/fixtures/builder_tests/frameworks/qunit/core.js +0 -0
  1705. data/spec/fixtures/builder_tests/frameworks/qunit/english.lproj/dummy.css +0 -0
  1706. data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/req_style_1.css +0 -0
  1707. data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/strings.js +4 -0
  1708. data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/test.rhtml +1 -0
  1709. data/spec/fixtures/builder_tests/frameworks/req_target_1/req_js_1.js +0 -0
  1710. data/spec/fixtures/builder_tests/frameworks/req_target_2/english.lproj/req_style_2.css +0 -0
  1711. data/spec/fixtures/builder_tests/frameworks/req_target_2/english.lproj/test.rhtml +1 -0
  1712. data/spec/fixtures/builder_tests/frameworks/req_target_2/javascript.js +1 -0
  1713. data/spec/fixtures/builder_tests/frameworks/req_target_2/lib/alt_layout.rhtml +0 -0
  1714. data/spec/fixtures/builder_tests/frameworks/req_target_2/req_js_2.js +0 -0
  1715. data/spec/fixtures/builder_tests/themes/sample_theme/Buildfile +1 -0
  1716. data/spec/fixtures/buildfiles/basic/Buildfile +11 -0
  1717. data/spec/fixtures/buildfiles/basic/task_module.rake +6 -0
  1718. data/spec/fixtures/buildfiles/installed/Buildfile +5 -0
  1719. data/spec/fixtures/buildfiles/installed/Buildfile2 +5 -0
  1720. data/spec/fixtures/buildfiles/project_test/Buildfile +4 -0
  1721. data/spec/fixtures/buildfiles/project_test/not_project/Buildfile +2 -0
  1722. data/spec/fixtures/buildfiles/project_test/not_project/child/PLACEHOLDER +0 -0
  1723. data/spec/fixtures/entry_for_project/Buildfile +1 -0
  1724. data/spec/fixtures/entry_for_project/apps/test_app/entry.txt +0 -0
  1725. data/spec/fixtures/entry_for_project/apps/test_app/frameworks/nested/PLACEHOLDER +0 -0
  1726. data/spec/fixtures/entry_for_project/frameworks/shared/PLACEHOLDER +0 -0
  1727. data/spec/fixtures/entry_for_project/frameworks/unrelated/PLACEHOLDER +0 -0
  1728. data/spec/fixtures/find_targets/custom/Buildfile +8 -0
  1729. data/spec/fixtures/find_targets/custom/bars/bar1/bars/bar1/PLACEHOLDER +0 -0
  1730. data/spec/fixtures/find_targets/custom/bars/bar1/bars/bar2/PLACEHOLDER +0 -0
  1731. data/spec/fixtures/find_targets/custom/bars/bar1/foos/foo1/PLACEHOLDER +0 -0
  1732. data/spec/fixtures/find_targets/custom/bars/bar1/foos/foo2/PLACEHOLDER +0 -0
  1733. data/spec/fixtures/find_targets/custom/foos/custom_foos/Buildfile +5 -0
  1734. data/spec/fixtures/find_targets/custom/foos/custom_foos/custom_foodir/foo1/PLACEHOLDER +0 -0
  1735. data/spec/fixtures/find_targets/custom/foos/custom_foos/custom_foodir/foo2/PLACEHOLDER +0 -0
  1736. data/spec/fixtures/find_targets/custom/foos/custom_foos/foos/not_foo1/PLACEHOLDER +0 -0
  1737. data/spec/fixtures/find_targets/custom/foos/foo1/bars/bar1/PLACEHOLDER +0 -0
  1738. data/spec/fixtures/find_targets/custom/foos/foo1/bars/bar2/PLACEHOLDER +0 -0
  1739. data/spec/fixtures/find_targets/nested/Buildfile +8 -0
  1740. data/spec/fixtures/find_targets/nested/apps/app1/Buildfile +1 -0
  1741. data/spec/fixtures/find_targets/nested/apps/app1/apps/nested_app/PLACEHOLDER +0 -0
  1742. data/spec/fixtures/find_targets/standard/Apps/app1/frameworks/framework1/PLACEHOLDER +0 -0
  1743. data/spec/fixtures/find_targets/standard/Apps/app1/frameworks/framework2/PLACEHOLDER +0 -0
  1744. data/spec/fixtures/find_targets/standard/clients/client1/PLACEHOLDER +0 -0
  1745. data/spec/fixtures/find_targets/standard/frameworks/framework1/frameworks/framework1/PLACEHOLDER +0 -0
  1746. data/spec/fixtures/find_targets/standard/frameworks/framework2/PLACEHOLDER +0 -0
  1747. data/spec/fixtures/find_targets/standard/themes/theme1/PLACEHOLDER +0 -0
  1748. data/spec/fixtures/find_targets/standard/themes/theme2/PLACEHOLDER +0 -0
  1749. data/spec/fixtures/helper_tests/apps/minifier_test/core.js +8 -0
  1750. data/spec/fixtures/languages/apps/caps_long_names/English.lproj/PLACEHOLDER +0 -0
  1751. data/spec/fixtures/languages/apps/caps_long_names/FreNCH.lproj/PLACEHOLDER +0 -0
  1752. data/spec/fixtures/languages/apps/caps_long_names/UnknOWN.lproj/PLACEHOLDER +0 -0
  1753. data/spec/fixtures/languages/apps/long_names/english.lproj/PLACEHOLDER +0 -0
  1754. data/spec/fixtures/languages/apps/long_names/french.lproj/PLACEHOLDER +0 -0
  1755. data/spec/fixtures/languages/apps/long_names/german.lproj/PLACEHOLDER +0 -0
  1756. data/spec/fixtures/languages/apps/long_names/italian.lproj/PLACEHOLDER +0 -0
  1757. data/spec/fixtures/languages/apps/long_names/japanese.lproj/PLACEHOLDER +0 -0
  1758. data/spec/fixtures/languages/apps/long_names/spanish.lproj/PLACEHOLDER +0 -0
  1759. data/spec/fixtures/languages/apps/long_names/unknown.lproj/PLACEHOLDER +0 -0
  1760. data/spec/fixtures/languages/apps/no_names/PLACEHOLDER +0 -0
  1761. data/spec/fixtures/languages/apps/short_names/de.lproj/PLACEHOLDER +0 -0
  1762. data/spec/fixtures/languages/apps/short_names/en-CA.lproj/PLACEHOLDER +0 -0
  1763. data/spec/fixtures/languages/apps/short_names/en-GB.lproj/PLACEHOLDER +0 -0
  1764. data/spec/fixtures/languages/apps/short_names/en-US.lproj/PLACEHOLDER +0 -0
  1765. data/spec/fixtures/languages/apps/short_names/en.lproj/PLACEHOLDER +0 -0
  1766. data/spec/fixtures/languages/apps/short_names/es.lproj/PLACEHOLDER +0 -0
  1767. data/spec/fixtures/languages/apps/short_names/foo.lproj/PLACEHOLDER +0 -0
  1768. data/spec/fixtures/languages/apps/short_names/fr.lproj/PLACEHOLDER +0 -0
  1769. data/spec/fixtures/languages/apps/short_names/it.lproj/PLACEHOLDER +0 -0
  1770. data/spec/fixtures/languages/apps/short_names/ja.lproj/PLACEHOLDER +0 -0
  1771. data/spec/fixtures/ordered_entries/apps/no_requires/1.js +1 -0
  1772. data/spec/fixtures/ordered_entries/apps/no_requires/B.js +1 -0
  1773. data/spec/fixtures/ordered_entries/apps/no_requires/a/a.js +1 -0
  1774. data/spec/fixtures/ordered_entries/apps/no_requires/a/b.js +1 -0
  1775. data/spec/fixtures/ordered_entries/apps/no_requires/a.js +1 -0
  1776. data/spec/fixtures/ordered_entries/apps/no_requires/b/a.js +1 -0
  1777. data/spec/fixtures/ordered_entries/apps/no_requires/c.js +1 -0
  1778. data/spec/fixtures/ordered_entries/apps/no_requires/core.js +1 -0
  1779. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/B.css +0 -0
  1780. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a/a.css +0 -0
  1781. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a/b.css +0 -0
  1782. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a.css +0 -0
  1783. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/b/a.css +0 -0
  1784. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/c.css +0 -0
  1785. data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/strings.js +1 -0
  1786. data/spec/fixtures/ordered_entries/apps/no_requires/main.js +1 -0
  1787. data/spec/fixtures/ordered_entries/apps/no_requires/resources/main_page.js +1 -0
  1788. data/spec/fixtures/ordered_entries/apps/no_requires/t.js +1 -0
  1789. data/spec/fixtures/ordered_entries/apps/no_requires/utils.js +1 -0
  1790. data/spec/fixtures/ordered_entries/apps/with_requires/a.js +2 -0
  1791. data/spec/fixtures/ordered_entries/apps/with_requires/b.js +3 -0
  1792. data/spec/fixtures/ordered_entries/apps/with_requires/c.js +2 -0
  1793. data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/a.css +2 -0
  1794. data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/b.css +2 -0
  1795. data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/c.css +2 -0
  1796. data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/d.js +1 -0
  1797. data/spec/fixtures/real_world/Buildfile +22 -0
  1798. data/spec/fixtures/real_world/apps/account/README +1 -0
  1799. data/spec/fixtures/real_world/apps/account/modules/preferences/README +0 -0
  1800. data/spec/fixtures/real_world/apps/calendar/README +1 -0
  1801. data/spec/fixtures/real_world/apps/calendar/modules/preferences/README +0 -0
  1802. data/spec/fixtures/real_world/apps/contacts/README_BEFORE_EDITING +1 -0
  1803. data/spec/fixtures/real_world/apps/contacts/modules/preferences/README +0 -0
  1804. data/spec/fixtures/real_world/apps/contacts/modules/printing/README +0 -0
  1805. data/spec/fixtures/real_world/apps/files/README +1 -0
  1806. data/spec/fixtures/real_world/apps/mail/README +1 -0
  1807. data/spec/fixtures/real_world/apps/mail/modules/preferences/README +0 -0
  1808. data/spec/fixtures/real_world/apps/mail/modules/printing/README +0 -0
  1809. data/spec/fixtures/real_world/apps/mobile_photos/README +1 -0
  1810. data/spec/fixtures/real_world/apps/photos/README +1 -0
  1811. data/spec/fixtures/real_world/apps/photos/modules/email/README +0 -0
  1812. data/spec/fixtures/real_world/apps/photos/modules/preferences/README +0 -0
  1813. data/spec/fixtures/real_world/apps/uploader/README +1 -0
  1814. data/spec/fixtures/real_world/frameworks/core_files/PLACEHOLDER +0 -0
  1815. data/spec/fixtures/real_world/frameworks/core_photos/PLACEHOLDER +0 -0
  1816. data/spec/fixtures/real_world/frameworks/no_2x/resources/test.css +1 -0
  1817. data/spec/fixtures/real_world/frameworks/no_2x/resources/test.png +0 -0
  1818. data/spec/fixtures/real_world/frameworks/shared/PLACEHOLDER +0 -0
  1819. data/spec/fixtures/real_world/frameworks/sproutcore/Buildfile +26 -0
  1820. data/spec/fixtures/real_world/frameworks/sproutcore/README +1 -0
  1821. data/spec/fixtures/real_world/frameworks/sproutcore/apps/docs/PLACEHOLDER +0 -0
  1822. data/spec/fixtures/real_world/frameworks/sproutcore/apps/test_runner/PLACEHOLDER +0 -0
  1823. data/spec/fixtures/real_world/frameworks/sproutcore/core.js +0 -0
  1824. data/spec/fixtures/real_world/frameworks/sproutcore/debug/debug-resource.html +0 -0
  1825. data/spec/fixtures/real_world/frameworks/sproutcore/debug/sample_debug.js +0 -0
  1826. data/spec/fixtures/real_world/frameworks/sproutcore/demo2.js +0 -0
  1827. data/spec/fixtures/real_world/frameworks/sproutcore/demo3.scss +0 -0
  1828. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/debug/sample_debug-loc.js +0 -0
  1829. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo.css +4 -0
  1830. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo.html +1 -0
  1831. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo2.sass +0 -0
  1832. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo3.scss +0 -0
  1833. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo4.less +0 -0
  1834. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.haml +0 -0
  1835. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.html.erb +1 -0
  1836. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.rhtml +0 -0
  1837. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/fixtures/sample_fixtures-loc.js +0 -0
  1838. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/has_require.css +4 -0
  1839. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/no_require.css +1 -0
  1840. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/no_sc_resource.rhtml +1 -0
  1841. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/protocols/sample-loc.js +0 -0
  1842. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/sc_resource.css +6 -0
  1843. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/sc_resource.rhtml +3 -0
  1844. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/strings.js +1 -0
  1845. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/templates/demo.handlebars +4 -0
  1846. data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/tests/sample-loc.js +0 -0
  1847. data/spec/fixtures/real_world/frameworks/sproutcore/fixtures/sample-json-fixture.json +1 -0
  1848. data/spec/fixtures/real_world/frameworks/sproutcore/fixtures/sample_fixtures.js +0 -0
  1849. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/application/PLACEHOLDER +0 -0
  1850. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/costello/core.js +0 -0
  1851. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/data_store/PLACEHOLDER +0 -0
  1852. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/debug/PLACEHOLDER +0 -0
  1853. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/desktop/PLACEHOLDER +0 -0
  1854. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/empty_theme/PLACEHOLDER +0 -0
  1855. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/foundation/PLACEHOLDER +0 -0
  1856. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/mobile/PLACEHOLDER +0 -0
  1857. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/qunit/PLACEHOLDER +0 -0
  1858. data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/uploader/PLACEHOLDER +0 -0
  1859. data/spec/fixtures/real_world/frameworks/sproutcore/french.lproj/french-resource.js +0 -0
  1860. data/spec/fixtures/real_world/frameworks/sproutcore/french.lproj/strings.js +1 -0
  1861. data/spec/fixtures/real_world/frameworks/sproutcore/german.lproj/german-resource.js +0 -0
  1862. data/spec/fixtures/real_world/frameworks/sproutcore/german.lproj/strings.js +0 -0
  1863. data/spec/fixtures/real_world/frameworks/sproutcore/has_require.js +4 -0
  1864. data/spec/fixtures/real_world/frameworks/sproutcore/lib/index.html +1 -0
  1865. data/spec/fixtures/real_world/frameworks/sproutcore/no_require.js +1 -0
  1866. data/spec/fixtures/real_world/frameworks/sproutcore/protocols/sample.js +0 -0
  1867. data/spec/fixtures/real_world/frameworks/sproutcore/resources/boo.png +0 -0
  1868. data/spec/fixtures/real_world/frameworks/sproutcore/resources/force@2x.png +0 -0
  1869. data/spec/fixtures/real_world/frameworks/sproutcore/sc_resource.js +6 -0
  1870. data/spec/fixtures/real_world/frameworks/sproutcore/tests/nested/sample1.js +0 -0
  1871. data/spec/fixtures/real_world/frameworks/sproutcore/tests/nested/sample2.js +0 -0
  1872. data/spec/fixtures/real_world/frameworks/sproutcore/tests/sample.js +0 -0
  1873. data/spec/fixtures/real_world/frameworks/sproutcore/tests/sample.rhtml +1 -0
  1874. data/spec/fixtures/real_world/frameworks/sproutcore/themes/standard_theme/README +0 -0
  1875. data/spec/fixtures/real_world/frameworks/sproutcore/views/view.js +1 -0
  1876. data/spec/fixtures/real_world/generators/sample_custom/Buildfile +0 -0
  1877. data/spec/fixtures/real_world/generators/sample_custom/templates/{filename}.js +1 -0
  1878. data/spec/fixtures/recursive_project/Buildfile +8 -0
  1879. data/spec/fixtures/recursive_project/frameworks/sproutcore/frameworks/costello/PLACEHOLDER +0 -0
  1880. data/spec/lib/builders/chance_file_spec.rb +44 -0
  1881. data/spec/lib/builders/combine_spec.rb +67 -0
  1882. data/spec/lib/builders/handlebars_spec.rb +29 -0
  1883. data/spec/lib/builders/html_spec.rb +580 -0
  1884. data/spec/lib/builders/javascript_spec.rb +82 -0
  1885. data/spec/lib/builders/less_spec.rb +51 -0
  1886. data/spec/lib/builders/module_spec.rb +133 -0
  1887. data/spec/lib/builders/sass_spec.rb +72 -0
  1888. data/spec/lib/builders/spec_helper.rb +30 -0
  1889. data/spec/lib/builders/strings_spec.rb +56 -0
  1890. data/spec/lib/builders/stylesheet_spec.rb +64 -0
  1891. data/spec/lib/builders/test_index_spec.rb +45 -0
  1892. data/spec/lib/builders/test_spec.rb +137 -0
  1893. data/spec/lib/buildfile/config_for_spec.rb +81 -0
  1894. data/spec/lib/buildfile/define_spec.rb +59 -0
  1895. data/spec/lib/buildfile/dup_spec.rb +65 -0
  1896. data/spec/lib/buildfile/invoke_spec.rb +135 -0
  1897. data/spec/lib/buildfile/load_spec.rb +51 -0
  1898. data/spec/lib/buildfile/task/dup_spec.rb +55 -0
  1899. data/spec/lib/buildfile/task_defined_spec.rb +17 -0
  1900. data/spec/lib/buildfile_commands/build_task_spec.rb +19 -0
  1901. data/spec/lib/buildfile_commands/config_spec.rb +97 -0
  1902. data/spec/lib/buildfile_commands/import_spec.rb +17 -0
  1903. data/spec/lib/buildfile_commands/namespace_spec.rb +18 -0
  1904. data/spec/lib/buildfile_commands/proxies_spec.rb +38 -0
  1905. data/spec/lib/buildfile_commands/replace_task_spec.rb +29 -0
  1906. data/spec/lib/buildfile_commands/task_spec.rb +36 -0
  1907. data/spec/lib/helpers/minifier.rb +31 -0
  1908. data/spec/lib/helpers/packing_optimizer/optimize_spec.rb +26 -0
  1909. data/spec/lib/models/hash_struct/deep_clone_spec.rb +27 -0
  1910. data/spec/lib/models/hash_struct/has_options_spec.rb +32 -0
  1911. data/spec/lib/models/hash_struct/hash_spec.rb +29 -0
  1912. data/spec/lib/models/hash_struct/merge_spec.rb +19 -0
  1913. data/spec/lib/models/hash_struct/method_missing.rb +41 -0
  1914. data/spec/lib/models/manifest/add_entry_spec.rb +36 -0
  1915. data/spec/lib/models/manifest/add_transform_spec.rb +93 -0
  1916. data/spec/lib/models/manifest/build_spec.rb +78 -0
  1917. data/spec/lib/models/manifest/entry_for_spec.rb +94 -0
  1918. data/spec/lib/models/manifest/find_entry.rb +119 -0
  1919. data/spec/lib/models/manifest/prepare_spec.rb +62 -0
  1920. data/spec/lib/models/manifest_entry/cacheable_url_spec.rb +31 -0
  1921. data/spec/lib/models/manifest_entry/hyperdomain_prefix.rb +34 -0
  1922. data/spec/lib/models/manifest_entry/prepare_spec.rb +54 -0
  1923. data/spec/lib/models/project/add_target_spec.rb +44 -0
  1924. data/spec/lib/models/project/buildfile_spec.rb +35 -0
  1925. data/spec/lib/models/project/find_targets_for_spec.rb +78 -0
  1926. data/spec/lib/models/project/load_nearest_project_spec.rb +23 -0
  1927. data/spec/lib/models/project/target_for_spec.rb +33 -0
  1928. data/spec/lib/models/project/targets_spec.rb +62 -0
  1929. data/spec/lib/models/target/compute_build_number_spec.rb +126 -0
  1930. data/spec/lib/models/target/config_spec.rb +30 -0
  1931. data/spec/lib/models/target/expand_required_targets_spec.rb +48 -0
  1932. data/spec/lib/models/target/installed_languages_spec.rb +47 -0
  1933. data/spec/lib/models/target/lproj_for_spec.rb +38 -0
  1934. data/spec/lib/models/target/manifest_for_spec.rb +42 -0
  1935. data/spec/lib/models/target/parent_target_spec.rb +21 -0
  1936. data/spec/lib/models/target/prepare_spec.rb +53 -0
  1937. data/spec/lib/models/target/required_targets_spec.rb +129 -0
  1938. data/spec/lib/models/target/target_for_spec.rb +56 -0
  1939. data/spec/lib/tools/build_number_spec.rb +35 -0
  1940. data/spec/lib/tools/gen_spec.rb +209 -0
  1941. data/spec/lib/tools/tools_spec.rb +96 -0
  1942. data/spec/spec.opts +4 -0
  1943. data/spec/spec_helper.rb +138 -0
  1944. data/sproutcore.gemspec +65 -0
  1945. data/vendor/chance/.gitignore +5 -0
  1946. data/vendor/chance/Gemfile +4 -0
  1947. data/vendor/chance/Rakefile +2 -0
  1948. data/vendor/chance/bin/chance +46 -0
  1949. data/vendor/chance/chance.gemspec +28 -0
  1950. data/vendor/chance/lib/chance/instance/data_url.rb +85 -0
  1951. data/vendor/chance/lib/chance/instance/javascript.rb +19 -0
  1952. data/vendor/chance/lib/chance/instance/slicing.rb +181 -0
  1953. data/vendor/chance/lib/chance/instance/spriting.rb +311 -0
  1954. data/vendor/chance/lib/chance/instance.rb +330 -0
  1955. data/vendor/chance/lib/chance/parser.rb +835 -0
  1956. data/vendor/chance/lib/chance/perf.rb +17 -0
  1957. data/vendor/chance/lib/chance/version.rb +3 -0
  1958. data/vendor/chance/lib/chance.rb +158 -0
  1959. data/vendor/chance/lib/tester/test.rb +108 -0
  1960. data/vendor/chance/lib/tester/test_runner.rb +27 -0
  1961. data/vendor/chance/test/case/abc.png +0 -0
  1962. data/vendor/chance/test/case/more/abc.png +0 -0
  1963. data/vendor/chance/test/case/more/another.css +4 -0
  1964. data/vendor/chance/test/case/test1.css +22 -0
  1965. data/vendor/chance/test/case/test2.css +6 -0
  1966. data/vendor/chance/tests/parser/basic/input/test.css +4 -0
  1967. data/vendor/chance/tests/parser/basic/output/test.parsed.css +5 -0
  1968. data/vendor/jsdoc/README.txt +151 -0
  1969. data/vendor/jsdoc/app/frame/Chain.js +102 -0
  1970. data/vendor/jsdoc/app/frame/Dumper.js +144 -0
  1971. data/vendor/jsdoc/app/frame/Hash.js +47 -0
  1972. data/vendor/jsdoc/app/frame/Link.js +142 -0
  1973. data/vendor/jsdoc/app/frame/Namespace.js +10 -0
  1974. data/vendor/jsdoc/app/frame/Opt.js +134 -0
  1975. data/vendor/jsdoc/app/frame/Reflection.js +26 -0
  1976. data/vendor/jsdoc/app/frame/String.js +93 -0
  1977. data/vendor/jsdoc/app/frame/Testrun.js +129 -0
  1978. data/vendor/jsdoc/app/frame.js +33 -0
  1979. data/vendor/jsdoc/app/handlers/FOODOC.js +26 -0
  1980. data/vendor/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
  1981. data/vendor/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
  1982. data/vendor/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
  1983. data/vendor/jsdoc/app/handlers/XMLDOC.js +26 -0
  1984. data/vendor/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
  1985. data/vendor/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
  1986. data/vendor/jsdoc/app/lib/JSDOC/JsDoc.js +162 -0
  1987. data/vendor/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
  1988. data/vendor/jsdoc/app/lib/JSDOC/Lang.js +144 -0
  1989. data/vendor/jsdoc/app/lib/JSDOC/Parser.js +109 -0
  1990. data/vendor/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
  1991. data/vendor/jsdoc/app/lib/JSDOC/Symbol.js +681 -0
  1992. data/vendor/jsdoc/app/lib/JSDOC/SymbolSet.js +226 -0
  1993. data/vendor/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
  1994. data/vendor/jsdoc/app/lib/JSDOC/Token.js +18 -0
  1995. data/vendor/jsdoc/app/lib/JSDOC/TokenReader.js +332 -0
  1996. data/vendor/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
  1997. data/vendor/jsdoc/app/lib/JSDOC/Util.js +32 -0
  1998. data/vendor/jsdoc/app/lib/JSDOC/Walker.js +453 -0
  1999. data/vendor/jsdoc/app/lib/JSDOC.js +98 -0
  2000. data/vendor/jsdoc/app/main.js +74 -0
  2001. data/vendor/jsdoc/app/plugins/commentSrcJson.js +19 -0
  2002. data/vendor/jsdoc/app/plugins/frameworkPrototype.js +16 -0
  2003. data/vendor/jsdoc/app/plugins/functionCall.js +10 -0
  2004. data/vendor/jsdoc/app/plugins/publishSrcHilite.js +62 -0
  2005. data/vendor/jsdoc/app/plugins/sproutcoreTags.js +26 -0
  2006. data/vendor/jsdoc/app/plugins/symbolLink.js +9 -0
  2007. data/vendor/jsdoc/app/plugins/tagParamConfig.js +31 -0
  2008. data/vendor/jsdoc/app/plugins/tagSynonyms.js +43 -0
  2009. data/vendor/jsdoc/app/run.js +346 -0
  2010. data/vendor/jsdoc/app/t/TestDoc.js +144 -0
  2011. data/vendor/jsdoc/app/t/runner.js +13 -0
  2012. data/vendor/jsdoc/app/test/addon.js +24 -0
  2013. data/vendor/jsdoc/app/test/anon_inner.js +14 -0
  2014. data/vendor/jsdoc/app/test/augments.js +31 -0
  2015. data/vendor/jsdoc/app/test/augments2.js +26 -0
  2016. data/vendor/jsdoc/app/test/borrows.js +41 -0
  2017. data/vendor/jsdoc/app/test/borrows2.js +23 -0
  2018. data/vendor/jsdoc/app/test/config.js +22 -0
  2019. data/vendor/jsdoc/app/test/constructs.js +18 -0
  2020. data/vendor/jsdoc/app/test/encoding.js +10 -0
  2021. data/vendor/jsdoc/app/test/encoding_other.js +12 -0
  2022. data/vendor/jsdoc/app/test/functions_anon.js +39 -0
  2023. data/vendor/jsdoc/app/test/functions_nested.js +33 -0
  2024. data/vendor/jsdoc/app/test/global.js +13 -0
  2025. data/vendor/jsdoc/app/test/globals.js +25 -0
  2026. data/vendor/jsdoc/app/test/ignore.js +10 -0
  2027. data/vendor/jsdoc/app/test/inner.js +16 -0
  2028. data/vendor/jsdoc/app/test/jsdoc_test.js +477 -0
  2029. data/vendor/jsdoc/app/test/lend.js +33 -0
  2030. data/vendor/jsdoc/app/test/memberof.js +20 -0
  2031. data/vendor/jsdoc/app/test/memberof_constructor.js +15 -0
  2032. data/vendor/jsdoc/app/test/name.js +19 -0
  2033. data/vendor/jsdoc/app/test/namespace_nested.js +23 -0
  2034. data/vendor/jsdoc/app/test/nocode.js +13 -0
  2035. data/vendor/jsdoc/app/test/oblit_anon.js +20 -0
  2036. data/vendor/jsdoc/app/test/overview.js +20 -0
  2037. data/vendor/jsdoc/app/test/param_inline.js +37 -0
  2038. data/vendor/jsdoc/app/test/params_optional.js +8 -0
  2039. data/vendor/jsdoc/app/test/prototype.js +17 -0
  2040. data/vendor/jsdoc/app/test/prototype_nested.js +9 -0
  2041. data/vendor/jsdoc/app/test/prototype_oblit.js +13 -0
  2042. data/vendor/jsdoc/app/test/prototype_oblit_constructor.js +24 -0
  2043. data/vendor/jsdoc/app/test/public.js +10 -0
  2044. data/vendor/jsdoc/app/test/shared.js +42 -0
  2045. data/vendor/jsdoc/app/test/shared2.js +2 -0
  2046. data/vendor/jsdoc/app/test/shortcuts.js +22 -0
  2047. data/vendor/jsdoc/app/test/static_this.js +13 -0
  2048. data/vendor/jsdoc/app/test/synonyms.js +23 -0
  2049. data/vendor/jsdoc/app/test/tosource.js +23 -0
  2050. data/vendor/jsdoc/app/test/variable_redefine.js +14 -0
  2051. data/vendor/jsdoc/app/test.js +304 -0
  2052. data/vendor/jsdoc/changes.txt +47 -0
  2053. data/vendor/jsdoc/conf/sample.conf +31 -0
  2054. data/vendor/jsdoc/java/build.xml +36 -0
  2055. data/vendor/jsdoc/java/build_1.4.xml +36 -0
  2056. data/vendor/jsdoc/java/classes/js.jar +0 -0
  2057. data/vendor/jsdoc/java/src/JsDebugRun.java +21 -0
  2058. data/vendor/jsdoc/java/src/JsRun.java +21 -0
  2059. data/vendor/jsdoc/jsdebug.jar +0 -0
  2060. data/vendor/jsdoc/jsrun.jar +0 -0
  2061. data/vendor/jsdoc/t/TestDoc.js +144 -0
  2062. data/vendor/jsdoc/t/runner.js +13 -0
  2063. data/vendor/jsdoc/test/addon.js +24 -0
  2064. data/vendor/jsdoc/test/anon_inner.js +14 -0
  2065. data/vendor/jsdoc/test/augments.js +31 -0
  2066. data/vendor/jsdoc/test/augments2.js +26 -0
  2067. data/vendor/jsdoc/test/borrows.js +41 -0
  2068. data/vendor/jsdoc/test/borrows2.js +23 -0
  2069. data/vendor/jsdoc/test/config.js +22 -0
  2070. data/vendor/jsdoc/test/constructs.js +18 -0
  2071. data/vendor/jsdoc/test/encoding.js +10 -0
  2072. data/vendor/jsdoc/test/encoding_other.js +12 -0
  2073. data/vendor/jsdoc/test/functions_anon.js +39 -0
  2074. data/vendor/jsdoc/test/functions_nested.js +33 -0
  2075. data/vendor/jsdoc/test/global.js +13 -0
  2076. data/vendor/jsdoc/test/globals.js +25 -0
  2077. data/vendor/jsdoc/test/ignore.js +10 -0
  2078. data/vendor/jsdoc/test/inner.js +16 -0
  2079. data/vendor/jsdoc/test/jsdoc_test.js +477 -0
  2080. data/vendor/jsdoc/test/lend.js +33 -0
  2081. data/vendor/jsdoc/test/memberof.js +20 -0
  2082. data/vendor/jsdoc/test/memberof_constructor.js +15 -0
  2083. data/vendor/jsdoc/test/name.js +19 -0
  2084. data/vendor/jsdoc/test/namespace_nested.js +23 -0
  2085. data/vendor/jsdoc/test/nocode.js +13 -0
  2086. data/vendor/jsdoc/test/oblit_anon.js +20 -0
  2087. data/vendor/jsdoc/test/overview.js +20 -0
  2088. data/vendor/jsdoc/test/param_inline.js +37 -0
  2089. data/vendor/jsdoc/test/params_optional.js +8 -0
  2090. data/vendor/jsdoc/test/prototype.js +17 -0
  2091. data/vendor/jsdoc/test/prototype_nested.js +9 -0
  2092. data/vendor/jsdoc/test/prototype_oblit.js +13 -0
  2093. data/vendor/jsdoc/test/prototype_oblit_constructor.js +24 -0
  2094. data/vendor/jsdoc/test/public.js +10 -0
  2095. data/vendor/jsdoc/test/shared.js +42 -0
  2096. data/vendor/jsdoc/test/shared2.js +2 -0
  2097. data/vendor/jsdoc/test/shortcuts.js +22 -0
  2098. data/vendor/jsdoc/test/static_this.js +13 -0
  2099. data/vendor/jsdoc/test/synonyms.js +23 -0
  2100. data/vendor/jsdoc/test/tosource.js +23 -0
  2101. data/vendor/jsdoc/test/variable_redefine.js +14 -0
  2102. data/vendor/jsdoc/test.js +304 -0
  2103. data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
  2104. data/vendor/sproutcore/lib/yuicompressor-2.4.6.jar +0 -0
  2105. metadata +2339 -0
@@ -0,0 +1,3186 @@
1
+ // ==========================================================================
2
+ // Project: SproutCore - JavaScript Application Framework
3
+ // Copyright: ©2006-2011 Strobe Inc. and contributors.
4
+ // Portions ©2008-2011 Apple Inc. All rights reserved.
5
+ // License: Licensed under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ sc_require('mixins/collection_view_delegate') ;
9
+ sc_require('views/list_item');
10
+
11
+ /**
12
+ Special drag operation passed to delegate if the collection view proposes
13
+ to perform a reorder event.
14
+
15
+ @static
16
+ @constant
17
+ */
18
+ SC.DRAG_REORDER = 0x0010;
19
+
20
+ /**
21
+ @static
22
+ @static
23
+ @default NO
24
+ */
25
+ SC.BENCHMARK_RELOAD = NO;
26
+
27
+ /*
28
+ TODO Document SC.CollectionView
29
+ */
30
+
31
+ /**
32
+ @class
33
+
34
+ Renders a collection of views from a source array of model objects.
35
+
36
+ The `CollectionView` is the root view class for rendering collections of
37
+ views based on a source array of objects. It can automatically create the
38
+ and layout the views, including displaying them in groups. It also
39
+ handles event input for the entire collection.
40
+
41
+ To use `CollectionView`, just create the view and set the 'content' property
42
+ to an array of objects. (Note that if you setup a binding, it will
43
+ always transform content to an array.) The view will create instances of
44
+ exampleView to render the array. You can also bind to the selection
45
+ property if you want to monitor selection. (be sure to set the isEnabled
46
+ property to allow selection.)
47
+
48
+ @extends SC.View
49
+ @extends SC.CollectionViewDelegate
50
+ @extends SC.CollectionContent
51
+ @since SproutCore 0.9
52
+ */
53
+ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate, SC.CollectionContent,
54
+ /** @scope SC.CollectionView.prototype */ {
55
+
56
+ /**
57
+ @type Array
58
+ @default ['sc-collection-view']
59
+ @see SC.View#classNames
60
+ */
61
+ classNames: ['sc-collection-view'],
62
+
63
+ /**
64
+ @type Array
65
+ @default ['isFirstResponder', 'isEnabled', 'isActive']
66
+ */
67
+ displayProperties: ['isFirstResponder', 'isEnabled', 'isActive'],
68
+
69
+ /**
70
+ @type String
71
+ @default 'collectionRenderDelegate'
72
+ */
73
+ renderDelegateName: 'collectionRenderDelegate',
74
+
75
+ /**
76
+ @type Number
77
+ @default 200
78
+ */
79
+ ACTION_DELAY: 200,
80
+
81
+ // ......................................
82
+ // PROPERTIES
83
+ //
84
+
85
+ /**
86
+ If `YES`, uses the experimental fast `CollectionView` path.
87
+
88
+ @type Boolean
89
+ @default NO
90
+ */
91
+ useFastPath: NO,
92
+
93
+ /**
94
+ An array of content objects
95
+
96
+ This array should contain the content objects you want the collection view
97
+ to display. An item view (based on the `exampleView` view class) will be
98
+ created for each content object, in the order the content objects appear
99
+ in this array.
100
+
101
+ If you make the collection editable, the collection view will also modify
102
+ this array using the observable array methods of `SC.Array`.
103
+
104
+ Usually you will want to bind this property to a controller property
105
+ that actually contains the array of objects you to display.
106
+
107
+ @type SC.Array
108
+ @default null
109
+ */
110
+ content: null,
111
+
112
+ /** @private */
113
+ contentBindingDefault: SC.Binding.multiple(),
114
+
115
+ /**
116
+ The current length of the content.
117
+
118
+ @type Number
119
+ @default 0
120
+ */
121
+ length: 0,
122
+
123
+ /**
124
+ The set of indexes that are currently tracked by the collection view.
125
+ This property is used to determine the range of items the collection view
126
+ should monitor for changes.
127
+
128
+ The default implementation of this property returns an index set covering
129
+ the entire range of the content. It changes automatically whenever the
130
+ length changes.
131
+
132
+ Note that the returned index set for this property will always be frozen.
133
+ To change the nowShowing index set, you must create a new index set and
134
+ apply it.
135
+
136
+ @field
137
+ @type SC.IndexSet
138
+ @observes length
139
+ @observes clippingFrame
140
+ */
141
+ nowShowing: function() {
142
+ return this.computeNowShowing();
143
+ }.property('length', 'clippingFrame').cacheable(),
144
+
145
+ /**
146
+ Indexes of selected content objects. This `SC.SelectionSet` is modified
147
+ automatically by the collection view when the user changes the selection
148
+ on the collection.
149
+
150
+ Any item views representing content objects in this set will have their
151
+ isSelected property set to `YES` automatically.
152
+
153
+ @type SC.SelectionSet
154
+ @default null
155
+ */
156
+ selection: null,
157
+
158
+ /**
159
+ Allow user to select content using the mouse and keyboard.
160
+
161
+ Set this property to `NO` to disallow the user from selecting items. If you
162
+ have items in your `selectedIndexes property, they will still be reflected
163
+ visually.
164
+
165
+ @type Boolean
166
+ @default YES
167
+ */
168
+ isSelectable: YES,
169
+
170
+ /** @private */
171
+ isSelectableBindingDefault: SC.Binding.bool(),
172
+
173
+ /**
174
+ Enable or disable the view.
175
+
176
+ The collection view will set the `isEnabled` property of its item views to
177
+ reflect the same view of this property. Whenever ``isEnabled` is false,
178
+ the collection view will also be not selectable or editable, regardless of
179
+ the settings for isEditable` & `isSelectable`.
180
+
181
+ @type Boolean
182
+ @default YES
183
+ */
184
+ isEnabled: YES,
185
+
186
+ /** @private */
187
+ isEnabledBindingDefault: SC.Binding.bool(),
188
+
189
+ /**
190
+ Allow user to edit content views.
191
+
192
+ The collection view will set the `isEditable` property on its item views to
193
+ reflect the same value of this property. Whenever `isEditable` is false,
194
+ the user will not be able to reorder, add, or delete items regardless of
195
+ the `canReorderContent` and `canDeleteContent` and `isDropTarget`
196
+ properties.
197
+
198
+ @type Boolean
199
+ @default YES
200
+ */
201
+ isEditable: YES,
202
+
203
+ /** @private */
204
+ isEditableBindingDefault: SC.Binding.bool(),
205
+
206
+ /**
207
+ Allow user to reorder items using drag and drop.
208
+
209
+ If true, the user will can use drag and drop to reorder items in the list.
210
+ If you also accept drops, this will allow the user to drop items into
211
+ specific points in the list. Otherwise items will be added to the end.
212
+
213
+ @type Boolean
214
+ @default NO
215
+ */
216
+ canReorderContent: NO,
217
+
218
+ /** @private */
219
+ canReorderContentBindingDefault: SC.Binding.bool(),
220
+
221
+ /**
222
+ Allow the user to delete items using the delete key
223
+
224
+ If true the user will be allowed to delete selected items using the delete
225
+ key. Otherwise deletes will not be permitted.
226
+
227
+ @type Boolean
228
+ @default NO
229
+ */
230
+ canDeleteContent: NO,
231
+
232
+ /** @private */
233
+ canDeleteContentBindingDefault: SC.Binding.bool(),
234
+
235
+ /**
236
+ Allow user to edit the content by double clicking on it or hitting return.
237
+ This will only work if isEditable is `YES` and the item view implements
238
+ the `beginEditing()` method.
239
+
240
+ @type Boolean
241
+ */
242
+ canEditContent: NO,
243
+
244
+ /** @private */
245
+ canEditContentBindingDefault: SC.Binding.bool(),
246
+
247
+ /**
248
+ Accept drops for data other than reordering.
249
+
250
+ Setting this property to return true when the view is instantiated will
251
+ cause it to be registered as a drop target, activating the other drop
252
+ machinery.
253
+
254
+ @type Boolean
255
+ @default NO
256
+ */
257
+ isDropTarget: NO,
258
+
259
+ /**
260
+ Use toggle selection instead of normal click behavior.
261
+
262
+ If set to true, then selection will use a toggle instead of the normal
263
+ click behavior. Command modifiers will be ignored and instead clicking
264
+ once will select an item and clicking on it again will deselect it.
265
+
266
+ @type Boolean
267
+ @default NO
268
+ */
269
+ useToggleSelection: NO,
270
+
271
+ /**
272
+ Trigger the action method on a single click.
273
+
274
+ Normally, clicking on an item view in a collection will select the content
275
+ object and double clicking will trigger the action method on the
276
+ collection view.
277
+
278
+ If you set this property to `YES`, then clicking on a view will both select
279
+ it (if `isSelected` is true) and trigger the action method.
280
+
281
+ Use this if you are using the collection view as a menu of items.
282
+
283
+ @type Boolean
284
+ @default NO
285
+ */
286
+ actOnSelect: NO,
287
+
288
+
289
+ /**
290
+ Select an item immediately on mouse down
291
+
292
+ Normally as soon as you begin a click the item will be selected.
293
+
294
+ In some UI scenarios, you might want to prevent selection until
295
+ the mouse is released, so you can perform, for instance, a drag operation
296
+ without actually selecting the target item.
297
+
298
+ @type Boolean
299
+ @default YES
300
+ */
301
+ selectOnMouseDown: YES,
302
+
303
+ /**
304
+ The view class to use when creating new item views.
305
+
306
+ The collection view will automatically create an instance of the view
307
+ class you set here for each item in its content array. You should provide
308
+ your own subclass for this property to display the type of content you
309
+ want.
310
+
311
+ For best results, the view you set here should understand the following
312
+ properties:
313
+
314
+ - `content` -- The content object from the content array your view should display
315
+ - `isEnabled` -- True if the view should appear enabled
316
+ - `isSelected` -- True if the view should appear selected
317
+
318
+ In general you do not want your child views to actually respond to mouse
319
+ and keyboard events themselves. It is better to let the collection view
320
+ do that.
321
+
322
+ If you do implement your own event handlers such as mouseDown or mouseUp,
323
+ you should be sure to actually call the same method on the collection view
324
+ to give it the chance to perform its own selection housekeeping.
325
+
326
+ @type SC.View
327
+ @default SC.ListItemView
328
+ */
329
+ exampleView: SC.ListItemView,
330
+
331
+ /**
332
+ If set, this key will be used to get the example view for a given
333
+ content object. The exampleView property will be ignored.
334
+
335
+ @type String
336
+ @default null
337
+ */
338
+ contentExampleViewKey: null,
339
+
340
+ /**
341
+ The view class to use when creating new group item views.
342
+
343
+ The collection view will automatically create an instance of the view
344
+ class you set here for each item in its content array. You should provide
345
+ your own subclass for this property to display the type of content you
346
+ want.
347
+
348
+ If you leave this set to null then the regular example view will be used
349
+ with the isGroupView property set to YES on the item view.
350
+
351
+ @type SC.View
352
+ @default null
353
+ */
354
+ groupExampleView: null,
355
+
356
+ /**
357
+ If set, this key will be used to get the example view for a given
358
+ content object. The `groupExampleView` property will be ignored.
359
+
360
+ @type String
361
+ @default null
362
+ */
363
+ contentGroupExampleViewKey: null,
364
+
365
+ /**
366
+ Invoked when the user double clicks on an item (or single clicks of
367
+ actOnSelect is true)
368
+
369
+ Set this to the name of the action you want to send down the
370
+ responder chain when the user double clicks on an item (or single clicks
371
+ if `actOnSelect` is true). You can optionally specify a specific target as
372
+ well using the target property.
373
+
374
+ If you do not specify an action, then the collection view will also try to
375
+ invoke the action named on the target item view.
376
+
377
+ Older versions of SproutCore expected the action property to contain an
378
+ actual function that would be run. This format is still supported but is
379
+ deprecated for future use. You should generally use the responder chain
380
+ to handle your action for you.
381
+
382
+ @type String
383
+ @default null
384
+ */
385
+ action: null,
386
+
387
+ /**
388
+ Optional target to send the action to when the user double clicks.
389
+
390
+ If you set the action property to the name of an action, you can
391
+ optionally specify the target object you want the action to be sent to.
392
+ This can be either an actual object or a property path that will resolve
393
+ to an object at the time that the action is invoked.
394
+
395
+ This property is ignored if you use the deprecated approach of making the
396
+ action property a function.
397
+
398
+ @type String|Object
399
+ @default null
400
+ */
401
+ target: null,
402
+
403
+ /**
404
+ Property on content items to use for display.
405
+
406
+ Built-in item views such as the `LabelView`s and `ImageView`s will use the
407
+ value of this property as a key on the content object to determine the
408
+ value they should display.
409
+
410
+ For example, if you set `contentValueKey` to 'name' and set the
411
+ exampleView to an `SC.LabelView`, then the label views created by the
412
+ colleciton view will display the value of the content.name.
413
+
414
+ If you are writing your own custom item view for a collection, you can
415
+ get this behavior automatically by including the SC.Control mixin on your
416
+ view. You can also ignore this property if you like. The collection view
417
+ itself does not use this property to impact rendering.
418
+
419
+ @type String
420
+ @default null
421
+ */
422
+ contentValueKey: null,
423
+
424
+ /**
425
+ Enables keyboard-based navigate, deletion, etc. if set to true.
426
+
427
+ @type Boolean
428
+ @default NO
429
+ */
430
+ acceptsFirstResponder: NO,
431
+
432
+ /**
433
+ Changing this property value by default will cause the `CollectionView` to
434
+ add/remove an 'active' class name to the root element.
435
+
436
+ @type Boolean
437
+ @default NO
438
+ */
439
+ isActive: NO,
440
+
441
+
442
+ /**
443
+ This property is used to store the calculated height to have
444
+ a consistent scrolling behavior due to the issues generated by using top
445
+ instead of `scrollTop`. We could look at the min-height set in the view, but
446
+ to avoid perf hits we simply store it and the scrollView will use it if
447
+ different than 0.
448
+
449
+ @type Number
450
+ @default 0
451
+ */
452
+ calculatedHeight: 0,
453
+
454
+ /**
455
+ This property is used to store the calculated width to have
456
+ a consistent scrolling behavior due to the issues generated by using left
457
+ instead of `scrollLeft`. We could look at the min-width set in the view, but
458
+ to avoid perf hits we simply store it and the scrollView will use it if
459
+ different than 0.
460
+
461
+ @type Number
462
+ @default 0
463
+ */
464
+ calculatedWidth: 0,
465
+
466
+
467
+ // ..........................................................
468
+ // SUBCLASS METHODS
469
+ //
470
+
471
+ /**
472
+ Override to return the computed layout dimensions of the collection view.
473
+ You can omit any dimensions you don't care about setting in your
474
+ computed value.
475
+
476
+ This layout is automatically applied whenever the content changes.
477
+
478
+ If you don't care about computing the layout at all, you can return null.
479
+
480
+ @returns {Hash} layout properties
481
+ */
482
+ computeLayout: function() {
483
+ return null;
484
+ },
485
+
486
+ /**
487
+ Override to compute the layout of the itemView for the content at the
488
+ specified index. This layout will be applied to the view just before it
489
+ is rendered.
490
+
491
+ @param {Number} contentIndex the index of content being rendered by
492
+ itemView
493
+ @returns {Hash} a view layout
494
+ */
495
+ layoutForContentIndex: function(contentIndex) {
496
+ return null;
497
+ },
498
+
499
+ /**
500
+ This computed property returns an index set selecting all content indexes.
501
+ It will recompute anytime the length of the collection view changes.
502
+
503
+ This is used by the default `contentIndexesInRect()` implementation.
504
+
505
+ @field
506
+ @type SC.IndexSet
507
+ @observes length
508
+ */
509
+ allContentIndexes: function() {
510
+ return SC.IndexSet.create(0, this.get('length')).freeze();
511
+ }.property('length').cacheable(),
512
+
513
+ /**
514
+ Override to return an IndexSet with the indexes that are at least
515
+ partially visible in the passed rectangle. This method is used by the
516
+ default implementation of `computeNowShowing()` to determine the new
517
+ `nowShowing` range after a scroll.
518
+
519
+ Override this method to implement incremental rendering.
520
+
521
+ @param {Rect} rect the visible rect
522
+ @returns {SC.IndexSet} now showing indexes
523
+ */
524
+ contentIndexesInRect: function(rect) {
525
+ return null; // select all
526
+ },
527
+
528
+ /**
529
+ Compute the nowShowing index set. The default implementation simply
530
+ returns the full range. Override to implement incremental rendering.
531
+
532
+ You should not normally call this method yourself. Instead get the
533
+ nowShowing property.
534
+
535
+ @returns {SC.IndexSet} new now showing range
536
+ */
537
+ computeNowShowing: function() {
538
+ var r = this.contentIndexesInRect(this.get('clippingFrame'));
539
+ if (!r) r = this.get('allContentIndexes'); // default show all
540
+
541
+ // make sure the index set doesn't contain any indexes greater than the
542
+ // actual content.
543
+ else {
544
+ var len = this.get('length'),
545
+ max = r.get('max');
546
+ if (max > len) r = r.copy().remove(len, max-len).freeze();
547
+ }
548
+
549
+ return r;
550
+ },
551
+
552
+ /**
553
+ Override to show the insertion point during a drag.
554
+
555
+ Called during a drag to show the insertion point. Passed value is the
556
+ item view that you should display the insertion point before. If the
557
+ passed value is `null`, then you should show the insertion point *AFTER* that
558
+ last item view returned by the itemViews property.
559
+
560
+ Once this method is called, you are guaranteed to also recieve a call to
561
+ `hideInsertionPoint()` at some point in the future.
562
+
563
+ The default implementation of this method does nothing.
564
+
565
+ @param itemView {SC.ClassicView} view the insertion point should appear directly before. If null, show insertion point at end.
566
+ @param dropOperation {Number} the drop operation. will be SC.DROP_BEFORE, SC.DROP_AFTER, or SC.DROP_ON
567
+
568
+ @returns {void}
569
+ */
570
+ showInsertionPoint: function(itemView, dropOperation) {},
571
+
572
+ /**
573
+ Override to hide the insertion point when a drag ends.
574
+
575
+ Called during a drag to hide the insertion point. This will be called
576
+ when the user exits the view, cancels the drag or completes the drag. It
577
+ will not be called when the insertion point changes during a drag.
578
+
579
+ You should expect to receive one or more calls to
580
+ `showInsertionPointBefore()` during a drag followed by at least one call to
581
+ this method at the end. Your method should not raise an error if it is
582
+ called more than once.
583
+
584
+ @returns {void}
585
+ */
586
+ hideInsertionPoint: function() {},
587
+
588
+
589
+ // ..........................................................
590
+ // DELEGATE SUPPORT
591
+ //
592
+
593
+
594
+ /**
595
+ Delegate used to implement fine-grained control over collection view
596
+ behaviors.
597
+
598
+ You can assign a delegate object to this property that will be consulted
599
+ for various decisions regarding drag and drop, selection behavior, and
600
+ even rendering. The object you place here must implement some or all of
601
+ the `SC.CollectionViewDelegate` mixin.
602
+
603
+ If you do not supply a delegate but the content object you set implements
604
+ the `SC.CollectionViewDelegate` mixin, then the content will be
605
+ automatically set as the delegate. Usually you will work with a
606
+ `CollectionView` in this way rather than setting a delegate explicitly.
607
+
608
+ @type SC.CollectionViewDelegate
609
+ @default null
610
+ */
611
+ delegate: null,
612
+
613
+ /**
614
+ The delegate responsible for handling selection changes. This property
615
+ will be either the delegate, content, or the collection view itself,
616
+ whichever implements the `SC.CollectionViewDelegate` mixin.
617
+
618
+ @field
619
+ @type Object
620
+ */
621
+ selectionDelegate: function() {
622
+ var del = this.get('delegate'), content = this.get('content');
623
+ return this.delegateFor('isCollectionViewDelegate', del, content);
624
+ }.property('delegate', 'content').cacheable(),
625
+
626
+ /**
627
+ The delegate responsible for providing additional display information
628
+ about the content. If you bind a collection view to a controller, this
629
+ the content will usually also be the content delegate, though you
630
+ could implement your own delegate if you prefer.
631
+
632
+ @field
633
+ @type Object
634
+ */
635
+ contentDelegate: function() {
636
+ var del = this.get('delegate'), content = this.get('content');
637
+ return this.delegateFor('isCollectionContent', del, content);
638
+ }.property('delegate', 'content').cacheable(),
639
+
640
+
641
+ /** @private
642
+ A cache of the `contentGroupIndexes` value returned by the delegate. This
643
+ is frequently accessed and usually involves creating an `SC.IndexSet`
644
+ object, so it's worthwhile to cache.
645
+ */
646
+ _contentGroupIndexes: function() {
647
+ return this.get('contentDelegate').contentGroupIndexes(this, this.get('content'));
648
+ }.property('contentDelegate', 'content').cacheable(),
649
+
650
+
651
+ // ..........................................................
652
+ // CONTENT CHANGES
653
+ //
654
+
655
+ /**
656
+ Called whenever the content array or an item in the content array or a
657
+ property on an item in the content array changes. Reloads the appropriate
658
+ item view when the content array itself changes or calls
659
+ `contentPropertyDidChange()` if a property changes.
660
+
661
+ Normally you will not call this method directly though you may override
662
+ it if you need to change the way changes to observed ranges are handled.
663
+
664
+ @param {SC.Array} content the content array generating the change
665
+ @param {Object} object the changed object
666
+ @param {String} key the changed property or '[]' or an array change
667
+ @param {SC.IndexSet} indexes affected indexes or null for all items
668
+ @returns {void}
669
+ */
670
+ contentRangeDidChange: function(content, object, key, indexes) {
671
+ if (!object && (key === '[]')) {
672
+ this.notifyPropertyChange('_contentGroupIndexes');
673
+ this.reload(indexes); // note: if indexes == null, reloads all
674
+ } else {
675
+ this.contentPropertyDidChange(object, key, indexes);
676
+ }
677
+ },
678
+
679
+ /**
680
+ Called whenever a property on an item in the content array changes. This
681
+ is only called if you have set `observesContentProperties` to `YES`.
682
+
683
+ Override this property if you want to do some custom work whenever a
684
+ property on a content object changes.
685
+
686
+ The default implementation does nothing.
687
+
688
+ @param {Object} target the object that changed
689
+ @param {String} key the property that changed value
690
+ @param {SC.IndexSet} indexes the indexes in the content array affected
691
+ @returns {void}
692
+ */
693
+ contentPropertyDidChange: function(target, key, indexes) {},
694
+
695
+ /**
696
+ Called whenever the view needs to updates its `contentRangeObserver` to
697
+ reflect the current nowShowing index set. You will not usually call this
698
+ method yourself but you may override it if you need to provide some
699
+ custom range observer behavior.
700
+
701
+ Note that if you do implement this method, you are expected to maintain
702
+ the range observer object yourself. If a range observer has not been
703
+ created yet, this method should create it. If an observer already exists
704
+ this method should udpate it.
705
+
706
+ When you create a new range observer, the oberver must eventually call
707
+ `contentRangeDidChange()` for the collection view to function properly.
708
+
709
+ If you override this method you probably also need to override
710
+ `destroyRangeObserver()` to cleanup any existing range observer.
711
+
712
+ @returns {void}
713
+ */
714
+ updateContentRangeObserver: function() {
715
+ var nowShowing = this.get('nowShowing'),
716
+ observer = this._cv_contentRangeObserver,
717
+ content = this.get('content');
718
+
719
+ if (!content) return ; // nothing to do
720
+
721
+ if (observer) {
722
+ content.updateRangeObserver(observer, nowShowing);
723
+ } else {
724
+ var func = this.contentRangeDidChange;
725
+ observer = content.addRangeObserver(nowShowing, this, func, null);
726
+ this._cv_contentRangeObserver = observer ;
727
+ }
728
+
729
+ },
730
+
731
+ /**
732
+ Called whever the view needs to invalidate the current content range
733
+ observer. This is called whenever the content array changes. You will
734
+ not usually call this method yourself but you may override it if you
735
+ provide your own range observer behavior.
736
+
737
+ Note that if you override this method you should probably also override
738
+ `updateRangeObserver()` to create or update a range oberver as needed.
739
+
740
+ @returns {void}
741
+ */
742
+ removeContentRangeObserver: function() {
743
+ var content = this.get('content'),
744
+ observer = this._cv_contentRangeObserver ;
745
+
746
+ if (observer) {
747
+ if (content) content.removeRangeObserver(observer);
748
+ this._cv_contentRangeObserver = null ;
749
+ }
750
+ },
751
+
752
+ /**
753
+ Called whenever the content length changes. This will invalidate the
754
+ length property of the view itself causing the nowShowing to recompute
755
+ which will in turn update the UI accordingly.
756
+
757
+ @returns {void}
758
+ */
759
+ contentLengthDidChange: function() {
760
+ var content = this.get('content');
761
+ this.set('length', content ? content.get('length') : 0);
762
+ },
763
+
764
+ /** @private
765
+ Whenever content property changes to a new value:
766
+
767
+ - remove any old observers
768
+ - setup new observers (maybe wait until end of runloop to do this?)
769
+ - recalc height/reload content
770
+ - set content as delegate if delegate was old content
771
+ - reset selection
772
+
773
+ Whenever content array mutates:
774
+
775
+ - possibly stop observing property changes on objects, observe new objs
776
+ - reload effected item views
777
+ - update layout for receiver
778
+ */
779
+ _cv_contentDidChange: function() {
780
+ var content = this.get('content'),
781
+ lfunc = this.contentLengthDidChange ;
782
+
783
+ if (content === this._content) return; // nothing to do
784
+
785
+ // cleanup old content
786
+ this.removeContentRangeObserver();
787
+ if (this._content) {
788
+ this._content.removeObserver('length', this, lfunc);
789
+ }
790
+
791
+ // cache
792
+ this._content = content;
793
+
794
+ // add new observers - range observer will be added lazily
795
+ if (content) {
796
+ content.addObserver('length', this, lfunc);
797
+ }
798
+
799
+ // notify all items changed
800
+ this.contentLengthDidChange();
801
+ this.contentRangeDidChange(content, null, '[]', null);
802
+
803
+ }.observes('content'),
804
+
805
+ // ..........................................................
806
+ // ITEM VIEWS
807
+ //
808
+
809
+ /** @private
810
+ The indexes that need to be reloaded. Must be one of YES, NO, or an
811
+ SC.IndexSet.
812
+ */
813
+ _invalidIndexes: NO,
814
+
815
+ /**
816
+ Regenerates the item views for the content items at the specified indexes.
817
+ If you pass null instead of an index set, regenerates all item views.
818
+
819
+ This method is called automatically whenever the content array changes in
820
+ an observable way, but you can call its yourself also if you need to
821
+ refresh the collection view for some reason.
822
+
823
+ Note that if the length of the content is shorter than the child views
824
+ and you call this method, then the child views will be removed no matter
825
+ what the index.
826
+
827
+ @param {SC.IndexSet} indexes
828
+ @returns {SC.CollectionView} receiver
829
+ */
830
+ reload: function(indexes) {
831
+ var invalid = this._invalidIndexes ;
832
+ if (indexes && invalid !== YES) {
833
+ if (invalid) invalid.add(indexes);
834
+ else invalid = this._invalidIndexes = indexes.clone();
835
+
836
+ }
837
+ else {
838
+ this._invalidIndexes = YES ; // force a total reload
839
+ }
840
+
841
+ if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded);
842
+
843
+ return this ;
844
+ },
845
+
846
+ /**
847
+ Invoked once per runloop to actually reload any needed item views.
848
+ You can call this method at any time to actually force the reload to
849
+ happen immediately if any item views need to be reloaded.
850
+
851
+ Note that this method will also invoke two other callback methods if you
852
+ define them on your subclass:
853
+
854
+ - *willReload()* is called just before the items are reloaded
855
+ - *didReload()* is called jsut after items are reloaded
856
+
857
+ You can use these two methods to setup and teardown caching, which may
858
+ reduce overall cost of a reload. Each method will be passed an index set
859
+ of items that are reloaded or null if all items are reloaded.
860
+
861
+ @returns {SC.CollectionView} receiver
862
+ */
863
+ reloadIfNeeded: function() {
864
+ var invalid = this._invalidIndexes;
865
+ if (!invalid || !this.get('isVisibleInWindow')) return this ; // delay
866
+ this._invalidIndexes = NO ;
867
+
868
+ var content = this.get('content'),
869
+ i, len, existing,
870
+ layout = this.computeLayout(),
871
+ bench = SC.BENCHMARK_RELOAD,
872
+ nowShowing = this.get('nowShowing'),
873
+ itemViews = this._sc_itemViews,
874
+ containerView = this.get('containerView') || this,
875
+ exampleView, groupExampleView,
876
+ shouldReuseViews, shouldReuseGroupViews, shouldReuse,
877
+ viewsToRemove, viewsToRedraw, viewsToCreate,
878
+ views, idx, view, layer, parentNode, viewPool,
879
+ del, groupIndexes, isGroupView;
880
+
881
+ // if the set is defined but it contains the entire nowShowing range, just
882
+ // replace
883
+ if (invalid.isIndexSet && invalid.contains(nowShowing)) invalid = YES ;
884
+ if (this.willReload) this.willReload(invalid === YES ? null : invalid);
885
+
886
+
887
+ // Up-front, figure out whether the view class (and, if applicable,
888
+ // group view class) is re-usable. If so, it's beneficial for us to
889
+ // first return all no-longer-needed views to the pool before allocating
890
+ // new ones, because that will maximize the potential for re-use.
891
+ exampleView = this.get('exampleView');
892
+ shouldReuseViews = exampleView ? exampleView.isReusableInCollections : NO;
893
+ groupExampleView = this.get('groupExampleView');
894
+ shouldReuseGroupViews = groupExampleView ? groupExampleView.isReusableInCollections : NO;
895
+
896
+ // if an index set, just update indexes
897
+ if (invalid.isIndexSet) {
898
+ if (bench) {
899
+ SC.Benchmark.start(bench="%@#reloadIfNeeded (Partial)".fmt(this),YES);
900
+ }
901
+
902
+ // Each of these arrays holds indexes.
903
+ viewsToRemove = [];
904
+ viewsToRedraw = [];
905
+ viewsToCreate = [];
906
+
907
+ invalid.forEach(function(idx) {
908
+ // get the existing item view, if there is one
909
+ existing = itemViews ? itemViews[idx] : null;
910
+
911
+ // if nowShowing, then reload the item view.
912
+ if (nowShowing.contains(idx)) {
913
+ if (existing && existing.parentView === containerView) {
914
+ viewsToRedraw.push(idx);
915
+
916
+ } else {
917
+ viewsToCreate.push(idx);
918
+ }
919
+
920
+ // if not nowShowing, then remove the item view if needed
921
+ } else if (existing && existing.parentView === containerView) {
922
+ viewsToRemove.push(idx);
923
+ }
924
+ },this);
925
+
926
+
927
+ // Now that we know what operations we need to perform, let's perform
928
+ // all the removals first…
929
+ for (i = 0, len = viewsToRemove.length; i < len; ++i) {
930
+ idx = viewsToRemove[i];
931
+ existing = itemViews ? itemViews[idx] : null;
932
+ delete itemViews[idx];
933
+
934
+ // If this view class is reusable, then add it back to the pool.
935
+ del = this.get('contentDelegate');
936
+ groupIndexes = this.get('_contentGroupIndexes');
937
+ isGroupView = groupIndexes && groupIndexes.contains(idx);
938
+ if (isGroupView) isGroupView = del.contentIndexIsGroup(this, content, idx);
939
+ shouldReuse = isGroupView ? shouldReuseGroupViews : shouldReuseViews;
940
+ if (shouldReuse) {
941
+ viewPool = isGroupView ? this._GROUP_VIEW_POOL : this._VIEW_POOL;
942
+
943
+ viewPool.push(existing);
944
+
945
+ // Because it's possible that we'll return this view to the pool
946
+ // and then immediately re-use it, there's the potential that the
947
+ // layer will not be correctly destroyed, because that support
948
+ // (built into removeChild) is coalesced at the runloop, and we
949
+ // will likely change the layerId when re-using the view. So
950
+ // we'll destroy the layer now.
951
+ existing.destroyLayer();
952
+ }
953
+
954
+ // We don't want the old layer hanging around, even if we are going
955
+ // to reuse it.
956
+ // (Charles Jolley personally guarantees this code)
957
+ layer = existing.get('layer');
958
+ if (layer && layer.parentNode) layer.parentNode.removeChild(layer);
959
+
960
+ containerView.removeChild(existing);
961
+ if (!shouldReuse) existing.destroy();
962
+ }
963
+
964
+ // …then the redraws…
965
+ for (i = 0, len = viewsToRedraw.length; i < len; ++i) {
966
+ idx = viewsToRedraw[i];
967
+ existing = itemViews ? itemViews[idx] : null;
968
+ view = this.itemViewForContentIndex(idx, YES);
969
+
970
+ // if the existing view has a layer, remove it immediately from
971
+ // the parent. This is necessary because the old and new views
972
+ // will use the same layerId
973
+ existing.destroyLayer();
974
+ containerView.replaceChild(view, existing);
975
+ }
976
+
977
+ // …and finally the creations.
978
+ for (i = 0, len = viewsToCreate.length; i < len; ++i) {
979
+ idx = viewsToCreate[i];
980
+ view = this.itemViewForContentIndex(idx, YES);
981
+ containerView.insertBefore(view, null); // Equivalent to 'append()', but avoids one more function call
982
+ }
983
+
984
+
985
+ if (bench) SC.Benchmark.end(bench);
986
+
987
+ // if set is NOT defined, replace entire content with nowShowing
988
+ } else {
989
+ if (bench) {
990
+ SC.Benchmark.start(bench="%@#reloadIfNeeded (Full)".fmt(this),YES);
991
+ }
992
+
993
+ // truncate cached item views since they will all be removed from the
994
+ // container anyway.
995
+ if (itemViews) itemViews.length = 0 ;
996
+
997
+ views = containerView.get('childViews');
998
+ if (views) views = views.copy();
999
+
1000
+ // below is an optimized version of:
1001
+ //this.replaceAllChildren(views);
1002
+ containerView.beginPropertyChanges();
1003
+ // views = containerView.get('views');
1004
+ if (this.willRemoveAllChildren) this.willRemoveAllChildren() ;
1005
+ containerView.destroyLayer().removeAllChildren();
1006
+
1007
+ // For all previous views that can be re-used, return them to the pool.
1008
+ if (views) {
1009
+ for (i = 0, len = views.length; i < len; ++i) {
1010
+ view = views[i];
1011
+ isGroupView = view.get('isGroupView');
1012
+ shouldReuse = isGroupView ? shouldReuseGroupViews : shouldReuseViews;
1013
+ if (shouldReuse) {
1014
+ viewPool = isGroupView ? this._GROUP_VIEW_POOL : this._VIEW_POOL;
1015
+
1016
+ viewPool.push(view);
1017
+
1018
+ // Because it's possible that we'll return this view to the pool
1019
+ // and then immediately re-use it, there's the potential that the
1020
+ // layer will not be correctly destroyed, because that support
1021
+ // (built into removeChild) is coalesced at the runloop, and we
1022
+ // will likely change the layerId when re-using the view. So
1023
+ // we'll destroy the layer now.
1024
+ view.destroyLayer();
1025
+ } else {
1026
+ view.destroy();
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+
1032
+ // Only after the children are removed should we create the new views.
1033
+ // We do this in order to maximize the change of re-use should the view
1034
+ // be marked as such.
1035
+ views = [];
1036
+ nowShowing.forEach(function(idx) {
1037
+ views.push(this.itemViewForContentIndex(idx, YES));
1038
+ }, this);
1039
+
1040
+
1041
+ containerView.set('childViews', views); // quick swap
1042
+ containerView.replaceLayer();
1043
+ containerView.endPropertyChanges();
1044
+
1045
+ if (bench) SC.Benchmark.end(bench);
1046
+
1047
+ }
1048
+
1049
+ // adjust my own layout if computed
1050
+ if (layout) this.adjust(layout);
1051
+ if (this.didReload) this.didReload(invalid === YES ? null : invalid);
1052
+
1053
+ return this ;
1054
+ },
1055
+
1056
+ /** @private */
1057
+ _TMP_ATTRS: {},
1058
+
1059
+ /** @private */
1060
+ _COLLECTION_CLASS_NAMES: ['sc-collection-item'],
1061
+
1062
+ /** @private */
1063
+ _GROUP_COLLECTION_CLASS_NAMES: ['sc-collection-item', 'sc-group-item'],
1064
+
1065
+ /** @private */
1066
+ _VIEW_POOL: null,
1067
+
1068
+ /** @private */
1069
+ _GROUP_VIEW_POOL: null,
1070
+
1071
+ /**
1072
+ Returns the item view for the content object at the specified index. Call
1073
+ this method instead of accessing child views directly whenever you need
1074
+ to get the view associated with a content index.
1075
+
1076
+ Although this method take two parameters, you should almost always call
1077
+ it with just the content index. The other two parameters are used
1078
+ internally by the CollectionView.
1079
+
1080
+ If you need to change the way the collection view manages item views
1081
+ you can override this method as well. If you just want to change the
1082
+ default options used when creating item views, override createItemView()
1083
+ instead.
1084
+
1085
+ Note that if you override this method, then be sure to implement this
1086
+ method so that it uses a cache to return the same item view for a given
1087
+ index unless "force" is YES. In that case, generate a new item view and
1088
+ replace the old item view in your cache with the new item view.
1089
+
1090
+ @param {Number} idx the content index
1091
+ @param {Boolean} rebuild internal use only
1092
+ @returns {SC.View} instantiated view
1093
+ */
1094
+ itemViewForContentIndex: function(idx, rebuild) {
1095
+ var ret;
1096
+
1097
+ // Use the cached view for this index, if we have it. We'll do this up-
1098
+ // front to avoid
1099
+ var itemViews = this._sc_itemViews;
1100
+ if (!itemViews) {
1101
+ itemViews = this._sc_itemViews = [] ;
1102
+ }
1103
+ else if (!rebuild && (ret = itemViews[idx])) {
1104
+ return ret ;
1105
+ }
1106
+
1107
+ // return from cache if possible
1108
+ var content = this.get('content'),
1109
+ item = content.objectAt(idx),
1110
+ del = this.get('contentDelegate'),
1111
+ groupIndexes = this.get('_contentGroupIndexes'),
1112
+ isGroupView = NO,
1113
+ key, E, layout, layerId,
1114
+ viewPoolKey, viewPool, reuseFunc, parentView, isEnabled, isSelected,
1115
+ outlineLevel, disclosureState, isVisibleInWindow;
1116
+
1117
+ // otherwise generate...
1118
+
1119
+ // first, determine the class to use
1120
+ isGroupView = groupIndexes && groupIndexes.contains(idx);
1121
+ if (isGroupView) isGroupView = del.contentIndexIsGroup(this, content,idx);
1122
+ if (isGroupView) {
1123
+ key = this.get('contentGroupExampleViewKey');
1124
+ if (key && item) E = item.get(key);
1125
+ if (!E) E = this.get('groupExampleView') || this.get('exampleView');
1126
+ viewPoolKey = '_GROUP_VIEW_POOL';
1127
+ } else {
1128
+ key = this.get('contentExampleViewKey');
1129
+ if (key && item) E = item.get(key);
1130
+ if (!E) E = this.get('exampleView');
1131
+ viewPoolKey = '_VIEW_POOL';
1132
+ }
1133
+
1134
+
1135
+ // Collect other state that we'll need whether we're re-using a previous
1136
+ // view or creating a new view.
1137
+ parentView = this.get('containerView') || this;
1138
+ layerId = this.layerIdFor(idx);
1139
+ isEnabled = del.contentIndexIsEnabled(this, content, idx);
1140
+ isSelected = del.contentIndexIsSelected(this, content, idx);
1141
+ outlineLevel = del.contentIndexOutlineLevel(this, content, idx);
1142
+ disclosureState = del.contentIndexDisclosureState(this, content, idx);
1143
+ isVisibleInWindow = this.isVisibleInWindow;
1144
+ layout = this.layoutForContentIndex(idx);
1145
+
1146
+
1147
+ // If the view is reusable and there is an appropriate view inside the
1148
+ // pool, simply reuse it to avoid having to create a new view.
1149
+ if (E && E.isReusableInCollections) {
1150
+ // Lazily create the view pool.
1151
+ viewPool = this[viewPoolKey];
1152
+ if (!viewPool) viewPool = this[viewPoolKey] = [];
1153
+
1154
+ // Is there a view we can re-use?
1155
+ if (viewPool.length > 0) {
1156
+ ret = viewPool.pop();
1157
+
1158
+ // Tell the view it's about to be re-used.
1159
+ reuseFunc = ret.prepareForReuse;
1160
+ if (reuseFunc) reuseFunc.call(ret);
1161
+
1162
+ // Set the new state. We'll set content last, because it's the most
1163
+ // likely to have observers.
1164
+ ret.beginPropertyChanges();
1165
+ ret.set('contentIndex', idx);
1166
+ ret.set('layerId', layerId);
1167
+ ret.set('isEnabled', isEnabled);
1168
+ ret.set('isSelected', isSelected);
1169
+ ret.set('outlineLevel', outlineLevel);
1170
+ ret.set('disclosureState', disclosureState);
1171
+ ret.set('isVisibleInWindow', isVisibleInWindow);
1172
+
1173
+ // TODO: In theory this shouldn't be needed, but without it, we
1174
+ // sometimes get errors when doing a full reload, because
1175
+ // 'childViews' contains the view but the parent is not set.
1176
+ // This implies a timing issue with the general flow of
1177
+ // collection view.
1178
+ ret.set('parentView', parentView);
1179
+
1180
+ // Since we re-use layerIds, we need to reset SproutCore's internal
1181
+ // mapping table.
1182
+ SC.View.views[layerId] = ret;
1183
+
1184
+ if (layout) {
1185
+ ret.set('layout', layout);
1186
+ }
1187
+ else {
1188
+ ret.set('layout', E.prototype.layout);
1189
+ }
1190
+ ret.set('content', item);
1191
+ ret.endPropertyChanges();
1192
+ }
1193
+ }
1194
+
1195
+ // If we weren't able to re-use a view, then create a new one.
1196
+ if (!ret) {
1197
+ // collect some other state
1198
+ var attrs = this._TMP_ATTRS;
1199
+ attrs.contentIndex = idx;
1200
+ attrs.content = item;
1201
+ attrs.owner = attrs.displayDelegate = this;
1202
+ attrs.parentView = parentView; // Same here; shouldn't be needed
1203
+ attrs.page = this.page;
1204
+ attrs.layerId = layerId;
1205
+ attrs.isEnabled = isEnabled;
1206
+ attrs.isSelected = isSelected;
1207
+ attrs.outlineLevel = outlineLevel;
1208
+ attrs.disclosureState = disclosureState;
1209
+ attrs.isGroupView = isGroupView;
1210
+ attrs.isVisibleInWindow = isVisibleInWindow;
1211
+ if (isGroupView) attrs.classNames = this._GROUP_COLLECTION_CLASS_NAMES;
1212
+ else attrs.classNames = this._COLLECTION_CLASS_NAMES;
1213
+
1214
+ if (layout) {
1215
+ attrs.layout = layout;
1216
+ } else {
1217
+ delete attrs.layout ;
1218
+ }
1219
+
1220
+ ret = this.createItemView(E, idx, attrs);
1221
+ }
1222
+
1223
+ itemViews[idx] = ret ;
1224
+ return ret ;
1225
+ },
1226
+
1227
+ /**
1228
+ Helper method for getting the item view of a specific content object
1229
+
1230
+ @param {Object} object
1231
+ */
1232
+ itemViewForContentObject: function(object) {
1233
+ return this.itemViewForContentIndex(this.get('content').indexOf(object));
1234
+ },
1235
+
1236
+ /** @private */
1237
+ _TMP_LAYERID: [],
1238
+
1239
+ /**
1240
+ Primitive to instantiate an item view. You will be passed the class
1241
+ and a content index. You can override this method to perform any other
1242
+ one time setup.
1243
+
1244
+ Note that item views may be created somewhat frequently so keep this fast.
1245
+
1246
+ *IMPORTANT:* The attrs hash passed is reused each time this method is
1247
+ called. If you add properties to this hash be sure to delete them before
1248
+ returning from this method.
1249
+
1250
+ @param {Class} exampleClass example view class
1251
+ @param {Number} idx the content index
1252
+ @param {Hash} attrs expected attributes
1253
+ @returns {SC.View} item view instance
1254
+ */
1255
+ createItemView: function(exampleClass, idx, attrs) {
1256
+ return exampleClass.create(attrs);
1257
+ },
1258
+
1259
+ /**
1260
+ Generates a layerId for the passed index and item. Usually the default
1261
+ implementation is suitable.
1262
+
1263
+ @param {Number} idx the content index
1264
+ @returns {String} layer id, must be suitable for use in HTML id attribute
1265
+ */
1266
+ layerIdFor: function(idx) {
1267
+ var ret = this._TMP_LAYERID;
1268
+ ret[0] = SC.guidFor(this);
1269
+ ret[1] = idx;
1270
+ return ret.join('-');
1271
+ },
1272
+
1273
+ /**
1274
+ Extracts the content index from the passed layerID. If the layer id does
1275
+ not belong to the receiver or if no value could be extracted, returns NO.
1276
+
1277
+ @param {String} id the layer id
1278
+ */
1279
+ contentIndexForLayerId: function(id) {
1280
+ if (!id || !(id = id.toString())) return null ; // nothing to do
1281
+
1282
+ var base = this._baseLayerId;
1283
+ if (!base) base = this._baseLayerId = SC.guidFor(this)+"-";
1284
+
1285
+ // no match
1286
+ if ((id.length <= base.length) || (id.indexOf(base) !== 0)) return null ;
1287
+ var ret = Number(id.slice(id.lastIndexOf('-')+1));
1288
+ return isNaN(ret) ? null : ret ;
1289
+ },
1290
+
1291
+
1292
+ /**
1293
+ Find the first content item view for the passed event.
1294
+
1295
+ This method will go up the view chain, starting with the view that was the
1296
+ target of the passed event, looking for a child item. This will become
1297
+ the view that is selected by the mouse event.
1298
+
1299
+ This method only works for mouseDown & mouseUp events. mouseMoved events
1300
+ do not have a target.
1301
+
1302
+ @param {SC.Event} evt An event
1303
+ @returns {SC.View} the item view or null
1304
+ */
1305
+ itemViewForEvent: function(evt) {
1306
+ var responder = this.getPath('pane.rootResponder') ;
1307
+ if (!responder) return null ; // fast path
1308
+
1309
+ var base = SC.guidFor(this) + '-',
1310
+ baseLen = base.length,
1311
+ element = evt.target,
1312
+ layer = this.get('layer'),
1313
+ contentIndex = null,
1314
+ id, itemView, ret ;
1315
+
1316
+ // walk up the element hierarchy until we find this or an element with an
1317
+ // id matching the base guid (i.e. a collection item)
1318
+ while (element && element !== document && element !== layer) {
1319
+ id = element ? SC.$(element).attr('id') : null ;
1320
+ if (id && (contentIndex = this.contentIndexForLayerId(id)) !== null) {
1321
+ break;
1322
+ }
1323
+ element = element.parentNode ;
1324
+ }
1325
+
1326
+ // no matching element found?
1327
+ if (contentIndex===null || (element === layer)) {
1328
+ element = layer = null; // avoid memory leaks
1329
+ return null;
1330
+ }
1331
+
1332
+ // okay, found the DOM node for the view, go ahead and create it
1333
+ // first, find the contentIndex
1334
+ if (contentIndex >= this.get('length')) {
1335
+ throw "layout for item view %@ was found when item view does not exist (%@)".fmt(id, this);
1336
+ }
1337
+
1338
+ return this.itemViewForContentIndex(contentIndex);
1339
+ },
1340
+
1341
+ // ..........................................................
1342
+ // DISCLOSURE SUPPORT
1343
+ //
1344
+
1345
+ /**
1346
+ Expands any items in the passed selection array that have a disclosure
1347
+ state.
1348
+
1349
+ @param {SC.IndexSet} indexes the indexes to expand
1350
+ @returns {SC.CollectionView} receiver
1351
+ */
1352
+ expand: function(indexes) {
1353
+ if (!indexes) return this; // nothing to do
1354
+ var del = this.get('contentDelegate'),
1355
+ content = this.get('content');
1356
+
1357
+ indexes.forEach(function(i) {
1358
+ var state = del.contentIndexDisclosureState(this, content, i);
1359
+ if (state === SC.BRANCH_CLOSED) del.contentIndexExpand(this,content,i);
1360
+ }, this);
1361
+ return this;
1362
+ },
1363
+
1364
+ /**
1365
+ Collapses any items in the passed selection array that have a disclosure
1366
+ state.
1367
+
1368
+ @param {SC.IndexSet} indexes the indexes to expand
1369
+ @returns {SC.CollectionView} receiver
1370
+ */
1371
+ collapse: function(indexes) {
1372
+ if (!indexes) return this; // nothing to do
1373
+ var del = this.get('contentDelegate'),
1374
+ content = this.get('content');
1375
+
1376
+ indexes.forEach(function(i) {
1377
+ var state = del.contentIndexDisclosureState(this, content, i);
1378
+ if (state === SC.BRANCH_OPEN) del.contentIndexCollapse(this,content,i);
1379
+ }, this);
1380
+ return this;
1381
+ },
1382
+
1383
+ // ..........................................................
1384
+ // SELECTION SUPPORT
1385
+ //
1386
+
1387
+ /** @private
1388
+ Called whenever the selection object is changed to a new value. Begins
1389
+ observing the selection for changes.
1390
+ */
1391
+ _cv_selectionDidChange: function() {
1392
+ var sel = this.get('selection'),
1393
+ last = this._cv_selection,
1394
+ func = this._cv_selectionContentDidChange;
1395
+
1396
+ if (sel === last) return; // nothing to do
1397
+ if (last) last.removeObserver('[]', this, func);
1398
+ if (sel) sel.addObserver('[]', this, func);
1399
+
1400
+ this._cv_selection = sel ;
1401
+ this._cv_selectionContentDidChange();
1402
+ }.observes('selection'),
1403
+
1404
+ /** @private
1405
+ Called whenever the selection object or its content changes. This will
1406
+ repaint any items that changed their selection state.
1407
+ */
1408
+ _cv_selectionContentDidChange: function() {
1409
+ var sel = this.get('selection'),
1410
+ last = this._cv_selindexes, // clone of last known indexes
1411
+ content = this.get('content'),
1412
+ diff ;
1413
+
1414
+ // save new last
1415
+ this._cv_selindexes = sel ? sel.frozenCopy() : null;
1416
+
1417
+ // determine which indexes are now invalid
1418
+ if (last) last = last.indexSetForSource(content);
1419
+ if (sel) sel = sel.indexSetForSource(content);
1420
+
1421
+ if (sel && last) diff = sel.without(last).add(last.without(sel));
1422
+ else diff = sel || last;
1423
+
1424
+ if (diff && diff.get('length')>0) this.reloadSelectionIndexes(diff);
1425
+ },
1426
+
1427
+ /** @private
1428
+ Contains the current item views that need their selection to be repainted.
1429
+ This may be either NO, YES, or an IndexSet.
1430
+ */
1431
+ _invalidSelection: NO,
1432
+
1433
+ /**
1434
+ Called whenever the selection changes. The passed index set will contain
1435
+ any affected indexes including those indexes that were previously
1436
+ selected and now should be deselected.
1437
+
1438
+ Pass null to reload the selection state for all items.
1439
+
1440
+ @param {SC.IndexSet} indexes affected indexes
1441
+ @returns {SC.CollectionView} reciever
1442
+ */
1443
+ reloadSelectionIndexes: function(indexes) {
1444
+ var invalid = this._invalidSelection ;
1445
+ if (indexes && (invalid !== YES)) {
1446
+ if (invalid) { invalid.add(indexes) ; }
1447
+ else { invalid = this._invalidSelection = indexes.copy(); }
1448
+
1449
+ } else this._invalidSelection = YES ; // force a total reload
1450
+
1451
+ if (this.get('isVisibleInWindow')) {
1452
+ this.invokeOnce(this.reloadSelectionIndexesIfNeeded);
1453
+ }
1454
+
1455
+ return this ;
1456
+ },
1457
+
1458
+ /**
1459
+ Reloads the selection state if needed on any dirty indexes. Normally this
1460
+ will run once at the end of the runloop, but you can force the item views
1461
+ to reload their selection immediately by calling this method.
1462
+
1463
+ You can also override this method if needed to change the way the
1464
+ selection is reloaded on item views. The default behavior will simply
1465
+ find any item views in the nowShowing range that are affected and
1466
+ modify them.
1467
+
1468
+ @returns {SC.CollectionView} receiver
1469
+ */
1470
+ reloadSelectionIndexesIfNeeded: function() {
1471
+ var invalid = this._invalidSelection;
1472
+ if (!invalid || !this.get('isVisibleInWindow')) return this ;
1473
+
1474
+ var nowShowing = this.get('nowShowing'),
1475
+ reload = this._invalidIndexes,
1476
+ content = this.get('content'),
1477
+ sel = this.get('selection');
1478
+
1479
+ this._invalidSelection = NO; // reset invalid
1480
+
1481
+ // fast path. if we are going to reload everything anyway, just forget
1482
+ // about it. Also if we don't have a nowShowing, nothing to do.
1483
+ if (reload === YES || !nowShowing) return this ;
1484
+
1485
+ // if invalid is YES instead of index set, just reload everything
1486
+ if (invalid === YES) invalid = nowShowing;
1487
+
1488
+ // if we will reload some items anyway, don't bother
1489
+ if (reload && reload.isIndexSet) invalid = invalid.without(reload);
1490
+
1491
+ // iterate through each item and set the isSelected state.
1492
+ invalid.forEach(function(idx) {
1493
+ if (!nowShowing.contains(idx)) return; // not showing
1494
+ var view = this.itemViewForContentIndex(idx, NO);
1495
+ if (view) view.set('isSelected', sel ? sel.contains(content, idx) : NO);
1496
+ },this);
1497
+
1498
+ return this ;
1499
+ },
1500
+
1501
+ /**
1502
+ Selection primitive. Selects the passed IndexSet of items, optionally
1503
+ extending the current selection. If extend is NO or not passed then this
1504
+ will replace the selection with the passed value. Otherwise the indexes
1505
+ will be added to the current selection.
1506
+
1507
+ @param {Number|SC.IndexSet} indexes index or indexes to select
1508
+ @param extend {Boolean} optionally extend the selection
1509
+ @returns {SC.CollectionView} receiver
1510
+ */
1511
+ select: function(indexes, extend) {
1512
+ var content = this.get('content'),
1513
+ del = this.get('selectionDelegate'),
1514
+ groupIndexes = this.get('_contentGroupIndexes'),
1515
+ sel;
1516
+
1517
+ if(!this.get('isSelectable') || !this.get('isEnabled')) return this;
1518
+
1519
+ // normalize
1520
+ if (SC.typeOf(indexes) === SC.T_NUMBER) {
1521
+ indexes = SC.IndexSet.create(indexes, 1);
1522
+ }
1523
+
1524
+ // if we are passed an empty index set or null, clear the selection.
1525
+ if (indexes && indexes.get('length')>0) {
1526
+
1527
+ // first remove any group indexes - these can never be selected
1528
+ if (groupIndexes && groupIndexes.get('length')>0) {
1529
+ indexes = indexes.copy().remove(groupIndexes);
1530
+ }
1531
+
1532
+ // give the delegate a chance to alter the items
1533
+ indexes = del.collectionViewShouldSelectIndexes(this, indexes, extend);
1534
+ if (!indexes || indexes.get('length')===0) return this; // nothing to do
1535
+
1536
+ } else indexes = null;
1537
+
1538
+ // build the selection object, merging if needed
1539
+ if (extend && (sel = this.get('selection'))) sel = sel.copy();
1540
+ else sel = SC.SelectionSet.create();
1541
+
1542
+ if (indexes && indexes.get('length')>0) {
1543
+
1544
+ // when selecting only one item, always select by content
1545
+ if (indexes.get('length')===1) {
1546
+ sel.addObject(content.objectAt(indexes.get('firstObject')));
1547
+
1548
+ // otherwise select an index range
1549
+ } else sel.add(content, indexes);
1550
+
1551
+ }
1552
+
1553
+ // give delegate one last chance
1554
+ sel = del.collectionViewSelectionForProposedSelection(this, sel);
1555
+ if (!sel) sel = SC.SelectionSet.create(); // empty
1556
+
1557
+ // if we're not extending the selection, clear the selection anchor
1558
+ this._selectionAnchor = null ;
1559
+ this.set('selection', sel.freeze()) ;
1560
+ return this;
1561
+ },
1562
+
1563
+ /**
1564
+ Primtive to remove the indexes from the selection.
1565
+
1566
+ @param {Number|SC.IndexSet} indexes index or indexes to deselect
1567
+ @returns {SC.CollectionView} receiver
1568
+ */
1569
+ deselect: function(indexes) {
1570
+ var sel = this.get('selection'),
1571
+ content = this.get('content'),
1572
+ del = this.get('selectionDelegate');
1573
+
1574
+ if(!this.get('isSelectable') || !this.get('isEnabled')) return this;
1575
+ if (!sel || sel.get('length')===0) return this; // nothing to do
1576
+
1577
+ // normalize
1578
+ if (SC.typeOf(indexes) === SC.T_NUMBER) {
1579
+ indexes = SC.IndexSet.create(indexes, 1);
1580
+ }
1581
+
1582
+ // give the delegate a chance to alter the items
1583
+ indexes = del.collectionViewShouldDeselectIndexes(this, indexes) ;
1584
+ if (!indexes || indexes.get('length')===0) return this; // nothing to do
1585
+
1586
+ // now merge change - note we expect sel && indexes to not be null
1587
+ sel = sel.copy().remove(content, indexes);
1588
+ sel = del.collectionViewSelectionForProposedSelection(this, sel);
1589
+ if (!sel) sel = SC.SelectionSet.create(); // empty
1590
+
1591
+ this.set('selection', sel.freeze()) ;
1592
+ return this ;
1593
+ },
1594
+
1595
+ /** @private
1596
+ Finds the next selectable item, up to content length, by asking the
1597
+ delegate. If a non-selectable item is found, the index is skipped. If
1598
+ no item is found, selection index is returned unmodified.
1599
+
1600
+ Return value will always be in the range of the bottom of the current
1601
+ selection index and the proposed index.
1602
+
1603
+ @param {Number} proposedIndex the desired index to select
1604
+ @param {Number} bottom optional bottom of selection use as fallback
1605
+ @returns {Number} next selectable index.
1606
+ */
1607
+ _findNextSelectableItemFromIndex: function(proposedIndex, bottom) {
1608
+ var lim = this.get('length'),
1609
+ range = SC.IndexSet.create(),
1610
+ content = this.get('content'),
1611
+ del = this.get('selectionDelegate'),
1612
+ groupIndexes = this.get('_contentGroupIndexes'),
1613
+ ret, sel ;
1614
+
1615
+ // fast path
1616
+ if (!groupIndexes && (del.collectionViewShouldSelectIndexes === this.collectionViewShouldSelectIndexes)) {
1617
+ return proposedIndex;
1618
+ }
1619
+
1620
+ // loop forwards looking for an index that is allowed by delegate
1621
+ // we could alternatively just pass the whole range but this might be
1622
+ // slow for the delegate
1623
+ while (proposedIndex < lim) {
1624
+ if (!groupIndexes || !groupIndexes.contains(proposedIndex)) {
1625
+ range.add(proposedIndex);
1626
+ ret = del.collectionViewShouldSelectIndexes(this, range);
1627
+ if (ret && ret.get('length') >= 1) return proposedIndex ;
1628
+ range.remove(proposedIndex);
1629
+ }
1630
+ proposedIndex++;
1631
+ }
1632
+
1633
+ // if nothing was found, return top of selection
1634
+ if (bottom === undefined) {
1635
+ sel = this.get('selection');
1636
+ bottom = sel ? sel.get('max') : -1 ;
1637
+ }
1638
+ return bottom ;
1639
+ },
1640
+
1641
+ /** @private
1642
+ Finds the previous selectable item, up to the first item, by asking the
1643
+ delegate. If a non-selectable item is found, the index is skipped. If
1644
+ no item is found, selection index is returned unmodified.
1645
+
1646
+ @param {Integer} proposedIndex the desired index to select
1647
+ @returns {Integer} the previous selectable index. This will always be in the range of the top of the current selection index and the proposed index.
1648
+ */
1649
+ _findPreviousSelectableItemFromIndex: function(proposedIndex, top) {
1650
+ var range = SC.IndexSet.create(),
1651
+ content = this.get('content'),
1652
+ del = this.get('selectionDelegate'),
1653
+ groupIndexes = this.get('_contentGroupIndexes'),
1654
+ ret ;
1655
+
1656
+ if (SC.none(proposedIndex)) proposedIndex = -1;
1657
+
1658
+ // fast path
1659
+ if (!groupIndexes && (del.collectionViewShouldSelectIndexes === this.collectionViewShouldSelectIndexes)) {
1660
+ return proposedIndex;
1661
+ }
1662
+
1663
+ // loop backwards looking for an index that is allowed by delegate
1664
+ // we could alternatively just pass the whole range but this might be
1665
+ // slow for the delegate
1666
+ while (proposedIndex >= 0) {
1667
+ if (!groupIndexes || !groupIndexes.contains(proposedIndex)) {
1668
+ range.add(proposedIndex);
1669
+ ret = del.collectionViewShouldSelectIndexes(this, range);
1670
+ if (ret && ret.get('length') >= 1) return proposedIndex ;
1671
+ range.remove(proposedIndex);
1672
+ }
1673
+ proposedIndex--;
1674
+ }
1675
+
1676
+ // if nothing was found, return top of selection
1677
+ if (top === undefined) {
1678
+ var sel = this.get('selection');
1679
+ top = sel ? sel.get('min') : -1 ;
1680
+ }
1681
+ if (SC.none(top)) top = -1;
1682
+ return top ;
1683
+ },
1684
+
1685
+ /**
1686
+ Select one or more items before the current selection, optionally
1687
+ extending the current selection. Also scrolls the selected item into
1688
+ view.
1689
+
1690
+ Selection does not wrap around.
1691
+
1692
+ @param {Boolean} [extend] If true, the selection will be extended
1693
+ instead of replaced. Defaults to false.
1694
+ @param {Integer} [numberOfItems] The number of previous to be
1695
+ selected. Defaults to 1
1696
+ @returns {SC.CollectionView} receiver
1697
+ */
1698
+ selectPreviousItem: function(extend, numberOfItems) {
1699
+ if (SC.none(numberOfItems)) numberOfItems = 1;
1700
+ if (SC.none(extend)) extend = false;
1701
+
1702
+ var sel = this.get('selection'),
1703
+ content = this.get('content');
1704
+ if (sel) sel = sel.indexSetForSource(content);
1705
+
1706
+ var selTop = sel ? sel.get('min') : -1,
1707
+ selBottom = sel ? sel.get('max')-1 : -1,
1708
+ anchor = this._selectionAnchor;
1709
+ if (SC.none(anchor)) anchor = selTop;
1710
+
1711
+ // if extending, then we need to do some fun stuff to build the array
1712
+ if (extend) {
1713
+
1714
+ // If the selBottom is after the anchor, then reduce the selection
1715
+ if (selBottom > anchor) {
1716
+ selBottom = selBottom - numberOfItems ;
1717
+
1718
+ // otherwise, select the previous item from the top
1719
+ } else {
1720
+ selTop = this._findPreviousSelectableItemFromIndex(selTop - numberOfItems);
1721
+ }
1722
+
1723
+ // Ensure we are not out of bounds
1724
+ if (SC.none(selTop) || (selTop < 0)) selTop = 0 ;
1725
+ if (!content.objectAt(selTop)) selTop = sel ? sel.get('min') : -1;
1726
+ if (selBottom < selTop) selBottom = selTop ;
1727
+
1728
+ // if not extending, just select the item previous to the selTop
1729
+ } else {
1730
+ selTop = this._findPreviousSelectableItemFromIndex(selTop - numberOfItems);
1731
+ if (SC.none(selTop) || (selTop < 0)) selTop = 0 ;
1732
+ if (!content.objectAt(selTop)) selTop = sel ? sel.get('min') : -1;
1733
+ selBottom = selTop ;
1734
+ anchor = null ;
1735
+ }
1736
+
1737
+ var scrollToIndex = selTop ;
1738
+
1739
+ // now build new selection
1740
+ sel = SC.IndexSet.create(selTop, selBottom+1-selTop);
1741
+
1742
+ // ensure that the item is visible and set the selection
1743
+ this.scrollToContentIndex(scrollToIndex) ;
1744
+ this.select(sel) ;
1745
+ this._selectionAnchor = anchor ;
1746
+ return this ;
1747
+ },
1748
+
1749
+ /**
1750
+ Select one or more items following the current selection, optionally
1751
+ extending the current selection. Also scrolls to selected item.
1752
+
1753
+ Selection does not wrap around.
1754
+
1755
+ @param {Boolean} [extend] If true, the selection will be extended
1756
+ instead of replaced. Defaults to false.
1757
+ @param {Integer} [numberOfItems] The number of items to be
1758
+ selected. Defaults to 1.
1759
+ @returns {SC.CollectionView} receiver
1760
+ */
1761
+ selectNextItem: function(extend, numberOfItems) {
1762
+ if (SC.none(numberOfItems)) numberOfItems = 1 ;
1763
+ if (SC.none(extend)) extend = false ;
1764
+
1765
+ var sel = this.get('selection'),
1766
+ content = this.get('content');
1767
+ if (sel) sel = sel.indexSetForSource(content);
1768
+
1769
+ var selTop = sel ? sel.get('min') : -1,
1770
+ selBottom = sel ? sel.get('max')-1 : -1,
1771
+ anchor = this._selectionAnchor,
1772
+ lim = this.get('length');
1773
+
1774
+ if (SC.none(anchor)) anchor = selTop;
1775
+
1776
+ // if extending, then we need to do some fun stuff to build the array
1777
+ if (extend) {
1778
+
1779
+ // If the selTop is before the anchor, then reduce the selection
1780
+ if (selTop < anchor) {
1781
+ selTop = selTop + numberOfItems ;
1782
+
1783
+ // otherwise, select the next item after the bottom
1784
+ } else {
1785
+ selBottom = this._findNextSelectableItemFromIndex(selBottom + numberOfItems, selBottom);
1786
+ }
1787
+
1788
+ // Ensure we are not out of bounds
1789
+ if (selBottom >= lim) selBottom = lim-1;
1790
+
1791
+ // we also need to check that the item exists
1792
+ if (!content.objectAt(selBottom)) selBottom = sel ? sel.get('max') - 1 : -1;
1793
+
1794
+ // and if top has eclipsed bottom, handle that too.
1795
+ if (selTop > selBottom) selTop = selBottom ;
1796
+
1797
+ // if not extending, just select the item next to the selBottom
1798
+ } else {
1799
+ selBottom = this._findNextSelectableItemFromIndex(selBottom + numberOfItems, selBottom);
1800
+
1801
+ if (selBottom >= lim) selBottom = lim-1;
1802
+ if (!content.objectAt(selBottom)) selBottom = sel ? sel.get('max') - 1 : -1;
1803
+ selTop = selBottom ;
1804
+ anchor = null ;
1805
+ }
1806
+
1807
+ var scrollToIndex = selBottom ;
1808
+
1809
+ // now build new selection
1810
+ sel = SC.IndexSet.create(selTop, selBottom-selTop+1);
1811
+
1812
+ // ensure that the item is visible and set the selection
1813
+ this.scrollToContentIndex(scrollToIndex) ;
1814
+ this.select(sel) ;
1815
+ this._selectionAnchor = anchor ;
1816
+ return this ;
1817
+ },
1818
+
1819
+ /**
1820
+ Deletes the selected content if canDeleteContent is YES. This will invoke
1821
+ delegate methods to provide fine-grained control. Returns YES if the
1822
+ deletion was possible, even if none actually occurred.
1823
+
1824
+ @returns {Boolean} YES if deletion is possible.
1825
+ */
1826
+ deleteSelection: function() {
1827
+ // perform some basic checks...
1828
+ if (!this.get('canDeleteContent')) return NO;
1829
+
1830
+ var sel = this.get('selection'),
1831
+ content = this.get('content'),
1832
+ del = this.get('selectionDelegate'),
1833
+ indexes = sel&&content ? sel.indexSetForSource(content) : null;
1834
+
1835
+ if (!content || !indexes || indexes.get('length') === 0) return NO ;
1836
+
1837
+ // let the delegate decide what to actually delete. If this returns an
1838
+ // empty index set or null, just do nothing.
1839
+ indexes = del.collectionViewShouldDeleteIndexes(this, indexes);
1840
+ if (!indexes || indexes.get('length') === 0) return NO ;
1841
+
1842
+ // now have the delegate (or us) perform the deletion. The default
1843
+ // delegate implementation just uses standard SC.Array methods to do the
1844
+ // right thing.
1845
+ del.collectionViewDeleteContent(this, this.get('content'), indexes);
1846
+
1847
+ return YES ;
1848
+ },
1849
+
1850
+ // ..........................................................
1851
+ // SCROLLING
1852
+ //
1853
+
1854
+ /**
1855
+ Scroll the rootElement (if needed) to ensure that the item is visible.
1856
+
1857
+ @param {Number} contentIndex The index of the item to scroll to
1858
+ @returns {SC.CollectionView} receiver
1859
+ */
1860
+ scrollToContentIndex: function(contentIndex) {
1861
+ var itemView = this.itemViewForContentIndex(contentIndex) ;
1862
+ if (itemView) this.scrollToItemView(itemView) ;
1863
+ return this;
1864
+ },
1865
+
1866
+ /**
1867
+ Scroll to the passed item view. If the item view is not visible on screen
1868
+ this method will not work.
1869
+
1870
+ @param {SC.View} view The item view to scroll to
1871
+ @returns {SC.CollectionView} receiver
1872
+ */
1873
+ scrollToItemView: function(view) {
1874
+ if (view) view.scrollToVisible();
1875
+ return this ;
1876
+ },
1877
+
1878
+ // ..........................................................
1879
+ // KEYBOARD EVENTS
1880
+ //
1881
+
1882
+ /** @private */
1883
+ keyDown: function(evt) {
1884
+ var ret = this.interpretKeyEvents(evt) ;
1885
+ return !ret ? NO : ret ;
1886
+ },
1887
+
1888
+ /** @private */
1889
+ keyUp: function() { return true; },
1890
+
1891
+ /** @private
1892
+ Handle space key event. Do action
1893
+ */
1894
+ insertText: function(chr, evt) {
1895
+ if (chr === ' ') {
1896
+ var sel = this.get('selection');
1897
+ if (sel && sel.get('length')>0) {
1898
+ this.invokeLater(this._cv_action, 0, null, evt);
1899
+ }
1900
+ return YES ;
1901
+ } else return NO ;
1902
+ },
1903
+
1904
+ /** @private
1905
+ Handle select all keyboard event.
1906
+ */
1907
+ selectAll: function(evt) {
1908
+ var content = this.get('content'),
1909
+ sel = content ? SC.IndexSet.create(0, content.get('length')) : null;
1910
+ this.select(sel, NO) ;
1911
+ return YES ;
1912
+ },
1913
+
1914
+ /** @private
1915
+ Remove selection of any selected items.
1916
+ */
1917
+ deselectAll: function() {
1918
+ var content = this.get('content'),
1919
+ sel = content ? SC.IndexSet.create(0, content.get('length')) : null;
1920
+ this.deselect(sel, NO) ;
1921
+ return YES ;
1922
+ },
1923
+
1924
+ /** @private
1925
+ Handle delete keyboard event.
1926
+ */
1927
+ deleteBackward: function(evt) {
1928
+ return this.deleteSelection() ;
1929
+ },
1930
+
1931
+ /** @private
1932
+ Handle delete keyboard event.
1933
+ */
1934
+ deleteForward: function(evt) {
1935
+ return this.deleteSelection() ;
1936
+ },
1937
+
1938
+ /** @private
1939
+ Selects the same item on the next row or moves down one if itemsPerRow = 1
1940
+ */
1941
+ moveDown: function(sender, evt) {
1942
+ this.selectNextItem(false, this.get('itemsPerRow') || 1) ;
1943
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
1944
+ return true ;
1945
+ },
1946
+
1947
+ /** @private
1948
+ Selects the same item on the next row or moves up one if itemsPerRow = 1
1949
+ */
1950
+ moveUp: function(sender, evt) {
1951
+ this.selectPreviousItem(false, this.get('itemsPerRow') || 1) ;
1952
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
1953
+ return true ;
1954
+ },
1955
+
1956
+ /** @private
1957
+ Selects the previous item if itemsPerRow > 1. Otherwise does nothing.
1958
+ If item is expandable, will collapse.
1959
+ */
1960
+ moveLeft: function(evt) {
1961
+ // If the control key is down, this may be a browser shortcut and
1962
+ // we should not handle the arrow key.
1963
+ if (evt.ctrlKey || evt.metaKey) return NO;
1964
+
1965
+ if ((this.get('itemsPerRow') || 1) > 1) {
1966
+ this.selectPreviousItem(false, 1);
1967
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
1968
+
1969
+ } else {
1970
+ var sel = this.get('selection'),
1971
+ content = this.get('content'),
1972
+ indexes = sel ? sel.indexSetForSource(content) : null;
1973
+
1974
+ // Collapse the element if it is expanded. However, if there is exactly
1975
+ // one item selected and the item is already collapsed or is a leaf
1976
+ // node, then select the (expanded) parent element instead as a
1977
+ // convenience to the user.
1978
+ if ( indexes ) {
1979
+ var del = undefined, // We'll load it lazily
1980
+ selectParent = false,
1981
+ index = undefined;
1982
+
1983
+ if ( indexes.get('length') === 1 ) {
1984
+ index = indexes.get('firstObject');
1985
+ del = this.get('contentDelegate');
1986
+ var state = del.contentIndexDisclosureState(this, content, index);
1987
+ if (state !== SC.BRANCH_OPEN) selectParent = true;
1988
+ }
1989
+
1990
+ if ( selectParent ) {
1991
+ // TODO: PERFORMANCE: It would be great to have a function like
1992
+ // SC.CollectionView.selectParentItem() or something similar
1993
+ // for performance reasons. But since we don't currently
1994
+ // have such a function, let's just iterate through the
1995
+ // previous items until we find the first one with a outline
1996
+ // level of one less than the selected item.
1997
+ var desiredOutlineLevel = del.contentIndexOutlineLevel(this, content, index) - 1;
1998
+ if ( desiredOutlineLevel >= 0 ) {
1999
+ var parentIndex = -1;
2000
+ while ( parentIndex < 0 ) {
2001
+ var previousItemIndex = this._findPreviousSelectableItemFromIndex(index - 1);
2002
+ if (previousItemIndex < 0 ) return false; // Sanity-check.
2003
+ index = previousItemIndex;
2004
+ var outlineLevel = del.contentIndexOutlineLevel(this, content, index);
2005
+ if ( outlineLevel === desiredOutlineLevel ) {
2006
+ parentIndex = previousItemIndex;
2007
+ }
2008
+ }
2009
+
2010
+ // If we found the parent, select it now.
2011
+ if ( parentIndex !== -1 ) {
2012
+ this.select(index);
2013
+ }
2014
+ }
2015
+ }
2016
+ else {
2017
+ this.collapse(indexes);
2018
+ }
2019
+ }
2020
+ }
2021
+
2022
+ return true ;
2023
+ },
2024
+
2025
+ /** @private
2026
+ Selects the next item if itemsPerRow > 1. Otherwise does nothing.
2027
+ */
2028
+ moveRight: function(evt) {
2029
+ // If the control key is down, this may be a browser shortcut and
2030
+ // we should not handle the arrow key.
2031
+ if (evt.ctrlKey || evt.metaKey) return NO;
2032
+
2033
+ if ((this.get('itemsPerRow') || 1) > 1) {
2034
+ this.selectNextItem(false, 1) ;
2035
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
2036
+ } else {
2037
+ var sel = this.get('selection'),
2038
+ content = this.get('content'),
2039
+ indexes = sel ? sel.indexSetForSource(content) : null;
2040
+ if (indexes) this.expand(indexes);
2041
+ }
2042
+
2043
+ return true ;
2044
+ },
2045
+
2046
+ /** @private */
2047
+ moveDownAndModifySelection: function(sender, evt) {
2048
+ this.selectNextItem(true, this.get('itemsPerRow') || 1) ;
2049
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
2050
+ return true ;
2051
+ },
2052
+
2053
+ /** @private */
2054
+ moveUpAndModifySelection: function(sender, evt) {
2055
+ this.selectPreviousItem(true, this.get('itemsPerRow') || 1) ;
2056
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
2057
+ return true ;
2058
+ },
2059
+
2060
+ /** @private
2061
+ Selects the previous item if itemsPerRow > 1. Otherwise does nothing.
2062
+ */
2063
+ moveLeftAndModifySelection: function(sender, evt) {
2064
+ if ((this.get('itemsPerRow') || 1) > 1) {
2065
+ this.selectPreviousItem(true, 1) ;
2066
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
2067
+ }
2068
+ return true ;
2069
+ },
2070
+
2071
+ /** @private
2072
+ Selects the next item if itemsPerRow > 1. Otherwise does nothing.
2073
+ */
2074
+ moveRightAndModifySelection: function(sender, evt) {
2075
+ if ((this.get('itemsPerRow') || 1) > 1) {
2076
+ this.selectNextItem(true, 1) ;
2077
+ this._cv_performSelectAction(null, evt, this.ACTION_DELAY);
2078
+ }
2079
+ return true ;
2080
+ },
2081
+
2082
+ /** @private
2083
+ if content value is editable and we have one item selected, then edit.
2084
+ otherwise, invoke action.
2085
+ */
2086
+ insertNewline: function(sender, evt) {
2087
+ var canEdit = this.get('isEditable') && this.get('canEditContent'),
2088
+ sel, content, set, idx, itemView;
2089
+
2090
+ // first make sure we have a single item selected; get idx
2091
+ if (canEdit) {
2092
+ sel = this.get('selection') ;
2093
+ content = this.get('content');
2094
+ if (sel && sel.get('length') === 1) {
2095
+ set = sel.indexSetForSource(content);
2096
+ idx = set ? set.get('min') : -1;
2097
+ canEdit = idx>=0;
2098
+ }
2099
+ }
2100
+
2101
+ // next find itemView and ensure it supports editing
2102
+ if (canEdit) {
2103
+ itemView = this.itemViewForContentIndex(idx);
2104
+ canEdit = itemView && SC.typeOf(itemView.beginEditing)===SC.T_FUNCTION;
2105
+ }
2106
+
2107
+ // ok, we can edit..
2108
+ if (canEdit) {
2109
+ this.scrollToContentIndex(idx);
2110
+ itemView = this.itemViewForContentIndex(idx); // just in case
2111
+ itemView.beginEditing();
2112
+
2113
+ // invoke action
2114
+ } else {
2115
+ this.invokeLater(this._cv_action, 0, itemView, null) ;
2116
+ }
2117
+
2118
+ return YES ; // always handle
2119
+ },
2120
+
2121
+ // ..........................................................
2122
+ // MOUSE EVENTS
2123
+ //
2124
+
2125
+ /** @private
2126
+ Handles mouse down events on the collection view or on any of its
2127
+ children.
2128
+
2129
+ The default implementation of this method can handle a wide variety
2130
+ of user behaviors depending on how you have configured the various
2131
+ options for the collection view.
2132
+
2133
+ @param ev {Event} the mouse down event
2134
+ @returns {Boolean} Usually YES.
2135
+ */
2136
+ mouseDown: function(ev) {
2137
+ var itemView = this.itemViewForEvent(ev),
2138
+ content = this.get('content'),
2139
+ contentIndex = itemView ? itemView.get('contentIndex') : -1,
2140
+ info, anchor, sel, isSelected, modifierKeyPressed, didSelect = NO,
2141
+ allowsMultipleSel = content.get('allowsMultipleSelection');
2142
+
2143
+ if (!this.get('isEnabled')) return contentIndex > -1;
2144
+
2145
+ info = this.mouseDownInfo = {
2146
+ event: ev,
2147
+ itemView: itemView,
2148
+ contentIndex: contentIndex,
2149
+ at: Date.now()
2150
+ };
2151
+
2152
+ // become first responder if possible.
2153
+ this.becomeFirstResponder() ;
2154
+
2155
+ // Toggle the selection if selectOnMouseDown is true
2156
+ if (this.get('useToggleSelection')) {
2157
+ if (this.get('selectOnMouseDown')) {
2158
+ if (!itemView) return ; // do nothing when clicked outside of elements
2159
+
2160
+ // determine if item is selected. If so, then go on.
2161
+ sel = this.get('selection') ;
2162
+ isSelected = sel && sel.containsObject(itemView.get('content')) ;
2163
+
2164
+ if (isSelected) {
2165
+ this.deselect(contentIndex);
2166
+ } else if (!allowsMultipleSel) {
2167
+ this.select(contentIndex, NO);
2168
+ didSelect = YES;
2169
+ } else {
2170
+ this.select(contentIndex, YES);
2171
+ didSelect = YES;
2172
+ }
2173
+
2174
+ if (didSelect && this.get('actOnSelect')) {
2175
+ // handle actions on editing
2176
+ this._cv_performSelectAction(itemView, ev);
2177
+ }
2178
+ }
2179
+
2180
+ return YES;
2181
+ }
2182
+
2183
+ // recieved a mouseDown on the collection element, but not on one of the
2184
+ // childItems... unless we do not allow empty selections, set it to empty.
2185
+ if (!itemView) {
2186
+ if (this.get('allowDeselectAll')) this.select(null, false);
2187
+ return YES ;
2188
+ }
2189
+
2190
+ // collection some basic setup info
2191
+ sel = this.get('selection');
2192
+ if (sel) sel = sel.indexSetForSource(content);
2193
+
2194
+ isSelected = sel ? sel.contains(contentIndex) : NO;
2195
+ info.modifierKeyPressed = modifierKeyPressed = ev.ctrlKey || ev.metaKey ;
2196
+
2197
+
2198
+ // holding down a modifier key while clicking a selected item should
2199
+ // deselect that item...deselect and bail.
2200
+ if (modifierKeyPressed && isSelected) {
2201
+ info.shouldDeselect = contentIndex >= 0;
2202
+
2203
+ // if the shiftKey was pressed, then we want to extend the selection
2204
+ // from the last selected item
2205
+ } else if (ev.shiftKey && sel && sel.get('length') > 0 && allowsMultipleSel) {
2206
+ sel = this._findSelectionExtendedByShift(sel, contentIndex);
2207
+ anchor = this._selectionAnchor ;
2208
+ this.select(sel) ;
2209
+ this._selectionAnchor = anchor; //save the anchor
2210
+
2211
+ // If no modifier key was pressed, then clicking on the selected item
2212
+ // should clear the selection and reselect only the clicked on item.
2213
+ } else if (!modifierKeyPressed && isSelected) {
2214
+ info.shouldReselect = contentIndex >= 0;
2215
+
2216
+ // Otherwise, if selecting on mouse down, simply select the clicked on
2217
+ // item, adding it to the current selection if a modifier key was pressed.
2218
+ } else {
2219
+
2220
+ if((ev.shiftKey || modifierKeyPressed) && !allowsMultipleSel){
2221
+ this.select(null, false);
2222
+ }
2223
+
2224
+ if (this.get("selectOnMouseDown")) {
2225
+ this.select(contentIndex, modifierKeyPressed);
2226
+ } else {
2227
+ info.shouldSelect = contentIndex >= 0 ;
2228
+ }
2229
+ }
2230
+
2231
+ // saved for extend by shift ops.
2232
+ info.previousContentIndex = contentIndex;
2233
+
2234
+ return YES;
2235
+ },
2236
+
2237
+ /** @private */
2238
+ mouseUp: function(ev) {
2239
+ var view = this.itemViewForEvent(ev),
2240
+ info = this.mouseDownInfo,
2241
+ content = this.get('content'),
2242
+ contentIndex = view ? view.get('contentIndex') : -1,
2243
+ sel, isSelected, canEdit, itemView, idx,
2244
+ allowsMultipleSel = content.get('allowsMultipleSelection');
2245
+
2246
+ if (!this.get('isEnabled')) return contentIndex > -1;
2247
+
2248
+ if (this.get('useToggleSelection')) {
2249
+ // Return if clicked outside of elements or if toggle was handled by mouseDown
2250
+ if (!view || this.get('selectOnMouseDown')) return NO;
2251
+
2252
+ // determine if item is selected. If so, then go on.
2253
+ sel = this.get('selection') ;
2254
+ isSelected = sel && sel.containsObject(view.get('content')) ;
2255
+
2256
+ if (isSelected) {
2257
+ this.deselect(contentIndex) ;
2258
+ } else if (!allowsMultipleSel) {
2259
+ this.select(contentIndex, NO) ;
2260
+ } else {
2261
+ this.select(contentIndex, YES) ;
2262
+ }
2263
+
2264
+ } else if(info) {
2265
+ idx = info.contentIndex;
2266
+ contentIndex = (view) ? view.get('contentIndex') : -1 ;
2267
+
2268
+ // this will be set if the user simply clicked on an unselected item and
2269
+ // selectOnMouseDown was NO.
2270
+ if (info.shouldSelect) this.select(idx, info.modifierKeyPressed);
2271
+
2272
+ // This is true if the user clicked on a selected item with a modifier
2273
+ // key pressed.
2274
+ if (info.shouldDeselect) this.deselect(idx);
2275
+
2276
+ // This is true if the user clicked on a selected item without a
2277
+ // modifier-key pressed. When this happens we try to begin editing
2278
+ // on the content. If that is not allowed, then simply clear the
2279
+ // selection and reselect the clicked on item.
2280
+ if (info.shouldReselect) {
2281
+
2282
+ // - contentValueIsEditable is true
2283
+ canEdit = this.get('isEditable') && this.get('canEditContent') ;
2284
+
2285
+ // - the user clicked on an item that was already selected
2286
+ // ^ this is the only way shouldReset is set to YES
2287
+
2288
+ // - is the only item selected
2289
+ if (canEdit) {
2290
+ sel = this.get('selection') ;
2291
+ canEdit = sel && (sel.get('length') === 1);
2292
+ }
2293
+
2294
+ // - the item view responds to contentHitTest() and returns YES.
2295
+ // - the item view responds to beginEditing and returns YES.
2296
+ if (canEdit) {
2297
+ itemView = this.itemViewForContentIndex(idx) ;
2298
+ canEdit = itemView && (!itemView.contentHitTest || itemView.contentHitTest(ev)) ;
2299
+ canEdit = (canEdit && itemView.beginEditing) ? itemView.beginEditing() : NO ;
2300
+ }
2301
+
2302
+ // if cannot edit, schedule a reselect (but give doubleClick a chance)
2303
+ if (!canEdit) {
2304
+ if (this._cv_reselectTimer) this._cv_reselectTimer.invalidate() ;
2305
+ this._cv_reselectTimer = this.invokeLater(this.select, 300, idx, false) ;
2306
+ }
2307
+ }
2308
+
2309
+ this._cleanupMouseDown() ;
2310
+ }
2311
+
2312
+ // handle actions on editing
2313
+ this._cv_performSelectAction(view, ev, 0, ev.clickCount);
2314
+
2315
+ return NO; // bubble event to allow didDoubleClick to be called...
2316
+ },
2317
+
2318
+ /** @private */
2319
+ _cleanupMouseDown: function() {
2320
+
2321
+ // delete items explicitly to avoid leaks on IE
2322
+ var info = this.mouseDownInfo, key;
2323
+ if (info) {
2324
+ for(key in info) {
2325
+ if (!info.hasOwnProperty(key)) continue;
2326
+ delete info[key];
2327
+ }
2328
+ }
2329
+ this.mouseDownInfo = null;
2330
+ },
2331
+
2332
+ /** @private */
2333
+ mouseMoved: function(ev) {
2334
+ var view = this.itemViewForEvent(ev),
2335
+ last = this._lastHoveredItem ;
2336
+
2337
+ // handle hover events.
2338
+ if (view !== last) {
2339
+ if (last && last.mouseExited) last.mouseExited(ev);
2340
+ if (view && view.mouseEntered) view.mouseEntered(ev);
2341
+ }
2342
+ this._lastHoveredItem = view ;
2343
+
2344
+ if (view && view.mouseMoved) view.mouseMoved(ev);
2345
+ return YES;
2346
+ },
2347
+
2348
+ /** @private */
2349
+ mouseExited: function(ev) {
2350
+ var view = this._lastHoveredItem ;
2351
+ this._lastHoveredItem = null ;
2352
+ if (view && view.mouseExited) view.mouseExited(ev) ;
2353
+ return YES ;
2354
+ },
2355
+
2356
+ // ..........................................................
2357
+ // TOUCH EVENTS
2358
+ //
2359
+
2360
+ /** @private */
2361
+ touchStart: function(touch, evt) {
2362
+ var itemView = this.itemViewForEvent(touch),
2363
+ contentIndex = itemView ? itemView.get('contentIndex') : -1;
2364
+
2365
+ if (!this.get('isEnabled')) return contentIndex > -1;
2366
+
2367
+ // become first responder if possible.
2368
+ this.becomeFirstResponder() ;
2369
+
2370
+ if (!this.get('useToggleSelection')) {
2371
+ // We're faking the selection visually here
2372
+ // Only track this if we added a selection so we can remove it later
2373
+ if (itemView && !itemView.get('isSelected')) {
2374
+ itemView.set('isSelected', YES);
2375
+ this._touchSelectedView = itemView;
2376
+ } else {
2377
+ this._touchSelectedView = null;
2378
+ }
2379
+ }
2380
+
2381
+ return YES;
2382
+ },
2383
+
2384
+ /** @private */
2385
+ touchesDragged: function(evt, touches) {
2386
+ touches.forEach(function(touch){
2387
+ if (
2388
+ Math.abs(touch.pageX - touch.startX) > 5 ||
2389
+ Math.abs(touch.pageY - touch.startY) > 5
2390
+ ) {
2391
+ // This calls touchCancelled
2392
+ touch.makeTouchResponder(touch.nextTouchResponder);
2393
+ }
2394
+ }, this);
2395
+
2396
+ },
2397
+
2398
+ /** @private */
2399
+ touchEnd: function(touch) {
2400
+ /*
2401
+ TODO [CC] We should be using itemViewForEvent here, but because
2402
+ ListItemView re-renders itself once isSelected is called
2403
+ in touchStart, the elements attached to this event are
2404
+ getting orphaned and this event is basically a complete
2405
+ fail when using touch events.
2406
+ */
2407
+ // var itemView = this.itemViewForEvent(touch),
2408
+ var itemView = this._touchSelectedView,
2409
+ contentIndex = itemView ? itemView.get('contentIndex') : -1,
2410
+ isSelected = NO, sel;
2411
+
2412
+ if (!this.get('isEnabled')) return contentIndex > -1;
2413
+
2414
+ // Remove fake selection in case our contentIndex is -1, a select event will add it back
2415
+ if (itemView) { itemView.set('isSelected', NO); }
2416
+
2417
+ if (contentIndex > -1) {
2418
+ if (this.get('useToggleSelection')) {
2419
+ sel = this.get('selection');
2420
+ isSelected = sel && sel.containsObject(itemView.get('content'));
2421
+ }
2422
+
2423
+ if (isSelected) {
2424
+ this.deselect(contentIndex);
2425
+ } else {
2426
+ this.select(contentIndex, NO);
2427
+
2428
+ // If actOnSelect is implemented, the action will be fired.
2429
+ this._cv_performSelectAction(itemView, touch, 0);
2430
+ }
2431
+ }
2432
+
2433
+ this._touchSelectedView = null;
2434
+ },
2435
+
2436
+ /** @private */
2437
+ touchCancelled: function(evt) {
2438
+ // Remove fake selection
2439
+ if (this._touchSelectedView) {
2440
+ this._touchSelectedView.set('isSelected', NO);
2441
+ this._touchSelectedView = null;
2442
+ }
2443
+ },
2444
+
2445
+ /** @private */
2446
+ _findSelectionExtendedByShift: function(sel, contentIndex) {
2447
+
2448
+ // fast path. if we don't have a selection, just select index
2449
+ if (!sel || sel.get('length')===0) {
2450
+ return SC.IndexSet.create(contentIndex);
2451
+ }
2452
+
2453
+ // if we do have a selection, then figure out how to extend it.
2454
+ var content = this.get('content'),
2455
+ lim = content.get('length')-1,
2456
+ min = sel.get('min'),
2457
+ max = sel.get('max')-1,
2458
+ info = this.mouseDownInfo,
2459
+ anchor = this._selectionAnchor ;
2460
+ if (SC.none(anchor)) anchor = -1;
2461
+
2462
+ // clicked before the current selection set... extend it's beginning...
2463
+ if (contentIndex < min) {
2464
+ min = contentIndex;
2465
+ if (anchor<0) this._selectionAnchor = anchor = max; //anchor at end
2466
+
2467
+ // clicked after the current selection set... extend it's ending...
2468
+ } else if (contentIndex > max) {
2469
+ max = contentIndex;
2470
+ if (anchor<0) this._selectionAnchor = anchor = min; // anchor at start
2471
+
2472
+ // clicked inside the selection set... need to determine where the last
2473
+ // selection was and use that as an anchor.
2474
+ } else if (contentIndex >= min && contentIndex <= max) {
2475
+ if (anchor<0) this._selectionAnchor = anchor = min; //anchor at start
2476
+
2477
+ if (contentIndex === anchor) min = max = contentIndex ;
2478
+ else if (contentIndex > anchor) {
2479
+ min = anchor;
2480
+ max = contentIndex ;
2481
+ } else if (contentIndex < anchor) {
2482
+ min = contentIndex;
2483
+ max = anchor ;
2484
+ }
2485
+ }
2486
+
2487
+ return SC.IndexSet.create(min, max - min + 1);
2488
+ },
2489
+
2490
+ // ......................................
2491
+ // DRAG AND DROP SUPPORT
2492
+ //
2493
+
2494
+ /**
2495
+ When reordering its content, the collection view will store its reorder
2496
+ data using this special data type. The data type is unique to each
2497
+ collection view instance. You can use this data type to detect reorders
2498
+ if necessary.
2499
+
2500
+ @field
2501
+ @type String
2502
+ */
2503
+ reorderDataType: function() {
2504
+ return 'SC.CollectionView.Reorder.'+SC.guidFor(this) ;
2505
+ }.property().cacheable(),
2506
+
2507
+ /**
2508
+ This property is set to the IndexSet of content objects that are the
2509
+ subject of a drag whenever a drag is initiated on the collection view.
2510
+ You can consult this property when implementing your collection view
2511
+ delegate methods, but otherwise you should not use this property in your
2512
+ code.
2513
+
2514
+ @type SC.IndexSet
2515
+ @default null
2516
+ */
2517
+ dragContent: null,
2518
+
2519
+ /**
2520
+ This property is set to the proposed insertion index during a call to
2521
+ collectionViewValidateDragOperation(). Your delegate implementations can
2522
+ change the value of this property to enforce a drop some in some other
2523
+ location.
2524
+
2525
+ @type Number
2526
+ @default null
2527
+ */
2528
+ proposedInsertionIndex: null,
2529
+
2530
+ /**
2531
+ This property is set to the proposed drop operation during a call to
2532
+ collectionViewValidateDragOperation(). Your delegate implementations can
2533
+ change the value of this property to enforce a different type of drop
2534
+ operation.
2535
+
2536
+ @type Number
2537
+ @default null
2538
+ */
2539
+ proposedDropOperation: null,
2540
+
2541
+ /** @private
2542
+ mouseDragged event handler. Initiates a drag if the following conditions
2543
+ are met:
2544
+
2545
+ - collectionViewShouldBeginDrag() returns YES *OR*
2546
+ - the above method is not implemented and canReorderContent is true.
2547
+ - the dragDataTypes property returns a non-empty array
2548
+ - a mouse down event was saved by the mouseDown method.
2549
+ */
2550
+ mouseDragged: function(ev) {
2551
+ var del = this.get('selectionDelegate'),
2552
+ content = this.get('content'),
2553
+ sel = this.get('selection'),
2554
+ info = this.mouseDownInfo,
2555
+ groupIndexes = this.get('_contentGroupIndexes'),
2556
+ dragContent, dragDataTypes, dragView;
2557
+
2558
+ // if the mouse down event was cleared, there is nothing to do; return.
2559
+ if (!info || info.contentIndex<0) return YES ;
2560
+
2561
+ // Don't do anything unless the user has been dragging for 123msec
2562
+ if ((Date.now() - info.at) < 123) return YES ;
2563
+
2564
+ // OK, they must be serious, decide if a drag will be allowed.
2565
+ if (del.collectionViewShouldBeginDrag(this)) {
2566
+
2567
+ // First, get the selection to drag. Drag an array of selected
2568
+ // items appearing in this collection, in the order of the
2569
+ // collection.
2570
+ //
2571
+ // Compute the dragContent - the indexes we will be dragging.
2572
+ // if we don't select on mouse down, then the selection has not been
2573
+ // updated to whatever the user clicked. Instead use
2574
+ // mouse down content.
2575
+ if (!this.get("selectOnMouseDown")) {
2576
+ dragContent = SC.IndexSet.create(info.contentIndex);
2577
+ } else dragContent = sel ? sel.indexSetForSource(content) : null;
2578
+
2579
+ // remove any group indexes. groups cannot be dragged.
2580
+ if (dragContent && groupIndexes && groupIndexes.get('length')>0) {
2581
+ dragContent = dragContent.copy().remove(groupIndexes);
2582
+ if (dragContent.get('length')===0) dragContent = null;
2583
+ else dragContent.freeze();
2584
+ }
2585
+
2586
+ if (!dragContent) return YES; // nothing to drag
2587
+ else dragContent = dragContent.frozenCopy(); // so it doesn't change
2588
+
2589
+ dragContent = { content: content, indexes: dragContent };
2590
+ this.set('dragContent', dragContent) ;
2591
+
2592
+ // Get the set of data types supported by the delegate. If this returns
2593
+ // a null or empty array and reordering content is not also supported
2594
+ // then do not start the drag.
2595
+ dragDataTypes = this.get('dragDataTypes');
2596
+ if (dragDataTypes && dragDataTypes.get('length') > 0) {
2597
+
2598
+ // Build the drag view to use for the ghost drag. This
2599
+ // should essentially contain any visible drag items.
2600
+ dragView = del.collectionViewDragViewFor(this, dragContent.indexes);
2601
+ if (!dragView) dragView = this._cv_dragViewFor(dragContent.indexes);
2602
+
2603
+ // Make sure the dragView has created its layer.
2604
+ dragView.createLayer();
2605
+
2606
+ // Initiate the drag
2607
+ SC.Drag.start({
2608
+ event: info.event,
2609
+ source: this,
2610
+ dragView: dragView,
2611
+ ghost: NO,
2612
+ ghostActsLikeCursor: del.ghostActsLikeCursor,
2613
+ slideBack: YES,
2614
+ dataSource: this
2615
+ });
2616
+
2617
+ // Also use this opportunity to clean up since mouseUp won't
2618
+ // get called.
2619
+ this._cleanupMouseDown() ;
2620
+ this._lastInsertionIndex = null ;
2621
+
2622
+ // Drag was not allowed by the delegate, so bail.
2623
+ } else this.set('dragContent', null) ;
2624
+
2625
+ return YES ;
2626
+ }
2627
+ },
2628
+
2629
+ /** @private
2630
+ Compute a default drag view by grabbing the raw layers and inserting them
2631
+ into a drag view.
2632
+ */
2633
+ _cv_dragViewFor: function(dragContent) {
2634
+ // find only the indexes that are in both dragContent and nowShowing.
2635
+ var indexes = this.get('nowShowing').without(dragContent),
2636
+ dragLayer = this.get('layer').cloneNode(false),
2637
+ view = SC.View.create({ layer: dragLayer, parentView: this }),
2638
+ height=0, layout;
2639
+
2640
+ indexes = this.get('nowShowing').without(indexes);
2641
+
2642
+ // cleanup weird stuff that might make the drag look out of place
2643
+ SC.$(dragLayer).css('backgroundColor', 'transparent')
2644
+ .css('border', 'none')
2645
+ .css('top', 0).css('left', 0);
2646
+
2647
+ indexes.forEach(function(i) {
2648
+ var itemView = this.itemViewForContentIndex(i),
2649
+ isSelected, layer;
2650
+
2651
+ // render item view without isSelected state.
2652
+ if (itemView) {
2653
+ isSelected = itemView.get('isSelected');
2654
+ itemView.set('isSelected', NO);
2655
+
2656
+ itemView.updateLayerIfNeeded();
2657
+ layer = itemView.get('layer');
2658
+ if (layer) layer = layer.cloneNode(true);
2659
+
2660
+ itemView.set('isSelected', isSelected);
2661
+ itemView.updateLayerIfNeeded();
2662
+ }
2663
+
2664
+ if (layer) {
2665
+ dragLayer.appendChild(layer);
2666
+ layout = itemView.get('layout');
2667
+ if(layout.height+layout.top>height){
2668
+ height = layout.height+layout.top;
2669
+ }
2670
+ }
2671
+ layer = null;
2672
+
2673
+ }, this);
2674
+ // we don't want to show the scrollbars, resize the dragview'
2675
+ view.set('layout', {height:height});
2676
+
2677
+ dragLayer = null;
2678
+ return view ;
2679
+ },
2680
+
2681
+
2682
+ /**
2683
+ Implements the drag data source protocol for the collection view. This
2684
+ property will consult the collection view delegate if one is provided. It
2685
+ will also do the right thing if you have set canReorderContent to YES.
2686
+
2687
+ @field
2688
+ @type Array
2689
+ */
2690
+ dragDataTypes: function() {
2691
+ // consult delegate.
2692
+ var del = this.get('selectionDelegate'),
2693
+ ret = del.collectionViewDragDataTypes(this),
2694
+ key ;
2695
+
2696
+ if (this.get('canReorderContent')) {
2697
+ ret = ret ? ret.copy() : [];
2698
+ key = this.get('reorderDataType');
2699
+ if (ret.indexOf(key) < 0) ret.push(key);
2700
+ }
2701
+
2702
+ return ret ? ret : [];
2703
+ }.property(),
2704
+
2705
+ /**
2706
+ Implements the drag data source protocol method. The implementation of
2707
+ this method will consult the collection view delegate if one has been
2708
+ provided. It also respects the canReoderContent method.
2709
+ */
2710
+ dragDataForType: function(drag, dataType) {
2711
+
2712
+ // if this is a reorder, then return drag content.
2713
+ if (this.get('canReorderContent')) {
2714
+ if (dataType === this.get('reorderDataType')) {
2715
+ return this.get('dragContent') ;
2716
+ }
2717
+ }
2718
+
2719
+ // otherwise, just pass along to the delegate
2720
+ var del = this.get('selectionDelegate');
2721
+ return del.collectionViewDragDataForType(this, drag, dataType);
2722
+ },
2723
+
2724
+ /**
2725
+ Implements the SC.DropTarget interface. The default implementation will
2726
+ consult the collection view delegate, if you implement those methods.
2727
+
2728
+ This method is called once when the drag enters the view area. It's
2729
+ return value will be stored on the drag object as allowedDragOperations,
2730
+ possibly further constrained by the drag source.
2731
+
2732
+ @param {SC.Drag} drag the drag object
2733
+ @param {SC.Event} evt the event triggering this change, if available
2734
+ @returns {Number} logical OR'd mask of allowed drag operations.
2735
+ */
2736
+ computeDragOperations: function(drag, evt) {
2737
+ // the proposed drag operation is DRAG_REORDER only if we can reorder
2738
+ // content and the drag contains reorder content.
2739
+ var op = SC.DRAG_NONE,
2740
+ del = this.get('selectionDelegate');
2741
+
2742
+ if (this.get('canReorderContent')) {
2743
+ if (drag.get('dataTypes').indexOf(this.get('reorderDataType')) >= 0) {
2744
+ op = SC.DRAG_REORDER ;
2745
+ }
2746
+ }
2747
+
2748
+ // Now pass this onto the delegate.
2749
+ op = del.collectionViewComputeDragOperations(this, drag, op);
2750
+ if (op & SC.DRAG_REORDER) op = SC.DRAG_MOVE ;
2751
+
2752
+ return op ;
2753
+ },
2754
+
2755
+ /** @private
2756
+ Determines the allowed drop operation insertion point, operation type,
2757
+ and the drag operation to be performed. Used by dragUpdated() and
2758
+ performDragOperation().
2759
+
2760
+ @param {SC.Drag} drag the drag object
2761
+ @param {SC.Event} evt source of this request, if available
2762
+ @param {Number} dragOp allowed drag operation mask
2763
+ Returns three params: [drop index, drop operation, allowed drag ops]
2764
+ */
2765
+ _computeDropOperationState: function(drag, evt, dragOp) {
2766
+ // get the insertion index for this location. This can be computed
2767
+ // by a subclass using whatever method. This method is not expected to
2768
+ // do any data valdidation, just to map the location to an insertion
2769
+ // index.
2770
+ var loc = this.convertFrameFromView(drag.get('location'), null),
2771
+ dropOp = SC.DROP_BEFORE,
2772
+ del = this.get('selectionDelegate'),
2773
+ canReorder = this.get('canReorderContent'),
2774
+ objects, content, isPreviousInDrag, isNextInDrag, len, tmp;
2775
+
2776
+ // STEP 1: Try with a DROP_ON option -- send straight to delegate if
2777
+ // supported by view.
2778
+
2779
+ // get the computed insertion index and possibly drop operation.
2780
+ // prefer to drop ON.
2781
+ var idx = this.insertionIndexForLocation(loc, SC.DROP_ON) ;
2782
+ if (SC.typeOf(idx) === SC.T_ARRAY) {
2783
+ dropOp = idx[1] ; // order matters here
2784
+ idx = idx[0] ;
2785
+ }
2786
+
2787
+ // if the return drop operation is DROP_ON, then just check it with the
2788
+ // delegate method. If the delegate method does not support dropping on,
2789
+ // then it will return DRAG_NONE, in which case we will try again with
2790
+ // drop before.
2791
+ if (dropOp === SC.DROP_ON) {
2792
+
2793
+ // Now save the insertion index and the dropOp. This may be changed by
2794
+ // the collection delegate.
2795
+ this.set('proposedInsertionIndex', idx) ;
2796
+ this.set('proposedDropOperation', dropOp) ;
2797
+ tmp = del.collectionViewValidateDragOperation(this, drag, dragOp, idx, dropOp) ;
2798
+ idx = this.get('proposedInsertionIndex') ;
2799
+ dropOp = this.get('proposedDropOperation') ;
2800
+ this._dropInsertionIndex = this._dropOperation = null ;
2801
+
2802
+ // The delegate is OK with a drop on also, so just return.
2803
+ if (tmp !== SC.DRAG_NONE) return [idx, dropOp, tmp] ;
2804
+
2805
+ // The delegate is NOT OK with a drop on, try to get the insertion
2806
+ // index again, but this time prefer SC.DROP_BEFORE, then let the
2807
+ // rest of the method run...
2808
+ else {
2809
+ dropOp = SC.DROP_BEFORE ;
2810
+ idx = this.insertionIndexForLocation(loc, SC.DROP_BEFORE) ;
2811
+ if (SC.typeOf(idx) === SC.T_ARRAY) {
2812
+ dropOp = idx[1] ; // order matters here
2813
+ idx = idx[0] ;
2814
+ }
2815
+ }
2816
+ }
2817
+
2818
+ // if this is a reorder drag, set the proposed op to SC.DRAG_REORDER and
2819
+ // validate the insertion point. This only works if the insertion point
2820
+ // is DROP_BEFORE or DROP_AFTER. DROP_ON is not handled by reordering
2821
+ // content.
2822
+ if ((idx >= 0) && canReorder && (dropOp !== SC.DROP_ON)) {
2823
+
2824
+ objects = drag.dataForType(this.get('reorderDataType')) ;
2825
+ if (objects) {
2826
+ content = this.get('content') ;
2827
+
2828
+ // if the insertion index is in between two items in the drag itself,
2829
+ // then this is not allowed. Either use the last insertion index or
2830
+ // find the first index that is not in between selections. Stop when
2831
+ // we get to the beginning.
2832
+ if (dropOp === SC.DROP_BEFORE) {
2833
+ isPreviousInDrag = objects.indexes.contains(idx-1);
2834
+ isNextInDrag = objects.indexes.contains(idx);
2835
+ } else {
2836
+ isPreviousInDrag = objects.indexes.contains(idx);
2837
+ isNextInDrag = objects.indexes.contains(idx-1);
2838
+ }
2839
+
2840
+ if (isPreviousInDrag && isNextInDrag) {
2841
+ if (SC.none(this._lastInsertionIndex)) {
2842
+ if (dropOp === SC.DROP_BEFORE) {
2843
+ while ((idx >= 0) && objects.indexes.contains(idx)) idx--;
2844
+ } else {
2845
+ len = content ? content.get('length') : 0;
2846
+ while ((idx < len) && objects.indexes.contains(idx)) idx++;
2847
+ }
2848
+ } else idx = this._lastInsertionIndex ;
2849
+ }
2850
+
2851
+ // If we found a valid insertion point to reorder at, then set the op
2852
+ // to custom DRAG_REORDER.
2853
+ if (idx >= 0) dragOp = SC.DRAG_REORDER ;
2854
+ }
2855
+ }
2856
+
2857
+ // Now save the insertion index and the dropOp. This may be changed by
2858
+ // the collection delegate.
2859
+ this.set('proposedInsertionIndex', idx) ;
2860
+ this.set('proposedDropOperation', dropOp) ;
2861
+ dragOp = del.collectionViewValidateDragOperation(this, drag, dragOp, idx, dropOp) ;
2862
+ idx = this.get('proposedInsertionIndex') ;
2863
+ dropOp = this.get('proposedDropOperation') ;
2864
+ this._dropInsertionIndex = this._dropOperation = null ;
2865
+
2866
+ // return generated state
2867
+ return [idx, dropOp, dragOp] ;
2868
+ },
2869
+
2870
+ /**
2871
+ Implements the SC.DropTarget interface. The default implementation will
2872
+ determine the drop location and then consult the collection view delegate
2873
+ if you implement those methods. Otherwise it will handle reordering
2874
+ content on its own.
2875
+
2876
+ @param {SC.Drag} drag The drag that was updated
2877
+ @param {SC.Event} evt The event for the drag
2878
+ */
2879
+ dragUpdated: function(drag, evt) {
2880
+ var op = drag.get('allowedDragOperations'),
2881
+ state = this._computeDropOperationState(drag, evt, op),
2882
+ idx = state[0], dropOp = state[1], dragOp = state[2];
2883
+
2884
+ // if the insertion index or dropOp have changed, update the insertion
2885
+ // point
2886
+ if (dragOp !== SC.DRAG_NONE) {
2887
+ if ((this._lastInsertionIndex !== idx) || (this._lastDropOperation !== dropOp)) {
2888
+ var itemView = this.itemViewForContentIndex(idx) ;
2889
+ this.showInsertionPoint(itemView, dropOp) ;
2890
+ }
2891
+
2892
+ this._lastInsertionIndex = idx ;
2893
+ this._lastDropOperation = dropOp ;
2894
+ } else {
2895
+ this.hideInsertionPoint() ;
2896
+ this._lastInsertionIndex = this._lastDropOperation = null ;
2897
+ }
2898
+
2899
+ // Normalize drag operation to the standard kinds accepted by the drag
2900
+ // system.
2901
+ return (dragOp & SC.DRAG_REORDER) ? SC.DRAG_MOVE : dragOp;
2902
+ },
2903
+
2904
+ /**
2905
+ Implements the SC.DropTarget protocol. Hides any visible insertion
2906
+ point and clears some cached values.
2907
+ */
2908
+ dragExited: function() {
2909
+ this.hideInsertionPoint() ;
2910
+ this._lastInsertionIndex = this._lastDropOperation = null ;
2911
+ },
2912
+
2913
+ /**
2914
+ Implements the SC.DropTarget protocol.
2915
+
2916
+ @returns {Boolean} YES
2917
+ */
2918
+ acceptDragOperation: function(drag, op) {
2919
+ return YES;
2920
+ },
2921
+
2922
+ /**
2923
+ Implements the SC.DropTarget protocol. Consults the collection view
2924
+ delegate to actually perform the operation unless the operation is
2925
+ reordering content.
2926
+
2927
+ @param {SC.Drag} drag The drag to perform the operation on
2928
+ @param {Number} op The drag operation to perform
2929
+ @return {Number} The operation performed
2930
+ */
2931
+ performDragOperation: function(drag, op) {
2932
+ // Get the correct insertion point, drop operation, etc.
2933
+ var state = this._computeDropOperationState(drag, null, op),
2934
+ idx = state[0], dropOp = state[1], dragOp = state[2],
2935
+ del = this.get('selectionDelegate'),
2936
+ performed, objects, data, content, shift, indexes;
2937
+
2938
+ // The dragOp is the kinds of ops allowed. The drag operation must
2939
+ // be included in that set.
2940
+ if (dragOp & SC.DRAG_REORDER) {
2941
+ op = (op & SC.DRAG_MOVE) ? SC.DRAG_REORDER : SC.DRAG_NONE ;
2942
+ } else op = op & dragOp ;
2943
+
2944
+ // If no allowed drag operation could be found, just return.
2945
+ if (op === SC.DRAG_NONE) return op;
2946
+
2947
+ // Some operation is allowed through, give the delegate a chance to
2948
+ // handle it.
2949
+ performed = del.collectionViewPerformDragOperation(this, drag, op, idx, dropOp) ;
2950
+
2951
+ // If the delegate did not handle the drag (i.e. returned SC.DRAG_NONE),
2952
+ // and the op type is REORDER, then do the reorder here.
2953
+ if ((performed === SC.DRAG_NONE) && (op & SC.DRAG_REORDER)) {
2954
+
2955
+ data = drag.dataForType(this.get('reorderDataType')) ;
2956
+ if (!data) return SC.DRAG_NONE ;
2957
+
2958
+ content = this.get('content') ;
2959
+
2960
+ // check for special case - inserting BEFORE ourself...
2961
+ // in this case just pretend the move happened since it's a no-op
2962
+ // anyway
2963
+ indexes = data.indexes;
2964
+ if (indexes.get('length')===1) {
2965
+ if (((dropOp === SC.DROP_BEFORE) || (dropOp === SC.DROP_AFTER)) &&
2966
+ (indexes.get('min')===idx)) return SC.DRAG_MOVE;
2967
+ }
2968
+
2969
+ content.beginPropertyChanges(); // suspend notifications
2970
+
2971
+ // get each object, then remove it from the content. they will be
2972
+ // added again later.
2973
+ objects = [];
2974
+ shift = 0;
2975
+ data.indexes.forEach(function(i) {
2976
+ objects.push(content.objectAt(i-shift));
2977
+ content.removeAt(i-shift);
2978
+ shift++;
2979
+ if (i < idx) idx--;
2980
+ }, this);
2981
+
2982
+ // now insert objects into new insertion locaiton
2983
+ if (dropOp === SC.DROP_AFTER) idx++;
2984
+ content.replace(idx, 0, objects, dropOp);
2985
+ this.select(SC.IndexSet.create(idx, objects.length));
2986
+ content.endPropertyChanges(); // restart notifications
2987
+
2988
+ // make the op into its actual value
2989
+ op = SC.DRAG_MOVE ;
2990
+ }
2991
+
2992
+ return op;
2993
+ },
2994
+
2995
+ /**
2996
+ Default delegate method implementation, returns YES if canReorderContent
2997
+ is also true.
2998
+
2999
+ @param {SC.View} view
3000
+ */
3001
+ collectionViewShouldBeginDrag: function(view) {
3002
+ return this.get('canReorderContent');
3003
+ },
3004
+
3005
+
3006
+ // ..........................................................
3007
+ // INSERTION POINT
3008
+ //
3009
+
3010
+
3011
+ /**
3012
+ Get the preferred insertion point for the given location, including
3013
+ an insertion preference of before, after or on the named index.
3014
+
3015
+ You can implement this method in a subclass if you like to perform a
3016
+ more efficient check. The default implementation will loop through the
3017
+ item views looking for the first view to "switch sides" in the orientation
3018
+ you specify.
3019
+
3020
+ This method should return an array with two values. The first value is
3021
+ the insertion point index and the second value is the drop operation,
3022
+ which should be one of SC.DROP_BEFORE, SC.DROP_AFTER, or SC.DROP_ON.
3023
+
3024
+ The preferred drop operation passed in should be used as a hint as to
3025
+ the type of operation the view would prefer to receive. If the
3026
+ dropOperation is SC.DROP_ON, then you should return a DROP_ON mode if
3027
+ possible. Otherwise, you should never return DROP_ON.
3028
+
3029
+ For compatibility, you can also return just the insertion index. If you
3030
+ do this, then the collction view will assume the drop operation is
3031
+ SC.DROP_BEFORE.
3032
+
3033
+ If an insertion is NOT allowed, you should return -1 as the insertion
3034
+ point. In this case, the drop operation will be ignored.
3035
+
3036
+ @param {Point} loc the mouse location.
3037
+ @param {DropOp} dropOperation the preferred drop operation.
3038
+ @returns {Array} format: [index, op]
3039
+ */
3040
+ insertionIndexForLocation: function(loc, dropOperation) {
3041
+ return -1;
3042
+ },
3043
+
3044
+ // ..........................................................
3045
+ // INTERNAL SUPPORT
3046
+ //
3047
+
3048
+ /** @private - when we become visible, reload if needed. */
3049
+ _cv_isVisibleInWindowDidChange: function() {
3050
+ if (this.get('isVisibleInWindow')) {
3051
+ if (this._invalidIndexes) this.invokeOnce(this.reloadIfNeeded);
3052
+ if (this._invalidSelection) {
3053
+ this.invokeOnce(this.reloadSelectionIndexesIfNeeded);
3054
+ }
3055
+ }
3056
+ }.observes('isVisibleInWindow'),
3057
+
3058
+
3059
+ /**
3060
+ Default delegate method implementation, returns YES if isSelectable
3061
+ is also true.
3062
+ */
3063
+ collectionViewShouldSelectItem: function(view, item) {
3064
+ return this.get('isSelectable') ;
3065
+ },
3066
+
3067
+ /** @private */
3068
+ _TMP_DIFF1: SC.IndexSet.create(),
3069
+
3070
+ /** @private */
3071
+ _TMP_DIFF2: SC.IndexSet.create(),
3072
+
3073
+ /** @private
3074
+
3075
+ Whenever the nowShowing range changes, update the range observer on the
3076
+ content item and instruct the view to reload any indexes that are not in
3077
+ the previous nowShowing range.
3078
+
3079
+ */
3080
+ _cv_nowShowingDidChange: function() {
3081
+ var nowShowing = this.get('nowShowing'),
3082
+ last = this._sccv_lastNowShowing,
3083
+ diff, diff1, diff2;
3084
+
3085
+ // find the differences between the two
3086
+ // NOTE: reuse a TMP IndexSet object to avoid creating lots of objects
3087
+ // during scrolling
3088
+ if (last !== nowShowing) {
3089
+ if (last && nowShowing) {
3090
+ diff1 = this._TMP_DIFF1.add(last).remove(nowShowing);
3091
+ diff2 = this._TMP_DIFF2.add(nowShowing).remove(last);
3092
+ diff = diff1.add(diff2);
3093
+ } else diff = last || nowShowing ;
3094
+ }
3095
+
3096
+ // if nowShowing has actually changed, then update
3097
+ if (diff && diff.get('length') > 0) {
3098
+ this._sccv_lastNowShowing = nowShowing ? nowShowing.frozenCopy() : null;
3099
+ this.updateContentRangeObserver();
3100
+ this.reload(diff);
3101
+ }
3102
+
3103
+ // cleanup tmp objects
3104
+ if (diff1) diff1.clear();
3105
+ if (diff2) diff2.clear();
3106
+
3107
+ }.observes('nowShowing'),
3108
+
3109
+ /** @private */
3110
+ init: function() {
3111
+ sc_super();
3112
+ if (this.useFastPath) this.mixin(SC.CollectionFastPath);
3113
+ if (this.get('canReorderContent')) this._cv_canReorderContentDidChange();
3114
+ this._sccv_lastNowShowing = this.get('nowShowing').clone();
3115
+ if (this.content) this._cv_contentDidChange();
3116
+ if (this.selection) this._cv_selectionDidChange();
3117
+ },
3118
+
3119
+ /** @private
3120
+ Become a drop target whenever reordering content is enabled.
3121
+ */
3122
+ _cv_canReorderContentDidChange: function() {
3123
+ if (this.get('canReorderContent')) {
3124
+ if (!this.get('isDropTarget')) this.set('isDropTarget', YES);
3125
+ SC.Drag.addDropTarget(this);
3126
+ }
3127
+ }.observes('canReorderContent'),
3128
+
3129
+ /** @private
3130
+ Fires an action after a selection if enabled.
3131
+
3132
+ if actOnSelect is YES, then try to invoke the action, passing the
3133
+ current selection (saved as a separate array so that a change in sel
3134
+ in the meantime will not be lost)
3135
+ */
3136
+ _cv_performSelectAction: function(view, ev, delay, clickCount) {
3137
+ var sel;
3138
+ if (delay === undefined) delay = 0 ;
3139
+ if (clickCount === undefined) clickCount = 1;
3140
+ if ((clickCount>1) || this.get('actOnSelect')) {
3141
+ if (this._cv_reselectTimer) this._cv_reselectTimer.invalidate() ;
3142
+ sel = this.get('selection');
3143
+ sel = sel ? sel.toArray() : [];
3144
+ if (this._cv_actionTimer) this._cv_actionTimer.invalidate();
3145
+ this._cv_actionTimer = this.invokeLater(this._cv_action, delay, view, ev, sel) ;
3146
+ }
3147
+ },
3148
+
3149
+ /** @private
3150
+ Perform the action. Supports legacy behavior as well as newer style
3151
+ action dispatch.
3152
+ */
3153
+ _cv_action: function(view, evt, context) {
3154
+ var action = this.get('action');
3155
+ var target = this.get('target') || null;
3156
+
3157
+ this._cv_actionTimer = null;
3158
+ if (action) {
3159
+ // if the action is a function, just call it
3160
+ if (SC.typeOf(action) === SC.T_FUNCTION) return this.action(view, evt) ;
3161
+
3162
+ // otherwise, use the new sendAction style
3163
+ var pane = this.get('pane') ;
3164
+ if (pane) {
3165
+ pane.rootResponder.sendAction(action, target, this, pane, context);
3166
+ }
3167
+ // SC.app.sendAction(action, target, this) ;
3168
+
3169
+ // if no action is specified, then trigger the support action,
3170
+ // if supported.
3171
+ } else if (!view) {
3172
+ return ; // nothing to do
3173
+
3174
+ // if the target view has its own internal action handler,
3175
+ // trigger that.
3176
+ } else if (SC.typeOf(view._action) == SC.T_FUNCTION) {
3177
+ return view._action(evt) ;
3178
+
3179
+ // otherwise call the action method to support older styles.
3180
+ } else if (SC.typeOf(view.action) == SC.T_FUNCTION) {
3181
+ return view.action(evt) ;
3182
+ }
3183
+ }
3184
+
3185
+
3186
+ });