sproutcore 1.4.5 → 1.5.0.pre.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (792) hide show
  1. data/CHANGELOG +35 -0
  2. data/VERSION.yml +2 -2
  3. data/lib/Buildfile +13 -4
  4. data/lib/buildtasks/build.rake +20 -17
  5. data/lib/buildtasks/manifest.rake +143 -78
  6. data/lib/buildtasks/target.rake +1 -0
  7. data/lib/doc_templates/sproutcore/index.tmpl +18 -4
  8. data/lib/doc_templates/sproutcore/publish.js +1 -1
  9. data/lib/frameworks/sproutcore/Buildfile +24 -13
  10. data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
  11. data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
  12. data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
  13. data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
  14. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
  15. data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
  16. data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
  17. data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
  18. data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
  19. data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
  20. data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
  21. data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
  22. data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
  23. data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
  24. data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
  25. data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
  26. data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
  27. data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
  28. data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
  29. data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
  30. data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
  31. data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
  32. data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
  33. data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
  34. data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
  35. data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
  36. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
  37. data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +144 -0
  38. data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
  39. data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
  40. data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
  41. data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
  42. data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
  43. data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
  44. data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
  45. data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
  46. data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
  47. data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
  48. data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
  49. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
  50. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
  51. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
  52. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
  53. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
  54. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
  55. data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
  56. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
  57. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
  58. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
  59. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
  60. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
  61. data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
  62. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
  63. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
  64. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
  65. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
  66. data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
  67. data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
  68. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
  69. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
  70. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
  71. data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
  72. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
  73. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
  74. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
  75. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
  76. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
  77. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
  78. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
  79. data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
  80. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
  81. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
  82. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
  83. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
  84. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
  85. data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
  86. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
  87. data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
  88. data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
  89. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
  90. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
  91. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
  92. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
  93. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
  94. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
  95. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
  96. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
  97. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
  98. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
  99. data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
  100. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
  101. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
  102. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
  103. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
  104. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
  105. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
  106. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
  107. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
  108. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
  109. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
  110. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
  111. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
  112. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
  113. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
  114. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
  115. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
  116. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
  117. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
  118. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
  119. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
  120. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
  121. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
  122. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
  123. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
  124. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
  125. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
  126. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
  127. data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
  128. data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
  129. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
  130. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
  131. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
  132. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
  133. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
  134. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
  135. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
  136. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
  137. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
  138. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
  139. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
  140. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
  141. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
  142. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
  143. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
  144. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
  145. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
  146. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
  147. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
  148. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
  149. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
  150. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
  151. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
  152. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
  153. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
  154. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
  155. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
  156. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
  157. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
  158. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
  159. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
  160. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
  161. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
  162. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
  163. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
  164. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
  165. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
  166. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
  167. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
  168. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
  169. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
  170. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
  171. data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
  172. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
  173. data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
  174. data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
  175. data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
  176. data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
  177. data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
  178. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
  179. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
  180. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
  181. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
  182. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
  183. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
  184. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
  185. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
  186. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
  187. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
  188. data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
  189. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
  190. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
  191. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
  192. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
  193. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
  194. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
  195. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
  196. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
  197. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
  198. data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
  199. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
  200. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
  201. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
  202. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
  203. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
  204. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
  205. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
  206. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
  207. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
  208. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
  209. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
  210. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
  211. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
  212. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
  213. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
  214. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
  215. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -0
  216. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
  217. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
  218. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +29 -0
  219. data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
  220. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
  221. data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
  222. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
  223. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
  224. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
  225. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
  226. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
  227. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
  228. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
  229. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
  230. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
  231. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
  232. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
  233. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
  234. data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
  235. data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
  236. data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
  237. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
  238. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
  239. data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
  240. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
  241. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
  242. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
  243. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
  244. data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
  245. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
  246. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
  247. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
  248. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
  249. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
  250. data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
  251. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
  252. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
  253. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
  254. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
  255. data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
  256. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
  257. data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
  258. data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
  259. data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
  260. data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
  261. data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
  262. data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
  263. data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
  264. data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
  265. data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
  266. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
  267. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
  268. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
  269. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
  270. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
  271. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
  272. data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
  273. data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
  274. data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
  275. data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
  276. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
  277. data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
  278. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
  279. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
  280. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
  281. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
  282. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -2
  283. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
  284. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
  285. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
  286. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
  287. data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
  288. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
  289. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
  290. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
  291. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
  292. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
  293. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
  294. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
  295. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
  296. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
  297. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
  298. data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
  299. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
  300. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
  301. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
  302. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
  303. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
  304. data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
  305. data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
  306. data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
  307. data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
  308. data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
  309. data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
  310. data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
  311. data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
  312. data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
  313. data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
  314. data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
  315. data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
  316. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
  317. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
  318. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
  319. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
  320. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
  321. data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
  322. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
  323. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
  324. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
  325. data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
  326. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
  327. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
  328. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
  329. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
  330. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
  331. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
  332. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
  333. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
  334. data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
  335. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
  336. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
  337. data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
  338. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
  339. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
  340. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
  341. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
  342. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
  343. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
  344. data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
  345. data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
  346. data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
  347. data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
  348. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
  349. data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
  350. data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
  351. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
  352. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
  353. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
  354. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
  355. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
  356. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
  357. data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
  358. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
  359. data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
  360. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
  361. data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
  362. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
  363. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
  364. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
  365. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
  366. data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
  367. data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
  368. data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
  369. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
  370. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
  371. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
  372. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
  373. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
  374. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
  375. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
  376. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
  377. data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
  378. data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
  379. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
  380. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
  381. data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
  382. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
  383. data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
  384. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
  385. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
  386. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
  387. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
  388. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
  389. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
  390. data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
  391. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
  392. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
  393. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
  394. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
  395. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
  396. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
  397. data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
  398. data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
  399. data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
  400. data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
  401. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
  402. data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
  403. data/lib/frameworks/sproutcore/license.js +31 -30
  404. data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
  405. data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
  406. data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
  407. data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
  408. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
  409. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
  410. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
  411. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
  412. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
  413. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
  414. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
  415. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
  416. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
  417. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
  418. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
  419. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
  420. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
  421. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
  422. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
  423. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
  424. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
  425. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
  426. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
  427. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
  428. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
  429. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
  430. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
  431. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
  432. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
  433. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
  434. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
  435. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
  436. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
  437. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
  438. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
  439. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
  440. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
  441. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
  442. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
  443. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
  444. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
  445. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
  446. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
  447. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
  448. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
  449. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
  450. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
  451. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
  452. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
  453. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
  454. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
  455. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
  456. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
  457. data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
  458. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
  459. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
  460. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
  461. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
  462. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
  463. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
  464. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
  465. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
  466. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
  467. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
  468. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
  469. data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
  470. data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
  471. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
  472. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
  473. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
  474. data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
  475. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
  476. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
  477. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
  478. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
  479. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
  480. data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
  481. data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
  482. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
  483. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
  484. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
  485. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
  486. data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
  487. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
  488. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
  489. data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
  490. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
  491. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
  492. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
  493. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
  494. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
  495. data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
  496. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
  497. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
  498. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
  499. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
  500. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
  501. data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
  502. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
  503. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
  504. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
  505. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
  506. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
  507. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
  508. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
  509. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
  510. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
  511. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
  512. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
  513. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
  514. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
  515. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
  516. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
  517. data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
  518. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
  519. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
  520. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
  521. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
  522. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
  523. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
  524. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
  525. data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
  526. data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
  527. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
  528. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
  529. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
  530. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
  531. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
  532. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
  533. data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
  534. data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
  535. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
  536. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +27 -0
  537. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
  538. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
  539. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
  540. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
  541. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
  542. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
  543. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +84 -0
  544. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
  545. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
  546. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
  547. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
  548. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
  549. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
  550. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
  551. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
  552. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
  553. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
  554. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
  555. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +66 -0
  556. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
  557. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
  558. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
  559. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
  560. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
  561. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
  562. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
  563. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +34 -0
  564. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
  565. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
  566. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
  567. data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +28 -0
  568. data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -0
  569. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
  570. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
  571. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
  572. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +84 -0
  573. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
  574. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
  575. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
  576. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
  577. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
  578. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
  579. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
  580. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
  581. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
  582. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
  583. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
  584. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +66 -0
  585. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
  586. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
  587. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
  588. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
  589. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
  590. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
  591. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
  592. data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
  593. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
  594. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
  595. data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
  596. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
  597. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
  598. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
  599. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
  600. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
  601. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
  602. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
  603. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
  604. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
  605. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
  606. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
  607. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
  608. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
  609. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
  610. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
  611. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
  612. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
  613. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
  614. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
  615. data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
  616. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
  617. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
  618. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
  619. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
  620. data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
  621. data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
  622. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
  623. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
  624. data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
  625. data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
  626. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +76 -0
  627. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
  628. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
  629. data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
  630. data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
  631. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
  632. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.js +20 -0
  633. data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
  634. data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
  635. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
  636. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
  637. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
  638. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
  639. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
  640. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
  641. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
  642. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
  643. data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
  644. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
  645. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
  646. data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
  647. data/lib/frameworks/sproutcore/themes/ace/resources/progress/progress.js +78 -0
  648. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -0
  649. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
  650. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
  651. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
  652. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
  653. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
  654. data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
  655. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
  656. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
  657. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
  658. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
  659. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
  660. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
  661. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
  662. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
  663. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
  664. data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
  665. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
  666. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
  667. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
  668. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
  669. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
  670. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
  671. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
  672. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
  673. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
  674. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
  675. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
  676. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
  677. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
  678. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
  679. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
  680. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
  681. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
  682. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
  683. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
  684. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
  685. data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +79 -0
  686. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
  687. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
  688. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
  689. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
  690. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
  691. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
  692. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
  693. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
  694. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
  695. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
  696. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +3 -0
  697. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
  698. data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
  699. data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -0
  700. data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
  701. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
  702. data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
  703. data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +8 -0
  704. data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
  705. data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
  706. data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
  707. data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
  708. data/lib/sproutcore.rb +9 -2
  709. data/lib/sproutcore/builders.rb +2 -1
  710. data/lib/sproutcore/builders/base.rb +7 -2
  711. data/lib/sproutcore/builders/combine.rb +49 -1
  712. data/lib/sproutcore/builders/html.rb +2 -0
  713. data/lib/sproutcore/builders/javascript.rb +1 -1
  714. data/lib/sproutcore/builders/minify.rb +12 -12
  715. data/lib/sproutcore/builders/module.rb +72 -0
  716. data/lib/sproutcore/builders/string_wrapper.rb +43 -0
  717. data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
  718. data/lib/sproutcore/helpers/static_helper.rb +13 -9
  719. data/lib/sproutcore/models/manifest_entry.rb +2 -2
  720. data/lib/sproutcore/models/target.rb +25 -11
  721. data/lib/sproutcore/rack/dev.rb +3 -3
  722. data/lib/sproutcore/tools.rb +51 -2
  723. data/lib/sproutcore/tools/build.rb +35 -7
  724. data/lib/sproutcore/version.rb +1 -0
  725. data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
  726. data/spec/fixtures/builder_tests/Buildfile +2 -2
  727. data/spec/lib/builders/bundle_spec.rb +8 -8
  728. data/spec/lib/builders/strings_spec.rb +1 -0
  729. data/sproutcore.gemspec +9 -2
  730. data/vendor/chance/.gitignore +5 -0
  731. data/vendor/chance/Gemfile +4 -0
  732. data/vendor/chance/Rakefile +2 -0
  733. data/vendor/chance/bin/chance +72 -0
  734. data/vendor/chance/chance.gemspec +28 -0
  735. data/vendor/chance/lib/chance.rb +139 -0
  736. data/vendor/chance/lib/chance/imager.rb +13 -0
  737. data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
  738. data/vendor/chance/lib/chance/importer.rb +64 -0
  739. data/vendor/chance/lib/chance/instance.rb +225 -0
  740. data/vendor/chance/lib/chance/parser.rb +831 -0
  741. data/vendor/chance/lib/chance/perf.rb +17 -0
  742. data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
  743. data/vendor/chance/lib/chance/slicing.rb +104 -0
  744. data/vendor/chance/lib/chance/version.rb +3 -0
  745. data/vendor/chance/test/case/abc.png +0 -0
  746. data/vendor/chance/test/case/more/abc.png +0 -0
  747. data/vendor/chance/test/case/more/another.css +4 -0
  748. data/vendor/chance/test/case/test1.css +22 -0
  749. data/vendor/chance/test/case/test2.css +6 -0
  750. data/vendor/sproutcore/SCCompiler.jar +0 -0
  751. data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
  752. data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
  753. data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
  754. data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
  755. data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
  756. data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
  757. data/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar} +0 -0
  758. data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
  759. data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
  760. data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
  761. data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
  762. data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
  763. data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
  764. data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
  765. data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
  766. data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
  767. data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
  768. metadata +686 -177
  769. data/lib/frameworks/sproutcore/CHANGELOG +0 -93
  770. data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
  771. data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
  772. data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
  773. data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
  774. data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
  775. data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
  776. data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
  777. data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
  778. data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
  779. data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
  780. data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
  781. data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
  782. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
  783. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
  784. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
  785. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
  786. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +0 -25
  787. data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
  788. data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
  789. data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
  790. data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
  791. data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
  792. data/lib/sproutcore/builders/bundle.rb +0 -63
