old_sql 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +362 -0
  2. data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +69 -0
  3. data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +179 -0
  4. data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +17 -0
  5. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +814 -0
  6. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +1703 -0
  7. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +755 -0
  8. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +1197 -0
  9. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +168 -0
  10. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +187 -0
  11. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +300 -0
  12. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +524 -0
  13. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +420 -0
  14. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +142 -0
  15. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +38 -0
  16. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +240 -0
  17. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +508 -0
  18. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +244 -0
  19. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +385 -0
  20. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +384 -0
  21. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +1161 -0
  22. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +447 -0
  23. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +113 -0
  24. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +767 -0
  25. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +1445 -0
  26. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +651 -0
  27. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +1143 -0
  28. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +145 -0
  29. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +197 -0
  30. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +258 -0
  31. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +454 -0
  32. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +348 -0
  33. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +128 -0
  34. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +26 -0
  35. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +203 -0
  36. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +498 -0
  37. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +186 -0
  38. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +353 -0
  39. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +362 -0
  40. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +895 -0
  41. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +83 -0
  42. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +69 -0
  43. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +401 -0
  44. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +10 -0
  45. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +40 -0
  46. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +96 -0
  47. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +4 -0
  48. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +95 -0
  49. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +31 -0
  50. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +23 -0
  51. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
  52. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
  53. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +54 -0
  54. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +150 -0
  55. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +42 -0
  56. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +90 -0
  57. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +29 -0
  58. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +38 -0
  59. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +189 -0
  60. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +28 -0
  61. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +73 -0
  62. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +38 -0
  63. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +36 -0
  64. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +65 -0
  65. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +31 -0
  66. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +18 -0
  67. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +61 -0
  68. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +38 -0
  69. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +67 -0
  70. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +67 -0
  71. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +30 -0
  72. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +483 -0
  73. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +62 -0
  74. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +71 -0
  75. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
  76. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +150 -0
  77. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +88 -0
  78. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +54 -0
  79. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +373 -0
  80. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +78 -0
  81. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +5 -0
  82. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +85 -0
  83. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +46 -0
  84. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +78 -0
  85. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +11 -0
  86. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +74 -0
  87. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +73 -0
  88. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +125 -0
  89. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +88 -0
  90. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +17 -0
  91. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +59 -0
  92. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +28 -0
  93. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +3 -0
  94. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +19 -0
  95. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +45 -0
  96. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +119 -0
  97. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +40 -0
  98. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +43 -0
  99. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +91 -0
  100. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +54 -0
  101. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +93 -0
  102. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +64 -0
  103. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +71 -0
  104. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +66 -0
  105. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +203 -0
  106. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +177 -0
  107. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +339 -0
  108. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +30 -0
  109. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +31 -0
  110. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +22 -0
  111. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +23 -0
  112. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +71 -0
  113. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +40 -0
  114. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +29 -0
  115. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +61 -0
  116. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +622 -0
  117. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +1 -0
  118. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +19 -0
  119. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +70 -0
  120. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
  121. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
  122. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
  123. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +130 -0
  124. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +48 -0
  125. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +682 -0
  126. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +1489 -0
  127. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +863 -0
  128. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +1256 -0
  129. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +222 -0
  130. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +793 -0
  131. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +304 -0
  132. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +844 -0
  133. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +315 -0
  134. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +353 -0
  135. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +188 -0
  136. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +115 -0
  137. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +236 -0
  138. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +415 -0
  139. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +897 -0
  140. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +589 -0
  141. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +594 -0
  142. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +162 -0
  143. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +2026 -0
  144. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +18 -0
  145. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +7829 -0
  146. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +6 -0
  147. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +251 -0
  148. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +40 -0
  149. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +381 -0
  150. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +159 -0
  151. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +28 -0
  152. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +6 -0
  153. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +25 -0
  154. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +16 -0
  155. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +577 -0
  156. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +137 -0
  157. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +52 -0
  158. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +30 -0
  159. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +89 -0
  160. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +186 -0
  161. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +88 -0
  162. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +408 -0
  163. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +1 -0
  164. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +34 -0
  165. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +84 -0
  166. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +48 -0
  167. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +363 -0
  168. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +39 -0
  169. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +54 -0
  170. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +39 -0
  171. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +38 -0
  172. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +32 -0
  173. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +40 -0
  174. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +18 -0
  175. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +295 -0
  176. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +43 -0
  177. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +223 -0
  178. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +197 -0
  179. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +481 -0
  180. data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +28 -0
  181. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +406 -0
  182. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +683 -0
  183. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +161 -0
  184. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +756 -0
  185. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +151 -0
  186. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +2177 -0
  187. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +705 -0
  188. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +348 -0
  189. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +247 -0
  190. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +9 -0
  191. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +723 -0
  192. data/public/javascripts/old_sql/plotkit-0.9.1/README +1 -0
  193. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +2 -0
  194. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +2 -0
  195. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +302 -0
  196. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +139 -0
  197. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +172 -0
  198. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +81 -0
  199. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +155 -0
  200. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +50 -0
  201. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +428 -0
  202. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +330 -0
  203. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +368 -0
  204. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +256 -0
  205. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +436 -0
  206. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +299 -0
  207. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +159 -0
  208. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +64 -0
  209. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +131 -0
  210. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +34 -0
  211. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +131 -0
  212. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +34 -0
  213. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +334 -0
  214. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +151 -0
  215. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +304 -0
  216. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +144 -0
  217. data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
  218. data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
  219. data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
  220. data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
  221. data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +62 -0
  222. data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +37 -0
  223. data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
  224. data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
  225. data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
  226. data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
  227. data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
  228. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
  229. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +58 -0
  230. data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +31 -0
  231. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +25 -0
  232. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +143 -0
  233. data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +56 -0
  234. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +58 -0
  235. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +133 -0
  236. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +57 -0
  237. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +136 -0
  238. data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +161 -0
  239. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
  240. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
  241. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
  242. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
  243. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
  244. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
  245. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +38 -0
  246. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +43 -0
  247. data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +28 -0
  248. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +29 -0
  249. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +53 -0
  250. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +29 -0
  251. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +61 -0
  252. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +57 -0
  253. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +6 -0
  254. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +29 -0
  255. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +141 -0
  256. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +26 -0
  257. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +147 -0
  258. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +24 -0
  259. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +89 -0
  260. data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +66 -0
  261. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +20 -0
  262. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +31 -0
  263. metadata +264 -2
