sproutcore 1.7.1.beta → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (445) hide show
  1. data/CHANGELOG +44 -0
  2. data/README.rdoc +20 -20
  3. data/VERSION.yml +3 -3
  4. data/lib/Buildfile +1 -1
  5. data/lib/buildtasks/build.rake +5 -0
  6. data/lib/buildtasks/manifest.rake +19 -1
  7. data/lib/frameworks/sproutcore/Buildfile +19 -17
  8. data/lib/frameworks/sproutcore/CHANGELOG.md +163 -29
  9. data/lib/frameworks/sproutcore/README.md +29 -8
  10. data/lib/frameworks/sproutcore/apps/statechart_routing/Buildfile +12 -0
  11. data/lib/frameworks/sproutcore/apps/statechart_routing/controllers/login_controller.js +11 -0
  12. data/lib/frameworks/sproutcore/apps/statechart_routing/controllers/main_controller.js +7 -0
  13. data/lib/frameworks/sproutcore/apps/statechart_routing/controllers/statechart_controller.js +17 -0
  14. data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +25 -0
  15. data/lib/frameworks/sproutcore/apps/statechart_routing/main.js +15 -0
  16. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/_theme.css +18 -0
  17. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/bar_page.js +14 -0
  18. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/foo_page.js +14 -0
  19. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/loading.rhtml +9 -0
  20. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +61 -0
  21. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/main_page.js +46 -0
  22. data/lib/frameworks/sproutcore/apps/statechart_routing/statechart.js +76 -0
  23. data/lib/frameworks/sproutcore/apps/statechart_routing/theme.js +27 -0
  24. data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +1 -1
  25. data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +1 -1
  26. data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +1 -1
  27. data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +1 -1
  28. data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +1 -1
  29. data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +1 -1
  30. data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +1 -1
  31. data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +14 -1
  32. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +15 -15
  33. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +1 -1
  34. data/lib/frameworks/sproutcore/frameworks/animation/core.js +8 -5
  35. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +302 -70
  36. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +19 -14
  37. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +471 -149
  38. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +3 -3
  39. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +42 -0
  40. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +3 -2
  41. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/string.js +7 -0
  42. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/action_support.js +1 -1
  43. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/delegate_support.js +2 -2
  44. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/responder_context.js +3 -3
  45. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +1 -1
  46. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +63 -0
  47. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/keyboard.js +1 -1
  48. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +37 -2
  49. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +28 -6
  50. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +10 -3
  51. data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/sparse_array_delegate.js +2 -2
  52. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +66 -2
  53. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/builder.js +1 -1
  54. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +1 -1
  55. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +58 -57
  56. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +1 -1
  57. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js.orig +445 -0
  58. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +51 -31
  59. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +5 -1
  60. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +53 -69
  61. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +1 -1
  62. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +98 -72
  63. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +37 -3
  64. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +7 -4
  65. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +21 -0
  66. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/content_destroyed.js +7 -7
  67. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/string.js +23 -1
  68. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/browser.js +66 -0
  69. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/event.js +22 -0
  70. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/locale.js +11 -11
  71. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +4 -4
  72. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/escape_html.js +41 -0
  73. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +1 -1
  74. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +8 -8
  75. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +17 -16
  76. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/selection_set/remove.js +1 -1
  77. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build_children.js +1 -1
  78. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/class_name_bindings_test.js +15 -0
  79. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +5 -5
  80. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +50 -30
  81. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +46 -0
  82. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +1 -43
  83. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +8 -34
  84. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +3 -2
  85. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +10 -1
  86. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +6 -5
  87. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +22 -2
  88. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +2 -2
  89. data/lib/frameworks/sproutcore/frameworks/datastore/mixins/relationship_support.js +1 -1
  90. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +0 -2
  91. data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +35 -0
  92. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +46 -19
  93. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +23 -9
  94. data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +2 -3
  95. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
  96. data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -2
  97. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +294 -302
  98. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js.orig +1531 -0
  99. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +4 -2
  100. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +14 -11
  101. data/lib/frameworks/sproutcore/frameworks/datastore/tests/integration/many_array.js +63 -0
  102. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +1 -1
  103. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +4 -4
  104. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +50 -10
  105. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +4 -4
  106. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +3 -3
  107. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +1 -1
  108. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +1 -1
  109. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +1 -1
  110. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +114 -67
  111. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +1 -1
  112. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +1 -1
  113. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/compare.js +54 -1
  114. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +29 -9
  115. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/parse.js +1 -1
  116. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +1 -1
  117. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +1 -1
  118. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +1 -1
  119. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +1 -1
  120. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +37 -45
  121. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/find.js +127 -127
  122. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +16 -0
  123. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushRelationships.js +42 -4
  124. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +1 -1
  125. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +13 -7
  126. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +8 -0
  127. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +2 -1
  128. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +1 -0
  129. data/lib/frameworks/sproutcore/frameworks/debug/core.js +3 -3
  130. data/lib/frameworks/sproutcore/frameworks/desktop/core.js +1 -1
  131. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
  132. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +1 -1
  133. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +1 -4
  134. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +19 -6
  135. data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +30 -1
  136. data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +1 -1
  137. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +24 -1
  138. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +121 -28
  139. data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +15 -15
  140. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +1 -1
  141. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
  142. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +2 -2
  143. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +39 -15
  144. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +3 -3
  145. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +2 -2
  146. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +2 -2
  147. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +14 -6
  148. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +3 -3
  149. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +11 -11
  150. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -3
  151. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +1 -51
  152. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +11 -16
  153. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-error-48.png +0 -0
  154. data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +0 -2
  155. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +3 -3
  156. data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +3 -3
  157. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +9 -9
  158. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/content.js +11 -11
  159. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +2 -1
  160. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +1 -1
  161. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +107 -81
  162. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowDelegate.js +3 -3
  163. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +68 -60
  164. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +57 -12
  165. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/integration.js +21 -19
  166. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroller.js +5 -0
  167. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +2 -2
  168. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +32 -3
  169. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +12 -0
  170. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +12 -0
  171. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +0 -8
  172. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +77 -132
  173. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +5 -6
  174. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +16 -15
  175. data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +52 -52
  176. data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +1 -1
  177. data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +1 -1
  178. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +147 -147
  179. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +11 -2
  180. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +2 -2
  181. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +5 -5
  182. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +22 -12
  183. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +13 -7
  184. data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +2 -2
  185. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +462 -441
  186. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +48 -62
  187. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +22 -2
  188. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +150 -32
  189. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +104 -45
  190. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +42 -20
  191. data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +24 -24
  192. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +148 -154
  193. data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +2 -2
  194. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +2 -2
  195. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +8 -7
  196. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -2
  197. data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +2 -0
  198. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/files.js +1 -1
  199. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/library.js +1 -1
  200. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/targets.js +1 -1
  201. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/controllers/view_configs.js +1 -1
  202. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/mixins/drop_down.js +1 -1
  203. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/states/ready.js +1 -1
  204. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/plist_item.js +1 -1
  205. data/lib/frameworks/sproutcore/frameworks/experimental/apps/greenhouse/views/web.js +1 -1
  206. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/controllers/page_design.js +2 -2
  207. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/css/css_style_sheet.js +2 -2
  208. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/object_designer.js +1 -1
  209. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/view_designer.js +2 -2
  210. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/mixins/snap_lines.js +3 -3
  211. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/designer_drop_target.js +1 -1
  212. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/drawing.js +21 -21
  213. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/views/page_item_view.js +1 -1
  214. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +59 -53
  215. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/menu/views/menu/scroll.js +2 -2
  216. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +1 -1
  217. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/views/core_scroll.js +6 -6
  218. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/views/desktop/scroll.js +2 -2
  219. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/views/touch/scroll.js +2 -2
  220. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +14 -10
  221. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu_item.js +17 -6
  222. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/popup_button.js +38 -14
  223. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +5 -13
  224. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_child.js +1 -1
  225. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_thumb.js +5 -3
  226. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/children.js +19 -0
  227. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +20 -2
  228. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/split_thumb.js +1 -1
  229. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +35 -12
  230. data/lib/frameworks/sproutcore/frameworks/formatters/README +6 -0
  231. data/lib/frameworks/sproutcore/frameworks/formatters/english.lproj/strings.js +174 -0
  232. data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +351 -0
  233. data/lib/frameworks/sproutcore/frameworks/formatters/tests/date_formatter.js +517 -0
  234. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +1 -1
  235. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +345 -138
  236. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +5 -3
  237. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +176 -42
  238. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +1 -1
  239. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +137 -105
  240. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +2 -2
  241. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +2 -2
  242. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor.js +16 -1
  243. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +1 -1
  244. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +47 -47
  245. data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +3 -3
  246. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/helpers/sizing.js +1 -1
  247. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +28 -6
  248. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +1 -1
  249. data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +0 -5
  250. data/lib/frameworks/sproutcore/frameworks/foundation/resources/bootstrap.rhtml +34 -19
  251. data/lib/frameworks/sproutcore/frameworks/foundation/resources/button_view.css +0 -2
  252. data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +1 -5
  253. data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +8 -9
  254. data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -2
  255. data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +179 -47
  256. data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +34 -1
  257. data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +1 -1
  258. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +26 -12
  259. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +7 -7
  260. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +12 -4
  261. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_metric_optimization.js +202 -0
  262. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_value_support/content.js +77 -8
  263. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +1 -0
  264. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/beginEditing.js +2 -2
  265. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/commitEditing.js +4 -3
  266. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editable/discardEditing.js +4 -2
  267. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/beginEditing.js +2 -2
  268. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/commitEditing.js +4 -2
  269. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_editor/discardEditing.js +4 -2
  270. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +2 -2
  271. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +0 -8
  272. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +163 -149
  273. data/lib/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +1 -1
  274. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +1 -1
  275. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +1 -1
  276. data/lib/frameworks/sproutcore/frameworks/foundation/validators/password.js +1 -1
  277. data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +3 -3
  278. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +16 -43
  279. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +4 -3
  280. data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +67 -54
  281. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +49 -38
  282. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +285 -242
  283. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +13 -13
  284. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +19 -22
  285. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +9 -3
  286. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +231 -186
  287. data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +145 -143
  288. data/lib/frameworks/sproutcore/frameworks/media/views/video.js +156 -154
  289. data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.js +5 -5
  290. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +3 -3
  291. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js.orig +540 -0
  292. data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +2 -2
  293. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +15 -8
  294. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/base.js +5 -5
  295. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/replace.js +12 -0
  296. data/lib/frameworks/sproutcore/frameworks/runtime/ext/function.js +2 -2
  297. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +1 -1
  298. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +1 -1
  299. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +7 -7
  300. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +98 -32
  301. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +7 -2
  302. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +14 -3
  303. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +98 -13
  304. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +8 -14
  305. data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +1 -1
  306. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +2 -2
  307. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +23 -6
  308. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +69 -18
  309. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +57 -31
  310. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +189 -14
  311. data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +82 -22
  312. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +20 -0
  313. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +125 -4
  314. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue.js +1 -1
  315. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +2 -2
  316. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/rangeStartForIndex.js +37 -0
  317. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +2 -2
  318. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/logger.js +16 -0
  319. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +75 -4
  320. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +41 -0
  321. data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart_delegate.js +113 -0
  322. data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +312 -0
  323. data/lib/frameworks/sproutcore/frameworks/statechart/system/async.js +18 -22
  324. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +508 -131
  325. data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +78 -0
  326. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +265 -44
  327. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +16 -0
  328. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/responder/responder_chain.js +11 -3
  329. data/lib/frameworks/sproutcore/frameworks/statechart/tests/private/state_path_matcher.js +116 -0
  330. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/add_substate.js +108 -0
  331. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/find_first_relative_current_state/with_concurrent.js +179 -0
  332. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/find_first_relative_current_state/without_concurrent.js +74 -0
  333. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/get_state.js +141 -0
  334. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/get_substate.js +340 -0
  335. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/route_triggered.js +161 -0
  336. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/methods/try_to_handle_event.js +288 -0
  337. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/history_state/standard/without_concurrent_states/context.js +5 -33
  338. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +213 -0
  339. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +212 -0
  340. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/without_concurrent_states/core.js +8 -0
  341. data/lib/frameworks/sproutcore/frameworks/statechart/tests/{state/namespacing.js → statechart/methods/get_state.js} +3 -41
  342. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/{invoke_state_method.js → methods/invoke_state_method.js} +1 -1
  343. data/lib/frameworks/sproutcore/frameworks/statechart/tests/{event_handling/advanced → statechart}/respond_to_event.js +1 -1
  344. data/lib/frameworks/sproutcore/frameworks/statechart/tests/system/state_route_handler_context/methods/retry.js +64 -0
  345. data/lib/frameworks/sproutcore/frameworks/table/core.js +2 -0
  346. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/controls/button.js +0 -1
  347. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/ext/handlebars.js +29 -5
  348. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/ext/handlebars/bind.js +4 -3
  349. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/ext/handlebars/collection.js +0 -0
  350. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/ext/handlebars/localization.js +0 -0
  351. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/ext/handlebars/view.js +0 -0
  352. data/lib/frameworks/sproutcore/frameworks/{handlebars → template_view}/handlebars.js +493 -357
  353. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/mixins/template_helpers/checkbox_support.js +0 -0
  354. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/mixins/template_helpers/text_field_support.js +13 -2
  355. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/panes/template.js +0 -0
  356. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/controls/button.js +0 -0
  357. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/mixins/template_helpers/checkbox_support.js +0 -0
  358. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/mixins/template_helpers/text_field_support.js +0 -0
  359. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/panes/template.js +0 -0
  360. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/views/template/collection.js +39 -14
  361. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/views/template/core.js +0 -0
  362. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/tests/views/template/handlebars.js +57 -6
  363. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/views/bindable_span.js +21 -6
  364. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/views/template.js +9 -3
  365. data/lib/frameworks/sproutcore/frameworks/{core_foundation → template_view}/views/template_collection.js +55 -26
  366. data/lib/frameworks/sproutcore/frameworks/testing/system/equiv.js +1 -1
  367. data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +122 -122
  368. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -2
  369. data/lib/frameworks/sproutcore/frameworks/testing/system/suite.js +4 -4
  370. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/base.css +1 -1
  371. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/reset.css +0 -1
  372. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/view.css +4 -4
  373. data/lib/frameworks/sproutcore/lib/index.rhtml +55 -32
  374. data/lib/frameworks/sproutcore/license.js +2 -4
  375. data/lib/frameworks/sproutcore/themes/ace/resources/body.css +5 -1
  376. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +2 -2
  377. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +21 -13
  378. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +17 -10
  379. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +4 -3
  380. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +20 -12
  381. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +16 -8
  382. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/jumbo/button.css +17 -0
  383. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/small/button.css +17 -0
  384. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +2 -2
  385. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +2 -2
  386. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +5 -3
  387. data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/core.css +1 -1
  388. data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/toolbar.css +1 -1
  389. data/lib/gen/app/USAGE +17 -4
  390. data/lib/gen/language/Buildfile +4 -4
  391. data/lib/gen/language/USAGE +4 -4
  392. data/lib/gen/page/templates/pages/@target_name@/Buildfile +7 -7
  393. data/lib/gen/{html_app → statechart_app}/Buildfile +0 -0
  394. data/lib/gen/{html_app → statechart_app}/README +0 -0
  395. data/lib/gen/statechart_app/USAGE +21 -0
  396. data/lib/gen/statechart_app/templates/apps/@target_name@/Buildfile +9 -0
  397. data/lib/gen/statechart_app/templates/apps/@target_name@/core.js +24 -0
  398. data/lib/gen/statechart_app/templates/apps/@target_name@/main.js +26 -0
  399. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/_theme.css +18 -0
  400. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/loading.rhtml +9 -0
  401. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.js +21 -0
  402. data/lib/gen/statechart_app/templates/apps/@target_name@/statechart.js +8 -0
  403. data/lib/gen/statechart_app/templates/apps/@target_name@/states/ready_state.js +12 -0
  404. data/lib/gen/statechart_app/templates/apps/@target_name@/theme.js +24 -0
  405. data/lib/sproutcore/builders.rb +1 -0
  406. data/lib/sproutcore/builders/base.rb +19 -1
  407. data/lib/sproutcore/builders/chance_file.rb +6 -1
  408. data/lib/sproutcore/builders/handlebars.rb +1 -9
  409. data/lib/sproutcore/builders/javascript.rb +1 -10
  410. data/lib/sproutcore/builders/json.rb +25 -0
  411. data/lib/sproutcore/builders/less.rb +1 -1
  412. data/lib/sproutcore/builders/sass.rb +1 -1
  413. data/lib/sproutcore/builders/stylesheet.rb +1 -9
  414. data/lib/sproutcore/helpers/html5_manifest.rb +1 -1
  415. data/lib/sproutcore/helpers/static_helper.rb +42 -0
  416. data/lib/sproutcore/rack/proxy.rb +21 -3
  417. data/lib/sproutcore/rack/service.rb +3 -2
  418. data/lib/sproutcore/tools.rb +18 -25
  419. data/lib/sproutcore/tools/gen.rb +10 -3
  420. data/lib/sproutcore/tools/init.rb +11 -10
  421. data/spec/buildtasks/manifest/prepare_build_tasks/json_spec.rb +62 -0
  422. data/spec/fixtures/builder_tests/apps/handlebars_test/Buildfile +1 -1
  423. data/spec/fixtures/builder_tests/apps/json_test/sc_static.json +2 -0
  424. data/spec/lib/builders/json_spec.rb +53 -0
  425. data/sproutcore.gemspec +2 -2
  426. data/vendor/chance/lib/chance/parser.rb +1 -1
  427. metadata +222 -177
  428. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/datetime.js +0 -0
  429. data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +0 -259
  430. data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
  431. data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +0 -69
  432. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/editable/ui.js +0 -44
  433. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/ui.js +0 -64
  434. data/lib/frameworks/sproutcore/frameworks/mini/license.js +0 -30
  435. data/lib/gen/html_app/USAGE +0 -15
  436. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +0 -11
  437. data/lib/gen/html_app/templates/apps/@target_name@/resources/images/.gitkeep +0 -0
  438. data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +0 -6
  439. data/lib/gen/html_app/templates/apps/@target_name@/resources/templates/@target_name@.handlebars +0 -1
  440. data/lib/gen/html_project/Buildfile +0 -45
  441. data/lib/gen/html_project/INIT +0 -3
  442. data/lib/gen/html_project/README +0 -1
  443. data/lib/gen/html_project/USAGE +0 -2
  444. data/lib/gen/html_project/templates/@filename@/Buildfile +0 -5
  445. data/lib/gen/html_project/templates/@filename@/README +0 -4
