sproutcore 1.9.2 → 1.10.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (746) hide show
  1. checksums.yaml +15 -0
  2. data/VERSION.yml +2 -2
  3. data/bin/sc-build +12 -9
  4. data/bin/sc-build-number +12 -9
  5. data/bin/sc-docs +12 -15
  6. data/bin/sc-gen +12 -9
  7. data/bin/sc-init +12 -9
  8. data/bin/sc-manifest +12 -9
  9. data/bin/sc-server +12 -9
  10. data/bin/sproutcore +12 -9
  11. data/lib/frameworks/sproutcore/Buildfile +14 -17
  12. data/lib/frameworks/sproutcore/CHANGELOG.md +214 -3
  13. data/lib/frameworks/sproutcore/README.md +4 -1
  14. data/lib/frameworks/sproutcore/apps/greenhouse/Buildfile +13 -0
  15. data/lib/frameworks/sproutcore/{frameworks/experimental/apps/greenhouse/README → apps/greenhouse/README.md} +1 -1
  16. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/TODO +0 -0
  17. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/beautify.js +0 -0
  18. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/design.js +3 -3
  19. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/file.js +3 -3
  20. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/files.js +3 -3
  21. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/layout.js +9 -9
  22. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/library.js +23 -23
  23. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/page.js +1 -1
  24. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property.js +1 -1
  25. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/property_editor.js +2 -2
  26. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/target.js +1 -1
  27. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/targets.js +12 -12
  28. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/controllers/view_configs.js +15 -15
  29. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core.js +14 -14
  30. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/core_file.js +0 -0
  31. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/data_source.js +42 -42
  32. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/app_page.js +45 -45
  33. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/app-selector.css +0 -0
  34. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/button.css +0 -0
  35. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/dock.css +0 -0
  36. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/general.css +0 -0
  37. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/css/icons.css +5 -0
  38. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/main-page.css +0 -0
  39. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/menu.css +0 -0
  40. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/modal.css +0 -0
  41. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/picker.css +0 -0
  42. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/search.css +0 -0
  43. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/css/text-field.css +0 -0
  44. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/dialogs.js +0 -0
  45. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.eot +0 -0
  46. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.otf +0 -0
  47. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500.woff +0 -0
  48. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.eot +0 -0
  49. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.otf +0 -0
  50. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/fonts/museosans_500_italic.woff +0 -0
  51. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/choose-app.png +0 -0
  52. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/app-selector/list-item-sel.png +0 -0
  53. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-l.png +0 -0
  54. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-m.png +0 -0
  55. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/active-r.png +0 -0
  56. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-l.png +0 -0
  57. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-m.png +0 -0
  58. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule-xl/regular-r.png +0 -0
  59. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-l.png +0 -0
  60. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/active-r.png +0 -0
  61. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-l.png +0 -0
  62. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/disabled-r.png +0 -0
  63. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-l.png +0 -0
  64. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/regular-r.png +0 -0
  65. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-l.png +0 -0
  66. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-active-r.png +0 -0
  67. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-l.png +0 -0
  68. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-disabled-r.png +0 -0
  69. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-l.png +0 -0
  70. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/capsule/sel-r.png +0 -0
  71. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-l.png +0 -0
  72. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-m.png +0 -0
  73. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/active-r.png +0 -0
  74. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-l.png +0 -0
  75. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-active-r.png +0 -0
  76. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-l.png +0 -0
  77. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-r.png +0 -0
  78. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-l.png +0 -0
  79. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-active-r.png +0 -0
  80. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-l.png +0 -0
  81. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/cap-sel-r.png +0 -0
  82. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-l.png +0 -0
  83. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-m.png +0 -0
  84. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/disabled-r.png +0 -0
  85. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-l.png +0 -0
  86. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-m.png +0 -0
  87. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/regular-r.png +0 -0
  88. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-l.png +0 -0
  89. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-m.png +0 -0
  90. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-active-r.png +0 -0
  91. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-l.png +0 -0
  92. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-m.png +0 -0
  93. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-disabled-r.png +0 -0
  94. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-l.png +0 -0
  95. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-m.png +0 -0
  96. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/dark/sel-r.png +0 -0
  97. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/active-m.png +0 -0
  98. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/disabled-m.png +0 -0
  99. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/regular-m.png +0 -0
  100. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-active-m.png +0 -0
  101. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-disabled-m.png +0 -0
  102. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/shared/sel-m.png +0 -0
  103. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-l.png +0 -0
  104. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/active-r.png +0 -0
  105. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-l.png +0 -0
  106. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/disabled-r.png +0 -0
  107. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-l.png +0 -0
  108. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/regular-r.png +0 -0
  109. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-l.png +0 -0
  110. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-active-r.png +0 -0
  111. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-l.png +0 -0
  112. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-disabled-r.png +0 -0
  113. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-l.png +0 -0
  114. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/buttons/square/sel-r.png +0 -0
  115. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions-active.png +0 -0
  116. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/actions.png +0 -0
  117. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector-active.png +0 -0
  118. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/inspector.png +0 -0
  119. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library-active.png +0 -0
  120. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/library.png +0 -0
  121. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects-active.png +0 -0
  122. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/projects.png +0 -0
  123. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run-active.png +0 -0
  124. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/run.png +0 -0
  125. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save-active.png +0 -0
  126. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/icons/save.png +0 -0
  127. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-l.png +0 -0
  128. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/greenhouse-s.png +0 -0
  129. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/logos/sproutcore.png +0 -0
  130. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/main-bg.png +0 -0
  131. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-left.png +0 -0
  132. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom-right.png +0 -0
  133. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/bottom.png +0 -0
  134. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close-active.png +0 -0
  135. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/close.png +0 -0
  136. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/left.png +0 -0
  137. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-bottom.png +0 -0
  138. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-left.png +0 -0
  139. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-right.png +0 -0
  140. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/pointer-top.png +0 -0
  141. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/right.png +0 -0
  142. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search-active.png +0 -0
  143. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/search.png +0 -0
  144. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-left.png +0 -0
  145. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top-right.png +0 -0
  146. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/picker/top.png +0 -0
  147. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/images/sc-icon-sproutcore-16.png +0 -0
  148. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/images/toolbar-bg.png +0 -0
  149. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/inspectors.js +0 -0
  150. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/loading.rhtml +0 -0
  151. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/main_page.js +0 -0
  152. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/english.lproj/strings.js +0 -0
  153. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/fixtures/file.js +0 -0
  154. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/main.js +5 -5
  155. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/mixins/drop_down.js +14 -14
  156. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/design.js +4 -4
  157. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/dir.js +12 -12
  158. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/file.js +7 -9
  159. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/target.js +12 -12
  160. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/models/view_config.js +10 -10
  161. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/resources/test_page.js +0 -0
  162. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/inspector.js +11 -11
  163. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/library.js +10 -10
  164. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/main.js +26 -25
  165. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/modals.js +10 -10
  166. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/states/ready.js +15 -15
  167. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/design.js +0 -0
  168. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/designs.js +0 -0
  169. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/file.js +0 -0
  170. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/controllers/files.js +0 -0
  171. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/file.js +0 -0
  172. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/models/view_config.js +0 -0
  173. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/list_item.js +0 -0
  174. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/tests/views/plist_item.js +1 -5
  175. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/theme.js +6 -6
  176. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/anchor.js +43 -43
  177. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/application_list_item.js +2 -2
  178. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/event_blocker.js +7 -7
  179. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/label_designer.js +0 -0
  180. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/list_item.js +8 -8
  181. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/plist_item.js +23 -23
  182. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/simple_button.js +31 -31
  183. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/tear_off_picker.js +12 -12
  184. data/lib/frameworks/sproutcore/{frameworks/experimental/apps → apps}/greenhouse/views/web.js +5 -5
  185. data/lib/frameworks/sproutcore/apps/media_examples/core.js +5 -6
  186. data/lib/frameworks/sproutcore/apps/media_examples/views/audio_view.js +16 -17
  187. data/lib/frameworks/sproutcore/apps/media_examples/views/camera_view.js +4 -5
  188. data/lib/frameworks/sproutcore/apps/media_examples/views/capabilities_view.js +17 -18
  189. data/lib/frameworks/sproutcore/apps/media_examples/views/microphone_view.js +4 -5
  190. data/lib/frameworks/sproutcore/apps/media_examples/views/video_view.js +18 -19
  191. data/lib/frameworks/sproutcore/apps/showcase/Buildfile +2 -2
  192. data/lib/frameworks/sproutcore/apps/showcase/README +1 -1
  193. data/lib/frameworks/sproutcore/apps/showcase/controllers/source_tree_controller.js +27 -7
  194. data/lib/frameworks/sproutcore/apps/showcase/core.js +6 -4
  195. data/lib/frameworks/sproutcore/apps/showcase/main.js +2 -1
  196. data/lib/frameworks/sproutcore/apps/showcase/patch.diff +529 -0
  197. data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-128.png +0 -0
  198. data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -2
  199. data/lib/frameworks/sproutcore/apps/showcase/resources/stylesheet.css +35 -16
  200. data/lib/frameworks/sproutcore/apps/showcase/resources/views_page.js +195 -10
  201. data/lib/frameworks/sproutcore/apps/showcase/system/views_item_content.js +2 -1
  202. data/lib/frameworks/sproutcore/apps/showcase/theme.js +2 -1
  203. data/lib/frameworks/sproutcore/apps/showcase/views/checkbox_views.js +2 -1
  204. data/lib/frameworks/sproutcore/apps/showcase/views/date_field_views.js +2 -1
  205. data/lib/frameworks/sproutcore/apps/showcase/views/disclosure_views.js +2 -1
  206. data/lib/frameworks/sproutcore/apps/showcase/views/label_views.js +2 -1
  207. data/lib/frameworks/sproutcore/apps/showcase/views/list_views.js +2 -1
  208. data/lib/frameworks/sproutcore/apps/showcase/views/popup_button_views.js +3 -2
  209. data/lib/frameworks/sproutcore/apps/showcase/views/progress_views.js +2 -1
  210. data/lib/frameworks/sproutcore/apps/showcase/views/radio_views.js +2 -1
  211. data/lib/frameworks/sproutcore/apps/showcase/views/scroll_views.js +2 -1
  212. data/lib/frameworks/sproutcore/apps/showcase/views/segmented_views.js +2 -1
  213. data/lib/frameworks/sproutcore/apps/showcase/views/select_views.js +10 -9
  214. data/lib/frameworks/sproutcore/apps/showcase/views/slider_views.js +2 -1
  215. data/lib/frameworks/sproutcore/apps/showcase/views/source_list_views.js +2 -1
  216. data/lib/frameworks/sproutcore/apps/showcase/views/split_views.js +2 -1
  217. data/lib/frameworks/sproutcore/apps/showcase/views/stacked_views.js +2 -1
  218. data/lib/frameworks/sproutcore/apps/showcase/views/static_content_views.js +2 -1
  219. data/lib/frameworks/sproutcore/apps/showcase/views/tab_views.js +2 -1
  220. data/lib/frameworks/sproutcore/apps/showcase/views/text_field_views.js +2 -1
  221. data/lib/frameworks/sproutcore/apps/showcase/views/toolbar_views.js +2 -1
  222. data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +15 -6
  223. data/lib/frameworks/sproutcore/apps/showcase/views/views_list_view.js +5 -4
  224. data/lib/frameworks/sproutcore/apps/showcase/views/web_views.js +2 -1
  225. data/lib/frameworks/sproutcore/apps/showcase/views/well_views.js +2 -1
  226. data/lib/frameworks/sproutcore/apps/showcase/views/workspace_views.js +2 -1
  227. data/lib/frameworks/sproutcore/apps/statechart_routing/core.js +5 -5
  228. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/login_page.js +15 -15
  229. data/lib/frameworks/sproutcore/apps/statechart_routing/resources/styles.css +3 -0
  230. data/lib/frameworks/sproutcore/apps/tests/controllers/source.js +11 -11
  231. data/lib/frameworks/sproutcore/apps/tests/controllers/target.js +6 -12
  232. data/lib/frameworks/sproutcore/apps/tests/controllers/targets.js +28 -33
  233. data/lib/frameworks/sproutcore/apps/tests/controllers/{detail.js → test.js} +14 -12
  234. data/lib/frameworks/sproutcore/apps/tests/controllers/tests.js +11 -15
  235. data/lib/frameworks/sproutcore/apps/tests/core.js +8 -113
  236. data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +9 -19
  237. data/lib/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +81 -92
  238. data/lib/frameworks/sproutcore/apps/tests/english.lproj/strings.js +3 -1
  239. data/lib/frameworks/sproutcore/apps/tests/main.js +8 -13
  240. data/lib/frameworks/sproutcore/apps/tests/statechart.js +268 -0
  241. data/lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js +4 -4
  242. data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +16 -16
  243. data/lib/frameworks/sproutcore/apps/welcome/core.js +9 -9
  244. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/sproutcore.png +0 -0
  245. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +22 -25
  246. data/lib/frameworks/sproutcore/apps/welcome/main.js +3 -3
  247. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.jpg +0 -0
  248. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-landscape.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-landscape.png +0 -0
  249. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.jpg b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.jpg +0 -0
  250. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup-portrait.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup-portrait.png +0 -0
  251. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-startup.png b/data/lib/frameworks/sproutcore/design/Assorted → Images/sproutcore-startup.png +0 -0
  252. data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +21 -7
  253. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +35 -2
  254. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +142 -75
  255. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +20 -2
  256. data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/horizontal_stack_layout.js +283 -0
  257. data/lib/frameworks/sproutcore/frameworks/core_foundation/child_view_layouts/vertical_stack_layout.js +284 -0
  258. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +64 -65
  259. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +14 -14
  260. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +8 -8
  261. data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +19 -19
  262. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/run_loop.js +10 -25
  263. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/selection_support.js +12 -6
  264. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/body_overflow.js +53 -34
  265. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/layout.js +30 -24
  266. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +44 -40
  267. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/manipulation.js +5 -2
  268. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +105 -176
  269. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +50 -0
  270. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/visibility.js +4 -4
  271. data/lib/frameworks/sproutcore/frameworks/core_foundation/protocols/view_transition_protocol.js +48 -0
  272. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +225 -7
  273. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/core_query.js +54 -34
  274. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/cursor.js +86 -71
  275. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/device.js +35 -35
  276. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +2 -2
  277. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +2 -2
  278. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +283 -120
  279. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/ready.js +36 -37
  280. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +653 -435
  281. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +49 -42
  282. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +422 -396
  283. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +5 -5
  284. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +10 -8
  285. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +37 -16
  286. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +5 -5
  287. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils/rect.js +1 -1
  288. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +15 -0
  289. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/selection_support.js +21 -0
  290. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js +28 -0
  291. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/platform.js +18 -0
  292. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/end.js +17 -17
  293. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_attr.js +9 -9
  294. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_className.js +43 -43
  295. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +4 -14
  296. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/update.js +18 -30
  297. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +78 -43
  298. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/theme.js +7 -7
  299. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js +4 -3
  300. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/append_remove.js +31 -15
  301. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/child_view.js +47 -2
  302. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/firstResponder.js +32 -31
  303. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/keyPane.js +23 -22
  304. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js +3 -2
  305. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/sendEvent.js +17 -16
  306. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +626 -211
  307. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/border_frame_test.js +174 -0
  308. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/build.js +22 -20
  309. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/childViewLayout_test.js +27 -0
  310. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -10
  311. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertFrames.js +5 -4
  312. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createChildViews.js +10 -6
  313. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/createLayer.js +17 -12
  314. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroy.js +60 -7
  315. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/destroyLayer.js +19 -26
  316. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +14 -13
  317. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +341 -0
  318. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/findLayerInParentLayer.js +9 -8
  319. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/init.js +26 -16
  320. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +28 -68
  321. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +35 -23
  322. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisibleInWindow.js +93 -78
  323. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +62 -64
  324. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +69 -18
  325. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutChildViews.js +26 -21
  326. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutDidChange.js +129 -57
  327. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +436 -238
  328. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/removeChild.js +38 -44
  329. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render.js +14 -4
  330. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/render_delegate_support.js +29 -20
  331. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/replaceAllChildren_test.js +229 -0
  332. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayer.js +33 -95
  333. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/viewDidResize.js +87 -39
  334. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +684 -0
  335. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +767 -625
  336. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/acceleration.js +4 -23
  337. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +645 -77
  338. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/cursor.js +1 -1
  339. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +218 -19
  340. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +648 -321
  341. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout_style.js +326 -534
  342. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +120 -126
  343. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +1526 -0
  344. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +18 -23
  345. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/visibility.js +12 -94
  346. data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +2 -2
  347. data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +19 -19
  348. data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +43 -27
  349. data/lib/frameworks/sproutcore/frameworks/core_tools/models/test.js +5 -5
  350. data/lib/frameworks/sproutcore/frameworks/core_tools/resources/icons.css +5 -0
  351. data/lib/frameworks/sproutcore/frameworks/core_tools/resources/sc-icon-sproutcore-16.png +0 -0
  352. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +41 -41
  353. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
  354. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +90 -90
  355. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +1 -1
  356. data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +31 -31
  357. data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +3 -3
  358. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +6 -6
  359. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -1
  360. data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +1 -1
  361. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +1 -1
  362. data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +2 -8
  363. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +74 -48
  364. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +11 -16
  365. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +187 -253
  366. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/cascade.js +5 -5
  367. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +14 -14
  368. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/data_store.js +49 -9
  369. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +2 -2
  370. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +236 -127
  371. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/instance_management.js +107 -0
  372. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +17 -0
  373. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +12 -11
  374. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/loadRecord.js +42 -17
  375. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +20 -15
  376. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +205 -92
  377. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/tests/system/datetime.js +61 -25
  378. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/resources/strings.js +39 -9
  379. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +45 -1
  380. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/tests/system/datetime.js +88 -0
  381. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/design.js +0 -0
  382. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/coders/object.js +0 -0
  383. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/controllers.js +3 -3
  384. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/design.js +2 -2
  385. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/designs.js +19 -19
  386. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_design.js +44 -44
  387. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/controllers/page_files.js +4 -4
  388. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/core.js +0 -0
  389. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_rule.js +0 -0
  390. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style.js +6 -6
  391. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/css/css_style_sheet.js +37 -37
  392. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/button.js +0 -0
  393. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/label.js +0 -0
  394. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/object_designer.js +0 -0
  395. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/tab.js +0 -0
  396. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/text_field.js +0 -0
  397. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/designers/view_designer.js +1 -1
  398. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/css/designer.css +0 -0
  399. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/design_page.js +0 -0
  400. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/high_light.css +0 -0
  401. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/controller.png +0 -0
  402. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-bg.png +0 -0
  403. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-bg.png +0 -0
  404. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-divider.png +0 -0
  405. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-bg.png +0 -0
  406. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/dock-item-sel-divider.png +0 -0
  407. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/main-bg.png +0 -0
  408. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/page.png +0 -0
  409. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/pane.png +0 -0
  410. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/images/view.png +0 -0
  411. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/english.lproj/selection_handles.css +0 -0
  412. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/binding.js +0 -0
  413. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/object.js +0 -0
  414. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/page.js +0 -0
  415. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/ext/view.js +0 -0
  416. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/button.js +0 -0
  417. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/mixins/snap_lines.js +0 -0
  418. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/coders/page.js +0 -0
  419. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/tests/designers/view_designer.js +0 -0
  420. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/designer_drop_target.js +36 -37
  421. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/drawing.js +1 -1
  422. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/high_light.js +17 -17
  423. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/page_item_view.js +0 -0
  424. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/designer → designer}/views/selection_handles.js +14 -14
  425. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -2
  426. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +51 -51
  427. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_child.js +63 -52
  428. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/mixins/split_thumb.js +64 -59
  429. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +113 -112
  430. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +182 -203
  431. data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +13 -13
  432. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +51 -29
  433. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +513 -307
  434. data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +69 -217
  435. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +31 -26
  436. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +15 -20
  437. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +2 -6
  438. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +6 -6
  439. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +25 -16
  440. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +6 -6
  441. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +29 -16
  442. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/popup_button.js +1 -1
  443. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +19 -23
  444. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +14 -17
  445. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +24 -24
  446. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +4 -4
  447. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +5 -5
  448. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split.js +0 -0
  449. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view → desktop}/render_delegates/split_divider.js +0 -0
  450. data/lib/frameworks/sproutcore/frameworks/desktop/resources/modal.css +2 -0
  451. data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +1 -1
  452. data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +24 -98
  453. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +446 -442
  454. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +42 -21
  455. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +19 -3
  456. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +26 -28
  457. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +3 -2
  458. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js +11 -7
  459. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +5 -4
  460. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +32 -26
  461. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +27 -22
  462. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/methods.js +5 -4
  463. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/select_button/ui.js +0 -2
  464. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +11 -8
  465. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/displayProperties.js +5 -5
  466. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/keyEquivalents.js +9 -11
  467. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +23 -23
  468. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +15 -17
  469. data/lib/frameworks/sproutcore/frameworks/desktop/tests/{mixins → views/collection}/collection_fast_path.js +18 -12
  470. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/content.js +46 -53
  471. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +101 -47
  472. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +26 -26
  473. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/reload.js +89 -69
  474. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js +27 -25
  475. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js +32 -35
  476. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -0
  477. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js +6 -11
  478. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +3 -5
  479. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +103 -8
  480. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +76 -38
  481. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +3 -5
  482. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +91 -3
  483. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/render.js +2 -17
  484. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +70 -38
  485. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_alternatingrows.js +17 -19
  486. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_outline.js +10 -13
  487. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +37 -30
  488. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_simple.js +18 -20
  489. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +115 -28
  490. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +0 -2
  491. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +37 -1
  492. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +194 -182
  493. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/ui.js +2 -3
  494. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +18 -21
  495. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +5 -6
  496. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/slider/methods.js +5 -4
  497. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/children.js +15 -15
  498. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/dividers.js +0 -0
  499. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +341 -45
  500. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_child.js +0 -0
  501. data/lib/frameworks/sproutcore/frameworks/{experimental/frameworks/split_view/tests → desktop/tests/views/split}/split_thumb.js +0 -0
  502. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +6 -8
  503. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +49 -52
  504. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +23 -6
  505. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/toolbar/ui.js +2 -4
  506. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +4 -5
  507. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +47 -38
  508. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +24 -24
  509. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +887 -740
  510. data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +2 -2
  511. data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +68 -55
  512. data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +3 -3
  513. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +8 -26
  514. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +189 -167
  515. data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +55 -54
  516. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -4
  517. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +145 -146
  518. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +21 -21
  519. data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +2 -2
  520. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +66 -66
  521. data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +40 -44
  522. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +203 -200
  523. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +11 -12
  524. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +6 -13
  525. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +87 -112
  526. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +192 -179
  527. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +23 -23
  528. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +64 -64
  529. data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +56 -56
  530. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +784 -714
  531. data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +21 -39
  532. data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +45 -41
  533. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
  534. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +4 -10
  535. data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +9 -47
  536. data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +40 -16
  537. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +2 -1
  538. data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +62 -50
  539. data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +0 -9
  540. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/device.js +45 -45
  541. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/device_motion/platform.js +16 -16
  542. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +46 -6
  543. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/tests/models/polymorphism/simple.js +16 -2
  544. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/render_delegates/desktop_scroller.js +12 -12
  545. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/scroll_view/tests/scroll/ui.js +38 -40
  546. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +8 -8
  547. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +20 -20
  548. data/lib/frameworks/sproutcore/frameworks/formatters/formatters/date_formatter.js +16 -16
  549. data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +26 -14
  550. data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +43 -43
  551. data/lib/frameworks/sproutcore/frameworks/foundation/debug/test-image.png +0 -0
  552. data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +11 -11
  553. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +63 -41
  554. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -1
  555. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +60 -61
  556. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +72 -72
  557. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +142 -142
  558. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js +1 -1
  559. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
  560. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +10 -8
  561. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +36 -29
  562. data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +4 -4
  563. data/lib/frameworks/sproutcore/frameworks/foundation/protocols/swap_transition_protocol.js +150 -0
  564. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +54 -29
  565. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +23 -18
  566. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +12 -11
  567. data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +21 -20
  568. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-128.png +0 -0
  569. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-256.png +0 -0
  570. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-32.png +0 -0
  571. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-48.png +0 -0
  572. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-512.png +0 -0
  573. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-64.png +0 -0
  574. data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +5 -0
  575. data/lib/frameworks/sproutcore/frameworks/foundation/system/app_cache.js +412 -0
  576. data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +2 -3
  577. data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +11 -5
  578. data/lib/frameworks/sproutcore/frameworks/foundation/system/text_selection.js +21 -21
  579. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +8 -3
  580. data/lib/frameworks/sproutcore/frameworks/foundation/tests/controllers/tree/selection_support.js +33 -8
  581. data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +2 -1
  582. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_display.js +9 -3
  583. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +5 -4
  584. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +49 -4
  585. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +29 -21
  586. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +3 -5
  587. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +8 -10
  588. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/app_cache_test.js +81 -0
  589. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
  590. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/utils/pointInElement.js +0 -3
  591. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +40 -1
  592. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +143 -0
  593. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +5 -7
  594. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +187 -84
  595. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +6 -41
  596. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +51 -7
  597. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +11 -16
  598. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_bounce_transition.js +80 -0
  599. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_smooth_transition.js +39 -0
  600. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/adjust_spring_transition.js +77 -0
  601. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/bounce_transition.js +211 -0
  602. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/fade_transition.js +57 -0
  603. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/pop_transition.js +82 -0
  604. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/scale_transition.js +54 -0
  605. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/slide_transition.js +140 -0
  606. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/spring_transition.js +203 -0
  607. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_dissolve_transition.js +67 -0
  608. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +81 -0
  609. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +104 -0
  610. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_push_transition.js +181 -0
  611. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +90 -0
  612. data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +2 -2
  613. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +483 -95
  614. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +65 -65
  615. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +111 -100
  616. data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +30 -222
  617. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +38 -24
  618. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +74 -62
  619. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-1.8.3-patched.js +9485 -0
  620. data/lib/frameworks/sproutcore/frameworks/media/media_capabilities.js +4 -4
  621. data/lib/frameworks/sproutcore/frameworks/media/render_delegates/media_slider.js +20 -20
  622. data/lib/frameworks/sproutcore/frameworks/media/resources/video.css +18 -17
  623. data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +19 -19
  624. data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +10 -11
  625. data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +7 -8
  626. data/lib/frameworks/sproutcore/frameworks/media/views/video.js +24 -24
  627. data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +2 -2
  628. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +32 -21
  629. data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +72 -53
  630. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +164 -156
  631. data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +20 -20
  632. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +145 -140
  633. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +1 -1
  634. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +2 -2
  635. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +393 -370
  636. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +3 -3
  637. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1045 -999
  638. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +41 -36
  639. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +10 -4
  640. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +11 -1
  641. data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +7 -7
  642. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +275 -205
  643. data/lib/frameworks/sproutcore/frameworks/runtime/system/function.js +27 -27
  644. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +229 -193
  645. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +24 -24
  646. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +186 -188
  647. data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
  648. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +138 -65
  649. data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +11 -10
  650. data/lib/frameworks/sproutcore/frameworks/runtime/system/string.js +8 -4
  651. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +4 -0
  652. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/chained.js +112 -23
  653. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +71 -18
  654. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +97 -57
  655. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +22 -22
  656. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/infinite.js +184 -0
  657. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +63 -1
  658. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +73 -36
  659. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +100 -25
  660. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/string.js +7 -0
  661. data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +1 -1
  662. data/lib/frameworks/sproutcore/frameworks/statechart/private/state_path_matcher.js +2 -2
  663. data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +32 -32
  664. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +449 -422
  665. data/lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js +19 -19
  666. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +612 -562
  667. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/with_concurrent_states/basic.js +115 -62
  668. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/routing/without_concurrent_states/basic.js +145 -64
  669. data/lib/frameworks/sproutcore/frameworks/statechart/tests/statechart/respond_to_event.js +17 -1
  670. data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +30 -30
  671. data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +34 -34
  672. data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/bind.js +1 -1
  673. data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/collection.js +2 -2
  674. data/lib/frameworks/sproutcore/frameworks/template_view/ext/handlebars/view.js +3 -5
  675. data/lib/frameworks/sproutcore/frameworks/template_view/tests/panes/template.js +2 -0
  676. data/lib/frameworks/sproutcore/frameworks/template_view/tests/views/template/core.js +2 -2
  677. data/lib/frameworks/sproutcore/frameworks/template_view/views/bindable_span.js +7 -7
  678. data/lib/frameworks/sproutcore/frameworks/template_view/views/template.js +4 -4
  679. data/lib/frameworks/sproutcore/frameworks/template_view/views/template_collection.js +15 -21
  680. data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +4 -4
  681. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +35 -35
  682. data/lib/frameworks/sproutcore/scripts/run_sc_server_master.sh +34 -0
  683. data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +606 -0
  684. data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
  685. data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
  686. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button@2x.png +0 -0
  687. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button@2x.png +0 -0
  688. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button@2x.png +0 -0
  689. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button@2x.png +0 -0
  690. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +3 -4
  691. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +18 -0
  692. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
  693. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel@2x.png +0 -0
  694. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel.png +0 -0
  695. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/panel@2x.png +0 -0
  696. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.css +34 -14
  697. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers.png +0 -0
  698. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/pointers@2x.png +0 -0
  699. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +5 -4
  700. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +7 -2
  701. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +5 -4
  702. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +6 -3
  703. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +7 -5
  704. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +7 -7
  705. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +37 -37
  706. data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +12 -12
  707. data/lib/sproutcore/helpers/static_helper.rb +35 -27
  708. data/sproutcore.gemspec +1 -0
  709. metadata +529 -451
  710. data/lib/frameworks/sproutcore/apps/showcase/resources/images/sproutcore-logo.png +0 -0
  711. data/lib/frameworks/sproutcore/apps/showcase/views/button_views.js +0 -55
  712. data/lib/frameworks/sproutcore/apps/showcase/views/container_views.js +0 -29
  713. data/lib/frameworks/sproutcore/apps/showcase/views/grid_views.js +0 -28
  714. data/lib/frameworks/sproutcore/apps/showcase/views/image_button_views.js +0 -22
  715. data/lib/frameworks/sproutcore/apps/showcase/views/image_views.js +0 -51
  716. data/lib/frameworks/sproutcore/apps/tests/states/no_targets.js +0 -26
  717. data/lib/frameworks/sproutcore/apps/tests/states/ready.js +0 -56
  718. data/lib/frameworks/sproutcore/apps/tests/states/ready_detail.js +0 -41
  719. data/lib/frameworks/sproutcore/apps/tests/states/ready_empty.js +0 -48
  720. data/lib/frameworks/sproutcore/apps/tests/states/ready_list.js +0 -41
  721. data/lib/frameworks/sproutcore/apps/tests/states/ready_loading.js +0 -44
  722. data/lib/frameworks/sproutcore/apps/tests/states/ready_no_tests.js +0 -31
  723. data/lib/frameworks/sproutcore/apps/tests/states/start.js +0 -39
  724. data/lib/frameworks/sproutcore/apps/welcome/tests/controllers/targets.js +0 -15
  725. data/lib/frameworks/sproutcore/frameworks/animation/Buildfile +0 -3
  726. data/lib/frameworks/sproutcore/frameworks/animation/LICENSE +0 -25
  727. data/lib/frameworks/sproutcore/frameworks/animation/README.md +0 -79
  728. data/lib/frameworks/sproutcore/frameworks/animation/core.js +0 -1208
  729. data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +0 -152
  730. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/parentViewDidChange.js +0 -67
  731. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/prepareContext.js +0 -203
  732. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/updateLayerLocation.js +0 -213
  733. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +0 -163
  734. data/lib/frameworks/sproutcore/frameworks/desktop/tests/mixins/border.js +0 -97
  735. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/tests/methods.js +0 -312
  736. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +0 -961
  737. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split_divider.js +0 -40
  738. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +0 -27
  739. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore-logo.png +0 -0
  740. data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/sproutcore.png +0 -0
  741. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +0 -394
  742. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +0 -133
  743. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +0 -18
  744. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +0 -8981
  745. data/lib/frameworks/sproutcore/frameworks/jquery/tests/set_class.js +0 -40
  746. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
