milksteak 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. data/.gitignore +1 -14
  2. data/.rspec +2 -0
  3. data/Gemfile +1 -1
  4. data/Guardfile +8 -0
  5. data/Rakefile +0 -1
  6. data/Readme.md +37 -0
  7. data/lib/helpers.rb +0 -0
  8. data/lib/milksteak/cms.rb +17 -0
  9. data/lib/milksteak/version.rb +1 -1
  10. data/lib/milksteak.rb +52 -1
  11. data/lib/models/page.rb +73 -0
  12. data/lib/models/user.rb +5 -0
  13. data/lib/public/milksteak/codemirror2/keymap/emacs.js +29 -0
  14. data/lib/public/milksteak/codemirror2/keymap/vim.js +347 -0
  15. data/lib/public/milksteak/codemirror2/lib/codemirror.css +110 -0
  16. data/lib/public/milksteak/codemirror2/lib/codemirror.js +2887 -0
  17. data/lib/public/milksteak/codemirror2/lib/util/dialog.css +23 -0
  18. data/lib/public/milksteak/codemirror2/lib/util/dialog.js +63 -0
  19. data/lib/public/milksteak/codemirror2/lib/util/foldcode.js +186 -0
  20. data/lib/public/milksteak/codemirror2/lib/util/formatting.js +294 -0
  21. data/lib/public/milksteak/codemirror2/lib/util/javascript-hint.js +132 -0
  22. data/lib/public/milksteak/codemirror2/lib/util/match-highlighter.js +44 -0
  23. data/lib/public/milksteak/codemirror2/lib/util/overlay.js +51 -0
  24. data/lib/public/milksteak/codemirror2/lib/util/runmode.js +49 -0
  25. data/lib/public/milksteak/codemirror2/lib/util/search.js +114 -0
  26. data/lib/public/milksteak/codemirror2/lib/util/searchcursor.js +117 -0
  27. data/lib/public/milksteak/codemirror2/lib/util/simple-hint.css +16 -0
  28. data/lib/public/milksteak/codemirror2/lib/util/simple-hint.js +66 -0
  29. data/lib/public/milksteak/codemirror2/mode/clike/clike.js +234 -0
  30. data/lib/public/milksteak/codemirror2/mode/clike/index.html +101 -0
  31. data/lib/public/milksteak/codemirror2/mode/clojure/clojure.js +207 -0
  32. data/lib/public/milksteak/codemirror2/mode/clojure/index.html +66 -0
  33. data/lib/public/milksteak/codemirror2/mode/coffeescript/LICENSE +22 -0
  34. data/lib/public/milksteak/codemirror2/mode/coffeescript/coffeescript.js +341 -0
  35. data/lib/public/milksteak/codemirror2/mode/coffeescript/index.html +721 -0
  36. data/lib/public/milksteak/codemirror2/mode/css/css.js +124 -0
  37. data/lib/public/milksteak/codemirror2/mode/css/index.html +55 -0
  38. data/lib/public/milksteak/codemirror2/mode/diff/diff.css +3 -0
  39. data/lib/public/milksteak/codemirror2/mode/diff/diff.js +13 -0
  40. data/lib/public/milksteak/codemirror2/mode/diff/index.html +99 -0
  41. data/lib/public/milksteak/codemirror2/mode/ecl/ecl.js +203 -0
  42. data/lib/public/milksteak/codemirror2/mode/ecl/index.html +42 -0
  43. data/lib/public/milksteak/codemirror2/mode/gfm/gfm.js +108 -0
  44. data/lib/public/milksteak/codemirror2/mode/gfm/index.html +47 -0
  45. data/lib/public/milksteak/codemirror2/mode/go/go.js +170 -0
  46. data/lib/public/milksteak/codemirror2/mode/go/index.html +72 -0
  47. data/lib/public/milksteak/codemirror2/mode/groovy/groovy.js +210 -0
  48. data/lib/public/milksteak/codemirror2/mode/groovy/index.html +71 -0
  49. data/lib/public/milksteak/codemirror2/mode/haskell/haskell.js +242 -0
  50. data/lib/public/milksteak/codemirror2/mode/haskell/index.html +60 -0
  51. data/lib/public/milksteak/codemirror2/mode/htmlembedded/htmlembedded.js +68 -0
  52. data/lib/public/milksteak/codemirror2/mode/htmlembedded/index.html +49 -0
  53. data/lib/public/milksteak/codemirror2/mode/htmlmixed/htmlmixed.js +83 -0
  54. data/lib/public/milksteak/codemirror2/mode/htmlmixed/index.html +51 -0
  55. data/lib/public/milksteak/codemirror2/mode/javascript/index.html +77 -0
  56. data/lib/public/milksteak/codemirror2/mode/javascript/javascript.js +360 -0
  57. data/lib/public/milksteak/codemirror2/mode/jinja2/index.html +37 -0
  58. data/lib/public/milksteak/codemirror2/mode/jinja2/jinja2.js +42 -0
  59. data/lib/public/milksteak/codemirror2/mode/less/index.html +577 -0
  60. data/lib/public/milksteak/codemirror2/mode/less/less.js +186 -0
  61. data/lib/public/milksteak/codemirror2/mode/lua/index.html +72 -0
  62. data/lib/public/milksteak/codemirror2/mode/lua/lua.js +140 -0
  63. data/lib/public/milksteak/codemirror2/mode/markdown/index.html +339 -0
  64. data/lib/public/milksteak/codemirror2/mode/markdown/markdown.js +276 -0
  65. data/lib/public/milksteak/codemirror2/mode/mysql/index.html +41 -0
  66. data/lib/public/milksteak/codemirror2/mode/mysql/mysql.js +188 -0
  67. data/lib/public/milksteak/codemirror2/mode/ntriples/index.html +32 -0
  68. data/lib/public/milksteak/codemirror2/mode/ntriples/ntriples.js +172 -0
  69. data/lib/public/milksteak/codemirror2/mode/pascal/LICENSE +7 -0
  70. data/lib/public/milksteak/codemirror2/mode/pascal/index.html +48 -0
  71. data/lib/public/milksteak/codemirror2/mode/pascal/pascal.js +94 -0
  72. data/lib/public/milksteak/codemirror2/mode/perl/LICENSE +19 -0
  73. data/lib/public/milksteak/codemirror2/mode/perl/index.html +62 -0
  74. data/lib/public/milksteak/codemirror2/mode/perl/perl.js +816 -0
  75. data/lib/public/milksteak/codemirror2/mode/php/index.html +48 -0
  76. data/lib/public/milksteak/codemirror2/mode/php/php.js +150 -0
  77. data/lib/public/milksteak/codemirror2/mode/plsql/index.html +62 -0
  78. data/lib/public/milksteak/codemirror2/mode/plsql/plsql.js +217 -0
  79. data/lib/public/milksteak/codemirror2/mode/properties/index.html +40 -0
  80. data/lib/public/milksteak/codemirror2/mode/properties/properties.css +3 -0
  81. data/lib/public/milksteak/codemirror2/mode/properties/properties.js +57 -0
  82. data/lib/public/milksteak/codemirror2/mode/python/LICENSE.txt +21 -0
  83. data/lib/public/milksteak/codemirror2/mode/python/index.html +122 -0
  84. data/lib/public/milksteak/codemirror2/mode/python/python.js +340 -0
  85. data/lib/public/milksteak/codemirror2/mode/r/LICENSE +24 -0
  86. data/lib/public/milksteak/codemirror2/mode/r/index.html +73 -0
  87. data/lib/public/milksteak/codemirror2/mode/r/r.js +141 -0
  88. data/lib/public/milksteak/codemirror2/mode/rpm/changes/changes.js +19 -0
  89. data/lib/public/milksteak/codemirror2/mode/rpm/changes/index.html +53 -0
  90. data/lib/public/milksteak/codemirror2/mode/rpm/spec/index.html +99 -0
  91. data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.css +5 -0
  92. data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.js +66 -0
  93. data/lib/public/milksteak/codemirror2/mode/rst/index.html +525 -0
  94. data/lib/public/milksteak/codemirror2/mode/rst/rst.js +326 -0
  95. data/lib/public/milksteak/codemirror2/mode/ruby/LICENSE +24 -0
  96. data/lib/public/milksteak/codemirror2/mode/ruby/index.html +171 -0
  97. data/lib/public/milksteak/codemirror2/mode/ruby/ruby.js +200 -0
  98. data/lib/public/milksteak/codemirror2/mode/rust/index.html +48 -0
  99. data/lib/public/milksteak/codemirror2/mode/rust/rust.js +432 -0
  100. data/lib/public/milksteak/codemirror2/mode/scheme/index.html +64 -0
  101. data/lib/public/milksteak/codemirror2/mode/scheme/scheme.js +202 -0
  102. data/lib/public/milksteak/codemirror2/mode/smalltalk/index.html +55 -0
  103. data/lib/public/milksteak/codemirror2/mode/smalltalk/smalltalk.js +139 -0
  104. data/lib/public/milksteak/codemirror2/mode/sparql/index.html +40 -0
  105. data/lib/public/milksteak/codemirror2/mode/sparql/sparql.js +143 -0
  106. data/lib/public/milksteak/codemirror2/mode/stex/index.html +95 -0
  107. data/lib/public/milksteak/codemirror2/mode/stex/stex.js +167 -0
  108. data/lib/public/milksteak/codemirror2/mode/tiddlywiki/index.html +183 -0
  109. data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.css +21 -0
  110. data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.js +374 -0
  111. data/lib/public/milksteak/codemirror2/mode/velocity/index.html +103 -0
  112. data/lib/public/milksteak/codemirror2/mode/velocity/velocity.js +146 -0
  113. data/lib/public/milksteak/codemirror2/mode/verilog/index.html +210 -0
  114. data/lib/public/milksteak/codemirror2/mode/verilog/verilog.js +194 -0
  115. data/lib/public/milksteak/codemirror2/mode/xml/index.html +45 -0
  116. data/lib/public/milksteak/codemirror2/mode/xml/xml.js +267 -0
  117. data/lib/public/milksteak/codemirror2/mode/xmlpure/index.html +59 -0
  118. data/lib/public/milksteak/codemirror2/mode/xmlpure/xmlpure.js +490 -0
  119. data/lib/public/milksteak/codemirror2/mode/yaml/index.html +67 -0
  120. data/lib/public/milksteak/codemirror2/mode/yaml/yaml.js +95 -0
  121. data/lib/public/milksteak/codemirror2/theme/cobalt.css +18 -0
  122. data/lib/public/milksteak/codemirror2/theme/eclipse.css +25 -0
  123. data/lib/public/milksteak/codemirror2/theme/elegant.css +10 -0
  124. data/lib/public/milksteak/codemirror2/theme/monokai.css +28 -0
  125. data/lib/public/milksteak/codemirror2/theme/neat.css +9 -0
  126. data/lib/public/milksteak/codemirror2/theme/night.css +21 -0
  127. data/lib/public/milksteak/codemirror2/theme/rubyblue.css +21 -0
  128. data/lib/public/milksteak/css/bootstrap-responsive.css +567 -0
  129. data/lib/public/milksteak/css/bootstrap-responsive.min.css +3 -0
  130. data/lib/public/milksteak/css/bootstrap.css +3365 -0
  131. data/lib/public/milksteak/css/bootstrap.min.css +610 -0
  132. data/lib/public/milksteak/css/calendrical.css +69 -0
  133. data/lib/public/milksteak/css/prettify.css +52 -0
  134. data/lib/public/milksteak/css/style.css +8 -0
  135. data/lib/public/milksteak/img/glyphicons-halflings-white.png +0 -0
  136. data/lib/public/milksteak/img/glyphicons-halflings.png +0 -0
  137. data/lib/public/milksteak/img/spinner.gif +0 -0
  138. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.asp +44 -0
  139. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.aspx +31 -0
  140. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.cf +19 -0
  141. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.jsp +49 -0
  142. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.php +43 -0
  143. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.pl +102 -0
  144. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.py +25 -0
  145. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.rb +61 -0
  146. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_huck.lasso +36 -0
  147. data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_sabourdin.lasso +48 -0
  148. data/lib/public/milksteak/jqueryFileTree/images/application.png +0 -0
  149. data/lib/public/milksteak/jqueryFileTree/images/code.png +0 -0
  150. data/lib/public/milksteak/jqueryFileTree/images/css.png +0 -0
  151. data/lib/public/milksteak/jqueryFileTree/images/db.png +0 -0
  152. data/lib/public/milksteak/jqueryFileTree/images/directory.png +0 -0
  153. data/lib/public/milksteak/jqueryFileTree/images/doc.png +0 -0
  154. data/lib/public/milksteak/jqueryFileTree/images/file.png +0 -0
  155. data/lib/public/milksteak/jqueryFileTree/images/film.png +0 -0
  156. data/lib/public/milksteak/jqueryFileTree/images/flash.png +0 -0
  157. data/lib/public/milksteak/jqueryFileTree/images/folder_open.png +0 -0
  158. data/lib/public/milksteak/jqueryFileTree/images/html.png +0 -0
  159. data/lib/public/milksteak/jqueryFileTree/images/java.png +0 -0
  160. data/lib/public/milksteak/jqueryFileTree/images/linux.png +0 -0
  161. data/lib/public/milksteak/jqueryFileTree/images/music.png +0 -0
  162. data/lib/public/milksteak/jqueryFileTree/images/pdf.png +0 -0
  163. data/lib/public/milksteak/jqueryFileTree/images/php.png +0 -0
  164. data/lib/public/milksteak/jqueryFileTree/images/picture.png +0 -0
  165. data/lib/public/milksteak/jqueryFileTree/images/ppt.png +0 -0
  166. data/lib/public/milksteak/jqueryFileTree/images/psd.png +0 -0
  167. data/lib/public/milksteak/jqueryFileTree/images/ruby.png +0 -0
  168. data/lib/public/milksteak/jqueryFileTree/images/script.png +0 -0
  169. data/lib/public/milksteak/jqueryFileTree/images/spinner.gif +0 -0
  170. data/lib/public/milksteak/jqueryFileTree/images/txt.png +0 -0
  171. data/lib/public/milksteak/jqueryFileTree/images/xls.png +0 -0
  172. data/lib/public/milksteak/jqueryFileTree/images/zip.png +0 -0
  173. data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.css +91 -0
  174. data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.js +95 -0
  175. data/lib/public/milksteak/js/app.js +0 -0
  176. data/lib/public/milksteak/js/backbone.js +1290 -0
  177. data/lib/public/milksteak/js/bootstrap-alert.js +91 -0
  178. data/lib/public/milksteak/js/bootstrap-button.js +98 -0
  179. data/lib/public/milksteak/js/bootstrap-carousel.js +154 -0
  180. data/lib/public/milksteak/js/bootstrap-collapse.js +136 -0
  181. data/lib/public/milksteak/js/bootstrap-dropdown.js +92 -0
  182. data/lib/public/milksteak/js/bootstrap-modal.js +209 -0
  183. data/lib/public/milksteak/js/bootstrap-popover.js +95 -0
  184. data/lib/public/milksteak/js/bootstrap-scrollspy.js +125 -0
  185. data/lib/public/milksteak/js/bootstrap-tab.js +130 -0
  186. data/lib/public/milksteak/js/bootstrap-tooltip.js +270 -0
  187. data/lib/public/milksteak/js/bootstrap-transition.js +51 -0
  188. data/lib/public/milksteak/js/bootstrap-typeahead.js +271 -0
  189. data/lib/public/milksteak/js/bootstrap.js +1722 -0
  190. data/lib/public/milksteak/js/bootstrap.min.js +1 -0
  191. data/lib/public/milksteak/js/jquery-ui.min.js +15 -0
  192. data/lib/public/milksteak/js/jquery.calendrical.js +490 -0
  193. data/lib/public/milksteak/js/jquery.easing.js +146 -0
  194. data/lib/public/milksteak/js/jquery.js +9252 -0
  195. data/lib/public/milksteak/js/mustache.js +536 -0
  196. data/lib/public/milksteak/js/prettify.js +28 -0
  197. data/lib/public/milksteak/js/underscore.js +999 -0
  198. data/lib/public/milksteak/markitup/.DS_Store +0 -0
  199. data/lib/public/milksteak/markitup/jquery.markitup.js +593 -0
  200. data/lib/public/milksteak/markitup/sets/default/images/bold.png +0 -0
  201. data/lib/public/milksteak/markitup/sets/default/images/clean.png +0 -0
  202. data/lib/public/milksteak/markitup/sets/default/images/image.png +0 -0
  203. data/lib/public/milksteak/markitup/sets/default/images/italic.png +0 -0
  204. data/lib/public/milksteak/markitup/sets/default/images/link.png +0 -0
  205. data/lib/public/milksteak/markitup/sets/default/images/list-bullet.png +0 -0
  206. data/lib/public/milksteak/markitup/sets/default/images/list-numeric.png +0 -0
  207. data/lib/public/milksteak/markitup/sets/default/images/picture.png +0 -0
  208. data/lib/public/milksteak/markitup/sets/default/images/preview.png +0 -0
  209. data/lib/public/milksteak/markitup/sets/default/images/stroke.png +0 -0
  210. data/lib/public/milksteak/markitup/sets/default/set.js +30 -0
  211. data/lib/public/milksteak/markitup/sets/default/style.css +34 -0
  212. data/lib/public/milksteak/markitup/sets/textile/images/bold.png +0 -0
  213. data/lib/public/milksteak/markitup/sets/textile/images/code.png +0 -0
  214. data/lib/public/milksteak/markitup/sets/textile/images/h1.png +0 -0
  215. data/lib/public/milksteak/markitup/sets/textile/images/h2.png +0 -0
  216. data/lib/public/milksteak/markitup/sets/textile/images/h3.png +0 -0
  217. data/lib/public/milksteak/markitup/sets/textile/images/h4.png +0 -0
  218. data/lib/public/milksteak/markitup/sets/textile/images/h5.png +0 -0
  219. data/lib/public/milksteak/markitup/sets/textile/images/h6.png +0 -0
  220. data/lib/public/milksteak/markitup/sets/textile/images/italic.png +0 -0
  221. data/lib/public/milksteak/markitup/sets/textile/images/link.png +0 -0
  222. data/lib/public/milksteak/markitup/sets/textile/images/list-bullet.png +0 -0
  223. data/lib/public/milksteak/markitup/sets/textile/images/list-numeric.png +0 -0
  224. data/lib/public/milksteak/markitup/sets/textile/images/paragraph.png +0 -0
  225. data/lib/public/milksteak/markitup/sets/textile/images/picture.png +0 -0
  226. data/lib/public/milksteak/markitup/sets/textile/images/preview.png +0 -0
  227. data/lib/public/milksteak/markitup/sets/textile/images/quotes.png +0 -0
  228. data/lib/public/milksteak/markitup/sets/textile/images/stroke.png +0 -0
  229. data/lib/public/milksteak/markitup/sets/textile/set.js +33 -0
  230. data/lib/public/milksteak/markitup/sets/textile/style.css +60 -0
  231. data/lib/public/milksteak/markitup/skins/markitup/images/bg-container.png +0 -0
  232. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
  233. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
  234. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-html.png +0 -0
  235. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-json.png +0 -0
  236. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
  237. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
  238. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
  239. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
  240. data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor.png +0 -0
  241. data/lib/public/milksteak/markitup/skins/markitup/images/handle.png +0 -0
  242. data/lib/public/milksteak/markitup/skins/markitup/images/menu.png +0 -0
  243. data/lib/public/milksteak/markitup/skins/markitup/images/submenu.png +0 -0
  244. data/lib/public/milksteak/markitup/skins/markitup/style.css +147 -0
  245. data/lib/public/milksteak/markitup/skins/simple/images/handle.png +0 -0
  246. data/lib/public/milksteak/markitup/skins/simple/images/menu.png +0 -0
  247. data/lib/public/milksteak/markitup/skins/simple/images/submenu.png +0 -0
  248. data/lib/public/milksteak/markitup/skins/simple/style.css +118 -0
  249. data/lib/public/milksteak/markitup/templates/preview.css +5 -0
  250. data/lib/public/milksteak/markitup/templates/preview.html +11 -0
  251. data/lib/public/milksteak/uploadify-v2.1.4/cancel.png +0 -0
  252. data/lib/public/milksteak/uploadify-v2.1.4/check.php +35 -0
  253. data/lib/public/milksteak/uploadify-v2.1.4/expressInstall.swf +0 -0
  254. data/lib/public/milksteak/uploadify-v2.1.4/jquery-1.4.2.min.js +154 -0
  255. data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.js +296 -0
  256. data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js +26 -0
  257. data/lib/public/milksteak/uploadify-v2.1.4/swfobject.js +4 -0
  258. data/lib/public/milksteak/uploadify-v2.1.4/uploadify.allglyphs.swf +0 -0
  259. data/lib/public/milksteak/uploadify-v2.1.4/uploadify.css +53 -0
  260. data/lib/public/milksteak/uploadify-v2.1.4/uploadify.fla +0 -0
  261. data/lib/public/milksteak/uploadify-v2.1.4/uploadify.php +46 -0
  262. data/lib/public/milksteak/uploadify-v2.1.4/uploadify.swf +0 -0
  263. data/lib/public/milksteak/wmd/Markdown.Converter.js +1332 -0
  264. data/lib/public/milksteak/wmd/Markdown.Editor.js +2160 -0
  265. data/lib/public/milksteak/wmd/Markdown.Sanitizer.js +108 -0
  266. data/lib/public/milksteak/wmd/wmd-buttons.png +0 -0
  267. data/lib/public/milksteak/wmd/wmd.css +103 -0
  268. data/lib/public/milksteak/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  269. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h1.png +0 -0
  270. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h2.png +0 -0
  271. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h3.png +0 -0
  272. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h4.png +0 -0
  273. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h5.png +0 -0
  274. data/lib/public/milksteak/wymeditor/iframe/default/lbl-h6.png +0 -0
  275. data/lib/public/milksteak/wymeditor/iframe/default/lbl-p.png +0 -0
  276. data/lib/public/milksteak/wymeditor/iframe/default/lbl-pre.png +0 -0
  277. data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.css +90 -0
  278. data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.html +26 -0
  279. data/lib/public/milksteak/wymeditor/jquery.wymeditor.js +4688 -0
  280. data/lib/public/milksteak/wymeditor/jquery.wymeditor.min.js +1 -0
  281. data/lib/public/milksteak/wymeditor/jquery.wymeditor.pack.js +1 -0
  282. data/lib/public/milksteak/wymeditor/lang/bg.js +45 -0
  283. data/lib/public/milksteak/wymeditor/lang/ca.js +45 -0
  284. data/lib/public/milksteak/wymeditor/lang/cs.js +45 -0
  285. data/lib/public/milksteak/wymeditor/lang/cy.js +45 -0
  286. data/lib/public/milksteak/wymeditor/lang/de.js +45 -0
  287. data/lib/public/milksteak/wymeditor/lang/en.js +45 -0
  288. data/lib/public/milksteak/wymeditor/lang/es.js +45 -0
  289. data/lib/public/milksteak/wymeditor/lang/fa.js +46 -0
  290. data/lib/public/milksteak/wymeditor/lang/fi.js +44 -0
  291. data/lib/public/milksteak/wymeditor/lang/fr.js +45 -0
  292. data/lib/public/milksteak/wymeditor/lang/gl.js +45 -0
  293. data/lib/public/milksteak/wymeditor/lang/he.js +45 -0
  294. data/lib/public/milksteak/wymeditor/lang/hr.js +45 -0
  295. data/lib/public/milksteak/wymeditor/lang/hu.js +45 -0
  296. data/lib/public/milksteak/wymeditor/lang/it.js +45 -0
  297. data/lib/public/milksteak/wymeditor/lang/nb.js +45 -0
  298. data/lib/public/milksteak/wymeditor/lang/nl.js +45 -0
  299. data/lib/public/milksteak/wymeditor/lang/nn.js +45 -0
  300. data/lib/public/milksteak/wymeditor/lang/pl.js +45 -0
  301. data/lib/public/milksteak/wymeditor/lang/pt-br.js +45 -0
  302. data/lib/public/milksteak/wymeditor/lang/pt.js +45 -0
  303. data/lib/public/milksteak/wymeditor/lang/ru.js +45 -0
  304. data/lib/public/milksteak/wymeditor/lang/sv.js +45 -0
  305. data/lib/public/milksteak/wymeditor/lang/tr.js +45 -0
  306. data/lib/public/milksteak/wymeditor/lang/zh_cn.js +47 -0
  307. data/lib/public/milksteak/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
  308. data/lib/public/milksteak/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
  309. data/lib/public/milksteak/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
  310. data/lib/public/milksteak/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
  311. data/lib/public/milksteak/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
  312. data/lib/public/milksteak/wymeditor/plugins/resizable/readme.txt +124 -0
  313. data/lib/public/milksteak/wymeditor/plugins/tidy/README +19 -0
  314. data/lib/public/milksteak/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
  315. data/lib/public/milksteak/wymeditor/plugins/tidy/tidy.php +36 -0
  316. data/lib/public/milksteak/wymeditor/plugins/tidy/wand.png +0 -0
  317. data/lib/public/milksteak/wymeditor/skins/compact/icons.png +0 -0
  318. data/lib/public/milksteak/wymeditor/skins/compact/skin.css +134 -0
  319. data/lib/public/milksteak/wymeditor/skins/compact/skin.js +35 -0
  320. data/lib/public/milksteak/wymeditor/skins/default/icons.png +0 -0
  321. data/lib/public/milksteak/wymeditor/skins/default/skin.css +133 -0
  322. data/lib/public/milksteak/wymeditor/skins/default/skin.js +40 -0
  323. data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  324. data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  325. data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  326. data/lib/public/milksteak/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  327. data/lib/public/milksteak/wymeditor/skins/minimal/skin.css +131 -0
  328. data/lib/public/milksteak/wymeditor/skins/minimal/skin.js +30 -0
  329. data/lib/public/milksteak/wymeditor/skins/silver/COPYING +674 -0
  330. data/lib/public/milksteak/wymeditor/skins/silver/README +27 -0
  331. data/lib/public/milksteak/wymeditor/skins/silver/images/bg.header.gif +0 -0
  332. data/lib/public/milksteak/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  333. data/lib/public/milksteak/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  334. data/lib/public/milksteak/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  335. data/lib/public/milksteak/wymeditor/skins/silver/skin.css +297 -0
  336. data/lib/public/milksteak/wymeditor/skins/silver/skin.js +61 -0
  337. data/lib/public/milksteak/wymeditor/skins/twopanels/icons.png +0 -0
  338. data/lib/public/milksteak/wymeditor/skins/twopanels/skin.css +134 -0
  339. data/lib/public/milksteak/wymeditor/skins/twopanels/skin.js +39 -0
  340. data/lib/public/milksteak/wymeditor/skins/wymeditor_icon.png +0 -0
  341. data/lib/views/layouts/admin.erb +8 -0
  342. data/lib/views/login.erb +1 -0
  343. data/milksteak.gemspec +30 -13
  344. data/spec/fixtures/pages/sample_page.yml +5 -0
  345. data/spec/lib/milksteak/cms_spec.rb +12 -0
  346. data/spec/models/page_spec.rb +58 -0
  347. data/spec/spec_helper.rb +19 -0
  348. metadata +429 -10
  349. data/LICENSE +0 -22
  350. data/README.md +0 -29