@@ -142,8 +142,8 @@ SC.SliderView = SC.View.extend(SC.Control,
142
142
  if (!this.get('isEnabled')) return YES;
143
143
  var min = this.get('minimum'),
144
144
  max = this.get('maximum'),
145
- newVal = this.get('value')+((evt.wheelDeltaX+evt.wheelDeltaY)*0.01),
146
145
  step = this.get('step'),
146
+ newVal = this.get('value')+((evt.wheelDeltaX+evt.wheelDeltaY)*step),
147
147
  value = Math.round(newVal / step) * step ;
148
148
  if (newVal< min) this.setIfChanged('value', min);
149
149
  else if (newVal> max) this.setIfChanged('value', max);
@@ -216,7 +216,6 @@ SC.SliderView = SC.View.extend(SC.Control,
216
216
  }.property('isEnabled'),
217
217
 
218
218
  keyDown: function(evt) {
219
-
220
219
  // handle tab key
221
220
  if (evt.which === 9 || evt.keyCode === 9) {
222
221
  var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView');
@@ -224,38 +223,43 @@ SC.SliderView = SC.View.extend(SC.Control,
224
223
  else evt.allowDefault();
225
224
  return YES ; // handled
226
225
  }
227
-
228
- if (evt.which >= 37 && evt.which <= 40){
226
+ if (evt.which >= 33 && evt.which <= 40){
229
227
  var min = this.get('minimum'),max=this.get('maximum'),
230
228
  step = this.get('step'),
231
- size = max-min, val=0, calculateStep;
229
+ size = max-min, val=0, calculateStep, current=this.get('value');
232
230
 
233
- if (evt.which === 37 || evt.which === 38 ){
231
+ if (evt.which === 37 || evt.which === 38 || evt.which === 34 ){
234
232
  if(step === 0){
235
233
  if(size<100){
236
- val = this.get('value')-1;
234
+ val = current-1;
237
235
  }else{
238
236
  calculateStep = Math.abs(size/100);
239
- if(calculateStep<2) calculateStep =2;
240
- val = this.get('value')-Math.abs(size/100);
237
+ if(calculateStep<2) calculateStep = 2;
238
+ val = current-calculateStep;
241
239
  }
242
240
  }else{
243
- val = this.get('value')-step;
241
+ val = current-step;
244
242
  }
245
243
  }
246
- if (evt.which === 39 || evt.which === 40 ){
244
+ if (evt.which === 39 || evt.which === 40 || evt.which === 33 ){
247
245
  if(step === 0){
248
246
  if(size<100){
249
- val = this.get('value') + 2;
247
+ val = current + 2;
250
248
  }else{
251
249
  calculateStep = Math.abs(size/100);
252
250
  if(calculateStep<2) calculateStep =2;
253
- val = this.get('value')+calculateStep;
251
+ val = current+calculateStep;
254
252
  }
255
253
  }else{
256
- val = this.get('value')+step;
254
+ val = current+step;
257
255
  }
258
256
  }
257
+ if (evt.which === 36){
258
+ val=max;
259
+ }
260
+ if (evt.which === 35){
261
+ val=min;
262
+ }
259
263
  if(val>=min && val<=max) this.set('value', val);
260
264
  }else{
261
265
  evt.allowDefault();
@@ -264,14 +268,10 @@ SC.SliderView = SC.View.extend(SC.Control,
264
268
  return YES;
265
269
  },
266
270
 
267
- contentPropertyDidChange: function(target, key) {
268
- var content = this.get('content');
269
- this.beginPropertyChanges()
270
- .updatePropertyFromContent('value', key, 'contentValueKey', content)
271
- .updatePropertyFromContent('minimum', key, 'contentMinimumKey', content)
272
- .updatePropertyFromContent('maximum', key, 'contentMaximumKey', content)
273
- .updatePropertyFromContent('isIndeterminate', key, 'contentIsIndeterminateKey', content)
274
- .endPropertyChanges();
275
- }
276
-
271
+ contentKeys: {
272
+ 'contentValueKey': 'value',
273
+ 'contentMinimumKey': 'minimum',
274
+ 'contentMaximumKey': 'maximum',
275
+ 'contentIsIndeterminateKey': 'isIndeterminate'
276
+ }
277
277
  });
@@ -13,54 +13,54 @@ SC.RESIZE_BOTTOM_RIGHT = 'resize-bottom-right';
13
13
 
14
14
  /**
15
15
  @class
16
-
16
+
17
17
  A split view is used to show views that the user can resize or collapse.
18
18
  To use a split view you need to set a topLeftView, a bottomRightView and,
19
19
  optionally, a splitDividerView. You can also set various other properties
20
20
  to control the minimum and maximum thickness allowed for the flexible views.
21
-
21
+
22
22
  ## Example
23
-
23
+
24
24
  SC.SplitView.design({
25
-
25
+
26
26
  // the left view...
27
27
  topLeftView: SC.View.design({
28
28
  // view contents
29
29
  }),
30
-
30
+
31
31
  // the right view
32
32
  bottomRightView: SC.View.design({
33
33
  // view contents
34
34
  })
35
-
35
+
36
36
  })
37
-
37
+
38
38
  When the user clicks and drags on a split divider view, it will
39
39
  automatically resize the views immediately before and after the split
40
40
  divider view. You can constrain the resizing allowed by the split view
41
41
  either by setting a minThickness and maxThickness property on the views
42
42
  themselves or by implementing the method splitViewConstrainThickness on
43
43
  a delegate object.
44
-
44
+
45
45
  In addition to resizing views, users can also collapse views by double
46
46
  clicking on a split divider view. When a view is collapsed, it's isVisible
47
47
  property is set to NO and its space it removed from the view. Double
48
48
  clicking on a divider again will restore a collapsed view. A user can also
49
49
  start to drag the divider to show the collapsed view.
50
-
51
- You can programmatically control collapsing behavior using various
52
- properties on either the split view or its child views, and/or by
50
+
51
+ You can programmatically control collapsing behavior using various
52
+ properties on either the split view or its child views, and/or by
53
53
  implementing the method splitViewCanCollapse on a delegate object.
54
-
54
+
55
55
  Finally, SplitViews can layout their child views either horizontally or
56
56
  vertically. To choose the direction of layout set the layoutDirection
57
57
  property on the view (or the :direction option with the view helper).
58
58
  This property should be set when the view is created. Changing it
59
59
  dynamically will have an unknown effect.
60
-
60
+
61
61
  In addition, the top/left and bottom/right child views can have these
62
62
  properties:
63
-
63
+
64
64
  @extends SC.View
65
65
  @since SproutCore 1.0
66
66
  @author Charles Jolley
@@ -69,52 +69,52 @@ SC.RESIZE_BOTTOM_RIGHT = 'resize-bottom-right';
69
69
  */
70
70
  SC.SplitView = SC.View.extend(
71
71
  /** @scope SC.SplitView.prototype */ {
72
-
72
+
73
73
  classNames: ['sc-split-view'],
74
-
74
+
75
75
  displayProperties: ['layoutDirection'],
76
-
76
+
77
77
  /**
78
78
  delegate for controlling split view behavior.
79
79
  */
80
80
  delegate: null,
81
-
81
+
82
82
  /**
83
83
  Direction of layout. Must be SC.LAYOUT_HORIZONTAL or SC.LAYOUT_VERTICAL.
84
-
84
+
85
85
  @type String
86
86
  @default SC.LAYOUT_HORIZONTAL
87
87
  */
88
88
  layoutDirection: SC.LAYOUT_HORIZONTAL,
89
-
89
+
90
90
  /**
91
91
  Set to NO to disable collapsing for all views.
92
-
92
+
93
93
  @type Boolean
94
94
  @default YES
95
95
  */
96
96
  canCollapseViews: YES,
97
-
97
+
98
98
  /*
99
- Configure which view(s) you want to autoresize when this split view's
99
+ Configure which view(s) you want to autoresize when this split view's
100
100
  layout changes. Possible options are:
101
-
101
+
102
102
  | SC.RESIZE_BOTTOM_RIGHT | (default) resizes bottomRightView |
103
103
  | SC.RESIZE_TOP_LEFT | resized topLeftView |
104
-
104
+
105
105
  @type String
106
106
  @default SC.RESIZE_BOTTOM_RIGHT
107
107
  */
108
108
  autoresizeBehavior: SC.RESIZE_BOTTOM_RIGHT,
109
-
109
+
110
110
  /**
111
111
  Specifies how much space the fixed view should use when the view is setup.
112
- A number less than one will be treated as a percentage, while a number
112
+ A number less than one will be treated as a percentage, while a number
113
113
  greater than one will be treated as a pixel width.
114
-
115
- The thickness will be applied to the opposite view defined by
114
+
115
+ The thickness will be applied to the opposite view defined by
116
116
  autoresizeBehavior.
117
-
117
+
118
118
  @type Number
119
119
  @default 0.5
120
120
  */
@@ -159,18 +159,18 @@ SC.SplitView = SC.View.extend(
159
159
  @default null
160
160
  */
161
161
  dividerThickness: null,
162
-
162
+
163
163
  /**
164
164
  Yes, we're a split view.
165
-
165
+
166
166
  @type Boolean
167
167
  @default YES
168
168
  */
169
169
  isSplitView: YES,
170
-
170
+
171
171
  /**
172
172
  The view to use for the top left
173
-
173
+
174
174
  @type SC.View
175
175
  @default SC.View
176
176
  */
@@ -178,23 +178,23 @@ SC.SplitView = SC.View.extend(
178
178
 
179
179
  /**
180
180
  The view to use for the divider
181
-
181
+
182
182
  @type SC.View
183
183
  @default SC.SplitDividerView
184
184
  */
185
185
  dividerView: SC.SplitDividerView,
186
-
186
+
187
187
  /**
188
188
  The view to use for the bottom right
189
-
189
+
190
190
  @type SC.View
191
191
  @default SC.View
192
192
  */
193
193
  bottomRightView: SC.View,
194
-
194
+
195
195
  /**
196
196
  The current thickness for the topLeftView
197
-
197
+
198
198
  @type Number
199
199
  @isReadOnly
200
200
  */
@@ -205,7 +205,7 @@ SC.SplitView = SC.View.extend(
205
205
 
206
206
  /**
207
207
  The current thickness for the bottomRightView
208
-
208
+
209
209
  @type Number
210
210
  @isReadOnly
211
211
  */
@@ -213,28 +213,28 @@ SC.SplitView = SC.View.extend(
213
213
  var view = this.get('bottomRightView');
214
214
  return view ? this.thicknessForView(view) : 0;
215
215
  }.property('bottomRightView').cacheable(),
216
-
216
+
217
217
  /**
218
218
  The cursor thumb views should use for themselves
219
-
219
+
220
220
  @type SC.Cursor
221
221
  @default null
222
222
  */
223
223
  thumbViewCursor: null,
224
-
224
+
225
225
  /**
226
226
  Used by split divider to decide if the view can be collapsed.
227
-
227
+
228
228
  @type Boolean
229
229
  @isReadOnly
230
230
  */
231
231
  canCollapseView: function(view) {
232
232
  return this.invokeDelegateMethod(this.delegate, 'splitViewCanCollapse', this, view);
233
233
  },
234
-
234
+
235
235
  /**
236
236
  Returns the thickness for a given view.
237
-
237
+
238
238
  @param {SC.View} view the view to get.
239
239
  @returns the view with the width.
240
240
  */
@@ -243,11 +243,11 @@ SC.SplitView = SC.View.extend(
243
243
  ret = view.get('frame');
244
244
  return (direction === SC.LAYOUT_HORIZONTAL) ? ret.width : ret.height;
245
245
  },
246
-
246
+
247
247
  /** @private
248
248
  Creates the topLeftView/dividerView/bottomRightView and adds them to the
249
249
  childViews array
250
-
250
+
251
251
  @returns SC.View the SplitDivider view (this)
252
252
  */
253
253
  createChildViews: function() {
@@ -255,7 +255,7 @@ SC.SplitView = SC.View.extend(
255
255
  views = ['topLeftView', 'dividerView', 'bottomRightView'],
256
256
  l = views.length,
257
257
  view, i;
258
-
258
+
259
259
  for (i=0; i<l; ++i) {
260
260
  if (view = this.get(views[i])) {
261
261
  view = this[views[i]] = this.createChildView(view, {
@@ -265,14 +265,14 @@ SC.SplitView = SC.View.extend(
265
265
  childViews.push(view);
266
266
  }
267
267
  }
268
-
268
+
269
269
  this.set('childViews', childViews);
270
270
  return this;
271
271
  },
272
-
272
+
273
273
  /** @private
274
274
  Layout the views.
275
-
275
+
276
276
  This method needs to be called anytime you change the view thicknesses
277
277
  to make sure they are arranged properly. This will set up the views so
278
278
  that they can resize appropriately.
@@ -289,19 +289,19 @@ SC.SplitView = SC.View.extend(
289
289
  splitViewThickness = (direction === SC.LAYOUT_HORIZONTAL) ? frame.width : frame.height,
290
290
  bottomRightThickness = splitViewThickness - dividerThickness - topLeftThickness,
291
291
  layout, isCollapsed;
292
-
292
+
293
293
  dividerThickness = (!SC.none(dividerThickness)) ? dividerThickness : 7;
294
-
294
+
295
295
  // top/left view
296
296
  isCollapsed = topLeftView.get('isCollapsed') || NO;
297
297
  topLeftView.setIfChanged('isVisible', !isCollapsed);
298
298
  layout = SC.clone(topLeftView.get('layout'));
299
-
299
+
300
300
  if (direction === SC.LAYOUT_HORIZONTAL) {
301
301
  layout.top = 0;
302
302
  layout.left = 0;
303
303
  layout.bottom = 0;
304
-
304
+
305
305
  switch (autoresizeBehavior) {
306
306
  case SC.RESIZE_BOTH:
307
307
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -319,7 +319,7 @@ SC.SplitView = SC.View.extend(
319
319
  layout.top = 0;
320
320
  layout.left = 0;
321
321
  layout.right = 0;
322
-
322
+
323
323
  switch (autoresizeBehavior) {
324
324
  case SC.RESIZE_BOTH:
325
325
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -335,17 +335,17 @@ SC.SplitView = SC.View.extend(
335
335
  }
336
336
  }
337
337
  topLeftView.set('layout', layout);
338
-
338
+
339
339
  // split divider view
340
340
  if (dividerView) {
341
341
  layout = SC.clone(dividerView.get('layout'));
342
-
342
+
343
343
  if (direction === SC.LAYOUT_HORIZONTAL) {
344
344
  layout.width = dividerThickness;
345
345
  layout.top = 0;
346
346
  layout.bottom = 0;
347
347
  delete layout.height;
348
-
348
+
349
349
  switch (autoresizeBehavior) {
350
350
  case SC.RESIZE_BOTH:
351
351
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -372,7 +372,7 @@ SC.SplitView = SC.View.extend(
372
372
  layout.left = 0;
373
373
  layout.right = 0;
374
374
  delete layout.width;
375
-
375
+
376
376
  switch (autoresizeBehavior) {
377
377
  case SC.RESIZE_BOTH:
378
378
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -397,17 +397,17 @@ SC.SplitView = SC.View.extend(
397
397
  }
398
398
  dividerView.set('layout', layout);
399
399
  }
400
-
400
+
401
401
  // bottom/right view
402
402
  isCollapsed = bottomRightView.get('isCollapsed') || NO;
403
403
  bottomRightView.setIfChanged('isVisible', !isCollapsed);
404
404
  layout = SC.clone(bottomRightView.get('layout'));
405
-
405
+
406
406
  if (direction === SC.LAYOUT_HORIZONTAL) {
407
407
  layout.top = 0;
408
408
  layout.bottom = 0;
409
409
  layout.right = 0;
410
-
410
+
411
411
  switch (autoresizeBehavior) {
412
412
  case SC.RESIZE_BOTH:
413
413
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -424,7 +424,7 @@ SC.SplitView = SC.View.extend(
424
424
  layout.left = 0;
425
425
  layout.right = 0;
426
426
  layout.bottom = 0;
427
-
427
+
428
428
  switch (autoresizeBehavior) {
429
429
  case SC.RESIZE_BOTH:
430
430
  throw "SC.RESIZE_BOTH is currently unsupported.";
@@ -439,16 +439,16 @@ SC.SplitView = SC.View.extend(
439
439
  }
440
440
  }
441
441
  bottomRightView.set('layout', layout);
442
-
442
+
443
443
  this
444
444
  .notifyPropertyChange('topLeftThickness')
445
445
  .notifyPropertyChange('bottomRightThickness');
446
446
  },
447
-
447
+
448
448
  /** @private */
449
449
  renderLayout: function(context, firstTime) {
450
450
  if (firstTime || this._recalculateDivider) {
451
-
451
+
452
452
  var layoutDirection = this.get('layoutDirection'),
453
453
  frame = this.get('frame'),
454
454
  elem = this.$(),
@@ -456,39 +456,39 @@ SC.SplitView = SC.View.extend(
456
456
  autoResizeBehavior = this.get('autoresizeBehavior'),
457
457
  dividerThickness = this.get('dividerThickness'),
458
458
  splitViewThickness;
459
-
459
+
460
460
  if (!this.get('thumbViewCursor')) {
461
461
  this.set('thumbViewCursor', SC.Cursor.create());
462
462
  }
463
-
463
+
464
464
  dividerThickness = !SC.none(dividerThickness) ? dividerThickness : 7;
465
-
466
- // Turn a flag on to recalculate the spliting if the desired thickness
465
+
466
+ // Turn a flag on to recalculate the splitting if the desired thickness
467
467
  // is a percentage
468
468
  if (this._recalculateDivider === undefined && desiredThickness < 1) {
469
469
  this._recalculateDivider = YES;
470
470
  } else if (this._recalculateDivider) {
471
471
  this._recalculateDivider = NO;
472
472
  }
473
-
473
+
474
474
  if (elem[0]) {
475
475
  splitViewThickness = (layoutDirection === SC.LAYOUT_HORIZONTAL) ? elem[0].offsetWidth : elem[0].offsetHeight;
476
476
  } else {
477
477
  splitViewThickness = (layoutDirection === SC.LAYOUT_HORIZONTAL) ? frame.width : frame.height;
478
478
  }
479
-
479
+
480
480
  // if default thickness is < 1, convert from percentage to absolute
481
481
  if (SC.none(desiredThickness) || (desiredThickness > 0 && desiredThickness < 1)) {
482
482
  desiredThickness = Math.floor((splitViewThickness - (dividerThickness)) * (desiredThickness || 0.5));
483
483
  }
484
-
484
+
485
485
  if (autoResizeBehavior === SC.RESIZE_BOTTOM_RIGHT) {
486
486
  this._desiredTopLeftThickness = desiredThickness;
487
487
  } else {
488
488
  this._desiredTopLeftThickness = splitViewThickness - dividerThickness - desiredThickness ;
489
489
  }
490
-
491
- // make sure we don't exceed our min and max values, and that collapse
490
+
491
+ // make sure we don't exceed our min and max values, and that collapse
492
492
  // settings are respected
493
493
  // cached values are required by _updateTopLeftThickness() below...
494
494
  this._topLeftView = this.get('topLeftView');
@@ -497,46 +497,46 @@ SC.SplitView = SC.View.extend(
497
497
  this._bottomRightThickness = this.thicknessForView(this.get('bottomRightView'));
498
498
  this._dividerThickness = this.get('dividerThickness');
499
499
  this._layoutDirection = this.get('layoutDirection');
500
-
500
+
501
501
  // this handles min-max settings and collapse parameters
502
502
  this._updateTopLeftThickness(0);
503
-
503
+
504
504
  // update the cursor used by thumb views
505
505
  this._setCursorStyle();
506
-
506
+
507
507
  // actually set layout for our child views
508
508
  this.updateChildLayout();
509
509
  }
510
-
510
+
511
511
  sc_super();
512
512
  },
513
-
513
+
514
514
  /** @private */
515
515
  render: function(context, firstTime) {
516
516
  sc_super();
517
-
517
+
518
518
  if (this._inLiveResize) this._setCursorStyle();
519
-
519
+
520
520
  if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) context.addClass('sc-horizontal');
521
521
  else context.addClass('sc-vertical');
522
522
  },
523
-
523
+
524
524
  /** @private
525
525
  Update the split view's layout based on mouse movement.
526
-
526
+
527
527
  Call this method in the mouseDown: method of your thumb view. The split view
528
- will begin tracking the mouse and will update its own layout to reflect the movement
528
+ will begin tracking the mouse and will update its own layout to reflect the movement
529
529
  of the mouse. As a result, the position of your thumb view will also be updated.
530
-
530
+
531
531
  @returns {Boolean}
532
532
  */
533
533
  mouseDownInThumbView: function(evt, thumbView) {
534
534
  var responder = this.getPath('pane.rootResponder');
535
535
  if (!responder) return NO; // nothing to do
536
-
536
+
537
537
  // we're not the source view of the mouseDown:, so we need to capture events manually to receive them
538
538
  responder.dragDidStart(this);
539
-
539
+
540
540
  // cache for later
541
541
  this._mouseDownX = evt.pageX;
542
542
  this._mouseDownY = evt.pageY;
@@ -547,20 +547,20 @@ SC.SplitView = SC.View.extend(
547
547
  this._bottomRightThickness = this.thicknessForView(this.get('bottomRightView'));
548
548
  this._dividerThickness = this.get('dividerThickness');
549
549
  this._layoutDirection = this.get('layoutDirection');
550
-
550
+
551
551
  this.beginLiveResize();
552
552
  this._inLiveResize = YES;
553
-
553
+
554
554
  return YES;
555
555
  },
556
-
556
+
557
557
  /** @private */
558
558
  mouseDragged: function(evt) {
559
559
  var offset = (this._layoutDirection === SC.LAYOUT_HORIZONTAL) ? evt.pageX - this._mouseDownX : evt.pageY - this._mouseDownY ;
560
560
  this._updateTopLeftThickness(offset);
561
561
  return YES;
562
562
  },
563
-
563
+
564
564
  /** @private */
565
565
  mouseUp: function(evt) {
566
566
  if (this._inLiveResize === YES) {
@@ -569,38 +569,32 @@ SC.SplitView = SC.View.extend(
569
569
  this.endLiveResize();
570
570
  return YES;
571
571
  }
572
-
573
- var cursor = this.get('thumbViewCursor'),
574
- cloneCursor = SC.clone(cursor),
575
- dV= this.get('dividerView');
576
- cursor.set('cursorStyle', SC.SYSTEM_CURSOR);
577
- dV.set('cursor', cloneCursor);
578
- this.set('cursor', cursor);
579
-
572
+
573
+ this._setCursorStyle();
580
574
  return NO;
581
575
  },
582
-
576
+
583
577
  /** @private */
584
578
  touchesDragged: function(evt){
585
579
  return this.mouseDragged(evt);
586
580
  },
587
-
581
+
588
582
  /** @private */
589
583
  touchEnd: function(evt){
590
584
  return this.mouseUp(evt);
591
585
  },
592
-
586
+
593
587
  /** @private */
594
588
  doubleClickInThumbView: function(evt, thumbView) {
595
589
  var view = this._topLeftView,
596
590
  isCollapsed = view.get('isCollapsed') || NO;
597
-
591
+
598
592
  if (!isCollapsed && !this.canCollapseView(view)) {
599
593
  view = this._bottomRightView;
600
594
  isCollapsed = view.get('isCollapsed') || NO;
601
595
  if (!isCollapsed && !this.canCollapseView(view)) return NO;
602
596
  }
603
-
597
+
604
598
  if (!isCollapsed) {
605
599
  // remember thickness in it's uncollapsed state
606
600
  this._uncollapsedThickness = this.thicknessForView(view);
@@ -611,7 +605,7 @@ SC.SplitView = SC.View.extend(
611
605
  } else {
612
606
  this._updateBottomRightThickness(this.bottomRightThickness()*-1);
613
607
  }
614
-
608
+
615
609
  // if however the splitview decided not to collapse, clear:
616
610
  if (!view.get("isCollapsed")) {
617
611
  this._uncollapsedThickness = null;
@@ -628,13 +622,13 @@ SC.SplitView = SC.View.extend(
628
622
  this._setCursorStyle();
629
623
  return true;
630
624
  },
631
-
625
+
632
626
  /** @private */
633
627
  _updateTopLeftThickness: function(offset) {
634
628
  var topLeftView = this._topLeftView,
635
629
  bottomRightView = this._bottomRightView,
636
630
  // the current thickness, not the original thickness
637
- topLeftViewThickness = this.thicknessForView(topLeftView),
631
+ topLeftViewThickness = this.thicknessForView(topLeftView),
638
632
  bottomRightViewThickness = this.thicknessForView(bottomRightView),
639
633
  minAvailable = this._dividerThickness,
640
634
  maxAvailable = 0,
@@ -646,17 +640,17 @@ SC.SplitView = SC.View.extend(
646
640
  max = this.get('topLeftMaxThickness'),
647
641
  min = this.get('topLeftMinThickness'),
648
642
  bottomRightThickness, tlCollapseAtThickness, brCollapseAtThickness;
649
-
643
+
650
644
  if (!topLeftView.get("isCollapsed")) {
651
645
  maxAvailable += topLeftViewThickness;
652
646
  }
653
647
  if (!bottomRightView.get("isCollapsed")) {
654
648
  maxAvailable += bottomRightViewThickness;
655
649
  }
656
-
650
+
657
651
  if (!SC.none(max)) thickness = Math.min(max, thickness);
658
652
  if (!SC.none(min)) thickness = Math.max(min, thickness);
659
-
653
+
660
654
  // constrain to thickness set on bottom/right
661
655
  max = this.get('bottomRightMaxThickness');
662
656
  min = this.get('bottomRightMinThickness');
@@ -668,22 +662,22 @@ SC.SplitView = SC.View.extend(
668
662
  bottomRightThickness = Math.max(min, bottomRightThickness);
669
663
  }
670
664
  thickness = maxAvailable - bottomRightThickness;
671
-
665
+
672
666
  // constrain to thickness determined by delegate.
673
- thickness = this.invokeDelegateMethod(this.delegate,
667
+ thickness = this.invokeDelegateMethod(this.delegate,
674
668
  'splitViewConstrainThickness', this, topLeftView, thickness);
675
-
669
+
676
670
  // cannot be more than what's available
677
671
  thickness = Math.min(thickness, maxAvailable);
678
-
672
+
679
673
  // cannot be less than zero
680
674
  thickness = Math.max(0, thickness);
681
-
675
+
682
676
  tlCollapseAtThickness = topLeftView.get('collapseAtThickness');
683
677
  if (!tlCollapseAtThickness) tlCollapseAtThickness = 0;
684
678
  brCollapseAtThickness = bottomRightView.get('collapseAtThickness');
685
679
  brCollapseAtThickness = SC.none(brCollapseAtThickness) ? maxAvailable : (maxAvailable - brCollapseAtThickness);
686
-
680
+
687
681
  if ((proposedThickness <= tlCollapseAtThickness) && this.canCollapseView(topLeftView)) {
688
682
  // want to collapse top/left, check if this doesn't violate the max thickness of bottom/right
689
683
  max = bottomRightView.get('maxThickness');
@@ -699,21 +693,21 @@ SC.SplitView = SC.View.extend(
699
693
  thickness = maxAvailable;
700
694
  }
701
695
  }
702
-
696
+
703
697
  // now apply constrained value
704
698
  if (thickness != this.thicknessForView(topLeftView)) {
705
699
  this._desiredTopLeftThickness = thickness;
706
-
700
+
707
701
  // un-collapse if needed.
708
702
  topLeftView.set('isCollapsed', thickness === 0);
709
703
  bottomRightView.set('isCollapsed', thickness >= maxAvailable);
710
-
704
+
711
705
  this.updateChildLayout(); // updates child layouts
712
706
  this.displayDidChange(); // updates cursor
713
707
  }
714
708
  },
715
-
716
-
709
+
710
+
717
711
  /** @private */
718
712
  _updateBottomRightThickness: function(offset) {
719
713
  var topLeftView = this._topLeftView ,
@@ -730,13 +724,13 @@ SC.SplitView = SC.View.extend(
730
724
  max = this.get('topLeftMaxThickness'),
731
725
  min = this.get('topLeftMinThickness'),
732
726
  bottomRightThickness, tlCollapseAtThickness, brCollapseAtThickness;
733
-
727
+
734
728
  if (!topLeftView.get("isCollapsed")) maxAvailable += topLeftViewThickness;
735
729
  if (!bottomRightView.get("isCollapsed")) maxAvailable += bottomRightViewThickness;
736
-
730
+
737
731
  if (!SC.none(max)) thickness = Math.min(max, thickness);
738
732
  if (!SC.none(min)) thickness = Math.max(min, thickness);
739
-
733
+
740
734
  // constrain to thickness set on bottom/right
741
735
  max = this.get('bottomRightMaxThickness');
742
736
  min = this.get('bottomRightMinThickness');
@@ -744,21 +738,21 @@ SC.SplitView = SC.View.extend(
744
738
  if (!SC.none(max)) bottomRightThickness = Math.min(max, bottomRightThickness);
745
739
  if (!SC.none(min)) bottomRightThickness = Math.max(min, bottomRightThickness);
746
740
  thickness = maxAvailable - bottomRightThickness;
747
-
741
+
748
742
  // constrain to thickness determined by delegate.
749
743
  thickness = this.invokeDelegateMethod(this.delegate, 'splitViewConstrainThickness', this, topLeftView, thickness);
750
-
744
+
751
745
  // cannot be more than what's available
752
746
  thickness = Math.min(thickness, maxAvailable);
753
-
747
+
754
748
  // cannot be less than zero
755
749
  thickness = Math.max(0, thickness);
756
-
750
+
757
751
  tlCollapseAtThickness = topLeftView.get('collapseAtThickness');
758
752
  if (!tlCollapseAtThickness) tlCollapseAtThickness = 0;
759
753
  brCollapseAtThickness = bottomRightView.get('collapseAtThickness');
760
754
  brCollapseAtThickness = SC.none(brCollapseAtThickness) ? maxAvailable : (maxAvailable - brCollapseAtThickness);
761
-
755
+
762
756
  if ((proposedThickness <= tlCollapseAtThickness) && this.canCollapseView(topLeftView)) {
763
757
  // want to collapse top/left, check if this doesn't violate the max thickness of bottom/right
764
758
  max = bottomRightView.get('maxThickness');
@@ -774,64 +768,64 @@ SC.SplitView = SC.View.extend(
774
768
  thickness = maxAvailable;
775
769
  }
776
770
  }
777
-
771
+
778
772
  // now apply constrained value
779
773
  if (thickness != this.thicknessForView(topLeftView)) {
780
774
  this._desiredTopLeftThickness = thickness;
781
-
775
+
782
776
  // un-collapse if needed.
783
777
  topLeftView.set('isCollapsed', thickness === 0);
784
778
  bottomRightView.set('isCollapsed', thickness >= maxAvailable);
785
-
779
+
786
780
  this.updateChildLayout(); // updates child layouts
787
781
  this.displayDidChange(); // updates cursor
788
782
  }
789
783
  },
790
-
791
- /**
784
+
785
+ /**
792
786
  This observes 'layoutDirection' to update the cursor style immediately
793
787
  after the value of the layoutDirection of Split view is changed
794
788
 
795
- @private
789
+ @private
796
790
  */
797
791
  _setCursorStyle: function() {
798
792
  var topLeftView = this._topLeftView,
799
793
  bottomRightView = this._bottomRightView,
800
794
  thumbViewCursor = this.get('thumbViewCursor'),
801
- // updates the cursor of the thumb view that called
795
+ // updates the cursor of the thumb view that called
802
796
  // mouseDownInThumbView() to reflect the status of the drag
803
797
  tlThickness = this.thicknessForView(topLeftView),
804
798
  brThickness = this.thicknessForView(bottomRightView),
805
799
  dV = this.get('dividerView');
806
800
  this._layoutDirection = this.get('layoutDirection');
807
- if (topLeftView.get('isCollapsed') ||
808
- tlThickness === this.get("topLeftMinThickness") ||
801
+ if (topLeftView.get('isCollapsed') ||
802
+ tlThickness === this.get("topLeftMinThickness") ||
809
803
  brThickness == this.get("bottomRightMaxThickness")) {
810
804
  thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "e-resize" : "s-resize");
811
- } else if (bottomRightView.get('isCollapsed') ||
812
- tlThickness === this.get("topLeftMaxThickness") ||
805
+ } else if (bottomRightView.get('isCollapsed') ||
806
+ tlThickness === this.get("topLeftMaxThickness") ||
813
807
  brThickness == this.get("bottomRightMinThickness")) {
814
808
  thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "w-resize" : "n-resize");
815
809
  } else {
816
- if(SC.browser.msie) {
810
+ if(SC.browser.isIE) {
817
811
  thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "e-resize" : "n-resize");
818
812
  }
819
813
  else {
820
814
  thumbViewCursor.set('cursorStyle', this._layoutDirection === SC.LAYOUT_HORIZONTAL ? "ew-resize" : "ns-resize");
821
815
  }
822
816
  }
823
-
817
+
824
818
  dV.set('cursor', thumbViewCursor);
825
819
  if( this._inLiveResize) this.set('cursor', thumbViewCursor);
826
820
  }.observes('layoutDirection'),
827
-
821
+
828
822
  /**
829
823
  (DELEGATE) Control whether a view can be collapsed.
830
-
831
- The default implemention returns NO if the split view property
824
+
825
+ The default implementation returns NO if the split view property
832
826
  canCollapseViews is set to NO or when the given view has
833
827
  property canCollapse set to NO, otherwise it returns YES.
834
-
828
+
835
829
  @param {SC.SplitView} splitView the split view
836
830
  @param {SC.View} view the view we want to collapse.
837
831
  @returns {Boolean} YES to allow collapse.
@@ -841,14 +835,14 @@ SC.SplitView = SC.View.extend(
841
835
  if (view.get('canCollapse') === NO) return NO;
842
836
  return YES;
843
837
  },
844
-
838
+
845
839
  /**
846
840
  (DELEGATE) Constrain a views allowed thickness.
847
-
841
+
848
842
  The default implementation allows any thickness. The view will
849
843
  automatically constrain the view to not allow views to overflow the
850
844
  visible area.
851
-
845
+
852
846
  @param {SC.SplitView} splitView the split view
853
847
  @param {SC.View} view the view in question
854
848
  @param {Number} proposedThickness the proposed thickness.
@@ -857,11 +851,11 @@ SC.SplitView = SC.View.extend(
857
851
  splitViewConstrainThickness: function(splitView, view, proposedThickness) {
858
852
  return proposedThickness;
859
853
  },
860
-
854
+
861
855
  /* Force to rendering once the pane is attached */
862
856
  /** @private */
863
857
  _forceSplitCalculation: function(){
864
- this.updateLayout();
858
+ this.updateLayout();
865
859
  }.observes('*pane.isPaneAttached'),
866
860
 
867
861
  /** @private