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
@@ -4,15 +4,16 @@
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
  sc_require('system/browser');
9
10
  sc_require('system/event');
10
11
  sc_require('system/cursor');
11
- sc_require('system/responder') ;
12
+ sc_require('system/responder');
12
13
  sc_require('system/theme');
13
14
 
14
- sc_require('system/string') ;
15
- sc_require('views/view/base') ;
15
+ sc_require('system/string');
16
+ sc_require('views/view/statechart');
16
17
 
17
18
 
18
19
  /**
@@ -42,6 +43,13 @@ SC.EMPTY_CHILD_VIEWS_ARRAY.needsClone = YES;
42
43
  SC.CoreView.reopen(
43
44
  /** @scope SC.View.prototype */ {
44
45
 
46
+ /**
47
+ An array of the properties of this class that will be concatenated when
48
+ also present on subclasses.
49
+
50
+ @type Array
51
+ @default ['outlets', 'displayProperties', 'classNames', 'renderMixin', 'didCreateLayerMixin', 'willDestroyLayerMixin', 'classNameBindings', 'attributeBindings']
52
+ */
45
53
  concatenatedProperties: ['outlets', 'displayProperties', 'classNames', 'renderMixin', 'didCreateLayerMixin', 'willDestroyLayerMixin', 'classNameBindings', 'attributeBindings'],
46
54
 
47
55
  /**
@@ -53,68 +61,96 @@ SC.CoreView.reopen(
53
61
  The full list of valid WAI-ARIA roles is available at:
54
62
  http://www.w3.org/TR/wai-aria/roles#roles_categorization
55
63
 
56
- @property {String}
64
+ @type String
65
+ @default null
57
66
  */
58
-
59
67
  ariaRole: null,
60
68
 
61
69
  /**
62
- The full list of valid WAI-ARIA roles is available at:
63
- http://www.w3.org/TR/wai-aria/roles#roles_categorization
70
+ The aria-hidden role is managed appropriately by the internal view's
71
+ statechart. When the view is not currently displayed the aria-hidden
72
+ attribute will be set to true.
64
73
 
65
- @property {String}
74
+ @type String
75
+ @default null
76
+ @deprecated Version 1.10
66
77
  */
67
-
68
78
  ariaHidden: null,
69
79
 
80
+ /**
81
+ Whether this view was created by its parent view or not.
82
+
83
+ Several views are given child view classes or instances to automatically
84
+ append and remove. In the case that the view was provided an instance,
85
+ when it removes the instance and no longer needs it, it should not destroy
86
+ the instance because it was created by someone else.
87
+
88
+ On the other hand if the view was given a class that it creates internal
89
+ instances from, then it should destroy those instances properly to avoid
90
+ memory leaks.
91
+
92
+ This property should be set by any view that is creating internal child
93
+ views so that it can properly remove them later. Note that if you use
94
+ `createChildView`, this property is set automatically for you.
95
+
96
+ @type Boolean
97
+ @see SC.View#createChildView
98
+ @default false
99
+ */
100
+ createdByParent: false,
101
+
70
102
  /**
71
103
  The current pane.
72
- @property {SC.Pane}
104
+
105
+ @field
106
+ @type SC.Pane
107
+ @default null
73
108
  */
74
- pane: function() {
75
- var view = this ;
76
- while (view && !view.isPane) { view = view.get('parentView') ; }
77
- return view ;
109
+ pane: function () {
110
+ var view = this;
111
+
112
+ while (view && !view.isPane) { view = view.get('parentView'); }
113
+
114
+ return view;
78
115
  }.property('parentView').cacheable(),
79
116
 
80
117
  /**
81
118
  The page this view was instantiated from. This is set by the page object
82
119
  during instantiation.
83
120
 
84
- @property {SC.Page}
121
+ @type SC.Page
122
+ @default null
85
123
  */
86
124
  page: null,
87
125
 
88
126
  /**
89
127
  If the view is currently inserted into the DOM of a parent view, this
90
128
  property will point to the parent of the view.
129
+
130
+ @type SC.View
131
+ @default null
91
132
  */
92
133
  parentView: null,
93
134
 
94
135
  /**
95
- The isVisible property determines if the view is shown in the view
96
- hierarchy it is a part of. A view can have isVisible == YES and still have
97
- isVisibleInWindow == NO. This occurs, for instance, when a parent view has
98
- isVisible == NO. Default is YES.
136
+ The isVisible property determines if the view should be displayed or not.
99
137
 
100
- The isVisible property is considered part of the layout and so changing it
101
- will trigger a layout update.
138
+ If you also set a transitionShow or transitionHide plugin, then when
139
+ isVisible changes, the appropriate transition will execute as the view's
140
+ visibility changes.
102
141
 
103
- @property {Boolean}
104
- */
105
- isVisible: YES,
106
- isVisibleBindingDefault: SC.Binding.bool(),
142
+ Note that isVisible can be set to true and the view may still not be
143
+ "visible" in the window. This can occur if:
107
144
 
108
- /**
109
- Whether the view should be displayed. This is always YES,
110
- unless the visibility module is added to SC.View.
145
+ 1. the view is not attached to the document.
146
+ 2. the view has a view ancestor with isVisible set to false.
111
147
 
112
- If the visibility module is added, this property will be used to
113
- optimize certain behaviors on the view. For example, updates to the
114
- view layer will not be performed until the view becomes visible
115
- in the window.
148
+ @type Boolean
149
+ @see SC.View#viewState
150
+ @default true
116
151
  */
117
- isVisibleInWindow: YES,
152
+ isVisible: true,
153
+ isVisibleBindingDefault: SC.Binding.bool(),
118
154
 
119
155
  // ..........................................................
120
156
  // CHILD VIEW SUPPORT
@@ -126,7 +162,8 @@ SC.CoreView.reopen(
126
162
  use the accessor methods such as appendChild(), insertBefore() and
127
163
  removeChild().
128
164
 
129
- @property {Array}
165
+ @type Array
166
+ @default []
130
167
  */
131
168
  childViews: SC.EMPTY_CHILD_VIEWS_ARRAY,
132
169
 
@@ -144,11 +181,11 @@ SC.CoreView.reopen(
144
181
 
145
182
  You can also set the layer by calling set on this property.
146
183
 
147
- @property {DOMElement} the layer
184
+ @type DOMElement the layer
148
185
  */
149
- layer: function(key, value) {
186
+ layer: function (key, value) {
150
187
  if (value !== undefined) {
151
- this._view_layer = value ;
188
+ this._view_layer = value;
152
189
 
153
190
  // no layer...attempt to discover it...
154
191
  } else {
@@ -159,7 +196,7 @@ SC.CoreView.reopen(
159
196
  this._view_layer = value = this.findLayerInParentLayer(parent);
160
197
  }
161
198
  }
162
- return value ;
199
+ return value;
163
200
  }.property('isVisibleInWindow').cacheable(),
164
201
 
165
202
  /**
@@ -169,11 +206,11 @@ SC.CoreView.reopen(
169
206
  @param {String} sel a CoreQuery-compatible selector string
170
207
  @returns {SC.CoreQuery} the CoreQuery object for the DOM node
171
208
  */
172
- $: function(sel) {
173
- var layer = this.get('layer') ;
209
+ $: function (sel) {
210
+ var layer = this.get('layer');
174
211
 
175
- if(!layer) { return SC.$(); }
176
- else if(sel === undefined) { return SC.$(layer); }
212
+ if (!layer) { return SC.$(); }
213
+ else if (sel === undefined) { return SC.$(layer); }
177
214
  else { return SC.$(sel, layer); }
178
215
  },
179
216
 
@@ -183,10 +220,10 @@ SC.CoreView.reopen(
183
220
  returns the layer itself. You can override this to return a DOM element
184
221
  within the layer.
185
222
 
186
- @property {DOMElement} the container layer
223
+ @type DOMElement the container layer
187
224
  */
188
- containerLayer: function() {
189
- return this.get('layer') ;
225
+ containerLayer: function () {
226
+ return this.get('layer');
190
227
  }.property('layer').cacheable(),
191
228
 
192
229
  /**
@@ -194,13 +231,13 @@ SC.CoreView.reopen(
194
231
  set the layerId explicitly, then the view's GUID will be used instead.
195
232
  This ID must be set at the time the view is created.
196
233
 
197
- @property {String}
234
+ @type String
198
235
  @readOnly
199
236
  */
200
- layerId: function(key, value) {
237
+ layerId: function (key, value) {
201
238
  if (value) { this._layerId = value; }
202
239
  if (this._layerId) { return this._layerId; }
203
- return SC.guidFor(this) ;
240
+ return SC.guidFor(this);
204
241
  }.property().cacheable(),
205
242
 
206
243
  /**
@@ -213,7 +250,7 @@ SC.CoreView.reopen(
213
250
  @param {DOMElement} parentLayer the parent's DOM layer
214
251
  @returns {DOMElement} the discovered layer
215
252
  */
216
- findLayerInParentLayer: function(parentLayer) {
253
+ findLayerInParentLayer: function (parentLayer) {
217
254
  var id = "#" + this.get('layerId');
218
255
  return jQuery(id, parentLayer)[0] || jQuery(id)[0];
219
256
  },
@@ -224,89 +261,66 @@ SC.CoreView.reopen(
224
261
 
225
262
  @property {SC.View} view
226
263
  */
227
- isDescendantOf: function(view) {
264
+ isDescendantOf: function (view) {
228
265
  var parentView = this.get('parentView');
229
266
 
230
- if(this === view) { return YES; }
231
- else if(parentView) { return parentView.isDescendantOf(view); }
267
+ if (this === view) { return YES; }
268
+ else if (parentView) { return parentView.isDescendantOf(view); }
232
269
  else { return NO; }
233
270
  },
234
271
 
235
272
  /**
236
- This method is invoked whenever a display property changes. It will set
237
- the layerNeedsUpdate method to YES. If you need to perform additional
238
- setup whenever the display changes, you can override this method as well.
273
+ This method is invoked whenever a display property changes and updates
274
+ the view's content once at the end of the run loop before any invokeLast
275
+ functions run.
276
+
277
+ To cause the view to be updated you can call this method directly and
278
+ if you need to perform additional setup whenever the display changes, you
279
+ can override this method as well.
239
280
 
240
281
  @returns {SC.View} receiver
241
282
  */
242
- displayDidChange: function() {
243
- this.set('layerNeedsUpdate', YES) ;
283
+ displayDidChange: function () {
284
+ // Filter the input channel.
285
+ this.invokeOnce(this._doUpdateContent);
286
+
244
287
  return this;
245
288
  },
246
289
 
247
290
  /**
248
- Marks the view as needing a display update if the isVisible property changes.
291
+ This property has no effect and is deprecated.
249
292
 
250
- Note that this behavior is identical to a display property. It is broken out
251
- into its own observer so that it can be overridden with additional
252
- functionality if the visibility module is applied to SC.View.
253
- */
254
- _sc_isVisibleDidChange: function() {
255
- this.displayDidChange();
256
- }.observes('isVisible'),
257
-
258
- /**
259
- Setting this property to YES will cause the updateLayerIfNeeded method to
260
- be invoked at the end of the runloop. You can also force a view to update
261
- sooner by calling updateLayerIfNeeded() directly. The method will update
262
- the layer only if this property is YES.
293
+ To cause a view to update immediately, you should just call updateLayer or
294
+ updateLayerIfNeeded. To cause a view to update at the end of the run loop
295
+ before any invokeLast functions run, you should call displayDidChange.
263
296
 
264
- @property {Boolean}
297
+ @deprecated Version 1.10
298
+ @type Boolean
265
299
  @test in updateLayer
266
300
  */
267
301
  layerNeedsUpdate: NO,
268
302
 
269
- /** @private
270
- Schedules the updateLayerIfNeeded method to run at the end of the runloop
271
- if layerNeedsUpdate is set to YES.
272
- */
273
- _view_layerNeedsUpdateDidChange: function() {
274
- if (this.get('layerNeedsUpdate')) {
275
- this.invokeOnce(this.updateLayerIfNeeded) ;
276
- }
277
- }.observes('layerNeedsUpdate'),
278
-
279
303
  /**
280
- Updates the layer only if the view is visible onscreen and if
281
- layerNeedsUpdate is set to YES. Normally you will not invoke this method
282
- directly. Instead you set the layerNeedsUpdate property to YES and this
283
- method will be called once at the end of the runloop.
284
-
285
- If you need to update view's layer sooner than the end of the runloop, you
286
- can call this method directly. If your view is not visible in the window
287
- but you want it to update anyway, then call this method, passing YES for
288
- the 'skipIsVisibleInWindowCheck' parameter.
304
+ Updates the view's layer if the view is in a shown state. Otherwise, the
305
+ view will be updated the next time it enters a shown state.
289
306
 
290
- You should not override this method. Instead override updateLayer() or
291
- render().
307
+ This is the same behavior as `displayDidChange` except that calling
308
+ `updateLayerIfNeeded` will attempt to update each time it is called,
309
+ while `displayDidChange` will only attempt to update the layer once per run
310
+ loop.
292
311
 
293
312
  @returns {SC.View} receiver
294
313
  @test in updateLayer
295
314
  */
296
- updateLayerIfNeeded: function(skipIsVisibleInWindowCheck) {
297
- var needsUpdate = this.get('layerNeedsUpdate'),
298
- shouldUpdate = needsUpdate && (skipIsVisibleInWindowCheck || this.get('isVisibleInWindow'));
299
- if (shouldUpdate) {
300
- // only update a layer if it already exists
301
- if (this.get('layer')) {
302
- this.beginPropertyChanges() ;
303
- this.set('layerNeedsUpdate', NO) ;
304
- this.updateLayer() ;
305
- this.endPropertyChanges() ;
306
- }
315
+ updateLayerIfNeeded: function (skipIsVisibleInWindowCheck) {
316
+ //@if(debug)
317
+ if (skipIsVisibleInWindowCheck) {
318
+ SC.warn("Developer Warning: The `skipIsVisibleInWindowCheck` argument of updateLayerIfNeeded is not supported and will be ignored.");
307
319
  }
320
+ //@endif
321
+ this._doUpdateContent(false);
308
322
 
309
- return this ;
323
+ return this;
310
324
  },
311
325
 
312
326
  /**
@@ -324,55 +338,16 @@ SC.CoreView.reopen(
324
338
  do not want your render() method called when updating a layer, then you
325
339
  should override this method instead.
326
340
 
327
- @param optionalContext provided only for backwards-compatibility.
328
-
329
341
  @returns {SC.View} receiver
330
342
  */
331
- updateLayer: function(optionalContext) {
332
- var mixins, idx, len, hasLegacyRenderMethod;
333
-
334
- var context = optionalContext || this.renderContext(this.get('layer')) ;
335
- this._renderLayerSettings(context, NO);
336
-
337
- // If the render method takes two parameters, we assume that it is a
338
- // legacy implementation that takes context and firstTime. If it has only
339
- // one parameter, we assume it is the render delegates style that requires
340
- // only context. Note that, for backwards compatibility, the default
341
- // SC.View implementation of render uses the old style.
342
- hasLegacyRenderMethod = !this.update;
343
- // Call render with firstTime set to NO to indicate an update, rather than
344
- // full re-render, should be performed.
345
- if (hasLegacyRenderMethod) {
346
- this.render(context, NO);
347
- }
348
- else {
349
- this.update(context.$());
350
- }
351
- if (mixins = this.renderMixin) {
352
- len = mixins.length;
353
- for(idx=0; idx<len; ++idx) { mixins[idx].call(this, context, NO) ; }
354
- }
355
-
356
- context.update() ;
357
- if (context._innerHTMLReplaced) {
358
- var pane = this.get('pane');
359
- if(pane && pane.get('isPaneAttached')) {
360
- this._notifyDidAppendToDocument();
361
- }
362
- }
343
+ updateLayer: function () {
344
+ this._doUpdateContent(true);
363
345
 
364
- // If this view uses static layout, then notify that the frame (likely)
365
- // changed.
366
- if (this.useStaticLayout) { this.viewDidResize(); }
367
-
368
- if (this.didUpdateLayer) { this.didUpdateLayer(); } // call to update DOM
369
- if(this.designer && this.designer.viewDidUpdateLayer) {
370
- this.designer.viewDidUpdateLayer(); //let the designer know
371
- }
372
- return this ;
346
+ return this;
373
347
  },
374
348
 
375
- parentViewDidResize: function() {
349
+ /** @private */
350
+ parentViewDidResize: function () {
376
351
  if (!this.get('hasLayout')) { this.notifyPropertyChange('frame'); }
377
352
  this.viewDidResize();
378
353
  },
@@ -381,7 +356,7 @@ SC.CoreView.reopen(
381
356
  Override this in a child class to define behavior that should be invoked
382
357
  when a parent's view was resized.
383
358
  */
384
- viewDidResize: function() {},
359
+ viewDidResize: function () {},
385
360
 
386
361
  /**
387
362
  Creates a new renderContext with the passed tagName or element. You
@@ -390,8 +365,8 @@ SC.CoreView.reopen(
390
365
 
391
366
  @returns {SC.RenderContext}
392
367
  */
393
- renderContext: function(tagNameOrElement) {
394
- return SC.RenderContext(tagNameOrElement) ;
368
+ renderContext: function (tagNameOrElement) {
369
+ return SC.RenderContext(tagNameOrElement);
395
370
  },
396
371
 
397
372
  /**
@@ -406,62 +381,10 @@ SC.CoreView.reopen(
406
381
 
407
382
  @returns {SC.View} receiver
408
383
  */
409
- createLayer: function() {
410
- if (this.get('layer')) { return this ; } // nothing to do
411
-
412
- var context = this.renderContext(this.get('tagName')) ;
413
-
414
- // now prepare the content like normal.
415
- this.renderToContext(context) ;
416
- this.set('layer', context.element()) ;
384
+ createLayer: function () {
385
+ this._doRender();
417
386
 
418
- // now notify the view and its child views..
419
- this._notifyDidCreateLayer() ;
420
-
421
- return this ;
422
- },
423
-
424
- /** @private -
425
- Invokes the receivers didCreateLayer() method if it exists and then
426
- invokes the same on all child views.
427
- */
428
- _notifyDidCreateLayer: function() {
429
- this.notifyPropertyChange('layer');
430
-
431
- if (this.get('useStaticLayout')) this.viewDidResize();
432
-
433
- if (this.didCreateLayer) { this.didCreateLayer() ; }
434
-
435
- // and notify others
436
- var mixins = this.didCreateLayerMixin, len, idx,
437
- childViews = this.get('childViews'),
438
- childView;
439
- if (mixins) {
440
- len = mixins.length ;
441
- for (idx=0; idx<len; ++idx) { mixins[idx].call(this) ; }
442
- }
443
-
444
- len = childViews.length ;
445
- for (idx=0; idx<len; ++idx) {
446
- childView = childViews[idx];
447
- if (!childView) { continue; }
448
-
449
- // A parent view creating a layer might result in the creation of a
450
- // child view's DOM node being created via a render context without
451
- // createLayer() being invoked on the child. In such cases, if anyone
452
- // had requested 'layer' and it was cached as null, we need to
453
- // invalidate it.
454
- childView.notifyPropertyChange('layer');
455
-
456
- // A strange case, that a childView's frame won't be correct before
457
- // we have a layer, if the childView doesn't have a fixed layout
458
- // and we are using static layout
459
- if (this.get('useStaticLayout')) {
460
- if (!childView.get('isFixedLayout')) { childView.viewDidResize(); }
461
- }
462
-
463
- childView._notifyDidCreateLayer() ;
464
- }
387
+ return this;
465
388
  },
466
389
 
467
390
  /**
@@ -482,65 +405,75 @@ SC.CoreView.reopen(
482
405
 
483
406
  @returns {SC.View} receiver
484
407
  */
485
- destroyLayer: function() {
486
- var layer = this.get('layer') ;
487
- if (layer) {
408
+ destroyLayer: function () {
409
+ // We allow you to call destroy layer, but you should really detach first.
410
+ if (this.get('isAttached')) {
411
+ this._doDetach();
412
+ }
488
413
 
489
- // Now notify the view and its child views. It will also set the
490
- // layer property to null.
491
- this._notifyWillDestroyLayer() ;
414
+ this._doDestroyLayer();
492
415
 
493
- // do final cleanup
494
- if (layer.parentNode) { layer.parentNode.removeChild(layer) ; }
495
- layer = null ;
496
- }
497
- return this ;
416
+ return this;
498
417
  },
499
418
 
500
419
  /**
501
- Destroys and recreates the current layer. This can be more efficient than
502
- modifying individual child views.
420
+ Destroys and recreates the current layer. Doing this on a parent view can
421
+ be more efficient than modifying individual child views independently.
503
422
 
504
423
  @returns {SC.View} receiver
505
424
  */
506
- replaceLayer: function() {
507
- this.destroyLayer();
508
- this.set('layerLocationNeedsUpdate', YES) ;
509
- this.invokeOnce(this.updateLayerLocationIfNeeded);
425
+ replaceLayer: function () {
426
+ var layer, parentNode;
427
+
428
+ // If attached, detach and track our parent node so we can re-attach.
429
+ if (this.get('isAttached')) {
430
+ layer = this.get('layer');
431
+ parentNode = layer.parentNode;
432
+
433
+ this._doDetach();
434
+ }
435
+
436
+ this.destroyLayer().createLayer();
437
+
438
+ // Reattach our layer (if we have a parentView this is done automatically).
439
+ if (parentNode && !this.get('isAttached')) { this._doAttach(parentNode); }
440
+
441
+ return this;
510
442
  },
511
443
 
512
444
  /**
513
445
  If the parent view has changed, we need to insert this
514
446
  view's layer into the layer of the new parent view.
515
447
  */
516
- parentViewDidChange: function() {
517
- this.parentViewDidResize();
518
- this.updateLayerLocation();
448
+ parentViewDidChange: function () {
449
+ //@if(debug)
450
+ SC.warn("Developer Warning: parentViewDidChange has been deprecated. Please use the notification methods willAddChild, didAddChild, willRemoveChild or didRemoveChild on the parent or willAddToParent, didAddToParent, willRemoveFromParent or didRemoveFromParent on the child to perform updates when the parent/child status changes.");
451
+ //@endif
519
452
  },
520
453
 
521
454
  /**
522
455
  Set to YES when the view's layer location is dirty. You can call
523
456
  updateLayerLocationIfNeeded() to clear this flag if it is set.
524
457
 
525
- @property {Boolean}
458
+ @deprecated Version 1.10
459
+ @type Boolean
526
460
  */
527
461
  layerLocationNeedsUpdate: NO,
528
462
 
529
463
  /**
530
464
  Calls updateLayerLocation(), but only if the view's layer location
531
- currently needs to be updated. This method is called automatically at
532
- the end of a run loop if you have called parentViewDidChange() at some
533
- point.
465
+ currently needs to be updated.
534
466
 
535
- @property {Boolean} force This property is ignored.
467
+ @deprecated Version 1.10
536
468
  @returns {SC.View} receiver
537
469
  @test in updateLayerLocation
538
470
  */
539
- updateLayerLocationIfNeeded: function(force) {
540
- if (this.get('layerLocationNeedsUpdate')) {
541
- this.updateLayerLocation() ;
542
- }
543
- return this ;
471
+ updateLayerLocationIfNeeded: function () {
472
+ //@if(debug)
473
+ SC.warn("SC.View.prototype.updateLayerLocationIfNeeded is no longer used and has been deprecated. See the SC.View statechart code for more details on attaching and detaching layers.");
474
+ //@endif
475
+
476
+ return this;
544
477
  },
545
478
 
546
479
  /**
@@ -548,89 +481,17 @@ SC.CoreView.reopen(
548
481
  hierarchy. This method will update the underlying DOM-location of the
549
482
  layer so that it reflects the new location.
550
483
 
484
+ @deprecated Version 1.10
551
485
  @returns {SC.View} receiver
552
486
  */
553
- updateLayerLocation: function() {
554
- // collect some useful value
555
- // if there is no node for some reason, just exit
556
- var node = this.get('layer'),
557
- parentView = this.get('parentView'),
558
- parentNode = parentView ? parentView.get('containerLayer') : null ;
559
-
560
- // remove node from current parentNode if the node does not match the new
561
- // parent node.
562
- if (node && node.parentNode && node.parentNode !== parentNode) {
563
- node.parentNode.removeChild(node);
564
- }
565
-
566
- // CASE 1: no new parentView. just remove from parent (above).
567
- if (!parentView) {
568
- if (node && node.parentNode) { node.parentNode.removeChild(node); }
569
-
570
- // CASE 2: parentView has no layer, view has layer. destroy layer
571
- // CASE 3: parentView has no layer, view has no layer, nothing to do
572
- } else if (!parentNode) {
573
- if (node) {
574
- if (node.parentNode) { node.parentNode.removeChild(node); }
575
- this.destroyLayer();
576
- }
577
-
578
- // CASE 4: parentView has layer, view has no layer. create layer & add
579
- // CASE 5: parentView has layer, view has layer. move layer
580
- } else {
581
- if (!node) {
582
- this.createLayer() ;
583
- node = this.get('layer') ;
584
- if (!node) { return; } // can't do anything without a node.
585
- }
586
-
587
- var siblings = parentView.get('childViews'),
588
- nextView = siblings.objectAt(siblings.indexOf(this)+1),
589
- nextNode = (nextView) ? nextView.get('layer') : null ;
590
-
591
- // before we add to parent node, make sure that the nextNode exists...
592
- if (nextView && (!nextNode || nextNode.parentNode!==parentNode)) {
593
- nextView.updateLayerLocationIfNeeded() ;
594
-
595
- // just in case it still couldn't generate the layer, force to null, because
596
- // IE doesn't support insertBefore(blah, undefined) in version IE9.
597
- nextNode = nextView.get('layer') || null;
598
- }
599
-
600
- // add to parentNode if needed.
601
- if ((node.parentNode!==parentNode) || (node.nextSibling!==nextNode)) {
602
- parentNode.insertBefore(node, nextNode) ;
603
- }
604
- }
605
-
606
- parentNode = parentView = node = nextNode = null ; // avoid memory leaks
607
-
608
- this.set('layerLocationNeedsUpdate', NO) ;
609
-
610
- return this ;
611
- },
612
-
613
- /** @private -
614
- Invokes willDestroyLayer() on view and child views. Then sets layer to
615
- null for receiver.
616
- */
617
- _notifyWillDestroyLayer: function() {
618
- if (this.willDestroyLayer) { this.willDestroyLayer() ; }
619
- var mixins = this.willDestroyLayerMixin, len, idx,
620
- childViews = this.get('childViews') ;
621
- if (mixins) {
622
- len = mixins.length ;
623
- for (idx=0; idx<len; ++idx) { mixins[idx].call(this) ; }
624
- }
625
-
626
- len = childViews.length ;
627
- for (idx=0; idx<len; ++idx) { childViews[idx]._notifyWillDestroyLayer() ; }
487
+ updateLayerLocation: function () {
488
+ //@if(debug)
489
+ SC.warn("SC.View.prototype.updateLayerLocation is no longer used and has been deprecated. See the SC.View statechart code for more details on attaching and detaching layers.");
490
+ //@endif
628
491
 
629
- this.set('layer', null) ;
492
+ return this;
630
493
  },
631
494
 
632
-
633
-
634
495
  /**
635
496
  @private
636
497
 
@@ -642,81 +503,53 @@ SC.CoreView.reopen(
642
503
  a context.
643
504
 
644
505
  @param {SC.RenderContext} context the render context.
645
- @param {Boolean} firstTime Provided for compatibility when rendering legacy views only.
646
506
  */
647
- renderToContext: function(context, firstTime) {
648
- var hasLegacyRenderMethod, mixins, idx, len;
507
+ renderToContext: function (context) {
508
+ var mixins, idx, len;
649
509
 
650
- this.beginPropertyChanges() ;
651
- this.set('layerNeedsUpdate', NO) ;
510
+ this.beginPropertyChanges();
652
511
 
653
- if (SC.none(firstTime)) { firstTime = YES; }
512
+ context.id(this.get('layerId'));
513
+ context.setAttr('role', this.get('ariaRole'));
654
514
 
655
- this._renderLayerSettings(context, firstTime);
515
+ // Set up the classNameBindings and attributeBindings observers.
516
+ // TODO: CLEAN UP!!
517
+ this._applyClassNameBindings();
518
+ this._applyAttributeBindings(context);
656
519
 
657
- // If the render method takes two parameters, we assume that it is a
658
- // legacy implementation that takes context and firstTime. If it has only
659
- // one parameter, we assume it is the render delegates style that requires
660
- // only context. Note that, for backwards compatibility, the default
661
- // SC.View implementation of render uses the old style.
662
- hasLegacyRenderMethod = !this.update;
520
+ context.addClass(this.get('classNames'));
663
521
 
664
- // Let the render method handle rendering. If we have a render delegate
665
- // object set, it will be used there.
666
- if (hasLegacyRenderMethod) {
667
- this.render(context, firstTime);
668
- }
669
- // This view implements the render delegate protocol.
670
- else {
671
- if (firstTime) {
672
- this.render(context);
673
- } else {
674
- this.update(context.$());
675
- }
522
+ if (this.get('isTextSelectable')) { context.addClass('allow-select'); }
523
+
524
+ if (!this.get('isVisible')) {
525
+ context.addClass('sc-hidden');
526
+ context.setAttr('aria-hidden', 'true');
676
527
  }
677
528
 
529
+ // Call applyAttributesToContext so that subclasses that override it can
530
+ // insert further attributes.
531
+ this.applyAttributesToContext(context);
532
+
533
+ // We pass true for the second argument to support the old style of render.
534
+ this.render(context, true);
535
+
678
536
  // If we've made it this far and renderChildViews() was never called,
679
537
  // render any child views now.
680
- if (firstTime && !this._didRenderChildViews) { this.renderChildViews(context, firstTime); }
681
- // Reset the flag so that if the layer is recreated we re-render the child views
682
- this._didRenderChildViews = NO;
683
-
538
+ if (!this._didRenderChildViews) { this.renderChildViews(context); }
539
+ // Reset the flag so that if the layer is recreated we re-render the child views.
540
+ this._didRenderChildViews = false;
684
541
 
685
542
  if (mixins = this.renderMixin) {
686
543
  len = mixins.length;
687
- for(idx=0; idx<len; ++idx) { mixins[idx].call(this, context, firstTime) ; }
544
+ for (idx = 0; idx < len; ++idx) { mixins[idx].call(this, context, true); }
688
545
  }
689
546
 
690
- this.endPropertyChanges() ;
547
+ this.endPropertyChanges();
691
548
  },
692
549
 
693
- _renderLayerSettings: function(context, firstTime) {
694
- context.resetClassNames();
695
- context.resetStyles();
550
+ /** Apply the attributes to the context. */
551
+ applyAttributesToContext: function (context) {
696
552
 
697
- this.applyAttributesToContext(context);
698
- },
699
-
700
- applyAttributesToContext: function(context) {
701
- if (!this.get('layer')) {
702
- this._applyClassNameBindings();
703
- this._applyAttributeBindings(context);
704
- }
705
-
706
- context.addClass(this.get('classNames'));
707
-
708
- if (this.get('isTextSelectable')) { context.addClass('allow-select'); }
709
- if (!this.get('isVisible')) { context.addClass('sc-hidden'); }
710
- if (this.get('isFirstResponder')) { context.addClass('focus'); }
711
-
712
- context.id(this.get('layerId'));
713
- context.attr('role', this.get('ariaRole'));
714
-
715
- var _ariaHidden = this.get('ariaHidden');
716
- if(_ariaHidden!==null){
717
- if(_ariaHidden === NO) context.removeAttr('aria-hidden');
718
- else context.attr('aria-hidden', _ariaHidden);
719
- }
720
553
  },
721
554
 
722
555
  /**
@@ -727,7 +560,7 @@ SC.CoreView.reopen(
727
560
  observer to update the view's element if the bound property ever changes
728
561
  in the future.
729
562
  */
730
- _applyClassNameBindings: function() {
563
+ _applyClassNameBindings: function () {
731
564
  var classBindings = this.get('classNameBindings'),
732
565
  classNames = this.get('classNames'),
733
566
  dasherizedClass;
@@ -737,7 +570,7 @@ SC.CoreView.reopen(
737
570
  // Loop through all of the configured bindings. These will be either
738
571
  // property names ('isUrgent') or property paths relative to the view
739
572
  // ('content.isUrgent')
740
- classBindings.forEach(function(property) {
573
+ classBindings.forEach(function (property) {
741
574
 
742
575
  // Variable in which the old class value is saved. The observer function
743
576
  // closes over this variable, so it knows which string to remove when
@@ -746,7 +579,7 @@ SC.CoreView.reopen(
746
579
 
747
580
  // Set up an observer on the context. If the property changes, toggle the
748
581
  // class name.
749
- var observer = function() {
582
+ var observer = function () {
750
583
  // Get the current value of the property
751
584
  var newClass = this._classStringForProperty(property);
752
585
  var elem = this.$();
@@ -793,16 +626,16 @@ SC.CoreView.reopen(
793
626
 
794
627
  @param {SC.RenderBuffer} buffer
795
628
  */
796
- _applyAttributeBindings: function(context) {
629
+ _applyAttributeBindings: function (context) {
797
630
  var attributeBindings = this.get('attributeBindings'),
798
631
  attributeValue, elem, type;
799
632
 
800
633
  if (!attributeBindings) { return; }
801
634
 
802
- attributeBindings.forEach(function(attribute) {
635
+ attributeBindings.forEach(function (attribute) {
803
636
  // Create an observer to add/remove/change the attribute if the
804
637
  // JavaScript property changes.
805
- var observer = function() {
638
+ var observer = function () {
806
639
  elem = this.$();
807
640
  var currentValue = elem.attr(attribute);
808
641
  attributeValue = this.get(attribute);
@@ -826,10 +659,10 @@ SC.CoreView.reopen(
826
659
  type = typeof attributeValue;
827
660
 
828
661
  if (type === 'string' || type === 'number') {
829
- context.attr(attribute, attributeValue);
662
+ context.setAttr(attribute, attributeValue);
830
663
  } else if (attributeValue && type === 'boolean') {
831
664
  // Apply boolean attributes in the form attribute="attribute"
832
- context.attr(attribute, attribute);
665
+ context.setAttr(attribute, attribute);
833
666
  }
834
667
  }, this);
835
668
  },
@@ -843,7 +676,7 @@ SC.CoreView.reopen(
843
676
  For example, if the view has property `isUrgent` that evaluates to true,
844
677
  passing `isUrgent` to this method will return `"is-urgent"`.
845
678
  */
846
- _classStringForProperty: function(property) {
679
+ _classStringForProperty: function (property) {
847
680
  var split = property.split(':'), className = split[1];
848
681
  property = split[0];
849
682
 
@@ -871,32 +704,6 @@ SC.CoreView.reopen(
871
704
  }
872
705
  },
873
706
 
874
- /**
875
- @private
876
-
877
- Invoked by createLayer() and updateLayer() to actually render a context.
878
- This method calls the render() method on your view along with any
879
- renderMixin() methods supplied by mixins you might have added.
880
-
881
- You should not override this method directly. Nor should you call it. It is OLD.
882
-
883
- @param {SC.RenderContext} context the render context
884
- @param {Boolean} firstTime YES if this is creating a layer
885
- @returns {void}
886
- */
887
- prepareContext: function(context, firstTime) {
888
- // eventually, firstTime will be removed because it is ugly.
889
- // for now, we will sense whether we are doing things the ugly way or not.
890
- // if ugly, we will allow updates through.
891
- if (firstTime !== false) { firstTime = YES; } // the GOOD code path :)
892
-
893
- if (firstTime) {
894
- this.renderToContext(context);
895
- } else {
896
- this.updateLayer(context);
897
- }
898
- },
899
-
900
707
  /**
901
708
  Your render method should invoke this method to render any child views,
902
709
  especially if this is the first time the view will be rendered. This will
@@ -904,20 +711,22 @@ SC.CoreView.reopen(
904
711
  way.
905
712
 
906
713
  @param {SC.RenderContext} context the context
907
- @param {Boolean} firstName true if the layer is being created
908
714
  @returns {SC.RenderContext} the render context
909
715
  @test in render
910
716
  */
911
- renderChildViews: function(context, firstTime) {
912
- var cv = this.get('childViews'), len = cv.length, idx, view ;
913
- for (idx=0; idx<len; ++idx) {
914
- view = cv[idx] ;
717
+ renderChildViews: function (context) {
718
+ var cv = this.get('childViews'), len = cv.length, idx, view;
719
+ for (idx = 0; idx < len; ++idx) {
720
+ view = cv[idx];
915
721
  if (!view) { continue; }
916
- context = context.begin(view.get('tagName')) ;
917
- view.renderToContext(context, firstTime);
918
- context = context.end() ;
722
+ context = context.begin(view.get('tagName'));
723
+ view.renderToContext(context);
724
+ context = context.end();
919
725
  }
920
- this._didRenderChildViews = YES;
726
+
727
+ // Track that renderChildViews was called in case it was called directly
728
+ // in a render method.
729
+ this._didRenderChildViews = true;
921
730
 
922
731
  return context;
923
732
  },
@@ -925,35 +734,7 @@ SC.CoreView.reopen(
925
734
  /** @private -
926
735
  override to add support for theming or in your view
927
736
  */
928
- render: function() { },
929
-
930
- /** @private -
931
- Invokes the receivers didAppendLayerToDocument() method if it exists and
932
- then invokes the same on all child views.
933
- */
934
-
935
- _notifyDidAppendToDocument: function() {
936
- if (!this.get('hasLayout')) { this.notifyPropertyChange('frame'); }
937
- if (this.didAppendToDocument) { this.didAppendToDocument(); }
938
-
939
- var i=0, child, childLen, children = this.get('childViews');
940
- for(i=0, childLen=children.length; i<childLen; i++) {
941
- child = children[i];
942
- if(child._notifyDidAppendToDocument){
943
- child._notifyDidAppendToDocument();
944
- }
945
- }
946
- },
947
-
948
- childViewsObserver: function(){
949
- var childViews = this.get('childViews'), i, iLen, child;
950
- for(i=0, iLen = childViews.length; i<iLen; i++){
951
- child = childViews[i];
952
- if(child._notifyDidAppendToDocument){
953
- child._notifyDidAppendToDocument();
954
- }
955
- }
956
- }.observes('childViews'),
737
+ render: function () { },
957
738
 
958
739
  // ..........................................................
959
740
  // STANDARD RENDER PROPERTIES
@@ -978,7 +759,7 @@ SC.CoreView.reopen(
978
759
 
979
760
  attributeBindings: ['aria-valuenow', 'disabled'],
980
761
 
981
- 'aria-valuenow': function() {
762
+ 'aria-valuenow': function () {
982
763
  return this.get('value');
983
764
  }.property('value').cacheable(), // adds 'aria-valuenow="{value}"' attribute
984
765
 
@@ -986,7 +767,8 @@ SC.CoreView.reopen(
986
767
 
987
768
  // ...
988
769
 
989
- @property {Array}
770
+ @type Array
771
+ @default null
990
772
  */
991
773
  attributeBindings: null,
992
774
 
@@ -996,7 +778,8 @@ SC.CoreView.reopen(
996
778
  a layer is first created. If you change the tagName for an element, you
997
779
  must destroy and recreate the view layer.
998
780
 
999
- @property {String}
781
+ @type String
782
+ @default 'div'
1000
783
  */
1001
784
  tagName: 'div',
1002
785
 
@@ -1004,7 +787,8 @@ SC.CoreView.reopen(
1004
787
  Standard CSS class names to apply to the view's outer element. These class
1005
788
  names are used in addition to any defined on the view's superclass.
1006
789
 
1007
- @property {Array}
790
+ @type Array
791
+ @default []
1008
792
  */
1009
793
  classNames: [],
1010
794
 
@@ -1030,7 +814,7 @@ SC.CoreView.reopen(
1030
814
  Class names mediated by these bindings are used in addition to any that
1031
815
  you've listed in the classNames property.
1032
816
 
1033
- @property {Array}
817
+ @type Array
1034
818
  */
1035
819
  classNameBindings: null,
1036
820
 
@@ -1038,7 +822,7 @@ SC.CoreView.reopen(
1038
822
  Tool tip property that will be set to the title attribute on the HTML
1039
823
  rendered element.
1040
824
 
1041
- @property {String}
825
+ @type String
1042
826
  */
1043
827
  toolTip: null,
1044
828
 
@@ -1046,12 +830,12 @@ SC.CoreView.reopen(
1046
830
  The computed tooltip. This is generated by localizing the toolTip
1047
831
  property if necessary.
1048
832
 
1049
- @property {String}
833
+ @type String
1050
834
  */
1051
- displayToolTip: function() {
835
+ displayToolTip: function () {
1052
836
  var ret = this.get('toolTip');
1053
837
  return (ret && this.get('localize')) ? SC.String.loc(ret) : (ret || '');
1054
- }.property('toolTip','localize').cacheable(),
838
+ }.property('toolTip', 'localize').cacheable(),
1055
839
 
1056
840
  /**
1057
841
  Determines if the user can select text within the view. Normally this is
@@ -1060,7 +844,7 @@ SC.CoreView.reopen(
1060
844
  to YES will probably make your controls harder to use and it is not
1061
845
  recommended.
1062
846
 
1063
- @property {Boolean}
847
+ @type Boolean
1064
848
  @readOnly
1065
849
  */
1066
850
  isTextSelectable: NO,
@@ -1082,16 +866,13 @@ SC.CoreView.reopen(
1082
866
  Delegate's API.
1083
867
 
1084
868
  Implementation note: 'isVisible' is also effectively a display property,
1085
- but it is not declared as such because the same effect is implemented
1086
- inside _sc_isVisibleDidChange(). This avoids having two observers on
1087
- 'isVisible', which is:
1088
- a. More efficient
1089
- b. More correct, because we can guarantee the order of operations
869
+ but it is not declared as such because it is observed separately in
870
+ order to manage the view's internal state.
1090
871
 
1091
- @property {Array}
872
+ @type Array
1092
873
  @readOnly
1093
874
  */
1094
- displayProperties: ['ariaHidden'],
875
+ displayProperties: [],
1095
876
 
1096
877
  // .......................................................
1097
878
  // SC.RESPONDER SUPPORT
@@ -1100,8 +881,8 @@ SC.CoreView.reopen(
1100
881
  /** @property
1101
882
  The nextResponder is usually the parentView.
1102
883
  */
1103
- nextResponder: function() {
1104
- return this.get('parentView') ;
884
+ nextResponder: function () {
885
+ return this.get('parentView');
1105
886
  }.property('parentView').cacheable(),
1106
887
 
1107
888
 
@@ -1124,29 +905,26 @@ SC.CoreView.reopen(
1124
905
  - register the view with the global views hash, which is used for event
1125
906
  dispatch
1126
907
  */
1127
- init: function() {
1128
- var parentView = this.get('parentView'),
1129
- path, root, lp, displayProperties ;
908
+ init: function () {
909
+ var childViews;
1130
910
 
1131
911
  sc_super();
1132
912
 
1133
913
  // Register the view for event handling. This hash is used by
1134
914
  // SC.RootResponder to dispatch incoming events.
915
+ //@if (debug)
916
+ if (SC.View.views[this.get('layerId')]) {
917
+ throw new Error("Developer Error: A view with layerId, '%@', already exists. Each view must have a unique layerId.".fmt(this.get('layerId')));
918
+ }
919
+ //@endif
1135
920
  SC.View.views[this.get('layerId')] = this;
1136
921
 
1137
922
  // setup classNames
1138
923
  this.classNames = this.get('classNames').slice();
1139
924
 
1140
925
  // setup child views. be sure to clone the child views array first
1141
- this.childViews = this.get('childViews').slice() ;
1142
- this.createChildViews() ; // setup child Views
1143
-
1144
- // register display property observers ..
1145
- // TODO: Optimize into class setup
1146
- displayProperties = this.get('displayProperties') ;
1147
- for(var i=0, l=displayProperties.length; i<l; i++) {
1148
- this.addObserver(displayProperties[i], this, this.displayDidChange);
1149
- }
926
+ childViews = this.childViews = this.get('childViews').slice();
927
+ this.createChildViews(); // setup child Views
1150
928
  },
1151
929
 
1152
930
  /**
@@ -1161,12 +939,12 @@ SC.CoreView.reopen(
1161
939
 
1162
940
  @returns {void}
1163
941
  */
1164
- awake: function() {
942
+ awake: function () {
1165
943
  sc_super();
1166
- var childViews = this.get('childViews'), len = childViews.length, idx ;
1167
- for (idx=0; idx<len; ++idx) {
1168
- if (!childViews[idx]) { continue ; }
1169
- childViews[idx].awake() ;
944
+ var childViews = this.get('childViews'), len = childViews.length, idx;
945
+ for (idx = 0; idx < len; ++idx) {
946
+ if (!childViews[idx]) { continue; }
947
+ childViews[idx].awake();
1170
948
  }
1171
949
  },
1172
950
 
@@ -1174,11 +952,11 @@ SC.CoreView.reopen(
1174
952
  Frame describes the current bounding rect for your view. This is always
1175
953
  measured from the top-left corner of the parent view.
1176
954
 
1177
- @property {Rect}
955
+ @type Rect
1178
956
  @test in layoutStyle
1179
957
  */
1180
- frame: function() {
1181
- return this.computeFrameWithParentFrame(null) ;
958
+ frame: function () {
959
+ return this.computeFrameWithParentFrame(null);
1182
960
  }.property('useStaticLayout').cacheable(), // We depend on the layout, but layoutDidChange will call viewDidResize to check the frame for us
1183
961
 
1184
962
  /**
@@ -1190,7 +968,7 @@ SC.CoreView.reopen(
1190
968
 
1191
969
  @returns {Rect} the computed frame
1192
970
  */
1193
- computeFrameWithParentFrame: function() {
971
+ computeFrameWithParentFrame: function () {
1194
972
  var layer, // The view's layer
1195
973
  pv = this.get('parentView'), // The view's parent view (if it exists)
1196
974
  f; // The layer's coordinates in the document
@@ -1217,6 +995,33 @@ SC.CoreView.reopen(
1217
995
  }
1218
996
  },
1219
997
 
998
+ /** @private Call the method recursively on all child views. */
999
+ _callOnChildViews: function (methodName, context) {
1000
+ var childView,
1001
+ childViews = this.get('childViews'),
1002
+ method,
1003
+ shouldContinue;
1004
+
1005
+ // Could have support for arguments, but accessing Arguments and using apply is slower than using call, so avoid it.
1006
+ // args = SC.$A(arguments).slice(1);
1007
+ for (var i = childViews.length - 1; i >= 0; i--) {
1008
+ childView = childViews[i];
1009
+
1010
+ // We allow missing childViews in the array so ignore them.
1011
+ if (!childView) { continue; }
1012
+
1013
+ // Look up the method on the child.
1014
+ method = childView[methodName];
1015
+ // method.apply(childView, args); This is slower.
1016
+ shouldContinue = method.call(childView, context);
1017
+
1018
+ // Recurse.
1019
+ if (shouldContinue === undefined || shouldContinue) {
1020
+ childView._callOnChildViews(methodName, context);
1021
+ }
1022
+ }
1023
+ },
1024
+
1220
1025
  /**
1221
1026
  The clipping frame returns the visible portion of the view, taking into
1222
1027
  account the clippingFrame of the parent view. Keep in mind that
@@ -1226,9 +1031,9 @@ SC.CoreView.reopen(
1226
1031
  Normally this will be calculated based on the intersection of your own
1227
1032
  clippingFrame and your parentView's clippingFrame.
1228
1033
 
1229
- @property {Rect}
1034
+ @type Rect
1230
1035
  */
1231
- clippingFrame: function() {
1036
+ clippingFrame: function () {
1232
1037
  var f = this.get('frame'),
1233
1038
  ret = f,
1234
1039
  pv, cf;
@@ -1250,45 +1055,127 @@ SC.CoreView.reopen(
1250
1055
  This method is invoked whenever the clippingFrame changes, notifying
1251
1056
  each child view that its clippingFrame has also changed.
1252
1057
  */
1253
- _sc_view_clippingFrameDidChange: function() {
1254
- var cvs = this.get('childViews'), len = cvs.length, idx, cv ;
1255
- for (idx=0; idx<len; ++idx) {
1256
- cv = cvs[idx] ;
1058
+ _sc_view_clippingFrameDidChange: function () {
1059
+ this.notifyPropertyChange('clippingFrame');
1060
+ },
1061
+
1062
+ /**
1063
+ Removes the child view from the parent view *and* detaches it from the
1064
+ document.
1065
+
1066
+ This does *not* remove the child view's layer (i.e. the node still exists,
1067
+ but is no longer in the document) and does *not* destroy the child view
1068
+ (i.e. it can still be re-attached to the document).
1069
+
1070
+ Note that if the child view uses a transitionOut plugin, it will not be
1071
+ fully detached until the transition completes. To force the view to detach
1072
+ immediately you can pass true for the optional `immediately` argument.
1073
+
1074
+ If you wish to remove the child and discard it, use `removeChildAndDestroy`.
1075
+
1076
+ @param {SC.View} view The view to remove as a child view.
1077
+ @param {Boolean} [immediately=false] Forces the child view to be removed immediately regardless if it uses a transitionOut plugin.
1078
+ @see SC.View#removeChildAndDestroy
1079
+ @returns {SC.View} receiver
1080
+ */
1081
+ removeChild: function (view, immediately) {
1082
+ view._doDetach(immediately);
1257
1083
 
1258
- cv.notifyPropertyChange('clippingFrame') ;
1259
- cv._sc_view_clippingFrameDidChange();
1084
+ // If the view will transition out, wait for the transition to complete
1085
+ // before orphaning the view entirely.
1086
+ if (!immediately && view.get('viewState') === SC.CoreView.ATTACHED_BUILDING_OUT) {
1087
+ view.addObserver('isAttached', this, this._orphanChildView);
1088
+ } else {
1089
+ view._doOrphan();
1260
1090
  }
1091
+
1092
+ return this;
1261
1093
  },
1262
1094
 
1263
1095
  /**
1264
- Removes the child view from the parent view.
1096
+ Removes the child view from the parent view, detaches it from the document
1097
+ *and* destroys the view and its layer.
1098
+
1099
+ Note that if the child view uses a transitionOut plugin, it will not be
1100
+ fully detached and destroyed until the transition completes. To force the
1101
+ view to detach immediately you can pass true for the optional `immediately`
1102
+ argument.
1103
+
1104
+ If you wish to remove the child and keep it for further re-use, use
1105
+ `removeChild`.
1265
1106
 
1266
- @param {SC.View} view
1107
+ @param {SC.View} view The view to remove as a child view and destroy.
1108
+ @param {Boolean} [immediately=false] Forces the child view to be removed and destroyed immediately regardless if it uses a transitionOut plugin.
1109
+ @see SC.View#removeChild
1267
1110
  @returns {SC.View} receiver
1268
1111
  */
1269
- removeChild: function(view) {
1270
- // update parent node
1271
- view.set('parentView', null) ;
1112
+ removeChildAndDestroy: function (view, immediately) {
1113
+ view._doDetach(immediately);
1272
1114
 
1273
- // remove view from childViews array.
1274
- var childViews = this.get('childViews'),
1275
- idx = childViews.indexOf(view) ;
1276
- if (idx>=0) { childViews.removeAt(idx); }
1115
+ // If the view will transition out, wait for the transition to complete
1116
+ // before destroying the view entirely.
1117
+ if (view.get('transitionOut') && !immediately) {
1118
+ view.addObserver('isAttached', this, this._destroyChildView);
1119
+ } else {
1120
+ view.destroy(); // Destroys the layer and the view.
1121
+ }
1277
1122
 
1278
- return this ;
1123
+ return this;
1279
1124
  },
1280
1125
 
1281
1126
  /**
1282
- Removes all children from the parentView.
1127
+ Removes all children from the parentView *and* destroys them and their
1128
+ layers.
1129
+
1130
+ Note that if any child view uses a transitionOut plugin, it will not be
1131
+ fully removed until the transition completes. To force all child views to
1132
+ remove immediately you can pass true as the optional `immediately` argument.
1283
1133
 
1134
+ Tip: If you know that there are no transitions for the child views,
1135
+ you should pass true to optimize the document removal.
1136
+
1137
+ @param {Boolean} [immediately=false] Forces all child views to be removed immediately regardless if any uses a transitionOut plugin.
1284
1138
  @returns {SC.View} receiver
1285
1139
  */
1286
- removeAllChildren: function() {
1287
- var childViews = this.get('childViews'), view ;
1288
- while (view = childViews.objectAt(childViews.get('length')-1)) {
1289
- this.removeChild(view) ;
1290
- }
1291
- return this ;
1140
+ removeAllChildren: function (immediately) {
1141
+ var childViews = this.get('childViews'),
1142
+ len = childViews.get('length'),
1143
+ i;
1144
+
1145
+ // OPTIMIZATION!
1146
+ // If we know that we're removing all children and we are rendered, lets do the document cleanup in one sweep.
1147
+ // if (immediately && this.get('_isRendered')) {
1148
+ // var layer,
1149
+ // parentNode;
1150
+
1151
+ // // If attached, detach and track our parent node so we can re-attach.
1152
+ // if (this.get('isAttached')) {
1153
+ // layer = this.get('layer');
1154
+ // parentNode = layer.parentNode;
1155
+
1156
+ // this._doDetach();
1157
+ // }
1158
+
1159
+ // // Destroy our layer and thus all the children's layers in one move.
1160
+ // this.destroyLayer();
1161
+
1162
+ // // Remove all the children.
1163
+ // for (i = len - 1; i >= 0; i--) {
1164
+ // this.removeChildAndDestroy(childViews.objectAt(i), immediately);
1165
+ // }
1166
+
1167
+ // // Recreate our layer (now empty).
1168
+ // this.createLayer();
1169
+
1170
+ // // Reattach our layer.
1171
+ // if (parentNode && !this.get('isAttached')) { this._doAttach(parentNode); }
1172
+ // } else {
1173
+ for (i = len - 1; i >= 0; i--) {
1174
+ this.removeChildAndDestroy(childViews.objectAt(i), immediately);
1175
+ }
1176
+ // }
1177
+
1178
+ return this;
1292
1179
  },
1293
1180
 
1294
1181
  /**
@@ -1297,51 +1184,90 @@ SC.CoreView.reopen(
1297
1184
 
1298
1185
  @returns {SC.View} receiver
1299
1186
  */
1300
- removeFromParent: function() {
1301
- var parent = this.get('parentView') ;
1302
- if (parent) { parent.removeChild(this) ; }
1303
- return this ;
1187
+ removeFromParent: function () {
1188
+ var parent = this.get('parentView');
1189
+ if (parent) { parent.removeChild(this); }
1190
+
1191
+ return this;
1192
+ },
1193
+
1194
+ /** @private Observer for child views that are being discarded after transitioning out. */
1195
+ _destroyChildView: function (view) {
1196
+ // Commence destroying of the view once it is detached.
1197
+ if (!view.get('isAttached')) {
1198
+ view.removeObserver('isAttached', this, this._destroyChildView);
1199
+ view.destroy();
1200
+ }
1201
+ },
1202
+
1203
+ /** @private Observer for child views that are being orphaned after transitioning out. */
1204
+ _orphanChildView: function (view) {
1205
+ // Commence orphaning of the view once it is detached.
1206
+ if (!view.get('isAttached')) {
1207
+ view.removeObserver('isAttached', this, this._orphanChildView);
1208
+ view._doOrphan();
1209
+ }
1304
1210
  },
1305
1211
 
1306
1212
  /**
1213
+ Completely destroys a view instance so that it may be garbage collected.
1214
+
1307
1215
  You must call this method on a view to destroy the view (and all of its
1308
- child views). This will remove the view from any parent node, then make
1309
- sure that the DOM element managed by the view can be released by the
1310
- memory manager.
1216
+ child views). This will remove the view from any parent, detach the
1217
+ view's layer from the DOM if it is attached and clear the view's layer
1218
+ if it is rendered.
1219
+
1220
+ Once a view is destroyed it can *not* be reused.
1221
+
1222
+ @returns {SC.View} receiver
1311
1223
  */
1312
- destroy: function() {
1313
- if (this.get('isDestroyed')) { return this; } // nothing to do
1224
+ destroy: function () {
1225
+ // Fast path!
1226
+ if (this.get('isDestroyed')) { return this; }
1314
1227
 
1315
- this._destroy(); // core destroy method
1228
+ // Do generic destroy. It takes care of mixins and sets isDestroyed to YES.
1229
+ // Do this first, since it cleans up bindings that may apply to parentView
1230
+ // (which we will soon null out).
1231
+ var ret = sc_super();
1316
1232
 
1317
- //Do generic destroy. It takes care of mixins and sets isDestroyed to YES.
1318
- return sc_super();
1319
- },
1233
+ // If our parent is already destroyed, then we can defer destroying ourself
1234
+ // and our own child views momentarily.
1235
+ if (this.getPath('parentView.isDestroyed')) {
1236
+ // Complete the destroy in a bit.
1237
+ this.invokeNext(this._destroy);
1238
+ } else {
1239
+ // Immediately remove the layer if attached (ignores transitionOut). This
1240
+ // will detach the layer for all child views as well.
1241
+ this._doDetach(true);
1320
1242
 
1321
- _destroy: function() {
1322
- // destroy the layer -- this will avoid each child view destroying
1323
- // the layer over and over again...
1324
- this.destroyLayer() ;
1243
+ // Clear the layer if rendered. This will clear all child views layer
1244
+ // references as well.
1245
+ this._doDestroyLayer();
1325
1246
 
1326
- // first destroy any children.
1327
- var childViews = this.get('childViews'), len = childViews.length, idx ;
1328
- if (len) {
1329
- childViews = childViews.slice() ;
1330
- for (idx=0; idx<len; ++idx) { childViews[idx].destroy() ; }
1247
+ // Complete the destroy.
1248
+ this._destroy();
1331
1249
  }
1332
1250
 
1333
- // next remove view from global hash
1334
- delete SC.View.views[this.get('layerId')] ;
1335
- delete this._CQ ;
1336
- delete this.page ;
1251
+ // Remove the view from the global hash.
1252
+ delete SC.View.views[this.get('layerId')];
1337
1253
 
1338
- // remove from parent if found.
1339
- if (this.get('parentView')) { this.removeFromParent(); }
1254
+ // Destroy any children. Loop backwards since childViews will shrink.
1255
+ var childViews = this.get('childViews');
1256
+ for (var i = childViews.length - 1; i >= 0; i--) {
1257
+ childViews[i].destroy();
1258
+ }
1340
1259
 
1341
- // clear owner.
1342
- this.set('owner', null);
1260
+ return ret;
1261
+ },
1343
1262
 
1344
- return this;
1263
+ /** @private */
1264
+ _destroy: function () {
1265
+ // Orphan the view if adopted.
1266
+ this._doOrphan();
1267
+
1268
+ // TODO: Deprecate owner in this sense.
1269
+ this.set('owner', null);
1270
+ delete this.page;
1345
1271
  },
1346
1272
 
1347
1273
  /**
@@ -1364,40 +1290,49 @@ SC.CoreView.reopen(
1364
1290
 
1365
1291
  @returns {SC.View} receiver
1366
1292
  */
1367
- createChildViews: function() {
1293
+ createChildViews: function () {
1368
1294
  var childViews = this.get('childViews'),
1369
1295
  len = childViews.length,
1370
- idx, key, views, view ;
1296
+ isNoLongerValid = false,
1297
+ idx, key, view;
1371
1298
 
1372
- this.beginPropertyChanges() ;
1299
+ this.beginPropertyChanges();
1373
1300
 
1374
1301
  // swap the array
1375
- for (idx=0; idx<len; ++idx) {
1376
- if (key = (view = childViews[idx])) {
1302
+ for (idx = 0; idx < len; ++idx) {
1303
+ key = view = childViews[idx];
1377
1304
 
1378
- // is this is a key name, lookup view class
1379
- if (typeof key === SC.T_STRING) {
1380
- view = this[key];
1381
- } else {
1382
- key = null ;
1383
- }
1305
+ // is this is a key name, lookup view class
1306
+ if (typeof key === SC.T_STRING) {
1307
+ view = this[key];
1308
+ } else {
1309
+ key = null;
1310
+ }
1384
1311
 
1385
- if (!view) {
1386
- SC.Logger.error ("No view with name "+key+" has been found in "+this.toString());
1387
- // skip this one.
1388
- continue;
1389
- }
1312
+ if (!view) {
1313
+ //@if (debug)
1314
+ SC.warn("Developer Warning: The child view named '%@' was not found in the view, %@. This child view will be ignored.".fmt(key, this));
1315
+ //@endif
1390
1316
 
1391
- // createChildView creates the view if necessary, but also sets
1392
- // important properties, such as parentView
1393
- view = this.createChildView(view) ;
1394
- if (key) { this[key] = view ; } // save on key name if passed
1317
+ // skip this one.
1318
+ isNoLongerValid = true;
1319
+ childViews[idx] = null;
1320
+ continue;
1395
1321
  }
1322
+
1323
+ // createChildView creates the view if necessary, but also sets
1324
+ // important properties, such as parentView
1325
+ view = this.createChildView(view);
1326
+ if (key) { this[key] = view; } // save on key name if passed
1327
+
1396
1328
  childViews[idx] = view;
1397
1329
  }
1398
1330
 
1399
- this.endPropertyChanges() ;
1400
- return this ;
1331
+ // Set childViews to be only the valid array.
1332
+ if (isNoLongerValid) { this.set('childViews', childViews.compact()); }
1333
+
1334
+ this.endPropertyChanges();
1335
+ return this;
1401
1336
  },
1402
1337
 
1403
1338
  /**
@@ -1407,35 +1342,43 @@ SC.CoreView.reopen(
1407
1342
  automatically configure the correct settings on the new view instance to
1408
1343
  act as a child of the parent.
1409
1344
 
1410
- @param {Class} viewClass
1411
- @param {Hash} attrs optional attributes to add
1345
+ If the given view is a class, then createdByParent will be set to true on
1346
+ the returned instance.
1347
+
1348
+ @param {Class} view A view class to create or view instance to prepare.
1349
+ @param {Object} [attrs={}] attributes to add
1412
1350
  @returns {SC.View} new instance
1413
1351
  @test in createChildViews
1414
1352
  */
1415
- createChildView: function(view, attrs) {
1353
+ createChildView: function (view, attrs) {
1416
1354
  if (!view.isClass) {
1417
1355
  attrs = view;
1418
1356
  } else {
1419
1357
  // attrs should always exist...
1420
- if (!attrs) { attrs = {} ; }
1358
+ if (!attrs) { attrs = {}; }
1421
1359
  // clone the hash that was given so we do not pollute it if it's being reused
1422
1360
  else { attrs = SC.clone(attrs); }
1423
1361
  }
1424
1362
 
1425
- attrs.owner = attrs.parentView = this ;
1363
+ attrs.owner = attrs.parentView = this;
1426
1364
 
1427
1365
  // We need to set isVisibleInWindow before the init method is called on the view
1428
1366
  // The prototype check is a bit hackish and should be revisited - PDW
1429
- if (view.isClass && view.prototype.hasVisibility) {
1430
- attrs.isVisibleInWindow = this.get('isVisibleInWindow');
1431
- }
1367
+ // if (view.isClass && view.prototype.hasVisibility) {
1368
+ // attrs.isVisibleInWindow = this.get('isVisibleInWindow');
1369
+ // }
1432
1370
 
1433
- if (!attrs.page) { attrs.page = this.page ; }
1371
+ if (!attrs.page) { attrs.page = this.page; }
1434
1372
 
1435
1373
  // Now add this to the attributes and create.
1436
- if (view.isClass) { view = view.create(attrs); }
1374
+ if (view.isClass) {
1375
+ // Track that we created this view.
1376
+ attrs.createdByParent = true;
1377
+
1378
+ view = view.create(attrs);
1379
+ }
1437
1380
 
1438
- return view ;
1381
+ return view;
1439
1382
  },
1440
1383
 
1441
1384
  /** walk like a duck */
@@ -1458,7 +1401,7 @@ SC.CoreView.reopen(
1458
1401
  @param evt {SC.Event} the selectstart event
1459
1402
  @returns YES if selectable
1460
1403
  */
1461
- selectStart: function(evt) {
1404
+ selectStart: function (evt) {
1462
1405
  return this.get('isTextSelectable');
1463
1406
  },
1464
1407
 
@@ -1468,16 +1411,215 @@ SC.CoreView.reopen(
1468
1411
  @param evt {SC.Event} the contextmenu event
1469
1412
  @returns YES if the contextmenu will be allowed to show up
1470
1413
  */
1471
- contextMenu: function(evt) {
1414
+ contextMenu: function (evt) {
1472
1415
  if (this.get('isContextMenuEnabled')) {
1473
1416
  evt.allowDefault();
1474
1417
  return YES;
1475
1418
  }
1476
- }
1419
+ },
1420
+
1421
+ // ------------------------------------------------------------------------
1422
+ // Transitions
1423
+ //
1424
+
1425
+ /**
1426
+ The transition plugin to use when this view is appended to the DOM.
1427
+
1428
+ SC.CoreView uses a pluggable transition architecture where the transition
1429
+ setup, execution and cleanup can be handled by a specified transition
1430
+ plugin.
1431
+
1432
+ There are a number of pre-built transition plugins available in the
1433
+ foundation framework:
1434
+
1435
+ SC.View.BOUNCE_IN
1436
+ SC.View.FADE_IN
1437
+ SC.View.SLIDE_IN
1438
+ SC.View.SCALE_IN
1439
+ SC.View.SPRING_IN
1440
+
1441
+ You can even provide your own custom transition plugins. Just create a
1442
+ transition object that conforms to the SC.ViewTransitionProtocol protocol.
1443
+
1444
+ @type Object (SC.ViewTransitionProtocol)
1445
+ @default null
1446
+ @since Version 1.10
1447
+ */
1448
+ transitionIn: null,
1449
+
1450
+ /**
1451
+ The options for the given transition in plugin.
1452
+
1453
+ These options are specific to the current transition plugin used and are
1454
+ used to modify the transition animation. To determine what options
1455
+ may be used for a given plugin and to see what the default options are,
1456
+ see the documentation for the transition plugin being used.
1457
+
1458
+ Most transitions will accept a duration and timing option, but may
1459
+ also use other options. For example, SC.View.SLIDE_IN accepts options
1460
+ like:
1461
+
1462
+ transitionInOptions: {
1463
+ direction: 'left',
1464
+ duration: 0.25,
1465
+ timing: 'ease-in-out'
1466
+ }
1467
+
1468
+ @type Object
1469
+ @default null
1470
+ @since Version 1.10
1471
+ */
1472
+ transitionInOptions: null,
1473
+
1474
+ /**
1475
+ The transition plugin to use when this view is removed from the DOM.
1476
+
1477
+ SC.View uses a pluggable transition architecture where the transition setup,
1478
+ execution and cleanup can be handled by a specified transition plugin.
1479
+
1480
+ There are a number of pre-built transition plugins available in the
1481
+ foundation framework:
1482
+
1483
+ SC.View.BOUNCE_OUT
1484
+ SC.View.FADE_OUT
1485
+ SC.View.SLIDE_OUT
1486
+ SC.View.SCALE_OUT
1487
+ SC.View.SPRING_OUT
1488
+
1489
+ You can even provide your own custom transition plugins. Just create a
1490
+ transition object that conforms to the SC.ViewTransitionProtocol protocol.
1491
+
1492
+ @type Object (SC.ViewTransitionProtocol)
1493
+ @default null
1494
+ @since Version 1.10
1495
+ */
1496
+ transitionOut: null,
1497
+
1498
+ /**
1499
+ The options for the given transition out plugin.
1500
+
1501
+ These options are specific to the current transition plugin used and are
1502
+ used to modify the transition animation. To determine what options
1503
+ may be used for a given plugin and to see what the default options are,
1504
+ see the documentation for the transition plugin being used.
1505
+
1506
+ Most transitions will accept a duration and timing option, but may
1507
+ also use other options. For example, SC.View.SLIDE accepts options
1508
+ like:
1509
+
1510
+ transitionOutOptions: {
1511
+ direction: 'right',
1512
+ duration: 0.15,
1513
+ timing: 'ease-in'
1514
+ }
1515
+
1516
+ @type Object
1517
+ @default null
1518
+ @since Version 1.10
1519
+ */
1520
+ transitionOutOptions: null,
1521
+
1522
+ /**
1523
+ The transition plugin to use when this view is made shown from being
1524
+ hidden.
1525
+
1526
+ SC.CoreView uses a pluggable transition architecture where the transition setup,
1527
+ execution and cleanup can be handled by a specified transition plugin.
1528
+
1529
+ There are a number of pre-built transition plugins available in the
1530
+ foundation framework:
1531
+
1532
+ SC.View.BOUNCE_IN
1533
+ SC.View.FADE_IN
1534
+ SC.View.SLIDE_IN
1535
+ SC.View.SCALE_IN
1536
+ SC.View.SPRING_IN
1537
+
1538
+ You can even provide your own custom transition plugins. Just create a
1539
+ transition object that conforms to the SC.ViewTransitionProtocol protocol.
1540
+
1541
+ @type Object (SC.ViewTransitionProtocol)
1542
+ @default null
1543
+ @since Version 1.10
1544
+ */
1545
+ transitionShow: null,
1546
+
1547
+ /**
1548
+ The options for the given transition show plugin.
1549
+
1550
+ These options are specific to the current transition plugin used and are
1551
+ used to modify the transition animation. To determine what options
1552
+ may be used for a given plugin and to see what the default options are,
1553
+ see the documentation for the transition plugin being used.
1554
+
1555
+ Most transitions will accept a duration and timing option, but may
1556
+ also use other options. For example, SC.View.SLIDE accepts options
1557
+ like:
1558
+
1559
+ transitionShowOptions: {
1560
+ direction: 'left',
1561
+ duration: 0.25,
1562
+ timing: 'ease-in-out'
1563
+ }
1564
+
1565
+ @type Object
1566
+ @default null
1567
+ @since Version 1.10
1568
+ */
1569
+ transitionShowOptions: null,
1570
+
1571
+ /**
1572
+ The transition plugin to use when this view is hidden after being shown.
1573
+
1574
+ SC.View uses a pluggable transition architecture where the transition setup,
1575
+ execution and cleanup can be handled by a specified transition plugin.
1576
+
1577
+ There are a number of pre-built transition plugins available in the
1578
+ foundation framework:
1579
+
1580
+ SC.View.BOUNCE_OUT
1581
+ SC.View.FADE_OUT
1582
+ SC.View.SLIDE_OUT
1583
+ SC.View.SCALE_OUT
1584
+ SC.View.SPRING_OUT
1585
+
1586
+ You can even provide your own custom transition plugins. Just create a
1587
+ transition object that conforms to the SC.ViewTransitionProtocol protocol.
1588
+
1589
+ @type Object (SC.ViewTransitionProtocol)
1590
+ @default null
1591
+ @since Version 1.10
1592
+ */
1593
+ transitionHide: null,
1594
+
1595
+ /**
1596
+ The options for the given transition hide plugin.
1597
+
1598
+ These options are specific to the current transition plugin used and are
1599
+ used to modify the transition animation. To determine what options
1600
+ may be used for a given plugin and to see what the default options are,
1601
+ see the documentation for the transition plugin being used.
1602
+
1603
+ Most transitions will accept a duration and timing option, but may
1604
+ also use other options. For example, SC.View.SLIDE accepts options
1605
+ like:
1606
+
1607
+ transitionHideOptions: {
1608
+ direction: 'right',
1609
+ duration: 0.15,
1610
+ timing: 'ease-in'
1611
+ }
1612
+
1613
+ @type Object
1614
+ @default null
1615
+ @since Version 1.10
1616
+ */
1617
+ transitionHideOptions: null
1477
1618
 
1478
1619
  });
1479
1620
 
1480
- SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1621
+ SC.CoreView.mixin(
1622
+ /** @scope SC.CoreView */ {
1481
1623
 
1482
1624
  /** @private walk like a duck -- used by SC.Page */
1483
1625
  isViewClass: YES,
@@ -1491,23 +1633,23 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1491
1633
  @returns {Class} SC.View subclass to create
1492
1634
  @function
1493
1635
  */
1494
- design: function() {
1636
+ design: function () {
1495
1637
  if (this.isDesign) {
1496
1638
  // @if (debug)
1497
- SC.Logger.warn("SC.View#design called twice for %@.".fmt(this));
1639
+ SC.Logger.warn("Developer Warning: .design() was called twice for %@.".fmt(this));
1498
1640
  // @endif
1499
1641
  return this;
1500
1642
  }
1501
1643
 
1502
1644
  var ret = this.extend.apply(this, arguments);
1503
- ret.isDesign = YES ;
1645
+ ret.isDesign = YES;
1504
1646
  if (SC.ViewDesigner) {
1505
1647
  SC.ViewDesigner.didLoadDesign(ret, this, SC.A(arguments));
1506
1648
  }
1507
- return ret ;
1649
+ return ret;
1508
1650
  },
1509
1651
 
1510
- extend: function() {
1652
+ extend: function () {
1511
1653
  var last = arguments[arguments.length - 1];
1512
1654
 
1513
1655
  if (last && !SC.none(last.theme)) {
@@ -1521,71 +1663,71 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1521
1663
  /**
1522
1664
  Helper applies the layout to the prototype.
1523
1665
  */
1524
- layout: function(layout) {
1525
- this.prototype.layout = layout ;
1526
- return this ;
1666
+ layout: function (layout) {
1667
+ this.prototype.layout = layout;
1668
+ return this;
1527
1669
  },
1528
1670
 
1529
1671
  /**
1530
1672
  Helper applies the classNames to the prototype
1531
1673
  */
1532
- classNames: function(sc) {
1674
+ classNames: function (sc) {
1533
1675
  sc = (this.prototype.classNames || []).concat(sc);
1534
1676
  this.prototype.classNames = sc;
1535
- return this ;
1677
+ return this;
1536
1678
  },
1537
1679
 
1538
1680
  /**
1539
1681
  Help applies the tagName
1540
1682
  */
1541
- tagName: function(tg) {
1683
+ tagName: function (tg) {
1542
1684
  this.prototype.tagName = tg;
1543
- return this ;
1685
+ return this;
1544
1686
  },
1545
1687
 
1546
1688
  /**
1547
1689
  Helper adds the childView
1548
1690
  */
1549
- childView: function(cv) {
1691
+ childView: function (cv) {
1550
1692
  var childViews = this.prototype.childViews || [];
1551
1693
  if (childViews === this.superclass.prototype.childViews) {
1552
1694
  childViews = childViews.slice();
1553
1695
  }
1554
- childViews.push(cv) ;
1696
+ childViews.push(cv);
1555
1697
  this.prototype.childViews = childViews;
1556
- return this ;
1698
+ return this;
1557
1699
  },
1558
1700
 
1559
1701
  /**
1560
1702
  Helper adds a binding to a design
1561
1703
  */
1562
- bind: function(keyName, path) {
1704
+ bind: function (keyName, path) {
1563
1705
  var p = this.prototype, s = this.superclass.prototype;
1564
- var bindings = p._bindings ;
1706
+ var bindings = p._bindings;
1565
1707
  if (!bindings || bindings === s._bindings) {
1566
- bindings = p._bindings = (bindings || []).slice() ;
1708
+ bindings = p._bindings = (bindings || []).slice();
1567
1709
  }
1568
1710
 
1569
1711
  keyName = keyName + "Binding";
1570
- p[keyName] = path ;
1712
+ p[keyName] = path;
1571
1713
  bindings.push(keyName);
1572
1714
 
1573
- return this ;
1715
+ return this;
1574
1716
  },
1575
1717
 
1576
1718
  /**
1577
1719
  Helper sets a generic property on a design.
1578
1720
  */
1579
- prop: function(keyName, value) {
1721
+ prop: function (keyName, value) {
1580
1722
  this.prototype[keyName] = value;
1581
- return this ;
1723
+ return this;
1582
1724
  },
1583
1725
 
1584
1726
  /**
1585
1727
  Used to construct a localization for a view. The default implementation
1586
1728
  will simply return the passed attributes.
1587
1729
  */
1588
- localization: function(attrs, rootElement) {
1730
+ localization: function (attrs, rootElement) {
1589
1731
  // add rootElement
1590
1732
  if (rootElement) attrs.rootElement = SC.$(rootElement)[0];
1591
1733
  return attrs;
@@ -1601,21 +1743,21 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1601
1743
  @param {Hash} attrs
1602
1744
  @returns {SC.View} instance
1603
1745
  */
1604
- viewFor: function(element, attrs) {
1746
+ viewFor: function (element, attrs) {
1605
1747
  var args = SC.$A(arguments); // prepare to edit
1606
1748
  if (SC.none(element)) {
1607
1749
  args.shift(); // remove if no element passed
1608
- } else args[0] = { rootElement: SC.$(element)[0] } ;
1609
- var ret = this.create.apply(this, arguments) ;
1750
+ } else args[0] = { rootElement: SC.$(element)[0] };
1751
+ var ret = this.create.apply(this, arguments);
1610
1752
  args = args[0] = null;
1611
- return ret ;
1753
+ return ret;
1612
1754
  },
1613
1755
 
1614
1756
  /**
1615
1757
  Create a new view with the passed attributes hash. If you have the
1616
1758
  Designer module loaded, this will also create a peer designer if needed.
1617
1759
  */
1618
- create: function() {
1760
+ create: function () {
1619
1761
  var last = arguments[arguments.length - 1];
1620
1762
 
1621
1763
  if (last && last.theme) {
@@ -1623,11 +1765,11 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1623
1765
  delete last.theme;
1624
1766
  }
1625
1767
 
1626
- var C=this, ret = new C(arguments);
1768
+ var C = this, ret = new C(arguments);
1627
1769
  if (SC.ViewDesigner) {
1628
1770
  SC.ViewDesigner.didCreateView(ret, SC.$A(arguments));
1629
1771
  }
1630
- return ret ;
1772
+ return ret;
1631
1773
  },
1632
1774
 
1633
1775
  /**
@@ -1641,11 +1783,11 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1641
1783
  @param rootElement {String} optional rootElement with prepped HTML
1642
1784
  @returns {SC.View} receiver
1643
1785
  */
1644
- loc: function(loc) {
1786
+ loc: function (loc) {
1645
1787
  var childLocs = loc.childViews;
1646
1788
  delete loc.childViews; // clear out child views before applying to attrs
1647
1789
 
1648
- this.applyLocalizedAttributes(loc) ;
1790
+ this.applyLocalizedAttributes(loc);
1649
1791
  if (SC.ViewDesigner) {
1650
1792
  SC.ViewDesigner.didLoadLocalization(this, SC.$A(arguments));
1651
1793
  }
@@ -1653,7 +1795,7 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1653
1795
  // apply localization recursively to childViews
1654
1796
  var childViews = this.prototype.childViews, idx = childViews.length,
1655
1797
  viewClass;
1656
- while(--idx>=0) {
1798
+ while (--idx >= 0) {
1657
1799
  viewClass = childViews[idx];
1658
1800
  loc = childLocs[idx];
1659
1801
  if (loc && viewClass && typeof viewClass === SC.T_STRING) SC.String.loc(viewClass, loc);
@@ -1666,13 +1808,13 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1666
1808
  Internal method actually updates the localized attributes on the view
1667
1809
  class. This is overloaded in design mode to also save the attributes.
1668
1810
  */
1669
- applyLocalizedAttributes: function(loc) {
1670
- SC.mixin(this.prototype, loc) ;
1811
+ applyLocalizedAttributes: function (loc) {
1812
+ SC.mixin(this.prototype, loc);
1671
1813
  },
1672
1814
 
1673
1815
  views: {}
1674
1816
 
1675
- }) ;
1817
+ });
1676
1818
 
1677
1819
  // .......................................................
1678
1820
  // OUTLET BUILDER
@@ -1684,24 +1826,24 @@ SC.CoreView.mixin(/** @scope SC.CoreView.prototype */ {
1684
1826
  define an outlet that points to another view or object. The root object
1685
1827
  used for the path will be the receiver.
1686
1828
  */
1687
- SC.outlet = function(path, root) {
1688
- return function(key) {
1689
- return (this[key] = SC.objectForPropertyPath(path, (root !== undefined) ? root : this)) ;
1829
+ SC.outlet = function (path, root) {
1830
+ return function (key) {
1831
+ return (this[key] = SC.objectForPropertyPath(path, (root !== undefined) ? root : this));
1690
1832
  }.property();
1691
1833
  };
1692
1834
 
1693
1835
  /** @private on unload clear cached divs. */
1694
- SC.CoreView.unload = function() {
1836
+ SC.CoreView.unload = function () {
1695
1837
  // delete view items this way to ensure the views are cleared. The hash
1696
1838
  // itself may be owned by multiple view subclasses.
1697
1839
  var views = SC.View.views;
1698
1840
  if (views) {
1699
- for(var key in views) {
1700
- if (!views.hasOwnProperty(key)) continue ;
1701
- delete views[key];
1702
- }
1841
+ for (var key in views) {
1842
+ if (!views.hasOwnProperty(key)) continue;
1843
+ delete views[key];
1844
+ }
1703
1845
  }
1704
- } ;
1846
+ };
1705
1847
 
1706
1848
  /**
1707
1849
  @class
@@ -1754,10 +1896,10 @@ SC.CoreView.unload = function() {
1754
1896
  SC.View = SC.CoreView.extend(/** @scope SC.View.prototype */{
1755
1897
  classNames: ['sc-view'],
1756
1898
 
1757
- displayProperties: ['isFirstResponder']
1899
+ displayProperties: []
1758
1900
  });
1759
1901
 
1760
1902
  //unload views for IE, trying to collect memory.
1761
- if(SC.browser.isIE) SC.Event.add(window, 'unload', SC.View, SC.View.unload) ;
1903
+ if (SC.browser.isIE) SC.Event.add(window, 'unload', SC.View, SC.View.unload);
1762
1904
 
1763
1905