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
@@ -11,41 +11,41 @@ sc_require('panes/panel');
11
11
  Displays a non-modal, default positioned, drag&drop-able palette pane.
12
12
 
13
13
  The default way to use the palette pane is to simply add it to your page like this:
14
-
14
+
15
15
  SC.PalettePane.create({
16
16
  layout: { width: 400, height: 200, right: 0, top: 0 },
17
17
  contentView: SC.View.extend({
18
18
  })
19
19
  }).append();
20
-
20
+
21
21
  This will cause your palette pane to display.
22
-
23
- Palette pane is a simple way to provide non-modal messaging that won't
24
- blocks the user's interaction with your application. Palette panes are
22
+
23
+ Palette pane is a simple way to provide non-modal messaging that won't
24
+ blocks the user's interaction with your application. Palette panes are
25
25
  useful for showing important detail information with flexible position.
26
26
  They provide a better user experience than modal panel.
27
-
27
+
28
28
  @extends SC.PanelPane
29
29
  @since SproutCore 1.0
30
30
  */
31
31
  SC.PalettePane = SC.PanelPane.extend(
32
32
  /** @scope SC.PalettePane.prototype */ {
33
-
33
+
34
34
  /**
35
35
  @type Array
36
36
  @default ['sc-palette']
37
37
  @see SC.View#classNames
38
38
  */
39
39
  classNames: ['sc-palette'],
40
-
40
+
41
41
  /**
42
42
  Palettes are not modal by default
43
-
43
+
44
44
  @type Boolean
45
45
  @default NO
46
46
  */
47
47
  isModal: NO,
48
-
48
+
49
49
  /**
50
50
  @type SC.View
51
51
  @default SC.ModalPane
@@ -57,7 +57,7 @@ SC.PalettePane = SC.PanelPane.extend(
57
57
  @default NO
58
58
  */
59
59
  isAnchored: NO,
60
-
60
+
61
61
  /** @private */
62
62
  _mouseOffsetX: null,
63
63
 
@@ -82,12 +82,12 @@ SC.PalettePane = SC.PanelPane.extend(
82
82
  }
83
83
  return YES;
84
84
  },
85
-
85
+
86
86
  /** @private */
87
87
  touchStart: function(evt){
88
88
  return this.mouseDown(evt);
89
89
  },
90
-
90
+
91
91
  /** @private */
92
92
  touchesDragged: function(evt){
93
93
  return this.mouseDragged(evt);
@@ -9,19 +9,19 @@ sc_require('panes/modal');
9
9
 
10
10
  /** @class
11
11
 
12
- Most SproutCore applications need modal panels. The default way to use the
12
+ Most SproutCore applications need modal panels. The default way to use the
13
13
  panel pane is to simply add it to your page like this:
14
-
14
+
15
15
  SC.PanelPane.create({
16
16
  layout: { width: 400, height: 200, centerX: 0, centerY: 0 },
17
17
  contentView: SC.View.extend({
18
18
  })
19
19
  }).append();
20
-
21
- This will cause your panel to display. The default layout for a Panel
22
- is to cover the entire document window with a semi-opaque background, and to
20
+
21
+ This will cause your panel to display. The default layout for a Panel
22
+ is to cover the entire document window with a semi-opaque background, and to
23
23
  resize with the window.
24
-
24
+
25
25
  @extends SC.Pane
26
26
  @author Erich Ocean
27
27
  @since SproutCore 1.0
@@ -41,7 +41,7 @@ SC.PanelPane = SC.Pane.extend(
41
41
  @see SC.View#classNames
42
42
  */
43
43
  classNames: ['sc-panel'],
44
-
44
+
45
45
  /**
46
46
  @type Boolean
47
47
  @default YES
@@ -87,7 +87,7 @@ SC.PanelPane = SC.Pane.extend(
87
87
  Indicates that a pane is modal and should not allow clicks to pass
88
88
  though to panes underneath it. This will usually cause the pane to show
89
89
  the modalPane underneath it.
90
-
90
+
91
91
  @type Boolean
92
92
  @default YES
93
93
  */
@@ -100,20 +100,20 @@ SC.PanelPane = SC.Pane.extend(
100
100
  modalPane: SC.ModalPane.extend({
101
101
  classNames: 'for-sc-panel'
102
102
  }),
103
-
103
+
104
104
  // ..........................................................
105
105
  // CONTENT VIEW
106
- //
107
-
106
+ //
107
+
108
108
  /**
109
109
  Set this to the view you want to act as the content within the panel.
110
-
110
+
111
111
  @type SC.View
112
112
  @default null
113
113
  */
114
114
  contentView: null,
115
115
  contentViewBindingDefault: SC.Binding.single(),
116
-
116
+
117
117
  /**
118
118
  @param {SC.View} newContent
119
119
  */
@@ -132,7 +132,7 @@ SC.PanelPane = SC.Pane.extend(
132
132
  }
133
133
  },
134
134
 
135
-
135
+
136
136
  /**
137
137
  Invoked whenever the content property changes. This method will simply
138
138
  call replaceContent. Override replaceContent to change how the view is
@@ -154,19 +154,19 @@ SC.PanelPane = SC.Pane.extend(
154
154
  */
155
155
  renderDelegateName: 'panelRenderDelegate',
156
156
 
157
- // get the modal pane.
157
+ // get the modal pane.
158
158
  _modalPane: function() {
159
159
  var pane = this.get('modalPane');
160
-
160
+
161
161
  // instantiate if needed
162
162
  if (pane && pane.isClass) {
163
163
  pane = pane.create({ owner: this });
164
- this.set('modalPane', pane);
164
+ this.set('modalPane', pane);
165
165
  }
166
-
166
+
167
167
  return pane ;
168
168
  },
169
-
169
+
170
170
  /** @private - whenever showing on screen, deal with modal pane as well */
171
171
  appendTo: function(elem) {
172
172
  var pane ;
@@ -176,11 +176,11 @@ SC.PanelPane = SC.Pane.extend(
176
176
  }
177
177
  return sc_super();
178
178
  },
179
-
179
+
180
180
  /** @private - when removing from screen, deal with modal pane as well. */
181
181
  remove: function() {
182
182
  var pane, ret = sc_super();
183
-
183
+
184
184
  if (this._isShowingModal) {
185
185
  this._isShowingModal = NO ;
186
186
  if (pane = this._modalPane()) pane.paneDidRemove(this);
@@ -196,7 +196,7 @@ SC.PanelPane = SC.Pane.extend(
196
196
 
197
197
  sc_super();
198
198
  },
199
-
199
+
200
200
  /** @private - if isModal state changes, update pane state if needed. */
201
201
  _isModalDidChange: function() {
202
202
  var pane, isModal = this.get('isModal');
@@ -205,21 +205,43 @@ SC.PanelPane = SC.Pane.extend(
205
205
  this._isShowingModal = YES;
206
206
  pane.paneWillAppend(this);
207
207
  }
208
-
208
+
209
209
  } else {
210
210
  if (this._isShowingModal && (pane = this._modalPane())) {
211
211
  this._isShowingModal = NO ;
212
- pane.paneDidRemove(this);
212
+ pane.paneDidRemove(this);
213
213
  }
214
214
  }
215
215
  }.observes('isModal'),
216
-
217
- /** @private - extends SC.Pane's method - make panel keyPane when shown */
218
- paneDidAttach: function() {
219
- var ret = sc_super();
216
+
217
+ /**
218
+ Called when the pane is shown. Takes on key pane status.
219
+ */
220
+ didShowInDocument: function () {
221
+ this.becomeKeyPane();
222
+ },
223
+
224
+ /**
225
+ Called when the pane is attached. Takes on key pane status.
226
+ */
227
+ didAppendToDocument: function () {
220
228
  this.becomeKeyPane();
221
- return ret ;
229
+ },
230
+
231
+ /**
232
+ Called when the pane is detached. Resigns key pane status.
233
+ */
234
+ willRemoveFromDocument: function () {
235
+ this.resignKeyPane();
236
+ },
237
+
238
+ /**
239
+ Called when the pane is about to be hidden. Resigns key pane status.
240
+ */
241
+ willHideInDocument: function () {
242
+ this.resignKeyPane();
222
243
  },
223
244
 
224
245
  displayProperties: ['ariaLabel', 'ariaLabelledBy', 'ariaDescribedBy']
246
+
225
247
  });
@@ -12,13 +12,13 @@ sc_require('panes/palette');
12
12
  default: initiated just below the anchor.
13
13
  shift x, y to optimized picker visibility and make sure top-left corner is always visible.
14
14
  menu : same as default rule +
15
- default(1,4,3) or custom offset below the anchor for default location to fine tuned visual alignment +
15
+ default(1, 4, 3) or custom offset below the anchor for default location to fine tuned visual alignment +
16
16
  enforce min left(7px)/right(8px) padding to the window
17
- fixed : default(1,4,3) or custom offset below the anchor for default location to cope with specific anchor and skip fitPositionToScreen
18
- pointer :take default [0,1,2,3,2] or custom matrix to choose one of four perfect pointer positions.Ex:
17
+ fixed : default(1, 4, 3) or custom offset below the anchor for default location to cope with specific anchor and skip fitPositionToScreen
18
+ pointer :take default [0, 1, 2, 3, 2] or custom matrix to choose one of four perfect pointer positions.Ex:
19
19
  perfect right (0) > perfect left (1) > perfect top (2) > perfect bottom (3)
20
20
  fallback to perfect top (2)
21
- menu-pointer :take default [3,0,1,2,3] or custom matrix to choose one of four perfect pointer positions.Ex:
21
+ menu-pointer :take default [3, 0, 1, 2, 3] or custom matrix to choose one of four perfect pointer positions.Ex:
22
22
  perfect bottom (3) > perfect right (0) > perfect left (1) > perfect top (2)
23
23
  fallback to perfect bottom (3)
24
24
  */
@@ -166,35 +166,35 @@ SC.POINTER_LAYOUT = ["perfectRight", "perfectLeft", "perfectTop", "perfectBottom
166
166
  contentView: SC.View.extend({})
167
167
  }).popup(anchor);
168
168
 
169
- ### menu below the anchor with default `preferMatrix` of `[1,4,3]`:
169
+ ### menu below the anchor with default `preferMatrix` of `[1, 4, 3]`:
170
170
 
171
171
  SC.PickerPane.create({
172
172
  layout: { width: 400, height: 200 },
173
173
  contentView: SC.View.extend({})
174
174
  }).popup(anchor, SC.PICKER_MENU);
175
175
 
176
- ### menu on the right side of anchor with custom `preferMatrix` of `[2,6,0]`:
176
+ ### menu on the right side of anchor with custom `preferMatrix` of `[2, 6, 0]`:
177
177
 
178
178
  SC.PickerPane.create({
179
179
  layout: { width: 400, height: 200 },
180
180
  contentView: SC.View.extend({})
181
- }).popup(anchor, SC.PICKER_MENU, [2,6,0]);
181
+ }).popup(anchor, SC.PICKER_MENU, [2, 6, 0]);
182
182
 