@@ -0,0 +1,490 @@
1
+ (function($) {
2
+ var monthNames = ['January', 'February', 'March', 'April', 'May', 'June',
3
+ 'July', 'August', 'September', 'October', 'November', 'December'];
4
+
5
+ function getToday()
6
+ {
7
+ var date = new Date();
8
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
9
+ }
10
+
11
+ function areDatesEqual(date1, date2)
12
+ {
13
+ return String(date1) == String(date2);
14
+ }
15
+
16
+ function daysInMonth(year, month)
17
+ {
18
+ if (year instanceof Date) return daysInMonth(year.getFullYear(), year.getMonth());
19
+ if (month == 1) {
20
+ var leapYear = (year % 4 == 0) &&
21
+ (!(year % 100 == 0) || (year % 400 == 0));
22
+ return leapYear ? 29 : 28;
23
+ } else if (month == 3 || month == 5 || month == 8 || month == 10) {
24
+ return 30;
25
+ } else {
26
+ return 31;
27
+ }
28
+ }
29
+
30
+ function dayAfter(date)
31
+ {
32
+ var year = date.getFullYear();
33
+ var month = date.getMonth();
34
+ var day = date.getDate();
35
+ var lastDay = daysInMonth(date);
36
+ return (day == lastDay) ?
37
+ ((month == 11) ?
38
+ new Date(year + 1, 0, 1) :
39
+ new Date(year, month + 1, 1)
40
+ ) :
41
+ new Date(year, month, day + 1);
42
+ }
43
+
44
+ function dayBefore(date)
45
+ {
46
+ var year = date.getFullYear();
47
+ var month = date.getMonth();
48
+ var day = date.getDate();
49
+ return (day == 1) ?
50
+ ((month == 0) ?
51
+ new Date(year - 1, 11, daysInMonth(year - 1, 11)) :
52
+ new Date(year, month - 1, daysInMonth(year, month - 1))
53
+ ) :
54
+ new Date(year, month, day - 1);
55
+ }
56
+
57
+ function monthAfter(year, month)
58
+ {
59
+ return (month == 11) ?
60
+ new Date(year + 1, 0, 1) :
61
+ new Date(year, month + 1, 1);
62
+ }
63
+
64
+ function formatDate(date, usa)
65
+ {
66
+ return (usa ?
67
+ ((date.getMonth() + 1) + '/' + date.getDate()) :
68
+ (date.getDate() + '/' + (date.getMonth() + 1))
69
+ ) + '/' + date.getFullYear();
70
+ }
71
+
72
+ function parseDate(date, usa)
73
+ {
74
+ if (usa) return new Date(date);
75
+ a = date.split(/[\.\-\/]/);
76
+ var day = a.shift();
77
+ var month = a.shift();
78
+ a.unshift(day);
79
+ a.unshift(month);
80
+ return new Date(a.join('/'));
81
+ }
82
+
83
+ function formatTime(hour, minute, iso)
84
+ {
85
+ var printMinute = minute;
86
+ if (minute < 10) printMinute = '0' + minute;
87
+
88
+ if (iso) {
89
+ var printHour = hour
90
+ if (printHour < 10) printHour = '0' + hour;
91
+ return printHour + ':' + printMinute;
92
+ } else {
93
+ var printHour = hour % 12;
94
+ if (printHour == 0) printHour = 12;
95
+ var half = (hour < 12) ? 'am' : 'pm';
96
+ return printHour + ':' + printMinute + half;
97
+ }
98
+ }
99
+
100
+ function parseTime(text)
101
+ {
102
+ var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text);
103
+ if (match && match.length >= 3) {
104
+ var hour = Number(match[1]);
105
+ var minute = Number(match[2])
106
+ if (hour == 12 && match[3]) hour -= 12;
107
+ if (match[3] && match[3].toLowerCase() == 'pm') hour += 12;
108
+ return {
109
+ hour: hour,
110
+ minute: minute
111
+ };
112
+ } else {
113
+ return null;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Generates calendar header, with month name, << and >> controls, and
119
+ * initials for days of the week.
120
+ */
121
+ function renderCalendarHeader(element, year, month, options)
122
+ {
123
+ //Prepare thead element
124
+ var thead = $('<thead />');
125
+ var titleRow = $('<tr />').appendTo(thead);
126
+
127
+ //Generate << (back a month) link
128
+ $('<th />').addClass('monthCell').append(
129
+ $('<a href="javascript:;">&laquo;</a>')
130
+ .addClass('prevMonth')
131
+ .mousedown(function(e) {
132
+ renderCalendarPage(element,
133
+ month == 0 ? (year - 1) : year,
134
+ month == 0 ? 11 : (month - 1), options
135
+ );
136
+ e.preventDefault();
137
+ })
138
+ ).appendTo(titleRow);
139
+
140
+ //Generate month title
141
+ $('<th />').addClass('monthCell').attr('colSpan', 5).append(
142
+ $('<a href="javascript:;">' + monthNames[month] + ' ' +
143
+ year + '</a>').addClass('monthName')
144
+ ).appendTo(titleRow);
145
+
146
+ //Generate >> (forward a month) link
147
+ $('<th />').addClass('monthCell').append(
148
+ $('<a href="javascript:;">&raquo;</a>')
149
+ .addClass('nextMonth')
150
+ .mousedown(function() {
151
+ renderCalendarPage(element,
152
+ month == 11 ? (year + 1) : year,
153
+ month == 11 ? 0 : (month + 1), options
154
+ );
155
+ })
156
+ ).appendTo(titleRow);
157
+
158
+ //Generate weekday initials row
159
+ var dayNames = $('<tr />').appendTo(thead);
160
+ $.each(String('SMTWTFS').split(''), function(k, v) {
161
+ $('<td />').addClass('dayName').append(v).appendTo(dayNames);
162
+ });
163
+
164
+ return thead;
165
+ }
166
+
167
+ function renderCalendarPage(element, year, month, options)
168
+ {
169
+ options = options || {};
170
+
171
+ var today = getToday();
172
+
173
+ var date = new Date(year, month, 1);
174
+
175
+ //Wind end date forward to saturday week after month
176
+ var endDate = monthAfter(year, month);
177
+ var ff = 6 - endDate.getDay();
178
+ if (ff < 6) ff += 7;
179
+ for (var i = 0; i < ff; i++) endDate = dayAfter(endDate);
180
+
181
+ var table = $('<table />');
182
+ renderCalendarHeader(element, year, month, options).appendTo(table);
183
+
184
+ var tbody = $('<tbody />').appendTo(table);
185
+ var row = $('<tr />');
186
+
187
+ //Rewind date to monday week before month
188
+ var rewind = date.getDay() + 7;
189
+ for (var i = 0; i < rewind; i++) date = dayBefore(date);
190
+
191
+ while (date <= endDate) {
192
+ var td = $('<td />')
193
+ .addClass('day')
194
+ .append(
195
+ $('<a href="javascript:;">' +
196
+ date.getDate() + '</a>'
197
+ ).click((function() {
198
+ var thisDate = date;
199
+
200
+ return function() {
201
+ if (options && options.selectDate) {
202
+ options.selectDate(thisDate);
203
+ }
204
+ }
205
+ }()))
206
+ )
207
+ .appendTo(row);
208
+
209
+ var isToday = areDatesEqual(date, today);
210
+ var isSelected = options.selected &&
211
+ areDatesEqual(options.selected, date);
212
+
213
+ if (isToday) td.addClass('today');
214
+ if (isSelected) td.addClass('selected');
215
+ if (isToday && isSelected) td.addClass('today_selected');
216
+ if (date.getMonth() != month) td.addClass('nonMonth');
217
+
218
+ dow = date.getDay();
219
+ if (dow == 6) {
220
+ tbody.append(row);
221
+ row = $('<tr />');
222
+ }
223
+ date = dayAfter(date);
224
+ }
225
+ if (row.children().length) {
226
+ tbody.append(row);
227
+ } else {
228
+ row.remove();
229
+ }
230
+
231
+ element.empty().append(table);
232
+ }
233
+
234
+ function renderTimeSelect(element, options)
235
+ {
236
+ var selection = options.selection && parseTime(options.selection);
237
+ if (selection) {
238
+ selection.minute = Math.floor(selection.minute / 30.0) * 30;
239
+ }
240
+ var startTime = options.startTime &&
241
+ (options.startTime.hour * 60 + options.startTime.minute);
242
+
243
+ var scrollTo; //Element to scroll the dropdown box to when shown
244
+ var ul = $('<ul />');
245
+ for (var hour = 0; hour < 24; hour++) {
246
+ for (var minute = 0; minute < 60; minute += 30) {
247
+ if (startTime && startTime > (hour * 60 + minute)) continue;
248
+
249
+ (function() {
250
+ var timeText = formatTime(hour, minute, options.isoTime);
251
+ var fullText = timeText;
252
+ if (startTime != null) {
253
+ var duration = (hour * 60 + minute) - startTime;
254
+ if (duration < 60) {
255
+ fullText += ' (' + duration + ' mins)';
256
+ } else if (duration == 60) {
257
+ fullText += ' (1 hr)';
258
+ } else {
259
+ fullText += ' (' + (duration / 60.0) + ' hrs)';
260
+ }
261
+ }
262
+ var li = $('<li />').append(
263
+ $('<a href="javascript:;">' + fullText + '</a>')
264
+ .click(function() {
265
+ if (options && options.selectTime) {
266
+ options.selectTime(timeText);
267
+ }
268
+ }).mousemove(function() {
269
+ $('li.selected', ul).removeClass('selected');
270
+ })
271
+ ).appendTo(ul);
272
+
273
+ //Set to scroll to the default hour, unless already set
274
+ if (!scrollTo && hour == options.defaultHour) {
275
+ scrollTo = li;
276
+ }
277
+
278
+ if (selection &&
279
+ selection.hour == hour &&
280
+ selection.minute == minute)
281
+ {
282
+ //Highlight selected item
283
+ li.addClass('selected');
284
+
285
+ //Set to scroll to the selected hour
286
+ //
287
+ //This is set even if scrollTo is already set, since
288
+ //scrolling to selected hour is more important than
289
+ //scrolling to default hour
290
+ scrollTo = li;
291
+ }
292
+ })();
293
+ }
294
+ }
295
+ if (scrollTo) {
296
+ //Set timeout of zero so code runs immediately after any calling
297
+ //functions are finished (this is needed, since box hasn't been
298
+ //added to the DOM yet)
299
+ setTimeout(function() {
300
+ //Scroll the dropdown box so that scrollTo item is in
301
+ //the middle
302
+ element[0].scrollTop =
303
+ scrollTo[0].offsetTop - scrollTo.height() * 2;
304
+ }, 0);
305
+ }
306
+ element.empty().append(ul);
307
+ }
308
+
309
+ $.fn.calendricalDate = function(options)
310
+ {
311
+ options = options || {};
312
+ options.padding = options.padding || 4;
313
+
314
+ return this.each(function() {
315
+ var element = $(this);
316
+ var div;
317
+ var within = false;
318
+
319
+ element.bind('focus click', function() {
320
+ if (div) return;
321
+ var offset = element.position();
322
+ var padding = element.css('padding-left');
323
+ div = $('<div />')
324
+ .addClass('calendricalDatePopup')
325
+ .mouseenter(function() { within = true; })
326
+ .mouseleave(function() { within = false; })
327
+ .mousedown(function(e) {
328
+ e.preventDefault();
329
+ })
330
+ .css({
331
+ position: 'absolute',
332
+ left: offset.left,
333
+ top: offset.top + element.height() +
334
+ options.padding * 2
335
+ });
336
+ element.after(div);
337
+
338
+ var selected = parseDate(element.val(), options.usa);
339
+ if (!selected.getFullYear()) selected = getToday();
340
+
341
+ renderCalendarPage(
342
+ div,
343
+ selected.getFullYear(),
344
+ selected.getMonth(), {
345
+ selected: selected,
346
+ selectDate: function(date) {
347
+ within = false;
348
+ element.val(formatDate(date, options.usa));
349
+ div.remove();
350
+ div = null;
351
+ if (options.endDate) {
352
+ var endDate = parseDate(
353
+ options.endDate.val(), options.usa
354
+ );
355
+ if (endDate >= selected) {
356
+ options.endDate.val(formatDate(
357
+ new Date(
358
+ date.getTime() +
359
+ endDate.getTime() -
360
+ selected.getTime()
361
+ ),
362
+ options.usa
363
+ ));
364
+ }
365
+ }
366
+ }
367
+ }
368
+ );
369
+ }).blur(function() {
370
+ if (within){
371
+ if (div) element.focus();
372
+ return;
373
+ }
374
+ if (!div) return;
375
+ div.remove();
376
+ div = null;
377
+ });
378
+ });
379
+ };
380
+
381
+ $.fn.calendricalDateRange = function(options)
382
+ {
383
+ if (this.length >= 2) {
384
+ $(this[0]).calendricalDate($.extend({
385
+ endDate: $(this[1])
386
+ }, options));
387
+ $(this[1]).calendricalDate(options);
388
+ }
389
+ return this;
390
+ };
391
+
392
+ $.fn.calendricalTime = function(options)
393
+ {
394
+ options = options || {};
395
+ options.padding = options.padding || 4;
396
+
397
+ return this.each(function() {
398
+ var element = $(this);
399
+ var div;
400
+ var within = false;
401
+
402
+ element.bind('focus click', function() {
403
+ if (div) return;
404
+
405
+ var useStartTime = options.startTime;
406
+ if (useStartTime) {
407
+ if (options.startDate && options.endDate &&
408
+ !areDatesEqual(parseDate(options.startDate.val()),
409
+ parseDate(options.endDate.val())))
410
+ useStartTime = false;
411
+ }
412
+
413
+ var offset = element.position();
414
+ div = $('<div />')
415
+ .addClass('calendricalTimePopup')
416
+ .mouseenter(function() { within = true; })
417
+ .mouseleave(function() { within = false; })
418
+ .mousedown(function(e) {
419
+ e.preventDefault();
420
+ })
421
+ .css({
422
+ position: 'absolute',
423
+ left: offset.left,
424
+ top: offset.top + element.height() +
425
+ options.padding * 2
426
+ });
427
+ if (useStartTime) {
428
+ div.addClass('calendricalEndTimePopup');
429
+ }
430
+
431
+ element.after(div);
432
+
433
+ var opts = {
434
+ selection: element.val(),
435
+ selectTime: function(time) {
436
+ within = false;
437
+ element.val(time);
438
+ div.remove();
439
+ div = null;
440
+ },
441
+ isoTime: options.isoTime || false,
442
+ defaultHour: (options.defaultHour != null) ?
443
+ options.defaultHour : 8
444
+ };
445
+
446
+ if (useStartTime) {
447
+ opts.startTime = parseTime(options.startTime.val());
448
+ }
449
+
450
+ renderTimeSelect(div, opts);
451
+ }).blur(function() {
452
+ if (within){
453
+ if (div) element.focus();
454
+ return;
455
+ }
456
+ if (!div) return;
457
+ div.remove();
458
+ div = null;
459
+ });
460
+ });
461
+ },
462
+
463
+ $.fn.calendricalTimeRange = function(options)
464
+ {
465
+ if (this.length >= 2) {
466
+ $(this[0]).calendricalTime(options);
467
+ $(this[1]).calendricalTime($.extend({
468
+ startTime: $(this[0])
469
+ }, options));
470
+ }
471
+ return this;
472
+ };
473
+
474
+ $.fn.calendricalDateTimeRange = function(options)
475
+ {
476
+ if (this.length >= 4) {
477
+ $(this[0]).calendricalDate($.extend({
478
+ endDate: $(this[2])
479
+ }, options));
480
+ $(this[1]).calendricalTime(options);
481
+ $(this[2]).calendricalDate(options);
482
+ $(this[3]).calendricalTime($.extend({
483
+ startTime: $(this[1]),
484
+ startDate: $(this[0]),
485
+ endDate: $(this[2])
486
+ }, options));
487
+ }
488
+ return this;
489
+ };
490
+ })(jQuery);
@@ -0,0 +1,146 @@
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built In easIng capabilities added In jQuery 1.1
5
+ * to offer multiple easIng options
6
+ *
7
+ * Copyright (c) 2007 George Smith
8
+ * Licensed under the MIT License:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ */
11
+
12
+ // t: current time, b: begInnIng value, c: change In value, d: duration
13
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
14
+
15
+ jQuery.extend( jQuery.easing,
16
+ {
17
+ def: 'easeOutQuad',
18
+ swing: function (x, t, b, c, d) {
19
+ //alert(jQuery.easing.default);
20
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
21
+ },
22
+ easeInQuad: function (x, t, b, c, d) {
23
+ return c*(t/=d)*t + b;
24
+ },
25
+ easeOutQuad: function (x, t, b, c, d) {
26
+ return -c *(t/=d)*(t-2) + b;
27
+ },
28
+ easeInOutQuad: function (x, t, b, c, d) {
29
+ if ((t/=d/2) < 1) return c/2*t*t + b;
30
+ return -c/2 * ((--t)*(t-2) - 1) + b;
31
+ },
32
+ easeInCubic: function (x, t, b, c, d) {
33
+ return c*(t/=d)*t*t + b;
34
+ },
35
+ easeOutCubic: function (x, t, b, c, d) {
36
+ return c*((t=t/d-1)*t*t + 1) + b;
37
+ },
38
+ easeInOutCubic: function (x, t, b, c, d) {
39
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
40
+ return c/2*((t-=2)*t*t + 2) + b;
41
+ },
42
+ easeInQuart: function (x, t, b, c, d) {
43
+ return c*(t/=d)*t*t*t + b;
44
+ },
45
+ easeOutQuart: function (x, t, b, c, d) {
46
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
47
+ },
48
+ easeInOutQuart: function (x, t, b, c, d) {
49
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
50
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
51
+ },
52
+ easeInQuint: function (x, t, b, c, d) {
53
+ return c*(t/=d)*t*t*t*t + b;
54
+ },
55
+ easeOutQuint: function (x, t, b, c, d) {
56
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
57
+ },
58
+ easeInOutQuint: function (x, t, b, c, d) {
59
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
60
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
61
+ },
62
+ easeInSine: function (x, t, b, c, d) {
63
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
64
+ },
65
+ easeOutSine: function (x, t, b, c, d) {
66
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
67
+ },
68
+ easeInOutSine: function (x, t, b, c, d) {
69
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
70
+ },
71
+ easeInExpo: function (x, t, b, c, d) {
72
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
73
+ },
74
+ easeOutExpo: function (x, t, b, c, d) {
75
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
76
+ },
77
+ easeInOutExpo: function (x, t, b, c, d) {
78
+ if (t==0) return b;
79
+ if (t==d) return b+c;
80
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
81
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
82
+ },
83
+ easeInCirc: function (x, t, b, c, d) {
84
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
85
+ },
86
+ easeOutCirc: function (x, t, b, c, d) {
87
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
88
+ },
89
+ easeInOutCirc: function (x, t, b, c, d) {
90
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
91
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
92
+ },
93
+ easeInElastic: function (x, t, b, c, d) {
94
+ var s=1.70158;var p=0;var a=c;
95
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
96
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
97
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
98
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
99
+ },
100
+ easeOutElastic: function (x, t, b, c, d) {
101
+ var s=1.70158;var p=0;var a=c;
102
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
103
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
104
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
105
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
106
+ },
107
+ easeInOutElastic: function (x, t, b, c, d) {
108
+ var s=1.70158;var p=0;var a=c;
109
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
110
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
111
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
112
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
113
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
114
+ },
115
+ easeInBack: function (x, t, b, c, d, s) {
116
+ if (s == undefined) s = 1.70158;
117
+ return c*(t/=d)*t*((s+1)*t - s) + b;
118
+ },
119
+ easeOutBack: function (x, t, b, c, d, s) {
120
+ if (s == undefined) s = 1.70158;
121
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
122
+ },
123
+ easeInOutBack: function (x, t, b, c, d, s) {
124
+ if (s == undefined) s = 1.70158;
125
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
126
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
127
+ },
128
+ easeInBounce: function (x, t, b, c, d) {
129
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
130
+ },
131
+ easeOutBounce: function (x, t, b, c, d) {
132
+ if ((t/=d) < (1/2.75)) {
133
+ return c*(7.5625*t*t) + b;
134
+ } else if (t < (2/2.75)) {
135
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
136
+ } else if (t < (2.5/2.75)) {
137
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
138
+ } else {
139
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
140
+ }
141
+ },
142
+ easeInOutBounce: function (x, t, b, c, d) {
143
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
144
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
145
+ }
146
+ });