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
@@ -88,7 +88,7 @@ test("basic", function() {
88
88
  ok(view.$('.sc-outer-tail'), 'should have sc-outer-tail class');
89
89
  ok(view.$('.sc-inner-head'), 'should have sc-inner-head class');
90
90
  ok(view.$('.sc-inner-tail'), 'should have sc-inner-tail class');
91
- equals(view.$('.sc-inner').css("width"), "25%", 'width should be 25%');
91
+ equals(view.$('.sc-inner')[0].style.width, "25%", 'width should be 25%');
92
92
 
93
93
  // browsers compute the width after % adjustment differently. just be close
94
94
  var v = (SC.browser.msie || SC.browser.mozilla) ? 63 : 62;
@@ -102,7 +102,7 @@ test("disabled", function() {
102
102
 
103
103
  ok(view.$().hasClass('disabled'), 'should have disabled class');
104
104
  ok(view.$('.sc-inner'), 'should have sc-inner class');
105
- equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
105
+ equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
106
106
  equals(view.$('.sc-inner').width(), 0, 'pixel width ');
107
107
 
108
108
  });
@@ -113,7 +113,7 @@ test("basic value 0", function() {
113
113
 
114
114
  ok(!view.$().hasClass('disabled'), 'should NOT have disabled class');
115
115
  ok(view.$('.sc-inner'), 'should have sc-inner class');
116
- equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
116
+ equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
117
117
  equals(view.$('.sc-inner').width(), 0, 'pixel width ');
118
118
 
119
119
  });
@@ -124,7 +124,7 @@ test("basic value 100", function() {
124
124
 
125
125
  ok(!view.$().hasClass('disabled'), 'should NOT have disabled class');
126
126
  ok(view.$('.sc-inner'), 'should have sc-inner class');
127
- equals(view.$('.sc-inner').css("width"), "100%", 'width should be 100%');
127
+ equals(view.$('.sc-inner')[0].style.width, "100%", 'width should be 100%');
128
128
  equals(view.$('.sc-inner').width(), 250, 'pixel width ');
129
129
 
130
130
  });
@@ -135,7 +135,7 @@ test("basic max 50", function() {
135
135
 
136
136
  ok(!view.$().hasClass('disabled'), 'should NOT have disabled class');
137
137
  ok(view.$('.sc-inner'), 'should have sc-inner class');
138
- equals(view.$('.sc-inner').css("width"), "50%", 'width should be 50%');
138
+ equals(view.$('.sc-inner')[0].style.width, "50%", 'width should be 50%');
139
139
  equals(view.$('.sc-inner').width(), 125, 'pixel width ');
140
140
 
141
141
  });
@@ -151,7 +151,7 @@ test("changing value from empty -> value", function() {
151
151
  SC.RunLoop.begin();
152
152
  view.set('value', 50);
153
153
  SC.RunLoop.end();
154
- equals(view.$('.sc-inner').css("width"), "50%", 'width should be 50%');
154
+ equals(view.$('.sc-inner')[0].style.width, "50%", 'width should be 50%');
155
155
 
156
156
  var assertions = function(){
157
157
  equals(view.$('.sc-inner').width(), 125, 'pixel width ');
@@ -169,7 +169,7 @@ test("changing value from full -> empty", function() {
169
169
  SC.RunLoop.begin();
170
170
  view.set('value', 0);
171
171
  SC.RunLoop.end();
172
- equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
172
+ equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
173
173
  var assertions = function(){
174
174
  equals(view.$('.sc-inner').width(), 0, 'pixel width ');
175
175
  start();
@@ -192,7 +192,7 @@ test("changing value from full -> negative number", function() {
192
192
  SC.RunLoop.begin();
193
193
  view.set('value', -10);
194
194
  SC.RunLoop.end();
195
- equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
195
+ equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
196
196
  var assertions = function(){
197
197
  equals(view.$('.sc-inner').width(), 0, 'pixel width ');
198
198
  start();
@@ -212,7 +212,7 @@ test("changing value to over maximum", function() {
212
212
  SC.RunLoop.begin();
213
213
  view.set('value', 110);
214
214
  SC.RunLoop.end();
215
- equals(view.$('.sc-inner').css("width"), "100%", 'width should be 100%');
215
+ equals(view.$('.sc-inner')[0].style.width, "100%", 'width should be 100%');
216
216
  var assertions = function(){
217
217
  equals(view.$('.sc-inner').width(), 250, 'pixel width ');
218
218
  start();
@@ -232,7 +232,7 @@ test("changing value to a string", function() {
232
232
  SC.RunLoop.begin();
233
233
  view.set('value', 'aString');
234
234
  SC.RunLoop.end();
235
- equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
235
+ equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
236
236
  var assertions = function(){
237
237
  equals(view.$('.sc-inner').width(), 0, 'pixel width ');
238
238
  start();
@@ -32,12 +32,32 @@ module("SC.SegmentedView", {
32
32
 
33
33
  view = pane.childViews[0];
34
34
 
35
+ var boundingRect = function(segment){
36
+ var r;
37
+ if (segment.getBoundingClientRect) {
38
+ r = segment.getBoundingClientRect();
39
+ }else{
40
+ r = {};
41
+ var ret = SC.viewportOffset(segment); // get x & y
42
+ var cq = SC.$(segment);
43
+ r.top = ret.y;
44
+ r.left = ret.x;
45
+ r.bottom = ret.y + cq.outerHeight();
46
+ r.right = ret.x + cq.outerWidth();
47
+ }
48
+
49
+ return r;
50
+ };
51
+
52
+
35
53
  elem = view.get('layer').childNodes[0];
36
- rect1 = elem.getBoundingClientRect();
54
+ rect1 = boundingRect(elem);
37
55
  elem = view.get('layer').childNodes[1];
38
- rect2 = elem.getBoundingClientRect();
56
+ rect2 = boundingRect(elem);
39
57
  elem = view.get('layer').childNodes[2];
40
- rect3 = elem.getBoundingClientRect();
58
+ rect3 = boundingRect(elem);
59
+
60
+
41
61
  },
42
62
 
43
63
  teardown: function() {
@@ -53,15 +73,15 @@ test("Check that properties are mapped correctly", function() {
53
73
  SC.RunLoop.end();
54
74
  equals(view.get('value'), "Item2", "the second item should be selected.");
55
75
  var items=view.displayItems();
56
- equals(items[0][0], "Item1", 'Computed properties should match');
57
- equals(items[0][1], "Item1", 'Computed properties should match');
58
- equals(items[0][2], true, 'Computed properties should match');
59
- equals(items[0][3], iconURL, 'Computed properties should match');
60
- equals(items[0][4], null, 'Computed properties should match');
61
- equals(items[0][5], null, 'Computed properties should match');
62
- equals(items[0][6], 0, 'Computed properties should match');
76
+ equals(items[0].title, "Item1", 'Computed properties should match');
77
+ equals(items[0].value, "Item1", 'Computed properties should match');
78
+ equals(items[0].isEnabled, true, 'Computed properties should match');
79
+ equals(items[0].icon, iconURL, 'Computed properties should match');
80
+ equals(items[0].width, null, 'Computed properties should match');
81
+ equals(items[0].toolTip, null, 'Computed properties should match');
82
+ equals(items[0].index, 0, 'Computed properties should match');
63
83
 
64
- var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { pageX: rect1.left + 1, pageY: rect1.top + 1 });
84
+ var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
65
85
  view.mouseDown(firstItemEvent);
66
86
  equals(view._isMouseDown, YES, 'mousedown');
67
87
  equals(view.get('activeIndex'), 0, '');
@@ -78,7 +98,7 @@ test("Check that properties are mapped correctly", function() {
78
98
 
79
99
  // Test Mouse Down
80
100
  // it now gets the item by the position, so we have to pass a position
81
- var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { pageX: rect1.left + 1, pageY: rect1.top + 1 });
101
+ var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
82
102
  view.mouseDown(firstItemEvent);
83
103
 
84
104
  equals(view._isMouseDown, YES, 'Mouse down flag on mousedown should be ');
@@ -93,7 +113,7 @@ test("Check that properties are mapped correctly", function() {
93
113
 
94
114
  // Test third item
95
115
  elem = view.get('layer').childNodes[2];
96
- var thirdItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { pageX: rect3.left + 1, pageY: rect3.top + 1 });
116
+ var thirdItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect3.left + 1, client: rect3.top + 1 });
97
117
 
98
118
  // mouse down and move
99
119
  view.mouseDown(thirdItemEvent);
@@ -102,13 +122,13 @@ test("Check that properties are mapped correctly", function() {
102
122
  equals(view.get('activeIndex'), 2, 'The active item is the third segment.');
103
123
 
104
124
  // try moving mouse while mouse down
105
- var secondItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { pageX: rect2.left + 1, pageY: rect2.top + 1 });
125
+ var secondItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect2.left + 1, clientY: rect2.top + 1 });
106
126
  view.mouseMoved(secondItemEvent);
107
127
  equals(view._isMouseDown, YES, 'Mouse down flag on mousemoved should be ');
108
128
  equals(view.get('activeIndex'), 1, 'The active item should have changed to the second segment.');
109
129
 
110
130
  // and check that mouse out cancels.
111
- var noItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { pageX: rect1.left - 5, pageY: rect1.top - 5 });
131
+ var noItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left - 5, clientY: rect1.top - 5 });
112
132
 
113
133
  view.mouseExited(noItemEvent);
114
134
  equals(view._isMouseDown, YES, 'Mouse down flag on mouseout should still be ');
@@ -110,6 +110,51 @@ var pane;
110
110
  allowsEmptySelection: YES,
111
111
  allowsMultipleSelection: YES,
112
112
  layout: { height: 25 }
113
+ })
114
+ .add("3_items,leftAligned", SC.SegmentedView, {
115
+ items: "Item1 Item2 Item3".w(),
116
+ align: SC.ALIGN_LEFT,
117
+ layout: { height: 25 }
118
+ })
119
+ .add("3_items,rightAligned", SC.SegmentedView, {
120
+ items: "Item1 Item2 Item3".w(),
121
+ align: SC.ALIGN_RIGHT,
122
+ layout: { height: 25 }
123
+ })
124
+ .add("3_items,widths", SC.SegmentedView, {
125
+ items: [
126
+ { value: "A", width: 70 },
127
+ { value: "B", width: 70 },
128
+ { value: "C", width: 70 }],
129
+ itemTitleKey: 'value',
130
+ itemValueKey: 'value',
131
+ itemWidthKey: 'width',
132
+ layout: { height: 25 }
133
+ })
134
+ .add("5_items,widths,overflow", SC.SegmentedView, {
135
+ items: [
136
+ { value: "A", width: 70 },
137
+ { value: "B", width: 70 },
138
+ { value: "C", width: 70 },
139
+ { value: "D", width: 70 },
140
+ { value: "E", width: 70 }],
141
+ itemTitleKey: 'value',
142
+ itemValueKey: 'value',
143
+ itemWidthKey: 'width',
144
+ layout: { height: 25 }
145
+ })
146
+ .add("5_items,1_sel,widths,overflow", SC.SegmentedView, {
147
+ items: [
148
+ { value: "A", width: 70 },
149
+ { value: "B", width: 70 },
150
+ { value: "C", width: 70 },
151
+ { value: "D", width: 70 },
152
+ { value: "E", width: 70 }],
153
+ itemTitleKey: 'value',
154
+ itemValueKey: 'value',
155
+ itemWidthKey: 'width',
156
+ value: "D",
157
+ layout: { height: 25 }
113
158
  });
114
159
 
115
160
  pane.show(); // add a test to show the test pane
@@ -133,6 +178,8 @@ var pane;
133
178
  ok(pane.view('3_items,2_sel,multipleSel').get('isVisibleInWindow'), '3_items,2_sel,multipleSel.isVisibleInWindow should be YES');
134
179
  ok(pane.view('3_items,1_sel,emptySel,multiSel').get('isVisibleInWindow'), '3_items,1_sel,emptySel,multiSel.isVisibleInWindow should be YES');
135
180
  ok(pane.view('3_items,2_sel,emptySel,multiSel').get('isVisibleInWindow'), '3_items,2_sel,emptySel,multiSel.isVisibleInWindow should be YES');
181
+ ok(pane.view('3_items,leftAligned').get('isVisibleInWindow'), '3_items,leftAligned.isVisibleInWindow should be YES');
182
+ ok(pane.view('3_items,rightAligned').get('isVisibleInWindow'), '3_items,rightAligned.isVisibleInWindow should be YES');
136
183
  });
137
184
 
138
185
 
@@ -223,4 +270,119 @@ var pane;
223
270
  ok((segments[1].title=="this is title2's tip"), 'second segment has expected tool tip assigned.');
224
271
  });
225
272
 
273
+ test("Check the alignment styles for align property.", function() {
274
+ equals(pane.view("3_empty").$().css('text-align'), 'center', 'default align property should text-align the segmented-view to the center');
275
+ equals(pane.view("3_items,leftAligned").$().css('text-align'), 'left', 'setting align: SC.ALIGN_LEFT should text-align the segmented-view to the left');
276
+ equals(pane.view("3_items,rightAligned").$().css('text-align'), 'right', 'setting align: SC.ALIGN_LEFT should text-align the segmented-view to the left');
277
+ });
278
+
279
+ test("Check that changing title re-renders the segments (for hash or object items only).", function() {
280
+ var sv = pane.view("3_items,widths");
281
+ var segments=sv.$('a');
282
+ var defaults = ['A', 'B', 'C'];
283
+ for (var i=0, len=segments.length; i < len; i++){
284
+ var segEl=segments[i];
285
+ var label=$(segEl).find('label')[0];
286
+ equals(label.innerHTML, defaults[i], 'there should be "' + defaults[i] + '" in the segment\'s label');
287
+ }
288
+
289
+ // change the title of the second item
290
+ var items = sv.get('items');
291
+ items[1].set('value', 'Item 2');
292
+
293
+ // allow for a render to happen
294
+ SC.RunLoop.begin().end();
295
+
296
+ segEl=segments[1];
297
+ label=$(segEl).find('label')[0];
298
+ equals(label.innerHTML, "Item 2", 'there should be "Item 2" text in the second segment');
299
+ });
300
+
301
+ test("Check that changing width re-renders the segments (for hash or object items only).", function() {
302
+ var sv = pane.view("3_items,widths");
303
+ var segments=sv.$('a');
304
+ for (var i=0, len=segments.length; i < len; i++){
305
+ var segEl=segments[i];
306
+ var width=$(segEl).css('width');
307
+ equals(width, "70px", 'the segment style width should be "70px"');
308
+ }
309
+
310
+ // change the width of the second item
311
+ var items = sv.get('items');
312
+ items[1].set('width', 100);
313
+
314
+ // allow for a render to happen
315
+ SC.RunLoop.begin().end();
316
+
317
+ segEl=segments[1];
318
+ width=$(segEl).css('width');
319
+ equals(width, "100px", 'the second segment style width should be "100px"');
320
+ });
321
+
322
+ test("Check that overflow adds an overflow segment on view.", function() {
323
+ var sv = pane.view("5_items,widths,overflow");
324
+ var lastIsOverflow = function(sv) {
325
+ SC.RunLoop.begin().end(); // allow for a render to happen
326
+
327
+ var segments=sv.$('a');
328
+ var overflowEl = segments[segments.length - 1];
329
+ ok($(overflowEl).hasClass('sc-overflow-segment'), 'overflow segment should have .sc-overflow-segment class');
330
+ var overflowLabelEl = $(overflowEl).find('label')[0];
331
+ equals(overflowLabelEl.innerHTML, "»", 'there should be "»" text in the overflow segment');
332
+ };
333
+
334
+ var lastIsSegment = function(sv, text) {
335
+ SC.RunLoop.begin().end(); // allow for a render to happen
336
+
337
+ var segments=sv.$('a');
338
+ var lastEl = segments[segments.length - 1];
339
+ ok(!$(lastEl).hasClass('sc-overflow-segment'), 'last segment should not have .sc-overflow-segment class');
340
+ var lastLabelEl = $(lastEl).find('label')[0];
341
+ equals(lastLabelEl.innerHTML, text, 'there should be "' + text + '" text in the last segment');
342
+ };
343
+
344
+ // the last item should be an overflow segment (ie. has .sc-overflow-segment class and text "»")
345
+ lastIsOverflow(sv);
346
+
347
+ // check that the overflowed items are stored
348
+ var overflowItems = sv.overflowItems;
349
+ equals(overflowItems.length, 2, "there should be 2 overflowed items");
350
+
351
+ // 1. remove the last two items (the last item should no longer be an overflow segment)
352
+ var items = sv.get('items');
353
+ items.removeAt(items.length - 1);
354
+ items.removeAt(items.length - 1);
355
+ lastIsSegment(sv, "C");
356
+
357
+ // 2. add an item (the last item should be an overflow segment again)
358
+ items.pushObject({value: 'X', width: 100});
359
+ lastIsOverflow(sv);
360
+
361
+ // 3. shrink the items (the last item should no longer be an overflow segment)
362
+ items.invoke('set', 'width', 50);
363
+ lastIsSegment(sv, "X");
364
+
365
+ // 4. grow the items (the last item should be an overflow segment again)
366
+ items.invoke('set', 'width', 100);
367
+ lastIsOverflow(sv);
368
+
369
+ // 5. shrink the items, but then shrink the segmented view
370
+ items.invoke('set', 'width', 50);
371
+ lastIsSegment(sv, "X");
372
+ sv.set('layout', {left: 75, right: 75, top: 0, height: 25});
373
+ sv.updateLayer();
374
+ SC.RunLoop.begin().end(); // allow for a render to happen (update layout)
375
+ sv.notifyPropertyChange('frame');
376
+ SC.RunLoop.begin().end(); // allow for a render to happen (measure the segments)
377
+ lastIsOverflow(sv);
378
+ });
379
+
380
+ test("Check that the overflow segment is selected when overflowed items are selected.", function() {
381
+ var sv = pane.view("5_items,1_sel,widths,overflow");
382
+ var segments=sv.$('a');
383
+
384
+ // the overflow item should be selected (because an overflowed item is selected)
385
+ var overflowEl = segments[segments.length - 1];
386
+ ok($(overflowEl).hasClass('sel'), 'overflow segment should have .sel class');
387
+ });
226
388
  })();
@@ -5,149 +5,134 @@
5
5
  // License: Licensed under MIT license (see license.js)
6
6
  // ==========================================================================
7
7
 
8
- /*jslint evil:true */
9
-
10
8
  /** @class
11
9
 
12
- Implements a push-button-style button. This class is used to implement
10
+ Implements a push-button-style button. This class is used to implement
13
11
  both standard push buttons and tab-style controls. See also SC.CheckboxView
14
- and SC.RadioView which are implemented as field views, but can also be
12
+ and SC.RadioView which are implemented as field views, but can also be
15
13
  treated as buttons.
16
-
17
- By default, a button uses the SC.Control mixin which will apply CSS
14
+
15
+ By default, a button uses the SC.Control mixin which will apply CSS
18
16
  classnames when the state of the button changes:
19
17
  - active when button is active
20
18
  - sel when button is toggled to a selected state
21
-
19
+
22
20
  @extends SC.View
23
21
  @extends SC.Control
24
22
  @extends SC.Button
25
- @since SproutCore 1.0
23
+ @since SproutCore 1.0
26
24
  */
27
- SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
25
+ SC.ButtonView = SC.View.extend(SC.Control, SC.Button,
28
26
  /** @scope SC.ButtonView.prototype */ {
29
-
30
- /**
31
- What type of element this view is represented as
32
-
33
- @property {String}
34
- */
35
- tagName: 'div',
36
27
 
37
28
  /**
38
- Class names that will be applied to this view
39
-
29
+ The HTML representation of SC.ButtonView contains the 'sc-button-view'
30
+ class.
31
+
40
32
  @property {Array}
41
33
  */
42
34
  classNames: ['sc-button-view'],
43
-
35
+
44
36
  /**
45
- optionally set this to the theme you want this button to have.
46
-
47
- This is used to determine the type of button this is. You generally
48
- should set a class name on the HTML with the same value to allow CSS
49
- styling.
50
-
51
- The default SproutCore theme supports "regular", "capsule", "checkbox",
52
- and "radio"
53
-
37
+ The theme to apply to the button. By default, a subtheme with the name of
38
+ 'square' is created for backwards-compatibility.
39
+
54
40
  @property {String}
55
41
  */
56
- theme: 'square',
57
-
42
+ themeName: 'square',
43
+
58
44
  /**
59
- Optionally set the behavioral mode of this button.
60
-
45
+ The behavioral mode of this button.
46
+
61
47
  Possible values are:
62
- - *SC.PUSH_BEHAVIOR* Pressing the button will trigger an action tied to the
48
+ - *SC.PUSH_BEHAVIOR* Pressing the button will trigger an action tied to the
63
49
  button. Does not change the value of the button.
64
- - *SC.TOGGLE_BEHAVIOR* Pressing the button will invert the current value of
50
+ - *SC.TOGGLE_BEHAVIOR* Pressing the button will invert the current value of
65
51
  the button. If the button has a mixed value, it will be set to true.
66
- - *SC.TOGGLE_ON_BEHAVIOR* Pressing the button will set the current state to
52
+ - *SC.TOGGLE_ON_BEHAVIOR* Pressing the button will set the current state to
67
53
  true no matter the previous value.
68
- - *SC.TOGGLE_OFF_BEHAVIOR* Pressing the button will set the current state to
54
+ - *SC.TOGGLE_OFF_BEHAVIOR* Pressing the button will set the current state to
69
55
  false no matter the previous value.
70
-
56
+ - *SC.HOLD_BEHAVIOR* Pressing the button will cause the action to repeat at a
57
+ regular interval specifed by 'holdInterval'
58
+
71
59
  @property {String}
72
60
  */
73
61
  buttonBehavior: SC.PUSH_BEHAVIOR,
74
62
 
75
63
  /*
76
- If buttonBehavior is SC.HOLD_BEHAVIOR, this specifies, in miliseconds, how
77
- often to trigger the action. Ignored for other behaviors.
78
-
64
+ If buttonBehavior is SC.HOLD_BEHAVIOR, this specifies, in milliseconds,
65
+ how often to trigger the action. Ignored for other behaviors.
66
+
79
67
  @property {Number}
80
68
  */
81
69
  holdInterval: 100,
82
70
 
83
71
  /**
84
72
  If YES, then this button will be triggered when you hit return.
85
-
73
+
86
74
  This is the same as setting the keyEquivalent to 'return'. This will also
87
75
  apply the "def" classname to the button.
88
-
76
+
89
77
  @property {Boolean}
90
78
  */
91
79
  isDefault: NO,
92
80
  isDefaultBindingDefault: SC.Binding.oneWay().bool(),
93
-
81
+
94
82
  /**
95
83
  If YES, then this button will be triggered when you hit escape.
96
84
  This is the same as setting the keyEquivalent to 'escape'.
97
-
85
+
98
86
  @property {Boolean}
99
- */
87
+ */
100
88
  isCancel: NO,
101
89
  isCancelBindingDefault: SC.Binding.oneWay().bool(),
102
90
 
103
91
  /**
104
- The button href value. This can be used to create localized button href
105
- values. Setting an empty or null href will set it to javascript:;
106
-
107
- @property {String}
108
- */
109
- href: '',
92
+ The name of the action you want triggered when the button is pressed.
110
93
 
111
- /**
112
- The name of the action you want triggered when the button is pressed.
113
-
114
94
  This property is used in conjunction with the target property to execute
115
- a method when a regular button is pressed. These properties are not
95
+ a method when a regular button is pressed. These properties are not
116
96
  relevant when the button is used in toggle mode.
117
-
97
+
118
98
  If you do not set a target, then pressing a button will cause the
119
99
  responder chain to search for a view that implements the action you name
120
100
  here. If you set a target, then the button will try to call the method
121
101
  on the target itself.
122
-
123
- For legacy support, you can also set the action property to a function.
102
+
103
+ For legacy support, you can also set the action property to a function.
124
104
  Doing so will cause the function itself to be called when the button is
125
- clicked. It is generally better to use the target/action approach and
105
+ clicked. It is generally better to use the target/action approach and
126
106
  to implement your code in a controller of some type.
127
-
107
+
128
108
  @property {String}
129
109
  */
130
110
  action: null,
131
-
111
+
132
112
  /**
133
113
  The target object to invoke the action on when the button is pressed.
134
-
114
+
135
115
  If you set this target, the action will be called on the target object
136
116
  directly when the button is clicked. If you leave this property set to
137
- null, then the button will search the responder chain for a view that
117
+ null, then the button will search the responder chain for a view that
138
118
  implements the action when the button is pressed instead.
139
-
119
+
140
120
  @property {Object}
141
121
  */
142
122
  target: null,
143
-
144
- /**
123
+
124
+ /**
145
125
  If YES, use a focus ring.
146
126
 
127
+ TODO: When is this property ever changed? Is this redundant with
128
+ render delegates since it can now be turned on on a theme-by-theme
129
+ basis? --TD
130
+
147
131
  @property {Boolean}
148
132
  */
149
133
  supportFocusRing: NO,
150
-
134
+
135
+ // TODO: What the hell is this? --TD
151
136
  _labelMinWidthIE7: 0,
152
137
 
153
138
  /**
@@ -162,7 +147,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
162
147
  @param {Event} evt
163
148
  @returns {Boolean} success/failure of the request
164
149
  */
165
- triggerAction: function(evt) {
150
+ triggerActionAfterDelay: function(evt) {
166
151
  // If this button is disabled, we have nothing to do
167
152
  if (!this.get('isEnabled')) return NO;
168
153
 
@@ -172,167 +157,125 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
172
157
  // Invoke the actual action method after a small delay to give the user a
173
158
  // chance to see the highlight. This is especially important if the button
174
159
  // closes a pane, for example.
175
- this.invokeLater('_triggerActionAfterDelay', 200, evt);
160
+ this.invokeLater('triggerAction', 200, evt);
176
161
  return YES;
177
162
  },
178
163
 
179
164
  /** @private
180
- Called by triggerAction after a delay; this method actually
165
+ Called by triggerActionAfterDelay; this method actually
181
166
  performs the action and restores the button's state.
182
167
 
183
168
  @param {Event} evt
184
169
  */
185
- _triggerActionAfterDelay: function(evt) {
170
+ triggerAction: function(evt) {
186
171
  this._action(evt, YES);
187
172
  this.didTriggerAction();
188
173
  this.set('isActive', NO);
189
174
  },
190
175
 
191
176
  /**
192
- This method is called anytime the button's action is triggered. You can
193
- implement this method in your own subclass to perform any cleanup needed
177
+ Callback called anytime the button's action is triggered. You can
178
+ implement this method in your own subclass to perform any cleanup needed
194
179
  after an action is performed.
195
-
196
- @property {function}
197
180
  */
198
181
  didTriggerAction: function() {},
199
182
 
200
183
  /**
201
184
  The minimum width the button title should consume. This property is used
202
- when generating the HTML styling for the title itself. The default
185
+ when generating the HTML styling for the title itself. The default
203
186
  width of 80 usually provides a nice looking style, but you can set it to 0
204
187
  if you want to disable minimum title width.
205
-
188
+
206
189
  Note that the title width does not exactly match the width of the button
207
190
  itself. Extra padding added by the theme can impact the final total
208
191
  size.
209
192
 
193
+ TODO: Why is this not set by the theme? --TD
194
+
210
195
  @property {Number}
211
196
  */
212
197
  titleMinWidth: 80,
213
-
198
+
214
199
  // ................................................................
215
200
  // INTERNAL SUPPORT
216
201
 
217
202
  /** @private - save keyEquivalent for later use */
218
203
  init: function() {
219
204
  sc_super();
220
-
221
- //cache the key equivalent
222
- if(this.get("keyEquivalent")) this._defaultKeyEquivalent = this.get("keyEquivalent");
205
+
206
+ var keyEquivalent = this.get('keyEquivalent');
207
+ // Cache the key equivalent. The key equivalent is saved so that if,
208
+ // for example, isDefault is changed from YES to NO, the old key
209
+ // equivalent can be restored.
210
+ if (keyEquivalent) {
211
+ this._defaultKeyEquivalent = keyEquivalent;
212
+ }
223
213
  },
224
214
 
225
- _TEMPORARY_CLASS_HASH: {},
226
-
215
+ /**
216
+ The WAI-ARIA role of the button.
217
+ */
218
+ ariaRole: 'button',
219
+
227
220
  // display properties that should automatically cause a refresh.
228
- // isCancel and isDefault also cause a refresh but this is implemented as
221
+ // isCancel and isDefault also cause a refresh but this is implemented as
229
222
  // a separate observer (see below)
230
- displayProperties: ['href', 'icon', 'title', 'value', 'toolTip'],
231
-
232
-
233
- /**
234
- This property is used to call the right render style for the button.
235
- * This might be a future way to start implementing the render method
236
- as part of the theme
237
- */
238
-
239
- renderStyle: 'renderDefault', //SUPPORTED DEFAULT, IMAGE
240
-
241
- render: function(context, firstTime) {
242
- // add href attr if tagName is anchor...
243
- var href, toolTip, classes, theme;
244
- if (this.get('tagName') === 'a') {
245
- href = this.get('href');
246
- if (!href || (href.length === 0)) href = "javascript:;";
247
- context.attr('href', href);
248
- }
249
223
 
250
- // If there is a toolTip set, grab it and localize if necessary.
251
- toolTip = this.get('toolTip') ;
252
- if (SC.typeOf(toolTip) === SC.T_STRING) {
253
- if (this.get('localize')) toolTip = toolTip.loc() ;
254
- context.attr('title', toolTip) ;
255
- context.attr('alt', toolTip) ;
256
- }
257
-
258
- // add some standard attributes & classes.
259
- classes = this._TEMPORARY_CLASS_HASH;
260
- classes.def = this.get('isDefault');
261
- classes.cancel = this.get('isCancel');
262
- classes.icon = !!this.get('icon');
263
- context.attr('role', 'button').setClass(classes);
264
- theme = this.get('theme');
265
- if (theme && !context.hasClass(theme)) context.addClass(theme);
224
+ /** @private
225
+ The following properties affect how SC.ButtonView is rendered, and will
226
+ cause the view to be rerendered if they change.
266
227
 
267
- // render inner html
268
- this[this.get('renderStyle')](context, firstTime);
269
- },
270
-
271
-
228
+ @property {Array}
229
+ */
230
+ displayProperties: [
231
+ 'icon', 'displayTitle', 'value', 'displayToolTip', 'isDefault', 'isCancel',
232
+ 'escapeHTML', 'needsEllipsis', 'hint', 'titleMinWidth', 'supportFocusRing'
233
+ ],
234
+
272
235
  /**
273
- Render the button with the default render style.
236
+ The name of the render delegate in the theme that should be used to
237
+ render the button.
238
+
239
+ In this case, the 'button' property will be retrieved from the theme and
240
+ set to the render delegate of this view.
241
+
242
+ @property {String}
274
243
  */
275
- renderDefault: function(context, firstTime){
276
- if(firstTime) {
277
- context = context.push("<span class='sc-button-inner' style = 'min-width:"
278
- ,this.get('titleMinWidth'),
279
- "px'>");
244
+ renderDelegateName: 'buttonRenderDelegate',
245
+
246
+ /** @private
247
+ Used to store the keyboard equivalent.
280
248
 
281
- this.renderTitle(context, firstTime) ; // from button mixin
282
- context.push("</span>") ;
249
+ Setting the isDefault property to YES, for example, will cause the
250
+ keyEquivalent property to 'return'. This cached value is used to restore
251
+ the keyEquivalent property if isDefault is set back to NO.
283
252
 
284
- if(this.get('supportFocusRing')) {
285
- context.push('<div class="focus-ring">',
286
- '<div class="focus-left"></div>',
287
- '<div class="focus-middle"></div>',
288
- '<div class="focus-right"></div></div>');
289
- }
290
- }
291
- else {
292
- this.renderTitle(context, firstTime) ;
293
- }
294
- },
295
-
296
- /**
297
- Render the button with the image render style. To set image
298
- set the icon property with the classname that has the style with the image
253
+ @property {String}
299
254
  */
300
- renderImage: function(context, firstTime){
301
- var icon = this.get('icon');
302
- context.addClass('no-min-width');
303
- if(icon) context.push("<div class='img "+icon+"'></div>");
304
- else context.push("<div class='img'></div>");
305
- },
306
-
307
- /** @private {String} used to store a previously defined key equiv */
308
255
  _defaultKeyEquivalent: null,
309
-
256
+
310
257
  /** @private
311
- Whenever the isDefault or isCancel property changes, update the display and change the keyEquivalent.
312
- */
258
+
259
+ Whenever the isDefault or isCancel property changes, re-render and change
260
+ the keyEquivalent property so that we respond to the return or escape key.
261
+ */
313
262
  _isDefaultOrCancelDidChange: function() {
314
- var isDef = !!this.get('isDefault'),
315
- isCancel = !isDef && this.get('isCancel') ;
316
-
317
- if(this.didChangeFor('defaultCancelChanged','isDefault','isCancel')) {
318
- this.displayDidChange() ; // make sure to update the UI
319
- if (isDef) {
320
- this.set('keyEquivalent', 'return'); // change the key equivalent
321
- } else if (isCancel) {
322
- this.setIfChanged('keyEquivalent', 'escape') ;
323
- } else {
324
- //restore the default key equivalent
325
- this.set("keyEquivalent",this._defaultKeyEquivalent);
326
- }
263
+ var isDefault = !!this.get('isDefault'),
264
+ isCancel = !isDefault && this.get('isCancel') ;
265
+
266
+ if (isDefault) {
267
+ this.set('keyEquivalent', 'return'); // change the key equivalent
268
+ } else if (isCancel) {
269
+ this.set('keyEquivalent', 'escape') ;
270
+ } else {
271
+ // Restore the default key equivalent
272
+ this.set('keyEquivalent', this._defaultKeyEquivalent);
327
273
  }
328
-
329
274
  }.observes('isDefault', 'isCancel'),
330
-
331
- isMouseDown: false,
332
275
 
333
- /** @private
276
+ /** @private
334
277
  On mouse down, set active only if enabled.
335
- */
278
+ */
336
279
  mouseDown: function(evt) {
337
280
  var buttonBehavior = this.get('buttonBehavior');
338
281
 
@@ -346,7 +289,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
346
289
  this._isFocused = YES ;
347
290
  this.becomeFirstResponder();
348
291
  if (this.get('isVisibleInWindow')) {
349
- this.$()[0].focus();
292
+ this.get('layer').focus();
350
293
  }
351
294
  }
352
295
 
@@ -365,7 +308,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
365
308
 
366
309
  /** @private
367
310
  If mouse was down and we renter the button area, set the active state again.
368
- */
311
+ */
369
312
  mouseEntered: function(evt) {
370
313
  if (this._isMouseDown) {
371
314
  this.set('isActive', YES);
@@ -375,19 +318,19 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
375
318
 
376
319
  /** @private
377
320
  ON mouse up, trigger the action only if we are enabled and the mouse was released inside of the view.
378
- */
321
+ */
379
322
  mouseUp: function(evt) {
380
323
  if (this._isMouseDown) this.set('isActive', NO); // track independently in case isEnabled has changed
381
324
  this._isMouseDown = false;
382
325
 
383
326
  if (this.get('buttonBehavior') !== SC.HOLD_BEHAVIOR) {
384
- var inside = this.$().within(evt.target) ;
327
+ var inside = this.$().within(evt.target);
385
328
  if (inside && this.get('isEnabled')) this._action(evt) ;
386
329
  }
387
330
 
388
331
  return YES ;
389
332
  },
390
-
333
+
391
334
  touchStart: function(touch){
392
335
  var buttonBehavior = this.get('buttonBehavior');
393
336
 
@@ -409,7 +352,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
409
352
 
410
353
  return YES;
411
354
  },
412
-
355
+
413
356
  touchesDragged: function(evt, touches) {
414
357
  if (!this.touchIsInBoundary(evt)) {
415
358
  if (!this._touch_exited) this.set('isActive', NO);
@@ -418,42 +361,44 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
418
361
  if (this._touch_exited) this.set('isActive', YES);
419
362
  this._touch_exited = NO;
420
363
  }
421
-
364
+
422
365
  evt.preventDefault();
423
366
  return YES;
424
367
  },
425
-
368
+
426
369
  touchEnd: function(touch){
427
370
  this._touch_exited = NO;
428
371
  this.set('isActive', NO); // track independently in case isEnabled has changed
429
372
 
430
373
  if (this.get('buttonBehavior') !== SC.HOLD_BEHAVIOR) {
431
- if (this.touchIsInBoundary(touch)) this._action();
374
+ if (this.touchIsInBoundary(touch) && this.get('isEnabled')) {
375
+ this._action();
376
+ }
432
377
  }
433
-
378
+
434
379
  touch.preventDefault();
435
380
  return YES ;
436
381
  },
437
-
438
-
382
+
383
+
439
384
  /** @private */
440
385
  keyDown: function(evt) {
441
386
  // handle tab key
442
- if (evt.which === 9) {
387
+ if (evt.which === 9 || evt.keyCode === 9) {
443
388
  var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView');
444
389
  if(view) view.becomeFirstResponder();
445
390
  else evt.allowDefault();
446
391
  return YES ; // handled
447
- }
392
+ }
448
393
  if (evt.which === 13) {
449
- this.triggerAction(evt);
394
+ this.triggerActionAfterDelay(evt);
450
395
  return YES ; // handled
451
396
  }
452
- return NO;
397
+ return NO;
453
398
  },
454
399
 
455
400
  /** @private Perform an action based on the behavior of the button.
456
-
401
+
457
402
  - toggle behavior: switch to on/off state
458
403
  - on behavior: turn on.
459
404
  - off behavior: turn off.
@@ -461,7 +406,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
461
406
  */
462
407
  _action: function(evt, skipHoldRepeat) {
463
408
  switch(this.get('buttonBehavior')) {
464
-
409
+
465
410
  // When toggling, try to invert like values. i.e. 1 => 0, etc.
466
411
  case SC.TOGGLE_BEHAVIOR:
467
412
  var sel = this.get('isSelected') ;
@@ -471,12 +416,12 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
471
416
  this.set('value', this.get('toggleOnValue')) ;
472
417
  }
473
418
  break ;
474
-
419
+
475
420
  // set value to on. change 0 => 1.
476
421
  case SC.TOGGLE_ON_BEHAVIOR:
477
422
  this.set('value', this.get('toggleOnValue')) ;
478
423
  break ;
479
-
424
+
480
425
  // set the value to false. change 1 => 0
481
426
  case SC.TOGGLE_OFF_BEHAVIOR:
482
427
  this.set('value', this.get('toggleOffValue')) ;
@@ -498,7 +443,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
498
443
  var action = this.get('action'),
499
444
  target = this.get('target') || null,
500
445
  rootResponder = this.getPath('pane.rootResponder');
501
-
446
+
502
447
  if (action) {
503
448
  if (this._hasLegacyActionHandler()) {
504
449
  // old school... V
@@ -506,7 +451,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
506
451
  } else {
507
452
  if (rootResponder) {
508
453
  // newer action method + optional target syntax...
509
- rootResponder.sendAction(action, target, this, this.get('pane'));
454
+ rootResponder.sendAction(action, target, this, this.get('pane'), null, this);
510
455
  }
511
456
  }
512
457
  }
@@ -525,7 +470,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
525
470
  }
526
471
  }
527
472
  },
528
-
473
+
529
474
  /** @private */
530
475
  _hasLegacyActionHandler: function()
531
476
  {
@@ -539,7 +484,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
539
484
  _triggerLegacyActionHandler: function( evt )
540
485
  {
541
486
  if (!this._hasLegacyActionHandler()) return false;
542
-
487
+
543
488
  var action = this.get('action');
544
489
  if (SC.typeOf(action) === SC.T_FUNCTION) this.action(evt);
545
490
  if (SC.typeOf(action) === SC.T_STRING) {
@@ -547,29 +492,28 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
547
492
  this.action(evt);
548
493
  }
549
494
  },
550
-
495
+
551
496
  /** tied to the isEnabled state */
552
497
  acceptsFirstResponder: function() {
553
498
  if(!SC.SAFARI_FOCUS_BEHAVIOR) return this.get('isEnabled');
554
499
  else return NO;
555
500
  }.property('isEnabled'),
556
-
501
+
557
502
  willBecomeKeyResponderFrom: function(keyView) {
558
503
  // focus the text field.
559
504
  if (!this._isFocused) {
560
505
  this._isFocused = YES ;
561
506
  this.becomeFirstResponder();
562
507
  if (this.get('isVisibleInWindow')) {
563
- var elem=this.$()[0];
564
- if (elem) elem.focus();
508
+ this.$().focus();
565
509
  }
566
510
  }
567
511
  },
568
-
512
+
569
513
  willLoseKeyResponderTo: function(responder) {
570
514
  if (this._isFocused) this._isFocused = NO ;
571
515
  },
572
-
516
+
573
517
  didAppendToDocument: function() {
574
518
  if(parseInt(SC.browser.msie, 0)===7 && this.get('useStaticLayout')){
575
519
  var layout = this.get('layout'),
@@ -585,7 +529,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
585
529
  if(!paddingLeft && isNaN(paddingLeft)) paddingLeft = 0;
586
530
  if(!marginRight && isNaN(marginRight)) marginRight = 0;
587
531
  if(!marginLeft && isNaN(marginLeft)) marginLeft = 0;
588
-
532
+
589
533
  this._labelMinWidthIE7 = w-(paddingRight + paddingLeft)-(marginRight + marginLeft);
590
534
  label.css('minWidth', this._labelMinWidthIE7+'px');
591
535
  }else{
@@ -593,7 +537,7 @@ SC.ButtonView = SC.View.extend(SC.Control, SC.Button, SC.StaticLayout,
593
537
  }
594
538
  }
595
539
  }
596
-
540
+
597
541
  }) ;
598
542
 
599
543
  // ..........................................................
@@ -617,3 +561,4 @@ SC.ButtonView.CLICK_AND_HOLD_DELAY = SC.browser.msie ? 600 : 300;
617
561
 
618
562
  SC.REGULAR_BUTTON_HEIGHT=24;
619
563
 
564
+ SC.ButtonView.hasGivenDeprecationWarning = NO;