javascriptmvc 3.0.0.pre15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (550) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/README.markdown +15 -0
  4. data/Rakefile +17 -0
  5. data/VERSION +1 -0
  6. data/bin/jmvc-build +4 -0
  7. data/bin/jmvc-gen +4 -0
  8. data/bin/jmvc-get +4 -0
  9. data/bin/jmvc-init +4 -0
  10. data/bin/jmvc-update +4 -0
  11. data/lib/javascriptmvc.rb +97 -0
  12. data/lib/javascriptmvc/documentjs/README +0 -0
  13. data/lib/javascriptmvc/documentjs/add.js +76 -0
  14. data/lib/javascriptmvc/documentjs/application.js +285 -0
  15. data/lib/javascriptmvc/documentjs/attribute.js +61 -0
  16. data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
  17. data/lib/javascriptmvc/documentjs/class.js +141 -0
  18. data/lib/javascriptmvc/documentjs/constructor.js +145 -0
  19. data/lib/javascriptmvc/documentjs/directives.js +394 -0
  20. data/lib/javascriptmvc/documentjs/distance.js +49 -0
  21. data/lib/javascriptmvc/documentjs/document +21 -0
  22. data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
  23. data/lib/javascriptmvc/documentjs/file.js +55 -0
  24. data/lib/javascriptmvc/documentjs/function.js +112 -0
  25. data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
  26. data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
  27. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
  28. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
  29. data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
  30. data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
  31. data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
  32. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  33. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  34. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  35. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  36. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  37. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  38. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  39. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  40. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
  41. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
  42. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
  43. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
  44. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  45. data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
  46. data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
  47. data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
  48. data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
  49. data/lib/javascriptmvc/documentjs/json.js +172 -0
  50. data/lib/javascriptmvc/documentjs/page.js +107 -0
  51. data/lib/javascriptmvc/documentjs/pair.js +302 -0
  52. data/lib/javascriptmvc/documentjs/prototype.js +13 -0
  53. data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
  54. data/lib/javascriptmvc/documentjs/static.js +25 -0
  55. data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
  56. data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
  57. data/lib/javascriptmvc/documentjs/test/something.js +8 -0
  58. data/lib/javascriptmvc/documentjs/test/test.html +6 -0
  59. data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
  60. data/lib/javascriptmvc/documentjs/update +5 -0
  61. data/lib/javascriptmvc/funcunit/README +17 -0
  62. data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
  63. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
  64. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
  65. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
  66. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
  67. data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
  68. data/lib/javascriptmvc/funcunit/build.js +54 -0
  69. data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
  70. data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
  71. data/lib/javascriptmvc/funcunit/envjs +13 -0
  72. data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
  73. data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
  74. data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
  75. data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
  76. data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
  77. data/lib/javascriptmvc/funcunit/qunit.html +22 -0
  78. data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
  79. data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
  80. data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
  81. data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
  82. data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
  83. data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
  84. data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
  85. data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
  86. data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
  87. data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
  88. data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
  89. data/lib/javascriptmvc/funcunit/settings.js +10 -0
  90. data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
  91. data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
  92. data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
  93. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
  94. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
  95. data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
  96. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
  97. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
  98. data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
  99. data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
  100. data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
  101. data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
  102. data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
  103. data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
  104. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
  105. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
  106. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
  107. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
  108. data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
  109. data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
  110. data/lib/javascriptmvc/funcunit/template.html +18 -0
  111. data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
  112. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
  113. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
  114. data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
  115. data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
  116. data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
  117. data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
  118. data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
  119. data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
  120. data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
  121. data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
  122. data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
  123. data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
  124. data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
  125. data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
  126. data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
  127. data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
  128. data/lib/javascriptmvc/funcunit/update +5 -0
  129. data/lib/javascriptmvc/jquery/README +24 -0
  130. data/lib/javascriptmvc/jquery/build.js +73 -0
  131. data/lib/javascriptmvc/jquery/class/class.html +109 -0
  132. data/lib/javascriptmvc/jquery/class/class.js +627 -0
  133. data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
  134. data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
  135. data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
  136. data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
  137. data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
  138. data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
  139. data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
  140. data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
  141. data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
  142. data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
  143. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
  144. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
  145. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
  146. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
  147. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
  148. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
  149. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
  150. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
  151. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
  152. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
  153. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
  154. data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
  155. data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
  156. data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
  157. data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
  158. data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
  159. data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
  160. data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
  161. data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
  162. data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
  163. data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
  164. data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
  165. data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
  166. data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
  167. data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
  168. data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
  169. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
  170. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
  171. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
  172. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
  173. data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
  174. data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
  175. data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
  176. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
  177. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
  178. data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
  179. data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
  180. data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
  181. data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
  182. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
  183. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
  184. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
  185. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
  186. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
  187. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
  188. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
  189. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
  190. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
  191. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
  192. data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
  193. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
  194. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
  195. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
  196. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
  197. data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
  198. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
  199. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
  200. data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
  201. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
  202. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
  203. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
  204. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
  205. data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
  206. data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
  207. data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
  208. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
  209. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
  210. data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
  211. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
  212. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
  213. data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
  214. data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
  215. data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
  216. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
  217. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
  218. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
  219. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
  220. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
  221. data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
  222. data/lib/javascriptmvc/jquery/error/background.png +0 -0
  223. data/lib/javascriptmvc/jquery/error/error.html +31 -0
  224. data/lib/javascriptmvc/jquery/error/error.js +227 -0
  225. data/lib/javascriptmvc/jquery/error/setup.js +4 -0
  226. data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
  227. data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
  228. data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
  229. data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
  230. data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
  231. data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
  232. data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
  233. data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
  234. data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
  235. data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
  236. data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
  237. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
  238. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
  239. data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
  240. data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
  241. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
  242. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
  243. data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
  244. data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
  245. data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
  246. data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
  247. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
  248. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
  249. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
  250. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
  251. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
  252. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
  253. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
  254. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
  255. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
  256. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
  257. data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
  258. data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
  259. data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
  260. data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
  261. data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
  262. data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
  263. data/lib/javascriptmvc/jquery/event/event.js +6 -0
  264. data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
  265. data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
  266. data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
  267. data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
  268. data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
  269. data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
  270. data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
  271. data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
  272. data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
  273. data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
  274. data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
  275. data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
  276. data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
  277. data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
  278. data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
  279. data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
  280. data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
  281. data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
  282. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
  283. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
  284. data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
  285. data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
  286. data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
  287. data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
  288. data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
  289. data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
  290. data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
  291. data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
  292. data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
  293. data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
  294. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
  295. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
  296. data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
  297. data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
  298. data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
  299. data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
  300. data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
  301. data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
  302. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
  303. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
  304. data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
  305. data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
  306. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
  307. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
  308. data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
  309. data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
  310. data/lib/javascriptmvc/jquery/generate/app +23 -0
  311. data/lib/javascriptmvc/jquery/generate/controller +21 -0
  312. data/lib/javascriptmvc/jquery/generate/model +26 -0
  313. data/lib/javascriptmvc/jquery/generate/page +20 -0
  314. data/lib/javascriptmvc/jquery/generate/plugin +20 -0
  315. data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
  316. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
  317. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
  318. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
  319. data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
  320. data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
  321. data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
  322. data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
  323. data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
  324. data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
  325. data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
  326. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
  327. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
  328. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
  329. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
  330. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
  331. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
  332. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
  333. data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
  334. data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
  335. data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
  336. data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
  337. data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
  338. data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
  339. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
  340. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
  341. data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
  342. data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
  343. data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
  344. data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
  345. data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
  346. data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
  347. data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
  348. data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
  349. data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
  350. data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
  351. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
  352. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
  353. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
  354. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
  355. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
  356. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
  357. data/lib/javascriptmvc/jquery/jquery.js +6360 -0
  358. data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
  359. data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
  360. data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
  361. data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
  362. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
  363. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
  364. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
  365. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
  366. data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
  367. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
  368. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
  369. data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
  370. data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
  371. data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
  372. data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
  373. data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
  374. data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
  375. data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
  376. data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
  377. data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
  378. data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
  379. data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
  380. data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
  381. data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
  382. data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
  383. data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
  384. data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
  385. data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
  386. data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
  387. data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
  388. data/lib/javascriptmvc/jquery/model/model.js +537 -0
  389. data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
  390. data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
  391. data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
  392. data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
  393. data/lib/javascriptmvc/jquery/qunit.html +15 -0
  394. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
  395. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
  396. data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
  397. data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
  398. data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
  399. data/lib/javascriptmvc/jquery/update +5 -0
  400. data/lib/javascriptmvc/jquery/view/compress.js +7 -0
  401. data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
  402. data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
  403. data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
  404. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
  405. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
  406. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
  407. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
  408. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
  409. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
  410. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
  411. data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
  412. data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
  413. data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
  414. data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
  415. data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
  416. data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
  417. data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
  418. data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
  419. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
  420. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
  421. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
  422. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
  423. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
  424. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
  425. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
  426. data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
  427. data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
  428. data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
  429. data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
  430. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
  431. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
  432. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
  433. data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
  434. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
  435. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
  436. data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
  437. data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
  438. data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
  439. data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
  440. data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
  441. data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
  442. data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
  443. data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
  444. data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
  445. data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
  446. data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
  447. data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
  448. data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
  449. data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
  450. data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
  451. data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
  452. data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
  453. data/lib/javascriptmvc/jquery/view/view.html +65 -0
  454. data/lib/javascriptmvc/jquery/view/view.js +296 -0
  455. data/lib/javascriptmvc/js +56 -0
  456. data/lib/javascriptmvc/js.bat +57 -0
  457. data/lib/javascriptmvc/steal/README +26 -0
  458. data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
  459. data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
  460. data/lib/javascriptmvc/steal/build/build.js +281 -0
  461. data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
  462. data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
  463. data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
  464. data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
  465. data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
  466. data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
  467. data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
  468. data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
  469. data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
  470. data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
  471. data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
  472. data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
  473. data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
  474. data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
  475. data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
  476. data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
  477. data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
  478. data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
  479. data/lib/javascriptmvc/steal/build/test/run.js +57 -0
  480. data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
  481. data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
  482. data/lib/javascriptmvc/steal/build/test/test.js +3 -0
  483. data/lib/javascriptmvc/steal/buildjs +21 -0
  484. data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
  485. data/lib/javascriptmvc/steal/clean/clean.js +179 -0
  486. data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
  487. data/lib/javascriptmvc/steal/clean/test.js +7 -0
  488. data/lib/javascriptmvc/steal/cleanjs +5 -0
  489. data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
  490. data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
  491. data/lib/javascriptmvc/steal/dev/dev.js +83 -0
  492. data/lib/javascriptmvc/steal/end.js +1 -0
  493. data/lib/javascriptmvc/steal/generate/app +23 -0
  494. data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
  495. data/lib/javascriptmvc/steal/generate/generate.js +211 -0
  496. data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
  497. data/lib/javascriptmvc/steal/generate/system.js +33 -0
  498. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
  499. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
  500. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
  501. data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
  502. data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
  503. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
  504. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
  505. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
  506. data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
  507. data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
  508. data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
  509. data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
  510. data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
  511. data/lib/javascriptmvc/steal/get/get.js +163 -0
  512. data/lib/javascriptmvc/steal/get/gets.json +10 -0
  513. data/lib/javascriptmvc/steal/get/getter.js +115 -0
  514. data/lib/javascriptmvc/steal/get/github.js +134 -0
  515. data/lib/javascriptmvc/steal/get/json.js +172 -0
  516. data/lib/javascriptmvc/steal/getjs +5 -0
  517. data/lib/javascriptmvc/steal/js +56 -0
  518. data/lib/javascriptmvc/steal/js.bat +57 -0
  519. data/lib/javascriptmvc/steal/less/less.js +117 -0
  520. data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
  521. data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
  522. data/lib/javascriptmvc/steal/rhino/build.js +31 -0
  523. data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
  524. data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
  525. data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
  526. data/lib/javascriptmvc/steal/rhino/file.js +299 -0
  527. data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
  528. data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
  529. data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
  530. data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
  531. data/lib/javascriptmvc/steal/rhino/test.js +16 -0
  532. data/lib/javascriptmvc/steal/steal.js +1317 -0
  533. data/lib/javascriptmvc/steal/steal.production.js +23 -0
  534. data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
  535. data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
  536. data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
  537. data/lib/javascriptmvc/steal/test/another/two.js +2 -0
  538. data/lib/javascriptmvc/steal/test/one/four.js +1 -0
  539. data/lib/javascriptmvc/steal/test/one/one.js +6 -0
  540. data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
  541. data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
  542. data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
  543. data/lib/javascriptmvc/steal/test/run.js +12 -0
  544. data/lib/javascriptmvc/steal/test/steal.html +37 -0
  545. data/lib/javascriptmvc/steal/test/test.js +82 -0
  546. data/lib/javascriptmvc/steal/test/three.js +3 -0
  547. data/lib/javascriptmvc/steal/testing/test.html +20 -0
  548. data/lib/javascriptmvc/steal/testing/testing.js +48 -0
  549. data/lib/javascriptmvc/steal/update +5 -0
  550. metadata +622 -0