@@ -1,93 +0,0 @@
1
- *SproutCore 1.4.5 (January 25, 2010)*
2
-
3
- * Removed old HISTORY file
4
- * Remove content observer when destroyed
5
- * DRY up ContentDisplay, add tests
6
- * Convert array like objects to arrays for SC.Query CONTAINS - Fixes #138
7
- * Fixed regression in SC.Animatable
8
- * Allow SC.SelectView's that whose items are numbers and start at 0
9
- * Missed a copyright
10
- * Updated Copyrights
11
- * Fix for SC.RootResponder's targetForAction. Now checks default responder for a isResponderContext property.
12
- * Moved a .sc-video-view CSS rule in the correct file.
13
- * MouseWheel fix for WebKit
14
- * Changed CollectionFastPath#contentIndexIsGroup signature to match protocol for delegate
15
- * Pass the event when calling modalPaneDidClick.
16
- * [#128] BUGFIX: Disconnect bindings when object is destroyed
17
- * Fixed issue with destroying unused items in CollectionView
18
- * Don't try to modify select field element if it doesn't exist yet
19
- * Enhance unloadRecords allowing unloading all records of a specific type
20
- * fixed timing issues where css3 transitions are applied incorrectly
21
- * Return the picker pane after popup
22
- * Added test for SC.Record.normalize() not preserving hash value of toOne without a defaultValue.
23
- * SC.Record.normalize() would not preserve has value of toOne relationship that did not declare a defaultValue. All tests pass.
24
- * Added tests for SC.CascadeDataSource.
25
- * Fixed bug with retrieveRecords in SC.CascadeDataSource not passing all arguments.
26
- * SC.Observable.addProbe() fix for iPad/iPhone -- console.log currently only accepts one argument.
27
- * CollectionView calls destroy to removed item views that will not be reused
28
- * Check for image before trying to abort - Fixes #106
29
- * Updated references to mouseOut and mouseOver to mouseExited and mouseEntered - Fixes #100
30
- * Fixed bug with toggling isEnabled on SelectFieldView
31
-
32
-
33
- *SproutCore 1.4.4 (November 12, 2010)*
34
-
35
- * Fix SC.platform.touch for Chrome 9
36
- * Better docs for setIfChanged
37
- * Minor documentation fix
38
- * Minor cleanup to SC.platform
39
- * Added support for Chrome Frame with :chrome_frame flag in Buildfile
40
- * Can now parse '1/1/01 1:1:1'-formatted date times. Thanks timgaleckas.
41
- * Remove unused code in SC.Store#removeDataHash
42
- * Removed deep flag for clone method
43
- * Replaced some instances of true with YES
44
- * Datastore makes deep copies of data hashes instead of shallow copies
45
- * Added support for making deep copies of an object into SC.copy and into SC.Copyable.copy
46
- * SC.clone makes deep copies of objects of type SC.T_HASH
47
- * Removed unnecessary variable declaration and method invokation in writeAttribute
48
- * Fixed an incorrect statement in the SC.CollectionContent inline documentation.
49
- * Fixed typo in SC.Animatable fixes
50
- * Added safety check for SC.Touch.allowDefault
51
- * Animatable should check that transitions exist before using special case
52
- * Typos prevent accelerating anything with a right or bottom even if it also has a top/height or left/width
53
-
54
- *SproutCore 1.4.3 (October 19, 2010)*
55
-
56
- * Send a warning to the console when using SC.RecordArray#indexOf or SC.RecordArray#lastIndexOf and providing an object that is
57
- * Applied fix to the findClassNames function so that class names can be detected when using SproutCore in IE 7 and 8.
58
- * SC.ObserverSet.add was being overloaded in debug mode by a version that mucked up passing along a context with addObserver. T
59
- * rendering of select field will now honor isEnabled, ensuring that the control is disabled in the markup if not enabled in cod
60
- * adding an observer that monitors the objects content (and not just the reference) so that any changes to the content will upd
61
- * NotEmpty validator would not validate 0 as a non-empty number
62
- * Spelling fixes in api doc
63
- * Fix spelling in license header
64
- * LabelView: allow inline editing of numbers like 0
65
- * Refactor duplicated code into a function
66
- * Made errors with not correctly initialized caches obvious to find.
67
- * Add same guard clause as in insertTab
68
- * Fix tabbing in the previous direction as well
69
- * Make tabbing between inline text fields work
70
- * Make SC.Animatable not crash when it lacks a parent view.
71
- * Changed SC.Button mixin to support content objects that do not have get
72
- * Fixed issue with SC.ScrollerView not properly updating its element's class names, e.g., if controlsHidden changed to false, t
73
- * SC.ScrollerView's thumbs now default to their position -- solves an issue where going back to a view that had already been sc
74
- * Explicitly check falsity of isReady in SC._object_className so searching for class names in tests work
75
- * SC.ListItemView checks rightIcon property when determining if click occurred within it
76
- * For radio buttons with horizontal layoutDirection, added itemWidthKey for custom widths -- fixes Github Issue #27
77
- * These tests fail because the store status for the child record is only updated when you 'get' the status of the child record.
78
- * return null instead of undefined from select field view getFieldValue when empty item selected.
79
- * Sanity check in CollectionView item removal
80
- * Fixed SC root responder's mousemove function so that last hovered views are exited first before other views are entered
81
- * Fixes passing contexts with addObserver.
82
- * Make sure a bad DateTime.parse() doesn't mess up future parses
83
-
84
- *SproutCore 1.4.2 (October 1, 2010)*
85
-
86
- * Fixes a DateTime .get('lastMonday') bug
87
- * default to using ISO 8601 format for time parsing if none is specified
88
- * Allow SelectFieldView to obtain focus if the user presses TAB key from previous field.
89
- * Fixed typo
90
-
91
- *SproutCore 1.4.1 (September 21, 2010)*
92
-
93
- * Update the X-SproutCore-Version header to 1.4 [MO]
@@ -1,865 +0,0 @@
1
- /**
2
- * @version: 1.0 Alpha-1
3
- * @author: Coolite Inc. http://www.coolite.com/
4
- * @date: 2008-04-13
5
- * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
6
- * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
7
- * @website: http://www.datejs.com/
8
- */
9
-
10
- (function () {
11
- var $D = Date,
12
- $P = $D.prototype,
13
- $C = $D.CultureInfo,
14
- p = function (s, l) {
15
- if (!l) {
16
- l = 2;
17
- }
18
- return ("000" + s).slice(l * -1);
19
- };
20
-
21
- /**
22
- * Resets the time of this Date object to 12:00 AM (00:00), which is the start of the day.
23
- * @param {Boolean} .clone() this date instance before clearing Time
24
- * @return {Date} this
25
- */
26
- $P.clearTime = function () {
27
- this.setHours(0);
28
- this.setMinutes(0);
29
- this.setSeconds(0);
30
- this.setMilliseconds(0);
31
- return this;
32
- };
33
-
34
- /**
35
- * Resets the time of this Date object to the current time ('now').
36
- * @return {Date} this
37
- */
38
- $P.setTimeToNow = function () {
39
- var n = new Date();
40
- this.setHours(n.getHours());
41
- this.setMinutes(n.getMinutes());
42
- this.setSeconds(n.getSeconds());
43
- this.setMilliseconds(n.getMilliseconds());
44
- return this;
45
- };
46
-
47
- /**
48
- * Gets a date that is set to the current date. The time is set to the start of the day (00:00 or 12:00 AM).
49
- * @return {Date} The current date.
50
- */
51
- $D.today = function () {
52
- return new Date().clearTime();
53
- };
54
-
55
- /**
56
- * Compares the first date to the second date and returns an number indication of their relative values.
57
- * @param {Date} First Date object to compare [Required].
58
- * @param {Date} Second Date object to compare to [Required].
59
- * @return {Number} -1 = date1 is lessthan date2. 0 = values are equal. 1 = date1 is greaterthan date2.
60
- */
61
- $D.compare = function (date1, date2) {
62
- if (isNaN(date1) || isNaN(date2)) {
63
- throw new Error(date1 + " - " + date2);
64
- } else if (date1 instanceof Date && date2 instanceof Date) {
65
- return (date1 < date2) ? -1 : (date1 > date2) ? 1 : 0;
66
- } else {
67
- throw new TypeError(date1 + " - " + date2);
68
- }
69
- };
70
-
71
- /**
72
- * Compares the first Date object to the second Date object and returns true if they are equal.
73
- * @param {Date} First Date object to compare [Required]
74
- * @param {Date} Second Date object to compare to [Required]
75
- * @return {Boolean} true if dates are equal. false if they are not equal.
76
- */
77
- $D.equals = function (date1, date2) {
78
- return (date1.compareTo(date2) === 0);
79
- };
80
-
81
- /**
82
- * Gets the day number (0-6) if given a CultureInfo specific string which is a valid dayName, abbreviatedDayName or shortestDayName (two char).
83
- * @param {String} The name of the day (eg. "Monday, "Mon", "tuesday", "tue", "We", "we").
84
- * @return {Number} The day number
85
- */
86
- $D.getDayNumberFromName = function (name) {
87
- var n = $C.dayNames, m = $C.abbreviatedDayNames, o = $C.shortestDayNames, s = name.toLowerCase();
88
- for (var i = 0; i < n.length; i++) {
89
- if (n[i].toLowerCase() == s || m[i].toLowerCase() == s || o[i].toLowerCase() == s) {
90
- return i;
91
- }
92
- }
93
- return -1;
94
- };
95
-
96
- /**
97
- * Gets the month number (0-11) if given a Culture Info specific string which is a valid monthName or abbreviatedMonthName.
98
- * @param {String} The name of the month (eg. "February, "Feb", "october", "oct").
99
- * @return {Number} The day number
100
- */
101
- $D.getMonthNumberFromName = function (name) {
102
- var n = $C.monthNames, m = $C.abbreviatedMonthNames, s = name.toLowerCase();
103
- for (var i = 0; i < n.length; i++) {
104
- if (n[i].toLowerCase() == s || m[i].toLowerCase() == s) {
105
- return i;
106
- }
107
- }
108
- return -1;
109
- };
110
-
111
- /**
112
- * Determines if the current date instance is within a LeapYear.
113
- * @param {Number} The year.
114
- * @return {Boolean} true if date is within a LeapYear, otherwise false.
115
- */
116
- $D.isLeapYear = function (year) {
117
- return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);
118
- };
119
-
120
- /**
121
- * Gets the number of days in the month, given a year and month value. Automatically corrects for LeapYear.
122
- * @param {Number} The year.
123
- * @param {Number} The month (0-11).
124
- * @return {Number} The number of days in the month.
125
- */
126
- $D.getDaysInMonth = function (year, month) {
127
- return [31, ($D.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
128
- };
129
-
130
- $D.getTimezoneAbbreviation = function (offset) {
131
- var z = $C.timezones, p;
132
- for (var i = 0; i < z.length; i++) {
133
- if (z[i].offset === offset) {
134
- return z[i].name;
135
- }
136
- }
137
- return null;
138
- };
139
-
140
- $D.getTimezoneOffset = function (name) {
141
- var z = $C.timezones, p;
142
- for (var i = 0; i < z.length; i++) {
143
- if (z[i].name === name.toUpperCase()) {
144
- return z[i].offset;
145
- }
146
- }
147
- return null;
148
- };
149
-
150
- /**
151
- * Returns a new Date object that is an exact date and time copy of the original instance.
152
- * @return {Date} A new Date instance
153
- */
154
- $P.clone = function () {
155
- return new Date(this.getTime());
156
- };
157
-
158
- /**
159
- * Compares this instance to a Date object and returns an number indication of their relative values.
160
- * @param {Date} Date object to compare [Required]
161
- * @return {Number} -1 = this is lessthan date. 0 = values are equal. 1 = this is greaterthan date.
162
- */
163
- $P.compareTo = function (date) {
164
- return Date.compare(this, date);
165
- };
166
-
167
- /**
168
- * Compares this instance to another Date object and returns true if they are equal.
169
- * @param {Date} Date object to compare. If no date to compare, new Date() [now] is used.
170
- * @return {Boolean} true if dates are equal. false if they are not equal.
171
- */
172
- $P.equals = function (date) {
173
- return Date.equals(this, date || new Date());
174
- };
175
-
176
- /**
177
- * Determines if this instance is between a range of two dates or equal to either the start or end dates.
178
- * @param {Date} Start of range [Required]
179
- * @param {Date} End of range [Required]
180
- * @return {Boolean} true is this is between or equal to the start and end dates, else false
181
- */
182
- $P.between = function (start, end) {
183
- return this.getTime() >= start.getTime() && this.getTime() <= end.getTime();
184
- };
185
-
186
- /**
187
- * Determines if this date occurs after the date to compare to.
188
- * @param {Date} Date object to compare. If no date to compare, new Date() ("now") is used.
189
- * @return {Boolean} true if this date instance is greater than the date to compare to (or "now"), otherwise false.
190
- */
191
- $P.isAfter = function (date) {
192
- return this.compareTo(date || new Date()) === 1;
193
- };
194
-
195
- /**
196
- * Determines if this date occurs before the date to compare to.
197
- * @param {Date} Date object to compare. If no date to compare, new Date() ("now") is used.
198
- * @return {Boolean} true if this date instance is less than the date to compare to (or "now").
199
- */
200
- $P.isBefore = function (date) {
201
- return (this.compareTo(date || new Date()) === -1);
202
- };
203
-
204
- /**
205
- * Determines if the current Date instance occurs today.
206
- * @return {Boolean} true if this date instance is 'today', otherwise false.
207
- */
208
-
209
- /**
210
- * Determines if the current Date instance occurs on the same Date as the supplied 'date'.
211
- * If no 'date' to compare to is provided, the current Date instance is compared to 'today'.
212
- * @param {date} Date object to compare. If no date to compare, the current Date ("now") is used.
213
- * @return {Boolean} true if this Date instance occurs on the same Day as the supplied 'date'.
214
- */
215
- $P.isToday = $P.isSameDay = function (date) {
216
- return this.clone().clearTime().equals((date || new Date()).clone().clearTime());
217
- };
218
-
219
- /**
220
- * Adds the specified number of milliseconds to this instance.
221
- * @param {Number} The number of milliseconds to add. The number can be positive or negative [Required]
222
- * @return {Date} this
223
- */
224
- $P.addMilliseconds = function (value) {
225
- this.setMilliseconds(this.getMilliseconds() + value * 1);
226
- return this;
227
- };
228
-
229
- /**
230
- * Adds the specified number of seconds to this instance.
231
- * @param {Number} The number of seconds to add. The number can be positive or negative [Required]
232
- * @return {Date} this
233
- */
234
- $P.addSeconds = function (value) {
235
- return this.addMilliseconds(value * 1000);
236
- };
237
-
238
- /**
239
- * Adds the specified number of seconds to this instance.
240
- * @param {Number} The number of seconds to add. The number can be positive or negative [Required]
241
- * @return {Date} this
242
- */
243
- $P.addMinutes = function (value) {
244
- return this.addMilliseconds(value * 60000); /* 60*1000 */
245
- };
246
-
247
- /**
248
- * Adds the specified number of hours to this instance.
249
- * @param {Number} The number of hours to add. The number can be positive or negative [Required]
250
- * @return {Date} this
251
- */
252
- $P.addHours = function (value) {
253
- return this.addMilliseconds(value * 3600000); /* 60*60*1000 */
254
- };
255
-
256
- /**
257
- * Adds the specified number of days to this instance.
258
- * @param {Number} The number of days to add. The number can be positive or negative [Required]
259
- * @return {Date} this
260
- */
261
- $P.addDays = function (value) {
262
- this.setDate(this.getDate() + value * 1);
263
- return this;
264
- };
265
-
266
- /**
267
- * Adds the specified number of weeks to this instance.
268
- * @param {Number} The number of weeks to add. The number can be positive or negative [Required]
269
- * @return {Date} this
270
- */
271
- $P.addWeeks = function (value) {
272
- return this.addDays(value * 7);
273
- };
274
-
275
- /**
276
- * Adds the specified number of months to this instance.
277
- * @param {Number} The number of months to add. The number can be positive or negative [Required]
278
- * @return {Date} this
279
- */
280
- $P.addMonths = function (value) {
281
- var n = this.getDate();
282
- this.setDate(1);
283
- this.setMonth(this.getMonth() + value * 1);
284
- this.setDate(Math.min(n, $D.getDaysInMonth(this.getFullYear(), this.getMonth())));
285
- return this;
286
- };
287
-
288
- /**
289
- * Adds the specified number of years to this instance.
290
- * @param {Number} The number of years to add. The number can be positive or negative [Required]
291
- * @return {Date} this
292
- */
293
- $P.addYears = function (value) {
294
- return this.addMonths(value * 12);
295
- };
296
-
297
- /**
298
- * Adds (or subtracts) to the value of the years, months, weeks, days, hours, minutes, seconds, milliseconds of the date instance using given configuration object. Positive and Negative values allowed.
299
- * Example
300
- <pre><code>
301
- Date.today().add( { days: 1, months: 1 } )
302
-
303
- new Date().add( { years: -1 } )
304
- </code></pre>
305
- * @param {Object} Configuration object containing attributes (months, days, etc.)
306
- * @return {Date} this
307
- */
308
- $P.add = function (config) {
309
- if (typeof config == "number") {
310
- this._orient = config;
311
- return this;
312
- }
313
-
314
- var x = config;
315
-
316
- if (x.milliseconds) {
317
- this.addMilliseconds(x.milliseconds);
318
- }
319
- if (x.seconds) {
320
- this.addSeconds(x.seconds);
321
- }
322
- if (x.minutes) {
323
- this.addMinutes(x.minutes);
324
- }
325
- if (x.hours) {
326
- this.addHours(x.hours);
327
- }
328
- if (x.weeks) {
329
- this.addWeeks(x.weeks);
330
- }
331
- if (x.months) {
332
- this.addMonths(x.months);
333
- }
334
- if (x.years) {
335
- this.addYears(x.years);
336
- }
337
- if (x.days) {
338
- this.addDays(x.days);
339
- }
340
- return this;
341
- };
342
-
343
- var $y, $m, $d;
344
-
345
- /**
346
- * Get the week number. Week one (1) is the week which contains the first Thursday of the year. Monday is considered the first day of the week.
347
- * This algorithm is a JavaScript port of the work presented by Claus Tøndering at http://www.tondering.dk/claus/cal/node8.html#SECTION00880000000000000000
348
- * .getWeek() Algorithm Copyright (c) 2008 Claus Tondering.
349
- * The .getWeek() function does NOT convert the date to UTC. The local datetime is used. Please use .getISOWeek() to get the week of the UTC converted date.
350
- * @return {Number} 1 to 53
351
- */
352
- $P.getWeek = function () {
353
- var a, b, c, d, e, f, g, n, s, w;
354
-
355
- $y = (!$y) ? this.getFullYear() : $y;
356
- $m = (!$m) ? this.getMonth() + 1 : $m;
357
- $d = (!$d) ? this.getDate() : $d;
358
-
359
- if ($m <= 2) {
360
- a = $y - 1;
361
- b = (a / 4 | 0) - (a / 100 | 0) + (a / 400 | 0);
362
- c = ((a - 1) / 4 | 0) - ((a - 1) / 100 | 0) + ((a - 1) / 400 | 0);
363
- s = b - c;
364
- e = 0;
365
- f = $d - 1 + (31 * ($m - 1));
366
- } else {
367
- a = $y;
368
- b = (a / 4 | 0) - (a / 100 | 0) + (a / 400 | 0);
369
- c = ((a - 1) / 4 | 0) - ((a - 1) / 100 | 0) + ((a - 1) / 400 | 0);
370
- s = b - c;
371
- e = s + 1;
372
- f = $d + ((153 * ($m - 3) + 2) / 5) + 58 + s;
373
- }
374
-
375
- g = (a + b) % 7;
376
- d = (f + g - e) % 7;
377
- n = (f + 3 - d) | 0;
378
-
379
- if (n < 0) {
380
- w = 53 - ((g - s) / 5 | 0);
381
- } else if (n > 364 + s) {
382
- w = 1;
383
- } else {
384
- w = (n / 7 | 0) + 1;
385
- }
386
-
387
- $y = $m = $d = null;
388
-
389
- return w;
390
- };
391
-
392
- /**
393
- * Get the ISO 8601 week number. Week one ("01") is the week which contains the first Thursday of the year. Monday is considered the first day of the week.
394
- * The .getISOWeek() function does convert the date to it's UTC value. Please use .getWeek() to get the week of the local date.
395
- * @return {String} "01" to "53"
396
- */
397
- $P.getISOWeek = function () {
398
- $y = this.getUTCFullYear();
399
- $m = this.getUTCMonth() + 1;
400
- $d = this.getUTCDate();
401
- return p(this.getWeek());
402
- };
403
-
404
- /**
405
- * Moves the date to Monday of the week set. Week one (1) is the week which contains the first Thursday of the year.
406
- * @param {Number} A Number (1 to 53) that represents the week of the year.
407
- * @return {Date} this
408
- */
409
- $P.setWeek = function (n) {
410
- return this.moveToDayOfWeek(1).addWeeks(n - this.getWeek());
411
- };
412
-
413
- // private
414
- var validate = function (n, min, max, name) {
415
- if (typeof n == "undefined") {
416
- return false;
417
- } else if (typeof n != "number") {
418
- throw new TypeError(n + " is not a Number.");
419
- } else if (n < min || n > max) {
420
- throw new RangeError(n + " is not a valid value for " + name + ".");
421
- }
422
- return true;
423
- };
424
-
425
- /**
426
- * Validates the number is within an acceptable range for milliseconds [0-999].
427
- * @param {Number} The number to check if within range.
428
- * @return {Boolean} true if within range, otherwise false.
429
- */
430
- $D.validateMillisecond = function (value) {
431
- return validate(value, 0, 999, "millisecond");
432
- };
433
-
434
- /**
435
- * Validates the number is within an acceptable range for seconds [0-59].
436
- * @param {Number} The number to check if within range.
437
- * @return {Boolean} true if within range, otherwise false.
438
- */
439
- $D.validateSecond = function (value) {
440
- return validate(value, 0, 59, "second");
441
- };
442
-
443
- /**
444
- * Validates the number is within an acceptable range for minutes [0-59].
445
- * @param {Number} The number to check if within range.
446
- * @return {Boolean} true if within range, otherwise false.
447
- */
448
- $D.validateMinute = function (value) {
449
- return validate(value, 0, 59, "minute");
450
- };
451
-
452
- /**
453
- * Validates the number is within an acceptable range for hours [0-23].
454
- * @param {Number} The number to check if within range.
455
- * @return {Boolean} true if within range, otherwise false.
456
- */
457
- $D.validateHour = function (value) {
458
- return validate(value, 0, 23, "hour");
459
- };
460
-
461
- /**
462
- * Validates the number is within an acceptable range for the days in a month [0-MaxDaysInMonth].
463
- * @param {Number} The number to check if within range.
464
- * @return {Boolean} true if within range, otherwise false.
465
- */
466
- $D.validateDay = function (value, year, month) {
467
- return validate(value, 1, $D.getDaysInMonth(year, month), "day");
468
- };
469
-
470
- /**
471
- * Validates the number is within an acceptable range for months [0-11].
472
- * @param {Number} The number to check if within range.
473
- * @return {Boolean} true if within range, otherwise false.
474
- */
475
- $D.validateMonth = function (value) {
476
- return validate(value, 0, 11, "month");
477
- };
478
-
479
- /**
480
- * Validates the number is within an acceptable range for years.
481
- * @param {Number} The number to check if within range.
482
- * @return {Boolean} true if within range, otherwise false.
483
- */
484
- $D.validateYear = function (value) {
485
- return validate(value, 0, 9999, "year");
486
- };
487
-
488
- /**
489
- * Set the value of year, month, day, hour, minute, second, millisecond of date instance using given configuration object.
490
- * Example
491
- <pre><code>
492
- Date.today().set( { day: 20, month: 1 } )
493
-
494
- new Date().set( { millisecond: 0 } )
495
- </code></pre>
496
- *
497
- * @param {Object} Configuration object containing attributes (month, day, etc.)
498
- * @return {Date} this
499
- */
500
- $P.set = function (config) {
501
- if ($D.validateMillisecond(config.millisecond)) {
502
- this.addMilliseconds(config.millisecond - this.getMilliseconds());
503
- }
504
-
505
- if ($D.validateSecond(config.second)) {
506
- this.addSeconds(config.second - this.getSeconds());
507
- }
508
-
509
- if ($D.validateMinute(config.minute)) {
510
- this.addMinutes(config.minute - this.getMinutes());
511
- }
512
-
513
- if ($D.validateHour(config.hour)) {
514
- this.addHours(config.hour - this.getHours());
515
- }
516
-
517
- if ($D.validateMonth(config.month)) {
518
- this.addMonths(config.month - this.getMonth());
519
- }
520
-
521
- if ($D.validateYear(config.year)) {
522
- this.addYears(config.year - this.getFullYear());
523
- }
524
-
525
- /* day has to go last because you can't validate the day without first knowing the month */
526
- if ($D.validateDay(config.day, this.getFullYear(), this.getMonth())) {
527
- this.addDays(config.day - this.getDate());
528
- }
529
-
530
- if (config.timezone) {
531
- this.setTimezone(config.timezone);
532
- }
533
-
534
- if (config.timezoneOffset) {
535
- this.setTimezoneOffset(config.timezoneOffset);
536
- }
537
-
538
- if (config.week && validate(config.week, 0, 53, "week")) {
539
- this.setWeek(config.week);
540
- }
541
-
542
- return this;
543
- };
544
-
545
- /**
546
- * Moves the date to the first day of the month.
547
- * @return {Date} this
548
- */
549
- $P.moveToFirstDayOfMonth = function () {
550
- return this.set({ day: 1 });
551
- };
552
-
553
- /**
554
- * Moves the date to the last day of the month.
555
- * @return {Date} this
556
- */
557
- $P.moveToLastDayOfMonth = function () {
558
- return this.set({ day: $D.getDaysInMonth(this.getFullYear(), this.getMonth())});
559
- };
560
-
561
- /**
562
- * Moves the date to the next n'th occurrence of the dayOfWeek starting from the beginning of the month. The number (-1) is a magic number and will return the last occurrence of the dayOfWeek in the month.
563
- * @param {Number} The dayOfWeek to move to
564
- * @param {Number} The n'th occurrence to move to. Use (-1) to return the last occurrence in the month
565
- * @return {Date} this
566
- */
567
- $P.moveToNthOccurrence = function (dayOfWeek, occurrence) {
568
- var shift = 0;
569
- if (occurrence > 0) {
570
- shift = occurrence - 1;
571
- }
572
- else if (occurrence === -1) {
573
- this.moveToLastDayOfMonth();
574
- if (this.getDay() !== dayOfWeek) {
575
- this.moveToDayOfWeek(dayOfWeek, -1);
576
- }
577
- return this;
578
- }
579
- return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(dayOfWeek, +1).addWeeks(shift);
580
- };
581
-
582
- /**
583
- * Move to the next or last dayOfWeek based on the orient value.
584
- * @param {Number} The dayOfWeek to move to
585
- * @param {Number} Forward (+1) or Back (-1). Defaults to +1. [Optional]
586
- * @return {Date} this
587
- */
588
- $P.moveToDayOfWeek = function (dayOfWeek, orient) {
589
- var diff = (dayOfWeek - this.getDay() + 7 * (orient || +1)) % 7;
590
- return this.addDays((diff === 0) ? diff += 7 * (orient || +1) : diff);
591
- };
592
-
593
- /**
594
- * Move to the next or last month based on the orient value.
595
- * @param {Number} The month to move to. 0 = January, 11 = December
596
- * @param {Number} Forward (+1) or Back (-1). Defaults to +1. [Optional]
597
- * @return {Date} this
598
- */
599
- $P.moveToMonth = function (month, orient) {
600
- var diff = (month - this.getMonth() + 12 * (orient || +1)) % 12;
601
- return this.addMonths((diff === 0) ? diff += 12 * (orient || +1) : diff);
602
- };
603
-
604
- /**
605
- * Get the Ordinal day (numeric day number) of the year, adjusted for leap year.
606
- * @return {Number} 1 through 365 (366 in leap years)
607
- */
608
- $P.getOrdinalNumber = function () {
609
- return Math.ceil((this.clone().clearTime() - new Date(this.getFullYear(), 0, 1)) / 86400000) + 1;
610
- };
611
-
612
- /**
613
- * Get the time zone abbreviation of the current date.
614
- * @return {String} The abbreviated time zone name (e.g. "EST")
615
- */
616
- $P.getTimezone = function () {
617
- return $D.getTimezoneAbbreviation(this.getUTCOffset());
618
- };
619
-
620
- $P.setTimezoneOffset = function (offset) {
621
- var here = this.getTimezoneOffset(), there = Number(offset) * -6 / 10;
622
- return this.addMinutes(there - here);
623
- };
624
-
625
- $P.setTimezone = function (offset) {
626
- return this.setTimezoneOffset($D.getTimezoneOffset(offset));
627
- };
628
-
629
- /**
630
- * Indicates whether Daylight Saving Time is observed in the current time zone.
631
- * @return {Boolean} true|false
632
- */
633
- $P.hasDaylightSavingTime = function () {
634
- return (Date.today().set({month: 0, day: 1}).getTimezoneOffset() !== Date.today().set({month: 6, day: 1}).getTimezoneOffset());
635
- };
636
-
637
- /**
638
- * Indicates whether this Date instance is within the Daylight Saving Time range for the current time zone.
639
- * @return {Boolean} true|false
640
- */
641
- $P.isDaylightSavingTime = function () {
642
- return Date.today().set({month: 0, day: 1}).getTimezoneOffset() != this.getTimezoneOffset();
643
- };
644
-
645
- /**
646
- * Get the offset from UTC of the current date.
647
- * @return {String} The 4-character offset string prefixed with + or - (e.g. "-0500")
648
- */
649
- $P.getUTCOffset = function () {
650
- var n = this.getTimezoneOffset() * -10 / 6, r;
651
- if (n < 0) {
652
- r = (n - 10000).toString();
653
- return r.charAt(0) + r.substr(2);
654
- } else {
655
- r = (n + 10000).toString();
656
- return "+" + r.substr(1);
657
- }
658
- };
659
-
660
- /**
661
- * Returns the number of milliseconds between this date and date.
662
- * @param {Date} Defaults to now
663
- * @return {Number} The diff in milliseconds
664
- */
665
- $P.getElapsed = function (date) {
666
- return (date || new Date()) - this;
667
- };
668
-
669
- if (!$P.toISOString) {
670
- /**
671
- * Converts the current date instance into a string with an ISO 8601 format. The date is converted to it's UTC value.
672
- * @return {String} ISO 8601 string of date
673
- */
674
- $P.toISOString = function () {
675
- // From http://www.json.org/json.js. Public Domain.
676
- function f(n) {
677
- return n < 10 ? '0' + n : n;
678
- }
679
-
680
- return '"' + this.getUTCFullYear() + '-' +
681
- f(this.getUTCMonth() + 1) + '-' +
682
- f(this.getUTCDate()) + 'T' +
683
- f(this.getUTCHours()) + ':' +
684
- f(this.getUTCMinutes()) + ':' +
685
- f(this.getUTCSeconds()) + 'Z"';
686
- };
687
- }
688
-
689
- // private
690
- $P._toString = $P.toString;
691
-
692
- /**
693
- * Converts the value of the current Date object to its equivalent string representation.
694
- * Format Specifiers
695
- <pre>
696
- CUSTOM DATE AND TIME FORMAT STRINGS
697
- Format Description Example
698
- ------ --------------------------------------------------------------------------- -----------------------
699
- s The seconds of the minute between 0-59. "0" to "59"
700
- ss The seconds of the minute with leading zero if required. "00" to "59"
701
-
702
- m The minute of the hour between 0-59. "0" or "59"
703
- mm The minute of the hour with leading zero if required. "00" or "59"
704
-
705
- h The hour of the day between 1-12. "1" to "12"
706
- hh The hour of the day with leading zero if required. "01" to "12"
707
-
708
- H The hour of the day between 0-23. "0" to "23"
709
- HH The hour of the day with leading zero if required. "00" to "23"
710
-
711
- d The day of the month between 1 and 31. "1" to "31"
712
- dd The day of the month with leading zero if required. "01" to "31"
713
- ddd Abbreviated day name. $C.abbreviatedDayNames. "Mon" to "Sun"
714
- dddd The full day name. $C.dayNames. "Monday" to "Sunday"
715
-
716
- M The month of the year between 1-12. "1" to "12"
717
- MM The month of the year with leading zero if required. "01" to "12"
718
- MMM Abbreviated month name. $C.abbreviatedMonthNames. "Jan" to "Dec"
719
- MMMM The full month name. $C.monthNames. "January" to "December"
720
-
721
- yy The year as a two-digit number. "99" or "08"
722
- yyyy The full four digit year. "1999" or "2008"
723
-
724
- t Displays the first character of the A.M./P.M. designator. "A" or "P"
725
- $C.amDesignator or $C.pmDesignator
726
- tt Displays the A.M./P.M. designator. "AM" or "PM"
727
- $C.amDesignator or $C.pmDesignator
728
-
729
- S The ordinal suffix ("st, "nd", "rd" or "th") of the current day. "st, "nd", "rd" or "th"
730
-
731
- || *Format* || *Description* || *Example* ||
732
- || d || The CultureInfo shortDate Format Pattern || "M/d/yyyy" ||
733
- || D || The CultureInfo longDate Format Pattern || "dddd, MMMM dd, yyyy" ||
734
- || F || The CultureInfo fullDateTime Format Pattern || "dddd, MMMM dd, yyyy h:mm:ss tt" ||
735
- || m || The CultureInfo monthDay Format Pattern || "MMMM dd" ||
736
- || r || The CultureInfo rfc1123 Format Pattern || "ddd, dd MMM yyyy HH:mm:ss GMT" ||
737
- || s || The CultureInfo sortableDateTime Format Pattern || "yyyy-MM-ddTHH:mm:ss" ||
738
- || t || The CultureInfo shortTime Format Pattern || "h:mm tt" ||
739
- || T || The CultureInfo longTime Format Pattern || "h:mm:ss tt" ||
740
- || u || The CultureInfo universalSortableDateTime Format Pattern || "yyyy-MM-dd HH:mm:ssZ" ||
741
- || y || The CultureInfo yearMonth Format Pattern || "MMMM, yyyy" ||
742
-
743
-
744
- STANDARD DATE AND TIME FORMAT STRINGS
745
- Format Description Example ("en-US")
746
- ------ --------------------------------------------------------------------------- -----------------------
747
- d The CultureInfo shortDate Format Pattern "M/d/yyyy"
748
- D The CultureInfo longDate Format Pattern "dddd, MMMM dd, yyyy"
749
- F The CultureInfo fullDateTime Format Pattern "dddd, MMMM dd, yyyy h:mm:ss tt"
750
- m The CultureInfo monthDay Format Pattern "MMMM dd"
751
- r The CultureInfo rfc1123 Format Pattern "ddd, dd MMM yyyy HH:mm:ss GMT"
752
- s The CultureInfo sortableDateTime Format Pattern "yyyy-MM-ddTHH:mm:ss"
753
- t The CultureInfo shortTime Format Pattern "h:mm tt"
754
- T The CultureInfo longTime Format Pattern "h:mm:ss tt"
755
- u The CultureInfo universalSortableDateTime Format Pattern "yyyy-MM-dd HH:mm:ssZ"
756
- y The CultureInfo yearMonth Format Pattern "MMMM, yyyy"
757
- </pre>
758
- * @param {String} A format string consisting of one or more format spcifiers [Optional].
759
- * @return {String} A string representation of the current Date object.
760
- */
761
- $P.toString = function (format) {
762
- var x = this;
763
-
764
- // Standard Date and Time Format Strings. Formats pulled from CultureInfo file and
765
- // may vary by culture.
766
- if (format && format.length == 1) {
767
- var c = $C.formatPatterns;
768
- x.t = x.toString;
769
- switch (format) {
770
- case "d":
771
- return x.t(c.shortDate);
772
- case "D":
773
- return x.t(c.longDate);
774
- case "F":
775
- return x.t(c.fullDateTime);
776
- case "m":
777
- return x.t(c.monthDay);
778
- case "r":
779
- return x.t(c.rfc1123);
780
- case "s":
781
- return x.t(c.sortableDateTime);
782
- case "t":
783
- return x.t(c.shortTime);
784
- case "T":
785
- return x.t(c.longTime);
786
- case "u":
787
- return x.t(c.universalSortableDateTime);
788
- case "y":
789
- return x.t(c.yearMonth);
790
- }
791
- }
792
-
793
- var ord = function (n) {
794
- switch (n * 1) {
795
- case 1:
796
- case 21:
797
- case 31:
798
- return "st";
799
- case 2:
800
- case 22:
801
- return "nd";
802
- case 3:
803
- case 23:
804
- return "rd";
805
- default:
806
- return "th";
807
- }
808
- };
809
-
810
- return format ? format.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,
811
- function (m) {
812
- if (m.charAt(0) === "\\") {
813
- return m.replace("\\", "");
814
- }
815
- x.h = x.getHours;
816
- switch (m) {
817
- case "hh":
818
- return p(x.h() < 13 ? (x.h() === 0 ? 12 : x.h()) : (x.h() - 12));
819
- case "h":
820
- return x.h() < 13 ? (x.h() === 0 ? 12 : x.h()) : (x.h() - 12);
821
- case "HH":
822
- return p(x.h());
823
- case "H":
824
- return x.h();
825
- case "mm":
826
- return p(x.getMinutes());
827
- case "m":
828
- return x.getMinutes();
829
- case "ss":
830
- return p(x.getSeconds());
831
- case "s":
832
- return x.getSeconds();
833
- case "yyyy":
834
- return p(x.getFullYear(), 4);
835
- case "yy":
836
- return p(x.getFullYear());
837
- case "dddd":
838
- return $C.dayNames[x.getDay()];
839
- case "ddd":
840
- return $C.abbreviatedDayNames[x.getDay()];
841
- case "dd":
842
- return p(x.getDate());
843
- case "d":
844
- return x.getDate();
845
- case "MMMM":
846
- return $C.monthNames[x.getMonth()];
847
- case "MMM":
848
- return $C.abbreviatedMonthNames[x.getMonth()];
849
- case "MM":
850
- return p((x.getMonth() + 1));
851
- case "M":
852
- return x.getMonth() + 1;
853
- case "t":
854
- return x.h() < 12 ? $C.amDesignator.substring(0, 1) : $C.pmDesignator.substring(0, 1);
855
- case "tt":
856
- return x.h() < 12 ? $C.amDesignator : $C.pmDesignator;
857
- case "S":
858
- return ord(x.getDate());
859
- default:
860
- return m;
861
- }
862
- }
863
- ) : this._toString();
864
- };
865
- }());