@@ -0,0 +1,622 @@
1
+ /**
2
+ * Code Syntax Highlighter.
3
+ * Version 1.3.0
4
+ * Copyright (C) 2004 Alex Gorbatchev.
5
+ * http://www.dreamprojections.com/syntaxhighlighter/
6
+ *
7
+ * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
8
+ * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
9
+ * any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
12
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
+ * details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
16
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+ */
18
+
19
+ //
20
+ // create namespaces
21
+ //
22
+ var dp = {
23
+ sh : // dp.sh
24
+ {
25
+ Utils : {}, // dp.sh.Utils
26
+ Brushes : {}, // dp.sh.Brushes
27
+ Strings : {},
28
+ Version : '1.3.0'
29
+ }
30
+ };
31
+
32
+ dp.sh.Strings = {
33
+ AboutDialog : '<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/SyntaxHighlighter</a></p>&copy;2004-2005 Alex Gorbatchev. All right reserved.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>',
34
+
35
+ // tools
36
+ ExpandCode : '+ expand code',
37
+ ViewPlain : 'view plain',
38
+ Print : 'print',
39
+ CopyToClipboard : 'copy to clipboard',
40
+ About : '?',
41
+
42
+ CopiedToClipboard : 'The code is in your clipboard now.'
43
+ };
44
+
45
+ dp.SyntaxHighlighter = dp.sh;
46
+
47
+ //
48
+ // Dialog and toolbar functions
49
+ //
50
+
51
+ dp.sh.Utils.Expand = function(sender)
52
+ {
53
+ var table = sender;
54
+ var span = sender;
55
+
56
+ // find the span in which the text label and pipe contained so we can hide it
57
+ while(span != null && span.tagName.toUpperCase() != 'SPAN')
58
+ span = span.parentNode;
59
+
60
+ // find the table
61
+ while(table != null && table.tagName.toUpperCase() != 'TABLE')
62
+ table = table.parentNode;
63
+
64
+ // remove the 'expand code' button
65
+ span.parentNode.removeChild(span);
66
+
67
+ table.tBodies[0].className = 'show';
68
+ table.parentNode.style.height = '100%'; // containing div isn't getting updated properly when the TBODY is shown
69
+ }
70
+
71
+ // opens a new windows and puts the original unformatted source code inside.
72
+ dp.sh.Utils.ViewSource = function(sender)
73
+ {
74
+ var code = sender.parentNode.originalCode;
75
+ var wnd = window.open('', '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1');
76
+
77
+ code = code.replace(/</g, '&lt;');
78
+
79
+ wnd.document.write('<pre>' + code + '</pre>');
80
+ wnd.document.close();
81
+ }
82
+
83
+ // copies the original source code in to the clipboard (IE only)
84
+ dp.sh.Utils.ToClipboard = function(sender)
85
+ {
86
+ var code = sender.parentNode.originalCode;
87
+
88
+ // This works only for IE. There's a way to make it work with Mozilla as well,
89
+ // but it requires security settings changed on the client, which isn't by
90
+ // default, so 99% of users won't have it working anyways.
91
+ if(window.clipboardData)
92
+ {
93
+ window.clipboardData.setData('text', code);
94
+
95
+ alert(dp.sh.Strings.CopiedToClipboard);
96
+ }
97
+ }
98
+
99
+ // creates an invisible iframe, puts the original source code inside and prints it
100
+ dp.sh.Utils.PrintSource = function(sender)
101
+ {
102
+ var td = sender.parentNode;
103
+ var code = td.processedCode;
104
+ var iframe = document.createElement('IFRAME');
105
+ var doc = null;
106
+ var wnd =
107
+
108
+ // this hides the iframe
109
+ iframe.style.cssText = 'position:absolute; width:0px; height:0px; left:-5px; top:-5px;';
110
+
111
+ td.appendChild(iframe);
112
+
113
+ doc = iframe.contentWindow.document;
114
+ code = code.replace(/</g, '&lt;');
115
+
116
+ doc.open();
117
+ doc.write('<pre>' + code + '</pre>');
118
+ doc.close();
119
+
120
+ iframe.contentWindow.focus();
121
+ iframe.contentWindow.print();
122
+
123
+ td.removeChild(iframe);
124
+ }
125
+
126
+ dp.sh.Utils.About = function()
127
+ {
128
+ var wnd = window.open('', '_blank', 'dialog,width=320,height=150,scrollbars=0');
129
+ var doc = wnd.document;
130
+
131
+ var styles = document.getElementsByTagName('style');
132
+ var links = document.getElementsByTagName('link');
133
+
134
+ doc.write(dp.sh.Strings.AboutDialog.replace('{V}', dp.sh.Version));
135
+
136
+ // copy over ALL the styles from the parent page
137
+ for(var i = 0; i < styles.length; i++)
138
+ doc.write('<style>' + styles[i].innerHTML + '</style>');
139
+
140
+ for(var i = 0; i < links.length; i++)
141
+ if(links[i].rel.toLowerCase() == 'stylesheet')
142
+ doc.write('<link type="text/css" rel="stylesheet" href="' + links[i].href + '"></link>');
143
+
144
+ doc.close();
145
+ wnd.focus();
146
+ }
147
+
148
+ //
149
+ // Match object
150
+ //
151
+ dp.sh.Match = function(value, index, css)
152
+ {
153
+ this.value = value;
154
+ this.index = index;
155
+ this.length = value.length;
156
+ this.css = css;
157
+ }
158
+
159
+ //
160
+ // Highlighter object
161
+ //
162
+ dp.sh.Highlighter = function()
163
+ {
164
+ this.addGutter = true;
165
+ this.addControls = true;
166
+ this.collapse = false;
167
+ this.tabsToSpaces = true;
168
+ }
169
+
170
+ // static callback for the match sorting
171
+ dp.sh.Highlighter.SortCallback = function(m1, m2)
172
+ {
173
+ // sort matches by index first
174
+ if(m1.index < m2.index)
175
+ return -1;
176
+ else if(m1.index > m2.index)
177
+ return 1;
178
+ else
179
+ {
180
+ // if index is the same, sort by length
181
+ if(m1.length < m2.length)
182
+ return -1;
183
+ else if(m1.length > m2.length)
184
+ return 1;
185
+ }
186
+ return 0;
187
+ }
188
+
189
+ // gets a list of all matches for a given regular expression
190
+ dp.sh.Highlighter.prototype.GetMatches = function(regex, css)
191
+ {
192
+ var index = 0;
193
+ var match = null;
194
+
195
+ while((match = regex.exec(this.code)) != null)
196
+ {
197
+ this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css);
198
+ }
199
+ }
200
+
201
+ dp.sh.Highlighter.prototype.AddBit = function(str, css)
202
+ {
203
+ var span = document.createElement('span');
204
+
205
+ str = str.replace(/&/g, '&amp;');
206
+ str = str.replace(/ /g, '&nbsp;');
207
+ str = str.replace(/</g, '&lt;');
208
+ str = str.replace(/\n/gm, '&nbsp;<br>');
209
+
210
+ // when adding a piece of code, check to see if it has line breaks in it
211
+ // and if it does, wrap individual line breaks with span tags
212
+ if(css != null)
213
+ {
214
+ var regex = new RegExp('<br>', 'gi');
215
+
216
+ if(regex.test(str))
217
+ {
218
+ var lines = str.split('&nbsp;<br>');
219
+
220
+ str = '';
221
+
222
+ for(var i = 0; i < lines.length; i++)
223
+ {
224
+ span = document.createElement('SPAN');
225
+ span.className = css;
226
+ span.innerHTML = lines[i];
227
+
228
+ this.div.appendChild(span);
229
+
230
+ // don't add a <BR> for the last line
231
+ if(i + 1 < lines.length)
232
+ this.div.appendChild(document.createElement('BR'));
233
+ }
234
+ }
235
+ else
236
+ {
237
+ span.className = css;
238
+ span.innerHTML = str;
239
+ this.div.appendChild(span);
240
+ }
241
+ }
242
+ else
243
+ {
244
+ span.innerHTML = str;
245
+ this.div.appendChild(span);
246
+ }
247
+ }
248
+
249
+ // checks if one match is inside any other match
250
+ dp.sh.Highlighter.prototype.IsInside = function(match)
251
+ {
252
+ if(match == null || match.length == 0)
253
+ return;
254
+
255
+ for(var i = 0; i < this.matches.length; i++)
256
+ {
257
+ var c = this.matches[i];
258
+
259
+ if(c == null)
260
+ continue;
261
+
262
+ if((match.index > c.index) && (match.index <= c.index + c.length))
263
+ return true;
264
+ }
265
+
266
+ return false;
267
+ }
268
+
269
+ dp.sh.Highlighter.prototype.ProcessRegexList = function()
270
+ {
271
+ for(var i = 0; i < this.regexList.length; i++)
272
+ this.GetMatches(this.regexList[i].regex, this.regexList[i].css);
273
+ }
274
+
275
+ dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code)
276
+ {
277
+ var lines = code.split('\n');
278
+ var result = '';
279
+ var tabSize = 4;
280
+ var tab = '\t';
281
+
282
+ // This function inserts specified amount of spaces in the string
283
+ // where a tab is while removing that given tab.
284
+ function InsertSpaces(line, pos, count)
285
+ {
286
+ var left = line.substr(0, pos);
287
+ var right = line.substr(pos + 1, line.length); // pos + 1 will get rid of the tab
288
+ var spaces = '';
289
+
290
+ for(var i = 0; i < count; i++)
291
+ spaces += ' ';
292
+
293
+ return left + spaces + right;
294
+ }
295
+
296
+ // This function process one line for 'smart tabs'
297
+ function ProcessLine(line, tabSize)
298
+ {
299
+ if(line.indexOf(tab) == -1)
300
+ return line;
301
+
302
+ var pos = 0;
303
+
304
+ while((pos = line.indexOf(tab)) != -1)
305
+ {
306
+ // This is pretty much all there is to the 'smart tabs' logic.
307
+ // Based on the position within the line and size of a tab,
308
+ // calculate the amount of spaces we need to insert.
309
+ var spaces = tabSize - pos % tabSize;
310
+
311
+ line = InsertSpaces(line, pos, spaces);
312
+ }
313
+
314
+ return line;
315
+ }
316
+
317
+ // Go through all the lines and do the 'smart tabs' magic.
318
+ for(var i = 0; i < lines.length; i++)
319
+ result += ProcessLine(lines[i], tabSize) + '\n';
320
+
321
+ return result;
322
+ }
323
+
324
+ dp.sh.Highlighter.prototype.SwitchToTable = function()
325
+ {
326
+ // thanks to Lachlan Donald from SitePoint.com for this <br/> tag fix.
327
+ var html = this.div.innerHTML.replace(/<(br)\/?>/gi, '\n');
328
+ var lines = html.split('\n');
329
+ var row = null;
330
+ var cell = null;
331
+ var tBody = null;
332
+ var html = '';
333
+ var pipe = ' | ';
334
+
335
+ // creates an anchor to a utility
336
+ function UtilHref(util, text)
337
+ {
338
+ return '<a href="#" onclick="dp.sh.Utils.' + util + '(this); return false;">' + text + '</a>';
339
+ }
340
+
341
+ tBody = document.createElement('TBODY'); // can be created and all others go to tBodies collection.
342
+
343
+ this.table.appendChild(tBody);
344
+
345
+ if(this.addGutter == true)
346
+ {
347
+ row = tBody.insertRow(-1);
348
+ cell = row.insertCell(-1);
349
+ cell.className = 'tools-corner';
350
+ }
351
+
352
+ if(this.addControls == true)
353
+ {
354
+ var tHead = document.createElement('THEAD'); // controls will be placed in here
355
+ this.table.appendChild(tHead);
356
+
357
+ row = tHead.insertRow(-1);
358
+
359
+ // add corner if there's a gutter
360
+ if(this.addGutter == true)
361
+ {
362
+ cell = row.insertCell(-1);
363
+ cell.className = 'tools-corner';
364
+ }
365
+
366
+ cell = row.insertCell(-1);
367
+
368
+ // preserve some variables for the controls
369
+ cell.originalCode = this.originalCode;
370
+ cell.processedCode = this.code;
371
+ cell.className = 'tools';
372
+
373
+ if(this.collapse == true)
374
+ {
375
+ tBody.className = 'hide';
376
+ cell.innerHTML += '<span><b>' + UtilHref('Expand', dp.sh.Strings.ExpandCode) + '</b>' + pipe + '</span>';
377
+ }
378
+
379
+ cell.innerHTML += UtilHref('ViewSource', dp.sh.Strings.ViewPlain) + pipe + UtilHref('PrintSource', dp.sh.Strings.Print);
380
+
381
+ // IE has this clipboard object which is easy enough to use
382
+ if(window.clipboardData)
383
+ cell.innerHTML += pipe + UtilHref('ToClipboard', dp.sh.Strings.CopyToClipboard);
384
+
385
+ cell.innerHTML += pipe + UtilHref('About', dp.sh.Strings.About);
386
+ }
387
+
388
+ for(var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++)
389
+ {
390
+ row = tBody.insertRow(-1);
391
+
392
+ if(this.addGutter == true)
393
+ {
394
+ cell = row.insertCell(-1);
395
+ cell.className = 'gutter';
396
+ cell.innerHTML = lineIndex;
397
+ }
398
+
399
+ cell = row.insertCell(-1);
400
+ cell.className = 'line' + (i % 2 + 1); // uses .line1 and .line2 css styles for alternating lines
401
+ cell.innerHTML = lines[i];
402
+ }
403
+
404
+ this.div.innerHTML = '';
405
+ }
406
+
407
+ dp.sh.Highlighter.prototype.Highlight = function(code)
408
+ {
409
+ function Trim(str)
410
+ {
411
+ return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
412
+ }
413
+
414
+ function Chop(str)
415
+ {
416
+ return str.replace(/\n*$/, '').replace(/^\n*/, '');
417
+ }
418
+
419
+ function Unindent(str)
420
+ {
421
+ var lines = str.split('\n');
422
+ var indents = new Array();
423
+ var regex = new RegExp('^\\s*', 'g');
424
+ var min = 1000;
425
+
426
+ // go through every line and check for common number of indents
427
+ for(var i = 0; i < lines.length && min > 0; i++)
428
+ {
429
+ if(Trim(lines[i]).length == 0)
430
+ continue;
431
+
432
+ var matches = regex.exec(lines[i]);
433
+
434
+ if(matches != null && matches.length > 0)
435
+ min = Math.min(matches[0].length, min);
436
+ }
437
+
438
+ // trim minimum common number of white space from the begining of every line
439
+ if(min > 0)
440
+ for(var i = 0; i < lines.length; i++)
441
+ lines[i] = lines[i].substr(min);
442
+
443
+ return lines.join('\n');
444
+ }
445
+
446
+ // This function returns a portions of the string from pos1 to pos2 inclusive
447
+ function Copy(string, pos1, pos2)
448
+ {
449
+ return string.substr(pos1, pos2 - pos1);
450
+ }
451
+
452
+ var pos = 0;
453
+
454
+ this.originalCode = code;
455
+ this.code = Chop(Unindent(code));
456
+ this.div = document.createElement('DIV');
457
+ this.table = document.createElement('TABLE');
458
+ this.matches = new Array();
459
+
460
+ if(this.CssClass != null)
461
+ this.table.className = this.CssClass;
462
+
463
+ // replace tabs with spaces
464
+ if(this.tabsToSpaces == true)
465
+ this.code = this.ProcessSmartTabs(this.code);
466
+
467
+ this.table.border = 0;
468
+ this.table.cellSpacing = 0;
469
+ this.table.cellPadding = 0;
470
+
471
+ this.ProcessRegexList();
472
+
473
+ // if no matches found, add entire code as plain text
474
+ if(this.matches.length == 0)
475
+ {
476
+ this.AddBit(this.code, null);
477
+ this.SwitchToTable();
478
+ return;
479
+ }
480
+
481
+ // sort the matches
482
+ this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback);
483
+
484
+ // The following loop checks to see if any of the matches are inside
485
+ // of other matches. This process would get rid of highligting strings
486
+ // inside comments, keywords inside strings and so on.
487
+ for(var i = 0; i < this.matches.length; i++)
488
+ if(this.IsInside(this.matches[i]))
489
+ this.matches[i] = null;
490
+
491
+ // Finally, go through the final list of matches and pull the all
492
+ // together adding everything in between that isn't a match.
493
+ for(var i = 0; i < this.matches.length; i++)
494
+ {
495
+ var match = this.matches[i];
496
+
497
+ if(match == null || match.length == 0)
498
+ continue;
499
+
500
+ this.AddBit(Copy(this.code, pos, match.index), null);
501
+ this.AddBit(match.value, match.css);
502
+
503
+ pos = match.index + match.length;
504
+ }
505
+
506
+ this.AddBit(this.code.substr(pos), null);
507
+
508
+ this.SwitchToTable();
509
+ }
510
+
511
+ dp.sh.Highlighter.prototype.GetKeywords = function(str)
512
+ {
513
+ return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b';
514
+ }
515
+
516
+ // highlightes all elements identified by name and gets source code from specified property
517
+ dp.sh.HighlightAll = function(name, showGutter /* optional */, showControls /* optional */, collapseAll /* optional */, firstLine /* optional */)
518
+ {
519
+ function FindValue()
520
+ {
521
+ var a = arguments;
522
+
523
+ for(var i = 0; i < a.length; i++)
524
+ {
525
+ if(a[i] == null)
526
+ continue;
527
+
528
+ if(typeof(a[i]) == 'string' && a[i] != '')
529
+ return a[i] + '';
530
+
531
+ if(typeof(a[i]) == 'object' && a[i].value != '')
532
+ return a[i].value + '';
533
+ }
534
+
535
+ return null;
536
+ }
537
+
538
+ function IsOptionSet(value, list)
539
+ {
540
+ for(var i = 0; i < list.length; i++)
541
+ if(list[i] == value)
542
+ return true;
543
+
544
+ return false;
545
+ }
546
+
547
+ function GetOptionValue(name, list, defaultValue)
548
+ {
549
+ var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi');
550
+ var matches = null;
551
+
552
+ for(var i = 0; i < list.length; i++)
553
+ if((matches = regex.exec(list[i])) != null)
554
+ return matches[1];
555
+
556
+ return defaultValue;
557
+ }
558
+
559
+ var elements = document.getElementsByName(name);
560
+ var highlighter = null;
561
+ var registered = new Object();
562
+ var propertyName = 'value';
563
+
564
+ // if no code blocks found, leave
565
+ if(elements == null)
566
+ return;
567
+
568
+ // register all brushes
569
+ for(var brush in dp.sh.Brushes)
570
+ {
571
+ var aliases = dp.sh.Brushes[brush].Aliases;
572
+
573
+ if(aliases == null)
574
+ continue;
575
+
576
+ for(var i = 0; i < aliases.length; i++)
577
+ registered[aliases[i]] = brush;
578
+ }
579
+
580
+ for(var i = 0; i < elements.length; i++)
581
+ {
582
+ var element = elements[i];
583
+ var options = FindValue(
584
+ element.attributes['class'], element.className,
585
+ element.attributes['language'], element.language
586
+ );
587
+ var language = '';
588
+
589
+ if(options == null)
590
+ continue;
591
+
592
+ options = options.split(':');
593
+
594
+ language = options[0].toLowerCase();
595
+
596
+ if(registered[language] == null)
597
+ continue;
598
+
599
+ // instantiate a brush
600
+ highlighter = new dp.sh.Brushes[registered[language]]();
601
+
602
+ // hide the original element
603
+ element.style.display = 'none';
604
+
605
+ highlighter.addGutter = (showGutter == null) ? !IsOptionSet('nogutter', options) : showGutter;
606
+ highlighter.addControls = (showControls == null) ? !IsOptionSet('nocontrols', options) : showControls;
607
+ highlighter.collapse = (collapseAll == null) ? IsOptionSet('collapse', options) : collapseAll;
608
+
609
+ // first line idea comes from Andrew Collington, thanks!
610
+ highlighter.firstLine = (firstLine == null) ? parseInt(GetOptionValue('firstline', options, 1)) : firstLine;
611
+
612
+ highlighter.Highlight(element[propertyName]);
613
+
614
+ // place the result table inside a div
615
+ var div = document.createElement('DIV');
616
+
617
+ div.className = 'dp-highlighter';
618
+ div.appendChild(highlighter.table);
619
+
620
+ element.parentNode.insertBefore(div, element);
621
+ }
622
+ }
@@ -0,0 +1 @@
1
+ .invisible {display: none;}
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <title>MochiKit Example Source Viewer</title>
5
+ <script type="text/javascript" src="../../lib/MochiKit/MochiKit.js"></script>
6
+ <link href="view-source.css" rel="stylesheet" type="text/css" />
7
+ <link href="lib/SyntaxHighlighter/SyntaxHighlighter.css" rel="stylesheet" type="text/css" />
8
+ <script type="text/javascript" src="view-source.js"></script>
9
+ <script type="text/javascript" src="lib/SyntaxHighlighter/shCore.js"></script>
10
+ <script type="text/javascript" src="lib/SyntaxHighlighter/shBrushJScript.js"></script>
11
+ <script type="text/javascript" src="lib/SyntaxHighlighter/shBrushXml.js"></script>
12
+ </head>
13
+ <body onload="viewSource();">
14
+ <h3 id="filename"></h3>
15
+ <div id="codeview" class="invisible">
16
+ <textarea name="code" id="code"></textarea>
17
+ </div>
18
+ </body>
19
+ </html>
@@ -0,0 +1,70 @@
1
+ /*
2
+
3
+ Do syntax highlighting on every textarea inside of a "codeview" element
4
+
5
+ The content of textareas are URLs, not code!
6
+
7
+ */
8
+ var viewSource = function () {
9
+ var filename = location.hash;
10
+ if (!filename) {
11
+ filename = location.hash = "view-source/view-source.js";
12
+ }
13
+ filename = lstrip(filename, "#");
14
+ var href = "../" + filename;
15
+ replaceChildNodes("filename", "loading ", A({"href": href}, filename));
16
+ replaceChildNodes("code", href);
17
+ ext = filename.split(".").pop();
18
+ var classes = {
19
+ "html": "xml",
20
+ "js": "javascript",
21
+ "json": "javascript",
22
+ "xml": "xml"
23
+ };
24
+ updateNodeAttributes("code", {"class": classes[ext]});
25
+ syntaxHighlight(filename);
26
+ };
27
+
28
+ var syntaxHighlight = function (filename) {
29
+ var swapContents = function (dest, req) {
30
+ replaceChildNodes(dest, req.responseText);
31
+ };
32
+
33
+ var showParsing = function () {
34
+ replaceChildNodes("filename",
35
+ "parsing ",
36
+ A({"href": "../" + filename}, filename)
37
+ );
38
+ return wait(0);
39
+ };
40
+
41
+ var finishSyntaxHighlight = function () {
42
+ dp.sh.HighlightAll("code", true, true, false);
43
+ replaceChildNodes("filename", A({"href": "../" + filename}, filename));
44
+ removeElementClass("codeview", "invisible");
45
+ };
46
+
47
+ var elems = getElementsByTagAndClassName("textarea", null, "codeview");
48
+ var dl = new Deferred();
49
+ var deferredCount = 0;
50
+ var checkDeferredList = function () {
51
+ deferredCount -= 1;
52
+ if (!deferredCount) {
53
+ dl.callback();
54
+ }
55
+ };
56
+ for (var i = 0; i < elems.length; i++) {
57
+ var elem = elems[i];
58
+ if (elem.name != "code") {
59
+ continue;
60
+ }
61
+ var url = strip(scrapeText(elem))
62
+ var d = doXHR(url).addCallback(
63
+ partial(swapContents, elem)
64
+ );
65
+ deferredCount += 1;
66
+ d.addCallback(checkDeferredList);
67
+ }
68
+ dl.addCallback(showParsing);
69
+ dl.addCallback(finishSyntaxHighlight);
70
+ };