@@ -0,0 +1,1123 @@
1
+ // script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
2
+
3
+ // Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4
+ // Contributors:
5
+ // Justin Palmer (http://encytemedia.com/)
6
+ // Mark Pilgrim (http://diveintomark.org/)
7
+ // Martin Bialasinki
8
+ //
9
+ // script.aculo.us is freely distributable under the terms of an MIT-style license.
10
+ // For details, see the script.aculo.us web site: http://script.aculo.us/
11
+
12
+ // converts rgb() and #xxx to #xxxxxx format,
13
+ // returns self (or first argument) if not convertable
14
+ String.prototype.parseColor = function() {
15
+ var color = '#';
16
+ if (this.slice(0,4) == 'rgb(') {
17
+ var cols = this.slice(4,this.length-1).split(',');
18
+ var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
19
+ } else {
20
+ if (this.slice(0,1) == '#') {
21
+ if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
22
+ if (this.length==7) color = this.toLowerCase();
23
+ }
24
+ }
25
+ return (color.length==7 ? color : (arguments[0] || this));
26
+ };
27
+
28
+ /*--------------------------------------------------------------------------*/
29
+
30
+ Element.collectTextNodes = function(element) {
31
+ return $A($(element).childNodes).collect( function(node) {
32
+ return (node.nodeType==3 ? node.nodeValue :
33
+ (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
34
+ }).flatten().join('');
35
+ };
36
+
37
+ Element.collectTextNodesIgnoreClass = function(element, className) {
38
+ return $A($(element).childNodes).collect( function(node) {
39
+ return (node.nodeType==3 ? node.nodeValue :
40
+ ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
41
+ Element.collectTextNodesIgnoreClass(node, className) : ''));
42
+ }).flatten().join('');
43
+ };
44
+
45
+ Element.setContentZoom = function(element, percent) {
46
+ element = $(element);
47
+ element.setStyle({fontSize: (percent/100) + 'em'});
48
+ if (Prototype.Browser.WebKit) window.scrollBy(0,0);
49
+ return element;
50
+ };
51
+
52
+ Element.getInlineOpacity = function(element){
53
+ return $(element).style.opacity || '';
54
+ };
55
+
56
+ Element.forceRerendering = function(element) {
57
+ try {
58
+ element = $(element);
59
+ var n = document.createTextNode(' ');
60
+ element.appendChild(n);
61
+ element.removeChild(n);
62
+ } catch(e) { }
63
+ };
64
+
65
+ /*--------------------------------------------------------------------------*/
66
+
67
+ var Effect = {
68
+ _elementDoesNotExistError: {
69
+ name: 'ElementDoesNotExistError',
70
+ message: 'The specified DOM element does not exist, but is required for this effect to operate'
71
+ },
72
+ Transitions: {
73
+ linear: Prototype.K,
74
+ sinoidal: function(pos) {
75
+ return (-Math.cos(pos*Math.PI)/2) + 0.5;
76
+ },
77
+ reverse: function(pos) {
78
+ return 1-pos;
79
+ },
80
+ flicker: function(pos) {
81
+ var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
82
+ return pos > 1 ? 1 : pos;
83
+ },
84
+ wobble: function(pos) {
85
+ return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
86
+ },
87
+ pulse: function(pos, pulses) {
88
+ return (-Math.cos((pos*((pulses||5)-0.5)*2)*Math.PI)/2) + 0.5;
89
+ },
90
+ spring: function(pos) {
91
+ return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
92
+ },
93
+ none: function(pos) {
94
+ return 0;
95
+ },
96
+ full: function(pos) {
97
+ return 1;
98
+ }
99
+ },
100
+ DefaultOptions: {
101
+ duration: 1.0, // seconds
102
+ fps: 100, // 100= assume 66fps max.
103
+ sync: false, // true for combining
104
+ from: 0.0,
105
+ to: 1.0,
106
+ delay: 0.0,
107
+ queue: 'parallel'
108
+ },
109
+ tagifyText: function(element) {
110
+ var tagifyStyle = 'position:relative';
111
+ if (Prototype.Browser.IE) tagifyStyle += ';zoom:1';
112
+
113
+ element = $(element);
114
+ $A(element.childNodes).each( function(child) {
115
+ if (child.nodeType==3) {
116
+ child.nodeValue.toArray().each( function(character) {
117
+ element.insertBefore(
118
+ new Element('span', {style: tagifyStyle}).update(
119
+ character == ' ' ? String.fromCharCode(160) : character),
120
+ child);
121
+ });
122
+ Element.remove(child);
123
+ }
124
+ });
125
+ },
126
+ multiple: function(element, effect) {
127
+ var elements;
128
+ if (((typeof element == 'object') ||
129
+ Object.isFunction(element)) &&
130
+ (element.length))
131
+ elements = element;
132
+ else
133
+ elements = $(element).childNodes;
134
+
135
+ var options = Object.extend({
136
+ speed: 0.1,
137
+ delay: 0.0
138
+ }, arguments[2] || { });
139
+ var masterDelay = options.delay;
140
+
141
+ $A(elements).each( function(element, index) {
142
+ new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
143
+ });
144
+ },
145
+ PAIRS: {
146
+ 'slide': ['SlideDown','SlideUp'],
147
+ 'blind': ['BlindDown','BlindUp'],
148
+ 'appear': ['Appear','Fade']
149
+ },
150
+ toggle: function(element, effect, options) {
151
+ element = $(element);
152
+ effect = (effect || 'appear').toLowerCase();
153
+
154
+ return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({
155
+ queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
156
+ }, options || {}));
157
+ }
158
+ };
159
+
160
+ Effect.DefaultOptions.transition = Effect.Transitions.sinoidal;
161
+
162
+ /* ------------- core effects ------------- */
163
+
164
+ Effect.ScopedQueue = Class.create(Enumerable, {
165
+ initialize: function() {
166
+ this.effects = [];
167
+ this.interval = null;
168
+ },
169
+ _each: function(iterator) {
170
+ this.effects._each(iterator);
171
+ },
172
+ add: function(effect) {
173
+ var timestamp = new Date().getTime();
174
+
175
+ var position = Object.isString(effect.options.queue) ?
176
+ effect.options.queue : effect.options.queue.position;
177
+
178
+ switch(position) {
179
+ case 'front':
180
+ // move unstarted effects after this effect
181
+ this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
182
+ e.startOn += effect.finishOn;
183
+ e.finishOn += effect.finishOn;
184
+ });
185
+ break;
186
+ case 'with-last':
187
+ timestamp = this.effects.pluck('startOn').max() || timestamp;
188
+ break;
189
+ case 'end':
190
+ // start effect after last queued effect has finished
191
+ timestamp = this.effects.pluck('finishOn').max() || timestamp;
192
+ break;
193
+ }
194
+
195
+ effect.startOn += timestamp;
196
+ effect.finishOn += timestamp;
197
+
198
+ if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
199
+ this.effects.push(effect);
200
+
201
+ if (!this.interval)
202
+ this.interval = setInterval(this.loop.bind(this), 15);
203
+ },
204
+ remove: function(effect) {
205
+ this.effects = this.effects.reject(function(e) { return e==effect });
206
+ if (this.effects.length == 0) {
207
+ clearInterval(this.interval);
208
+ this.interval = null;
209
+ }
210
+ },
211
+ loop: function() {
212
+ var timePos = new Date().getTime();
213
+ for(var i=0, len=this.effects.length;i<len;i++)
214
+ this.effects[i] && this.effects[i].loop(timePos);
215
+ }
216
+ });
217
+
218
+ Effect.Queues = {
219
+ instances: $H(),
220
+ get: function(queueName) {
221
+ if (!Object.isString(queueName)) return queueName;
222
+
223
+ return this.instances.get(queueName) ||
224
+ this.instances.set(queueName, new Effect.ScopedQueue());
225
+ }
226
+ };
227
+ Effect.Queue = Effect.Queues.get('global');
228
+
229
+ Effect.Base = Class.create({
230
+ position: null,
231
+ start: function(options) {
232
+ if (options && options.transition === false) options.transition = Effect.Transitions.linear;
233
+ this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { });
234
+ this.currentFrame = 0;
235
+ this.state = 'idle';
236
+ this.startOn = this.options.delay*1000;
237
+ this.finishOn = this.startOn+(this.options.duration*1000);
238
+ this.fromToDelta = this.options.to-this.options.from;
239
+ this.totalTime = this.finishOn-this.startOn;
240
+ this.totalFrames = this.options.fps*this.options.duration;
241
+
242
+ this.render = (function() {
243
+ function dispatch(effect, eventName) {
244
+ if (effect.options[eventName + 'Internal'])
245
+ effect.options[eventName + 'Internal'](effect);
246
+ if (effect.options[eventName])
247
+ effect.options[eventName](effect);
248
+ }
249
+
250
+ return function(pos) {
251
+ if (this.state === "idle") {
252
+ this.state = "running";
253
+ dispatch(this, 'beforeSetup');
254
+ if (this.setup) this.setup();
255
+ dispatch(this, 'afterSetup');
256
+ }
257
+ if (this.state === "running") {
258
+ pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from;
259
+ this.position = pos;
260
+ dispatch(this, 'beforeUpdate');
261
+ if (this.update) this.update(pos);
262
+ dispatch(this, 'afterUpdate');
263
+ }
264
+ };
265
+ })();
266
+
267
+ this.event('beforeStart');
268
+ if (!this.options.sync)
269
+ Effect.Queues.get(Object.isString(this.options.queue) ?
270
+ 'global' : this.options.queue.scope).add(this);
271
+ },
272
+ loop: function(timePos) {
273
+ if (timePos >= this.startOn) {
274
+ if (timePos >= this.finishOn) {
275
+ this.render(1.0);
276
+ this.cancel();
277
+ this.event('beforeFinish');
278
+ if (this.finish) this.finish();
279
+ this.event('afterFinish');
280
+ return;
281
+ }
282
+ var pos = (timePos - this.startOn) / this.totalTime,
283
+ frame = (pos * this.totalFrames).round();
284
+ if (frame > this.currentFrame) {
285
+ this.render(pos);
286
+ this.currentFrame = frame;
287
+ }
288
+ }
289
+ },
290
+ cancel: function() {
291
+ if (!this.options.sync)
292
+ Effect.Queues.get(Object.isString(this.options.queue) ?
293
+ 'global' : this.options.queue.scope).remove(this);
294
+ this.state = 'finished';
295
+ },
296
+ event: function(eventName) {
297
+ if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
298
+ if (this.options[eventName]) this.options[eventName](this);
299
+ },
300
+ inspect: function() {
301
+ var data = $H();
302
+ for(property in this)
303
+ if (!Object.isFunction(this[property])) data.set(property, this[property]);
304
+ return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
305
+ }
306
+ });
307
+
308
+ Effect.Parallel = Class.create(Effect.Base, {
309
+ initialize: function(effects) {
310
+ this.effects = effects || [];
311
+ this.start(arguments[1]);
312
+ },
313
+ update: function(position) {
314
+ this.effects.invoke('render', position);
315
+ },
316
+ finish: function(position) {
317
+ this.effects.each( function(effect) {
318
+ effect.render(1.0);
319
+ effect.cancel();
320
+ effect.event('beforeFinish');
321
+ if (effect.finish) effect.finish(position);
322
+ effect.event('afterFinish');
323
+ });
324
+ }
325
+ });
326
+
327
+ Effect.Tween = Class.create(Effect.Base, {
328
+ initialize: function(object, from, to) {
329
+ object = Object.isString(object) ? $(object) : object;
330
+ var args = $A(arguments), method = args.last(),
331
+ options = args.length == 5 ? args[3] : null;
332
+ this.method = Object.isFunction(method) ? method.bind(object) :
333
+ Object.isFunction(object[method]) ? object[method].bind(object) :
334
+ function(value) { object[method] = value };
335
+ this.start(Object.extend({ from: from, to: to }, options || { }));
336
+ },
337
+ update: function(position) {
338
+ this.method(position);
339
+ }
340
+ });
341
+
342
+ Effect.Event = Class.create(Effect.Base, {
343
+ initialize: function() {
344
+ this.start(Object.extend({ duration: 0 }, arguments[0] || { }));
345
+ },
346
+ update: Prototype.emptyFunction
347
+ });
348
+
349
+ Effect.Opacity = Class.create(Effect.Base, {
350
+ initialize: function(element) {
351
+ this.element = $(element);
352
+ if (!this.element) throw(Effect._elementDoesNotExistError);
353
+ // make this work on IE on elements without 'layout'
354
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
355
+ this.element.setStyle({zoom: 1});
356
+ var options = Object.extend({
357
+ from: this.element.getOpacity() || 0.0,
358
+ to: 1.0
359
+ }, arguments[1] || { });
360
+ this.start(options);
361
+ },
362
+ update: function(position) {
363
+ this.element.setOpacity(position);
364
+ }
365
+ });
366
+
367
+ Effect.Move = Class.create(Effect.Base, {
368
+ initialize: function(element) {
369
+ this.element = $(element);
370
+ if (!this.element) throw(Effect._elementDoesNotExistError);
371
+ var options = Object.extend({
372
+ x: 0,
373
+ y: 0,
374
+ mode: 'relative'
375
+ }, arguments[1] || { });
376
+ this.start(options);
377
+ },
378
+ setup: function() {
379
+ this.element.makePositioned();
380
+ this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
381
+ this.originalTop = parseFloat(this.element.getStyle('top') || '0');
382
+ if (this.options.mode == 'absolute') {
383
+ this.options.x = this.options.x - this.originalLeft;
384
+ this.options.y = this.options.y - this.originalTop;
385
+ }
386
+ },
387
+ update: function(position) {
388
+ this.element.setStyle({
389
+ left: (this.options.x * position + this.originalLeft).round() + 'px',
390
+ top: (this.options.y * position + this.originalTop).round() + 'px'
391
+ });
392
+ }
393
+ });
394
+
395
+ // for backwards compatibility
396
+ Effect.MoveBy = function(element, toTop, toLeft) {
397
+ return new Effect.Move(element,
398
+ Object.extend({ x: toLeft, y: toTop }, arguments[3] || { }));
399
+ };
400
+
401
+ Effect.Scale = Class.create(Effect.Base, {
402
+ initialize: function(element, percent) {
403
+ this.element = $(element);
404
+ if (!this.element) throw(Effect._elementDoesNotExistError);
405
+ var options = Object.extend({
406
+ scaleX: true,
407
+ scaleY: true,
408
+ scaleContent: true,
409
+ scaleFromCenter: false,
410
+ scaleMode: 'box', // 'box' or 'contents' or { } with provided values
411
+ scaleFrom: 100.0,
412
+ scaleTo: percent
413
+ }, arguments[2] || { });
414
+ this.start(options);
415
+ },
416
+ setup: function() {
417
+ this.restoreAfterFinish = this.options.restoreAfterFinish || false;
418
+ this.elementPositioning = this.element.getStyle('position');
419
+
420
+ this.originalStyle = { };
421
+ ['top','left','width','height','fontSize'].each( function(k) {
422
+ this.originalStyle[k] = this.element.style[k];
423
+ }.bind(this));
424
+
425
+ this.originalTop = this.element.offsetTop;
426
+ this.originalLeft = this.element.offsetLeft;
427
+
428
+ var fontSize = this.element.getStyle('font-size') || '100%';
429
+ ['em','px','%','pt'].each( function(fontSizeType) {
430
+ if (fontSize.indexOf(fontSizeType)>0) {
431
+ this.fontSize = parseFloat(fontSize);
432
+ this.fontSizeType = fontSizeType;
433
+ }
434
+ }.bind(this));
435
+
436
+ this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
437
+
438
+ this.dims = null;
439
+ if (this.options.scaleMode=='box')
440
+ this.dims = [this.element.offsetHeight, this.element.offsetWidth];
441
+ if (/^content/.test(this.options.scaleMode))
442
+ this.dims = [this.element.scrollHeight, this.element.scrollWidth];
443
+ if (!this.dims)
444
+ this.dims = [this.options.scaleMode.originalHeight,
445
+ this.options.scaleMode.originalWidth];
446
+ },
447
+ update: function(position) {
448
+ var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
449
+ if (this.options.scaleContent && this.fontSize)
450
+ this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
451
+ this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
452
+ },
453
+ finish: function(position) {
454
+ if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
455
+ },
456
+ setDimensions: function(height, width) {
457
+ var d = { };
458
+ if (this.options.scaleX) d.width = width.round() + 'px';
459
+ if (this.options.scaleY) d.height = height.round() + 'px';
460
+ if (this.options.scaleFromCenter) {
461
+ var topd = (height - this.dims[0])/2;
462
+ var leftd = (width - this.dims[1])/2;
463
+ if (this.elementPositioning == 'absolute') {
464
+ if (this.options.scaleY) d.top = this.originalTop-topd + 'px';
465
+ if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
466
+ } else {
467
+ if (this.options.scaleY) d.top = -topd + 'px';
468
+ if (this.options.scaleX) d.left = -leftd + 'px';
469
+ }
470
+ }
471
+ this.element.setStyle(d);
472
+ }
473
+ });
474
+
475
+ Effect.Highlight = Class.create(Effect.Base, {
476
+ initialize: function(element) {
477
+ this.element = $(element);
478
+ if (!this.element) throw(Effect._elementDoesNotExistError);
479
+ var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { });
480
+ this.start(options);
481
+ },
482
+ setup: function() {
483
+ // Prevent executing on elements not in the layout flow
484
+ if (this.element.getStyle('display')=='none') { this.cancel(); return; }
485
+ // Disable background image during the effect
486
+ this.oldStyle = { };
487
+ if (!this.options.keepBackgroundImage) {
488
+ this.oldStyle.backgroundImage = this.element.getStyle('background-image');
489
+ this.element.setStyle({backgroundImage: 'none'});
490
+ }
491
+ if (!this.options.endcolor)
492
+ this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
493
+ if (!this.options.restorecolor)
494
+ this.options.restorecolor = this.element.getStyle('background-color');
495
+ // init color calculations
496
+ this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
497
+ this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
498
+ },
499
+ update: function(position) {
500
+ this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
501
+ return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });
502
+ },
503
+ finish: function() {
504
+ this.element.setStyle(Object.extend(this.oldStyle, {
505
+ backgroundColor: this.options.restorecolor
506
+ }));
507
+ }
508
+ });
509
+
510
+ Effect.ScrollTo = function(element) {
511
+ var options = arguments[1] || { },
512
+ scrollOffsets = document.viewport.getScrollOffsets(),
513
+ elementOffsets = $(element).cumulativeOffset();
514
+
515
+ if (options.offset) elementOffsets[1] += options.offset;
516
+
517
+ return new Effect.Tween(null,
518
+ scrollOffsets.top,
519
+ elementOffsets[1],
520
+ options,
521
+ function(p){ scrollTo(scrollOffsets.left, p.round()); }
522
+ );
523
+ };
524
+
525
+ /* ------------- combination effects ------------- */
526
+
527
+ Effect.Fade = function(element) {
528
+ element = $(element);
529
+ var oldOpacity = element.getInlineOpacity();
530
+ var options = Object.extend({
531
+ from: element.getOpacity() || 1.0,
532
+ to: 0.0,
533
+ afterFinishInternal: function(effect) {
534
+ if (effect.options.to!=0) return;
535
+ effect.element.hide().setStyle({opacity: oldOpacity});
536
+ }
537
+ }, arguments[1] || { });
538
+ return new Effect.Opacity(element,options);
539
+ };
540
+
541
+ Effect.Appear = function(element) {
542
+ element = $(element);
543
+ var options = Object.extend({
544
+ from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
545
+ to: 1.0,
546
+ // force Safari to render floated elements properly
547
+ afterFinishInternal: function(effect) {
548
+ effect.element.forceRerendering();
549
+ },
550
+ beforeSetup: function(effect) {
551
+ effect.element.setOpacity(effect.options.from).show();
552
+ }}, arguments[1] || { });
553
+ return new Effect.Opacity(element,options);
554
+ };
555
+
556
+ Effect.Puff = function(element) {
557
+ element = $(element);
558
+ var oldStyle = {
559
+ opacity: element.getInlineOpacity(),
560
+ position: element.getStyle('position'),
561
+ top: element.style.top,
562
+ left: element.style.left,
563
+ width: element.style.width,
564
+ height: element.style.height
565
+ };
566
+ return new Effect.Parallel(
567
+ [ new Effect.Scale(element, 200,
568
+ { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
569
+ new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
570
+ Object.extend({ duration: 1.0,
571
+ beforeSetupInternal: function(effect) {
572
+ Position.absolutize(effect.effects[0].element);
573
+ },
574
+ afterFinishInternal: function(effect) {
575
+ effect.effects[0].element.hide().setStyle(oldStyle); }
576
+ }, arguments[1] || { })
577
+ );
578
+ };
579
+
580
+ Effect.BlindUp = function(element) {
581
+ element = $(element);
582
+ element.makeClipping();
583
+ return new Effect.Scale(element, 0,
584
+ Object.extend({ scaleContent: false,
585
+ scaleX: false,
586
+ restoreAfterFinish: true,
587
+ afterFinishInternal: function(effect) {
588
+ effect.element.hide().undoClipping();
589
+ }
590
+ }, arguments[1] || { })
591
+ );
592
+ };
593
+
594
+ Effect.BlindDown = function(element) {
595
+ element = $(element);
596
+ var elementDimensions = element.getDimensions();
597
+ return new Effect.Scale(element, 100, Object.extend({
598
+ scaleContent: false,
599
+ scaleX: false,
600
+ scaleFrom: 0,
601
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
602
+ restoreAfterFinish: true,
603
+ afterSetup: function(effect) {
604
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
605
+ },
606
+ afterFinishInternal: function(effect) {
607
+ effect.element.undoClipping();
608
+ }
609
+ }, arguments[1] || { }));
610
+ };
611
+
612
+ Effect.SwitchOff = function(element) {
613
+ element = $(element);
614
+ var oldOpacity = element.getInlineOpacity();
615
+ return new Effect.Appear(element, Object.extend({
616
+ duration: 0.4,
617
+ from: 0,
618
+ transition: Effect.Transitions.flicker,
619
+ afterFinishInternal: function(effect) {
620
+ new Effect.Scale(effect.element, 1, {
621
+ duration: 0.3, scaleFromCenter: true,
622
+ scaleX: false, scaleContent: false, restoreAfterFinish: true,
623
+ beforeSetup: function(effect) {
624
+ effect.element.makePositioned().makeClipping();
625
+ },
626
+ afterFinishInternal: function(effect) {
627
+ effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
628
+ }
629
+ });
630
+ }
631
+ }, arguments[1] || { }));
632
+ };
633
+
634
+ Effect.DropOut = function(element) {
635
+ element = $(element);
636
+ var oldStyle = {
637
+ top: element.getStyle('top'),
638
+ left: element.getStyle('left'),
639
+ opacity: element.getInlineOpacity() };
640
+ return new Effect.Parallel(
641
+ [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
642
+ new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
643
+ Object.extend(
644
+ { duration: 0.5,
645
+ beforeSetup: function(effect) {
646
+ effect.effects[0].element.makePositioned();
647
+ },
648
+ afterFinishInternal: function(effect) {
649
+ effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
650
+ }
651
+ }, arguments[1] || { }));
652
+ };
653
+
654
+ Effect.Shake = function(element) {
655
+ element = $(element);
656
+ var options = Object.extend({
657
+ distance: 20,
658
+ duration: 0.5
659
+ }, arguments[1] || {});
660
+ var distance = parseFloat(options.distance);
661
+ var split = parseFloat(options.duration) / 10.0;
662
+ var oldStyle = {
663
+ top: element.getStyle('top'),
664
+ left: element.getStyle('left') };
665
+ return new Effect.Move(element,
666
+ { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) {
667
+ new Effect.Move(effect.element,
668
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
669
+ new Effect.Move(effect.element,
670
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
671
+ new Effect.Move(effect.element,
672
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
673
+ new Effect.Move(effect.element,
674
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
675
+ new Effect.Move(effect.element,
676
+ { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
677
+ effect.element.undoPositioned().setStyle(oldStyle);
678
+ }}); }}); }}); }}); }}); }});
679
+ };
680
+
681
+ Effect.SlideDown = function(element) {
682
+ element = $(element).cleanWhitespace();
683
+ // SlideDown need to have the content of the element wrapped in a container element with fixed height!
684
+ var oldInnerBottom = element.down().getStyle('bottom');
685
+ var elementDimensions = element.getDimensions();
686
+ return new Effect.Scale(element, 100, Object.extend({
687
+ scaleContent: false,
688
+ scaleX: false,
689
+ scaleFrom: window.opera ? 0 : 1,
690
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
691
+ restoreAfterFinish: true,
692
+ afterSetup: function(effect) {
693
+ effect.element.makePositioned();
694
+ effect.element.down().makePositioned();
695
+ if (window.opera) effect.element.setStyle({top: ''});
696
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
697
+ },
698
+ afterUpdateInternal: function(effect) {
699
+ effect.element.down().setStyle({bottom:
700
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
701
+ },
702
+ afterFinishInternal: function(effect) {
703
+ effect.element.undoClipping().undoPositioned();
704
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
705
+ }, arguments[1] || { })
706
+ );
707
+ };
708
+
709
+ Effect.SlideUp = function(element) {
710
+ element = $(element).cleanWhitespace();
711
+ var oldInnerBottom = element.down().getStyle('bottom');
712
+ var elementDimensions = element.getDimensions();
713
+ return new Effect.Scale(element, window.opera ? 0 : 1,
714
+ Object.extend({ scaleContent: false,
715
+ scaleX: false,
716
+ scaleMode: 'box',
717
+ scaleFrom: 100,
718
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
719
+ restoreAfterFinish: true,
720
+ afterSetup: function(effect) {
721
+ effect.element.makePositioned();
722
+ effect.element.down().makePositioned();
723
+ if (window.opera) effect.element.setStyle({top: ''});
724
+ effect.element.makeClipping().show();
725
+ },
726
+ afterUpdateInternal: function(effect) {
727
+ effect.element.down().setStyle({bottom:
728
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
729
+ },
730
+ afterFinishInternal: function(effect) {
731
+ effect.element.hide().undoClipping().undoPositioned();
732
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
733
+ }
734
+ }, arguments[1] || { })
735
+ );
736
+ };
737
+
738
+ // Bug in opera makes the TD containing this element expand for a instance after finish
739
+ Effect.Squish = function(element) {
740
+ return new Effect.Scale(element, window.opera ? 1 : 0, {
741
+ restoreAfterFinish: true,
742
+ beforeSetup: function(effect) {
743
+ effect.element.makeClipping();
744
+ },
745
+ afterFinishInternal: function(effect) {
746
+ effect.element.hide().undoClipping();
747
+ }
748
+ });
749
+ };
750
+
751
+ Effect.Grow = function(element) {
752
+ element = $(element);
753
+ var options = Object.extend({
754
+ direction: 'center',
755
+ moveTransition: Effect.Transitions.sinoidal,
756
+ scaleTransition: Effect.Transitions.sinoidal,
757
+ opacityTransition: Effect.Transitions.full
758
+ }, arguments[1] || { });
759
+ var oldStyle = {
760
+ top: element.style.top,
761
+ left: element.style.left,
762
+ height: element.style.height,
763
+ width: element.style.width,
764
+ opacity: element.getInlineOpacity() };
765
+
766
+ var dims = element.getDimensions();
767
+ var initialMoveX, initialMoveY;
768
+ var moveX, moveY;
769
+
770
+ switch (options.direction) {
771
+ case 'top-left':
772
+ initialMoveX = initialMoveY = moveX = moveY = 0;
773
+ break;
774
+ case 'top-right':
775
+ initialMoveX = dims.width;
776
+ initialMoveY = moveY = 0;
777
+ moveX = -dims.width;
778
+ break;
779
+ case 'bottom-left':
780
+ initialMoveX = moveX = 0;
781
+ initialMoveY = dims.height;
782
+ moveY = -dims.height;
783
+ break;
784
+ case 'bottom-right':
785
+ initialMoveX = dims.width;
786
+ initialMoveY = dims.height;
787
+ moveX = -dims.width;
788
+ moveY = -dims.height;
789
+ break;
790
+ case 'center':
791
+ initialMoveX = dims.width / 2;
792
+ initialMoveY = dims.height / 2;
793
+ moveX = -dims.width / 2;
794
+ moveY = -dims.height / 2;
795
+ break;
796
+ }
797
+
798
+ return new Effect.Move(element, {
799
+ x: initialMoveX,
800
+ y: initialMoveY,
801
+ duration: 0.01,
802
+ beforeSetup: function(effect) {
803
+ effect.element.hide().makeClipping().makePositioned();
804
+ },
805
+ afterFinishInternal: function(effect) {
806
+ new Effect.Parallel(
807
+ [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
808
+ new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
809
+ new Effect.Scale(effect.element, 100, {
810
+ scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
811
+ sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
812
+ ], Object.extend({
813
+ beforeSetup: function(effect) {
814
+ effect.effects[0].element.setStyle({height: '0px'}).show();
815
+ },
816
+ afterFinishInternal: function(effect) {
817
+ effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
818
+ }
819
+ }, options)
820
+ );
821
+ }
822
+ });
823
+ };
824
+
825
+ Effect.Shrink = function(element) {
826
+ element = $(element);
827
+ var options = Object.extend({
828
+ direction: 'center',
829
+ moveTransition: Effect.Transitions.sinoidal,
830
+ scaleTransition: Effect.Transitions.sinoidal,
831
+ opacityTransition: Effect.Transitions.none
832
+ }, arguments[1] || { });
833
+ var oldStyle = {
834
+ top: element.style.top,
835
+ left: element.style.left,
836
+ height: element.style.height,
837
+ width: element.style.width,
838
+ opacity: element.getInlineOpacity() };
839
+
840
+ var dims = element.getDimensions();
841
+ var moveX, moveY;
842
+
843
+ switch (options.direction) {
844
+ case 'top-left':
845
+ moveX = moveY = 0;
846
+ break;
847
+ case 'top-right':
848
+ moveX = dims.width;
849
+ moveY = 0;
850
+ break;
851
+ case 'bottom-left':
852
+ moveX = 0;
853
+ moveY = dims.height;
854
+ break;
855
+ case 'bottom-right':
856
+ moveX = dims.width;
857
+ moveY = dims.height;
858
+ break;
859
+ case 'center':
860
+ moveX = dims.width / 2;
861
+ moveY = dims.height / 2;
862
+ break;
863
+ }
864
+
865
+ return new Effect.Parallel(
866
+ [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
867
+ new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
868
+ new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
869
+ ], Object.extend({
870
+ beforeStartInternal: function(effect) {
871
+ effect.effects[0].element.makePositioned().makeClipping();
872
+ },
873
+ afterFinishInternal: function(effect) {
874
+ effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
875
+ }, options)
876
+ );
877
+ };
878
+
879
+ Effect.Pulsate = function(element) {
880
+ element = $(element);
881
+ var options = arguments[1] || { },
882
+ oldOpacity = element.getInlineOpacity(),
883
+ transition = options.transition || Effect.Transitions.linear,
884
+ reverser = function(pos){
885
+ return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + 0.5);
886
+ };
887
+
888
+ return new Effect.Opacity(element,
889
+ Object.extend(Object.extend({ duration: 2.0, from: 0,
890
+ afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
891
+ }, options), {transition: reverser}));
892
+ };
893
+
894
+ Effect.Fold = function(element) {
895
+ element = $(element);
896
+ var oldStyle = {
897
+ top: element.style.top,
898
+ left: element.style.left,
899
+ width: element.style.width,
900
+ height: element.style.height };
901
+ element.makeClipping();
902
+ return new Effect.Scale(element, 5, Object.extend({
903
+ scaleContent: false,
904
+ scaleX: false,
905
+ afterFinishInternal: function(effect) {
906
+ new Effect.Scale(element, 1, {
907
+ scaleContent: false,
908
+ scaleY: false,
909
+ afterFinishInternal: function(effect) {
910
+ effect.element.hide().undoClipping().setStyle(oldStyle);
911
+ } });
912
+ }}, arguments[1] || { }));
913
+ };
914
+
915
+ Effect.Morph = Class.create(Effect.Base, {
916
+ initialize: function(element) {
917
+ this.element = $(element);
918
+ if (!this.element) throw(Effect._elementDoesNotExistError);
919
+ var options = Object.extend({
920
+ style: { }
921
+ }, arguments[1] || { });
922
+
923
+ if (!Object.isString(options.style)) this.style = $H(options.style);
924
+ else {
925
+ if (options.style.include(':'))
926
+ this.style = options.style.parseStyle();
927
+ else {
928
+ this.element.addClassName(options.style);
929
+ this.style = $H(this.element.getStyles());
930
+ this.element.removeClassName(options.style);
931
+ var css = this.element.getStyles();
932
+ this.style = this.style.reject(function(style) {
933
+ return style.value == css[style.key];
934
+ });
935
+ options.afterFinishInternal = function(effect) {
936
+ effect.element.addClassName(effect.options.style);
937
+ effect.transforms.each(function(transform) {
938
+ effect.element.style[transform.style] = '';
939
+ });
940
+ };
941
+ }
942
+ }
943
+ this.start(options);
944
+ },
945
+
946
+ setup: function(){
947
+ function parseColor(color){
948
+ if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
949
+ color = color.parseColor();
950
+ return $R(0,2).map(function(i){
951
+ return parseInt( color.slice(i*2+1,i*2+3), 16 );
952
+ });
953
+ }
954
+ this.transforms = this.style.map(function(pair){
955
+ var property = pair[0], value = pair[1], unit = null;
956
+
957
+ if (value.parseColor('#zzzzzz') != '#zzzzzz') {
958
+ value = value.parseColor();
959
+ unit = 'color';
960
+ } else if (property == 'opacity') {
961
+ value = parseFloat(value);
962
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
963
+ this.element.setStyle({zoom: 1});
964
+ } else if (Element.CSS_LENGTH.test(value)) {
965
+ var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
966
+ value = parseFloat(components[1]);
967
+ unit = (components.length == 3) ? components[2] : null;
968
+ }
969
+
970
+ var originalValue = this.element.getStyle(property);
971
+ return {
972
+ style: property.camelize(),
973
+ originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
974
+ targetValue: unit=='color' ? parseColor(value) : value,
975
+ unit: unit
976
+ };
977
+ }.bind(this)).reject(function(transform){
978
+ return (
979
+ (transform.originalValue == transform.targetValue) ||
980
+ (
981
+ transform.unit != 'color' &&
982
+ (isNaN(transform.originalValue) || isNaN(transform.targetValue))
983
+ )
984
+ );
985
+ });
986
+ },
987
+ update: function(position) {
988
+ var style = { }, transform, i = this.transforms.length;
989
+ while(i--)
990
+ style[(transform = this.transforms[i]).style] =
991
+ transform.unit=='color' ? '#'+
992
+ (Math.round(transform.originalValue[0]+
993
+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
994
+ (Math.round(transform.originalValue[1]+
995
+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
996
+ (Math.round(transform.originalValue[2]+
997
+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
998
+ (transform.originalValue +
999
+ (transform.targetValue - transform.originalValue) * position).toFixed(3) +
1000
+ (transform.unit === null ? '' : transform.unit);
1001
+ this.element.setStyle(style, true);
1002
+ }
1003
+ });
1004
+
1005
+ Effect.Transform = Class.create({
1006
+ initialize: function(tracks){
1007
+ this.tracks = [];
1008
+ this.options = arguments[1] || { };
1009
+ this.addTracks(tracks);
1010
+ },
1011
+ addTracks: function(tracks){
1012
+ tracks.each(function(track){
1013
+ track = $H(track);
1014
+ var data = track.values().first();
1015
+ this.tracks.push($H({
1016
+ ids: track.keys().first(),
1017
+ effect: Effect.Morph,
1018
+ options: { style: data }
1019
+ }));
1020
+ }.bind(this));
1021
+ return this;
1022
+ },
1023
+ play: function(){
1024
+ return new Effect.Parallel(
1025
+ this.tracks.map(function(track){
1026
+ var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options');
1027
+ var elements = [$(ids) || $$(ids)].flatten();
1028
+ return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) });
1029
+ }).flatten(),
1030
+ this.options
1031
+ );
1032
+ }
1033
+ });
1034
+
1035
+ Element.CSS_PROPERTIES = $w(
1036
+ 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
1037
+ 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
1038
+ 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
1039
+ 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
1040
+ 'fontSize fontWeight height left letterSpacing lineHeight ' +
1041
+ 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
1042
+ 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
1043
+ 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
1044
+ 'right textIndent top width wordSpacing zIndex');
1045
+
1046
+ Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
1047
+
1048
+ String.__parseStyleElement = document.createElement('div');
1049
+ String.prototype.parseStyle = function(){
1050
+ var style, styleRules = $H();
1051
+ if (Prototype.Browser.WebKit)
1052
+ style = new Element('div',{style:this}).style;
1053
+ else {
1054
+ String.__parseStyleElement.innerHTML = '<div style="' + this + '"></div>';
1055
+ style = String.__parseStyleElement.childNodes[0].style;
1056
+ }
1057
+
1058
+ Element.CSS_PROPERTIES.each(function(property){
1059
+ if (style[property]) styleRules.set(property, style[property]);
1060
+ });
1061
+
1062
+ if (Prototype.Browser.IE && this.include('opacity'))
1063
+ styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);
1064
+
1065
+ return styleRules;
1066
+ };
1067
+
1068
+ if (document.defaultView && document.defaultView.getComputedStyle) {
1069
+ Element.getStyles = function(element) {
1070
+ var css = document.defaultView.getComputedStyle($(element), null);
1071
+ return Element.CSS_PROPERTIES.inject({ }, function(styles, property) {
1072
+ styles[property] = css[property];
1073
+ return styles;
1074
+ });
1075
+ };
1076
+ } else {
1077
+ Element.getStyles = function(element) {
1078
+ element = $(element);
1079
+ var css = element.currentStyle, styles;
1080
+ styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
1081
+ results[property] = css[property];
1082
+ return results;
1083
+ });
1084
+ if (!styles.opacity) styles.opacity = element.getOpacity();
1085
+ return styles;
1086
+ };
1087
+ }
1088
+
1089
+ Effect.Methods = {
1090
+ morph: function(element, style) {
1091
+ element = $(element);
1092
+ new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { }));
1093
+ return element;
1094
+ },
1095
+ visualEffect: function(element, effect, options) {
1096
+ element = $(element);
1097
+ var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
1098
+ new Effect[klass](element, options);
1099
+ return element;
1100
+ },
1101
+ highlight: function(element, options) {
1102
+ element = $(element);
1103
+ new Effect.Highlight(element, options);
1104
+ return element;
1105
+ }
1106
+ };
1107
+
1108
+ $w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
1109
+ 'pulsate shake puff squish switchOff dropOut').each(
1110
+ function(effect) {
1111
+ Effect.Methods[effect] = function(element, options){
1112
+ element = $(element);
1113
+ Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
1114
+ return element;
1115
+ };
1116
+ }
1117
+ );
1118
+
1119
+ $w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(
1120
+ function(f) { Effect.Methods[f] = Element[f]; }
1121
+ );
1122
+
1123
+ Element.addMethods(Effect.Methods);