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
@@ -24,34 +24,38 @@
24
24
  // })
25
25
  // })
26
26
  //
27
- SC._ChainObserver = function(property, root) {
28
- this.property = property ;
29
- this.root = root || this ;
30
- } ;
27
+ SC._ChainObserver = function (property, root) {
28
+ this.property = property;
29
+ this.root = root || this;
30
+ };
31
31
 
32
- // This is the primary entry point. Configures the chain.
33
- SC._ChainObserver.createChain = function(rootObject, path, target, method, context) {
32
+ /** @private
33
+ This is the primary entry point. Configures the chain.
34
34
 
35
+ @param {String} path The property path for the chain. Ex. 'propA.propB.propC.@each.propD'
36
+ */
37
+ SC._ChainObserver.createChain = function (rootObject, path, target, method, context) {
35
38
  // First we create the chain.
36
- var parts = path.split('.'),
37
- root = new SC._ChainObserver(parts[0]),
39
+ var parts = path.split('.'), // ex. ['propA', 'propB', '@each', 'propC']
40
+ root = new SC._ChainObserver(parts[0]), // ex. _ChainObserver({ property: 'propA' })
38
41
  tail = root;
39
42
 
40
- for(var i=1, l=parts.length; i<l; i++) {
41
- tail = tail.next = new SC._ChainObserver(parts[i], root) ;
43
+ for (var i = 1, len = parts.length; i < len; i++) {
44
+ tail = tail.next = new SC._ChainObserver(parts[i], root);
42
45
  }
43
46
 
44
- var tails = root.tails = [tail];
47
+ var tails = root.tails = [tail]; // ex. [_ChainObserver({ property: 'propC' })]
45
48
 
46
49
  // Now root has the first observer and tail has the last one.
47
50
  // Feed the rootObject into the front to setup the chain...
48
51
  // do this BEFORE we set the target/method so they will not be triggered.
49
52
  root.objectDidChange(rootObject);
50
53
 
51
- tails.forEach(function(tail) {
52
- // Finally, set the target/method on the tail so that future changes will
53
- // trigger.
54
- tail.target = target; tail.method = method ; tail.context = context ;
54
+ tails.forEach(function (tail) {
55
+ // Finally, set the target/method on the tail so that future changes will trigger.
56
+ tail.target = target;
57
+ tail.method = method;
58
+ tail.context = context;
55
59
  });
56
60
 
57
61
  // no need to hold onto references to the tails; if the underlying
@@ -59,7 +63,7 @@ SC._ChainObserver.createChain = function(rootObject, path, target, method, conte
59
63
  root.tails = null;
60
64
 
61
65
  // and return the root to save
62
- return root ;
66
+ return root;
63
67
  };
64
68
 
65
69
  SC._ChainObserver.prototype = {
@@ -84,12 +88,12 @@ SC._ChainObserver.prototype = {
84
88
  method: null,
85
89
 
86
90
  // an accessor method that traverses the list and finds the tail
87
- tail: function() {
88
- if(this._tail) { return this._tail; }
91
+ tail: function () {
92
+ if (this._tail) { return this._tail; }
89
93
 
90
94
  var tail = this;
91
95
 
92
- while(tail.next) {
96
+ while (tail.next) {
93
97
  tail = tail.next;
94
98
  }
95
99
 
@@ -99,7 +103,7 @@ SC._ChainObserver.prototype = {
99
103
 
100
104
  // invoked when the source object changes. removes observer on old
101
105
  // object, sets up new observer, if needed.
102
- objectDidChange: function(newObject) {
106
+ objectDidChange: function (newObject) {
103
107
  if (newObject === this.object) return; // nothing to do.
104
108
 
105
109
  // if an old object, remove observer on it.
@@ -112,7 +116,7 @@ SC._ChainObserver.prototype = {
112
116
  }
113
117
 
114
118
  // if a new object, add observer on it...
115
- this.object = newObject ;
119
+ this.object = newObject;
116
120
 
117
121
  // when [].propName is used, we will want to set up observers on each item
118
122
  // added to the Enumerable, and remove them when the item is removed from
@@ -131,56 +135,57 @@ SC._ChainObserver.prototype = {
131
135
  }
132
136
 
133
137
  // now, notify myself that my property value has probably changed.
134
- this.propertyDidChange() ;
138
+ this.propertyDidChange();
135
139
  }
136
140
  },
137
141
 
138
142
  // the observer method invoked when the observed property changes.
139
- propertyDidChange: function() {
143
+ propertyDidChange: function () {
140
144
  // get the new value
141
- var object = this.object ;
142
- var property = this.property ;
143
- var value = (object && object.get) ? object.get(property) : null ;
145
+ var object = this.object;
146
+ var property = this.property;
147
+ var value = (object && object.get) ? object.get(property) : null;
144
148
 
145
149
  // if we have a next object in the chain, notify it that its object
146
150
  // did change...
147
- if (this.next) { this.next.objectDidChange(value) ; }
151
+ if (this.next) { this.next.objectDidChange(value); }
148
152
 
149
153
  // if we have a target/method, call it.
150
154
  var target = this.target,
151
155
  method = this.method,
152
- context = this.context ;
156
+ context = this.context;
153
157
 
154
158
  if (target && method) {
155
- var rev = object ? object.propertyRevision : null ;
159
+ var rev = object ? object.propertyRevision : null;
156
160
  if (context) {
157
161
  method.call(target, object, property, value, context, rev);
158
162
  } else {
159
- method.call(target, object, property, value, rev) ;
163
+ method.call(target, object, property, value, rev);
160
164
  }
161
165
  }
162
166
  },
163
167
 
164
168
  // teardown the chain...
165
- destroyChain: function() {
169
+ destroyChain: function () {
166
170
 
167
171
  // remove observer
168
- var obj = this.object ;
172
+ var obj = this.object;
169
173
  if (obj) {
170
174
  if (this.property === '@each' && this.next && obj._removeContentObserver) {
171
175
  obj._removeContentObserver(this);
172
176
  }
177
+
173
178
  if (obj.removeObserver) {
174
- obj.removeObserver(this.property, this, this.propertyDidChange) ;
179
+ obj.removeObserver(this.property, this, this.propertyDidChange);
175
180
  }
176
181
  }
177
182
 
178
183
  // destroy next item in chain
179
- if (this.next) this.next.destroyChain() ;
184
+ if (this.next) this.next.destroyChain();
180
185
 
181
186
  // and clear left overs...
182
187
  this.next = this.target = this.method = this.object = this.context = null;
183
- return null ;
188
+ return null;
184
189
  }
185
190
 
186
- } ;
191
+ };
@@ -68,8 +68,14 @@ SC.Observers = {
68
68
 
69
69
  tuple = SC.tupleForPropertyPath(propertyPath, pathRoot) ;
70
70
  if (tuple) {
71
- tuple[0].removeObserver(tuple[1], target, method) ;
71
+ tuple[0].removeObserver(tuple[1], target, method);
72
72
  }
73
+ //@if(debug)
74
+ // Add some developer support indicating that the observer was not removed.
75
+ else {
76
+ SC.warn("Developer Warning: Attempted to remove observer for propertyPath %@ with root %@ and failed. This may be because an object that the path refers to is no longer available.".fmt(propertyPath, pathRoot));
77
+ }
78
+ //@endif
73
79
 
74
80
  // tests show that the fastest way is to create a new array. On Safari,
75
81
  // it is fastest to set to null then loop over again to collapse, but for all other browsers
@@ -112,14 +118,14 @@ SC.Observers = {
112
118
  // flush any observers that we tried to setup but didn't have a path yet
113
119
  var oldQueue = this.queue, i,
114
120
  queueLen = oldQueue.length;
115
-
121
+
116
122
  if (oldQueue && queueLen > 0) {
117
123
  var newQueue = (this.queue = []) ;
118
124
 
119
125
  for (i=0; i<queueLen; i++ ) {
120
126
  var item = oldQueue[i];
121
127
  if ( !item ) continue;
122
-
128
+
123
129
  var tuple = SC.tupleForPropertyPath( item[0], item[3] );
124
130
  // check if object is observable (yet) before adding an observer
125
131
  if( tuple && tuple[0].addObserver ) {
@@ -129,7 +135,7 @@ SC.Observers = {
129
135
  }
130
136
  }
131
137
  }
132
-
138
+
133
139
  // if this object needsRangeObserver then see if any pending range
134
140
  // observers need it.
135
141
  if ( object._kvo_needsRangeObserver ) {
@@ -33,11 +33,13 @@ SC.ObserverSet = {
33
33
  indexes = targets[targetGuid], // get the set of methods
34
34
  index, member;
35
35
 
36
- if ( !indexes ) indexes = targets[targetGuid] = {};
36
+ if ( !indexes ) indexes = targets[targetGuid] = { _size: 0 };
37
37
 
38
38
  index = indexes[methodGuid];
39
39
  if (index === undefined) {
40
40
  indexes[methodGuid] = members.length;
41
+ // Increase the size of the indexes for this target so that it can be cleaned up.
42
+ indexes._size++;
41
43
  member = [target, method, context];
42
44
 
43
45
  //@if(debug)
@@ -95,9 +97,17 @@ SC.ObserverSet = {
95
97
  this._members[SC.guidFor(entry[0])][SC.guidFor(entry[1])] = index;
96
98
  }
97
99
 
100
+ // Throw away the last member (it has been moved or is the member we are removing).
98
101
  members.pop();
102
+
103
+ // Remove the method tracked for the target.
99
104
  delete this._members[targetGuid][methodGuid];
100
105
 
106
+ // If there are no more methods tracked on the target, remove the target.
107
+ if (--this._members[targetGuid]._size === 0) {
108
+ delete this._members[targetGuid];
109
+ }
110
+
101
111
  return true;
102
112
  },
103
113
 
@@ -35,7 +35,7 @@ SC._PropertyChain = SC.Object.extend(
35
35
  /**
36
36
  The object represented by this node in the chain.
37
37
 
38
- @property {Object}
38
+ @type Object
39
39
  */
40
40
  object: null,
41
41
 
@@ -43,7 +43,7 @@ SC._PropertyChain = SC.Object.extend(
43
43
  The key on the previous object in the chain that contains the object
44
44
  represented by this node in the chain.
45
45
 
46
- @property {String}
46
+ @type String
47
47
  */
48
48
  property: null,
49
49
 
@@ -52,14 +52,14 @@ SC._PropertyChain = SC.Object.extend(
52
52
  object which contains the +toInvalidate+ property that will be invalidated
53
53
  if +property+ changes.
54
54
 
55
- @property {Object}
55
+ @type Object
56
56
  */
57
57
  target: null,
58
58
 
59
59
  /**
60
60
  The property of +target+ to invalidate when +property+ changes.
61
61
 
62
- @property {String}
62
+ @type String
63
63
  */
64
64
  toInvalidate: null,
65
65
 
@@ -67,7 +67,7 @@ SC._PropertyChain = SC.Object.extend(
67
67
  The property key on +object+ that contains the object represented by the
68
68
  next node in the chain.
69
69
 
70
- @property {String}
70
+ @type String
71
71
  */
72
72
  nextProperty: null,
73
73
 
@@ -112,8 +112,8 @@ SC._PropertyChain = SC.Object.extend(
112
112
  },
113
113
 
114
114
  /**
115
- Removes this segment of the chain from the object it represents. This is
116
- usually called when the object represented by the previous segment in the
115
+ Removes this segment of the chain from the object it represents. This is
116
+ usually called when the object represented by the previous segment in the
117
117
  chain changes.
118
118
  */
119
119
  deactivate: function() {
@@ -8,51 +8,53 @@
8
8
  sc_require('ext/function');
9
9
  sc_require('system/object');
10
10
 
11
+ //@if(debug)
11
12
  /**
12
13
  Debug parameter you can turn on. This will log all bindings that fire to
13
14
  the console. This should be disabled in production code. Note that you
14
15
  can also enable this from the console or temporarily.
15
16
 
16
- @property {Boolean}
17
+ @type Boolean
17
18
  */
18
- SC.LOG_BINDINGS = NO ;
19
+ SC.LOG_BINDINGS = NO;
19
20
 
20
21
  /**
21
22
  Performance parameter. This will benchmark the time spent firing each
22
23
  binding.
23
24
 
24
- @property {Boolean}
25
+ @type Boolean
25
26
  */
26
- SC.BENCHMARK_BINDING_NOTIFICATIONS = NO ;
27
+ SC.BENCHMARK_BINDING_NOTIFICATIONS = NO;
27
28
 
28
29
  /**
29
30
  Performance parameter. This will benchmark the time spend configuring each
30
31
  binding.
31
32
 
32
- @property {Boolean}
33
+ @type Boolean
33
34
  */
34
35
  SC.BENCHMARK_BINDING_SETUP = NO;
36
+ //@endif
35
37
 
36
38
  /**
37
39
  Default placeholder for multiple values in bindings.
38
40
 
39
- @property {String}
41
+ @type String
40
42
  */
41
- SC.MULTIPLE_PLACEHOLDER = '@@MULT@@' ;
43
+ SC.MULTIPLE_PLACEHOLDER = '@@MULT@@';
42
44
 
43
45
  /**
44
46
  Default placeholder for null values in bindings.
45
47
 
46
- @property {String}
48
+ @type String
47
49
  */
48
- SC.NULL_PLACEHOLDER = '@@NULL@@' ;
50
+ SC.NULL_PLACEHOLDER = '@@NULL@@';
49
51
 
50
52
  /**
51
53
  Default placeholder for empty values in bindings.
52
54
 
53
- @property {String}
55
+ @type String
54
56
  */
55
- SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
57
+ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@';
56
58
 
57
59
 
58
60
  /**
@@ -89,7 +91,7 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
89
91
 
90
92
  You can also chain helper methods to build custom bindings like so:
91
93
 
92
- valueBinding: SC.Binding.single("MyApp.someController.title").notEmpty("(EMPTY)")
94
+ valueBinding: SC.Binding.single("MyApp.someController.title").notEmpty(null,"(EMPTY)")
93
95
 
94
96
  This will force the value of MyApp.someController.title to be a single value
95
97
  and then check to see if the value is "empty" (null, undefined, empty array,
@@ -130,7 +132,7 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
130
132
  not allow Integers less than ten. Note that it checks the value of the
131
133
  bindings and allows all other values to pass:
132
134
 
133
- valueBinding: SC.Binding.transform(function(value, binding) {
135
+ valueBinding: SC.Binding.transform(function (value, binding) {
134
136
  return ((SC.typeOf(value) === SC.T_NUMBER) && (value < 10)) ? 10 : value;
135
137
  }).from("MyApp.someController.value")
136
138
 
@@ -140,11 +142,11 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
140
142
  below adds a new helper called notLessThan() which will limit the value to
141
143
  be not less than the passed minimum:
142
144
 
143
- SC.Binding.notLessThan = function(minValue) {
144
- return this.transform(function(value, binding) {
145
- return ((SC.typeOf(value) === SC.T_NUMBER) && (value < minValue)) ? minValue : value ;
146
- }) ;
147
- } ;
145
+ SC.Binding.notLessThan = function (minValue) {
146
+ return this.transform(function (value, binding) {
147
+ return ((SC.typeOf(value) === SC.T_NUMBER) && (value < minValue)) ? minValue : value;
148
+ });
149
+ };
148
150
 
149
151
  You could specify this in your core.js file, for example. Then anywhere in
150
152
  your application you can use it to define bindings like so:
@@ -207,14 +209,14 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
207
209
  examples above, during init, SproutCore objects will effectively call
208
210
  something like this on your binding:
209
211
 
210
- binding = this.valueBinding.beget().to("value", this) ;
212
+ binding = this.valueBinding.beget().to("value", this);
211
213
 
212
214
  This creates a new binding instance based on the template you provide, and
213
215
  sets the to path to the "value" property of the new object. Now that the
214
216
  binding is fully configured with a "from" and a "to", it simply needs to be
215
217
  connected to become active. This is done through the connect() method:
216
218
 
217
- binding.connect() ;
219
+ binding.connect();
218
220
 
219
221
  Now that the binding is connected, it will observe both the from and to side
220
222
  and relay changes.
@@ -230,7 +232,7 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
230
232
  You could also use the bind() helper method provided by SC.Object. (This is
231
233
  the same method used by SC.Object.init() to setup your bindings):
232
234
 
233
- MyApp.anotherObject.bind("value", "MyApp.someController.value") ;
235
+ MyApp.anotherObject.bind("value", "MyApp.someController.value");
234
236
 
235
237
  Both of these code fragments have the same effect as doing the most friendly
236
238
  form of binding creation like so:
@@ -241,7 +243,7 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@' ;
241
243
 
242
244
  // OTHER CODE FOR THIS OBJECT...
243
245
 
244
- }) ;
246
+ });
245
247
 
246
248
  SproutCore's built in binding creation method make it easy to automatically
247
249
  create bindings for you. You should always use the highest-level APIs
@@ -262,21 +264,21 @@ SC.Binding = /** @scope SC.Binding.prototype */{
262
264
  @param {String} [fromPath]
263
265
  @returns {SC.Binding} new binding instance
264
266
  */
265
- beget: function(fromPath) {
266
- var ret = SC.beget(this) ;
267
+ beget: function (fromPath) {
268
+ var ret = SC.beget(this);
267
269
  ret.parentBinding = this;
268
- if (fromPath !== undefined) ret = ret.from(fromPath) ;
269
- return ret ;
270
+ if (fromPath !== undefined) ret = ret.from(fromPath);
271
+ return ret;
270
272
  },
271
273
 
272
274
  /**
273
275
  Returns a builder function for compatibility.
274
276
  */
275
- builder: function() {
277
+ builder: function () {
276
278
  var binding = this,
277
- ret = function(fromProperty) { return binding.beget().from(fromProperty); };
278
- ret.beget = function() { return binding.beget(); } ;
279
- return ret ;
279
+ ret = function (fromProperty) { return binding.beget().from(fromProperty); };
280
+ ret.beget = function () { return binding.beget(); };
281
+ return ret;
280
282
  },
281
283
 
282
284
  /**
@@ -294,19 +296,19 @@ SC.Binding = /** @scope SC.Binding.prototype */{
294
296
  @param {Object} [root] root object to use when resolving the path.
295
297
  @returns {SC.Binding} this
296
298
  */
297
- from: function(propertyPath, root) {
299
+ from: function (propertyPath, root) {
298
300
 
299
301
  // if the propertyPath is null/undefined, return this. This allows the
300
302
  // method to be called from other methods when the fromPath might be
301
303
  // optional. (cf single(), multiple())
302
- if (!propertyPath) return this ;
304
+ if (!propertyPath) return this;
303
305
 
304
306
  // beget if needed.
305
- var binding = (this === SC.Binding) ? this.beget() : this ;
306
- binding._fromPropertyPath = propertyPath ;
307
- binding._fromRoot = root ;
308
- binding._fromTuple = null ;
309
- return binding ;
307
+ var binding = (this === SC.Binding) ? this.beget() : this;
308
+ binding._fromPropertyPath = propertyPath;
309
+ binding._fromRoot = root;
310
+ binding._fromTuple = null;
311
+ return binding;
310
312
  },
311
313
 
312
314
  /**
@@ -318,13 +320,13 @@ SC.Binding = /** @scope SC.Binding.prototype */{
318
320
  @param {Object} [root] root object to use when resolving the path.
319
321
  @returns {SC.Binding} this
320
322
  */
321
- to: function(propertyPath, root) {
323
+ to: function (propertyPath, root) {
322
324
  // beget if needed.
323
- var binding = (this === SC.Binding) ? this.beget() : this ;
324
- binding._toPropertyPath = propertyPath ;
325
- binding._toRoot = root ;
326
- binding._toTuple = null ; // clear out any existing one.
327
- return binding ;
325
+ var binding = (this === SC.Binding) ? this.beget() : this;
326
+ binding._toPropertyPath = propertyPath;
327
+ binding._toRoot = root;
328
+ binding._toTuple = null; // clear out any existing one.
329
+ return binding;
328
330
  },
329
331
 
330
332
  /**
@@ -334,14 +336,14 @@ SC.Binding = /** @scope SC.Binding.prototype */{
334
336
 
335
337
  @returns {SC.Binding} this
336
338
  */
337
- connect: function() {
339
+ connect: function () {
338
340
  // If the binding is already connected, do nothing.
339
- if (this.isConnected) return this ;
340
- this.isConnected = YES ;
341
- this._connectionPending = YES ; // its connected but not really...
342
- this._syncOnConnect = YES ;
341
+ if (this.isConnected) return this;
342
+ this.isConnected = YES;
343
+ this._connectionPending = YES; // its connected but not really...
344
+ this._syncOnConnect = YES;
343
345
 
344
- SC.Binding._connectQueue.add(this) ;
346
+ SC.Binding._connectQueue.add(this);
345
347
 
346
348
  if (!SC.RunLoop.isRunLoopInProgress()) {
347
349
  this._scheduleSync();
@@ -355,14 +357,16 @@ SC.Binding = /** @scope SC.Binding.prototype */{
355
357
  to give you time to setup your entire object graph before the bindings
356
358
  try to activate.
357
359
  */
358
- _connect: function() {
360
+ _connect: function () {
359
361
  if (!this._connectionPending) return; //nothing to do
360
- this._connectionPending = NO ;
362
+ this._connectionPending = NO;
361
363
 
362
- var path, root,
363
- bench = SC.BENCHMARK_BINDING_SETUP;
364
+ var path, root;
364
365
 
366
+ //@if(debug)
367
+ var bench = SC.BENCHMARK_BINDING_SETUP;
365
368
  if (bench) SC.Benchmark.start("SC.Binding.connect()");
369
+ //@endif
366
370
 
367
371
  // try to connect the from side.
368
372
  // as a special behavior, if the from property path begins with either a
@@ -371,7 +375,8 @@ SC.Binding = /** @scope SC.Binding.prototype */{
371
375
  //
372
376
  // contentBinding: "*owner.value"
373
377
  //
374
- path = this._fromPropertyPath; root = this._fromRoot ;
378
+ path = this._fromPropertyPath;
379
+ root = this._fromRoot;
375
380
 
376
381
  if (typeof path === "string") {
377
382
 
@@ -379,13 +384,13 @@ SC.Binding = /** @scope SC.Binding.prototype */{
379
384
  // toRoot the default root.
380
385
  if (path.indexOf('.') === 0) {
381
386
  path = path.slice(1);
382
- if (!root) root = this._toRoot ;
387
+ if (!root) root = this._toRoot;
383
388
 
384
389
  // if the first character is a '*', then setup a tuple since this is a
385
390
  // chained path.
386
391
  } else if (path.indexOf('*') === 0) {
387
- path = [this._fromRoot || this._toRoot, path.slice(1)] ;
388
- root = null ;
392
+ path = [this._fromRoot || this._toRoot, path.slice(1)];
393
+ root = null;
389
394
  }
390
395
  }
391
396
  this._fromObserverData = [path, this, this.fromPropertyDidChange, root];
@@ -393,19 +398,26 @@ SC.Binding = /** @scope SC.Binding.prototype */{
393
398
 
394
399
  // try to connect the to side
395
400
  if (!this._oneWay) {
396
- path = this._toPropertyPath; root = this._toRoot ;
401
+ path = this._toPropertyPath;
402
+ root = this._toRoot;
397
403
  this._toObserverData = [path, this, this.toPropertyDidChange, root];
398
404
  SC.Observers.addObserver.apply(SC.Observers, this._toObserverData);
399
405
  }
400
406
 
407
+ //@if(debug)
401
408
  if (bench) SC.Benchmark.end("SC.Binding.connect()");
409
+ //@endif
402
410
 
403
411
  // now try to sync if needed
404
412
  if (this._syncOnConnect) {
405
- this._syncOnConnect = NO ;
413
+ this._syncOnConnect = NO;
414
+ //@if(debug)
406
415
  if (bench) SC.Benchmark.start("SC.Binding.connect().sync");
416
+ //@endif
407
417
  this.sync();
418
+ //@if(debug)
408
419
  if (bench) SC.Benchmark.end("SC.Binding.connect().sync");
420
+ //@endif
409
421
  }
410
422
  },
411
423
 
@@ -415,23 +427,58 @@ SC.Binding = /** @scope SC.Binding.prototype */{
415
427
 
416
428
  @returns {SC.Binding} this
417
429
  */
418
- disconnect: function() {
430
+ disconnect: function () {
419
431
  if (!this.isConnected) return this; // nothing to do.
420
432
 
421
433
  // if connection is still pending, just cancel
422
434
  if (this._connectionPending) {
423
- this._connectionPending = NO ;
435
+ this._connectionPending = NO;
424
436
 
437
+ SC.Binding._connectQueue.remove(this);
425
438
  // connection is completed, disconnect.
426
439
  } else {
427
440
  SC.Observers.removeObserver.apply(SC.Observers, this._fromObserverData);
428
441
  if (!this._oneWay) {
429
442
  SC.Observers.removeObserver.apply(SC.Observers, this._toObserverData);
430
443
  }
444
+
445
+ // Remove ourselves from the change queue (if we are in it).
446
+ SC.Binding._changeQueue.remove(this);
431
447
  }
432
448
 
433
- this.isConnected = NO ;
434
- return this ;
449
+ this.isConnected = NO;
450
+ return this;
451
+ },
452
+
453
+ /**
454
+ Indicates when the binding has been destroyed.
455
+
456
+ @type Boolean
457
+ @default NO
458
+ */
459
+ isDestroyed: NO,
460
+
461
+ /**
462
+ Disconnects the binding and removes all properties and external references. Called by
463
+ either binding target object when destroyed.
464
+
465
+ @private
466
+ */
467
+ destroy: function () {
468
+ // If we're already destroyed, there's nothing to do.
469
+ if (this.isDestroyed) return;
470
+
471
+ // Mark it destroyed.
472
+ this.isDestroyed = YES;
473
+
474
+ // Disconnect the binding.
475
+ this.disconnect();
476
+
477
+ // Aggressively null out internal properties.
478
+ this._bindingSource = null;
479
+ this._toRoot = this._toTarget = null;
480
+ this._fromRoot = this._fromTarget = null;
481
+ this._toObserverData = this._fromObserverData = null;
435
482
  },
436
483
 
437
484
  /**
@@ -441,16 +488,15 @@ SC.Binding = /** @scope SC.Binding.prototype */{
441
488
  @param {Object} target The object that contains the key
442
489
  @param {String} key The name of the property which changed
443
490
  */
444
- fromPropertyDidChange: function(target, key) {
491
+ fromPropertyDidChange: function (target, key) {
445
492
  var v = target ? target.get(key) : null;
446
493
 
447
494
  // if the new value is different from the current binding value, then
448
495
  // schedule to register an update.
449
496
  if (v !== this._bindingValue || key === '[]') {
450
497
 
451
- this._setBindingValue(target, key) ;
452
- this._changePending = YES ;
453
- SC.Binding._changeQueue.add(this) ; // save for later.
498
+ this._setBindingValue(target, key);
499
+ SC.Binding._changeQueue.add(this); // save for later.
454
500
 
455
501
  this._scheduleSync();
456
502
  }
@@ -469,33 +515,32 @@ SC.Binding = /** @scope SC.Binding.prototype */{
469
515
  @param {Object} target The object that contains the key
470
516
  @param {String} key The name of the property which changed
471
517
  */
472
- toPropertyDidChange: function(target, key) {
518
+ toPropertyDidChange: function (target, key) {
473
519
  if (this._oneWay) return; // nothing to do
474
520
 
475
- var v = target.get(key) ;
521
+ var v = target.get(key);
476
522
 
477
523
  // if the new value is different from the current binding value, then
478
524
  // schedule to register an update.
479
525
  if (v !== this._transformedBindingValue) {
480
- this._setBindingValue(target, key) ;
481
- this._changePending = YES ;
482
- SC.Binding._changeQueue.add(this) ; // save for later.
526
+ this._setBindingValue(target, key);
527
+ SC.Binding._changeQueue.add(this); // save for later.
483
528
 
484
529
  this._scheduleSync();
485
530
  }
486
531
  },
487
532
 
488
- _scheduleSync: function() {
533
+ _scheduleSync: function () {
489
534
  if (SC.RunLoop.isRunLoopInProgress() || SC.Binding._syncScheduled) { return; }
490
535
  SC.Binding._syncScheduled = YES;
491
- setTimeout(function() { SC.run(); SC.Binding._syncScheduled = NO; }, 1);
536
+ setTimeout(function () { SC.run(); SC.Binding._syncScheduled = NO; }, 1);
492
537
  },
493
538
 
494
539
  /** @private
495
540
  Saves the source location for the binding value. This will be used later
496
541
  to actually update the binding value.
497
542
  */
498
- _setBindingValue: function(source, key) {
543
+ _setBindingValue: function (source, key) {
499
544
  this._bindingSource = source;
500
545
  this._bindingKey = key;
501
546
  },
@@ -504,7 +549,7 @@ SC.Binding = /** @scope SC.Binding.prototype */{
504
549
  Updates the binding value from the current binding source if needed. This
505
550
  should be called just before using this._bindingValue.
506
551
  */
507
- _computeBindingValue: function() {
552
+ _computeBindingValue: function () {
508
553
  var source = this._bindingSource,
509
554
  key = this._bindingKey,
510
555
  v, idx;
@@ -516,15 +561,15 @@ SC.Binding = /** @scope SC.Binding.prototype */{
516
561
  if (transforms) {
517
562
  var len = transforms.length,
518
563
  transform;
519
- for(idx=0;idx<len;idx++) {
520
- transform = transforms[idx] ;
521
- v = transform(v, this) ;
564
+ for (idx = 0; idx < len; idx++) {
565
+ transform = transforms[idx];
566
+ v = transform(v, this);
522
567
  }
523
568
  }
524
569
 
525
570
  // if error objects are not allowed, and the value is an error, then
526
571
  // change it to null.
527
- if (this._noError && SC.typeOf(v) === SC.T_ERROR) v = null ;
572
+ if (this._noError && SC.typeOf(v) === SC.T_ERROR) v = null;
528
573
 
529
574
  this._transformedBindingValue = v;
530
575
  },
@@ -533,90 +578,107 @@ SC.Binding = /** @scope SC.Binding.prototype */{
533
578
  _alternateConnectQueue: SC.CoreSet.create(),
534
579
  _changeQueue: SC.CoreSet.create(),
535
580
  _alternateChangeQueue: SC.CoreSet.create(),
536
- _changePending: NO,
537
581
 
538
582
  /**
539
583
  Call this method on SC.Binding to flush all bindings with changed pending.
540
584
 
541
585
  @returns {Boolean} YES if changes were flushed.
542
586
  */
543
- flushPendingChanges: function() {
587
+ flushPendingChanges: function () {
544
588
 
545
589
  // don't allow flushing more than one at a time
546
590
  if (this._isFlushing) return NO;
547
- this._isFlushing = YES ;
591
+ this._isFlushing = YES;
548
592
  SC.Observers.suspendPropertyObserving();
549
593
 
550
594
  var didFlush = NO,
551
- log = SC.LOG_BINDINGS,
552
595
  // connect any bindings
553
- queue, binding ;
554
- while((queue = this._connectQueue).length >0) {
555
- this._connectQueue = this._alternateConnectQueue ;
556
- this._alternateConnectQueue = queue ;
557
- while(binding = queue.pop()) binding._connect() ;
596
+ queue, binding;
597
+
598
+ while ((queue = this._connectQueue).length > 0) {
599
+ this._connectQueue = this._alternateConnectQueue;
600
+ this._alternateConnectQueue = queue;
601
+ while (binding = queue.pop()) binding._connect();
558
602
  }
559
603
 
560
604
  // loop through the changed queue...
561
605
  while ((queue = this._changeQueue).length > 0) {
562
- if (log) SC.Logger.log("Begin: Trigger changed bindings") ;
606
+ //@if(debug)
607
+ if (SC.LOG_BINDINGS) SC.Logger.log("Begin: Trigger changed bindings");
608
+ //@endif
563
609
 
564
- didFlush = YES ;
610
+ didFlush = YES;
565
611
 
566
612
  // first, swap the change queues. This way any binding changes that
567
613
  // happen while we flush the current queue can be queued up.
568
- this._changeQueue = this._alternateChangeQueue ;
569
- this._alternateChangeQueue = queue ;
614
+ this._changeQueue = this._alternateChangeQueue;
615
+ this._alternateChangeQueue = queue;
570
616
 
571
617
  // next, apply any bindings in the current queue. This may cause
572
618
  // additional bindings to trigger, which will end up in the new active
573
619
  // queue.
574
- while(binding = queue.pop()) binding.applyBindingValue() ;
620
+ while (binding = queue.pop()) binding.applyBindingValue();
575
621
 
576
622
  // now loop back and see if there are additional changes pending in the
577
623
  // active queue. Repeat this until all bindings that need to trigger
578
624
  // have triggered.
579
- if (log) SC.Logger.log("End: Trigger changed bindings") ;
625
+ //@if(debug)
626
+ if (SC.LOG_BINDINGS) SC.Logger.log("End: Trigger changed bindings");
627
+ //@endif
580
628
  }
581
629
 
582
630
  // clean up
583
- this._isFlushing = NO ;
631
+ this._isFlushing = NO;
584
632
  SC.Observers.resumePropertyObserving();
585
633
 
586
- return didFlush ;
634
+ return didFlush;
587
635
  },
588
636
 
589
637
  /**
590
638
  This method is called at the end of the Run Loop to relay the changed
591
639
  binding value from one side to the other.
592
640
  */
593
- applyBindingValue: function() {
594
- this._changePending = NO ;
595
-
641
+ applyBindingValue: function () {
596
642
  // compute the binding targets if needed.
597
- this._computeBindingTargets() ;
643
+ this._computeBindingTargets();
598
644
  this._computeBindingValue();
599
645
 
600
646
  var v = this._bindingValue,
601
- tv = this._transformedBindingValue,
602
- bench = SC.BENCHMARK_BINDING_NOTIFICATIONS,
603
- log = SC.LOG_BINDINGS ;
647
+ tv = this._transformedBindingValue;
648
+
649
+ //@if(debug)
650
+ var bench = SC.BENCHMARK_BINDING_NOTIFICATIONS,
651
+ log = SC.LOG_BINDINGS;
652
+ //@endif
604
653
 
605
654
  // the from property value will always be the binding value, update if
606
655
  // needed.
607
656
  if (!this._oneWay && this._fromTarget) {
608
- if (log) SC.Logger.log("%@: %@ -> %@".fmt(this, v, tv)) ;
609
- if (bench) SC.Benchmark.start(this.toString() + "->") ;
610
- this._fromTarget.setPathIfChanged(this._fromPropertyKey, v) ;
611
- if (bench) SC.Benchmark.end(this.toString() + "->") ;
657
+ //@if(debug)
658
+ if (log) SC.Logger.log("%@: %@ -> %@".fmt(this, v, tv));
659
+ if (bench) SC.Benchmark.start(this.toString() + "->");
660
+ //@endif
661
+
662
+ this._fromTarget.setPathIfChanged(this._fromPropertyKey, v);
663
+
664
+ //@if(debug)
665
+ if (bench) SC.Benchmark.end(this.toString() + "->");
666
+ //@endif
612
667
  }
613
668
 
614
669
  // update the to value with the transformed value if needed.
615
670
  if (this._toTarget) {
616
- if (log) SC.Logger.log("%@: %@ <- %@".fmt(this, v, tv)) ;
617
- if (bench) SC.Benchmark.start(this.toString() + "<-") ;
618
- this._toTarget.setPathIfChanged(this._toPropertyKey, tv) ;
619
- if (bench) SC.Benchmark.start(this.toString() + "<-") ;
671
+
672
+ //@if(debug)
673
+ if (log) SC.Logger.log("%@: %@ <- %@".fmt(this, v, tv));
674
+ if (bench) SC.Benchmark.start(this.toString() + "<-");
675
+ //@endif
676
+
677
+ this._toTarget.setPathIfChanged(this._toPropertyKey, tv);
678
+
679
+ //@if(debug)
680
+ if (bench) SC.Benchmark.start(this.toString() + "<-");
681
+ //@endif
620
682
  }
621
683
  },
622
684
 
@@ -629,21 +691,21 @@ SC.Binding = /** @scope SC.Binding.prototype */{
629
691
  This method is useful when you are dynamically connecting bindings to a
630
692
  network of objects that may have already been initialized.
631
693
  */
632
- sync: function() {
694
+ sync: function () {
633
695
 
634
696
  // do nothing if not connected
635
697
  if (!this.isConnected) return this;
636
698
 
637
699
  // connection is pending, just note that we should sync also
638
700
  if (this._connectionPending) {
639
- this._syncOnConnect = YES ;
701
+ this._syncOnConnect = YES;
640
702
 
641
703
  // we are connected, go ahead and sync
642
704
  } else {
643
- this._computeBindingTargets() ;
705
+ this._computeBindingTargets();
644
706
  var target = this._fromTarget,
645
- key = this._fromPropertyKey ;
646
- if (!target || !key) return this ; // nothing to do
707
+ key = this._fromPropertyKey;
708
+ if (!target || !key) return this; // nothing to do
647
709
 
648
710
  // Let's check for whether target is a valid observable with getPath.
649
711
  // Common cases might have it be a Window or a DOM object.
@@ -655,57 +717,59 @@ SC.Binding = /** @scope SC.Binding.prototype */{
655
717
  }
656
718
 
657
719
  // get the new value
658
- var v = target.getPath(key) ;
720
+ var v = target.getPath(key);
659
721
 
660
722
  // if the new value is different from the current binding value, then
661
723
  // schedule to register an update.
662
724
  if (v !== this._bindingValue || key === '[]') {
663
- this._setBindingValue(target, key) ;
664
- this._changePending = YES ;
665
- SC.Binding._changeQueue.add(this) ; // save for later.
725
+ this._setBindingValue(target, key);
726
+ SC.Binding._changeQueue.add(this); // save for later.
666
727
  }
667
728
  }
668
729
 
669
- return this ;
730
+ return this;
670
731
  },
671
732
 
672
733
  // set if you call sync() when the binding connection is still pending.
673
734
  _syncOnConnect: NO,
674
735
 
675
- _computeBindingTargets: function() {
676
- if (!this._fromTarget) {
677
-
678
- var path, root, tuple ;
736
+ _computeBindingTargets: function () {
737
+ var path, root, tuple;
679
738
 
739
+ if (!this._fromTarget) {
680
740
  // if the fromPropertyPath begins with a . or * then we may use the
681
741
  // toRoot as the root object. Similar code exists in connect() so if
682
742
  // you make a change to one be sure to update the other.
683
- path = this._fromPropertyPath; root = this._fromRoot ;
743
+ path = this._fromPropertyPath;
744
+ root = this._fromRoot;
684
745
  if (typeof path === "string") {
685
746
 
686
747
  // static path beginning with the toRoot
687
748
  if (path.indexOf('.') === 0) {
688
- path = path.slice(1) ; // remove the .
749
+ path = path.slice(1); // remove the .
689
750
  if (!root) root = this._toRoot; // use the toRoot optionally
690
751
 
691
752
  // chained path beginning with toRoot. Setup a tuple
692
753
  } else if (path.indexOf('*') === 0) {
693
754
  path = [root || this._toRoot, path.slice(1)];
694
- root = null ;
755
+ root = null;
695
756
  }
696
757
  }
697
758
 
698
- tuple = SC.tupleForPropertyPath(path, root) ;
759
+ tuple = SC.tupleForPropertyPath(path, root);
699
760
  if (tuple) {
700
- this._fromTarget = tuple[0]; this._fromPropertyKey = tuple[1] ;
761
+ this._fromTarget = tuple[0];
762
+ this._fromPropertyKey = tuple[1];
701
763
  }
702
764
  }
703
765
 
704
766
  if (!this._toTarget) {
705
- path = this._toPropertyPath; root = this._toRoot ;
706
- tuple = SC.tupleForPropertyPath(path, root) ;
767
+ path = this._toPropertyPath;
768
+ root = this._toRoot;
769
+ tuple = SC.tupleForPropertyPath(path, root);
707
770
  if (tuple) {
708
- this._toTarget = tuple[0]; this._toPropertyKey = tuple[1] ;
771
+ this._toTarget = tuple[0];
772
+ this._toPropertyKey = tuple[1];
709
773
  }
710
774
  }
711
775
  },
@@ -720,18 +784,20 @@ SC.Binding = /** @scope SC.Binding.prototype */{
720
784
  @param {Boolean} [aFlag] Pass NO to set the binding back to two-way
721
785
  @returns {SC.Binding} this
722
786
  */
723
- oneWay: function(fromPath, aFlag) {
787
+ oneWay: function (fromPath, aFlag) {
724
788
 
725
789
  // If fromPath is a bool but aFlag is undefined, swap.
726
790
  if ((aFlag === undefined) && (SC.typeOf(fromPath) === SC.T_BOOL)) {
727
- aFlag = fromPath; fromPath = null ;
791
+ aFlag = fromPath;
792
+ fromPath = null;
728
793
  }
729
794
 
730
795
  // beget if needed.
731
- var binding = this.from(fromPath) ;
732
- if (binding === SC.Binding) binding = binding.beget() ;
733
- binding._oneWay = (aFlag === undefined) ? YES : aFlag ;
734
- return binding ;
796
+ var binding = this.from(fromPath);
797
+ if (binding === SC.Binding) binding = binding.beget();
798
+ binding._oneWay = (aFlag === undefined) ? YES : aFlag;
799
+
800
+ return binding;
735
801
  },
736
802
 
737
803
  /**
@@ -739,7 +805,7 @@ SC.Binding = /** @scope SC.Binding.prototype */{
739
805
 
740
806
  The function you pass must have the following signature:
741
807
 
742
- function(value) {} ;
808
+ function (value) {};
743
809
 
744
810
  It must return either the transformed value or an error object.
745
811
 
@@ -750,20 +816,20 @@ SC.Binding = /** @scope SC.Binding.prototype */{
750
816
  @param {Function} transformFunc the transform function.
751
817
  @returns {SC.Binding} this
752
818
  */
753
- transform: function(transformFunc) {
754
- var binding = (this === SC.Binding) ? this.beget() : this ;
755
- var t = binding._transforms ;
819
+ transform: function (transformFunc) {
820
+ var binding = (this === SC.Binding) ? this.beget() : this;
821
+ var t = binding._transforms;
756
822
 
757
823
  // clone the transform array if this comes from the parent
758
824
  if (t && (t === binding.parentBinding._transform)) {
759
- t = binding._transforms = t.slice() ;
825
+ t = binding._transforms = t.slice();
760
826
  }
761
827
 
762
828
  // create the transform array if needed.
763
- if (!t) t = binding._transforms = [] ;
829
+ if (!t) t = binding._transforms = [];
764
830
 
765
831
  // add the transform function
766
- t.push(transformFunc) ;
832
+ t.push(transformFunc);
767
833
  return binding;
768
834
  },
769
835
 
@@ -774,9 +840,10 @@ SC.Binding = /** @scope SC.Binding.prototype */{
774
840
 
775
841
  @returns {SC.Binding} this
776
842
  */
777
- resetTransforms: function() {
778
- var binding = (this === SC.Binding) ? this.beget() : this ;
779
- binding._transforms = null ; return binding ;
843
+ resetTransforms: function () {
844
+ var binding = (this === SC.Binding) ? this.beget() : this;
845
+ binding._transforms = null;
846
+ return binding;
780
847
  },
781
848
 
782
849
  /**
@@ -791,17 +858,19 @@ SC.Binding = /** @scope SC.Binding.prototype */{
791
858
  @param {Boolean} [aFlag] Pass NO to allow error objects again.
792
859
  @returns {SC.Binding} this
793
860
  */
794
- noError: function(fromPath, aFlag) {
861
+ noError: function (fromPath, aFlag) {
795
862
  // If fromPath is a bool but aFlag is undefined, swap.
796
863
  if ((aFlag === undefined) && (SC.typeOf(fromPath) === SC.T_BOOL)) {
797
- aFlag = fromPath; fromPath = null ;
864
+ aFlag = fromPath;
865
+ fromPath = null;
798
866
  }
799
867
 
800
868
  // beget if needed.
801
- var binding = this.from(fromPath) ;
802
- if (binding === SC.Binding) binding = binding.beget() ;
803
- binding._noError = (aFlag === undefined) ? YES : aFlag ;
804
- return binding ;
869
+ var binding = this.from(fromPath);
870
+ if (binding === SC.Binding) binding = binding.beget();
871
+ binding._noError = (aFlag === undefined) ? YES : aFlag;
872
+
873
+ return binding;
805
874
  },
806
875
 
807
876
  /**
@@ -823,17 +892,17 @@ SC.Binding = /** @scope SC.Binding.prototype */{
823
892
  @param {Object} [placeholder] placeholder value.
824
893
  @returns {SC.Binding} this
825
894
  */
826
- single: function(fromPath, placeholder) {
895
+ single: function (fromPath, placeholder) {
827
896
  if (placeholder === undefined) {
828
- placeholder = SC.MULTIPLE_PLACEHOLDER ;
897
+ placeholder = SC.MULTIPLE_PLACEHOLDER;
829
898
  }
830
- return this.from(fromPath).transform(function(value, isForward) {
899
+ return this.from(fromPath).transform(function (value, isForward) {
831
900
  if (value && value.isEnumerable) {
832
901
  var len = value.get('length');
833
- value = (len>1) ? placeholder : (len<=0) ? null : value.firstObject();
902
+ value = (len > 1) ? placeholder : (len <= 0) ? null : value.firstObject();
834
903
  }
835
- return value ;
836
- }) ;
904
+ return value;
905
+ });
837
906
  },
838
907
 
839
908
  /**
@@ -844,14 +913,14 @@ SC.Binding = /** @scope SC.Binding.prototype */{
844
913
  @param {Object} [placeholder]
845
914
  @returns {SC.Binding} this
846
915
  */
847
- notEmpty: function(fromPath, placeholder) {
848
- if (placeholder === undefined) placeholder = SC.EMPTY_PLACEHOLDER ;
849
- return this.from(fromPath).transform(function(value, isForward) {
850
- if (SC.none(value) || (value === '') || (SC.isArray(value) && (value.get ? value.get('length') : value.length)=== 0)) {
851
- value = placeholder ;
916
+ notEmpty: function (fromPath, placeholder) {
917
+ if (placeholder === undefined) placeholder = SC.EMPTY_PLACEHOLDER;
918
+ return this.from(fromPath).transform(function (value, isForward) {
919
+ if (SC.none(value) || (value === '') || (SC.isArray(value) && (value.get ? value.get('length') : value.length) === 0)) {
920
+ value = placeholder;
852
921
  }
853
- return value ;
854
- }) ;
922
+ return value;
923
+ });
855
924
  },
856
925
 
857
926
  /**
@@ -862,12 +931,12 @@ SC.Binding = /** @scope SC.Binding.prototype */{
862
931
  @param {Object} [placeholder]
863
932
  @returns {SC.Binding} this
864
933
  */
865
- notNull: function(fromPath, placeholder) {
866
- if (placeholder === undefined) placeholder = SC.EMPTY_PLACEHOLDER ;
867
- return this.from(fromPath).transform(function(value, isForward) {
868
- if (SC.none(value)) value = placeholder ;
869
- return value ;
870
- }) ;
934
+ notNull: function (fromPath, placeholder) {
935
+ if (placeholder === undefined) placeholder = SC.EMPTY_PLACEHOLDER;
936
+ return this.from(fromPath).transform(function (value, isForward) {
937
+ if (SC.none(value)) value = placeholder;
938
+ return value;
939
+ });
871
940
  },
872
941
 
873
942
  /**
@@ -877,11 +946,12 @@ SC.Binding = /** @scope SC.Binding.prototype */{
877
946
  @param {String} [fromPath]
878
947
  @returns {SC.Binding} this
879
948
  */
880
- multiple: function(fromPath) {
881
- return this.from(fromPath).transform(function(value) {
882
- if (!SC.isArray(value)) value = (value == null) ? [] : [value] ;
883
- return value ;
884
- }) ;
949
+ multiple: function (fromPath) {
950
+ return this.from(fromPath).transform(function (value) {
951
+ /*jshint eqnull:true*/
952
+ if (!SC.isArray(value)) value = (value == null) ? [] : [value];
953
+ return value;
954
+ });
885
955
  },
886
956
 
887
957
  /**
@@ -892,12 +962,12 @@ SC.Binding = /** @scope SC.Binding.prototype */{
892
962
  @param {String} [fromPath]
893
963
  @returns {SC.Binding} this
894
964
  */
895
- bool: function(fromPath) {
896
- return this.from(fromPath).transform(function(v) {
897
- var t = SC.typeOf(v) ;
898
- if (t === SC.T_ERROR) return v ;
899
- return (t == SC.T_ARRAY) ? (v.length > 0) : (v === '') ? NO : !!v ;
900
- }) ;
965
+ bool: function (fromPath) {
966
+ return this.from(fromPath).transform(function (v) {
967
+ var t = SC.typeOf(v);
968
+ if (t === SC.T_ERROR) return v;
969
+ return (t == SC.T_ARRAY) ? (v.length > 0) : (v === '') ? NO : !!v;
970
+ });
901
971
  },
902
972
 
903
973
  /**
@@ -917,14 +987,14 @@ SC.Binding = /** @scope SC.Binding.prototype */{
917
987
  @param {String} pathA The first part of the conditional
918
988
  @param {String} pathB The second part of the conditional
919
989
  */
920
- and: function(pathA, pathB) {
990
+ and: function (pathA, pathB) {
921
991
 
922
992
  // create an object to do the logical computation
923
993
  var gate = SC.Object.create({
924
994
  valueABinding: pathA,
925
995
  valueBBinding: pathB,
926
996
 
927
- and: function() {
997
+ and: function () {
928
998
  return (this.get('valueA') && this.get('valueB'));
929
999
  }.property('valueA', 'valueB').cacheable()
930
1000
  });
@@ -943,14 +1013,14 @@ SC.Binding = /** @scope SC.Binding.prototype */{
943
1013
  @param {String} pathA The first part of the conditional
944
1014
  @param {String} pathB The second part of the conditional
945
1015
  */
946
- or: function(pathA, pathB) {
1016
+ or: function (pathA, pathB) {
947
1017
 
948
1018
  // create an object to the logical computation
949
1019
  var gate = SC.Object.create({
950
1020
  valueABinding: pathA,
951
1021
  valueBBinding: pathB,
952
1022
 
953
- or: function() {
1023
+ or: function () {
954
1024
  return (this.get('valueA') || this.get('valueB'));
955
1025
  }.property('valueA', 'valueB').cacheable()
956
1026
  });
@@ -965,12 +1035,12 @@ SC.Binding = /** @scope SC.Binding.prototype */{
965
1035
  @param {String} [fromPath]
966
1036
  @returns {SC.Binding} this
967
1037
  */
968
- not: function(fromPath) {
969
- return this.from(fromPath).transform(function(v) {
970
- var t = SC.typeOf(v) ;
971
- if (t === SC.T_ERROR) return v ;
972
- return !((t == SC.T_ARRAY) ? (v.length > 0) : (v === '') ? NO : !!v) ;
973
- }) ;
1038
+ not: function (fromPath) {
1039
+ return this.from(fromPath).transform(function (v) {
1040
+ var t = SC.typeOf(v);
1041
+ if (t === SC.T_ERROR) return v;
1042
+ return !((t == SC.T_ARRAY) ? (v.length > 0) : (v === '') ? NO : !!v);
1043
+ });
974
1044
  },
975
1045
 
976
1046
  /**
@@ -979,27 +1049,27 @@ SC.Binding = /** @scope SC.Binding.prototype */{
979
1049
  @param {String} [fromPath]
980
1050
  @returns {SC.Binding} this
981
1051
  */
982
- isNull: function(fromPath) {
983
- return this.from(fromPath).transform(function(v) {
984
- var t = SC.typeOf(v) ;
985
- return (t === SC.T_ERROR) ? v : SC.none(v) ;
1052
+ isNull: function (fromPath) {
1053
+ return this.from(fromPath).transform(function (v) {
1054
+ var t = SC.typeOf(v);
1055
+ return (t === SC.T_ERROR) ? v : SC.none(v);
986
1056
  });
987
1057
  },
988
1058
 
989
- toString: function() {
990
- var from = this._fromRoot ? "<%@>:%@".fmt(this._fromRoot,this._fromPropertyPath) : this._fromPropertyPath;
1059
+ toString: function () {
1060
+ var from = this._fromRoot ? "<%@>:%@".fmt(this._fromRoot, this._fromPropertyPath) : this._fromPropertyPath;
991
1061
 
992
- var to = this._toRoot ? "<%@>:%@".fmt(this._toRoot,this._toPropertyPath) : this._toPropertyPath;
1062
+ var to = this._toRoot ? "<%@>:%@".fmt(this._toRoot, this._toPropertyPath) : this._toPropertyPath;
993
1063
 
994
1064
  var oneWay = this._oneWay ? '[oneWay]' : '';
995
1065
  return "SC.Binding%@(%@ -> %@)%@".fmt(SC.guidFor(this), from, to, oneWay);
996
1066
  }
997
- } ;
1067
+ };
998
1068
 
999
1069
  /**
1000
1070
  Shorthand method to define a binding. This is the same as calling:
1001
1071
 
1002
1072
  SC.binding(path) = SC.Binding.from(path)
1003
1073
  */
1004
- SC.binding = function(path, root) { return SC.Binding.from(path,root); } ;
1074
+ SC.binding = function (path, root) { return SC.Binding.from(path, root); };
1005
1075