old_sql 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +24 -13
- data/app/controllers/old_sql/report_controller.rb +3 -17
- data/app/views/layouts/old_sql/chart.html.erb +11 -0
- data/app/views/old_sql/report/chart.html.erb +8 -25
- data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
- data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
- data/lib/old_sql/report_design/chart.rb +2 -2
- data/lib/old_sql/report_design/chart_item.rb +4 -4
- data/lib/old_sql/report_design/chart_parser.rb +2 -2
- data/public/javascripts/old_sql/chart.js +33 -0
- metadata +5 -265
- data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
- data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
- 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 +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
- 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 +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
- 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 +0 -130
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
- data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
- data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
- 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 +0 -62
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
- 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 +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
- 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 +0 -38
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
@@ -1,251 +0,0 @@
|
|
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>
|
@@ -1,40 +0,0 @@
|
|
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
|
-
};
|
@@ -1,381 +0,0 @@
|
|
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;
|