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
@@ -6,126 +6,141 @@
6
6
  // ==========================================================================
7
7
 
8
8
  // standard browser cursor definitions
9
- SC.SYSTEM_CURSOR = 'default' ;
10
- SC.AUTO_CURSOR = SC.DEFAULT_CURSOR = 'auto' ;
11
- SC.CROSSHAIR_CURSOR = 'crosshair' ;
12
- SC.HAND_CURSOR = SC.POINTER_CURSOR = 'pointer' ;
13
- SC.MOVE_CURSOR = 'move' ;
14
- SC.E_RESIZE_CURSOR = 'e-resize' ;
15
- SC.NE_RESIZE_CURSOR = 'ne-resize' ;
16
- SC.NW_RESIZE_CURSOR = 'nw-resize' ;
17
- SC.N_RESIZE_CURSOR = 'n-resize' ;
18
- SC.SE_RESIZE_CURSOR = 'se-resize' ;
19
- SC.SW_RESIZE_CURSOR = 'sw-resize' ;
20
- SC.S_RESIZE_CURSOR = 's-resize' ;
21
- SC.W_RESIZE_CURSOR = 'w-resize' ;
22
- SC.IBEAM_CURSOR = SC.TEXT_CURSOR = 'text' ;
23
- SC.WAIT_CURSOR = 'wait' ;
24
- SC.HELP_CURSOR = 'help' ;
9
+ // TODO: remove extra constants in next version
10
+ // TODO: consider adding theme cursors for custom behaviors like drag & drop
11
+ SC.SYSTEM_CURSOR = SC.DEFAULT_CURSOR = 'default';
12
+ SC.AUTO_CURSOR = 'auto';
13
+ SC.CROSSHAIR_CURSOR = 'crosshair';
14
+ SC.HAND_CURSOR = SC.POINTER_CURSOR = 'pointer';
15
+ SC.MOVE_CURSOR = 'move';
16
+ SC.E_RESIZE_CURSOR = 'e-resize';
17
+ SC.NE_RESIZE_CURSOR = 'ne-resize';
18
+ SC.NW_RESIZE_CURSOR = 'nw-resize';
19
+ SC.N_RESIZE_CURSOR = 'n-resize';
20
+ SC.SE_RESIZE_CURSOR = 'se-resize';
21
+ SC.SW_RESIZE_CURSOR = 'sw-resize';
22
+ SC.S_RESIZE_CURSOR = 's-resize';
23
+ SC.W_RESIZE_CURSOR = 'w-resize';
24
+ SC.IBEAM_CURSOR = SC.TEXT_CURSOR = 'text';
25
+ SC.WAIT_CURSOR = 'wait';
26
+ SC.HELP_CURSOR = 'help';
25
27
 
26
28
  /**
27
29
  @class SC.Cursor
28
30
 
29
- A Cursor object is used to synchronize the cursor used by multiple views at
31
+ A Cursor object is used to synchronize the cursor used by multiple views at
30
32
  the same time. For example, thumb views within a split view acquire a cursor
31
- instance from the split view and set it as their cursor. The split view is
33
+ instance from the split view and set it as their cursor. The split view is
32
34
  able to update its cursor object to reflect the state of the split view.
33
- Because cursor objects are implemented internally with CSS, this is a very
35
+ Because cursor objects are implemented internally with CSS, this is a very
34
36
  efficient way to update the same cursor for a group of view objects.
35
-
36
- Note: This object creates an anonymous CSS class to represent the cursor.
37
+
38
+ Note: This object creates an anonymous CSS class to represent the cursor.
37
39
  The anonymous CSS class is automatically added by SproutCore to views that
38
- have the cursor object set as "their" cursor. Thus, all objects attached to
40
+ have the cursor object set as "their" cursor. Thus, all objects attached to
39
41
  the same cursor object will have their cursors updated simultaneously with a
40
42
  single DOM call.
41
-
43
+
42
44
  @extends SC.Object
43
45
  */