@@ -7,653 +7,445 @@ sc_require('views/view/animation');
7
7
  Map to CSS Transforms
8
8
  */
9
9
 
10
+ // The scale transform must be last in order to decompose the transformation matrix.
11
+ SC.CSS_TRANSFORM_NAMES = ['rotateX', 'rotateY', 'rotateZ', 'scale'];
12
+
10
13
  SC.CSS_TRANSFORM_MAP = {
11
- rotate: function(val){
14
+ rotate: function () {
12
15
  return null;
13
16
  },
14
17
 
15
- rotateX: function(val){
16
- if (SC.typeOf(val) === SC.T_NUMBER) val += 'deg';
17
- return 'rotateX('+val+')';
18
+ rotateX: function (val) {
19
+ if (SC.typeOf(val) === SC.T_NUMBER) { val += 'deg'; }
20
+ return 'rotateX(' + val + ')';
18
21
  },
19
22
 
20
- rotateY: function(val){
21
- if (SC.typeOf(val) === SC.T_NUMBER) val += 'deg';
22
- return 'rotateY('+val+')';
23
+ rotateY: function (val) {
24
+ if (SC.typeOf(val) === SC.T_NUMBER) { val += 'deg'; }
25
+ return 'rotateY(' + val + ')';
23
26
  },
24
27
 
25
- rotateZ: function(val){
26
- if (SC.typeOf(val) === SC.T_NUMBER) val += 'deg';
27
- return 'rotateZ('+val+')';
28
+ rotateZ: function (val) {
29
+ if (SC.typeOf(val) === SC.T_NUMBER) { val += 'deg'; }
30
+ return 'rotateZ(' + val + ')';
28
31
  },
29
32
 
30
- scale: function(val){
31
- if (SC.typeOf(val) === SC.T_ARRAY) val = val.join(', ');
32
- return 'scale('+val+')';
33
+ scale: function (val) {
34
+ if (SC.typeOf(val) === SC.T_ARRAY) { val = val.join(', '); }
35
+ return 'scale(' + val + ')';
33
36
  }
34
37
  };
35
38
 
36
- SC.View.reopen(
37
- /** @scope SC.View.prototype */ {
38
39
 
39
- layoutStyleCalculator: null,
40
+ /** @private */
41
+ SC.View.LayoutStyleCalculator = {
40
42
 
41
- /**
42
- layoutStyle describes the current styles to be written to your element
43
- based on the layout you defined. Both layoutStyle and frame reset when
44
- you edit the layout property. Both are read only.
45
-
46
- Computes the layout style settings needed for the current anchor.
47
-
48
- @property {Hash}
49
- @readOnly
50
- */
51
- layoutStyle: function() {
52
- var props = {
53
- layout: this.get('layout'),
54
- turbo: this.get('hasAcceleratedLayer'),
55
- staticLayout: this.get('useStaticLayout')
56
- };
57
-
58
- var calculator = this.get('layoutStyleCalculator');
59
- calculator.set(props);
60
-
61
- return calculator.calculate();
62
- }.property().cacheable()
63
- });
64
-
65
- SC.View.LayoutStyleCalculator = SC.Object.extend({
66
-
67
- _layoutDidUpdate: function(){
68
- var layout = this.get('layout');
69
- if (!layout) { return; }
70
-
71
- this.dims = SC._VIEW_DEFAULT_DIMS;
72
- this.loc = this.dims.length;
73
-
74
- // loose comparison used instead of (value === null || value === undefined)
75
-
76
- var right = (this.right = layout.right);
77
- this.hasRight = (right != null);
78
-
79
- var left = (this.left = layout.left);
80
- this.hasLeft = (left != null);
81
-
82
- var top = (this.top = layout.top);
83
- this.hasTop = (top != null);
84
-
85
- var bottom = (this.bottom = layout.bottom);
86
- this.hasBottom = (bottom != null);
87
-
88
- var width = (this.width = layout.width);
89
- this.hasWidth = (width != null);
90
-
91
- var height = (this.height = layout.height);
92
- this.hasHeight = (height != null);
43
+ /** @private If the value is undefined, make it null. */
44
+ _valueOrNull: function (value) {
45
+ return value === undefined ? null : value;
46
+ },
93
47
 
94
- this.minWidth = ((layout.minWidth === undefined) ? null : layout.minWidth);
48
+ /** @private */
49
+ _prepareStyle: function (layout) {
50
+ /*jshint eqnull:true */
51
+ // It's important to provide null defaults to reset any previous style when
52
+ // this is applied.
53
+ var commonBorder = this._valueOrNull(layout.border),
54
+ style = {
55
+ marginLeft: null,
56
+ marginTop: null
57
+ };
58
+
59
+ // Position and size.
60
+ style.bottom = layout.bottom;
61
+ style.right = layout.right;
62
+ style.left = layout.left;
63
+ style.top = layout.top;
64
+ style.centerX = layout.centerX;
65
+ style.centerY = layout.centerY;
66
+ style.height = layout.height;
67
+ style.width = layout.width;
68
+
69
+ // Borders.
70
+ style.borderTopWidth = layout.borderTop !== undefined ? layout.borderTop : commonBorder;
71
+ style.borderRightWidth = layout.borderRight !== undefined ? layout.borderRight : commonBorder;
72
+ style.borderBottomWidth = layout.borderBottom !== undefined ? layout.borderBottom : commonBorder;
73
+ style.borderLeftWidth = layout.borderLeft !== undefined ? layout.borderLeft : commonBorder;
74
+
75
+ // Minimum and maximum size.
76
+ style.maxHeight = this._valueOrNull(layout.maxHeight);
77
+ style.maxWidth = this._valueOrNull(layout.maxWidth);
78
+ style.minWidth = this._valueOrNull(layout.minWidth);
79
+ style.minHeight = this._valueOrNull(layout.minHeight);
95
80
 
96
- var maxWidth = (this.maxWidth = (layout.maxWidth === undefined) ? null : layout.maxWidth);
97
- this.hasMaxWidth = (maxWidth != null);
81
+ // the toString here is to ensure that it doesn't get px added to it
82
+ style.zIndex = (layout.zIndex != null) ? layout.zIndex.toString() : null;
83
+ style.opacity = (layout.opacity != null) ? layout.opacity.toString() : null;
98
84
 
99
- this.minHeight = (layout.minHeight === undefined) ? null : layout.minHeight;
85
+ style.backgroundPosition = this._valueOrNull(layout.backgroundPosition);
100
86
 
101
- var maxHeight = (this.maxHeight = (layout.maxHeight === undefined) ? null : layout.maxHeight);
102
- this.hasMaxHeight = (maxHeight != null);
87
+ // Handle transforms (including reset).
88
+ if (SC.platform.supportsCSSTransforms) {
89
+ var transformAttribute = SC.browser.experimentalStyleNameFor('transform'),
90
+ transforms = [],
91
+ transformMap = SC.CSS_TRANSFORM_MAP;
92
+
93
+ // The order of the transforms is important so that we can decompose them
94
+ // from the transformation matrix later if necessary.
95
+ for (var i = 0, len = SC.CSS_TRANSFORM_NAMES.length; i < len; i++) {
96
+ var transformName = SC.CSS_TRANSFORM_NAMES[i],
97
+ layoutTransform = layout[transformName];
98
+
99
+ if (layoutTransform != null) {
100
+ // normalizing transforms like rotateX: 5 to rotateX(5deg)
101
+ transforms.push(transformMap[transformName](layoutTransform));
102
+ }
103
+ }
103
104
 
104
- var centerX = (this.centerX = layout.centerX);
105
- this.hasCenterX = (centerX != null);
105
+ style[transformAttribute] = transforms.length > 0 ? transforms.join(' ') : null;
106
+ }
106
107
 
107
- var centerY = (this.centerY = layout.centerY);
108
- this.hasCenterY = (centerY != null);
108
+ // Reset any transitions.
109
+ if (SC.platform.supportsCSSTransitions) {
110
+ style[SC.browser.experimentalStyleNameFor('transition')] = null;
111
+ }
109
112
 
110
- var borderTop = (this.borderTop = ((layout.borderTop !== undefined) ? layout.borderTop : layout.border) || 0);
111
- var borderRight = (this.borderRight = ((layout.borderRight !== undefined) ? layout.borderRight : layout.border) || 0);
112
- var borderBottom = (this.borderBottom = ((layout.borderBottom !== undefined) ? layout.borderBottom : layout.border) || 0);
113
- var borderLeft = (this.borderLeft = ((layout.borderLeft !== undefined) ? layout.borderLeft : layout.border) || 0);
113
+ // for ie, we will NOT use alpha. It is just a source of pain.
114
+ // a) it will not affect absolutely positioned child elements, and is therefore
115
+ // useless for most SC purposes.
116
+ //
117
+ // b) It completely breaks semitransparent background images (PNGs with opacity)
118
+ //
119
+ // If users want to use alpha, they should do it on their own.
114
120
 
115
- // the toString here is to ensure that it doesn't get px added to it
116
- this.zIndex = (layout.zIndex != null) ? layout.zIndex.toString() : null;
117
- this.opacity = (layout.opacity != null) ? layout.opacity.toString() : null;
121
+ // if(!SC.none(layout.opacity)) style.filter = "alpha(opacity=%@)".fmt(layout.opacity * 100);
118
122
 
119
- this.backgroundPosition = (layout.backgroundPosition != null) ? layout.backgroundPosition : null;
123
+ return style;
124
+ },
120
125
 
121
- this.ret = {
122
- marginTop: null,
123
- marginLeft: null
124
- };
126
+ /** @private */
127
+ _prepareState: function (style) {
128
+ /*jshint eqnull:true */
129
+ var state = {};
130
+
131
+ state.hasBottom = (style.bottom != null);
132
+ state.hasRight = (style.right != null);
133
+ state.hasLeft = (style.left != null);
134
+ state.hasTop = (style.top != null);
135
+ state.hasCenterX = (style.centerX != null);
136
+ state.hasCenterY = (style.centerY != null);
137
+ state.hasHeight = (style.height != null);
138
+ state.hasWidth = (style.width != null);
139
+ state.hasMaxWidth = (style.maxWidth != null);
140
+ state.hasMaxHeight = (style.maxHeight != null);
141
+
142
+ return state;
143
+ },
125
144
 
126
- }.observes('layout'),
127
145
 
128
146
  // handles the case where you do width:auto or height:auto and are not using "staticLayout"
129
- _invalidAutoValue: function(property){
130
- var error = SC.Error.desc("%@.layout() you cannot use %@:auto if staticLayout is disabled".fmt(
131
- this.get('view'), property), "%@".fmt(this.get('view')),-1);
147
+ _invalidAutoValue: function (view, property) {
148
+ var error = SC.Error.desc("%@.layout() you cannot use %@:auto if staticLayout is disabled".fmt(view, property), "%@".fmt(view), -1);
132
149
  SC.Logger.error(error.toString());
133
- throw error ;
150
+ throw error;
134
151
  },
135
152
 
136
- _handleMistakes: function() {
137
- var layout = this.get('layout');
138
-
139
- // handle invalid use of auto in absolute layouts
140
- if(!this.staticLayout) {
141
- if (this.width === SC.LAYOUT_AUTO) { this._invalidAutoValue("width"); }
142
- if (this.height === SC.LAYOUT_AUTO) { this._invalidAutoValue("height"); }
143
- }
144
-
145
- if (SC.platform.supportsCSSTransforms) {
146
- // Check to see if we're using transforms
147
- var animations = layout.animate,
148
- transformAnimationDuration,
149
- key;
150
-
151
- if (animations) {
152
- for(key in animations){
153
- if (SC.CSS_TRANSFORM_MAP[key]) {
154
- // To prevent:
155
- // this.animate('scale', ...);
156
- // this.animate('rotate', ...);
157
- // Use this instead
158
- // this.animate({ scale: ..., rotate: ... }, ...);
159
- if (this._pendingAnimations && this._pendingAnimations['-'+SC.platform.cssPrefix+'-transform']) {
160
- throw "Animations of transforms must be executed simultaneously!";
161
- }
153
+ /** @private */
154
+ _calculatePosition: function (style, state, direction) {
155
+ var start, finish, size,
156
+ hasStart, hasFinish, hasSize, hasMaxSize,
157
+ startBorder,
158
+ finishBorder;
162
159
 
163
- // Because multiple transforms actually share one CSS property, we can't animate multiple transforms
164
- // at different speeds. So, to handle that case, we just force them to all have the same length.
165
-
166
- // First time around this will never be true, but we're concerned with subsequent runs.
167
- if (transformAnimationDuration && animations[key].duration !== transformAnimationDuration) {
168
- SC.Logger.warn("Can't animate transforms with different durations! Using first duration specified.");
169
- animations[key].duration = transformAnimationDuration;
170
- }
171
-
172
- transformAnimationDuration = animations[key].duration;
173
- }
174
- }
175
- }
176
- }
177
- },
178
-
179
- _calculatePosition: function(direction) {
180
- var translate = null, turbo = this.get('turbo'), ret = this.ret;
181
-
182
- var start, finish, size, maxSize, margin,
183
- hasStart, hasFinish, hasSize, hasMaxSize,
184
- startBorder, startBorderVal,
185
- finishBorder, finishBorderVal,
186
- sizeNum;
187
-
188
- if (direction === 'x') {
160
+ if (direction === 'X') {
189
161
  start = 'left';
190
162
  finish = 'right';
191
163
  size = 'width';
192
- maxSize = 'maxWidth';
193
- margin = 'marginLeft';
194
- startBorder = 'borderLeft';
195
- finishBorder = 'borderRight';
196
- hasStart = this.hasLeft;
197
- hasFinish = this.hasRight;
198
- hasSize = this.hasWidth;
199
- hasMaxSize = this.hasMaxWidth;
164
+ startBorder = 'borderLeftWidth';
165
+ finishBorder = 'borderRightWidth';
166
+ hasStart = state.hasLeft;
167
+ hasFinish = state.hasRight;
168
+ hasSize = state.hasWidth;
169
+ hasMaxSize = state.hasMaxWidth;
200
170
  } else {
201
171
  start = 'top';
202
172
  finish = 'bottom';
203
173
  size = 'height';
204
- maxSize = 'maxHeight';
205
- margin = 'marginTop';
206
- startBorder = 'borderTop';
207
- finishBorder = 'borderBottom';
208
- hasStart = this.hasTop;
209
- hasFinish = this.hasBottom;
210
- hasSize = this.hasHeight;
211
- hasMaxSize = this.hasMaxHeight;
174
+ startBorder = 'borderTopWidth';
175
+ finishBorder = 'borderBottomWidth';
176
+ hasStart = state.hasTop;
177
+ hasFinish = state.hasBottom;
178
+ hasSize = state.hasHeight;
179
+ hasMaxSize = state.hasMaxHeight;
212
180
  }
213
181
 
214
- ret[start] = this._cssNumber(this[start]);
215
- ret[finish] = this._cssNumber(this[finish]);
182
+ style[start] = this._cssNumber(style[start]);
183
+ style[finish] = this._cssNumber(style[finish]);
216
184
 
217
- startBorderVal = this._cssNumber(this[startBorder]);
218
- finishBorderVal = this._cssNumber(this[finishBorder]);
219
- ret[startBorder+'Width'] = startBorderVal || null;
220
- ret[finishBorder+'Width'] = finishBorderVal || null;
185
+ var startBorderVal = this._cssNumber(style[startBorder]),
186
+ finishBorderVal = this._cssNumber(style[finishBorder]),
187
+ sizeNum = style[size];
188
+
189
+ style[startBorder] = startBorderVal;
190
+ style[finishBorder] = finishBorderVal;
221
191
 
222
- sizeNum = this[size];
223
192
  // This is a normal number
224
193
  if (sizeNum >= 1) { sizeNum -= (startBorderVal + finishBorderVal); }
225
- ret[size] = this._cssNumber(sizeNum);
226
-
227
-
228
- if(hasStart) {
229
- if (turbo) {
230
- translate = ret[start];
231
- ret[start] = 0;
232
- }
194
+ style[size] = this._cssNumber(sizeNum);
233
195
 
196
+ if (hasStart) {
234
197
  // top, bottom, height -> top, bottom
235
- if (hasFinish && hasSize) { ret[finish] = null; }
198
+ if (hasFinish && hasSize) { style[finish] = null; }
236
199
  } else {
237
200
  // bottom aligned
238
- if(!hasFinish || (hasFinish && !hasSize && !hasMaxSize)) {
201
+ if (!hasFinish || (hasFinish && !hasSize && !hasMaxSize)) {
239
202
  // no top, no bottom
240
- ret[start] = 0;
203
+ style[start] = 0;
241
204
  }
242
205
  }
243
206
 
244
- if (!hasSize && !hasFinish) { ret[finish] = 0; }
245
-
246
- return translate;
207
+ if (!hasSize && !hasFinish) { style[finish] = 0; }
247
208
  },
248
209
 
249
- _calculateCenter: function(direction) {
250
- var ret = this.ret,
251
- size, center, start, finish, margin,
252
- startBorder, startBorderVal,
253
- finishBorder, finishBorderVal;
254
-
255
- if (direction === 'x') {
256
- size = 'width';
257
- center = 'centerX';
258
- start = 'left';
259
- finish = 'right';
260
- margin = 'marginLeft';
261
- startBorder = 'borderLeft';
262
- finishBorder = 'borderRight';
263
- } else {
264
- size = 'height';
265
- center = 'centerY';
266
- start = 'top';
267
- finish = 'bottom';
268
- margin = 'marginTop';
269
- startBorder = 'borderTop';
270
- finishBorder = 'borderBottom';
271
- }
272
-
273
- ret[start] = "50%";
274
-
275
- startBorderVal = this._cssNumber(this[startBorder]);
276
- finishBorderVal = this._cssNumber(this[finishBorder]);
277
- ret[startBorder+'Width'] = startBorderVal || null;
278
- ret[finishBorder+'Width'] = finishBorderVal || null;
279
-
280
-
281
- var sizeValue = this[size],
282
- centerValue = this[center],
283
- startValue = this[start];
284
-
285
- var sizeIsPercent = SC.isPercentage(sizeValue), centerIsPercent = SC.isPercentage(centerValue, YES);
286
210
 
287
- // If > 1 then it should be a normal number value
288
- if (sizeValue > 1) { sizeValue -= (startBorderVal + finishBorderVal); }
289
-
290
- if((sizeIsPercent && centerIsPercent) || (!sizeIsPercent && !centerIsPercent)) {
291
- var value = centerValue - sizeValue/2;
292
- ret[margin] = (sizeIsPercent) ? Math.floor(value * 100) + "%" : Math.floor(value);
211
+ /** @private */
212
+ _calculateCenter: function (style, direction) {
213
+ var size, center, start, finish, margin,
214
+ startBorder,
215
+ finishBorder;
216
+
217
+ if (direction === 'X') {
218
+ size = 'width';
219
+ center = 'centerX';
220
+ start = 'left';
221
+ finish = 'right';
222
+ margin = 'marginLeft';
223
+ startBorder = 'borderLeftWidth';
224
+ finishBorder = 'borderRightWidth';
293
225
  } else {
294
- // This error message happens whenever height is not set.
295
- SC.Logger.warn("You have to set "+size+" and "+center+" using both percentages or pixels");
296
- ret[margin] = "50%";
297
- }
298
-
299
- ret[size] = this._cssNumber(sizeValue) || 0;
300
- ret[finish] = null;
301
- },
302
-
303
- _calculateTransforms: function(translateLeft, translateTop){
304
- if (SC.platform.supportsCSSTransforms) {
305
- // Handle transforms
306
- var layout = this.get('layout');
307
- var transformAttribute = SC.platform.domCSSPrefix+'Transform';
308
- var transforms = [];
309
-
310
- if (this.turbo) {
311
- // FIXME: Can we just set translateLeft / translateTop to 0 earlier?
312
- transforms.push('translateX('+(translateLeft || 0)+'px)', 'translateY('+(translateTop || 0)+'px)');
313
-
314
- // double check to make sure this is needed
315
- if (SC.platform.supportsCSS3DTransforms) { transforms.push('translateZ(0px)'); }
316
- }
317
-
318
- // normalizing transforms like rotateX: 5 to rotateX(5deg)
319
- var transformMap = SC.CSS_TRANSFORM_MAP;
320
- for(var transformName in transformMap) {
321
- var layoutTransform = layout[transformName];
322
-
323
- if(layoutTransform != null) {
324
- transforms.push(transformMap[transformName](layoutTransform));
325
- }
326
- }
327
-
328
- this.ret[transformAttribute] = transforms.length > 0 ? transforms.join(' ') : null;
226
+ size = 'height';
227
+ center = 'centerY';
228
+ start = 'top';
229
+ finish = 'bottom';
230
+ margin = 'marginTop';
231
+ startBorder = 'borderTopWidth';
232
+ finishBorder = 'borderBottomWidth';
329
233
  }
330
- },
331
-
332
- _calculateAnimations: function(translateLeft, translateTop){
333
- var layout = this.layout,
334
- animations = layout.animate,
335
- key;
336
-
337
- // we're checking to see if the layout update was triggered by a call to .animate
338
- if (!animations) { return; }
339
-
340
- // TODO: Deprecate SC.Animatable
341
- if(this.getPath('view.isAnimatable')) { return; }
342
-
343
- // Handle animations
344
- var transitions = [], animation;
345
- this._animatedTransforms = [];
346
-
347
- if (!this._pendingAnimations) { this._pendingAnimations = {}; }
348
-
349
- var platformTransform = "-" + SC.platform.cssPrefix + "-transform";
350
-
351
-
352
- // animate({ scale: 2, rotateX: 90 })
353
- // both scale and rotateX are transformProperties
354
- // so they both actually are animating the same CSS key, i.e. -webkit-transform
355
-
356
- if (SC.platform.supportsCSSTransitions) {
357
- for(key in animations) {
358
- // FIXME: If we want to allow it to be set as just a number for duration we need to add support here
359
- animation = animations[key];
360
-
361
- var isTransformProperty = SC.CSS_TRANSFORM_MAP[key];
362
- var isTurboProperty = (key === 'top' && translateTop != null) || (key === 'left' && translateLeft != null);
363
-
364
- if (SC.platform.supportsCSSTransforms && (isTurboProperty || isTransformProperty)) {
365
- this._animatedTransforms.push(key);
366
- key = platformTransform;
367
- }
368
-
369
- // We're actually storing the css for the animation on layout.animate[key].css
370
- animation.css = key + " " + animation.duration + "s " + animation.timing;
371
-
372
- // If there are multiple transform properties, we only need to set this key once.
373
- // We already checked before to make sure they have the same duration.
374
- if (!this._pendingAnimations[key]) {
375
- this._pendingAnimations[key] = animation;
376
- transitions.push(animation.css);
377
- }
378
- }
379
-
380
- this.ret[SC.platform.domCSSPrefix+"Transition"] = transitions.join(", ");
381
234
 
235
+ style[start] = "50%";
236
+
237
+ var startBorderVal = this._cssNumber(style[startBorder]),
238
+ finishBorderVal = this._cssNumber(style[finishBorder]),
239
+ sizeValue = style[size],
240
+ centerValue = style[center],
241
+ sizeIsPercent = SC.isPercentage(sizeValue),
242
+ value;
243
+
244
+ style[startBorder] = startBorderVal;
245
+ style[finishBorder] = finishBorderVal;
246
+
247
+ // Calculate the margin offset used to center the value along this axis.
248
+ if (SC.none(sizeValue)) {
249
+ //@if(debug)
250
+ // This error message happens whenever width or height is not set.
251
+ SC.warn("Developer Warning: When setting '" + center + "' in the layout, you must also set '" + size + "'.");
252
+ //@endif
253
+ style[margin] = "50%";
382
254
  } else {
383
- // TODO: Do it the JS way
384
-
385
- // For now we're just sticking them in so the callbacks can be run
386
- for(key in animations) {
387
- this._pendingAnimations[key] = animations[key];
388
- }
255
+ value = centerValue - sizeValue / 2;
256
+ style[margin] = (sizeIsPercent) ? Math.floor(value * 100) + "%" : Math.floor(value);
389
257
  }
390
258
 
391
- delete layout.animate;
259
+ // If > 1 then it's a pixel value, in which case we shrink it to accommodate the borders.
260
+ if (sizeValue > 1) { sizeValue -= (startBorderVal + finishBorderVal); }
261
+
262
+ style[size] = this._cssNumber(sizeValue) || 0;
263
+ style[finish] = style[center] = null;
392
264
  },
393
265
 
266
+ /** @private */
394
267
  // return "auto" for "auto", null for null, converts 0.XY into "XY%".
395
268
  // otherwise returns the original number, rounded down
396
- _cssNumber: function(val){
269
+ _cssNumber: function (val) {
270
+ /*jshint eqnull:true*/
397
271
  if (val == null) { return null; }
398
272
  else if (val === SC.LAYOUT_AUTO) { return SC.LAYOUT_AUTO; }
399
- else if (SC.isPercentage(val)) { return (val*100)+"%"; }
273
+ else if (SC.isPercentage(val)) { return (val * 100) + "%"; }
400
274
  else { return Math.floor(val); }
401
275
  },
402
276
 
403
- calculate: function() {
404
- var layout = this.get('layout'), pdim = null,
405
- staticLayout = this.get('staticLayout'),
406
- translateTop = null,
407
- translateLeft = null,
408
- turbo = this.get('turbo'),
409
- ret = this.ret,
410
- dims = this.dims,
411
- loc = this.loc,
412
- view = this.get('view'),
413
- key, value;
414
-
415
- this._handleMistakes(layout);
277
+ /** @private
278
+ Calculate the layout style for the given view, making adjustments to allow
279
+ for flexible positioning, animation and accelerated transforms.
416
280
 
281
+ @return {Object} Layout style hash.
282
+ */
283
+ calculate: function (view) {
284
+ var layout = view.get('layout'),
285
+ animations = view._activeAnimations,
286
+ state,
287
+ useStaticLayout = view.get('useStaticLayout'),
288
+ style;
289
+
290
+ // Fast path!
417
291
  // If the developer sets useStaticLayout and doesn't provide a unique `layout` property, we
418
292
  // should not insert the styles "left: 0px; right: 0px; top: 0px; bottom: 0px" as they could
419
293
  // conflict with the developer's intention. However, if they do provide a unique `layout`,
420
294
  // use it.
421
- if (staticLayout && layout === SC.View.prototype.layout) return {};
295
+ if (useStaticLayout && layout === SC.View.prototype.layout) { return {}; }
422
296
 
423
- // X DIRECTION
297
+ style = this._prepareStyle(layout);
298
+ state = this._prepareState(style);
424
299
 
425
- if (this.hasLeft || this.hasRight || !this.hasCenterX) {
426
- translateLeft = this._calculatePosition("x");
427
- } else {
428
- this._calculateCenter("x");
300
+ // handle invalid use of auto in absolute layouts
301
+ if (!useStaticLayout) {
302
+ if (style.width === SC.LAYOUT_AUTO) { this._invalidAutoValue(view, "width"); }
303
+ if (style.height === SC.LAYOUT_AUTO) { this._invalidAutoValue(view, "height"); }
429
304
  }
430
305
 
306
+ // X DIRECTION
307
+ if (state.hasLeft || state.hasRight || !state.hasCenterX) {
308
+ this._calculatePosition(style, state, "X");
309
+ } else {
310
+ this._calculateCenter(style, "X");
311
+ }
431
312
 
432
313
  // Y DIRECTION
433
-
434
- if (this.hasTop || this.hasBottom || !this.hasCenterY) {
435
- translateTop = this._calculatePosition("y");
314
+ if (state.hasTop || state.hasBottom || !state.hasCenterY) {
315
+ this._calculatePosition(style, state, "Y");
436
316
  } else {
437
- this._calculateCenter("y");
317
+ this._calculateCenter(style, "Y");
438
318
  }
439
319
 
440
-
441
- // these properties pass through unaltered (after prior normalization)
442
- ret.minWidth = this.minWidth;
443
- ret.maxWidth = this.maxWidth;
444
- ret.minHeight = this.minHeight;
445
- ret.maxHeight = this.maxHeight;
446
-
447
- ret.zIndex = this.zIndex;
448
- ret.opacity = this.opacity;
449
-
450
- // for ie, we will NOT use alpha. It is just a source of pain.
451
- // a) it will not affect absolutely positioned child elements, and is therefore
452
- // useless for most SC purposes.
453
- //
454
- // b) It completely breaks semitransparent background images (PNGs with opacity)
455
- //
456
- // If users want to use alpha, they should do it on their own.
457
-
458
- // if(!SC.none(this.opacity)) ret.filter = "alpha(opacity=%@)".fmt(this.opacity * 100);
459
-
460
- ret.backgroundPosition = this.backgroundPosition;
461
-
462
- this._calculateTransforms(translateLeft, translateTop);
463
- this._calculateAnimations(translateLeft, translateTop);
464
-
320
+ this._calculateAnimations(style, animations, view.get('hasAcceleratedLayer'));
465
321
 
466
322
  // convert any numbers into a number + "px".
467
- for(key in ret) {
468
- value = ret[key];
469
- if (typeof value === SC.T_NUMBER) { ret[key] = (value + "px"); }
323
+ for (var key in style) {
324
+ var value = style[key];
325
+ if (typeof value === SC.T_NUMBER) { style[key] = (value + "px"); }
470
326
  }
471
327
 
472
- return ret ;
328
+ return style;
473
329
  },
474
330
 
475
- /** @private
476
- This method is called before the layout style is applied to the layer. If
477
- animations have been defined for the view, they will be included in
478
- this._pendingAnimations. This method will clear out any conflicts between
479
- pending and active animations.
480
- */
481
- willRenderAnimations: function() {
482
- if (SC.platform.supportsCSSTransitions) {
483
- var view = this.get('view'),
484
- layer = view.get('layer'),
485
- currentStyle = layer ? layer.style : null,
486
- newStyle = view.get('layoutStyle'),
487
- activeAnimations = this._activeAnimations, activeAnimation,
488
- pendingAnimations = this._pendingAnimations, pendingAnimation,
489
- animatedTransforms = this._animatedTransforms,
490
- transformsLength = animatedTransforms ? animatedTransforms.length : 0,
491
- key, keys = [], callback, idx, shouldCancel;
492
-
493
- if (pendingAnimations) {
494
- if (!activeAnimations) activeAnimations = {};
495
-
496
- for (key in pendingAnimations) {
497
- if (!pendingAnimations.hasOwnProperty(key)) continue;
498
-
499
- pendingAnimation = pendingAnimations[key];
500
- activeAnimation = activeAnimations[key];
501
- shouldCancel = NO;
502
-
503
- if (newStyle[key] !== (currentStyle ? currentStyle[key] : null)) shouldCancel = YES;
504
-
505
- // if we have a new animation (an animation property has changed), cancel current
506
- if (activeAnimation && (activeAnimation.duration !== pendingAnimation.duration || activeAnimation.timing !== pendingAnimation.timing)) {
507
- shouldCancel = YES;
331
+ /** @private Calculates animation styles. */
332
+ _calculateAnimations: function (style, animations, hasAcceleratedLayer) {
333
+ /*jshint eqnull:true*/
334
+ var key,
335
+ shouldTranslate;
336
+
337
+ // Handle transforms
338
+ if (hasAcceleratedLayer) {
339
+ shouldTranslate = YES;
340
+
341
+ // If we're animating other transforms at different speeds, don't use acceleratedLayer
342
+ if (animations && (animations.top || animations.left)) {
343
+ for (key in animations) {
344
+ if (SC.CSS_TRANSFORM_MAP[key] &&
345
+ ((animations.top &&
346
+ animations.top.duration !== animations[key].duration) ||
347
+ (animations.left &&
348
+ animations.left.duration !== animations[key].duration))) {
349
+ shouldTranslate = NO;
508
350
  }
351
+ }
352
+ }
509
353
 
510
- if (shouldCancel && activeAnimation) {
511
- if (callback = activeAnimation.callback) {
512
- if (transformsLength > 0) {
513
- this.runAnimationCallback(callback, null, YES);
514
- this._animatedTransforms = null;
515
- } else {
516
- this.runAnimationCallback(callback, null, YES);
517
- }
518
- }
519
-
520
- this.removeAnimationFromLayout(key, YES);
521
- }
354
+ if (shouldTranslate) {
355
+ var transformAttribute = SC.browser.experimentalStyleNameFor('transform'),
356
+ curValue = style[transformAttribute];
522
357
 
523
- activeAnimations[key] = pendingAnimation;
524
- keys.push(key);
358
+ // Don't overwrite previously transformed values.
359
+ if (curValue) {
360
+ curValue += ' ';
361
+ } else {
362
+ curValue = '';
525
363
  }
526
364
 
527
- if (!this._groupedAnimations) this._groupedAnimations = {};
528
- this._groupedAnimations[key] = keys;
365
+ style[transformAttribute] = curValue + 'translateX(' + style.left + 'px) translateY(' + style.top + 'px)';
366
+ style.left = 0;
367
+ style.top = 0;
529
368
 
530
- this._activeAnimations = activeAnimations;
531
- this._pendingAnimations = null;
532
- }
533
- }
534
- },
535
-
536
- /** @private
537
- This method is called after the layout style is applied to the layer. If
538
- the platform didn't support CSS transitions, the callbacks will be fired
539
- immediately and the animations removed from the queue.
540
- */
541
- didRenderAnimations: function(){
542
- if (!SC.platform.supportsCSSTransitions) {
543
- var key, callback;
544
-
545
- // Transitions not supported
546
- for (key in this._pendingAnimations) {
547
- callback = this._pendingAnimations[key].callback;
548
- if (callback) {
549
- // We're using invokeOnce because we only want to call a callback
550
- // once for each group of animations.
551
- this.invokeOnceLater('runAnimationCallback', 1, callback, null, NO);
552
- }
553
- this.removeAnimationFromLayout(key, NO, YES);
369
+ // double check to make sure this is needed
370
+ if (SC.platform.supportsCSS3DTransforms) { style[transformAttribute] += ' translateZ(0px)'; }
554
371
  }
555
-
556
- // Reset the placeholder variables now that the layout style has been applied.
557
- this._activeAnimations = this._pendingAnimations = null;
558
372
  }
559
- },
560
373
 
561
- runAnimationCallback: function(callback, evt, cancelled) {
562
- var view = this.get('view');
563
- if (callback) {
564
- if (SC.typeOf(callback) !== SC.T_HASH) { callback = { action: callback }; }
565
- callback.source = view;
566
- if (!callback.target) { callback.target = this; }
567
- }
568
- SC.View.runCallback(callback, { event: evt, view: view, isCancelled: cancelled });
569
- },
374
+ // Handle animations
375
+ if (animations) {
376
+ if (SC.platform.supportsCSSTransitions) {
377
+ var transitions = [];
570
378
 
571
- transitionDidEnd: function(evt) {
572
- var propertyName = evt.originalEvent.propertyName,
573
- propertyNames,
574
- animation, idx;
379
+ for (key in animations) {
380
+ var animation = animations[key],
381
+ isTransformProperty = !!SC.CSS_TRANSFORM_MAP[key],
382
+ isTurboProperty = shouldTranslate && (key === 'top' || key === 'left');
575
383
 
576
- animation = this._activeAnimations ? this._activeAnimations[propertyName] : null;
384
+ if (SC.platform.supportsCSSTransforms && (isTurboProperty || isTransformProperty)) {
385
+ // Untrack the un-transformed property name.
386
+ delete animations[key];
577
387
 
578
- if (animation) {
579
- if (animation.callback) {
580
- // We're using invokeOnceLater so we don't trigger any layout changes from
581
- // the callbacks until the animations are done and we only want to call
582
- // a callback once for each group of animations.
583
- this.invokeOnceLater('runAnimationCallback', 1, animation.callback, evt, NO);
584
- }
585
- this.removeAnimationFromLayout(propertyName, YES);
586
-
587
- var key;
588
- propertyNames = this._groupedAnimations && this._groupedAnimations[propertyName];
589
- if (propertyNames) {
590
- for (var i = 0, len = propertyNames.length; i < len; i++) {
591
- key = propertyNames[i];
592
- delete this._activeAnimations[key];
593
- }
388
+ // The key will be either 'transform' or one of '-webkit-transform', '-ms-transform', '-moz-transform', '-o-transform'
389
+ key = SC.browser.experimentalCSSNameFor('transform');
594
390
 
595
- delete this._groupedAnimations[propertyName];
596
- }
597
- }
598
- },
391
+ var curTransformAnimation = animations[key];
599
392
 
600
- removeAnimationFromLayout: function(propertyName, updateStyle, isPending) {
601
- if (updateStyle) {
602
- var layer = this.getPath('view.layer'),
603
- updatedCSS = [], key;
604
- for(key in this._activeAnimations) {
605
- if (key !== propertyName) { updatedCSS.push(this._activeAnimations[key].css); } // && this._activeAnimations[key]
606
- }
393
+ // Because multiple transforms actually share one CSS property, we can't animate multiple transforms
394
+ // at different speeds. So, to handle that case, we just force them to all have the same length.
395
+ if (curTransformAnimation) {
396
+ //@if(debug)
397
+ if (curTransformAnimation.duration !== animation.duration || curTransformAnimation.timing !== animation.timing || curTransformAnimation.delay !== animation.delay) {
398
+ SC.Logger.warn("Developer Warning: Can't animate transforms with different durations, timings or delays! Using the first options specified.");
399
+ }
400
+ //@endif
401
+ animation = curTransformAnimation;
402
+ } else {
403
+ // Track the transformed property name.
404
+ animations[key] = animation;
405
+ }
406
+ }
607
407
 
608
- // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update
609
- if (layer) { layer.style[SC.platform.domCSSPrefix+"Transition"] = updatedCSS.join(', '); }
610
- }
408
+ // Fix up the centerX & centerY properties.
409
+ if (key === 'centerX') { key = 'margin-left'; }
410
+ if (key === 'centerY') { key = 'margin-top'; }
611
411
 
412
+ // We're actually storing the css for the animation on layout.animate[key].css
413
+ animation.css = key + " " + animation.duration + "s " + animation.timing + " " + animation.delay + "s";
612
414
 
613
- var layout = this.getPath('view.layout'),
614
- idx;
415
+ // If there are multiple transform properties, we only need to set this key once.
416
+ // We already checked before to make sure they have the same duration.
417
+ // if (!pendingAnimations[key]) {
418
+ if (transitions.indexOf(animation.css) < 0) {
419
+ transitions.push(animation.css);
420
+ }
421
+ }
615
422
 
616
- if (propertyName === '-'+SC.platform.cssPrefix+'-transform' && this._animatedTransforms && this._animatedTransforms.length > 0) {
617
- for(idx=0; idx < this._animatedTransforms.length; idx++) {
618
- delete layout['animate' + SC.String.capitalize(this._animatedTransforms[idx])];
423
+ style[SC.browser.experimentalStyleNameFor('transition')] = transitions.join(", ");
424
+ } else {
425
+ // TODO: Do it the JS way
619
426
  }
620
- this._animatedTransforms = null;
621
427
  }
622
- delete layout['animate' + SC.String.capitalize(propertyName)];
623
428
  }
624
429
 
625
- });
430
+ };
626
431
 
627
- SC.CoreView.runCallback = function(callback)/** @scope SC.View.prototype */{
628
- var additionalArgs = SC.$A(arguments).slice(1),
629
- typeOfAction = SC.typeOf(callback.action);
630
-
631
- // if the action is a function, just try to call it.
632
- if (typeOfAction == SC.T_FUNCTION) {
633
- callback.action.apply(callback.target, additionalArgs);
634
-
635
- // otherwise, action should be a string. If it has a period, treat it
636
- // like a property path.
637
- } else if (typeOfAction === SC.T_STRING) {
638
- if (callback.action.indexOf('.') >= 0) {
639
- var path = callback.action.split('.') ;
640
- var property = path.pop() ;
641
-
642
- var target = SC.objectForPropertyPath(path, window) ;
643
- var action = target.get ? target.get(property) : target[property];
644
- if (action && SC.typeOf(action) == SC.T_FUNCTION) {
645
- action.apply(target, additionalArgs);
646
- } else {
647
- throw 'SC.runCallback could not find a function at %@'.fmt(callback.action) ;
648
- }
649
432
 
650
- // otherwise, try to execute action direction on target or send down
651
- // responder chain.
652
- // FIXME: Add support for additionalArgs to this
653
- // } else {
654
- // SC.RootResponder.responder.sendAction(callback.action, callback.target, callback.source, callback.source.get("pane"), null, callback.source);
655
- }
656
- }
657
- };
658
433
 
659
- SC.View.runCallback = SC.CoreView.runCallback;
434
+ SC.View.reopen(
435
+ /** @scope SC.View.prototype */ {
436
+
437
+ /**
438
+ layoutStyle describes the current styles to be written to your element
439
+ based on the layout you defined. Both layoutStyle and frame reset when
440
+ you edit the layout property. Both are read only.
441
+
442
+ Computes the layout style settings needed for the current anchor.
443
+
444
+ @type Object
445
+ @readOnly
446
+ */
447
+ layoutStyle: function () {
448
+ return SC.View.LayoutStyleCalculator.calculate(this);
449
+ // 'hasAcceleratedLayer' is dependent on 'layout' so we don't need 'layout' to be a dependency here
450
+ }.property('hasAcceleratedLayer', 'useStaticLayout').cacheable()
451
+ });