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.
- data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +362 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +69 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +179 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +17 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +814 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +1703 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +755 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +1197 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +168 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +187 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +300 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +524 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +420 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +142 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +38 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +240 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +508 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +244 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +385 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +384 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +1161 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +447 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +113 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +767 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +1445 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +651 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +1143 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +145 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +197 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +258 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +454 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +348 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +128 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +26 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +203 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +498 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +186 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +353 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +362 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +895 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +83 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +69 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +401 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +10 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +40 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +96 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +4 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +95 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +31 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +23 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +54 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +150 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +42 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +90 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +29 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +38 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +189 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +28 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +73 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +38 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +36 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +65 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +31 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +18 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +61 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +38 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +67 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +67 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +30 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +483 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +62 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +71 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +150 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +88 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +54 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +373 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +78 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +5 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +85 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +46 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +78 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +11 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +74 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +73 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +125 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +88 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +17 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +59 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +28 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +3 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +19 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +45 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +119 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +40 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +43 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +91 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +54 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +93 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +64 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +71 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +66 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +203 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +177 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +339 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +30 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +31 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +22 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +23 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +71 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +40 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +29 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +61 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +622 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +1 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +19 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +70 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +130 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +48 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +682 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +1489 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +863 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +1256 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +222 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +793 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +304 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +844 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +315 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +353 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +188 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +115 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +236 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +415 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +897 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +589 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +594 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +162 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +2026 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +18 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +7829 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +6 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +251 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +40 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +381 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +159 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +28 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +6 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +25 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +16 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +577 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +137 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +52 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +30 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +89 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +186 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +88 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +408 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +1 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +34 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +84 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +48 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +363 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +39 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +54 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +39 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +38 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +32 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +40 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +18 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +295 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +43 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +223 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +197 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +481 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +28 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +406 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +683 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +161 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +756 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +151 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +2177 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +705 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +348 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +247 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +9 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +723 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/README +1 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +2 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +2 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +302 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +139 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +172 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +81 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +155 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +50 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +428 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +330 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +368 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +256 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +436 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +299 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +159 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +64 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +131 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +34 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +131 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +34 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +334 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +151 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +304 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +144 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +62 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +37 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +58 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +31 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +25 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +143 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +56 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +58 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +133 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +57 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +136 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +161 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +38 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +43 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +28 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +29 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +53 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +29 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +61 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +57 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +6 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +29 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +141 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +26 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +147 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +24 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +89 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +66 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +20 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +31 -0
- metadata +264 -2
@@ -0,0 +1,251 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>MochiKit Customizer</title>
|
4
|
+
<link type="text/css" rel="stylesheet" href="../../include/css/documentation.css" />
|
5
|
+
<style type="text/css">
|
6
|
+
td {
|
7
|
+
vertical-align: top;
|
8
|
+
}
|
9
|
+
label {
|
10
|
+
font-weight: bold;
|
11
|
+
font-size: 14px;
|
12
|
+
}
|
13
|
+
input {
|
14
|
+
margin: 0;
|
15
|
+
vertical-align: -3px;
|
16
|
+
}
|
17
|
+
.info {
|
18
|
+
color: #888888;
|
19
|
+
}
|
20
|
+
</style>
|
21
|
+
<script type="text/javascript" src="MochiKit.js"></script>
|
22
|
+
<script type="text/javascript">
|
23
|
+
// Predefined module sets
|
24
|
+
var SETS = {
|
25
|
+
core: { name: "Non-Web Modules", deps: ["Base", "DateTime", "Format", "Iter"] },
|
26
|
+
standard: { name: "Web Modules", deps: ["Base", "DateTime", "Format", "Iter", "Async", "Color", "DOM", "Logging", "LoggingPane", "Selector", "Signal", "Style"] },
|
27
|
+
all: { name: "Extension Modules", deps: null }
|
28
|
+
};
|
29
|
+
var MODULES = { "Base": { deps: [], packed: "" } };
|
30
|
+
|
31
|
+
// Starts loading the packed library
|
32
|
+
function doInit() {
|
33
|
+
var url = $$("head script[src*=MochiKit.js]")[0].src;
|
34
|
+
var d = doSimpleXMLHttpRequest(url);
|
35
|
+
d.addCallback(doParseScript);
|
36
|
+
d.addErrback(function(err) {
|
37
|
+
alert("Error: " + err.toString());
|
38
|
+
});
|
39
|
+
}
|
40
|
+
|
41
|
+
// Parses the packed library into modules
|
42
|
+
function doParseScript(xhr) {
|
43
|
+
var src = xhr.responseText;
|
44
|
+
var moduleName = "Base";
|
45
|
+
var pos = 0;
|
46
|
+
while ((pos = src.indexOf("MochiKit.Base._deps")) >= 0) {
|
47
|
+
if (pos > 0) {
|
48
|
+
MODULES[moduleName].packed += src.substring(0, pos);
|
49
|
+
src = src.substring(pos);
|
50
|
+
}
|
51
|
+
var names = doFindStringLiterals(src);
|
52
|
+
if (names.length > 0) {
|
53
|
+
moduleName = names[0];
|
54
|
+
MODULES[moduleName] = { deps: names.slice(1), packed: "" };
|
55
|
+
}
|
56
|
+
pos = src.indexOf("MochiKit.Base._exportSymbols");
|
57
|
+
pos = src.indexOf("\n", pos);
|
58
|
+
MODULES[moduleName].packed += src.substring(0, pos + 1);
|
59
|
+
src = src.substring(pos + 1);
|
60
|
+
}
|
61
|
+
MODULES["Base"].packedTail = src;
|
62
|
+
for (var key in MODULES) {
|
63
|
+
var m = MODULES[key];
|
64
|
+
m.size = m.packed.length;
|
65
|
+
if (m.packedTail) {
|
66
|
+
m.size += m.packedTail.length;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
SETS.all.deps = keys(MODULES);
|
70
|
+
for (var key in SETS) {
|
71
|
+
var s = SETS[key];
|
72
|
+
s.size = 0;
|
73
|
+
for (var i = 0; i < s.deps.length; i++) {
|
74
|
+
s.size += MODULES[s.deps[i]].size;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
doRender();
|
78
|
+
}
|
79
|
+
|
80
|
+
// Find all string literals on the first line
|
81
|
+
function doFindStringLiterals(str) {
|
82
|
+
var res = [];
|
83
|
+
var endPos = str.indexOf("\n");
|
84
|
+
var line = str.substring(0, (endPos > 0) ? endPos : str.length);
|
85
|
+
var matches = line.match(/"([^"]*)"|'([^']*)'/g);
|
86
|
+
for (var i = 0; i < matches.length; i++) {
|
87
|
+
var name = matches[i];
|
88
|
+
res.push(name.substring(1, name.length - 1));
|
89
|
+
}
|
90
|
+
return res;
|
91
|
+
}
|
92
|
+
|
93
|
+
// Renders the module selection UI
|
94
|
+
function doRender() {
|
95
|
+
var nf = numberFormatter("0.0 kB");
|
96
|
+
var select = $("packSets");
|
97
|
+
var cell = $("packModules");
|
98
|
+
for (var key in SETS) {
|
99
|
+
var s = SETS[key];
|
100
|
+
var text = s.name + " \u2014 " + nf(s.size / 1024);
|
101
|
+
select.appendChild(OPTION({ value: key }, text));
|
102
|
+
if (key != "core") {
|
103
|
+
cell.appendChild(HR());
|
104
|
+
}
|
105
|
+
cell.appendChild(H3({}, s.name, ":"));
|
106
|
+
for (var i = 0; i < s.deps.length; i++) {
|
107
|
+
var name = s.deps[i];
|
108
|
+
var m = MODULES[name];
|
109
|
+
if (m.dom == null) {
|
110
|
+
m.dom = INPUT({ type: "checkbox" });
|
111
|
+
if (name == "Base") {
|
112
|
+
m.dom.disabled = true;
|
113
|
+
}
|
114
|
+
var text = " \u2014 " + nf(m.size / 1024);
|
115
|
+
if (m.deps.length > 1) {
|
116
|
+
text += " \u2014 uses " + m.deps.slice(1).join(", ");
|
117
|
+
}
|
118
|
+
var span = SPAN({ "class": "info" }, text);
|
119
|
+
cell.appendChild(LABEL({}, m.dom, " MochiKit." + name, span));
|
120
|
+
cell.appendChild(BR());
|
121
|
+
connect(m.dom, "onclick", partial(doChangeModule, name));
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
select.appendChild(OPTION({ value: "custom" }, "Selected Modules"));
|
126
|
+
select.selectedIndex = 1;
|
127
|
+
connect(select, "onchange", doChangeSet);
|
128
|
+
doChangeSet();
|
129
|
+
}
|
130
|
+
|
131
|
+
// Handle module set changes
|
132
|
+
function doChangeSet() {
|
133
|
+
var key = $("packSets").value;
|
134
|
+
var s = SETS[key];
|
135
|
+
if (s != null) {
|
136
|
+
doCheckBoxes(s.deps, true);
|
137
|
+
var fun = function(name) { return findValue(s.deps, name) < 0; };
|
138
|
+
var other = filter(fun, keys(MODULES));
|
139
|
+
doCheckBoxes(other, false);
|
140
|
+
doUpdateCustom();
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// Handle individual module changes
|
145
|
+
function doChangeModule(name) {
|
146
|
+
var m = MODULES[name];
|
147
|
+
if (m.dom.checked) {
|
148
|
+
var deps = m.deps.slice(0);
|
149
|
+
for (var i = 0; i < deps.length; i++) {
|
150
|
+
var sub = MODULES[deps[i]].deps;
|
151
|
+
for (var j = 0; j < sub.length; j++) {
|
152
|
+
if (findValue(deps, sub[j]) < 0) {
|
153
|
+
deps.push(sub[j]);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
} else {
|
158
|
+
var deps = [name];
|
159
|
+
for (var i = 0; i < deps.length; i++) {
|
160
|
+
for (var id in MODULES) {
|
161
|
+
if (findValue(deps, id) < 0 &&
|
162
|
+
findValue(MODULES[id].deps, deps[i]) >= 0) {
|
163
|
+
deps.push(id);
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
doCheckBoxes(deps, m.dom.checked);
|
169
|
+
doUpdateCustom();
|
170
|
+
var select = $("packSets");
|
171
|
+
select.selectedIndex = 3;
|
172
|
+
}
|
173
|
+
|
174
|
+
// Checks or unchecks the specified modules
|
175
|
+
function doCheckBoxes(names, checked) {
|
176
|
+
for (var i = 0; i < names.length; i++) {
|
177
|
+
var name = names[i];
|
178
|
+
var input = MODULES[name].dom;
|
179
|
+
if (input.checked != checked) {
|
180
|
+
input.checked = checked;
|
181
|
+
var color = checked ? '#aaffaa' : '#ffaaaa';
|
182
|
+
Highlight(input.parentNode, { startcolor: color });
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
function doUpdateCustom() {
|
188
|
+
var select = $("packSets");
|
189
|
+
var nf = numberFormatter("0.0 kB");
|
190
|
+
var size = 0;
|
191
|
+
for (var id in MODULES) {
|
192
|
+
var m = MODULES[id];
|
193
|
+
if (m.dom.checked) {
|
194
|
+
size += m.size;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
var option = select.childNodes[3];
|
198
|
+
replaceChildNodes(option, "Selected Modules \u2014 " + nf(size / 1024));
|
199
|
+
}
|
200
|
+
|
201
|
+
function doSubmit() {
|
202
|
+
var packed = "";
|
203
|
+
if (!$("packExport").checked) {
|
204
|
+
packed += "// Config options\n";
|
205
|
+
packed += "MochiKit={__export__:false};\n\n";
|
206
|
+
}
|
207
|
+
for (var id in MODULES) {
|
208
|
+
var m = MODULES[id];
|
209
|
+
if (m.dom.checked) {
|
210
|
+
packed += m.packed;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
packed += MODULES["Base"].packedTail;
|
214
|
+
$("packData").value = packed;
|
215
|
+
return true;
|
216
|
+
}
|
217
|
+
</script>
|
218
|
+
</head>
|
219
|
+
<body onload="doInit()">
|
220
|
+
<a href="http://mochikit.com/"><img id="mainlink" src="../../include/_img/g_logo_doc.gif" alt="I ♥ MochiKit" title="I ♥ MochiKit" /></a>
|
221
|
+
<div class="document">
|
222
|
+
<div class="section">
|
223
|
+
<h1>MochiKit Customizer</h1>
|
224
|
+
|
225
|
+
<form action="http://mochikit-dot-com.appspot.com/download" method="POST" onsubmit="return doSubmit();">
|
226
|
+
<table>
|
227
|
+
<tbody>
|
228
|
+
<tr>
|
229
|
+
<td style="border-right: 1px solid rgb(204, 204, 204); padding-right: 10px;">
|
230
|
+
<h3>Module Sets:</h3>
|
231
|
+
<select id="packSets"></select>
|
232
|
+
<hr style="margin-top: 200px;">
|
233
|
+
<h3>Additional Options:</h3>
|
234
|
+
<label><input id="packExport" checked="checked" type="checkbox"> Export Globals</label><br>
|
235
|
+
</td>
|
236
|
+
<td id="packModules" style="padding-left: 10px;">
|
237
|
+
</td>
|
238
|
+
</tr>
|
239
|
+
<tr>
|
240
|
+
<td colspan="2" style="padding-top: 20px;">
|
241
|
+
<button type="submit">Create Customized MochiKit</button>
|
242
|
+
</td>
|
243
|
+
</tr>
|
244
|
+
</tbody>
|
245
|
+
</table>
|
246
|
+
<input id="packData" type="hidden" name="data" value="" />
|
247
|
+
</form>
|
248
|
+
</div>
|
249
|
+
</div>
|
250
|
+
</body>
|
251
|
+
</html>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
var JSAN = {
|
2
|
+
global: this,
|
3
|
+
use: function (module, symbols) {
|
4
|
+
var components = module.split(/\./);
|
5
|
+
var fn = components.join('/') + '.js';
|
6
|
+
var o = JSAN.global;
|
7
|
+
var i, c;
|
8
|
+
for (i = 0; i < components.length; i++) {
|
9
|
+
o = o[components[i]];
|
10
|
+
if (typeof(o) == 'undefined') {
|
11
|
+
break;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
if (typeof(o) != 'undefined') {
|
15
|
+
return o;
|
16
|
+
}
|
17
|
+
|
18
|
+
load(fn);
|
19
|
+
o = JSAN.global;
|
20
|
+
for (i = 0; i < components.length; i++) {
|
21
|
+
o = o[components[i]];
|
22
|
+
if (typeof(o) == 'undefined') {
|
23
|
+
return undefined;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
if (!symbols) {
|
27
|
+
var tags = o.EXPORT_TAGS;
|
28
|
+
if (tags) {
|
29
|
+
symbols = tags[':common'] || tags[':all'];
|
30
|
+
}
|
31
|
+
}
|
32
|
+
if (symbols) {
|
33
|
+
for (i = 0; i < symbols.length; i++) {
|
34
|
+
c = symbols[i];
|
35
|
+
JSAN.global[c] = o[c];
|
36
|
+
}
|
37
|
+
}
|
38
|
+
return o;
|
39
|
+
}
|
40
|
+
};
|
@@ -0,0 +1,381 @@
|
|
1
|
+
/**
|
2
|
+
* SimpleTest, a partial Test.Simple/Test.More API compatible test library.
|
3
|
+
*
|
4
|
+
* Why?
|
5
|
+
*
|
6
|
+
* Test.Simple doesn't work on IE < 6.
|
7
|
+
* TODO:
|
8
|
+
* * Support the Test.Simple API used by MochiKit, to be able to test MochiKit
|
9
|
+
* itself against IE 5.5
|
10
|
+
*
|
11
|
+
**/
|
12
|
+
|
13
|
+
if (typeof(SimpleTest) == "undefined") {
|
14
|
+
var SimpleTest = {};
|
15
|
+
}
|
16
|
+
|
17
|
+
// Check to see if the TestRunner is present and has logging
|
18
|
+
if (typeof(parent) != "undefined" && parent.TestRunner) {
|
19
|
+
SimpleTest._logEnabled = parent.TestRunner.logEnabled;
|
20
|
+
}
|
21
|
+
|
22
|
+
SimpleTest._tests = [];
|
23
|
+
SimpleTest._stopOnLoad = true;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Something like assert.
|
27
|
+
*/
|
28
|
+
SimpleTest.ok = function (condition, name, diag) {
|
29
|
+
var test = {'result': !!condition, 'name': name, 'diag': diag || ""};
|
30
|
+
if (SimpleTest._logEnabled) {
|
31
|
+
var msg = test.result ? "PASS" : "FAIL";
|
32
|
+
msg += " | " + test.name;
|
33
|
+
if (test.result) {
|
34
|
+
parent.TestRunner.logger.log(msg);
|
35
|
+
} else {
|
36
|
+
msg += " | " + test.diag;
|
37
|
+
parent.TestRunner.logger.error(msg);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
SimpleTest._tests.push(test);
|
41
|
+
};
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Roughly equivalent to ok(a==b, name)
|
45
|
+
*/
|
46
|
+
SimpleTest.is = function (a, b, name) {
|
47
|
+
var repr = MochiKit.Base.repr;
|
48
|
+
SimpleTest.ok(a == b, name, "got " + repr(a) + ", expected " + repr(b));
|
49
|
+
};
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Roughly equivalent to ok(compare(a,b)==0, name)
|
53
|
+
*/
|
54
|
+
SimpleTest.eq = function (a, b, name) {
|
55
|
+
var repr = MochiKit.Base.repr;
|
56
|
+
try {
|
57
|
+
SimpleTest.ok(compare(a, b) == 0, name, "got " + repr(a) + ", expected " + repr(b));
|
58
|
+
} catch (e) {
|
59
|
+
SimpleTest.ok(false, name, "exception in compare: " + repr(e));
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Makes a test report, returns it as a DIV element.
|
66
|
+
**/
|
67
|
+
SimpleTest.report = function () {
|
68
|
+
var DIV = MochiKit.DOM.DIV;
|
69
|
+
var passed = 0;
|
70
|
+
var failed = 0;
|
71
|
+
var results = MochiKit.Base.map(
|
72
|
+
function (test) {
|
73
|
+
var cls, msg;
|
74
|
+
if (test.result) {
|
75
|
+
passed++;
|
76
|
+
cls = "test_ok";
|
77
|
+
msg = "ok - " + test.name;
|
78
|
+
} else {
|
79
|
+
failed++;
|
80
|
+
cls = "test_not_ok";
|
81
|
+
msg = "not ok - " + test.name;
|
82
|
+
if (test.diag != null && test.diag != "") {
|
83
|
+
msg += ": " + test.diag;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
return DIV({"class": cls}, msg);
|
87
|
+
},
|
88
|
+
SimpleTest._tests
|
89
|
+
);
|
90
|
+
var summary_class = ((failed == 0) ? 'all_pass' : 'some_fail');
|
91
|
+
return DIV({'class': 'tests_report'},
|
92
|
+
DIV({'class': 'tests_summary ' + summary_class},
|
93
|
+
DIV({'class': 'tests_passed'}, "Passed: " + passed),
|
94
|
+
DIV({'class': 'tests_failed'}, "Failed: " + failed)),
|
95
|
+
results
|
96
|
+
);
|
97
|
+
};
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Toggle element visibility
|
101
|
+
**/
|
102
|
+
SimpleTest.toggle = function(el) {
|
103
|
+
if (MochiKit.Style.getStyle(el, 'display') == 'block') {
|
104
|
+
el.style.display = 'none';
|
105
|
+
} else {
|
106
|
+
el.style.display = 'block';
|
107
|
+
}
|
108
|
+
};
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Toggle visibility for divs with a specific class.
|
112
|
+
**/
|
113
|
+
SimpleTest.toggleByClass = function (cls) {
|
114
|
+
var elems = getElementsByTagAndClassName('div', cls);
|
115
|
+
MochiKit.Base.map(SimpleTest.toggle, elems);
|
116
|
+
};
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Shows the report in the browser
|
120
|
+
**/
|
121
|
+
|
122
|
+
SimpleTest.showReport = function() {
|
123
|
+
var togglePassed = A({'href': '#'}, "Toggle passed tests");
|
124
|
+
var toggleFailed = A({'href': '#'}, "Toggle failed tests");
|
125
|
+
togglePassed.onclick = partial(SimpleTest.toggleByClass, 'test_ok');
|
126
|
+
toggleFailed.onclick = partial(SimpleTest.toggleByClass, 'test_not_ok');
|
127
|
+
var body = document.getElementsByTagName("body")[0];
|
128
|
+
var firstChild = body.childNodes[0];
|
129
|
+
var addNode;
|
130
|
+
if (firstChild) {
|
131
|
+
addNode = function (el) {
|
132
|
+
body.insertBefore(el, firstChild);
|
133
|
+
};
|
134
|
+
} else {
|
135
|
+
addNode = function (el) {
|
136
|
+
body.appendChild(el)
|
137
|
+
};
|
138
|
+
}
|
139
|
+
addNode(togglePassed);
|
140
|
+
addNode(SPAN(null, " "));
|
141
|
+
addNode(toggleFailed);
|
142
|
+
addNode(SimpleTest.report());
|
143
|
+
};
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Tells SimpleTest to don't finish the test when the document is loaded,
|
147
|
+
* useful for asynchronous tests.
|
148
|
+
*
|
149
|
+
* When SimpleTest.waitForExplicitFinish is called,
|
150
|
+
* explicit SimpleTest.finish() is required.
|
151
|
+
**/
|
152
|
+
SimpleTest.waitForExplicitFinish = function () {
|
153
|
+
SimpleTest._stopOnLoad = false;
|
154
|
+
};
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Talks to the TestRunner if being ran on a iframe and the parent has a
|
158
|
+
* TestRunner object.
|
159
|
+
**/
|
160
|
+
SimpleTest.talkToRunner = function () {
|
161
|
+
if (typeof(parent) != "undefined" && parent.TestRunner) {
|
162
|
+
parent.TestRunner.testFinished(document);
|
163
|
+
}
|
164
|
+
};
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Finishes the tests. This is automatically called, except when
|
168
|
+
* SimpleTest.waitForExplicitFinish() has been invoked.
|
169
|
+
**/
|
170
|
+
SimpleTest.finish = function () {
|
171
|
+
SimpleTest.showReport();
|
172
|
+
SimpleTest.talkToRunner();
|
173
|
+
};
|
174
|
+
|
175
|
+
|
176
|
+
addLoadEvent(function() {
|
177
|
+
if (SimpleTest._stopOnLoad) {
|
178
|
+
SimpleTest.finish();
|
179
|
+
}
|
180
|
+
});
|
181
|
+
|
182
|
+
// --------------- Test.Builder/Test.More isDeeply() -----------------
|
183
|
+
|
184
|
+
|
185
|
+
SimpleTest.DNE = {dne: 'Does not exist'};
|
186
|
+
SimpleTest.LF = "\r\n";
|
187
|
+
SimpleTest._isRef = function (object) {
|
188
|
+
var type = typeof(object);
|
189
|
+
return type == 'object' || type == 'function';
|
190
|
+
};
|
191
|
+
|
192
|
+
|
193
|
+
SimpleTest._deepCheck = function (e1, e2, stack, seen) {
|
194
|
+
var ok = false;
|
195
|
+
// Either they're both references or both not.
|
196
|
+
var sameRef = !(!SimpleTest._isRef(e1) ^ !SimpleTest._isRef(e2));
|
197
|
+
if (e1 == null && e2 == null) {
|
198
|
+
ok = true;
|
199
|
+
} else if (e1 != null ^ e2 != null) {
|
200
|
+
ok = false;
|
201
|
+
} else if (e1 == SimpleTest.DNE ^ e2 == SimpleTest.DNE) {
|
202
|
+
ok = false;
|
203
|
+
} else if (sameRef && e1 == e2) {
|
204
|
+
// Handles primitives and any variables that reference the same
|
205
|
+
// object, including functions.
|
206
|
+
ok = true;
|
207
|
+
} else if (SimpleTest.isa(e1, 'Array') && SimpleTest.isa(e2, 'Array')) {
|
208
|
+
ok = SimpleTest._eqArray(e1, e2, stack, seen);
|
209
|
+
} else if (typeof e1 == "object" && typeof e2 == "object") {
|
210
|
+
ok = SimpleTest._eqAssoc(e1, e2, stack, seen);
|
211
|
+
} else {
|
212
|
+
// If we get here, they're not the same (function references must
|
213
|
+
// always simply rererence the same function).
|
214
|
+
stack.push({ vals: [e1, e2] });
|
215
|
+
ok = false;
|
216
|
+
}
|
217
|
+
return ok;
|
218
|
+
};
|
219
|
+
|
220
|
+
SimpleTest._eqArray = function (a1, a2, stack, seen) {
|
221
|
+
// Return if they're the same object.
|
222
|
+
if (a1 == a2) return true;
|
223
|
+
|
224
|
+
// JavaScript objects have no unique identifiers, so we have to store
|
225
|
+
// references to them all in an array, and then compare the references
|
226
|
+
// directly. It's slow, but probably won't be much of an issue in
|
227
|
+
// practice. Start by making a local copy of the array to as to avoid
|
228
|
+
// confusing a reference seen more than once (such as [a, a]) for a
|
229
|
+
// circular reference.
|
230
|
+
for (var j = 0; j < seen.length; j++) {
|
231
|
+
if (seen[j][0] == a1) {
|
232
|
+
return seen[j][1] == a2;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
// If we get here, we haven't seen a1 before, so store it with reference
|
237
|
+
// to a2.
|
238
|
+
seen.push([ a1, a2 ]);
|
239
|
+
|
240
|
+
var ok = true;
|
241
|
+
// Only examines enumerable attributes. Only works for numeric arrays!
|
242
|
+
// Associative arrays return 0. So call _eqAssoc() for them, instead.
|
243
|
+
var max = a1.length > a2.length ? a1.length : a2.length;
|
244
|
+
if (max == 0) return SimpleTest._eqAssoc(a1, a2, stack, seen);
|
245
|
+
for (var i = 0; i < max; i++) {
|
246
|
+
var e1 = i > a1.length - 1 ? SimpleTest.DNE : a1[i];
|
247
|
+
var e2 = i > a2.length - 1 ? SimpleTest.DNE : a2[i];
|
248
|
+
stack.push({ type: 'Array', idx: i, vals: [e1, e2] });
|
249
|
+
if (ok = SimpleTest._deepCheck(e1, e2, stack, seen)) {
|
250
|
+
stack.pop();
|
251
|
+
} else {
|
252
|
+
break;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
return ok;
|
256
|
+
};
|
257
|
+
|
258
|
+
SimpleTest._eqAssoc = function (o1, o2, stack, seen) {
|
259
|
+
// Return if they're the same object.
|
260
|
+
if (o1 == o2) return true;
|
261
|
+
|
262
|
+
// JavaScript objects have no unique identifiers, so we have to store
|
263
|
+
// references to them all in an array, and then compare the references
|
264
|
+
// directly. It's slow, but probably won't be much of an issue in
|
265
|
+
// practice. Start by making a local copy of the array to as to avoid
|
266
|
+
// confusing a reference seen more than once (such as [a, a]) for a
|
267
|
+
// circular reference.
|
268
|
+
seen = seen.slice(0);
|
269
|
+
for (var j = 0; j < seen.length; j++) {
|
270
|
+
if (seen[j][0] == o1) {
|
271
|
+
return seen[j][1] == o2;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
// If we get here, we haven't seen o1 before, so store it with reference
|
276
|
+
// to o2.
|
277
|
+
seen.push([ o1, o2 ]);
|
278
|
+
|
279
|
+
// They should be of the same class.
|
280
|
+
|
281
|
+
var ok = true;
|
282
|
+
// Only examines enumerable attributes.
|
283
|
+
var o1Size = 0; for (var i in o1) o1Size++;
|
284
|
+
var o2Size = 0; for (var i in o2) o2Size++;
|
285
|
+
var bigger = o1Size > o2Size ? o1 : o2;
|
286
|
+
for (var i in bigger) {
|
287
|
+
var e1 = o1[i] == undefined ? SimpleTest.DNE : o1[i];
|
288
|
+
var e2 = o2[i] == undefined ? SimpleTest.DNE : o2[i];
|
289
|
+
stack.push({ type: 'Object', idx: i, vals: [e1, e2] });
|
290
|
+
if (ok = SimpleTest._deepCheck(e1, e2, stack, seen)) {
|
291
|
+
stack.pop();
|
292
|
+
} else {
|
293
|
+
break;
|
294
|
+
}
|
295
|
+
}
|
296
|
+
return ok;
|
297
|
+
};
|
298
|
+
|
299
|
+
SimpleTest._formatStack = function (stack) {
|
300
|
+
var variable = '$Foo';
|
301
|
+
for (var i = 0; i < stack.length; i++) {
|
302
|
+
var entry = stack[i];
|
303
|
+
var type = entry['type'];
|
304
|
+
var idx = entry['idx'];
|
305
|
+
if (idx != null) {
|
306
|
+
if (/^\d+$/.test(idx)) {
|
307
|
+
// Numeric array index.
|
308
|
+
variable += '[' + idx + ']';
|
309
|
+
} else {
|
310
|
+
// Associative array index.
|
311
|
+
idx = idx.replace("'", "\\'");
|
312
|
+
variable += "['" + idx + "']";
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
var vals = stack[stack.length-1]['vals'].slice(0, 2);
|
318
|
+
var vars = [
|
319
|
+
variable.replace('$Foo', 'got'),
|
320
|
+
variable.replace('$Foo', 'expected')
|
321
|
+
];
|
322
|
+
|
323
|
+
var out = "Structures begin differing at:" + SimpleTest.LF;
|
324
|
+
for (var i = 0; i < vals.length; i++) {
|
325
|
+
var val = vals[i];
|
326
|
+
if (val == null) {
|
327
|
+
val = 'undefined';
|
328
|
+
} else {
|
329
|
+
val == SimpleTest.DNE ? "Does not exist" : "'" + val + "'";
|
330
|
+
}
|
331
|
+
}
|
332
|
+
|
333
|
+
out += vars[0] + ' = ' + vals[0] + SimpleTest.LF;
|
334
|
+
out += vars[1] + ' = ' + vals[1] + SimpleTest.LF;
|
335
|
+
|
336
|
+
return ' ' + out;
|
337
|
+
};
|
338
|
+
|
339
|
+
|
340
|
+
SimpleTest.isDeeply = function (it, as, name) {
|
341
|
+
var ok;
|
342
|
+
// ^ is the XOR operator.
|
343
|
+
if (SimpleTest._isRef(it) ^ SimpleTest._isRef(as)) {
|
344
|
+
// One's a reference, one isn't.
|
345
|
+
ok = false;
|
346
|
+
} else if (!SimpleTest._isRef(it) && !SimpleTest._isRef(as)) {
|
347
|
+
// Neither is an object.
|
348
|
+
ok = SimpleTest.is(it, as, name);
|
349
|
+
} else {
|
350
|
+
// We have two objects. Do a deep comparison.
|
351
|
+
var stack = [], seen = [];
|
352
|
+
if ( SimpleTest._deepCheck(it, as, stack, seen)) {
|
353
|
+
ok = SimpleTest.ok(true, name);
|
354
|
+
} else {
|
355
|
+
ok = SimpleTest.ok(false, name, SimpleTest._formatStack(stack));
|
356
|
+
}
|
357
|
+
}
|
358
|
+
return ok;
|
359
|
+
};
|
360
|
+
|
361
|
+
SimpleTest.typeOf = function (object) {
|
362
|
+
var c = Object.prototype.toString.apply(object);
|
363
|
+
var name = c.substring(8, c.length - 1);
|
364
|
+
if (name != 'Object') return name;
|
365
|
+
// It may be a non-core class. Try to extract the class name from
|
366
|
+
// the constructor function. This may not work in all implementations.
|
367
|
+
if (/function ([^(\s]+)/.test(Function.toString.call(object.constructor))) {
|
368
|
+
return RegExp.$1;
|
369
|
+
}
|
370
|
+
// No idea. :-(
|
371
|
+
return name;
|
372
|
+
};
|
373
|
+
|
374
|
+
SimpleTest.isa = function (object, clas) {
|
375
|
+
return SimpleTest.typeOf(object) == clas;
|
376
|
+
};
|
377
|
+
|
378
|
+
// Global symbols:
|
379
|
+
var ok = SimpleTest.ok;
|
380
|
+
var is = SimpleTest.is;
|
381
|
+
var isDeeply = SimpleTest.isDeeply;
|