44
46
  SC.Cursor = SC.Object.extend(
45
47
  /** @scope SC.Cursor.prototype */ {
46
-
48
+
47
49
  /** @private */
48
- init: function() {
49
- sc_super() ;
50
-
50
+ init: function () {
51
+ sc_super();
52
+
51
53
  // create a unique style rule and add it to the shared cursor style sheet
52
- var cursorStyle = this.get('cursorStyle') || SC.DEFAULT_CURSOR ,
53
- ss = this.constructor.sharedStyleSheet(),
54
- guid = SC.guidFor(this);
55
-
54
+ var cursorStyle = this.get('cursorStyle') || SC.DEFAULT_CURSOR,
55
+ ss = this.constructor.sharedStyleSheet(),
56
+ guid = SC.guidFor(this);
57
+
56
58
  if (ss.insertRule) { // WC3
57
59
  ss.insertRule(
58
- '.'+guid+' {cursor: '+cursorStyle+';}',
60
+ '.' + guid + ' {cursor: ' + cursorStyle + ';}',
59
61
  ss.cssRules ? ss.cssRules.length : 0
60
- ) ;
62
+ );
61
63
  } else if (ss.addRule) { // IE
62
- ss.addRule('.'+guid, 'cursor: '+cursorStyle) ;
64
+ ss.addRule('.' + guid, 'cursor: ' + cursorStyle);
63
65
  }
64
-
65
- this.cursorStyle = cursorStyle ;
66
- this.className = guid ; // used by cursor clients...
67
- return this ;
66
+
67
+ this.cursorStyle = cursorStyle;
68
+ this.className = guid; // used by cursor clients...
69
+ return this;
68
70
  },
69
-
71
+
70
72
  /**
71
73
  This property is the connection between cursors and views. The default
72
74
  SC.View behavior is to add this className to a view's layer if it has
73
75
  its cursor property defined.
74
-
76
+
75
77
  @readOnly
76
- @property {String} the css class name updated by this cursor
78
+ @type String the css class name updated by this cursor
77
79
  */
78
80
  className: null,
79
-
81
+
80
82
  /**
81
- @property {String} the cursor value, can be 'url("path/to/cursor")'
83
+ @type String the cursor value, can be 'url("path/to/cursor")'
82
84
  */
83
85
  cursorStyle: SC.DEFAULT_CURSOR,
84
-
86
+
85
87
  /** @private */
86
- cursorStyleDidChange: function() {
88
+ cursorStyleDidChange: function () {
87
89
  var cursorStyle, rule, selector, ss, rules, idx, len;
88
90
  cursorStyle = this.get('cursorStyle') || SC.DEFAULT_CURSOR;
89
91
  rule = this._rule;
90
92
  if (rule) {
91
- rule.style.cursor = cursorStyle ; // fast path
92
- return ;
93
+ rule.style.cursor = cursorStyle; // fast path
94
+ return;
93
95
  }
94
-
96
+
95
97
  // slow path, taken only once
96
- selector = '.'+this.get('className') ;
97
- ss = this.constructor.sharedStyleSheet() ;
98
- rules = (ss.cssRules ? ss.cssRules : ss.rules) || [] ;
99
-
98
+ selector = '.' + this.get('className');
99
+ ss = this.constructor.sharedStyleSheet();
100
+ rules = (ss.cssRules ? ss.cssRules : ss.rules) || [];
101
+
100
102
  // find our rule, cache it, and update the cursor style property
101
- for (idx=0, len = rules.length; idx<len; ++idx) {
102
- rule = rules[idx] ;
103
+ for (idx = 0, len = rules.length; idx < len; ++idx) {
104
+ rule = rules[idx];
103
105
  if (rule.selectorText === selector) {
104
- this._rule = rule ; // cache for next time
105
- rule.style.cursor = cursorStyle ; // update the cursor
106
- break ;
106
+ this._rule = rule; // cache for next time
107
+ rule.style.cursor = cursorStyle; // update the cursor
108
+ break;
107
109
  }
108
110
  }
109
111
  }.observes('cursorStyle')
110
-
112
+
111
113
  // TODO implement destroy
112
-
114
+
113
115
  });
114
116
 
117
+
115
118
  /** @private */
116
- SC.Cursor.sharedStyleSheet = function() {
117
- var head, ss = this._styleSheet ;
119
+ SC.Cursor.sharedStyleSheet = function () {
120
+ var ssEl,
121
+ head,
122
+ ss = this._styleSheet;
123
+
118
124
  if (!ss) {
119
125
  // create the stylesheet object the hard way (works everywhere)
120
- ss = document.createElement('style') ;
121
- ss.type = 'text/css' ;
122
- head = document.getElementsByTagName('head')[0] ;
123
- if (!head) head = document.documentElement ; // fix for Opera
124
- head.appendChild(ss) ;
125
-
126
- // get the actual stylesheet object, not the DOM element
127
- ss = document.styleSheets[document.styleSheets.length-1] ;
128
- this._styleSheet = ss ;
126
+ ssEl = document.createElement('style');
127
+ head = document.getElementsByTagName('head')[0];
128
+ if (!head) head = document.documentElement; // fix for Opera
129
+ head.appendChild(ssEl);
130
+
131
+ // Get the actual stylesheet object, not the DOM element. We expect it to
132
+ // be the last stylesheet in the document, but test to make sure no other
133
+ // stylesheet has appeared.
134
+ for (var i = document.styleSheets.length - 1; i >= 0; i--) {
135
+ ss = document.styleSheets[i];
136
+
137
+ if (ss.ownerNode === ssEl) {
138
+ // We've found the proper stylesheet.
139
+ this._styleSheet = ss;
140
+ break;
141
+ }
142
+ }
129
143
  }
130
- return ss ;
144
+
145
+ return ss;
131
146
  };
@@ -15,49 +15,49 @@ SC.LANDSCAPE_ORIENTATION = 'landscape';
15
15
  SC.NO_ORIENTATION = 'desktop'; // value 'desktop' for backwards compatibility
16
16
 
17
17
  /**
18
- The device object allows you to check device specific properties such as
19
- orientation and if the device is offline, as well as observe when they change
18
+ The device object allows you to check device specific properties such as
19
+ orientation and if the device is offline, as well as observe when they change
20
20
  state.
21
-
21
+
22
22
  ## Orientation
23
23
  When a touch device changes orientation, the orientation property will be
24
24
  set accordingly which you can observe
25
-
25
+
26
26
  ## Offline support
27
- In order to build a good offline-capable web application, you need to know
28
- when your app has gone offline so you can for instance queue your server
27
+ In order to build a good offline-capable web application, you need to know
28
+ when your app has gone offline so you can for instance queue your server
29
29
  requests for a later time or provide a specific UI/message.
30
-
31
- Similarly, you also need to know when your application has returned to an
32
- 'online' state again, so that you can re-synchronize with the server or do
30
+
31
+ Similarly, you also need to know when your application has returned to an
32
+ 'online' state again, so that you can re-synchronize with the server or do
33
33
  anything else that might be needed.
34
-
34
+
35
35
  By observing the 'isOffline' property you can be notified when this state
36
36
  changes. Note that this property is only connected to the navigator.onLine
37
37
  property, which is available on most modern browsers.
38
-
38
+
39
39
  */
40
40
  SC.device = SC.Object.create({
41
-
41
+
42
42
  /**
43
43
  Sets the orientation for touch devices, either SC.LANDSCAPE_ORIENTATION
44
44
  or SC.PORTRAIT_ORIENTATION. Will be SC.NO_ORIENTATION in the case of
45
45
  non-touch devices that are also not simulating touch events.
46
-
47
- @property {String}
46
+
47
+ @type String
48
48
  @default SC.NO_ORIENTATION
49
49
  */
50
50
  orientation: SC.NO_ORIENTATION,
51
-
51
+
52
52
  /**
53
53
  Indicates whether the device is currently online or offline. For browsers
54
54
  that do not support this feature, the default value is NO.
55
-
55
+
56
56
  Is currently inverse of the navigator.onLine property. Most modern browsers
57
- will update this property when switching to or from the browser's Offline
57
+ will update this property when switching to or from the browser's Offline
58
58
  mode, and when losing/regaining network connectivity.
59
-
60
- @property {Boolean}
59
+
60
+ @type Boolean
61
61
  @default NO
62
62
  */
63
63
  isOffline: NO,
@@ -66,7 +66,7 @@ SC.device = SC.Object.create({
66
66
  Returns a Point containing the last known X and Y coordinates of the
67
67
  mouse, if present.
68
68
 
69
- @property {Point}
69
+ @type Point
70
70
  */
71
71
  mouseLocation: function() {
72
72
  var responder = SC.RootResponder.responder,
@@ -85,12 +85,12 @@ SC.device = SC.Object.create({
85
85
  */
86
86
  init: function() {
87
87
  sc_super();
88
-
88
+
89
89
  if (navigator && navigator.onLine === false) {
90
90
  this.set('isOffline', YES);
91
91
  }
92
92
  },
93
-
93
+
94
94
  /**
95
95
  As soon as the DOM is up and running, make sure we attach necessary
96
96
  event handlers
@@ -98,14 +98,14 @@ SC.device = SC.Object.create({
98
98
  setup: function() {
99
99
  var responder = SC.RootResponder.responder;
100
100
  responder.listenFor(['online', 'offline'], window, this);
101
-
101
+
102
102
  this.orientationHandlingShouldChange();
103
103
  },
104
-
104
+
105
105
  // ..........................................................
106
106
  // ORIENTATION HANDLING
107
107
  //
108
-
108
+
109
109
  /**
110
110
  Determines which method to use for orientation changes.
111
111
  Either detects orientation changes via the current size
@@ -120,7 +120,7 @@ SC.device = SC.Object.create({
120
120
  this.orientationchange();
121
121
  }
122
122
  },
123
-
123
+
124
124
  /**
125
125
  @param {Hash} newSize The new size of the window
126
126
  @returns YES if the method altered the orientation, NO otherwise
@@ -155,7 +155,7 @@ SC.device = SC.Object.create({
155
155
  }
156
156
  return NO;
157
157
  },
158
-
158
+
159
159
  /**
160
160
  Called when the window.onorientationchange event is fired.
161
161
  */
@@ -168,33 +168,33 @@ SC.device = SC.Object.create({
168
168
  }
169
169
  });
170
170
  },
171
-
171
+
172
172
  orientationObserver: function(){
173
173
  var body = SC.$(document.body),
174
174
  orientation = this.get('orientation');
175
-
175
+
176
176
  if (orientation === SC.PORTRAIT_ORIENTATION) {
177
177
  body.addClass('portrait');
178
178
  } else {
179
179
  body.removeClass('portrait');
180
180
  }
181
-
181
+
182
182
  if (orientation === SC.LANDSCAPE_ORIENTATION) {
183
183
  body.addClass('landscape');
184
184
  } else {
185
185
  body.removeClass('landscape');
186
186
  }
187
187
  }.observes('orientation'),
188
-
189
-
188
+
189
+
190
190
  // ..........................................................
191
191
  // CONNECTION HANDLING
192
- //
193
-
192
+ //
193
+
194
194
  online: function(evt) {
195
195
  this.set('isOffline', NO);
196
196
  },
197
-
197
+
198
198
  offline: function(evt) {
199
199
  this.set('isOffline', YES);
200
200
  }
@@ -784,7 +784,7 @@ SC.Event.prototype = {
784
784
  This allows a generic event handler to notice if you want to provide
785
785
  detailed control over how the browser handles the real event.
786
786
 
787
- @property {Boolean}
787
+ @type Boolean
788
788
  */
789
789
  hasCustomEventHandling: NO,
790
790
 
@@ -875,7 +875,7 @@ SC.Event.prototype = {
875
875
  /**
876
876
  Always YES to indicate the event was normalized.
877
877
 
878
- @property {Boolean}
878
+ @type Boolean
879
879
  */
880
880
  normalized: YES,
881
881
 
@@ -183,7 +183,7 @@ SC.Locale = SC.Object.extend({
183
183
  // specified an additional hash and it has the same key, we'll throw an
184
184
  // error.
185
185
  if (additionalHash && additionalHash[layoutKey]) {
186
- throw "locLayout(): There is a localized value for the key '" + key + "' but a value for '" + layoutKey + "' was also specified in the non-localized hash";
186
+ throw new Error("locLayout(): There is a localized value for the key '" + key + "' but a value for '" + layoutKey + "' was also specified in the non-localized hash");
187
187
  }
188
188
 
189
189
  ret[layoutKey] = value;
@@ -396,7 +396,7 @@ SC.Locale.mixin(/** @scope SC.Locale */ {
396
396
  by your own application. See the SC.Locale class definition for the
397
397
  various properties you can set on your own locales.
398
398
 
399
- @property {Hash}
399
+ @type Hash
400
400
  */
401
401
  SC.Locale.locales = {
402
402
  en: SC.Locale.extend({ _deprecatedLanguageCodes: ['English'] }),
@@ -4,8 +4,19 @@
4
4
  // Portions ©2008-2011 Apple Inc. All rights reserved.
5
5
  // License: Licensed under MIT license (see license.js)
6
6
  // ==========================================================================
7
+ /*global jQuery*/
7
8
 
8
9
  /**
10
+ A constant indicating an unsupported method, property or other.
11
+
12
+ @static
13
+ @constant
14
+ */
15
+ SC.UNSUPPORTED = '_sc_unsupported';
16
+
17
+
18
+ /** @class
19
+
9
20
  This platform object allows you to conditionally support certain HTML5
10
21
  features.
11
22
 
@@ -17,13 +28,13 @@ SC.platform = SC.Object.create({
17
28
  /**
18
29
  The size of scrollbars in this browser.
19
30
 
20
- @property
31
+ @type Number
21
32
  */
22
- scrollbarSize: function() {
33
+ scrollbarSize: function () {
23
34
  var tester = document.createElement("DIV"),
24
35
  child;
25
36
  tester.innerHTML = "<div style='height:1px;'></div>";
26
- tester.style.cssText="position:absolute;width:100px;height:100px;overflow-y:visible;";
37
+ tester.style.cssText = "position:absolute;width:100px;height:100px;overflow-y:visible;";
27
38
 
28
39
  child = tester.childNodes[0];
29
40
  document.body.appendChild(tester);
@@ -32,7 +43,7 @@ SC.platform = SC.Object.create({
32
43
  var withScroller = child.innerWidth || child.clientWidth;
33
44
  document.body.removeChild(tester);
34
45
 
35
- return noScroller-withScroller;
46
+ return noScroller - withScroller;
36
47
 
37
48
  }.property().cacheable(),
38
49
 
@@ -44,8 +55,12 @@ SC.platform = SC.Object.create({
44
55
  - Android is assumed to support touch, but incorrectly reports that it does not.
45
56
  - See: https://github.com/Modernizr/Modernizr/issues/84 for a discussion on detecting
46
57
  touch capability.
47
- - See: https://github.com/highslide-software/highcharts.com/issues/1331 for a discussion
58
+ - See: https://github.com/highslide-software/highcharts.com/issues/1331 for a discussion
48
59
  about why we need to check if ontouchstart is null in addition to check if it's defined
60
+ - The test for window._phantom provides support for phantomjs, the headless WebKit browser
61
+ used in Travis-CI, and which incorredtly (see above) identifies itself as a touch browser.
62
+ For more information on CI see https://github.com/sproutcore/sproutcore/pull/1025
63
+ For discussion of the phantomjs touch issue see https://github.com/ariya/phantomjs/issues/10375
49
64
  */
50
65
  /**
51
66
  YES if the current device supports touch events, NO otherwise.
@@ -53,45 +68,48 @@ SC.platform = SC.Object.create({
53
68
  You can simulate touch events in environments that don't support them by
54
69
  calling SC.platform.simulateTouchEvents() from your browser's console.
55
70
 
56
- @property {Boolean}
71
+ Note! The support for "touch" is a browser property and can't be relied on
72
+ to determine if the device is actually a "touch" device or if the device
73
+ actually uses touch events. There are instances where "touch" devices will
74
+ not send touch events or will send touch and mouse events together and
75
+ there are instances where "non-touch" devices will support touch events.
76
+
77
+ It is recommended that you do not use this property at this time.
78
+
79
+ @type Boolean
57
80
  */
58
- touch: !SC.none(window.ontouchstart) || SC.browser.name === SC.BROWSER.android,
81
+ touch: (!SC.none(window.ontouchstart) || SC.browser.name === SC.BROWSER.android || 'ontouchstart' in document.documentElement) && SC.none(window._phantom),
59
82
 
60
83
  /**
61
84
  YES if the current browser supports bounce on scroll.
62
85
 
63
- @property {Boolean}
86
+ @type Boolean
64
87
  */
65
88
  bounceOnScroll: SC.browser.os === SC.OS.ios,
66
89
 
67
90
  /**
68
91
  YES if the current browser supports pinch to zoom.
69
92
 
70
- @property {Boolean}
93
+ @type Boolean
71
94
  */
72
95
  pinchToZoom: SC.browser.os === SC.OS.ios,
73
96
 
74
- /**
75
- YES if the current browser supports the `placeholder` attribute in `input` elements.
76
- */
77
- input: {
78
- placeholder: ('placeholder' in document.createElement('input'))
79
- },
80
-
81
97
  /**
82
98
  A hash that contains properties that indicate support for new HTML5
83
99
  input attributes.
84
100
 
85
101
  For example, to test to see if the placeholder attribute is supported,
86
102
  you would verify that SC.platform.input.placeholder is YES.
103
+
104
+ @type Array
87
105
  */
88
- input: function(attributes) {
106
+ input: function (attributes) {
89
107
  var ret = {},
90
108
  len = attributes.length,
91
109
  elem = document.createElement('input'),
92
110
  attr, idx;
93
111
 
94
- for (idx=0; idx < len; idx++) {
112
+ for (idx = 0; idx < len; idx++) {
95
113
  attr = attributes[idx];
96
114
 
97
115
  ret[attr] = !!(attr in elem);
@@ -106,20 +124,21 @@ SC.platform = SC.Object.create({
106
124
 
107
125
  For example, if the user has saved your web application to their home
108
126
  screen on an iPhone OS-based device, this property will be true.
109
- @property {Boolean}
127
+
128
+ @type Boolean
110
129
  */
111
130
  standalone: !!navigator.standalone,
112
131
 
113
132
 
114
- /**
115
- Prefix for browser specific CSS attributes. Calculated later.
133
+ /** @deprecated Since version 1.10. Use SC.browser.cssPrefix.
134
+ Prefix for browser specific CSS attributes.
116
135
  */
117
- cssPrefix: null,
136
+ cssPrefix: SC.browser.cssPrefix,
118
137
 
119
- /**
120
- Prefix for browser specific CSS attributes when used in the DOM. Calculated later.
138
+ /** @deprecated Since version 1.10. Use SC.browser.domPrefix.
139
+ Prefix for browser specific CSS attributes when used in the DOM.
121
140
  */
122
- domCSSPrefix: null,
141
+ domCSSPrefix: SC.browser.domPrefix,
123
142
 
124
143
  /**
125
144
  Call this method to swap out the default mouse handlers with proxy methods
@@ -127,7 +146,7 @@ SC.platform = SC.Object.create({
127
146
 
128
147
  This is useful if you are debugging touch functionality on the desktop.
129
148
  */
130
- simulateTouchEvents: function() {
149
+ simulateTouchEvents: function () {
131
150
  // Touch events are supported natively, no need for this.
132
151
  if (this.touch) {
133
152
  // @if (debug)
@@ -167,7 +186,7 @@ SC.platform = SC.Object.create({
167
186
 
168
187
  @param {Array} events Array of strings representing the events to remove
169
188
  */
170
- removeEvents: function(events) {
189
+ removeEvents: function (events) {
171
190
  var idx, len = events.length, key;
172
191
  for (idx = 0; idx < len; idx++) {
173
192
  key = events[idx];
@@ -181,7 +200,7 @@ SC.platform = SC.Object.create({
181
200
  @param {String} evt The event to replace
182
201
  @param {Function} replacement The method that should be called instead
183
202
  */
184
- replaceEvent: function(evt, replacement) {
203
+ replaceEvent: function (evt, replacement) {
185
204
  SC.Event.remove(document, evt, SC.RootResponder.responder, SC.RootResponder.responder[evt]);
186
205
  SC.Event.add(document, evt, this, replacement);
187
206
  },
@@ -192,13 +211,13 @@ SC.platform = SC.Object.create({
192
211
 
193
212
  If the altKey is depressed and pinch center not yet established, we will capture the mouse position.
194
213
  */
195
- _simtouch_mousemove: function(evt) {
214
+ _simtouch_mousemove: function (evt) {
196
215
  if (!this._mousedown) {
197
216
  /*
198
217
  we need to capture when was the first spot that the altKey was pressed and use it as
199
218
  the center point of a pinch
200
219
  */
201
- if(evt.altKey && this._pinchCenter === null) {
220
+ if (evt.altKey && this._pinchCenter === null) {
202
221
  this._pinchCenter = {
203
222
  pageX: evt.pageX,
204
223
  pageY: evt.pageY,
@@ -207,7 +226,7 @@ SC.platform = SC.Object.create({
207
226
  clientX: evt.clientX,
208
227
  clientY: evt.clientY
209
228
  };
210
- } else if(!evt.altKey && this._pinchCenter !== null){
229
+ } else if (!evt.altKey && this._pinchCenter !== null) {
211
230
  this._pinchCenter = null;
212
231
  }
213
232
  return NO;
@@ -221,7 +240,7 @@ SC.platform = SC.Object.create({
221
240
  When simulating touch events, this method is called when mousedown events
222
241
  are received.
223
242
  */
224
- _simtouch_mousedown: function(evt) {
243
+ _simtouch_mousedown: function (evt) {
225
244
  this._mousedown = YES;
226
245
 
227
246
  var manufacturedEvt = this.manufactureTouchEvent(evt, 'touchstart');
@@ -232,7 +251,7 @@ SC.platform = SC.Object.create({
232
251
  When simulating touch events, this method is called when mouseup events
233
252
  are received.
234
253
  */
235
- _simtouch_mouseup: function(evt) {
254
+ _simtouch_mouseup: function (evt) {
236
255
  var manufacturedEvt = this.manufactureTouchEvent(evt, 'touchend'),
237
256
  ret = SC.RootResponder.responder.touchend(manufacturedEvt);
238
257
 
@@ -256,7 +275,7 @@ SC.platform = SC.Object.create({
256
275
  @param {String} type the type of event (e.g., touchstart)
257
276
  @returns {Event} the mouse event with an added changedTouches array
258
277
  */
259
- manufactureTouchEvent: function(evt, type) {
278
+ manufactureTouchEvent: function (evt, type) {
260
279
  var realTouch, virtualTouch, realTouchIdentifier = this._simtouch_counter;
261
280
 
262
281
  realTouch = {
@@ -275,10 +294,9 @@ SC.platform = SC.Object.create({
275
294
  /*
276
295
  simulate pinch gesture
277
296
  */
278
- if(evt.altKey && this._pinchCenter !== null)
279
- {
297
+ if (evt.altKey && this._pinchCenter !== null) {
280
298
  //calculate the mirror position of the virtual touch
281
- var pageX = this._pinchCenter.pageX + this._pinchCenter.pageX - evt.pageX ,
299
+ var pageX = this._pinchCenter.pageX + this._pinchCenter.pageX - evt.pageX,
282
300
  pageY = this._pinchCenter.pageY + this._pinchCenter.pageY - evt.pageY,
283
301
  screenX = this._pinchCenter.screenX + this._pinchCenter.screenX - evt.screenX,
284
302
  screenY = this._pinchCenter.screenY + this._pinchCenter.screenY - evt.screenY,
@@ -298,7 +316,7 @@ SC.platform = SC.Object.create({
298
316
  clientY: clientY
299
317
  };
300
318
 
301
- evt.touches = [ realTouch , virtualTouch];
319
+ evt.touches = [realTouch, virtualTouch];
302
320
  }
303
321
  evt.changedTouches = evt.touches;
304
322
 
@@ -306,38 +324,46 @@ SC.platform = SC.Object.create({
306
324
  },
307
325
 
308
326
  /**
309
- Whether the browser supports CSS transitions. Calculated later.
327
+ Whether the browser supports CSS animations.
328
+
329
+ @type Boolean
310
330
  */
311
- supportsCSSTransitions: NO,
331
+ supportsCSSAnimations: SC.browser.experimentalStyleNameFor('animation') !== SC.UNSUPPORTED,
312
332
 
313
333
  /**
314
- Whether the browser supports 2D CSS transforms. Calculated later.
334
+ Whether the browser supports CSS transitions.
335
+
336
+ @type Boolean
315
337
  */
316
- supportsCSSTransforms: NO,
338
+ supportsCSSTransitions: SC.browser.experimentalStyleNameFor('transition') !== SC.UNSUPPORTED,
317
339
 
318
340
  /**
319
- Whether the browser understands 3D CSS transforms.
320
- This does not guarantee that the browser properly handles them.
321
- Calculated later.
341
+ Whether the browser supports 2D CSS transforms.
342
+
343
+ @type Boolean
322
344
  */
323
- understandsCSS3DTransforms: NO,
345
+ supportsCSSTransforms: SC.browser.experimentalStyleNameFor('transform') !== SC.UNSUPPORTED,
324
346
 
325
347
  /**
326
- Whether the browser can properly handle 3D CSS transforms. Calculated later.
348
+ Whether the browser can properly handle 3D CSS transforms.
349
+
350
+ @type Boolean
327
351
  */
328
- supportsCSS3DTransforms: NO,
352
+ supportsCSS3DTransforms: SC.browser.experimentalStyleNameFor('perspective') !== SC.UNSUPPORTED,
329
353
 
330
354
  /**
331
- Whether the browser can handle accelerated layers. While supports3DTransforms tells us if they will
332
- work in principle, sometimes accelerated layers interfere with things like getBoundingClientRect.
333
- Then everything breaks.
355
+ Whether the browser supports the application cache.
356
+
357
+ @type Boolean
334
358
  */
335
- supportsAcceleratedLayers: NO,
359
+ supportsApplicationCache: ('applicationCache' in window),
336
360
 
337
361
  /**
338
362
  Whether the browser supports the hashchange event.
363
+
364
+ @type Boolean
339
365
  */
340
- supportsHashChange: function() {
366
+ supportsHashChange: function () {
341
367
  // Code copied from Modernizr which copied code from YUI (MIT licenses)
342
368
  // documentMode logic from YUI to filter out IE8 Compat Mode which false positives
343
369
  return ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7);
@@ -345,99 +371,236 @@ SC.platform = SC.Object.create({
345
371
 
346
372
  /**
347
373
  Whether the browser supports HTML5 history.
374
+
375
+ @type Boolean
348
376
  */
349
- supportsHistory: function() {
377
+ supportsHistory: function () {
350
378
  return !!(window.history && window.history.pushState);
351
379
  }(),
352
380
 
353
- supportsCanvas: function() {
381
+ /**
382
+ Whether the browser supports IndexedDB.
383
+
384
+ @type Boolean
385
+ */
386
+ supportsIndexedDB: function () {
387
+ return !!(window.indexedDB || window[SC.browser.domPrefix + 'IndexedDB']);
388
+ }(),
389
+
390
+ /**
391
+ Whether the browser supports the canvas element.
392
+
393
+ @type Boolean
394
+ */
395
+ supportsCanvas: function () {
354
396
  return !!document.createElement('canvas').getContext;
355
397
  }(),
356
398
 
399
+ /**
400
+ Whether the browser supports the orientationchange event.
401
+
402
+ @type Boolean
403
+ */
357
404
  supportsOrientationChange: ('onorientationchange' in window),
358
405
 
406
+ /**
407
+ Whether the browser supports WebSQL.
408
+
409
+ @type Boolean
410
+ */
411
+ supportsWebSQL: ('openDatabase' in window),
412
+
359
413
  /**
360
414
  Because iOS is slow to dispatch the window.onorientationchange event,
361
415
  we use the window size to determine the orientation on iOS devices
362
416
  and desktop environments when SC.platform.touch is YES (ie. when
363
417
  SC.platform.simulateTouchEvents has been called)
364
418
 
365
- @property {Boolean}
366
- @default NO
419
+ @type Boolean
367
420
  */
368
- windowSizeDeterminesOrientation: SC.browser.os === SC.OS.ios || !('onorientationchange' in window)
421
+ windowSizeDeterminesOrientation: SC.browser.os === SC.OS.ios || !('onorientationchange' in window),
422
+
423
+ /**
424
+ Does this browser support the Apache Cordova (formerly phonegap) runtime?
425
+
426
+ This requires that you (the engineer) manually include the cordova
427
+ javascript library for the appropriate platform (Android, iOS, etc)
428
+ in your code. There are various methods of doing this; creating your own
429
+ platform-specific index.rhtml is probably the easiest option.
430
+
431
+ WARNING: Using the javascript_libs Buildfile option for the cordova include
432
+ will NOT work. The library will be included after your application code,
433
+ by which time this property will already have been evaluated.
434
+
435
+ @type Boolean
436
+ @see http://incubator.apache.org/cordova/
437
+ */
438
+ // Check for the global cordova property.
439
+ cordova: (typeof window.cordova !== "undefined")
369
440
 
370
441
  });
371
442
 
372
- /* Calculate CSS Prefixes */
373
-
374
- (function(){
375
- var userAgent = navigator.userAgent.toLowerCase();
376
- if ((/webkit/).test(userAgent)) {
377
- SC.platform.cssPrefix = 'webkit';
378
- SC.platform.domCSSPrefix = 'Webkit';
379
- } else if((/opera/).test( userAgent )) {
380
- SC.platform.cssPrefix = 'opera';
381
- SC.platform.domCSSPrefix = 'O';
382
- } else if((/msie/).test( userAgent ) && !(/opera/).test( userAgent )) {
383
- SC.platform.cssPrefix = 'ms';
384
- SC.platform.domCSSPrefix = 'ms';
385
- } else if((/mozilla/).test( userAgent ) && !(/(compatible|webkit)/).test( userAgent )) {
386
- SC.platform.cssPrefix = 'moz';
387
- SC.platform.domCSSPrefix = 'Moz';
388
- }
389
- })();
390
443
 
391
- /* Calculate transform support */
444
+ /** @private
445
+ Test the transition and animation event names of this platform. We could hard
446
+ code event names into the framework, but at some point things would change and
447
+ we would get it wrong. Instead we perform actual tests to find out the proper
448
+ names and only add the proper listeners.
449
+ */
450
+ (function () {
451
+ // This will add 4 different variations of the named event listener and clean
452
+ // them up again.
453
+ // Note: we pass in capitalizedEventName, because we can't just capitalize
454
+ // the standard event name. For example, in WebKit the standard transitionend
455
+ // event is named webkitTransitionEnd, not webkitTransitionend.
456
+ var executeTest = function (el, standardEventName, capitalizedEventName, cleanUpFunc) {
457
+ var domPrefix = SC.browser.domPrefix,
458
+ lowerDomPrefix = domPrefix.toLowerCase(),
459
+ eventNameKey = standardEventName + 'EventName',
460
+ callback = function (evt) {
461
+ var domPrefix = SC.browser.domPrefix,
462
+ lowerDomPrefix = domPrefix.toLowerCase(),
463
+ eventNameKey = standardEventName + 'EventName';
464
+
465
+ // Remove all the event listeners.
466
+ el.removeEventListener(standardEventName, callback, NO);
467
+ el.removeEventListener(lowerDomPrefix + standardEventName, callback, NO);
468
+ el.removeEventListener(lowerDomPrefix + capitalizedEventName, callback, NO);
469
+ el.removeEventListener(domPrefix + capitalizedEventName, callback, NO);
470
+
471
+ // The cleanup timer re-uses this function and doesn't pass evt.
472
+ if (evt) {
473
+ SC.platform[eventNameKey] = evt.type;
474
+
475
+ // Don't allow the event to bubble, because SC.RootResponder will be
476
+ // adding event listeners as soon as the testing is complete. It is
477
+ // important that SC.RootResponder's listeners don't catch the last
478
+ // test event.
479
+ evt.stopPropagation();
480
+ }
481
+
482
+ // Call the clean up function, pass in success state.
483
+ if (cleanUpFunc) { cleanUpFunc(!!evt); }
484
+ jQuery.holdReady(NO);
485
+ };
392
486
 
393
- (function(){
394
- // a test element
395
- var el = document.createElement("div");
487
+ // Set the initial value as unsupported.
488
+ SC.platform[eventNameKey] = SC.UNSUPPORTED;
396
489
 
397
- // the css and javascript to test
398
- var css_browsers = ["-moz-", "-moz-", "-o-", "-ms-", "-webkit-"],
399
- test_browsers = ["moz", "Moz", "o", "ms", "webkit"];
490
+ // Try the various implementations.
491
+ // ex. transitionend, webkittransitionend, webkitTransitionEnd, WebkitTransitionEnd
492
+ el.addEventListener(standardEventName, callback, NO);
493
+ el.addEventListener(lowerDomPrefix + standardEventName, callback, NO);
494
+ el.addEventListener(lowerDomPrefix + capitalizedEventName, callback, NO);
495
+ el.addEventListener(domPrefix + capitalizedEventName, callback, NO);
400
496
 
401
- // prepare css
402
- var css = "", i = null, cssBrowser, iLen;
403
- for (i = 0, iLen = css_browsers.length; i < iLen; i++) {
404
- cssBrowser = css_browsers[i];
405
- css += cssBrowser + "transition:all 1s linear;";
406
- css += cssBrowser + "transform: translate(1px, 1px);";
407
- css += cssBrowser + "perspective: 500px;";
408
- }
497
+ // Delay the ready event for the tests to complete.
498
+ jQuery.holdReady(YES);
499
+ };
409
500
 
410
- // set css text
411
- el.style.cssText = css;
412
-
413
- // test
414
- var testBrowser;
415
- for (i = 0, iLen=test_browsers.length; i < iLen; i++)
416
- {
417
- testBrowser = test_browsers[i];
418
- if (el.style[testBrowser + "TransitionProperty"] !== undefined) SC.platform.supportsCSSTransitions = YES;
419
- if (el.style[testBrowser + "Transform"] !== undefined) SC.platform.supportsCSSTransforms = YES;
420
- if (el.style[testBrowser + "Perspective"] !== undefined || el.style[testBrowser + "PerspectiveProperty"] !== undefined) {
421
- SC.platform.understandsCSS3DTransforms = YES;
422
- SC.platform.supportsCSS3DTransforms = YES;
423
- }
424
- }
501
+ // Set up and execute the transition event test.
502
+ if (SC.platform.supportsCSSTransitions) {
503
+ var transitionEl = document.createElement('div'),
504
+ transitionStyleName = SC.browser.experimentalStyleNameFor('transition', 'all 1ms linear');
425
505
 
426
- // unfortunately, we need a bit more to know FOR SURE that 3D is allowed
427
- try{
428
- if (window.media && window.media.matchMedium) {
429
- if (!window.media.matchMedium('(-webkit-transform-3d)')) SC.platform.supportsCSS3DTransforms = NO;
430
- } else if(window.styleMedia && window.styleMedia.matchMedium) {
431
- if (!window.styleMedia.matchMedium('(-webkit-transform-3d)')) SC.platform.supportsCSS3DTransforms = NO;
432
- }
433
- }catch(e){
434
- //Catch to support IE9 exception
435
- SC.platform.supportsCSS3DTransforms = NO;
506
+ transitionEl.style[transitionStyleName] = 'all 1ms linear';
507
+
508
+ // Test transition events.
509
+ executeTest(transitionEl, 'transitionend', 'TransitionEnd', function (success) {
510
+ // If an end event never fired, we can't really support CSS transitions in SproutCore.
511
+ if (!success) {
512
+ SC.platform.supportsCSSTransitions = NO;
513
+ }
514
+
515
+ transitionEl.parentNode.removeChild(transitionEl);
516
+ transitionEl = null;
517
+ });
518
+
519
+ // Append the test element.
520
+ document.documentElement.appendChild(transitionEl);
521
+
522
+ // Break execution to allow the browser to update the DOM before altering the style.
523
+ setTimeout(function () {
524
+ transitionEl.style.opacity = '0';
525
+ });
436
526
  }
437
527
 
438
- // Unfortunately, this has to be manual, as I can't think of a good way to test it
439
- // webkit-only for now.
440
- if (SC.platform.supportsCSSTransforms && SC.platform.cssPrefix === "webkit") {
441
- SC.platform.supportsAcceleratedLayers = YES;
528
+ // Set up and execute the animation event test.
529
+ if (SC.platform.supportsCSSAnimations) {
530
+ var animationEl = document.createElement('div'),
531
+ keyframes,
532
+ prefixedKeyframes;
533
+
534
+ // Generate both the regular and prefixed version of the style.
535
+ keyframes = '@keyframes _sc_animation_test { from { opacity: 1; } to { opacity: 0; } }';
536
+ prefixedKeyframes = '@' + SC.browser.cssPrefix + 'keyframes _sc_prefixed_animation_test { from { opacity: 1; } to { opacity: 0; } }';
537
+
538
+ // Add test animation styles.
539
+ animationEl.innerHTML = '<style>' + keyframes + '\n' + prefixedKeyframes + '</style>';
540
+
541
+ // Set up and execute the animation event test.
542
+ animationEl.style.animation = '_sc_animation_test 1ms linear';
543
+ animationEl.style[SC.browser.domPrefix + 'Animation'] = '_sc_prefixed_animation_test 5ms linear';
544
+
545
+ // NOTE: We could test start, but it's extra work and easier just to test the end
546
+ // and infer the start event name from it. Keeping this code for example.
547
+ // executeTest(animationEl, 'animationstart', 'AnimationStart', function (success) {
548
+ // // If an iteration start never fired, we can't really support CSS transitions in SproutCore.
549
+ // if (!success) {
550
+ // SC.platform.supportsCSSAnimations = NO;
551
+ // }
552
+ // });
553
+
554
+ // NOTE: Testing iteration event support proves very problematic. Many
555
+ // browsers can't iterate less than several milliseconds which means we
556
+ // have to wait too long to find out this event name. Instead we test
557
+ // the end only and infer the iteration event name from it. Keeping this
558
+ // code for example, but it wont' work reliably unless the animation style
559
+ // is something like '_sc_animation_test 30ms linear' (i.e. ~60ms wait time)
560
+ // executeTest(animationEl, 'animationiteration', 'AnimationIteration', function (success) {
561
+ // // If an iteration event never fired, we can't really support CSS transitions in SproutCore.
562
+ // if (!success) {
563
+ // SC.platform.supportsCSSAnimations = NO;
564
+ // }
565
+ // });
566
+
567
+ // Test animation events.
568
+ executeTest(animationEl, 'animationend', 'AnimationEnd', function (success) {
569
+ // If an end event never fired, we can't really support CSS animations in SproutCore.
570
+ if (success) {
571
+ // Infer the start and iteration event names.
572
+ var domPrefix = SC.browser.domPrefix,
573
+ lowerDomPrefix = domPrefix.toLowerCase(),
574
+ endEventName = SC.platform.animationendEventName;
575
+
576
+ switch (endEventName) {
577
+ case lowerDomPrefix + 'animationend':
578
+ SC.platform.animationstartEventName = lowerDomPrefix + 'animationstart';
579
+ SC.platform.animationiterationEventName = lowerDomPrefix + 'animationiteration';
580
+ break;
581
+ case lowerDomPrefix + 'AnimationEnd':
582
+ SC.platform.animationstartEventName = lowerDomPrefix + 'AnimationStart';
583
+ SC.platform.animationiterationEventName = lowerDomPrefix + 'AnimationIteration';
584
+ break;
585
+ case domPrefix + 'AnimationEnd':
586
+ SC.platform.animationstartEventName = domPrefix + 'AnimationStart';
587
+ SC.platform.animationiterationEventName = domPrefix + 'AnimationIteration';
588
+ break;
589
+ default:
590
+ SC.platform.animationstartEventName = 'animationstart';
591
+ SC.platform.animationiterationEventName = 'animationiteration';
592
+ }
593
+
594
+ } else {
595
+ SC.platform.supportsCSSAnimations = NO;
596
+ }
597
+
598
+ // Clean up.
599
+ animationEl.parentNode.removeChild(animationEl);
600
+ animationEl = null;
601
+ });
602
+
603
+ // Break execution to allow the browser to update the DOM before altering the style.
604
+ document.documentElement.appendChild(animationEl);
442
605
  }
443
606
  })();