sproutcore 1.4.5 → 1.5.0.pre.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (792) hide show
  1. data/CHANGELOG +35 -0
  2. data/VERSION.yml +2 -2
  3. data/lib/Buildfile +13 -4
  4. data/lib/buildtasks/build.rake +20 -17
  5. data/lib/buildtasks/manifest.rake +143 -78
  6. data/lib/buildtasks/target.rake +1 -0
  7. data/lib/doc_templates/sproutcore/index.tmpl +18 -4
  8. data/lib/doc_templates/sproutcore/publish.js +1 -1
  9. data/lib/frameworks/sproutcore/Buildfile +24 -13
  10. data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
  11. data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
  12. data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
  13. data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
  14. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
  15. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
  16. data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
  17. data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
  18. data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
  19. data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
  20. data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
  21. data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
  22. data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
  23. data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
  24. data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
  25. data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
  26. data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
  27. data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
  28. data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
  29. data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
  30. data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
  31. data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
  32. data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
  33. data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
  34. data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
  35. data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
  36. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
  37. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +144 -0
  38. data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
  39. data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
  40. data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
  41. data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
  42. data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
  43. data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
  44. data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
  45. data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
  46. data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
  47. data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
  48. data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
  49. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
  50. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
  51. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
  52. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
  53. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
  54. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
  55. data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
  56. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
  57. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
  58. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
  59. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
  60. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
  61. data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
  62. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
  63. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
  64. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
  65. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
  66. data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
  67. data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
  68. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
  69. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
  70. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
  71. data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
  72. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
  73. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
  74. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
  75. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
  76. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
  77. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
  78. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
  79. data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
  80. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
  81. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
  82. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
  83. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
  84. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
  85. data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
  86. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
  87. data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
  88. data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
  89. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
  90. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
  91. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
  92. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
  93. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
  94. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
  95. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
  96. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
  97. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
  98. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
  99. data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
  100. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
  101. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
  102. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
  103. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
  104. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
  105. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
  106. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
  107. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
  108. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
  109. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
  110. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
  111. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
  112. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
  113. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
  114. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
  115. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
  116. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
  117. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
  118. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
  119. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
  120. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
  121. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
  122. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
  123. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
  124. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
  125. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
  126. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
  127. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
  128. data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
  129. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
  130. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
  131. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
  132. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
  133. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
  134. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
  135. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
  136. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
  137. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
  138. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
  139. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
  140. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
  141. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
  142. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
  143. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
  144. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
  145. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
  146. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
  147. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
  148. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
  149. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
  150. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
  151. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
  152. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
  153. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
  154. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
  155. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
  156. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
  157. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
  158. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
  159. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
  160. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
  161. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
  162. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
  163. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
  164. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
  165. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
  166. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
  167. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
  168. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
  169. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
  170. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
  171. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
  172. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
  173. data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
  174. data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
  175. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
  176. data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
  177. data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
  178. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
  179. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
  180. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
  181. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
  182. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
  183. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
  184. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
  185. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
  186. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
  187. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
  188. data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
  189. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
  190. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
  191. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
  192. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
  193. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
  194. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
  195. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
  196. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
  197. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
  198. data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
  199. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
  200. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
  201. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
  202. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
  203. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
  204. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
  205. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
  206. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
  207. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
  208. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
  209. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
  210. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
  211. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
  212. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
  213. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
  214. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
  215. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -0
  216. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
  217. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
  218. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +29 -0
  219. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
  220. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
  221. data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
  222. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
  223. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
  224. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
  225. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
  226. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
  227. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
  228. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
  229. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
  230. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
  231. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
  232. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
  233. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
  234. data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
  235. data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
  236. data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
  237. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
  238. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
  239. data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
  240. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
  241. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
  242. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
  243. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
  244. data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
  245. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
  246. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
  247. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
  248. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
  249. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
  250. data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
  251. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
  252. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
  253. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
  254. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
  255. data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
  256. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
  257. data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
  258. data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
  259. data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
  260. data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
  261. data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
  262. data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
  263. data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
  264. data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
  265. data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
  266. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
  267. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
  268. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
  269. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
  270. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
  271. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
  272. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
  273. data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
  274. data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
  275. data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
  276. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
  277. data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
  278. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
  279. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
  280. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
  281. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
  282. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -2
  283. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
  284. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
  285. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
  286. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
  287. data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
  288. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
  289. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
  290. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
  291. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
  292. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
  293. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
  294. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
  295. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
  296. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
  297. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
  298. data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
  299. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
  300. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
  301. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
  302. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
  303. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
  304. data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
  305. data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
  306. data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
  307. data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
  308. data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
  309. data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
  310. data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
  311. data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
  312. data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
  313. data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
  314. data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
  315. data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
  316. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
  317. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
  318. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
  319. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
  320. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
  321. data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
  322. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
  323. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
  324. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
  325. data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
  326. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
  327. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
  328. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
  329. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
  330. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
  331. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
  332. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
  333. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
  334. data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
  335. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
  336. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
  337. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
  338. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
  339. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
  340. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
  341. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
  342. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
  343. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
  344. data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
  345. data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
  346. data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
  347. data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
  348. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
  349. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
  350. data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
  351. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
  352. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
  353. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
  354. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
  355. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
  356. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
  357. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
  358. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
  359. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
  360. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
  361. data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
  362. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
  363. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
  364. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
  365. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
  366. data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
  367. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
  368. data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
  369. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
  370. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
  371. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
  372. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
  373. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
  374. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
  375. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
  376. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
  377. data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
  378. data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
  379. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
  380. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
  381. data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
  382. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
  383. data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
  384. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
  385. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
  386. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
  387. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
  388. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
  389. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
  390. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
  391. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
  392. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
  393. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
  394. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
  395. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
  396. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
  397. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
  398. data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
  399. data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
  400. data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
  401. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
  402. data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
  403. data/lib/frameworks/sproutcore/license.js +31 -30
  404. data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
  405. data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
  406. data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
  407. data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
  408. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
  409. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
  410. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
  411. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
  412. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
  413. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
  414. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
  415. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
  416. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
  417. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
  418. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
  419. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
  420. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
  421. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
  422. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
  423. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
  424. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
  425. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
  426. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
  427. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
  428. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
  429. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
  430. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
  431. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
  432. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
  433. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
  434. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
  435. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
  436. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
  437. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
  438. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
  439. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
  440. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
  441. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
  442. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
  443. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
  444. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
  445. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
  446. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
  447. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
  448. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
  449. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
  450. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
  451. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
  452. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
  453. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
  454. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
  455. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
  456. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
  457. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
  458. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
  459. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
  460. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
  461. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
  462. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
  463. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
  464. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
  465. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
  466. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
  467. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
  468. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
  469. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
  470. data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
  471. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
  472. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
  473. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
  474. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
  475. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
  476. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
  477. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
  478. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
  479. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
  480. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
  481. data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
  482. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
  483. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
  484. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
  485. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
  486. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
  487. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
  488. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
  489. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
  490. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
  491. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
  492. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
  493. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
  494. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
  495. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
  496. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
  497. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
  498. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
  499. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
  500. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
  501. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
  502. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
  503. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
  504. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
  505. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
  506. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
  507. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
  508. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
  509. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
  510. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
  511. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
  512. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
  513. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
  514. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
  515. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
  516. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
  517. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
  518. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
  519. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
  520. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
  521. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
  522. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
  523. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
  524. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
  525. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
  526. data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
  527. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
  528. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
  529. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
  530. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
  531. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
  532. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
  533. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
  534. data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
  535. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
  536. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +27 -0
  537. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
  538. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
  539. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
  540. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
  541. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
  542. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
  543. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +84 -0
  544. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
  545. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
  546. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
  547. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
  548. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
  549. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
  550. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
  551. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
  552. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
  553. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
  554. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
  555. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +66 -0
  556. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
  557. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
  558. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
  559. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
  560. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
  561. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
  562. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
  563. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +34 -0
  564. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
  565. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
  566. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
  567. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +28 -0
  568. data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -0
  569. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
  570. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
  571. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
  572. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +84 -0
  573. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
  574. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
  575. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
  576. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
  577. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
  578. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
  579. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
  580. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
  581. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
  582. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
  583. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
  584. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +66 -0
  585. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
  586. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
  587. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
  588. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
  589. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
  590. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
  591. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
  592. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
  593. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
  594. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
  595. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
  596. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
  597. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
  598. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
  599. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
  600. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
  601. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
  602. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
  603. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
  604. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
  605. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
  606. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
  607. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
  608. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
  609. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
  610. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
  611. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
  612. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
  613. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
  614. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
  615. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
  616. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
  617. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
  618. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
  619. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
  620. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
  621. data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
  622. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
  623. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
  624. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
  625. data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
  626. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +76 -0
  627. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
  628. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
  629. data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
  630. data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
  631. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
  632. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.js +20 -0
  633. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
  634. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
  635. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
  636. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
  637. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
  638. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
  639. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
  640. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
  641. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
  642. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
  643. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
  644. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
  645. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
  646. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
  647. data/lib/frameworks/sproutcore/themes/ace/resources/progress/progress.js +78 -0
  648. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -0
  649. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
  650. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
  651. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
  652. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
  653. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
  654. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
  655. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
  656. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
  657. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
  658. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
  659. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
  660. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
  661. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
  662. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
  663. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
  664. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
  665. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
  666. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
  667. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
  668. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
  669. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
  670. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
  671. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
  672. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
  673. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
  674. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
  675. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
  676. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
  677. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
  678. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
  679. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
  680. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
  681. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
  682. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
  683. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
  684. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
  685. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +79 -0
  686. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
  687. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
  688. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
  689. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
  690. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
  691. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
  692. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
  693. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
  694. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
  695. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
  696. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +3 -0
  697. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
  698. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
  699. data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -0
  700. data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
  701. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
  702. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
  703. data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +8 -0
  704. data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
  705. data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
  706. data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
  707. data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
  708. data/lib/sproutcore.rb +9 -2
  709. data/lib/sproutcore/builders.rb +2 -1
  710. data/lib/sproutcore/builders/base.rb +7 -2
  711. data/lib/sproutcore/builders/combine.rb +49 -1
  712. data/lib/sproutcore/builders/html.rb +2 -0
  713. data/lib/sproutcore/builders/javascript.rb +1 -1
  714. data/lib/sproutcore/builders/minify.rb +12 -12
  715. data/lib/sproutcore/builders/module.rb +72 -0
  716. data/lib/sproutcore/builders/string_wrapper.rb +43 -0
  717. data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
  718. data/lib/sproutcore/helpers/static_helper.rb +13 -9
  719. data/lib/sproutcore/models/manifest_entry.rb +2 -2
  720. data/lib/sproutcore/models/target.rb +25 -11
  721. data/lib/sproutcore/rack/dev.rb +3 -3
  722. data/lib/sproutcore/tools.rb +51 -2
  723. data/lib/sproutcore/tools/build.rb +35 -7
  724. data/lib/sproutcore/version.rb +1 -0
  725. data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
  726. data/spec/fixtures/builder_tests/Buildfile +2 -2
  727. data/spec/lib/builders/bundle_spec.rb +8 -8
  728. data/spec/lib/builders/strings_spec.rb +1 -0
  729. data/sproutcore.gemspec +9 -2
  730. data/vendor/chance/.gitignore +5 -0
  731. data/vendor/chance/Gemfile +4 -0
  732. data/vendor/chance/Rakefile +2 -0
  733. data/vendor/chance/bin/chance +72 -0
  734. data/vendor/chance/chance.gemspec +28 -0
  735. data/vendor/chance/lib/chance.rb +139 -0
  736. data/vendor/chance/lib/chance/imager.rb +13 -0
  737. data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
  738. data/vendor/chance/lib/chance/importer.rb +64 -0
  739. data/vendor/chance/lib/chance/instance.rb +225 -0
  740. data/vendor/chance/lib/chance/parser.rb +831 -0
  741. data/vendor/chance/lib/chance/perf.rb +17 -0
  742. data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
  743. data/vendor/chance/lib/chance/slicing.rb +104 -0
  744. data/vendor/chance/lib/chance/version.rb +3 -0
  745. data/vendor/chance/test/case/abc.png +0 -0
  746. data/vendor/chance/test/case/more/abc.png +0 -0
  747. data/vendor/chance/test/case/more/another.css +4 -0
  748. data/vendor/chance/test/case/test1.css +22 -0
  749. data/vendor/chance/test/case/test2.css +6 -0
  750. data/vendor/sproutcore/SCCompiler.jar +0 -0
  751. data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
  752. data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
  753. data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
  754. data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
  755. data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
  756. data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
  757. data/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar} +0 -0
  758. data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
  759. data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
  760. data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
  761. data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
  762. data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
  763. data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
  764. data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
  765. data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
  766. data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
  767. data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
  768. metadata +686 -177
  769. data/lib/frameworks/sproutcore/CHANGELOG +0 -93
  770. data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
  771. data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
  772. data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
  773. data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
  774. data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
  775. data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
  776. data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
  777. data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
  778. data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
  779. data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
  780. data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
  781. data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
  782. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
  783. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
  784. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
  785. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
  786. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +0 -25
  787. data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
  788. data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
  789. data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
  790. data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
  791. data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
  792. data/lib/sproutcore/builders/bundle.rb +0 -63