183
- ### fixed below the anchor with default `preferMatrix` of `[1,4,3]`:
183
+ ### fixed below the anchor with default `preferMatrix` of `[1, 4, 3]`:
184
184
 
185
185
  SC.PickerPane.create({
186
186
  layout: { width: 400, height: 200 },
187
187
  contentView: SC.View.extend({})
188
188
  }).popup(anchor, SC.PICKER_FIXED);
189
189
 
190
- ### fixed on the right side of anchor with `preferMatrix` of `[-22,-17,0]`:
190
+ ### fixed on the right side of anchor with `preferMatrix` of `[-22,-17, 0]`:
191
191
 
192
192
  SC.PickerPane.create({
193
193
  layout: { width: 400, height: 200 },
194
194
  contentView: SC.View.extend({})
195
- }).popup(anchor, SC.PICKER_FIXED, [-22,-17,0]);
195
+ }).popup(anchor, SC.PICKER_FIXED, [-22,-17, 0]);
196
196
 
197
- ### pointer with default `preferMatrix` of `[0,1,2,3,2]`:
197
+ ### pointer with default `preferMatrix` of `[0, 1, 2, 3, 2]`:
198
198
 
199
199
  SC.PickerPane.create({
200
200
  layout: { width: 400, height: 200 },
@@ -203,16 +203,16 @@ SC.POINTER_LAYOUT = ["perfectRight", "perfectLeft", "perfectTop", "perfectBottom
203
203
 
204
204
  Positioning: right (0) > left (1) > top (2) > bottom (3). Fallback to top (2).
205
205
 
206
- ### pointer with custom `preferMatrix` of `[3,0,1,2,2]`:
206
+ ### pointer with custom `preferMatrix` of `[3, 0, 1, 2, 2]`:
207
207
 
208
208
  SC.PickerPane.create({
209
209
  layout: { width: 400, height: 200 },
210
210
  contentView: SC.View.extend({})
211
- }).popup(anchor, SC.PICKER_POINTER, [3,0,1,2,2]);
211
+ }).popup(anchor, SC.PICKER_POINTER, [3, 0, 1, 2, 2]);
212
212
 
213
213
  Positioning: bottom (3) > right (0) > left (1) > top (2). Fallback to top (2).
214
214
 
215
- ### menu-pointer with default `preferMatrix` of `[3,0,1,2,3]`:
215
+ ### menu-pointer with default `preferMatrix` of `[3, 0, 1, 2, 3]`:
216
216
 
217
217
  SC.PickerPane.create({
218
218
  layout: { width: 400, height: 200 },
@@ -246,25 +246,25 @@ SC.PickerPane = SC.PalettePane.extend(
246
246
  */
247
247
  isModal: YES,
248
248
 
249
- /**
249
+ /** @private
250
250
  @type String
251
251
  @default 'perfectRight'
252
252
  */
253
253
  pointerPos: 'perfectRight',
254
254
 
255
- /**
255
+ /** @private
256
256
  @type Number
257
257
  @default 0
258
258
  */
259
259
  pointerPosX: 0,
260
260
 
261
- /**
261
+ /** @private
262
262
  @type Number
263
263
  @default 0
264
264
  */
265
265
  pointerPosY: 0,
266
266
 
267
- /**
267
+ /** @private
268
268
  This property will be set to the element (or view.get('layer')) that
269
269
  triggered your picker to show. You can use this to properly position your
270
270
  picker.
@@ -272,7 +272,30 @@ SC.PickerPane = SC.PalettePane.extend(
272
272
  @type HTMLElement
273
273
  @default null
274
274
  */
275
- anchorElement: null,
275
+ anchorElement: function (key, value) {
276
+ var anchorView;
277
+
278
+ if (value === undefined) {
279
+ // Getting the value.
280
+ anchorView = this._anchorView;
281
+ return anchorView ? anchorView.get('layer') : this._anchorHTMLElement;
282
+ } else {
283
+ // Setting the value.
284
+ if (!value) {
285
+ throw "You must set 'anchorElement' to either a view or a DOM element";
286
+ }
287
+ else if (value.isView) {
288
+ this._anchorView = value;
289
+ this._anchorHTMLElement = null;
290
+ }
291
+ else {
292
+ this._anchorView = null;
293
+ this._anchorHTMLElement = value;
294
+ }
295
+
296
+ return value;
297
+ }
298
+ }.property('layer').cacheable(),
276
299
 
277
300
  /** @private
278
301
  anchor rect calculated by computeAnchorRect from init popup
@@ -306,13 +329,19 @@ SC.PickerPane = SC.PalettePane.extend(
306
329
  */
307
330
  pointerOffset: null,
308
331
 
309
- /**
332
+ /** @deprecated Version 1.10. Use windowPadding instead.
310
333
  default offset of extra-right pointer for picker-pointer or pointer-menu
311
334
 
312
335
  @type Number
313
336
  @default 0
314
337
  */
315
- extraRightOffset: 0,
338
+ extraRightOffset: function () {
339
+ //@if (debug)
340
+ SC.warn('SC.PickerPane#extraRightOffset is deprecated. The pointer will position itself automatically.');
341
+ //@endif
342
+
343
+ return this.get('windowPadding');
344
+ }.property('windowPadding').cacheable(),
316
345
 
317
346
  /**
318
347
  The target object to invoke the remove action on when the user clicks off the
@@ -357,8 +386,24 @@ SC.PickerPane = SC.PalettePane.extend(
357
386
  */
358
387
  repositionOnWindowResize: YES,
359
388
 
360
- _anchorView: null,
361
- _anchorHTMLElement: null,
389
+
390
+ /** @private
391
+ Default padding around the window's edge that the pane will not overlap.
392
+
393
+ This value is set to the value of SC.PickerPane.WINDOW_PADDING, except when
394
+ using preferType of SC.PICKER_MENU_POINTER, where it will be set according
395
+ to the `controlSize` value of the pane to one of:
396
+
397
+ SC.PickerPane.TINY_MENU_WINDOW_PADDING
398
+ SC.PickerPane.SMALL_MENU_WINDOW_PADDING
399
+ SC.PickerPane.REGULAR_MENU_WINDOW_PADDING
400
+ SC.PickerPane.LARGE_MENU_WINDOW_PADDING
401
+ SC.PickerPane.HUGE_MENU_WINDOW_PADDING
402
+
403
+ @type Number
404
+ @default SC.PickerPane.WINDOW_PADDING
405
+ */
406
+ windowPadding: null,
362
407
 
363
408
  /**
364
409
  Displays a new picker pane.
@@ -369,8 +414,8 @@ SC.PickerPane = SC.PalettePane.extend(
369
414
  @param {Number} [pointerOffset]
370
415
  @returns {SC.PickerPane} receiver
371
416
  */
372
- popup: function(anchorViewOrElement, preferType, preferMatrix, pointerOffset) {
373
- if(anchorViewOrElement){
417
+ popup: function (anchorViewOrElement, preferType, preferMatrix, pointerOffset) {
418
+ if (anchorViewOrElement) {
374
419
  if (anchorViewOrElement.isView) {
375
420
  this._anchorView = anchorViewOrElement;
376
421
  this._setupScrollObservers(anchorViewOrElement);
@@ -379,9 +424,9 @@ SC.PickerPane = SC.PalettePane.extend(
379
424
  }
380
425
  }
381
426
  this.beginPropertyChanges();
382
- if (preferType) this.set('preferType',preferType) ;
383
- if (preferMatrix) this.set('preferMatrix',preferMatrix) ;
384
- if (pointerOffset) this.set('pointerOffset',pointerOffset) ;
427
+ if (preferType) { this.set('preferType', preferType); }
428
+ if (preferMatrix) { this.set('preferMatrix', preferMatrix); }
429
+ if (pointerOffset) { this.set('pointerOffset', pointerOffset); }
385
430
  this.endPropertyChanges();
386
431
  this.positionPane();
387
432
  this._hideOverflow();
@@ -394,59 +439,80 @@ SC.PickerPane = SC.PalettePane.extend(
394
439
  then call fitPositionToScreen to get final position. If anchor is missing,
395
440
  fallback to center.
396
441
  */
397
- positionPane: function(useAnchorCached) {
442
+ positionPane: function (useAnchorCached) {
398
443
  useAnchorCached = useAnchorCached && this.get('anchorCached');
399
444
 
400
445
  var anchor = useAnchorCached ? this.get('anchorCached') : this.get('anchorElement'),
446
+ frame = this.get('borderFrame'),
401
447
  preferType = this.get('preferType'),
402
448
  preferMatrix = this.get('preferMatrix'),
403
449
  layout = this.get('layout'),
404
450
  origin;
405
451
 
406
-
407
452
  // usually an anchorElement will be passed. The ideal position is just
408
453
  // below the anchor + default or custom offset according to preferType.
409
454
  // If that is not possible, fitPositionToScreen will take care of that for
410
455
  // other alternative and fallback position.
411
456
 
412
457
  if (anchor) {
413
- if(!useAnchorCached) {
458
+ if (!useAnchorCached) {
414
459
  anchor = this.computeAnchorRect(anchor);
415
- this.set('anchorCached', anchor) ;
460
+ this.set('anchorCached', anchor);
416
461
  }
417
- if(anchor.x ===0 && anchor.y ===0) return ;
462
+
463
+ if (anchor.x === 0 && anchor.y === 0) { return; }
464
+
418
465
  origin = SC.cloneRect(anchor);
419
466
 
420
467
  if (preferType) {
421
468
  switch (preferType) {
422
- case SC.PICKER_MENU:
423
- case SC.PICKER_FIXED:
424
- if(!preferMatrix || preferMatrix.length !== 3) {
425
- // default below the anchor with fine-tuned visual alignment
426
- // for Menu to appear just below the anchorElement.
427
- this.set('preferMatrix', [1, 4, 3]) ;
428
- }
429
-
430
- // fine-tuned visual alignment from preferMatrix
431
- origin.x += ((this.preferMatrix[2]===0) ? origin.width : 0) + this.preferMatrix[0] ;
432
- origin.y += ((this.preferMatrix[2]===3) ? origin.height : 0) + this.preferMatrix[1];
433
- break;
434
- default:
435
- origin.y += origin.height ;
436
- break;
469
+ case SC.PICKER_MENU:
470
+ case SC.PICKER_FIXED:
471
+ if (!preferMatrix || preferMatrix.length !== 3) {
472
+ // default below the anchor with fine-tuned visual alignment
473
+ // for Menu to appear just below the anchorElement.
474
+ this.set('preferMatrix', [1, 4, 3]);
475
+ }
476
+
477
+ // fine-tuned visual alignment from preferMatrix
478
+ origin.x += ((this.preferMatrix[2] === 0) ? origin.width : 0) + this.preferMatrix[0];
479
+ origin.y += ((this.preferMatrix[2] === 3) ? origin.height : 0) + this.preferMatrix[1];
480
+ break;
481
+ default:
482
+ origin.y += origin.height;
483
+ break;
437
484
  }
438
485
  } else {
439
- origin.y += origin.height ;
486
+ origin.y += origin.height;
440
487
  }
441
- origin = this.fitPositionToScreen(origin, this.get('frame'), anchor) ;
442
488
 
443
- this.adjust({ width: origin.width, height: origin.height, left: origin.x, top: origin.y });
489
+ // Since we repeatedly need to know the half-width and half-height of the
490
+ // frames, add those properties.
491
+ anchor.halfWidth = parseInt(anchor.width * 0.5, 0);
492
+ anchor.halfHeight = parseInt(anchor.height * 0.5, 0);
493
+ frame.halfWidth = parseInt(frame.width * 0.5, 0);
494
+ frame.halfHeight = parseInt(frame.height * 0.5, 0);
495
+
496
+ origin = this.fitPositionToScreen(origin, frame, anchor);
497
+
498
+ this.adjust({
499
+ width: origin.width,
500
+ height: origin.height,
501
+ left: origin.x,
502
+ top: origin.y
503
+ });
444
504
  // if no anchor view has been set for some reason, just center.
445
505
  } else {
446
- this.adjust({ width: layout.width, height: layout.height, centerX: 0, centerY: 0 });
506
+ this.adjust({
507
+ width: layout.width,
508
+ height: layout.height,
509
+ centerX: 0,
510
+ centerY: 0
511
+ });
447
512
  }
448
513
  this.updateLayout();
449
- return this ;
514
+
515
+ return this;
450
516
  },
451
517
 
452
518
  /** @private
@@ -455,7 +521,7 @@ SC.PickerPane = SC.PalettePane.extend(
455
521
  up to window bottom only. We do have 'clippingFrame' supported from view.
456
522
  But since our anchor can be element, we use this solution for now.
457
523
  */
458
- computeAnchorRect: function(anchor) {
524
+ computeAnchorRect: function (anchor) {
459
525
  var bounding, ret, cq,
460
526
  wsize = SC.RootResponder.responder.computeWindowSize();
461
527
  // Some browsers natively implement getBoundingClientRect, so if it's
@@ -470,105 +536,106 @@ SC.PickerPane = SC.PalettePane.extend(
470
536
  width: bounding.width,
471
537
  height: bounding.height
472
538
  };
473
- // If width and height are undefined this means we are in IE or FF<3.5
539
+ // If width and height are undefined this means we are in IE or FF < 3.5
474
540
  // if we did not get the frame dimensions the do the calculations
475
541
  // based on an element
476
- if(ret.width===undefined || ret.height===undefined){
542
+ if (ret.width === undefined || ret.height === undefined) {
477
543
  cq = SC.$(anchor);
478
544
  ret.width = cq.outerWidth();
479
545
  ret.height = cq.outerHeight();
480
546
  }
481
- }
482
- else {
547
+ } else {
483
548
  // Only really old versions will have to go through this code path.
484
549
  ret = SC.offset(anchor); // get x & y
485
550
  cq = SC.$(anchor);
486
551
  ret.width = cq.outerWidth();
487
552
  ret.height = cq.outerHeight();
488
553
  }
489
- ret.height = (wsize.height-ret.y) < ret.height ? (wsize.height-ret.y) : ret.height;
490
- if(!SC.browser.isIE && window.scrollX>0 || window.scrollY>0){
491
- ret.x+=window.scrollX;
492
- ret.y+=window.scrollY;
493
- }else if(SC.browser.isIE && (document.documentElement.scrollTop>0 || document.documentElement.scrollLeft>0)){
494
- ret.x+=document.documentElement.scrollLeft;
495
- ret.y+=document.documentElement.scrollTop;
554
+ ret.height = (wsize.height - ret.y) < ret.height ? (wsize.height - ret.y) : ret.height;
555
+
556
+ if (!SC.browser.isIE && window.scrollX > 0 || window.scrollY > 0) {
557
+ ret.x += window.scrollX;
558
+ ret.y += window.scrollY;
559
+ } else if (SC.browser.isIE && (document.documentElement.scrollTop > 0 || document.documentElement.scrollLeft > 0)) {
560
+ ret.x += document.documentElement.scrollLeft;
561
+ ret.y += document.documentElement.scrollTop;
496
562
  }
497
- return ret ;
563
+ return ret;
498
564
  },
499
565
 
500
566
  /** @private
501
567
  This method will dispatch to the right re-position rule according to preferType
502
568
  */
503
- fitPositionToScreen: function(preferredPosition, picker, anchor) {
504
- // get window rect.
505
- //if(this._prefPosX && this._prefPosY)
506
-
569
+ fitPositionToScreen: function (preferredPosition, picker, anchor) {
507
570
  var wsize = SC.RootResponder.responder.computeWindowSize(),
508
- wret = { x: 0, y: 0, width: wsize.width, height: wsize.height } ;
571
+ wret = { x: 0, y: 0, width: wsize.width, height: wsize.height };
509
572
 
510
573
  // if window size is smaller than the minimum size of app, use minimum size.
511
574
  var mainPane = SC.RootResponder.responder.mainPane;
512
575
  if (mainPane) {
513
576
  var minWidth = mainPane.layout.minWidth,
514
577
  minHeight = mainPane.layout.minHeight;
578
+
515
579
  if (minWidth && wret.width < minWidth) {
516
580
  wret.width = mainPane.layout.minWidth;
517
581
  }
582
+
518
583
  if (minHeight && wret.height < minHeight) {
519
584
  wret.height = mainPane.layout.minHeight;
520
585
  }
521
586
  }
522
587
 
523
- picker.x = preferredPosition.x ; picker.y = preferredPosition.y ;
524
-
525
- if(this.preferType) {
526
- switch(this.preferType) {
527
- case SC.PICKER_MENU:
528
- // apply menu re-position rule
529
- picker = this.fitPositionToScreenMenu(wret, picker, this.get('isSubMenu')) ;
530
- break;
531
- case SC.PICKER_MENU_POINTER:
532
- this.setupPointer(anchor);
533
- picker = this.fitPositionToScreenMenuPointer(wret, picker, anchor);
534
- break;
535
- case SC.PICKER_POINTER:
536
- // apply pointer re-position rule
537
- this.setupPointer(anchor);
538
- picker = this.fitPositionToScreenPointer(wret, picker, anchor) ;
539
- break;
540
-
541
- case SC.PICKER_FIXED:
542
- // skip fitPositionToScreen
543
- break;
544
- default:
545
- break;
588
+ picker.x = preferredPosition.x;
589
+ picker.y = preferredPosition.y;
590
+
591
+ if (this.preferType) {
592
+ switch (this.preferType) {
593
+ case SC.PICKER_MENU:
594
+ // apply menu re-position rule
595
+ picker = this.fitPositionToScreenMenu(wret, picker, this.get('isSubMenu'));
596
+ break;
597
+ case SC.PICKER_MENU_POINTER:
598
+ this.setupPointer(anchor);
599
+ picker = this.fitPositionToScreenMenuPointer(wret, picker, anchor);
600
+ break;
601
+ case SC.PICKER_POINTER:
602
+ // apply pointer re-position rule
603
+ this.setupPointer(anchor);
604
+ picker = this.fitPositionToScreenPointer(wret, picker, anchor);
605
+ break;
606
+ case SC.PICKER_FIXED:
607
+ // skip fitPositionToScreen
608
+ break;
609
+ default:
610
+ break;
546
611
  }
547
612
  } else {
548
613
  // apply default re-position rule
549
- picker = this.fitPositionToScreenDefault(wret, picker, anchor) ;
614
+ picker = this.fitPositionToScreenDefault(wret, picker, anchor);
550
615
  }
551
- this.displayDidChange();
552
- return picker ;
616
+ // this.displayDidChange();
617
+ return picker;
553
618
  },
554
619
 
555
620
  /** @private
556
621
  re-position rule migrated from old SC.OverlayPaneView.
557
622
  shift x, y to optimized picker visibility and make sure top-left corner is always visible.
558
623
  */
559
- fitPositionToScreenDefault: function(w, f, a) {
624
+ fitPositionToScreenDefault: function (w, f, a) {
625
+ var mx;
626
+
560
627
  // make sure the right edge fits on the screen. If not, anchor to
561
628
  // right edge of anchor or right edge of window, whichever is closer.
562
629
  if (SC.maxX(f) > w.width) {
563
- var mx = Math.max(SC.maxX(a), f.width) ;
564
- f.x = Math.min(mx, w.width) - f.width ;
630
+ mx = Math.max(SC.maxX(a), f.width);
631
+ f.x = Math.min(mx, w.width) - f.width;
565
632
  }
566
633
 
567
634
  // if the left edge is off of the screen, try to position at left edge
568
635
  // of anchor. If that pushes right edge off screen, shift back until
569
636
  // right is on screen or left = 0
570
637
  if (SC.minX(f) < 0) {
571
- f.x = SC.minX(Math.max(a,0)) ;
638
+ f.x = SC.minX(Math.max(a, 0));
572
639
  if (SC.maxX(f) > w.width) {
573
640
  f.x = Math.max(0, w.width - f.width);
574
641
  }
@@ -577,19 +644,19 @@ SC.PickerPane = SC.PalettePane.extend(
577
644
  // make sure bottom edge fits on screen. If not, try to anchor to top
578
645
  // of anchor or bottom edge of screen.
579
646
  if (SC.maxY(f) > w.height) {
580
- mx = Math.max((a.y - f.height), 0) ;
647
+ mx = Math.max((a.y - f.height), 0);
581
648
  if (mx > w.height) {
582
- f.y = Math.max(0, w.height - f.height) ;
583
- } else f.y = mx ;
649
+ f.y = Math.max(0, w.height - f.height);
650
+ } else { f.y = mx; }
584
651
  }
585
652
 
586
653
  // if Top edge is off screen, try to anchor to bottom of anchor. If that
587
654
  // pushes off bottom edge, shift up until it is back on screen or top =0
588
655
  if (SC.minY(f) < 0) {
589
- mx = Math.min(SC.maxY(a), (w.height - a.height)) ;
590
- f.y = Math.max(mx, 0) ;
656
+ mx = Math.min(SC.maxY(a), (w.height - a.height));
657
+ f.y = Math.max(mx, 0);
591
658
  }
592
- return f ;
659
+ return f;
593
660
  },
594
661
 
595
662
  /** @private
@@ -601,20 +668,19 @@ SC.PickerPane = SC.PalettePane.extend(
601
668
  If the menu is a submenu, we also want to reposition the pane to the left
602
669
  of the parent menu if it would otherwise exceed the width of the viewport.
603
670
  */
604
- fitPositionToScreenMenu: function(windowFrame, paneFrame, subMenu) {
605
-
671
+ fitPositionToScreenMenu: function (windowFrame, paneFrame, subMenu) {
606
672
  // Set up init location for submenu
607
673
  if (subMenu) {
608
674
  paneFrame.x -= this.get('submenuOffsetX');
609
- paneFrame.y -= Math.floor(this.get('menuHeightPadding')/2);
675
+ paneFrame.y -= Math.floor(this.get('menuHeightPadding') / 2);
610
676
  }
611
677
 
612
678
  // If the right edge of the pane is within 20 pixels of the right edge
613
679
  // of the window, we need to reposition it.
614
- if( (paneFrame.x + paneFrame.width) > (windowFrame.width-20) ) {
680
+ if ((paneFrame.x + paneFrame.width) > (windowFrame.width - 20)) {
615
681
  if (subMenu) {
616
682
  // Submenus should be re-anchored to the left of the parent menu
617
- paneFrame.x = paneFrame.x - (paneFrame.width*2);
683
+ paneFrame.x = paneFrame.x - (paneFrame.width * 2);
618
684
  } else {
619
685
  // Otherwise, just position the pane 20 pixels from the right edge
620
686
  paneFrame.x = windowFrame.width - paneFrame.width - 20;
@@ -622,7 +688,7 @@ SC.PickerPane = SC.PalettePane.extend(
622
688
  }
623
689
 
624
690
  // Make sure we are at least 7 pixels from the left edge of the screen.
625
- if( paneFrame.x < 7 ) paneFrame.x = 7;
691
+ if (paneFrame.x < 7) { paneFrame.x = 7; }
626
692
 
627
693
  if (paneFrame.y < 7) {
628
694
  paneFrame.height += paneFrame.y;
@@ -630,16 +696,16 @@ SC.PickerPane = SC.PalettePane.extend(
630
696
  }
631
697
 
632
698
  // If the height of the menu is bigger than the window height, resize it.
633
- if( paneFrame.height+paneFrame.y+35 >= windowFrame.height){
634
- if (paneFrame.height+50 >= windowFrame.height) {
699
+ if (paneFrame.height + paneFrame.y + 35 >= windowFrame.height) {
700
+ if (paneFrame.height + 50 >= windowFrame.height) {
635
701
  paneFrame.y = SC.MenuPane.VERTICAL_OFFSET;
636
- paneFrame.height = windowFrame.height - (SC.MenuPane.VERTICAL_OFFSET*2);
702
+ paneFrame.height = windowFrame.height - (SC.MenuPane.VERTICAL_OFFSET * 2);
637
703
  } else {
638
- paneFrame.y += (windowFrame.height - (paneFrame.height+paneFrame.y+35));
704
+ paneFrame.y += (windowFrame.height - (paneFrame.height + paneFrame.y + 35));
639
705
  }
640
706
  }
641
707
 
642
- return paneFrame ;
708
+ return paneFrame;
643
709
  },
644
710
 
645
711
  /** @private
@@ -651,12 +717,12 @@ SC.PickerPane = SC.PalettePane.extend(
651
717
 
652
718
  @returns {Rect}
653
719
  */
654
- fitPositionToScreenMenuPointer: function(w, f, a) {
655
- f = this.fitPositionToScreenPointer(w,f,a);
720
+ fitPositionToScreenMenuPointer: function (w, f, a) {
721
+ f = this.fitPositionToScreenPointer(w, f, a);
656
722
 
657
723
  // If the height of the menu is bigger than the window height, resize it.
658
- if( f.height+f.y+35 >= w.height){
659
- f.height = w.height - f.y - (SC.MenuPane.VERTICAL_OFFSET*2) ;
724
+ if (f.height + f.y + 35 >= w.height) {
725
+ f.height = w.height - f.y - (SC.MenuPane.VERTICAL_OFFSET * 2);
660
726
  }
661
727
 
662
728
  return f;
@@ -665,98 +731,227 @@ SC.PickerPane = SC.PalettePane.extend(
665
731
  /** @private
666
732
  re-position rule for triangle pointer picker.
667
733
  */
668
- fitPositionToScreenPointer: function(w, f, a) {
669
- var offset = [this.pointerOffset[0], this.pointerOffset[1],
670
- this.pointerOffset[2], this.pointerOffset[3]];
671
-
672
- // initiate perfect positions matrix
673
- // 4 perfect positions: right > left > top > bottom
674
- // 2 coordinates: x, y
675
- // top-left corner of 4 perfect positioned f (4x2)
676
- var prefP1 =[[a.x+a.width+offset[0], a.y+parseInt(a.height/2,0)-40],
677
- [a.x-f.width+offset[1], a.y+parseInt(a.height/2,0)-40],
678
- [a.x+parseInt((a.width/2)-(f.width/2),0), a.y-f.height+offset[2]],
679
- [a.x+parseInt((a.width/2)-(f.width/2),0), a.y+a.height+offset[3]]];
680
- // bottom-right corner of 4 perfect positioned f (4x2)
681
- var prefP2 =[[a.x+a.width+f.width+offset[0], a.y+parseInt(a.height/2,0)+f.height-24],
682
- [a.x+offset[1], a.y+parseInt(a.height/2,0)+f.height-24],
683
- [a.x+parseInt((a.width/2)-(f.width/2),0)+f.width, a.y+offset[2]],
684
- [a.x+parseInt((a.width/2)-(f.width/2),0)+f.width, a.y+a.height+f.height+offset[3]]];
685
- // cutoff of 4 perfect positioned f: top, right, bottom, left (4x4)
686
- var cutoffPrefP =[[prefP1[0][1]>0 ? 0 : 0-prefP1[0][1], prefP2[0][0]<w.width ? 0 : prefP2[0][0]-w.width, prefP2[0][1]<w.height ? 0 : prefP2[0][1]-w.height, prefP1[0][0]>0 ? 0 : 0-prefP1[0][0]],
687
- [prefP1[1][1]>0 ? 0 : 0-prefP1[1][1], prefP2[1][0]<w.width ? 0 : prefP2[1][0]-w.width, prefP2[1][1]<w.height ? 0 : prefP2[1][1]-w.height, prefP1[1][0]>0 ? 0 : 0-prefP1[1][0]],
688
- [prefP1[2][1]>0 ? 0 : 0-prefP1[2][1], prefP2[2][0]<w.width ? 0 : prefP2[2][0]-w.width, prefP2[2][1]<w.height ? 0 : prefP2[2][1]-w.height, prefP1[2][0]>0 ? 0 : 0-prefP1[2][0]],
689
- [prefP1[3][1]>0 ? 0 : 0-prefP1[3][1], prefP2[3][0]<w.width ? 0 : prefP2[3][0]-w.width, prefP2[3][1]<w.height ? 0 : prefP2[3][1]-w.height, prefP1[3][0]>0 ? 0 : 0-prefP1[3][0]]];
690
-
691
- var m = this.preferMatrix;
692
-
693
- // initiated with fallback position
694
- // Will be used only if the following preferred alternative can not be found
695
- if(m[4] === -1) {
696
- //f.x = a.x>0 ? a.x+23 : 0; // another alternative align to left
697
- f.x = a.x+parseInt(a.width/2,0);
698
- f.y = a.y+parseInt(a.height/2,0)-parseInt(f.height/2,0);
699
- this.set('pointerPos', SC.POINTER_LAYOUT[0]+' fallback');
700
- this.set('pointerPosY', parseInt(f.height/2,0)-40);
701
- } else {
702
- f.x = prefP1[m[4]][0];
703
- f.y = prefP1[m[4]][1];
704
- this.set('pointerPos', SC.POINTER_LAYOUT[m[4]]);
705
- this.set('pointerPosY', 0);
734
+ fitPositionToScreenPointer: function (w, f, a) {
735
+ var curType,
736
+ deltas,
737
+ matrix = this.preferMatrix,
738
+ offset = this.pointerOffset,
739
+ topLefts, botRights,
740
+ windowPadding = this.get('windowPadding');
741
+
742
+ // Determine the top-left corner of each of the 4 perfectly positioned
743
+ // frames, while taking the pointer offset into account.
744
+ topLefts = [
745
+ // Top left [x, y] if positioned evenly to the right of the anchor
746
+ [a.x + a.width + offset[0], a.y + a.halfHeight - f.halfHeight],
747
+
748
+ // Top left [x, y] if positioned evenly to the left of the anchor
749
+ [a.x - f.width + offset[1], a.y + a.halfHeight - f.halfHeight],
750
+
751
+ // Top left [x, y] if positioned evenly above the anchor
752
+ [a.x + a.halfWidth - f.halfWidth, a.y - f.height + offset[2]],
753
+
754
+ // Top left [x, y] if positioned evenly below the anchor
755
+ [a.x + a.halfWidth - f.halfWidth, a.y + a.height + offset[3]]
756
+ ];
757
+
758
+ // Determine the bottom-right corner of each of the 4 perfectly positioned
759
+ // frames, while taking the pointer offset into account.
760
+ botRights = [
761
+ // Bottom right [x, y] if positioned evenly to the right of the anchor
762
+ [a.x + a.width + f.width + offset[0], a.y + a.halfHeight + f.halfHeight],
763
+
764
+ // Bottom right [x, y] if positioned evenly to the left of the anchor
765
+ [a.x + offset[1], a.y + a.halfHeight + f.halfHeight],
766
+
767
+ // Bottom right [x, y] if positioned evenly above the anchor
768
+ [a.x + a.halfWidth + f.halfWidth, a.y + offset[2]],
769
+
770
+ // Bottom right [x, y] if positioned evenly below the anchor
771
+ [a.x + a.halfWidth + f.halfWidth, a.y + a.height + f.height + offset[3]]
772
+ ];
773
+
774
+ // Loop through the preferred matrix, hopefully finding one that will fit
775
+ // perfectly.
776
+ for (var i = 0, pointerLen = SC.POINTER_LAYOUT.length; i < pointerLen; i++) {
777
+ // The current preferred side.
778
+ curType = matrix[i];
779
+
780
+ // Determine if any of the sides of the pane would go beyond the window's
781
+ // edge for each of the 4 perfectly positioned frames; taking the amount
782
+ // of windowPadding into account. This is done by measuring the distance
783
+ // from each side of the frame to the side of the window. If the distance
784
+ // is negative then the edge is overlapping.
785
+ //
786
+ // If a perfect position has no overlapping edges, then it is a viable
787
+ // option for positioning.
788
+ deltas = {
789
+ top: topLefts[curType][1] - windowPadding,
790
+ right: w.width - windowPadding - botRights[curType][0],
791
+ bottom: w.height - windowPadding - botRights[curType][1],
792
+ left: topLefts[curType][0] - windowPadding
793
+ };
794
+
795
+ // UNUSED. It would be nice to get the picker as close as possible.
796
+ // Cache the fallback deltas.
797
+ // if (curType === matrix[4]) {
798
+ // fallbackDeltas = deltas;
799
+ // }
800
+
801
+ // If no edges overflow, then use this layout.
802
+ if (deltas.top >= 0 &&
803
+ deltas.right >= 0 &&
804
+ deltas.bottom >= 0 &&
805
+ deltas.left >= 0) {
806
+
807
+ f.x = topLefts[curType][0];
808
+ f.y = topLefts[curType][1];
809
+
810
+ this.set('pointerPosX', 0);
811
+ this.set('pointerPosY', 0);
812
+ this.set('pointerPos', SC.POINTER_LAYOUT[curType]);
813
+
814
+ break;
815
+
816
+ // If we prefer right or left and can fit right or left respectively, but
817
+ // can't fit the top within the window top and padding, then check if by
818
+ // adjusting the top of the pane down if it would still be beside the
819
+ // anchor and still above the bottom of the window with padding.
820
+ } else if (((curType === 0 && deltas.right >= 0) || // Right fits for preferred right
821
+ (curType === 1 && deltas.left >= 0)) && // or left fits for preferred left,
822
+ deltas.top < 0 && // but top doesn't fit,
823
+ deltas.top + f.halfHeight >= 0) { // yet it could.
824
+
825
+ // Adjust the pane position by the amount of downward shifting.
826
+ f.x = topLefts[curType][0];
827
+ f.y = topLefts[curType][1] - deltas.top;
828
+
829
+ // Offset the pointer position by the opposite amount of downward
830
+ // shifting (minus half the height of the pointer).
831
+ this.set('pointerPosX', 0);
832
+ this.set('pointerPosY', deltas.top);
833
+ this.set('pointerPos', SC.POINTER_LAYOUT[curType]);
834
+ break;
835
+
836
+ // If we prefer right or left and can fit right or left respectively, but
837
+ // can't fit the bottom within the window bottom and padding, then check
838
+ // if by adjusting the top of the pane up if it would still be beside the
839
+ // anchor and still below the top of the window with padding.
840
+ } else if (((curType === 0 && deltas.right >= 0) || // Right fits for preferred right
841
+ (curType === 1 && deltas.left >= 0)) && // or left fits for preferred left,
842
+ deltas.bottom < 0 && // but bottom doesn't fit,
843
+ deltas.bottom + f.halfHeight >= 0) { // yet it could.
844
+
845
+ // Adjust the pane position by the amount of upward shifting.
846
+ f.x = topLefts[curType][0];
847
+ f.y = topLefts[curType][1] + deltas.bottom;
848
+
849
+ // Offset the pointer position by the opposite amount of upward
850
+ // shifting (minus half the height of the pointer).
851
+ this.set('pointerPosX', 0);
852
+ this.set('pointerPosY', Math.abs(deltas.bottom));
853
+ this.set('pointerPos', SC.POINTER_LAYOUT[curType]);
854
+ break;
855
+
856
+ // If we prefer top or bottom and can fit top or bottom respectively, but
857
+ // can't fit the right side within the window right side plus padding,
858
+ // then check if by adjusting the pane leftwards to fit if it would still
859
+ // be beside the anchor and still fit within the left side of the window
860
+ // with padding.
861
+ } else if (((curType === 2 && deltas.top >= 0) || // Top fits for preferred top
862
+ (curType === 3 && deltas.bottom >= 0)) && // or bottom fits for preferred bottom,
863
+ deltas.right < 0 && // but right doesn't fit,
864
+ deltas.right + f.halfWidth >= 0) { // yet it could.
865
+
866
+ // Adjust the pane position by the amount of leftward shifting.
867
+ f.x = topLefts[curType][0] + deltas.right;
868
+ f.y = topLefts[curType][1];
869
+
870
+ // Offset the pointer position by the opposite amount of leftward
871
+ // shifting (minus half the width of the pointer).
872
+ this.set('pointerPosX', Math.abs(deltas.right));
873
+ this.set('pointerPosY', 0);
874
+ this.set('pointerPos', SC.POINTER_LAYOUT[curType]);
875
+ break;
876
+
877
+ // If we prefer top or bottom and can fit top or bottom respectively, but
878
+ // can't fit the left side within the window left side plus padding,
879
+ // then check if by adjusting the pane rightwards to fit if it would still
880
+ // be beside the anchor and still fit within the right side of the window
881
+ // with padding.
882
+ } else if (((curType === 2 && deltas.top >= 0) || // Top fits for preferred top
883
+ (curType === 3 && deltas.bottom >= 0)) && // or bottom fits for preferred bottom,
884
+ deltas.left < 0 && // but left doesn't fit,
885
+ deltas.left + f.halfWidth >= 0) { // yet it could.
886
+
887
+ // Adjust the pane position by the amount of leftward shifting.
888
+ f.x = topLefts[curType][0] - deltas.left;
889
+ f.y = topLefts[curType][1];
890
+
891
+ // Offset the pointer position by the opposite amount of leftward
892
+ // shifting (minus half the width of the pointer).
893
+ this.set('pointerPosX', deltas.left);
894
+ this.set('pointerPosY', 0);
895
+ this.set('pointerPos', SC.POINTER_LAYOUT[curType]);
896
+ break;
897
+ }
898
+
706
899
  }
707
- this.set('pointerPosX', 0);
708
-
709
- for(var i=0, cM, pointerLen=SC.POINTER_LAYOUT.length; i<pointerLen; i++) {
710
- cM = m[i];
711
- if (cutoffPrefP[cM][0]===0 && cutoffPrefP[cM][1]===0 && cutoffPrefP[cM][2]===0 && cutoffPrefP[cM][3]===0) {
712
- // alternative i in preferMatrix by priority
713
- if (m[4] !== cM) {
714
- f.x = prefP1[cM][0] ;
715
- f.y = prefP1[cM][1] ;
716
- this.set('pointerPosY', 0);
717
- this.set('pointerPos', SC.POINTER_LAYOUT[cM]);
718
- }
719
- i = SC.POINTER_LAYOUT.length;
720
- } else if ((cM === 0 || cM === 1) && cutoffPrefP[cM][0]===0 && cutoffPrefP[cM][1]===0 && cutoffPrefP[cM][2] < f.height-91 && cutoffPrefP[cM][3]===0) {
721
- if (m[4] !== cM) {
722
- f.x = prefP1[cM][0] ;
723
- this.set('pointerPos', SC.POINTER_LAYOUT[cM]);
724
- }
725
- f.y = prefP1[cM][1] - cutoffPrefP[cM][2];
726
- this.set('pointerPosY', cutoffPrefP[cM][2]);
727
- i = SC.POINTER_LAYOUT.length;
728
- } else if ((cM === 0 || cM === 1) && cutoffPrefP[cM][0]===0 && cutoffPrefP[cM][1]===0 && cutoffPrefP[cM][2] <= f.height-51 && cutoffPrefP[cM][3]===0) {
729
- if (m[4] !== cM) {
730
- f.x = prefP1[cM][0] ;
731
- }
732
- f.y = prefP1[cM][1] - (f.height-51) ;
733
- this.set('pointerPosY', (f.height-53));
734
- this.set('pointerPos', SC.POINTER_LAYOUT[cM]+' extra-low');
735
- i = SC.POINTER_LAYOUT.length;
736
- } else if ((cM === 2 || cM === 3) && cutoffPrefP[cM][0]===0 && cutoffPrefP[cM][1]<= parseInt(f.width/2,0)-this.get('extraRightOffset') && cutoffPrefP[cM][2] ===0 && cutoffPrefP[cM][3]===0) {
737
- if (m[4] !== cM) {
738
- f.y = prefP1[cM][1] ;
739
- }
740
- f.x = prefP1[cM][0] - (parseInt(f.width/2,0)-this.get('extraRightOffset')) ;
741
- this.set('pointerPos', SC.POINTER_LAYOUT[cM]+' extra-right');
742
- i = SC.POINTER_LAYOUT.length;
743
- } else if ((cM === 2 || cM === 3) && cutoffPrefP[cM][0]===0 && cutoffPrefP[cM][1]===0 && cutoffPrefP[cM][2] ===0 && cutoffPrefP[cM][3]<= parseInt(f.width/2,0)-this.get('extraRightOffset')) {
744
- if (m[4] !== cM) {
745
- f.y = prefP1[cM][1] ;
746
- }
747
- f.x = prefP1[cM][0] + (parseInt(f.width/2,0)-this.get('extraRightOffset')) ;
748
- this.set('pointerPos', SC.POINTER_LAYOUT[cM]+' extra-left');
749
- i = SC.POINTER_LAYOUT.length;
900
+
901
+ // If no arrangement was found to fit, then use the fall back preferred
902
+ // type.
903
+ if (i === pointerLen) {
904
+ if (matrix[4] === -1) {
905
+ //f.x = a.x > 0 ? a.x + 23 : 0; // another alternative align to left
906
+ f.x = a.x + a.halfWidth;
907
+ f.y = a.y + a.halfHeight - f.halfHeight;
908
+
909
+ this.set('pointerPos', SC.POINTER_LAYOUT[0] + ' fallback');
910
+ this.set('pointerPosY', f.halfHeight - 40);
911
+ } else {
912
+ f.x = topLefts[matrix[4]][0];
913
+ f.y = topLefts[matrix[4]][1];
914
+
915
+ this.set('pointerPos', SC.POINTER_LAYOUT[matrix[4]]);
916
+ this.set('pointerPosY', 0);
750
917
  }
918
+
919
+ this.set('pointerPosX', 0);
920
+ }
921
+
922
+ this.invokeLast(this._adjustPointerPosition);
923
+
924
+ return f;
925
+ },
926
+
927
+ /** @private Measure the pointer element and adjust it by the determined offset. */
928
+ _adjustPointerPosition: function () {
929
+ var pointer = this.$('.sc-pointer'),
930
+ pointerPos = this.get('pointerPos'),
931
+ marginLeft,
932
+ marginTop;
933
+
934
+ switch (pointerPos) {
935
+ case 'perfectRight':
936
+ case 'perfectLeft':
937
+ marginTop = -Math.round(pointer.outerHeight() / 2);
938
+ marginTop += this.get('pointerPosY');
939
+ pointer.attr('style', "margin-top: " + marginTop + "px");
940
+ break;
941
+ case 'perfectTop':
942
+ case 'perfectBottom':
943
+ marginLeft = -Math.round(pointer.outerWidth() / 2);
944
+ marginLeft += this.get('pointerPosX');
945
+ pointer.attr('style', "margin-left: " + marginLeft + "px;");
946
+ break;
751
947
  }
752
- return f ;
753
948
  },
754
949
 
755
950
  /** @private
756
951
  This method will set up pointerOffset and preferMatrix according to type
757
952
  and size if not provided explicitly.
758
953
  */
759
- setupPointer: function(a) {
954
+ setupPointer: function (a) {
760
955
  var pointerOffset = this.pointerOffset,
761
956
  K = SC.PickerPane;
762
957
 
@@ -764,62 +959,76 @@ SC.PickerPane = SC.PalettePane.extend(
764
959
  if (!pointerOffset || pointerOffset.length !== 4) {
765
960
  if (this.get('preferType') == SC.PICKER_MENU_POINTER) {
766
961
  switch (this.get('controlSize')) {
767
- case SC.TINY_CONTROL_SIZE:
768
- this.set('pointerOffset', K.TINY_PICKER_MENU_POINTER_OFFSET) ;
769
- this.set('extraRightOffset', K.TINY_PICKER_MENU_EXTRA_RIGHT_OFFSET) ;
770
- break;
771
- case SC.SMALL_CONTROL_SIZE:
772
- this.set('pointerOffset', K.SMALL_PICKER_MENU_POINTER_OFFSET) ;
773
- this.set('extraRightOffset', K.SMALL_PICKER_MENU_EXTRA_RIGHT_OFFSET) ;
774
- break;
775
- case SC.REGULAR_CONTROL_SIZE:
776
- this.set('pointerOffset', K.REGULAR_PICKER_MENU_POINTER_OFFSET) ;
777
- this.set('extraRightOffset', K.REGULAR_PICKER_MENU_EXTRA_RIGHT_OFFSET) ;
778
- break;
779
- case SC.LARGE_CONTROL_SIZE:
780
- this.set('pointerOffset', K.LARGE_PICKER_MENU_POINTER_OFFSET) ;
781
- this.set('extraRightOffset', K.LARGE_PICKER_MENU_EXTRA_RIGHT_OFFSET) ;
782
- break;
783
- case SC.HUGE_CONTROL_SIZE:
784
- this.set('pointerOffset', K.HUGE_PICKER_MENU_POINTER_OFFSET) ;
785
- this.set('extraRightOffset', K.HUGE_PICKER_MENU_EXTRA_RIGHT_OFFSET) ;
786
- break;
962
+ case SC.TINY_CONTROL_SIZE:
963
+ this.set('pointerOffset', K.TINY_PICKER_MENU_POINTER_OFFSET);
964
+ this.set('windowPadding', K.TINY_MENU_WINDOW_PADDING);
965
+ break;
966
+ case SC.SMALL_CONTROL_SIZE:
967
+ this.set('pointerOffset', K.SMALL_PICKER_MENU_POINTER_OFFSET);
968
+ this.set('windowPadding', K.SMALL_MENU_WINDOW_PADDING);
969
+ break;
970
+ case SC.REGULAR_CONTROL_SIZE:
971
+ this.set('pointerOffset', K.REGULAR_PICKER_MENU_POINTER_OFFSET);
972
+ this.set('windowPadding', K.REGULAR_MENU_WINDOW_PADDING);
973
+ break;
974
+ case SC.LARGE_CONTROL_SIZE:
975
+ this.set('pointerOffset', K.LARGE_PICKER_MENU_POINTER_OFFSET);
976
+ this.set('windowPadding', K.LARGE_MENU_WINDOW_PADDING);
977
+ break;
978
+ case SC.HUGE_CONTROL_SIZE:
979
+ this.set('pointerOffset', K.HUGE_PICKER_MENU_POINTER_OFFSET);
980
+ this.set('windowPadding', K.HUGE_MENU_WINDOW_PADDING);
981
+ break;
982
+ default:
983
+ this.set('pointerOffset', K.REGULAR_PICKER_MENU_POINTER_OFFSET);
984
+ this.set('windowPadding', K.REGULAR_MENU_WINDOW_PADDING);
985
+ //@if(debug)
986
+ SC.warn('SC.PickerPane with preferType of SC.PICKER_MENU_POINTER should either define a controlSize or provide a pointerOffset. SC.PickerPane will fall back to default pointerOffset of SC.PickerPane.REGULAR_PICKER_MENU_POINTER_OFFSET and default windowPadding of SC.PickerPane.WINDOW_PADDING');
987
+ //@endif
787
988
  }
788
- }
789
- else {
989
+ } else {
790
990
  var overlapTuningX = (a.width < 16) ? ((a.width < 4) ? 9 : 6) : 0,
791
991
  overlapTuningY = (a.height < 16) ? ((a.height < 4) ? 9 : 6) : 0,
792
992
  offsetKey = K.PICKER_POINTER_OFFSET;
793
993
 
794
- var offset = [offsetKey[0]+overlapTuningX,
795
- offsetKey[1]-overlapTuningX,
796
- offsetKey[2]-overlapTuningY,
797
- offsetKey[3]+overlapTuningY];
798
- this.set('pointerOffset', offset) ;
799
- this.set('extraRightOffset', K.PICKER_EXTRA_RIGHT_OFFSET) ;
994
+ var offset = [offsetKey[0] + overlapTuningX,
995
+ offsetKey[1] - overlapTuningX,
996
+ offsetKey[2] - overlapTuningY,
997
+ offsetKey[3] + overlapTuningY];
998
+
999
+ this.set('pointerOffset', offset);
1000
+ // TODO: What to do about this?
1001
+ if (SC.none(this.get('windowPadding'))) {
1002
+ this.set('windowPadding', K.WINDOW_PADDING);
1003
+ }
1004
+ }
1005
+ } else {
1006
+ // TODO: What to do about this?
1007
+ if (SC.none(this.get('windowPadding'))) {
1008
+ this.set('windowPadding', K.WINDOW_PADDING);
800
1009
  }
801
1010
  }
802
1011
 
803
1012
  // set up preferMatrix according to type if not provided explicitly:
804
- // take default [0,1,2,3,2] for picker, [3,0,1,2,3] for menu picker if
1013
+ // take default [0, 1, 2, 3, 2] for picker, [3, 0, 1, 2, 3] for menu picker if
805
1014
  // custom matrix not provided explicitly
806
- if(!this.preferMatrix || this.preferMatrix.length !== 5) {
1015
+ if (!this.preferMatrix || this.preferMatrix.length !== 5) {
807
1016
  // menu-picker default re-position rule :
808
1017
  // perfect bottom (3) > perfect right (0) > perfect left (1) > perfect top (2)
809
1018
  // fallback to perfect bottom (3)
810
1019
  // picker default re-position rule :
811
1020
  // perfect right (0) > perfect left (1) > perfect top (2) > perfect bottom (3)
812
1021
  // fallback to perfect top (2)
813
- this.set('preferMatrix', this.get('preferType') === SC.PICKER_MENU_POINTER ? [3,2,1,0,3] : [0,1,2,3,2]) ;
1022
+ this.set('preferMatrix', this.get('preferType') === SC.PICKER_MENU_POINTER ? [3, 2, 1, 0, 3] : [0, 1, 2, 3, 2]);
814
1023
  }
815
1024
  },
816
1025
 
817
1026
  /**
818
1027
  @type Array
819
- @default ['preferType','pointerPos','pointerPosY']
1028
+ @default ['pointerPos']
820
1029
  @see SC.View#displayProperties
821
1030
  */
822
- displayProperties: ['preferType','pointerPos','pointerPosY'],
1031
+ displayProperties: ['pointerPos'],
823
1032
 
824
1033
  /**
825
1034
  @type String
@@ -828,7 +1037,7 @@ SC.PickerPane = SC.PalettePane.extend(
828
1037
  renderDelegateName: 'pickerRenderDelegate',
829
1038
 
830
1039
  /** @private - click away picker. */
831
- modalPaneDidClick: function(evt) {
1040
+ modalPaneDidClick: function (evt) {
832
1041
  var f = this.get('frame'),
833
1042
  target = this.get('removeTarget') || null,
834
1043
  action = this.get('removeAction'),
@@ -838,7 +1047,9 @@ SC.PickerPane = SC.PalettePane.extend(
838
1047
  // We're not in the Pane so we must be in the modal
839
1048
  if (action) {
840
1049
  rootResponder.sendAction(action, target, this, this, null, this);
841
- } else this.remove();
1050
+ } else {
1051
+ this.remove();
1052
+ }
842
1053
 
843
1054
  return YES;
844
1055
  }
@@ -847,7 +1058,7 @@ SC.PickerPane = SC.PalettePane.extend(
847
1058
  },
848
1059
 
849
1060
  /** @private */
850
- mouseDown: function(evt) {
1061
+ mouseDown: function (evt) {
851
1062
  return this.modalPaneDidClick(evt);
852
1063
  },
853
1064
 
@@ -856,61 +1067,38 @@ SC.PickerPane = SC.PalettePane.extend(
856
1067
  won't be clicked away default is the range of contentView frame.
857
1068
  Over-write for adjustments. ex: shadow
858
1069
  */
859
- clickInside: function(frame, evt) {
1070
+ clickInside: function (frame, evt) {
860
1071
  return SC.pointInRect({ x: evt.pageX, y: evt.pageY }, frame);
861
1072
  },
862
1073
 
863
1074
  /**
864
1075
  Invoked by the root responder. Re-position picker whenever the window resizes.
865
1076
  */
866
- windowSizeDidChange: function(oldSize, newSize) {
867
- if (this.repositionOnWindowResize) this.positionPane();
1077
+ windowSizeDidChange: function (oldSize, newSize) {
1078
+ sc_super();
1079
+
1080
+ if (this.repositionOnWindowResize) { this.positionPane(); }
868
1081
  },
869
1082
 
870
- remove: function(){
871
- if(this.get('isVisibleInWindow') && this.get('isPaneAttached')) this._withdrawOverflowRequest();
1083
+ remove: function () {
1084
+ if (this.get('isVisibleInWindow') && this.get('isPaneAttached')) {
1085
+ this._withdrawOverflowRequest();
1086
+ }
872
1087
  this._removeScrollObservers();
873
1088
  return sc_super();
874
1089
  },
875
1090
 
876
- /** Figure out what is the anchor element */
877
- anchorElement: function(key, value) {
878
- var anchorView;
879
-
880
- if (value === undefined) {
881
- // Getting the value.
882
- anchorView = this._anchorView;
883
- return anchorView ? anchorView.get('layer') : this._anchorHTMLElement;
884
- }
885
- else {
886
- // Setting the value.
887
- if (!value) {
888
- throw "You must set 'anchorElement' to either a view or a DOM element";
889
- }
890
- else if (value.isView) {
891
- this._anchorView = value;
892
- this._anchorHTMLElement = null;
893
- }
894
- else {
895
- this._anchorView = null;
896
- this._anchorHTMLElement = value;
897
- }
898
- }
899
- }.property('layer').cacheable(),
900
-
901
-
902
-
903
1091
  /** @private
904
1092
  Internal method to hide the overflow on the body to make sure we don't
905
1093
  show scrollbars when the picker has shadows, as it's really annoying.
906
1094
  */
907
- _hideOverflow: function(){
908
- var body = SC.$(document.body),
909
- main = SC.$('.sc-main'),
910
- minWidth = parseInt(main.css('minWidth'),0),
911
- minHeight = parseInt(main.css('minHeight'),0),
1095
+ _hideOverflow: function () {
1096
+ var main = SC.$('.sc-main'),
1097
+ minWidth = parseInt(main.css('minWidth'), 0),
1098
+ minHeight = parseInt(main.css('minHeight'), 0),
912
1099
  windowSize = SC.RootResponder.responder.get('currentWindowSize');
913
- if(windowSize.width>=minWidth && windowSize.height>=minHeight){
1100
+
1101
+ if (windowSize.width >= minWidth && windowSize.height >= minHeight) {
914
1102
  SC.bodyOverflowArbitrator.requestHidden(this);
915
1103
  }
916
1104
  },
@@ -919,7 +1107,7 @@ SC.PickerPane = SC.PalettePane.extend(
919
1107
  Internal method to show the overflow on the body to make sure we don't
920
1108
  show scrollbars when the picker has shadows, as it's really annoying.
921
1109
  */
922
- _withdrawOverflowRequest: function(){
1110
+ _withdrawOverflowRequest: function () {
923
1111
  SC.bodyOverflowArbitrator.withdrawRequest(this);
924
1112
  },
925
1113
 
@@ -927,23 +1115,23 @@ SC.PickerPane = SC.PalettePane.extend(
927
1115
  Detect if view is inside a scroll view. Do this by traversing parent view
928
1116
  hierarchy until you hit a scroll view or main pane.
929
1117
  */
930
- _getScrollViewOfView: function(view) {
1118
+ _getScrollViewOfView: function (view) {
931
1119
  var curLevel = view;
932
- while (YES) {
933
- if (!curLevel) {
934
- return null;
935
- }
1120
+ while (curLevel) {
936
1121
  if (curLevel.isScrollable) {
937
- return curLevel;
1122
+ break;
938
1123
  }
1124
+
939
1125
  curLevel = curLevel.get('parentView');
940
1126
  }
1127
+
1128
+ return curLevel;
941
1129
  },
942
1130
 
943
1131
  /** @private
944
1132
  If anchor view is in a scroll view, setup observers on scroll offsets.
945
1133
  */
946
- _setupScrollObservers: function(anchorView) {
1134
+ _setupScrollObservers: function (anchorView) {
947
1135
  var scrollView = this._getScrollViewOfView(anchorView);
948
1136
  if (scrollView) {
949
1137
  scrollView.addObserver('horizontalScrollOffset', this, this._scrollOffsetDidChange);
@@ -955,7 +1143,7 @@ SC.PickerPane = SC.PalettePane.extend(
955
1143
  /** @private
956
1144
  Teardown observers setup in _setupScrollObservers.
957
1145
  */
958
- _removeScrollObservers: function() {
1146
+ _removeScrollObservers: function () {
959
1147
  var scrollView = this._scrollView;
960
1148
  if (scrollView) {
961
1149
  scrollView.removeObserver('horizontalScrollOffset', this, this._scrollOffsetDidChange);
@@ -966,7 +1154,7 @@ SC.PickerPane = SC.PalettePane.extend(
966
1154
  /** @private
967
1155
  Reposition pane whenever scroll offsets change.
968
1156
  */
969
- _scrollOffsetDidChange: function() {
1157
+ _scrollOffsetDidChange: function () {
970
1158
  this.positionPane();
971
1159
  }
972
1160
  });
@@ -975,62 +1163,80 @@ SC.PickerPane = SC.PalettePane.extend(
975
1163
  Default metrics for the different control sizes.
976
1164
  */
977
1165
 
978
- /**
1166
+ /** @static */
1167
+ SC.PickerPane.WINDOW_PADDING = 20;
1168
+
1169
+ /** @static */
1170
+ SC.PickerPane.TINY_MENU_WINDOW_PADDING = 12;
1171
+
1172
+ /** @static */
1173
+ SC.PickerPane.SMALL_MENU_WINDOW_PADDING = 11;
1174
+
1175
+ /** @static */
1176
+ SC.PickerPane.REGULAR_MENU_WINDOW_PADDING = 12;
1177
+
1178
+ /** @static */
1179
+ SC.PickerPane.LARGE_MENU_WINDOW_PADDING = 17;
1180
+
1181
+ /** @static */
1182
+ SC.PickerPane.HUGE_MENU_WINDOW_PADDING = 12;
1183
+
1184
+ /** @deprecated Version 1.10. Use SC.PickerPane.WINDOW_PADDING.
979
1185
  @static
980
1186
  */
981
- SC.PickerPane.PICKER_POINTER_OFFSET = [9, -9, -18, 18];
1187
+ SC.PickerPane.PICKER_EXTRA_RIGHT_OFFSET = 20;
982
1188
 
983
- /**
1189
+ /** @deprecated Version 1.10. Use SC.PickerPane.TINY_MENU_WINDOW_PADDING.
984
1190
  @static
985
1191
  */
986
- SC.PickerPane.PICKER_EXTRA_RIGHT_OFFSET = 20;
1192
+ SC.PickerPane.TINY_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
987
1193
 
988
- /**
1194
+ /** @deprecated Version 1.10. Use SC.PickerPane.SMALL_MENU_WINDOW_PADDING.
989
1195
  @static
990
1196
  */
991
- SC.PickerPane.TINY_PICKER_MENU_POINTER_OFFSET = [9, -9, -18, 18];
1197
+ SC.PickerPane.SMALL_PICKER_MENU_EXTRA_RIGHT_OFFSET = 11;
992
1198
 
993
- /**
1199
+ /** @deprecated Version 1.10. Use SC.PickerPane.REGULAR_MENU_WINDOW_PADDING.
994
1200
  @static
995
1201
  */
996
- SC.PickerPane.TINY_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
1202
+ SC.PickerPane.REGULAR_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
997
1203
 
998
- /**
1204
+ /** @deprecated Version 1.10. Use SC.PickerPane.LARGE_MENU_WINDOW_PADDING.
999
1205
  @static
1000
1206
  */
1001
- SC.PickerPane.SMALL_PICKER_MENU_POINTER_OFFSET = [9, -9, -8, 8];
1207
+ SC.PickerPane.LARGE_PICKER_MENU_EXTRA_RIGHT_OFFSET = 17;
1002
1208
 
1003
- /**
1209
+ /** @deprecated Version 1.10. Use SC.PickerPane.HUGE_MENU_WINDOW_PADDING.
1004
1210
  @static
1005
1211
  */
1006
- SC.PickerPane.SMALL_PICKER_MENU_EXTRA_RIGHT_OFFSET = 11;
1212
+ SC.PickerPane.HUGE_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
1007
1213
 
1008
1214
  /**
1009
1215
  @static
1010
1216
  */
1011
- SC.PickerPane.REGULAR_PICKER_MENU_POINTER_OFFSET = [9, -9, -12, 12];
1217
+ SC.PickerPane.PICKER_POINTER_OFFSET = [9, -9, -18, 18];
1012
1218
 
1013
1219
  /**
1014
1220
  @static
1015
1221
  */
1016
- SC.PickerPane.REGULAR_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
1222
+ SC.PickerPane.TINY_PICKER_MENU_POINTER_OFFSET = [9, -9, -18, 18];
1017
1223
 
1018
1224
  /**
1019
1225
  @static
1020
1226
  */
1021
- SC.PickerPane.LARGE_PICKER_MENU_POINTER_OFFSET = [9, -9, -16, 16];
1227
+ SC.PickerPane.SMALL_PICKER_MENU_POINTER_OFFSET = [9, -9, -8, 8];
1022
1228
 
1023
1229
  /**
1024
1230
  @static
1025
1231
  */
1026
- SC.PickerPane.LARGE_PICKER_MENU_EXTRA_RIGHT_OFFSET = 17;
1232
+ SC.PickerPane.REGULAR_PICKER_MENU_POINTER_OFFSET = [9, -9, -12, 12];
1027
1233
 
1028
1234
  /**
1029
1235
  @static
1030
1236
  */
1031
- SC.PickerPane.HUGE_PICKER_MENU_POINTER_OFFSET = [9, -9, -18, 18];
1237
+ SC.PickerPane.LARGE_PICKER_MENU_POINTER_OFFSET = [9, -9, -16, 16];
1032
1238
 
1033
1239
  /**
1034
1240
  @static
1035
1241
  */
1036
- SC.PickerPane.HUGE_PICKER_MENU_EXTRA_RIGHT_OFFSET = 12;
1242
+ SC.PickerPane.HUGE_PICKER_MENU_POINTER_OFFSET = [9, -9, -18, 18];