@@ -7,16 +7,16 @@
7
7
 
8
8
  /**
9
9
  @class
10
-
11
- An object that iterates over all of the values in an object.
12
-
13
- An instance of this object is returned everytime you call the
10
+
11
+ An object that iterates over all of the values in an object.
12
+
13
+ An instance of this object is returned everytime you call the
14
14
  enumerator() method on an object that implements the SC.Enumerable mixin.
15
-
15
+
16
16
  Once you create an enumerator instance, you can call nextObject() on it
17
17
  until you can iterated through the entire collection. Once you have
18
18
  exhausted the enumerator, you can reuse it if you want by calling reset().
19
-
19
+
20
20
  @since SproutCore 1.0
21
21
  */
22
22
  SC.Enumerator = function(enumerableObject) {
@@ -26,33 +26,33 @@ SC.Enumerator = function(enumerableObject) {
26
26
  } ;
27
27
 
28
28
  SC.Enumerator.prototype = {
29
-
30
- /**
29
+
30
+ /**
31
31
  Returns the next object in the enumeration or undefined when complete.
32
-
32
+
33
33
  @returns {Object} the next object or undefined
34
34
  */
35
35
  nextObject: function() {
36
36
  var index = this._index ;
37
37
  var len = this._length;
38
38
  if (index >= len) return undefined ; // nothing to do
39
-
39
+
40
40
  // get the value
41
41
  var ret = this.enumerable.nextObject(index, this._previousObject, this._context) ;
42
42
  this._previousObject = ret ;
43
43
  this._index = index + 1 ;
44
-
44
+
45
45
  if (index >= len) {
46
- this._context = SC.Enumerator._pushContext(this._context);
46
+ this._context = SC.Enumerator._pushContext(this._context);
47
47
  }
48
-
48
+
49
49
  return ret ;
50
50
  },
51
-
51
+
52
52
  /**
53
53
  Resets the enumerator to the beginning. This is a nice way to reuse
54
- an existing enumerator.
55
-
54
+ an existing enumerator.
55
+
56
56
  @returns {Object} this
57
57
  */
58
58
  reset: function() {
@@ -64,18 +64,18 @@ SC.Enumerator.prototype = {
64
64
  this._previousObject = null ;
65
65
  this._context = (len > 0) ? SC.Enumerator._popContext() : null;
66
66
  },
67
-
67
+
68
68
  /**
69
69
  Releases the enumerators enumerable object. You cannot use this object
70
- anymore. This is not often needed but it is useful when you need to
70
+ anymore. This is not often needed but it is useful when you need to
71
71
  make sure memory gets cleared.
72
-
73
- @returns {Object} null
72
+
73
+ @returns {Object} null
74
74
  */
75
75
  destroy: function() {
76
76
  this.enumerable = this._length = this._index = this._previousObject = this._context = null;
77
77
  }
78
-
78
+
79
79
  } ;
80
80
 
81
81
  /**
@@ -103,5 +103,5 @@ SC.Enumerator._pushContext = function(context) {
103
103
  var cache = this._contextCache;
104
104
  cache.push(context);
105
105
  return null ;
106
- };
106
+ };
107
107
 
@@ -7,71 +7,71 @@
7
7
 
8
8
  /**
9
9
  @class
10
-
10
+
11
11
  An error, used to represent an error state.
12
-
12
+
13
13
  Many API's within SproutCore will return an instance of this object whenever
14
14
  they have an error occur. An error includes an error code, description,
15
- and optional human readable label that indicates the item that failed.
16
-
15
+ and optional human readable label that indicates the item that failed.
16
+
17
17
  Depending on the error, other properties may also be added to the object
18
18
  to help you recover from the failure.
19
-
19
+
20
20
  You can pass error objects to various UI elements to display the error in
21
- the interface. You can easily determine if the value returned by some API is
21
+ the interface. You can easily determine if the value returned by some API is
22
22
  an error or not using the helper SC.ok(value).
23
-
23
+
24
24
  h2. Faking Error Objects
25
-
25
+
26
26
  You can actually make any object you want to be treated like an Error object
27
- by simply implementing two properties: isError and errorValue. If you
27
+ by simply implementing two properties: isError and errorValue. If you
28
28
  set isError to YES, then calling SC.ok(obj) on your object will return NO.
29
- If isError is YES, then SC.val(obj) will return your errorValue property
29
+ If isError is YES, then SC.val(obj) will return your errorValue property
30
30
  instead of the receiver.
31
-
31
+
32
32
  @extends SC.Object
33
33
  @since SproutCore 1.0
34
34
  */
35
35
  SC.Error = SC.Object.extend(
36
36
  /** @scope SC.Error.prototype */ {
37
-
37
+
38
38
  /**
39
39
  error code. Used to designate the error type.
40
-
40
+
41
41
  @property {Number}
42
42
  */
43
43
  code: -1,
44
-
44
+
45
45
  /**
46
46
  Human readable description of the error. This can also be a non-localized
47
47
  key.
48
-
48
+
49
49
  @property {String}
50
50
  */
51
51
  message: '',
52
-
52
+
53
53
  /**
54
54
  The value the error represents. This is used when wrapping a value inside
55
55
  of an error to represent the validation failure.
56
-
56
+
57
57
  @property {Object}
58
58
  */
59
59
  errorValue: null,
60
-
60
+
61
61
  /**
62
- The original error object. Normally this will return the receiver.
62
+ The original error object. Normally this will return the receiver.
63
63
  However, sometimes another object will masquarade as an error; this gives
64
64
  you a way to get at the underyling error.
65
-
65
+
66
66
  @property {SC.Error}
67
67
  */
68
68
  errorObject: function() {
69
69
  return this;
70
70
  }.property().cacheable(),
71
-
71
+
72
72
  /**
73
73
  Human readable name of the item with the error.
74
-
74
+
75
75
  @property {String}
76
76
  */
77
77
  label: null,
@@ -80,10 +80,10 @@ SC.Error = SC.Object.extend(
80
80
  toString: function() {
81
81
  return "SC.Error:%@:%@ (%@)".fmt(SC.guidFor(this), this.get('message'), this.get('code'));
82
82
  },
83
-
83
+
84
84
  /**
85
85
  Walk like a duck.
86
-
86
+
87
87
  @property {Boolean}
88
88
  */
89
89
  isError: YES
@@ -92,7 +92,7 @@ SC.Error = SC.Object.extend(
92
92
  /**
93
93
  Creates a new SC.Error instance with the passed description, label, and
94
94
  code. All parameters are optional.
95
-
95
+
96
96
  @param description {String} human readable description of the error
97
97
  @param label {String} human readable name of the item with the error
98
98
  @param code {Number} an error code to use for testing.
@@ -114,13 +114,13 @@ SC.Error.desc = function(description, label, value, code) {
114
114
  @param code {Number} an error code to use for testing.
115
115
  @returns {SC.Error} new error instance.
116
116
  */
117
- SC.$error = function(description, label, value, c) {
118
- return SC.Error.desc(description,label, value, c);
117
+ SC.$error = function(description, label, value, c) {
118
+ return SC.Error.desc(description,label, value, c);
119
119
  } ;
120
120
 
121
121
  /**
122
122
  Returns YES if the passed value is an error object or false.
123
-
123
+
124
124
  @param {Object} ret object value
125
125
  @returns {Boolean}
126
126
  */
@@ -134,9 +134,9 @@ SC.$ok = SC.ok;
134
134
  /**
135
135
  Returns the value of an object. If the passed object is an error, returns
136
136
  the value associated with the error; otherwise returns the receiver itself.
137
-
137
+
138
138
  @param {Object} obj the object
139
- @returns {Object} value
139
+ @returns {Object} value
140
140
  */
141
141
  SC.val = function(obj) {
142
142
  if (obj && obj.isError) {
@@ -151,7 +151,7 @@ SC.$val = SC.val;
151
151
 
152
152
  /**
153
153
  Standard error code for errors that do not support multiple values.
154
-
154
+
155
155
  @property {Number}
156
156
  */
157
157
  SC.Error.HAS_MULTIPLE_VALUES = -100 ;
@@ -11,26 +11,26 @@ sc_require('mixins/freezable');
11
11
  sc_require('mixins/copyable');
12
12
 
13
13
  /**
14
- @class
14
+ @class
15
15
 
16
16
  A collection of ranges. You can use an IndexSet to keep track of non-
17
- continuous ranges of items in a parent array. IndexSet's are used for
17
+ continuous ranges of items in a parent array. IndexSet's are used for
18
18
  selection, for managing invalidation ranges and other data-propogation.
19
19
 
20
20
  h2. Examples
21
-
21
+
22
22
  {{{
23
23
  var set = SC.IndexSet.create(ranges) ;
24
24
  set.contains(index);
25
25
  set.add(index, length);
26
26
  set.remove(index, length);
27
-
27
+
28
28
  // uses a backing SC.Array object to return each index
29
29
  set.forEach(function(object) { .. })
30
-
30
+
31
31
  // returns the index
32
32
  set.forEachIndex(function(index) { ... });
33
-
33
+
34
34
  // returns ranges
35
35
  set.forEachRange(function(start, length) { .. });
36
36
  }}}
@@ -39,16 +39,16 @@ sc_require('mixins/copyable');
39
39
 
40
40
  An IndexSet stores indices on the object. A positive value great than the
41
41
  index tells you the end of an occupied range. A negative values tells you
42
- the end of an empty range. A value less than the index is a search
42
+ the end of an empty range. A value less than the index is a search
43
43
  accelerator. It tells you the start of the nearest range.
44
44
 
45
- @extends SC.Enumerable
45
+ @extends SC.Enumerable
46
46
  @extends SC.Observable
47
47
  @extends SC.Copyable
48
48
  @extends SC.Freezable
49
49
  @since SproutCore 1.0
50
50
  */
51
- SC.IndexSet = SC.mixin({},
51
+ SC.IndexSet = SC.mixin({},
52
52
  SC.Enumerable, SC.Observable, SC.Freezable, SC.Copyable,
53
53
  /** @scope SC.IndexSet.prototype */ {
54
54
 
@@ -68,24 +68,24 @@ SC.IndexSet = SC.mixin({},
68
68
  this._hint(0, cur, ret); // hints are not copied manually - add them
69
69
  return ret ;
70
70
  },
71
-
71
+
72
72
  /**
73
73
  To create a set, pass either a start and index or another IndexSet.
74
-
74
+
75
75
  @returns {SC.IndexSet}
76
76
  */
77
- create: function(start, length) {
77
+ create: function(start, length) {
78
78
  var ret = SC.beget(this);
79
79
  ret.initObservable();
80
80
  ret.registerDependentKey('min', '[]');
81
-
81
+
82
82
  // optimized method to clone an index set.
83
83
  if (start && start.isIndexSet) {
84
84
  ret._content = this._sc_sliceContent(start._content);
85
85
  ret.max = start.max;
86
- ret.length = start.length;
86
+ ret.length = start.length;
87
87
  ret.source = start.source ;
88
-
88
+
89
89
  // otherwise just do a regular add
90
90
  } else {
91
91
  ret._content = [0];
@@ -96,71 +96,71 @@ SC.IndexSet = SC.mixin({},
96
96
 
97
97
  /**
98
98
  Walk like a duck.
99
-
99
+
100
100
  @property {Boolean}
101
101
  */
102
102
  isIndexSet: YES,
103
103
 
104
- /** @private
104
+ /** @private
105
105
  Internal setting determines the preferred skip size for hinting sets.
106
-
106
+
107
107
  @property {Number}
108
108
  */
109
109
  HINT_SIZE: 256,
110
-
110
+
111
111
  /**
112
112
  Total number of indexes contained in the set
113
113
 
114
114
  @property {Number}
115
115
  */
116
116
  length: 0,
117
-
117
+
118
118
  /**
119
- One greater than the largest index currently stored in the set. This
119
+ One greater than the largest index currently stored in the set. This
120
120
  is sometimes useful when determining the total range of items covering
121
121
  the index set.
122
-
122
+
123
123
  @property {Number}
124
124
  */
125
125
  max: 0,
126
-
126
+
127
127
  /**
128
128
  The first index included in the set or -1.
129
-
129
+
130
130
  @property {Number}
131
131
  */
132
- min: function() {
133
- var content = this._content,
132
+ min: function() {
133
+ var content = this._content,
134
134
  cur = content[0];
135
135
  return (cur === 0) ? -1 : (cur>0) ? 0 : Math.abs(cur);
136
-
136
+
137
137
  }.property('[]').cacheable(),
138
-
138
+
139
139
  /**
140
140
  Returns the first index in the set .
141
-
141
+
142
142
  @property {Number}
143
143
  */
144
144
  firstObject: function() {
145
- return (this.get('length')>0) ? this.get('min') : undefined;
145
+ return (this.get('length')>0) ? this.get('min') : undefined;
146
146
  }.property(),
147
-
148
- /**
149
- Returns the starting index of the nearest range for the specified
147
+
148
+ /**
149
+ Returns the starting index of the nearest range for the specified
150
150
  index.
151
-
151
+
152
152
  @param {Number} index
153
153
  @returns {Number} starting index
154
154
  */
155
- rangeStartForIndex: function(index) {
155
+ rangeStartForIndex: function(index) {
156
156
  var content = this._content,
157
157
  max = this.get('max'),
158
158
  ret, next, accel;
159
-
159
+
160
160
  // fast cases
161
161
  if (index >= max) return max ;
162
162
  if (Math.abs(content[index]) > index) return index ; // we hit a border
163
-
163
+
164
164
  // use accelerator to find nearest content range
165
165
  accel = index - (index % SC.IndexSet.HINT_SIZE);
166
166
  ret = content[accel];
@@ -175,16 +175,16 @@ SC.IndexSet = SC.mixin({},
175
175
  }
176
176
  return ret ;
177
177
  },
178
-
178
+
179
179
  /**
180
- Returns YES if the passed index set contains the exact same indexes as
180
+ Returns YES if the passed index set contains the exact same indexes as
181
181
  the receiver. If you pass any object other than an index set, returns NO.
182
-
182
+
183
183
  @param {Object} obj another object.
184
184
  @returns {Boolean}
185
185
  */
186
186
  isEqual: function(obj) {
187
-
187
+
188
188
  // optimize for some special cases
189
189
  if (obj === this) return YES ;
190
190
  if (!obj || !obj.isIndexSet || (obj.max !== this.max) || (obj.length !== this.length)) return NO;
@@ -194,7 +194,7 @@ SC.IndexSet = SC.mixin({},
194
194
  rcontent = obj._content,
195
195
  cur = 0,
196
196
  next = lcontent[cur];
197
-
197
+
198
198
  do {
199
199
  if (rcontent[cur] !== next) return NO ;
200
200
  cur = Math.abs(next) ;
@@ -202,20 +202,20 @@ SC.IndexSet = SC.mixin({},
202
202
  } while (cur !== 0);
203
203
  return YES ;
204
204
  },
205
-
205
+
206
206
  /**
207
- Returns the first index in the set before the passed index or null if
207
+ Returns the first index in the set before the passed index or null if
208
208
  there are no previous indexes in the set.
209
-
209
+
210
210
  @param {Number} index index to check
211
211
  @returns {Number} index or -1
212
212
  */
213
213
  indexBefore: function(index) {
214
-
214
+
215
215
  if (index===0) return -1; // fast path
216
216
  index--; // start with previous index
217
-
218
- var content = this._content,
217
+
218
+ var content = this._content,
219
219
  max = this.get('max'),
220
220
  start = this.rangeStartForIndex(index);
221
221
  if (!content) return null;
@@ -226,14 +226,14 @@ SC.IndexSet = SC.mixin({},
226
226
  index = start -1 ;
227
227
  start = this.rangeStartForIndex(index);
228
228
  }
229
-
229
+
230
230
  return index;
231
231
  },
232
232
 
233
233
  /**
234
- Returns the first index in the set after the passed index or null if
234
+ Returns the first index in the set after the passed index or null if
235
235
  there are no additional indexes in the set.
236
-
236
+
237
237
  @param {Number} index index to check
238
238
  @returns {Number} index or -1
239
239
  */
@@ -243,7 +243,7 @@ SC.IndexSet = SC.mixin({},
243
243
  start, next ;
244
244
  if (!content || (index>=max)) return -1; // fast path
245
245
  index++; // start with next index
246
-
246
+
247
247
 
248
248
  // loop forwards until we find a range that is in the set.
249
249
  start = this.rangeStartForIndex(index);
@@ -253,27 +253,27 @@ SC.IndexSet = SC.mixin({},
253
253
  index = start = Math.abs(next);
254
254
  next = content[start];
255
255
  }
256
-
256
+
257
257
  return index;
258
258
  },
259
-
259
+
260
260
  /**
261
261
  Returns YES if the index set contains the named index
262
-
262
+
263
263
  @param {Number} start index or range
264
264
  @param {Number} length optional range length
265
265
  @returns {Boolean}
266
266
  */
267
267
  contains: function(start, length) {
268
268
  var content, cur, next, rstart, rnext;
269
-
269
+
270
270
  // normalize input
271
- if (length === undefined) {
271
+ if (length === undefined) {
272
272
  if (start === null || start === undefined) return NO ;
273
-
273
+
274
274
  if (typeof start === SC.T_NUMBER) {
275
275
  length = 1 ;
276
-
276
+
277
277
  // if passed an index set, check each receiver range
278
278
  } else if (start && start.isIndexSet) {
279
279
  if (start === this) return YES ; // optimization
@@ -287,35 +287,35 @@ SC.IndexSet = SC.mixin({},
287
287
  next = content[cur];
288
288
  }
289
289
  return YES ;
290
-
290
+
291
291
  } else {
292
- length = start.length;
292
+ length = start.length;
293
293
  start = start.start;
294
294
  }
295
295
  }
296
-
296
+
297
297
  rstart = this.rangeStartForIndex(start);
298
298
  rnext = this._content[rstart];
299
-
299
+
300
300
  return (rnext>0) && (rstart <= start) && (rnext >= (start+length));
301
301
  },
302
302
 
303
303
  /**
304
304
  Returns YES if the index set contains any of the passed indexes. You
305
305
  can pass a single index, a range or an index set.
306
-
306
+
307
307
  @param {Number} start index, range, or IndexSet
308
308
  @param {Number} length optional range length
309
309
  @returns {Boolean}
310
310
  */
311
311
  intersects: function(start, length) {
312
312
  var content, cur, next, lim;
313
-
313
+
314
314
  // normalize input
315
- if (length === undefined) {
315
+ if (length === undefined) {
316
316
  if (typeof start === SC.T_NUMBER) {
317
317
  length = 1 ;
318
-
318
+
319
319
  // if passed an index set, check each receiver range
320
320
  } else if (start && start.isIndexSet) {
321
321
  if (start === this) return YES ; // optimization
@@ -329,13 +329,13 @@ SC.IndexSet = SC.mixin({},
329
329
  next = content[cur];
330
330
  }
331
331
  return NO ;
332
-
332
+
333
333
  } else {
334
- length = start.length;
334
+ length = start.length;
335
335
  start = start.start;
336
336
  }
337
337
  }
338
-
338
+
339
339
  cur = this.rangeStartForIndex(start);
340
340
  content = this._content;
341
341
  next = content[cur];
@@ -352,7 +352,7 @@ SC.IndexSet = SC.mixin({},
352
352
  /**
353
353
  Returns a new IndexSet without the passed range or indexes. This is a
354
354
  convenience over simply cloning and removing. Does some optimizations.
355
-
355
+
356
356
  @param {Number} start index, range, or IndexSet
357
357
  @param {Number} length optional range length
358
358
  @returns {SC.IndexSet} new index set
@@ -361,17 +361,17 @@ SC.IndexSet = SC.mixin({},
361
361
  if (start === this) return SC.IndexSet.create(); // just need empty set
362
362
  return this.clone().remove(start, length);
363
363
  },
364
-
364
+
365
365
  /**
366
366
  Replace the index set's current content with the passed index set. This
367
367
  is faster than clearing the index set adding the values again.
368
-
368
+
369
369
  @param {Number} start index, Range, or another IndexSet
370
- @param {Number} length optional length of range.
370
+ @param {Number} length optional length of range.
371
371
  @returns {SC.IndexSet} receiver
372
372
  */
373
373
  replace: function(start, length) {
374
-
374
+
375
375
  if (length === undefined) {
376
376
  if (typeof start === SC.T_NUMBER) {
377
377
  length = 1 ;
@@ -384,39 +384,39 @@ SC.IndexSet = SC.mixin({},
384
384
  .enumerableContentDidChange()
385
385
  .endPropertyChanges();
386
386
  return this ;
387
-
387
+
388
388
  } else {
389
389
  length = start.length;
390
390
  start = start.start;
391
391
  }
392
392
  }
393
-
393
+
394
394
  var oldlen = this.length;
395
395
  this._content.length=1;
396
396
  this._content[0] = 0;
397
397
  this.length = this.max = 0 ; // reset without notifying since add()
398
398
  return this.add(start, length);
399
399
  },
400
-
400
+
401
401
  /**
402
402
  Adds the specified range of indexes to the set. You can also pass another
403
403
  IndexSet to union the contents of the index set with the receiver.
404
-
404
+
405
405
  @param {Number} start index, Range, or another IndexSet
406
- @param {Number} length optional length of range.
406
+ @param {Number} length optional length of range.
407
407
  @returns {SC.IndexSet} receiver
408
408
  */
409
409
  add: function(start, length) {
410
-
410
+
411
411
  if (this.isFrozen) throw SC.FROZEN_ERROR;
412
-
412
+
413
413
  var content, cur, next;
414
414
 
415
415
  // normalize IndexSet input
416
416
  if (start && start.isIndexSet) {
417
-
417
+
418
418
  content = start._content;
419
-
419
+
420
420
  if (!content) return this; // nothing to do
421
421
 
422
422
  cur = 0 ;
@@ -427,42 +427,42 @@ SC.IndexSet = SC.mixin({},
427
427
  next = content[cur];
428
428
  }
429
429
  return this ;
430
-
431
- } else if (length === undefined) {
432
-
430
+
431
+ } else if (length === undefined) {
432
+
433
433
  if (start === null || start === undefined) {
434
434
  return this; // nothing to do
435
435
  } else if (typeof start === SC.T_NUMBER) {
436
436
  length = 1 ;
437
437
  } else {
438
- length = start.length;
438
+ length = start.length;
439
439
  start = start.start;
440
440
  }
441
441
  } else if (length === null) length = 1 ;
442
442
 
443
443
  // if no length - do nothing.
444
444
  if (length <= 0) return this;
445
-
445
+
446
446
  // special case - appending to end of set
447
447
  var max = this.get('max'),
448
448
  oldmax = max,
449
449
  delta, value ;
450
450
 
451
451
  content = this._content ;
452
-
452
+
453
453
  if (start === max) {
454
454
 
455
455
  // if adding to the end and the end is in set, merge.
456
456
  if (start > 0) {
457
457
  cur = this.rangeStartForIndex(start-1);
458
458
  next = content[cur];
459
-
459
+
460
460
  // just extend range at end
461
- if (next > 0) {
461
+ if (next > 0) {
462
462
  delete content[max]; // no 0
463
463
  content[cur] = max = start + length ;
464
464
  start = cur ;
465
-
465
+
466
466
  // previous range was not in set, just tack onto the end
467
467
  } else {
468
468
  content[max] = max = start + length;
@@ -470,23 +470,23 @@ SC.IndexSet = SC.mixin({},
470
470
  } else {
471
471
  content[start] = max = length;
472
472
  }
473
-
473
+
474
474
  content[max] = 0 ;
475
475
  this.set('max', max);
476
476
  this.set('length', this.length + length) ;
477
477
  length = max - start ;
478
-
478
+
479
479
  } else if (start > max) {
480
480
  content[max] = 0-start; // empty!
481
481
  content[start] = start+length ;
482
482
  content[start+length] = 0; // set end
483
483
  this.set('max', start + length) ;
484
484
  this.set('length', this.length + length) ;
485
-
485
+
486
486
  // affected range goes from starting range to end of content.
487
487
  length = start + length - max ;
488
488
  start = max ;
489
-
489
+
490
490
  // otherwise, merge into existing range
491
491
  } else {
492
492
 
@@ -502,17 +502,17 @@ SC.IndexSet = SC.mixin({},
502
502
  cur = this.rangeStartForIndex(start-1);
503
503
  next = content[cur] ;
504
504
  }
505
-
505
+
506
506
  // previous range is not in set. splice it here
507
- if (next < 0) {
507
+ if (next < 0) {
508
508
  content[cur] = 0-start ;
509
-
509
+
510
510
  // if previous range extends beyond this range, splice afterwards also
511
511
  if (Math.abs(next) > max) {
512
512
  content[start] = 0-max;
513
513
  content[max] = next ;
514
514
  } else content[start] = next;
515
-
515
+
516
516
  // previous range is in set. merge the ranges
517
517
  } else {
518
518
  start = cur ;
@@ -521,7 +521,7 @@ SC.IndexSet = SC.mixin({},
521
521
  max = next ;
522
522
  }
523
523
  }
524
-
524
+
525
525
  // at this point there should be clean starting point for the range.
526
526
  // just walk the ranges, adding up the length delta and then removing
527
527
  // the range until we find a range that passes last
@@ -541,7 +541,7 @@ SC.IndexSet = SC.mixin({},
541
541
  next = max ;
542
542
  }
543
543
 
544
- // ok, cur range is entirely inside top range.
544
+ // ok, cur range is entirely inside top range.
545
545
  // add to delta if needed
546
546
  if (value < 0) delta += next - cur ;
547
547
  }
@@ -549,11 +549,11 @@ SC.IndexSet = SC.mixin({},
549
549
  delete content[cur] ; // and remove range
550
550
  cur = next;
551
551
  }
552
-
552
+
553
553
  // cur should always === last now. if the following range is in set,
554
554
  // merge in also - don't adjust delta because these aren't new indexes
555
555
  if ((cur = content[max]) > 0) {
556
- delete content[max];
556
+ delete content[max];
557
557
  max = cur ;
558
558
  }
559
559
 
@@ -563,11 +563,11 @@ SC.IndexSet = SC.mixin({},
563
563
 
564
564
  // adjust length
565
565
  this.set('length', this.get('length') + delta);
566
-
566
+
567
567
  // compute hint range
568
568
  length = max - start ;
569
569
  }
570
-
570
+
571
571
  this._hint(start, length);
572
572
  if (delta !== 0) this.enumerableContentDidChange();
573
573
  return this;
@@ -575,36 +575,36 @@ SC.IndexSet = SC.mixin({},
575
575
 
576
576
  /**
577
577
  Removes the specified range of indexes from the set
578
-
578
+
579
579
  @param {Number} start index, Range, or IndexSet
580
- @param {Number} length optional length of range.
580
+ @param {Number} length optional length of range.
581
581
  @returns {SC.IndexSet} receiver
582
582
  */
583
583
  remove: function(start, length) {
584
584
 
585
585
  if (this.isFrozen) throw SC.FROZEN_ERROR;
586
-
586
+
587
587
  // normalize input
588
- if (length === undefined) {
588
+ if (length === undefined) {
589
589
  if (start === null || start === undefined) {
590
590
  return this; // nothing to do
591
591
 
592
592
  } else if (typeof start === SC.T_NUMBER) {
593
593
  length = 1 ;
594
-
594
+
595
595
  // if passed an index set, just add each range in the index set.
596
596
  } else if (start.isIndexSet) {
597
597
  start.forEachRange(this.remove, this);
598
598
  return this;
599
599
 
600
600
  } else {
601
- length = start.length;
601
+ length = start.length;
602
602
  start = start.start;
603
603
  }
604
604
  }
605
605
 
606
606
  if (length <= 0) return this; // nothing to do
607
-
607
+
608
608
  // special case - appending to end of set
609
609
  var max = this.get('max'),
610
610
  oldmax = max,
@@ -626,17 +626,17 @@ SC.IndexSet = SC.mixin({},
626
626
  cur = this.rangeStartForIndex(start-1);
627
627
  next = content[cur] ;
628
628
  }
629
-
629
+
630
630
  // previous range is in set. splice it here
631
- if (next > 0) {
631
+ if (next > 0) {
632
632
  content[cur] = start ;
633
-
633
+
634
634
  // if previous range extends beyond this range, splice afterwards also
635
635
  if (next > last) {
636
636
  content[start] = last;
637
637
  content[last] = next ;
638
638
  } else content[start] = next;
639
-
639
+
640
640
  // previous range is not in set. merge the ranges
641
641
  } else {
642
642
  start = cur ;
@@ -645,7 +645,7 @@ SC.IndexSet = SC.mixin({},
645
645
  last = next ;
646
646
  }
647
647
  }
648
-
648
+
649
649
  // at this point there should be clean starting point for the range.
650
650
  // just walk the ranges, adding up the length delta and then removing
651
651
  // the range until we find a range that passes last
@@ -665,7 +665,7 @@ SC.IndexSet = SC.mixin({},
665
665
  next = last ;
666
666
  }
667
667
 
668
- // ok, cur range is entirely inside top range.
668
+ // ok, cur range is entirely inside top range.
669
669
  // add to delta if needed
670
670
  if (value > 0) delta += next - cur ;
671
671
  }
@@ -673,11 +673,11 @@ SC.IndexSet = SC.mixin({},
673
673
  delete content[cur] ; // and remove range
674
674
  cur = next;
675
675
  }
676
-
676
+
677
677
  // cur should always === last now. if the following range is not in set,
678
678
  // merge in also - don't adjust delta because these aren't new indexes
679
679
  if ((cur = content[last]) < 0) {
680
- delete content[last];
680
+ delete content[last];
681
681
  last = Math.abs(cur) ;
682
682
  }
683
683
 
@@ -686,42 +686,42 @@ SC.IndexSet = SC.mixin({},
686
686
  delete content[last];
687
687
  content[start] = 0 ;
688
688
  this.set('max', start); //max has changed
689
-
689
+
690
690
  } else {
691
691
  content[start] = 0-last ;
692
692
  }
693
693
 
694
694
  // adjust length
695
695
  this.set('length', this.get('length') - delta);
696
-
696
+
697
697
  // compute hint range
698
698
  length = last - start ;
699
-
699
+
700
700
  this._hint(start, length);
701
701
  if (delta !== 0) this.enumerableContentDidChange();
702
702
  return this;
703
703
  },
704
-
705
- /** @private
706
- iterates through a named range, setting hints every HINT_SIZE indexes
704
+
705
+ /** @private
706
+ iterates through a named range, setting hints every HINT_SIZE indexes
707
707
  pointing to the nearest range start. The passed range must start on a
708
708
  range boundary. It can end anywhere.
709
709
  */
710
710
  _hint: function(start, length, content) {
711
711
  if (content === undefined) content = this._content;
712
-
712
+
713
713
  var skip = SC.IndexSet.HINT_SIZE,
714
714
  next = Math.abs(content[start]), // start of next range
715
715
  loc = start - (start % skip) + skip, // next hint loc
716
716
  lim = start + length ; // stop
717
-
717
+
718
718
  while (loc < lim) {
719
719
  // make sure we are in current rnage
720
720
  while ((next !== 0) && (next <= loc)) {
721
- start = next ;
721
+ start = next ;
722
722
  next = Math.abs(content[start]) ;
723
723
  }
724
-
724
+
725
725
  // past end
726
726
  if (next === 0) {
727
727
  delete content[loc];
@@ -730,24 +730,24 @@ SC.IndexSet = SC.mixin({},
730
730
  } else if (loc !== start) {
731
731
  content[loc] = start ; // set hint
732
732
  }
733
-
733
+
734
734
  loc += skip;
735
735
  }
736
736
  },
737
737
 
738
738
  /**
739
- Clears the set
739
+ Clears the set
740
740
  */
741
741
  clear: function() {
742
742
  if (this.isFrozen) throw SC.FROZEN_ERROR;
743
-
743
+
744
744
  var oldlen = this.length;
745
745
  this._content.length=1;
746
746
  this._content[0] = 0;
747
747
  this.set('length', 0).set('max', 0);
748
748
  if (oldlen > 0) this.enumerableContentDidChange();
749
749
  },
750
-
750
+
751
751
  /**
752
752
  Add all the ranges in the passed array.
753
753
  */
@@ -762,9 +762,9 @@ SC.IndexSet = SC.mixin({},
762
762
  objects.forEach(function(idx) { this.add(idx); }, this);
763
763
  }
764
764
  this.endPropertyChanges();
765
-
765
+
766
766
  return this ;
767
- },
767
+ },
768
768
 
769
769
  /**
770
770
  Removes all the ranges in the passed array.
@@ -773,30 +773,30 @@ SC.IndexSet = SC.mixin({},
773
773
  if (this.isFrozen) throw SC.FROZEN_ERROR;
774
774
 
775
775
  this.beginPropertyChanges();
776
-
776
+
777
777
  var idx = objects.get('length') ;
778
778
  if (objects.isSCArray) {
779
779
  while(--idx >= 0) this.remove(objects.objectAt(idx)) ;
780
780
  } else if (objects.isEnumerable) {
781
- objects.forEach(function(idx) { this.remove(idx); }, this);
781
+ objects.forEach(function(idx) { this.remove(idx); }, this);
782
782
  }
783
-
783
+
784
784
  this.endPropertyChanges();
785
-
785
+
786
786
  return this ;
787
- },
787
+ },
788
788
 
789
789
  /**
790
- Clones the set into a new set.
790
+ Clones the set into a new set.
791
791
  */
792
792
  clone: function() {
793
- return SC.IndexSet.create(this);
793
+ return SC.IndexSet.create(this);
794
794
  },
795
-
795
+
796
796
  /**
797
797
  Returns a string describing the internal range structure. Useful for
798
798
  debugging.
799
-
799
+
800
800
  @returns {String}
801
801
  */
802
802
  inspect: function() {
@@ -805,26 +805,26 @@ SC.IndexSet = SC.mixin({},
805
805
  idx = 0,
806
806
  ret = [],
807
807
  item;
808
-
808
+
809
809
  for(idx=0;idx<len;idx++) {
810
810
  item = content[idx];
811
- if (item !== undefined) ret.push("%@:%@".fmt(idx,item));
811
+ if (item !== undefined) ret.push("%@:%@".fmt(idx,item));
812
812
  }
813
813
  return "SC.IndexSet<%@>".fmt(ret.join(' , '));
814
814
  },
815
-
816
- /**
817
- Invoke the callback, passing each occuppied range instead of each
815
+
816
+ /**
817
+ Invoke the callback, passing each occuppied range instead of each
818
818
  index. This can be a more efficient way to iterate in some cases. The
819
819
  callback should have the signature:
820
-
820
+
821
821
  {{{
822
822
  callback(start, length, indexSet, source) { ... }
823
823
  }}}
824
-
824
+
825
825
  If you pass a target as a second option, the callback will be called in
826
826
  the target context.
827
-
827
+
828
828
  @param {Function} callback the iterator callback
829
829
  @param {Object} target the target
830
830
  @returns {SC.IndexSet} receiver
@@ -841,14 +841,14 @@ SC.IndexSet = SC.mixin({},
841
841
  cur = Math.abs(next);
842
842
  next = content[cur];
843
843
  }
844
-
844
+
845
845
  return this ;
846
- },
847
-
846
+ },
847
+
848
848
  /**
849
849
  Invokes the callback for each index within the passed start/length range.
850
850
  Otherwise works just like regular forEach().
851
-
851
+
852
852
  @param {Number} start starting index
853
853
  @param {Number} length length of range
854
854
  @param {Function} callback
@@ -865,11 +865,11 @@ SC.IndexSet = SC.mixin({},
865
865
 
866
866
  if (target === undefined) target = null ;
867
867
  while (next !== 0) {
868
- if (cur < start) cur = start ; // skip forward
869
- while((cur < next) && (cur < lim)) {
870
- callback.call(target, cur++, idx++, this, source);
868
+ if (cur < start) cur = start ; // skip forward
869
+ while((cur < next) && (cur < lim)) {
870
+ callback.call(target, cur++, idx++, this, source);
871
871
  }
872
-
872
+
873
873
  if (cur >= lim) {
874
874
  cur = next = 0 ;
875
875
  } else {
@@ -882,7 +882,7 @@ SC.IndexSet = SC.mixin({},
882
882
 
883
883
  /**
884
884
  Total number of indexes within the specified range.
885
-
885
+
886
886
  @param {Number|SC.IndexSet} start index, range object or IndexSet
887
887
  @param {Number} length optional range length
888
888
  @returns {Number} count of indexes
@@ -890,31 +890,31 @@ SC.IndexSet = SC.mixin({},
890
890
  lengthIn: function(start, length) {
891
891
 
892
892
  var ret = 0 ;
893
-
893
+
894
894
  // normalize input
895
- if (length === undefined) {
895
+ if (length === undefined) {
896
896
  if (start === null || start === undefined) {
897
897
  return 0; // nothing to do
898
898
 
899
899
  } else if (typeof start === SC.T_NUMBER) {
900
900
  length = 1 ;
901
-
901
+
902
902
  // if passed an index set, just add each range in the index set.
903
903
  } else if (start.isIndexSet) {
904
- start.forEachRange(function(start, length) {
904
+ start.forEachRange(function(start, length) {
905
905
  ret += this.lengthIn(start, length);
906
906
  }, this);
907
907
  return ret;
908
-
908
+
909
909
  } else {
910
- length = start.length;
910
+ length = start.length;
911
911
  start = start.start;
912
912
  }
913
913
  }
914
914
 
915
915
  // fast path
916
916
  if (this.get('length') === 0) return 0;
917
-
917
+
918
918
  var content = this._content,
919
919
  cur = 0,
920
920
  next = content[cur],
@@ -927,62 +927,62 @@ SC.IndexSet = SC.mixin({},
927
927
  cur = Math.abs(next);
928
928
  next = content[cur];
929
929
  }
930
-
930
+
931
931
  return ret ;
932
932
  },
933
-
933
+
934
934
  // ..........................................................
935
935
  // OBJECT API
936
- //
937
-
936
+ //
937
+
938
938
  /**
939
- Optionally set the source property on an index set and then you can
939
+ Optionally set the source property on an index set and then you can
940
940
  iterate over the actual object values referenced by the index set. See
941
941
  indexOf(), lastIndexOf(), forEachObject(), addObject() and removeObject().
942
942
  */
943
943
  source: null,
944
-
944
+
945
945
  /**
946
946
  Returns the first index in the set that matches the passed object. You
947
947
  must have a source property on the set for this to work.
948
-
949
- @param {Object} object the object to check
948
+
949
+ @param {Object} object the object to check
950
950
  @param {Number} startAt optional starting point
951
951
  @returns {Number} found index or -1 if not in set
952
952
  */
953
953
  indexOf: function(object, startAt) {
954
954
  var source = this.source;
955
955
  if (!source) throw "%@.indexOf() requires source".fmt(this);
956
-
956
+
957
957
  var len = source.get('length'),
958
-
958
+
959
959
  // start with the first index in the set
960
960
  content = this._content,
961
961
  cur = content[0]<0 ? Math.abs(content[0]) : 0,
962
962
  idx ;
963
-
963
+
964
964
  while(cur>=0 && cur<len) {
965
965
  idx = source.indexOf(object, cur);
966
966
  if (idx<0) return -1 ; // not found in source
967
967
  if (this.contains(idx)) return idx; // found in source and in set.
968
968
  cur = idx+1;
969
- }
970
-
969
+ }
970
+
971
971
  return -1; // not found
972
972
  },
973
973
 
974
974
  /**
975
975
  Returns the last index in the set that matches the passed object. You
976
976
  must have a source property on the set for this to work.
977
-
978
- @param {Object} object the object to check
977
+
978
+ @param {Object} object the object to check
979
979
  @param {Number} startAt optional starting point
980
980
  @returns {Number} found index or -1 if not in set
981
981
  */
982
982
  lastIndexOf: function(object, startAt) {
983
983
  var source = this.source;
984
984
  if (!source) throw "%@.lastIndexOf() requires source".fmt(this);
985
-
985
+
986
986
  // start with the last index in the set
987
987
  var len = source.get('length'),
988
988
  cur = this.max-1,
@@ -994,26 +994,26 @@ SC.IndexSet = SC.mixin({},
994
994
  if (idx<0) return -1 ; // not found in source
995
995
  if (this.contains(idx)) return idx; // found in source and in set.
996
996
  cur = idx+1;
997
- }
998
-
997
+ }
998
+
999
999
  return -1; // not found
1000
1000
  },
1001
-
1001
+
1002
1002
  /**
1003
1003
  Iterates through the objects at each index location in the set. You must
1004
1004
  have a source property on the set for this to work. The callback you pass
1005
1005
  will be invoked for each object in the set with the following signature:
1006
-
1006
+
1007
1007
  {{{
1008
1008
  function callback(object, index, source, indexSet) { ... }
1009
1009
  }}}
1010
-
1010
+
1011
1011
  If you pass a target, it will be used when the callback is called.
1012
-
1013
- @param {Function} callback function to invoke.
1012
+
1013
+ @param {Function} callback function to invoke.
1014
1014
  @param {Object} target optional content. otherwise uses window
1015
1015
  @returns {SC.IndexSet} receiver
1016
- */
1016
+ */
1017
1017
  forEachObject: function(callback, target) {
1018
1018
  var source = this.source;
1019
1019
  if (!source) throw "%@.forEachObject() requires source".fmt(this);
@@ -1022,29 +1022,29 @@ SC.IndexSet = SC.mixin({},
1022
1022
  cur = 0,
1023
1023
  idx = 0,
1024
1024
  next = content[cur];
1025
-
1025
+
1026
1026
  if (target === undefined) target = null ;
1027
1027
  while (next !== 0) {
1028
-
1029
- while(cur < next) {
1030
- callback.call(target, source.objectAt(cur), cur, source, this);
1028
+
1029
+ while(cur < next) {
1030
+ callback.call(target, source.objectAt(cur), cur, source, this);
1031
1031
  cur++;
1032
1032
  }
1033
-
1033
+
1034
1034
  cur = Math.abs(next);
1035
1035
  next = content[cur];
1036
1036
  }
1037
1037
  return this ;
1038
1038
  },
1039
-
1039
+
1040
1040
  /**
1041
- Adds all indexes where the object appears to the set. If firstOnly is
1041
+ Adds all indexes where the object appears to the set. If firstOnly is
1042
1042
  passed, then it will find only the first index and add it. If you know
1043
1043
  the object only appears in the source array one time, firstOnly may make
1044
1044
  this method faster.
1045
-
1045
+
1046
1046
  Requires source to work.
1047
-
1047
+
1048
1048
  @param {Object} object the object to add
1049
1049
  @returns {SC.IndexSet} receiver
1050
1050
  */
@@ -1054,22 +1054,22 @@ SC.IndexSet = SC.mixin({},
1054
1054
 
1055
1055
  var len = source.get('length'),
1056
1056
  cur = 0, idx;
1057
-
1057
+
1058
1058
  while(cur>=0 && cur<len) {
1059
1059
  idx = source.indexOf(object, cur);
1060
- if (idx >= 0) {
1060
+ if (idx >= 0) {
1061
1061
  this.add(idx);
1062
1062
  if (firstOnly) return this ;
1063
1063
  cur = idx++;
1064
1064
  } else return this ;
1065
1065
  }
1066
- return this ;
1066
+ return this ;
1067
1067
  },
1068
1068
 
1069
1069
  /**
1070
- Adds any indexes matching the passed objects. If firstOnly is passed,
1070
+ Adds any indexes matching the passed objects. If firstOnly is passed,
1071
1071
  then only finds the first index for each object.
1072
-
1072
+
1073
1073
  @param {SC.Enumerable} objects the objects to add
1074
1074
  @returns {SC.IndexSet} receiver
1075
1075
  */
@@ -1079,15 +1079,15 @@ SC.IndexSet = SC.mixin({},
1079
1079
  }, this);
1080
1080
  return this;
1081
1081
  },
1082
-
1082
+
1083
1083
  /**
1084
- Removes all indexes where the object appears to the set. If firstOnly is
1084
+ Removes all indexes where the object appears to the set. If firstOnly is
1085
1085
  passed, then it will find only the first index and add it. If you know
1086
1086
  the object only appears in the source array one time, firstOnly may make
1087
1087
  this method faster.
1088
-
1088
+
1089
1089
  Requires source to work.
1090
-
1090
+
1091
1091
  @param {Object} object the object to add
1092
1092
  @returns {SC.IndexSet} receiver
1093
1093
  */
@@ -1097,22 +1097,22 @@ SC.IndexSet = SC.mixin({},
1097
1097
 
1098
1098
  var len = source.get('length'),
1099
1099
  cur = 0, idx;
1100
-
1100
+
1101
1101
  while(cur>=0 && cur<len) {
1102
1102
  idx = source.indexOf(object, cur);
1103
- if (idx >= 0) {
1103
+ if (idx >= 0) {
1104
1104
  this.remove(idx);
1105
1105
  if (firstOnly) return this ;
1106
1106
  cur = idx+1;
1107
1107
  } else return this ;
1108
1108
  }
1109
- return this ;
1109
+ return this ;
1110
1110
  },
1111
1111
 
1112
1112
  /**
1113
- Removes any indexes matching the passed objects. If firstOnly is passed,
1113
+ Removes any indexes matching the passed objects. If firstOnly is passed,
1114
1114
  then only finds the first index for each object.
1115
-
1115
+
1116
1116
  @param {SC.Enumerable} objects the objects to add
1117
1117
  @returns {SC.IndexSet} receiver
1118
1118
  */
@@ -1122,20 +1122,20 @@ SC.IndexSet = SC.mixin({},
1122
1122
  }, this);
1123
1123
  return this;
1124
1124
  },
1125
-
1126
-
1125
+
1126
+
1127
1127
  // .......................................
1128
- // PRIVATE
1128
+ // PRIVATE
1129
1129
  //
1130
1130
 
1131
- /**
1132
- Usually observing notifications from IndexSet are not useful, so
1131
+ /**
1132
+ Usually observing notifications from IndexSet are not useful, so
1133
1133
  supress them by default.
1134
-
1134
+
1135
1135
  @property {Boolean}
1136
1136
  */
1137
1137
  LOG_OBSERVING: NO,
1138
-
1138
+
1139
1139
  /** @private - optimized call to forEach() */
1140
1140
  forEach: function(callback, target) {
1141
1141
  var content = this._content,
@@ -1146,21 +1146,21 @@ SC.IndexSet = SC.mixin({},
1146
1146
 
1147
1147
  if (target === undefined) target = null ;
1148
1148
  while (next !== 0) {
1149
- while(cur < next) {
1150
- callback.call(target, cur++, idx++, this, source);
1149
+ while(cur < next) {
1150
+ callback.call(target, cur++, idx++, this, source);
1151
1151
  }
1152
1152
  cur = Math.abs(next);
1153
1153
  next = content[cur];
1154
1154
  }
1155
1155
  return this ;
1156
1156
  },
1157
-
1157
+
1158
1158
  /** @private - support iterators */
1159
1159
  nextObject: function(ignore, idx, context) {
1160
1160
  var content = this._content,
1161
1161
  next = context.next,
1162
1162
  max = this.get('max'); // next boundary
1163
-
1163
+
1164
1164
  // seed.
1165
1165
  if (idx === null) {
1166
1166
  idx = next = 0 ;
@@ -1170,19 +1170,19 @@ SC.IndexSet = SC.mixin({},
1170
1170
  return null ; // nothing left to do
1171
1171
 
1172
1172
  } else idx++; // look on next index
1173
-
1173
+
1174
1174
  // look for next non-empty range if needed.
1175
1175
  if (idx === next) {
1176
- do {
1176
+ do {
1177
1177
  idx = Math.abs(next);
1178
1178
  next = content[idx];
1179
1179
  } while(next < 0);
1180
1180
  context.next = next;
1181
1181
  }
1182
-
1182
+
1183
1183
  return idx;
1184
1184
  },
1185
-
1185
+
1186
1186
  toString: function() {
1187
1187
  var str = [];
1188
1188
  this.forEachRange(function(start, length) {
@@ -1190,7 +1190,7 @@ SC.IndexSet = SC.mixin({},
1190
1190
  }, this);
1191
1191
  return "SC.IndexSet<%@>".fmt(str.join(',')) ;
1192
1192
  },
1193
-
1193
+
1194
1194
  max: 0
1195
1195
 
1196
1196
  }) ;