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,222 +0,0 @@
|
|
1
|
-
/***
|
2
|
-
|
3
|
-
MochiKit.DateTime 1.4.2
|
4
|
-
|
5
|
-
See <http://mochikit.com/> for documentation, downloads, license, etc.
|
6
|
-
|
7
|
-
(c) 2005 Bob Ippolito. All rights Reserved.
|
8
|
-
|
9
|
-
***/
|
10
|
-
|
11
|
-
MochiKit.Base._deps('DateTime', ['Base']);
|
12
|
-
|
13
|
-
MochiKit.DateTime.NAME = "MochiKit.DateTime";
|
14
|
-
MochiKit.DateTime.VERSION = "1.4.2";
|
15
|
-
MochiKit.DateTime.__repr__ = function () {
|
16
|
-
return "[" + this.NAME + " " + this.VERSION + "]";
|
17
|
-
};
|
18
|
-
MochiKit.DateTime.toString = function () {
|
19
|
-
return this.__repr__();
|
20
|
-
};
|
21
|
-
|
22
|
-
/** @id MochiKit.DateTime.isoDate */
|
23
|
-
MochiKit.DateTime.isoDate = function (str) {
|
24
|
-
str = str + "";
|
25
|
-
if (typeof(str) != "string" || str.length === 0) {
|
26
|
-
return null;
|
27
|
-
}
|
28
|
-
var iso = str.split('-');
|
29
|
-
if (iso.length === 0) {
|
30
|
-
return null;
|
31
|
-
}
|
32
|
-
var date = new Date(iso[0], iso[1] - 1, iso[2]);
|
33
|
-
date.setFullYear(iso[0]);
|
34
|
-
date.setMonth(iso[1] - 1);
|
35
|
-
date.setDate(iso[2]);
|
36
|
-
return date;
|
37
|
-
};
|
38
|
-
|
39
|
-
MochiKit.DateTime._isoRegexp = /(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/;
|
40
|
-
|
41
|
-
/** @id MochiKit.DateTime.isoTimestamp */
|
42
|
-
MochiKit.DateTime.isoTimestamp = function (str) {
|
43
|
-
str = str + "";
|
44
|
-
if (typeof(str) != "string" || str.length === 0) {
|
45
|
-
return null;
|
46
|
-
}
|
47
|
-
var res = str.match(MochiKit.DateTime._isoRegexp);
|
48
|
-
if (typeof(res) == "undefined" || res === null) {
|
49
|
-
return null;
|
50
|
-
}
|
51
|
-
var year, month, day, hour, min, sec, msec;
|
52
|
-
year = parseInt(res[1], 10);
|
53
|
-
if (typeof(res[2]) == "undefined" || res[2] === '') {
|
54
|
-
return new Date(year);
|
55
|
-
}
|
56
|
-
month = parseInt(res[2], 10) - 1;
|
57
|
-
day = parseInt(res[3], 10);
|
58
|
-
if (typeof(res[4]) == "undefined" || res[4] === '') {
|
59
|
-
return new Date(year, month, day);
|
60
|
-
}
|
61
|
-
hour = parseInt(res[4], 10);
|
62
|
-
min = parseInt(res[5], 10);
|
63
|
-
sec = (typeof(res[6]) != "undefined" && res[6] !== '') ? parseInt(res[6], 10) : 0;
|
64
|
-
if (typeof(res[7]) != "undefined" && res[7] !== '') {
|
65
|
-
msec = Math.round(1000.0 * parseFloat("0." + res[7]));
|
66
|
-
} else {
|
67
|
-
msec = 0;
|
68
|
-
}
|
69
|
-
if ((typeof(res[8]) == "undefined" || res[8] === '') && (typeof(res[9]) == "undefined" || res[9] === '')) {
|
70
|
-
return new Date(year, month, day, hour, min, sec, msec);
|
71
|
-
}
|
72
|
-
var ofs;
|
73
|
-
if (typeof(res[9]) != "undefined" && res[9] !== '') {
|
74
|
-
ofs = parseInt(res[10], 10) * 3600000;
|
75
|
-
if (typeof(res[11]) != "undefined" && res[11] !== '') {
|
76
|
-
ofs += parseInt(res[11], 10) * 60000;
|
77
|
-
}
|
78
|
-
if (res[9] == "-") {
|
79
|
-
ofs = -ofs;
|
80
|
-
}
|
81
|
-
} else {
|
82
|
-
ofs = 0;
|
83
|
-
}
|
84
|
-
return new Date(Date.UTC(year, month, day, hour, min, sec, msec) - ofs);
|
85
|
-
};
|
86
|
-
|
87
|
-
/** @id MochiKit.DateTime.toISOTime */
|
88
|
-
MochiKit.DateTime.toISOTime = function (date, realISO/* = false */) {
|
89
|
-
if (typeof(date) == "undefined" || date === null) {
|
90
|
-
return null;
|
91
|
-
}
|
92
|
-
var hh = date.getHours();
|
93
|
-
var mm = date.getMinutes();
|
94
|
-
var ss = date.getSeconds();
|
95
|
-
var lst = [
|
96
|
-
((realISO && (hh < 10)) ? "0" + hh : hh),
|
97
|
-
((mm < 10) ? "0" + mm : mm),
|
98
|
-
((ss < 10) ? "0" + ss : ss)
|
99
|
-
];
|
100
|
-
return lst.join(":");
|
101
|
-
};
|
102
|
-
|
103
|
-
/** @id MochiKit.DateTime.toISOTimeStamp */
|
104
|
-
MochiKit.DateTime.toISOTimestamp = function (date, realISO/* = false*/) {
|
105
|
-
if (typeof(date) == "undefined" || date === null) {
|
106
|
-
return null;
|
107
|
-
}
|
108
|
-
var sep = realISO ? "T" : " ";
|
109
|
-
var foot = realISO ? "Z" : "";
|
110
|
-
if (realISO) {
|
111
|
-
date = new Date(date.getTime() + (date.getTimezoneOffset() * 60000));
|
112
|
-
}
|
113
|
-
return MochiKit.DateTime.toISODate(date) + sep + MochiKit.DateTime.toISOTime(date, realISO) + foot;
|
114
|
-
};
|
115
|
-
|
116
|
-
/** @id MochiKit.DateTime.toISODate */
|
117
|
-
MochiKit.DateTime.toISODate = function (date) {
|
118
|
-
if (typeof(date) == "undefined" || date === null) {
|
119
|
-
return null;
|
120
|
-
}
|
121
|
-
var _padTwo = MochiKit.DateTime._padTwo;
|
122
|
-
var _padFour = MochiKit.DateTime._padFour;
|
123
|
-
return [
|
124
|
-
_padFour(date.getFullYear()),
|
125
|
-
_padTwo(date.getMonth() + 1),
|
126
|
-
_padTwo(date.getDate())
|
127
|
-
].join("-");
|
128
|
-
};
|
129
|
-
|
130
|
-
/** @id MochiKit.DateTime.americanDate */
|
131
|
-
MochiKit.DateTime.americanDate = function (d) {
|
132
|
-
d = d + "";
|
133
|
-
if (typeof(d) != "string" || d.length === 0) {
|
134
|
-
return null;
|
135
|
-
}
|
136
|
-
var a = d.split('/');
|
137
|
-
return new Date(a[2], a[0] - 1, a[1]);
|
138
|
-
};
|
139
|
-
|
140
|
-
MochiKit.DateTime._padTwo = function (n) {
|
141
|
-
return (n > 9) ? n : "0" + n;
|
142
|
-
};
|
143
|
-
|
144
|
-
MochiKit.DateTime._padFour = function(n) {
|
145
|
-
switch(n.toString().length) {
|
146
|
-
case 1: return "000" + n; break;
|
147
|
-
case 2: return "00" + n; break;
|
148
|
-
case 3: return "0" + n; break;
|
149
|
-
case 4:
|
150
|
-
default:
|
151
|
-
return n;
|
152
|
-
}
|
153
|
-
};
|
154
|
-
|
155
|
-
/** @id MochiKit.DateTime.toPaddedAmericanDate */
|
156
|
-
MochiKit.DateTime.toPaddedAmericanDate = function (d) {
|
157
|
-
if (typeof(d) == "undefined" || d === null) {
|
158
|
-
return null;
|
159
|
-
}
|
160
|
-
var _padTwo = MochiKit.DateTime._padTwo;
|
161
|
-
return [
|
162
|
-
_padTwo(d.getMonth() + 1),
|
163
|
-
_padTwo(d.getDate()),
|
164
|
-
d.getFullYear()
|
165
|
-
].join('/');
|
166
|
-
};
|
167
|
-
|
168
|
-
/** @id MochiKit.DateTime.toAmericanDate */
|
169
|
-
MochiKit.DateTime.toAmericanDate = function (d) {
|
170
|
-
if (typeof(d) == "undefined" || d === null) {
|
171
|
-
return null;
|
172
|
-
}
|
173
|
-
return [d.getMonth() + 1, d.getDate(), d.getFullYear()].join('/');
|
174
|
-
};
|
175
|
-
|
176
|
-
MochiKit.DateTime.EXPORT = [
|
177
|
-
"isoDate",
|
178
|
-
"isoTimestamp",
|
179
|
-
"toISOTime",
|
180
|
-
"toISOTimestamp",
|
181
|
-
"toISODate",
|
182
|
-
"americanDate",
|
183
|
-
"toPaddedAmericanDate",
|
184
|
-
"toAmericanDate"
|
185
|
-
];
|
186
|
-
|
187
|
-
MochiKit.DateTime.EXPORT_OK = [];
|
188
|
-
MochiKit.DateTime.EXPORT_TAGS = {
|
189
|
-
":common": MochiKit.DateTime.EXPORT,
|
190
|
-
":all": MochiKit.DateTime.EXPORT
|
191
|
-
};
|
192
|
-
|
193
|
-
MochiKit.DateTime.__new__ = function () {
|
194
|
-
// MochiKit.Base.nameFunctions(this);
|
195
|
-
var base = this.NAME + ".";
|
196
|
-
for (var k in this) {
|
197
|
-
var o = this[k];
|
198
|
-
if (typeof(o) == 'function' && typeof(o.NAME) == 'undefined') {
|
199
|
-
try {
|
200
|
-
o.NAME = base + k;
|
201
|
-
} catch (e) {
|
202
|
-
// pass
|
203
|
-
}
|
204
|
-
}
|
205
|
-
}
|
206
|
-
};
|
207
|
-
|
208
|
-
MochiKit.DateTime.__new__();
|
209
|
-
|
210
|
-
if (typeof(MochiKit.Base) != "undefined") {
|
211
|
-
MochiKit.Base._exportSymbols(this, MochiKit.DateTime);
|
212
|
-
} else {
|
213
|
-
(function (globals, module) {
|
214
|
-
if ((typeof(JSAN) == 'undefined' && typeof(dojo) == 'undefined')
|
215
|
-
|| (MochiKit.__export__ === false)) {
|
216
|
-
var all = module.EXPORT_TAGS[":all"];
|
217
|
-
for (var i = 0; i < all.length; i++) {
|
218
|
-
globals[all[i]] = module[all[i]];
|
219
|
-
}
|
220
|
-
}
|
221
|
-
})(this, MochiKit.DateTime);
|
222
|
-
}
|
@@ -1,793 +0,0 @@
|
|
1
|
-
/***
|
2
|
-
MochiKit.DragAndDrop 1.4.2
|
3
|
-
|
4
|
-
See <http://mochikit.com/> for documentation, downloads, license, etc.
|
5
|
-
|
6
|
-
Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
7
|
-
Mochi-ized By Thomas Herve (_firstname_@nimail.org)
|
8
|
-
|
9
|
-
***/
|
10
|
-
|
11
|
-
MochiKit.Base._deps('DragAndDrop', ['Base', 'Iter', 'DOM', 'Signal', 'Visual', 'Position']);
|
12
|
-
|
13
|
-
MochiKit.DragAndDrop.NAME = 'MochiKit.DragAndDrop';
|
14
|
-
MochiKit.DragAndDrop.VERSION = '1.4.2';
|
15
|
-
|
16
|
-
MochiKit.DragAndDrop.__repr__ = function () {
|
17
|
-
return '[' + this.NAME + ' ' + this.VERSION + ']';
|
18
|
-
};
|
19
|
-
|
20
|
-
MochiKit.DragAndDrop.toString = function () {
|
21
|
-
return this.__repr__();
|
22
|
-
};
|
23
|
-
|
24
|
-
MochiKit.DragAndDrop.EXPORT = [
|
25
|
-
"Droppable",
|
26
|
-
"Draggable"
|
27
|
-
];
|
28
|
-
|
29
|
-
MochiKit.DragAndDrop.EXPORT_OK = [
|
30
|
-
"Droppables",
|
31
|
-
"Draggables"
|
32
|
-
];
|
33
|
-
|
34
|
-
MochiKit.DragAndDrop.Droppables = {
|
35
|
-
/***
|
36
|
-
|
37
|
-
Manage all droppables. Shouldn't be used, use the Droppable object instead.
|
38
|
-
|
39
|
-
***/
|
40
|
-
drops: [],
|
41
|
-
|
42
|
-
remove: function (element) {
|
43
|
-
this.drops = MochiKit.Base.filter(function (d) {
|
44
|
-
return d.element != MochiKit.DOM.getElement(element);
|
45
|
-
}, this.drops);
|
46
|
-
},
|
47
|
-
|
48
|
-
register: function (drop) {
|
49
|
-
this.drops.push(drop);
|
50
|
-
},
|
51
|
-
|
52
|
-
unregister: function (drop) {
|
53
|
-
this.drops = MochiKit.Base.filter(function (d) {
|
54
|
-
return d != drop;
|
55
|
-
}, this.drops);
|
56
|
-
},
|
57
|
-
|
58
|
-
prepare: function (element) {
|
59
|
-
MochiKit.Base.map(function (drop) {
|
60
|
-
if (drop.isAccepted(element)) {
|
61
|
-
if (drop.options.activeclass) {
|
62
|
-
MochiKit.DOM.addElementClass(drop.element,
|
63
|
-
drop.options.activeclass);
|
64
|
-
}
|
65
|
-
drop.options.onactive(drop.element, element);
|
66
|
-
}
|
67
|
-
}, this.drops);
|
68
|
-
},
|
69
|
-
|
70
|
-
findDeepestChild: function (drops) {
|
71
|
-
deepest = drops[0];
|
72
|
-
|
73
|
-
for (i = 1; i < drops.length; ++i) {
|
74
|
-
if (MochiKit.DOM.isChildNode(drops[i].element, deepest.element)) {
|
75
|
-
deepest = drops[i];
|
76
|
-
}
|
77
|
-
}
|
78
|
-
return deepest;
|
79
|
-
},
|
80
|
-
|
81
|
-
show: function (point, element) {
|
82
|
-
if (!this.drops.length) {
|
83
|
-
return;
|
84
|
-
}
|
85
|
-
var affected = [];
|
86
|
-
|
87
|
-
if (this.last_active) {
|
88
|
-
this.last_active.deactivate();
|
89
|
-
}
|
90
|
-
MochiKit.Iter.forEach(this.drops, function (drop) {
|
91
|
-
if (drop.isAffected(point, element)) {
|
92
|
-
affected.push(drop);
|
93
|
-
}
|
94
|
-
});
|
95
|
-
if (affected.length > 0) {
|
96
|
-
drop = this.findDeepestChild(affected);
|
97
|
-
MochiKit.Position.within(drop.element, point.page.x, point.page.y);
|
98
|
-
drop.options.onhover(element, drop.element,
|
99
|
-
MochiKit.Position.overlap(drop.options.overlap, drop.element));
|
100
|
-
drop.activate();
|
101
|
-
}
|
102
|
-
},
|
103
|
-
|
104
|
-
fire: function (event, element) {
|
105
|
-
if (!this.last_active) {
|
106
|
-
return;
|
107
|
-
}
|
108
|
-
MochiKit.Position.prepare();
|
109
|
-
|
110
|
-
if (this.last_active.isAffected(event.mouse(), element)) {
|
111
|
-
this.last_active.options.ondrop(element,
|
112
|
-
this.last_active.element, event);
|
113
|
-
}
|
114
|
-
},
|
115
|
-
|
116
|
-
reset: function (element) {
|
117
|
-
MochiKit.Base.map(function (drop) {
|
118
|
-
if (drop.options.activeclass) {
|
119
|
-
MochiKit.DOM.removeElementClass(drop.element,
|
120
|
-
drop.options.activeclass);
|
121
|
-
}
|
122
|
-
drop.options.ondesactive(drop.element, element);
|
123
|
-
}, this.drops);
|
124
|
-
if (this.last_active) {
|
125
|
-
this.last_active.deactivate();
|
126
|
-
}
|
127
|
-
}
|
128
|
-
};
|
129
|
-
|
130
|
-
/** @id MochiKit.DragAndDrop.Droppable */
|
131
|
-
MochiKit.DragAndDrop.Droppable = function (element, options) {
|
132
|
-
var cls = arguments.callee;
|
133
|
-
if (!(this instanceof cls)) {
|
134
|
-
return new cls(element, options);
|
135
|
-
}
|
136
|
-
this.__init__(element, options);
|
137
|
-
};
|
138
|
-
|
139
|
-
MochiKit.DragAndDrop.Droppable.prototype = {
|
140
|
-
/***
|
141
|
-
|
142
|
-
A droppable object. Simple use is to create giving an element:
|
143
|
-
|
144
|
-
new MochiKit.DragAndDrop.Droppable('myelement');
|
145
|
-
|
146
|
-
Generally you'll want to define the 'ondrop' function and maybe the
|
147
|
-
'accept' option to filter draggables.
|
148
|
-
|
149
|
-
***/
|
150
|
-
__class__: MochiKit.DragAndDrop.Droppable,
|
151
|
-
|
152
|
-
__init__: function (element, /* optional */options) {
|
153
|
-
var d = MochiKit.DOM;
|
154
|
-
var b = MochiKit.Base;
|
155
|
-
this.element = d.getElement(element);
|
156
|
-
this.options = b.update({
|
157
|
-
|
158
|
-
/** @id MochiKit.DragAndDrop.greedy */
|
159
|
-
greedy: true,
|
160
|
-
|
161
|
-
/** @id MochiKit.DragAndDrop.hoverclass */
|
162
|
-
hoverclass: null,
|
163
|
-
|
164
|
-
/** @id MochiKit.DragAndDrop.activeclass */
|
165
|
-
activeclass: null,
|
166
|
-
|
167
|
-
/** @id MochiKit.DragAndDrop.hoverfunc */
|
168
|
-
hoverfunc: b.noop,
|
169
|
-
|
170
|
-
/** @id MochiKit.DragAndDrop.accept */
|
171
|
-
accept: null,
|
172
|
-
|
173
|
-
/** @id MochiKit.DragAndDrop.onactive */
|
174
|
-
onactive: b.noop,
|
175
|
-
|
176
|
-
/** @id MochiKit.DragAndDrop.ondesactive */
|
177
|
-
ondesactive: b.noop,
|
178
|
-
|
179
|
-
/** @id MochiKit.DragAndDrop.onhover */
|
180
|
-
onhover: b.noop,
|
181
|
-
|
182
|
-
/** @id MochiKit.DragAndDrop.ondrop */
|
183
|
-
ondrop: b.noop,
|
184
|
-
|
185
|
-
/** @id MochiKit.DragAndDrop.containment */
|
186
|
-
containment: [],
|
187
|
-
tree: false
|
188
|
-
}, options);
|
189
|
-
|
190
|
-
// cache containers
|
191
|
-
this.options._containers = [];
|
192
|
-
b.map(MochiKit.Base.bind(function (c) {
|
193
|
-
this.options._containers.push(d.getElement(c));
|
194
|
-
}, this), this.options.containment);
|
195
|
-
|
196
|
-
MochiKit.Style.makePositioned(this.element); // fix IE
|
197
|
-
|
198
|
-
MochiKit.DragAndDrop.Droppables.register(this);
|
199
|
-
},
|
200
|
-
|
201
|
-
/** @id MochiKit.DragAndDrop.isContained */
|
202
|
-
isContained: function (element) {
|
203
|
-
if (this.options._containers.length) {
|
204
|
-
var containmentNode;
|
205
|
-
if (this.options.tree) {
|
206
|
-
containmentNode = element.treeNode;
|
207
|
-
} else {
|
208
|
-
containmentNode = element.parentNode;
|
209
|
-
}
|
210
|
-
return MochiKit.Iter.some(this.options._containers, function (c) {
|
211
|
-
return containmentNode == c;
|
212
|
-
});
|
213
|
-
} else {
|
214
|
-
return true;
|
215
|
-
}
|
216
|
-
},
|
217
|
-
|
218
|
-
/** @id MochiKit.DragAndDrop.isAccepted */
|
219
|
-
isAccepted: function (element) {
|
220
|
-
return ((!this.options.accept) || MochiKit.Iter.some(
|
221
|
-
this.options.accept, function (c) {
|
222
|
-
return MochiKit.DOM.hasElementClass(element, c);
|
223
|
-
}));
|
224
|
-
},
|
225
|
-
|
226
|
-
/** @id MochiKit.DragAndDrop.isAffected */
|
227
|
-
isAffected: function (point, element) {
|
228
|
-
return ((this.element != element) &&
|
229
|
-
this.isContained(element) &&
|
230
|
-
this.isAccepted(element) &&
|
231
|
-
MochiKit.Position.within(this.element, point.page.x,
|
232
|
-
point.page.y));
|
233
|
-
},
|
234
|
-
|
235
|
-
/** @id MochiKit.DragAndDrop.deactivate */
|
236
|
-
deactivate: function () {
|
237
|
-
/***
|
238
|
-
|
239
|
-
A droppable is deactivate when a draggable has been over it and left.
|
240
|
-
|
241
|
-
***/
|
242
|
-
if (this.options.hoverclass) {
|
243
|
-
MochiKit.DOM.removeElementClass(this.element,
|
244
|
-
this.options.hoverclass);
|
245
|
-
}
|
246
|
-
this.options.hoverfunc(this.element, false);
|
247
|
-
MochiKit.DragAndDrop.Droppables.last_active = null;
|
248
|
-
},
|
249
|
-
|
250
|
-
/** @id MochiKit.DragAndDrop.activate */
|
251
|
-
activate: function () {
|
252
|
-
/***
|
253
|
-
|
254
|
-
A droppable is active when a draggable is over it.
|
255
|
-
|
256
|
-
***/
|
257
|
-
if (this.options.hoverclass) {
|
258
|
-
MochiKit.DOM.addElementClass(this.element, this.options.hoverclass);
|
259
|
-
}
|
260
|
-
this.options.hoverfunc(this.element, true);
|
261
|
-
MochiKit.DragAndDrop.Droppables.last_active = this;
|
262
|
-
},
|
263
|
-
|
264
|
-
/** @id MochiKit.DragAndDrop.destroy */
|
265
|
-
destroy: function () {
|
266
|
-
/***
|
267
|
-
|
268
|
-
Delete this droppable.
|
269
|
-
|
270
|
-
***/
|
271
|
-
MochiKit.DragAndDrop.Droppables.unregister(this);
|
272
|
-
},
|
273
|
-
|
274
|
-
/** @id MochiKit.DragAndDrop.repr */
|
275
|
-
repr: function () {
|
276
|
-
return '[' + this.__class__.NAME + ", options:" + MochiKit.Base.repr(this.options) + "]";
|
277
|
-
}
|
278
|
-
};
|
279
|
-
|
280
|
-
MochiKit.DragAndDrop.Draggables = {
|
281
|
-
/***
|
282
|
-
|
283
|
-
Manage draggables elements. Not intended to direct use.
|
284
|
-
|
285
|
-
***/
|
286
|
-
drags: [],
|
287
|
-
|
288
|
-
register: function (draggable) {
|
289
|
-
if (this.drags.length === 0) {
|
290
|
-
var conn = MochiKit.Signal.connect;
|
291
|
-
this.eventMouseUp = conn(document, 'onmouseup', this, this.endDrag);
|
292
|
-
this.eventMouseMove = conn(document, 'onmousemove', this,
|
293
|
-
this.updateDrag);
|
294
|
-
this.eventKeypress = conn(document, 'onkeypress', this,
|
295
|
-
this.keyPress);
|
296
|
-
}
|
297
|
-
this.drags.push(draggable);
|
298
|
-
},
|
299
|
-
|
300
|
-
unregister: function (draggable) {
|
301
|
-
this.drags = MochiKit.Base.filter(function (d) {
|
302
|
-
return d != draggable;
|
303
|
-
}, this.drags);
|
304
|
-
if (this.drags.length === 0) {
|
305
|
-
var disc = MochiKit.Signal.disconnect;
|
306
|
-
disc(this.eventMouseUp);
|
307
|
-
disc(this.eventMouseMove);
|
308
|
-
disc(this.eventKeypress);
|
309
|
-
}
|
310
|
-
},
|
311
|
-
|
312
|
-
activate: function (draggable) {
|
313
|
-
// allows keypress events if window is not currently focused
|
314
|
-
// fails for Safari
|
315
|
-
window.focus();
|
316
|
-
this.activeDraggable = draggable;
|
317
|
-
},
|
318
|
-
|
319
|
-
deactivate: function () {
|
320
|
-
this.activeDraggable = null;
|
321
|
-
},
|
322
|
-
|
323
|
-
updateDrag: function (event) {
|
324
|
-
if (!this.activeDraggable) {
|
325
|
-
return;
|
326
|
-
}
|
327
|
-
var pointer = event.mouse();
|
328
|
-
// Mozilla-based browsers fire successive mousemove events with
|
329
|
-
// the same coordinates, prevent needless redrawing (moz bug?)
|
330
|
-
if (this._lastPointer && (MochiKit.Base.repr(this._lastPointer.page) ==
|
331
|
-
MochiKit.Base.repr(pointer.page))) {
|
332
|
-
return;
|
333
|
-
}
|
334
|
-
this._lastPointer = pointer;
|
335
|
-
this.activeDraggable.updateDrag(event, pointer);
|
336
|
-
},
|
337
|
-
|
338
|
-
endDrag: function (event) {
|
339
|
-
if (!this.activeDraggable) {
|
340
|
-
return;
|
341
|
-
}
|
342
|
-
this._lastPointer = null;
|
343
|
-
this.activeDraggable.endDrag(event);
|
344
|
-
this.activeDraggable = null;
|
345
|
-
},
|
346
|
-
|
347
|
-
keyPress: function (event) {
|
348
|
-
if (this.activeDraggable) {
|
349
|
-
this.activeDraggable.keyPress(event);
|
350
|
-
}
|
351
|
-
},
|
352
|
-
|
353
|
-
notify: function (eventName, draggable, event) {
|
354
|
-
MochiKit.Signal.signal(this, eventName, draggable, event);
|
355
|
-
}
|
356
|
-
};
|
357
|
-
|
358
|
-
/** @id MochiKit.DragAndDrop.Draggable */
|
359
|
-
MochiKit.DragAndDrop.Draggable = function (element, options) {
|
360
|
-
var cls = arguments.callee;
|
361
|
-
if (!(this instanceof cls)) {
|
362
|
-
return new cls(element, options);
|
363
|
-
}
|
364
|
-
this.__init__(element, options);
|
365
|
-
};
|
366
|
-
|
367
|
-
MochiKit.DragAndDrop.Draggable.prototype = {
|
368
|
-
/***
|
369
|
-
|
370
|
-
A draggable object. Simple instantiate :
|
371
|
-
|
372
|
-
new MochiKit.DragAndDrop.Draggable('myelement');
|
373
|
-
|
374
|
-
***/
|
375
|
-
__class__ : MochiKit.DragAndDrop.Draggable,
|
376
|
-
|
377
|
-
__init__: function (element, /* optional */options) {
|
378
|
-
var v = MochiKit.Visual;
|
379
|
-
var b = MochiKit.Base;
|
380
|
-
options = b.update({
|
381
|
-
|
382
|
-
/** @id MochiKit.DragAndDrop.handle */
|
383
|
-
handle: false,
|
384
|
-
|
385
|
-
/** @id MochiKit.DragAndDrop.starteffect */
|
386
|
-
starteffect: function (innerelement) {
|
387
|
-
this._savedOpacity = MochiKit.Style.getStyle(innerelement, 'opacity') || 1.0;
|
388
|
-
new v.Opacity(innerelement, {duration:0.2, from:this._savedOpacity, to:0.7});
|
389
|
-
},
|
390
|
-
/** @id MochiKit.DragAndDrop.reverteffect */
|
391
|
-
reverteffect: function (innerelement, top_offset, left_offset) {
|
392
|
-
var dur = Math.sqrt(Math.abs(top_offset^2) +
|
393
|
-
Math.abs(left_offset^2))*0.02;
|
394
|
-
return new v.Move(innerelement,
|
395
|
-
{x: -left_offset, y: -top_offset, duration: dur});
|
396
|
-
},
|
397
|
-
|
398
|
-
/** @id MochiKit.DragAndDrop.endeffect */
|
399
|
-
endeffect: function (innerelement) {
|
400
|
-
new v.Opacity(innerelement, {duration:0.2, from:0.7, to:this._savedOpacity});
|
401
|
-
},
|
402
|
-
|
403
|
-
/** @id MochiKit.DragAndDrop.onchange */
|
404
|
-
onchange: b.noop,
|
405
|
-
|
406
|
-
/** @id MochiKit.DragAndDrop.zindex */
|
407
|
-
zindex: 1000,
|
408
|
-
|
409
|
-
/** @id MochiKit.DragAndDrop.revert */
|
410
|
-
revert: false,
|
411
|
-
|
412
|
-
/** @id MochiKit.DragAndDrop.scroll */
|
413
|
-
scroll: false,
|
414
|
-
|
415
|
-
/** @id MochiKit.DragAndDrop.scrollSensitivity */
|
416
|
-
scrollSensitivity: 20,
|
417
|
-
|
418
|
-
/** @id MochiKit.DragAndDrop.scrollSpeed */
|
419
|
-
scrollSpeed: 15,
|
420
|
-
// false, or xy or [x, y] or function (x, y){return [x, y];}
|
421
|
-
|
422
|
-
/** @id MochiKit.DragAndDrop.snap */
|
423
|
-
snap: false
|
424
|
-
}, options);
|
425
|
-
|
426
|
-
var d = MochiKit.DOM;
|
427
|
-
this.element = d.getElement(element);
|
428
|
-
|
429
|
-
if (options.handle && (typeof(options.handle) == 'string')) {
|
430
|
-
this.handle = d.getFirstElementByTagAndClassName(null,
|
431
|
-
options.handle, this.element);
|
432
|
-
}
|
433
|
-
if (!this.handle) {
|
434
|
-
this.handle = d.getElement(options.handle);
|
435
|
-
}
|
436
|
-
if (!this.handle) {
|
437
|
-
this.handle = this.element;
|
438
|
-
}
|
439
|
-
|
440
|
-
if (options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
|
441
|
-
options.scroll = d.getElement(options.scroll);
|
442
|
-
this._isScrollChild = MochiKit.DOM.isChildNode(this.element, options.scroll);
|
443
|
-
}
|
444
|
-
|
445
|
-
MochiKit.Style.makePositioned(this.element); // fix IE
|
446
|
-
|
447
|
-
this.delta = this.currentDelta();
|
448
|
-
this.options = options;
|
449
|
-
this.dragging = false;
|
450
|
-
|
451
|
-
this.eventMouseDown = MochiKit.Signal.connect(this.handle,
|
452
|
-
'onmousedown', this, this.initDrag);
|
453
|
-
MochiKit.DragAndDrop.Draggables.register(this);
|
454
|
-
},
|
455
|
-
|
456
|
-
/** @id MochiKit.DragAndDrop.destroy */
|
457
|
-
destroy: function () {
|
458
|
-
MochiKit.Signal.disconnect(this.eventMouseDown);
|
459
|
-
MochiKit.DragAndDrop.Draggables.unregister(this);
|
460
|
-
},
|
461
|
-
|
462
|
-
/** @id MochiKit.DragAndDrop.currentDelta */
|
463
|
-
currentDelta: function () {
|
464
|
-
var s = MochiKit.Style.getStyle;
|
465
|
-
return [
|
466
|
-
parseInt(s(this.element, 'left') || '0'),
|
467
|
-
parseInt(s(this.element, 'top') || '0')];
|
468
|
-
},
|
469
|
-
|
470
|
-
/** @id MochiKit.DragAndDrop.initDrag */
|
471
|
-
initDrag: function (event) {
|
472
|
-
if (!event.mouse().button.left) {
|
473
|
-
return;
|
474
|
-
}
|
475
|
-
// abort on form elements, fixes a Firefox issue
|
476
|
-
var src = event.target();
|
477
|
-
var tagName = (src.tagName || '').toUpperCase();
|
478
|
-
if (tagName === 'INPUT' || tagName === 'SELECT' ||
|
479
|
-
tagName === 'OPTION' || tagName === 'BUTTON' ||
|
480
|
-
tagName === 'TEXTAREA') {
|
481
|
-
return;
|
482
|
-
}
|
483
|
-
|
484
|
-
if (this._revert) {
|
485
|
-
this._revert.cancel();
|
486
|
-
this._revert = null;
|
487
|
-
}
|
488
|
-
|
489
|
-
var pointer = event.mouse();
|
490
|
-
var pos = MochiKit.Position.cumulativeOffset(this.element);
|
491
|
-
this.offset = [pointer.page.x - pos.x, pointer.page.y - pos.y];
|
492
|
-
|
493
|
-
MochiKit.DragAndDrop.Draggables.activate(this);
|
494
|
-
event.stop();
|
495
|
-
},
|
496
|
-
|
497
|
-
/** @id MochiKit.DragAndDrop.startDrag */
|
498
|
-
startDrag: function (event) {
|
499
|
-
this.dragging = true;
|
500
|
-
if (this.options.selectclass) {
|
501
|
-
MochiKit.DOM.addElementClass(this.element,
|
502
|
-
this.options.selectclass);
|
503
|
-
}
|
504
|
-
if (this.options.zindex) {
|
505
|
-
this.originalZ = parseInt(MochiKit.Style.getStyle(this.element,
|
506
|
-
'z-index') || '0');
|
507
|
-
this.element.style.zIndex = this.options.zindex;
|
508
|
-
}
|
509
|
-
|
510
|
-
if (this.options.ghosting) {
|
511
|
-
this._clone = this.element.cloneNode(true);
|
512
|
-
this.ghostPosition = MochiKit.Position.absolutize(this.element);
|
513
|
-
this.element.parentNode.insertBefore(this._clone, this.element);
|
514
|
-
}
|
515
|
-
|
516
|
-
if (this.options.scroll) {
|
517
|
-
if (this.options.scroll == window) {
|
518
|
-
var where = this._getWindowScroll(this.options.scroll);
|
519
|
-
this.originalScrollLeft = where.left;
|
520
|
-
this.originalScrollTop = where.top;
|
521
|
-
} else {
|
522
|
-
this.originalScrollLeft = this.options.scroll.scrollLeft;
|
523
|
-
this.originalScrollTop = this.options.scroll.scrollTop;
|
524
|
-
}
|
525
|
-
}
|
526
|
-
|
527
|
-
MochiKit.DragAndDrop.Droppables.prepare(this.element);
|
528
|
-
MochiKit.DragAndDrop.Draggables.notify('start', this, event);
|
529
|
-
if (this.options.starteffect) {
|
530
|
-
this.options.starteffect(this.element);
|
531
|
-
}
|
532
|
-
},
|
533
|
-
|
534
|
-
/** @id MochiKit.DragAndDrop.updateDrag */
|
535
|
-
updateDrag: function (event, pointer) {
|
536
|
-
if (!this.dragging) {
|
537
|
-
this.startDrag(event);
|
538
|
-
}
|
539
|
-
MochiKit.Position.prepare();
|
540
|
-
MochiKit.DragAndDrop.Droppables.show(pointer, this.element);
|
541
|
-
MochiKit.DragAndDrop.Draggables.notify('drag', this, event);
|
542
|
-
this.draw(pointer);
|
543
|
-
this.options.onchange(this);
|
544
|
-
|
545
|
-
if (this.options.scroll) {
|
546
|
-
this.stopScrolling();
|
547
|
-
var p, q;
|
548
|
-
if (this.options.scroll == window) {
|
549
|
-
var s = this._getWindowScroll(this.options.scroll);
|
550
|
-
p = new MochiKit.Style.Coordinates(s.left, s.top);
|
551
|
-
q = new MochiKit.Style.Coordinates(s.left + s.width,
|
552
|
-
s.top + s.height);
|
553
|
-
} else {
|
554
|
-
p = MochiKit.Position.page(this.options.scroll);
|
555
|
-
p.x += this.options.scroll.scrollLeft;
|
556
|
-
p.y += this.options.scroll.scrollTop;
|
557
|
-
p.x += (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0);
|
558
|
-
p.y += (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
559
|
-
q = new MochiKit.Style.Coordinates(p.x + this.options.scroll.offsetWidth,
|
560
|
-
p.y + this.options.scroll.offsetHeight);
|
561
|
-
}
|
562
|
-
var speed = [0, 0];
|
563
|
-
if (pointer.page.x > (q.x - this.options.scrollSensitivity)) {
|
564
|
-
speed[0] = pointer.page.x - (q.x - this.options.scrollSensitivity);
|
565
|
-
} else if (pointer.page.x < (p.x + this.options.scrollSensitivity)) {
|
566
|
-
speed[0] = pointer.page.x - (p.x + this.options.scrollSensitivity);
|
567
|
-
}
|
568
|
-
if (pointer.page.y > (q.y - this.options.scrollSensitivity)) {
|
569
|
-
speed[1] = pointer.page.y - (q.y - this.options.scrollSensitivity);
|
570
|
-
} else if (pointer.page.y < (p.y + this.options.scrollSensitivity)) {
|
571
|
-
speed[1] = pointer.page.y - (p.y + this.options.scrollSensitivity);
|
572
|
-
}
|
573
|
-
this.startScrolling(speed);
|
574
|
-
}
|
575
|
-
|
576
|
-
// fix AppleWebKit rendering
|
577
|
-
if (/AppleWebKit/.test(navigator.appVersion)) {
|
578
|
-
window.scrollBy(0, 0);
|
579
|
-
}
|
580
|
-
event.stop();
|
581
|
-
},
|
582
|
-
|
583
|
-
/** @id MochiKit.DragAndDrop.finishDrag */
|
584
|
-
finishDrag: function (event, success) {
|
585
|
-
var dr = MochiKit.DragAndDrop;
|
586
|
-
this.dragging = false;
|
587
|
-
if (this.options.selectclass) {
|
588
|
-
MochiKit.DOM.removeElementClass(this.element,
|
589
|
-
this.options.selectclass);
|
590
|
-
}
|
591
|
-
|
592
|
-
if (this.options.ghosting) {
|
593
|
-
// XXX: from a user point of view, it would be better to remove
|
594
|
-
// the node only *after* the MochiKit.Visual.Move end when used
|
595
|
-
// with revert.
|
596
|
-
MochiKit.Position.relativize(this.element, this.ghostPosition);
|
597
|
-
MochiKit.DOM.removeElement(this._clone);
|
598
|
-
this._clone = null;
|
599
|
-
}
|
600
|
-
|
601
|
-
if (success) {
|
602
|
-
dr.Droppables.fire(event, this.element);
|
603
|
-
}
|
604
|
-
dr.Draggables.notify('end', this, event);
|
605
|
-
|
606
|
-
var revert = this.options.revert;
|
607
|
-
if (revert && typeof(revert) == 'function') {
|
608
|
-
revert = revert(this.element);
|
609
|
-
}
|
610
|
-
|
611
|
-
var d = this.currentDelta();
|
612
|
-
if (revert && this.options.reverteffect) {
|
613
|
-
this._revert = this.options.reverteffect(this.element,
|
614
|
-
d[1] - this.delta[1], d[0] - this.delta[0]);
|
615
|
-
} else {
|
616
|
-
this.delta = d;
|
617
|
-
}
|
618
|
-
|
619
|
-
if (this.options.zindex) {
|
620
|
-
this.element.style.zIndex = this.originalZ;
|
621
|
-
}
|
622
|
-
|
623
|
-
if (this.options.endeffect) {
|
624
|
-
this.options.endeffect(this.element);
|
625
|
-
}
|
626
|
-
|
627
|
-
dr.Draggables.deactivate();
|
628
|
-
dr.Droppables.reset(this.element);
|
629
|
-
},
|
630
|
-
|
631
|
-
/** @id MochiKit.DragAndDrop.keyPress */
|
632
|
-
keyPress: function (event) {
|
633
|
-
if (event.key().string != "KEY_ESCAPE") {
|
634
|
-
return;
|
635
|
-
}
|
636
|
-
this.finishDrag(event, false);
|
637
|
-
event.stop();
|
638
|
-
},
|
639
|
-
|
640
|
-
/** @id MochiKit.DragAndDrop.endDrag */
|
641
|
-
endDrag: function (event) {
|
642
|
-
if (!this.dragging) {
|
643
|
-
return;
|
644
|
-
}
|
645
|
-
this.stopScrolling();
|
646
|
-
this.finishDrag(event, true);
|
647
|
-
event.stop();
|
648
|
-
},
|
649
|
-
|
650
|
-
/** @id MochiKit.DragAndDrop.draw */
|
651
|
-
draw: function (point) {
|
652
|
-
var pos = MochiKit.Position.cumulativeOffset(this.element);
|
653
|
-
var d = this.currentDelta();
|
654
|
-
pos.x -= d[0];
|
655
|
-
pos.y -= d[1];
|
656
|
-
|
657
|
-
if (this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
|
658
|
-
pos.x -= this.options.scroll.scrollLeft - this.originalScrollLeft;
|
659
|
-
pos.y -= this.options.scroll.scrollTop - this.originalScrollTop;
|
660
|
-
}
|
661
|
-
|
662
|
-
var p = [point.page.x - pos.x - this.offset[0],
|
663
|
-
point.page.y - pos.y - this.offset[1]];
|
664
|
-
|
665
|
-
if (this.options.snap) {
|
666
|
-
if (typeof(this.options.snap) == 'function') {
|
667
|
-
p = this.options.snap(p[0], p[1]);
|
668
|
-
} else {
|
669
|
-
if (this.options.snap instanceof Array) {
|
670
|
-
var i = -1;
|
671
|
-
p = MochiKit.Base.map(MochiKit.Base.bind(function (v) {
|
672
|
-
i += 1;
|
673
|
-
return Math.round(v/this.options.snap[i]) *
|
674
|
-
this.options.snap[i];
|
675
|
-
}, this), p);
|
676
|
-
} else {
|
677
|
-
p = MochiKit.Base.map(MochiKit.Base.bind(function (v) {
|
678
|
-
return Math.round(v/this.options.snap) *
|
679
|
-
this.options.snap;
|
680
|
-
}, this), p);
|
681
|
-
}
|
682
|
-
}
|
683
|
-
}
|
684
|
-
var style = this.element.style;
|
685
|
-
if ((!this.options.constraint) ||
|
686
|
-
(this.options.constraint == 'horizontal')) {
|
687
|
-
style.left = p[0] + 'px';
|
688
|
-
}
|
689
|
-
if ((!this.options.constraint) ||
|
690
|
-
(this.options.constraint == 'vertical')) {
|
691
|
-
style.top = p[1] + 'px';
|
692
|
-
}
|
693
|
-
if (style.visibility == 'hidden') {
|
694
|
-
style.visibility = ''; // fix gecko rendering
|
695
|
-
}
|
696
|
-
},
|
697
|
-
|
698
|
-
/** @id MochiKit.DragAndDrop.stopScrolling */
|
699
|
-
stopScrolling: function () {
|
700
|
-
if (this.scrollInterval) {
|
701
|
-
clearInterval(this.scrollInterval);
|
702
|
-
this.scrollInterval = null;
|
703
|
-
MochiKit.DragAndDrop.Draggables._lastScrollPointer = null;
|
704
|
-
}
|
705
|
-
},
|
706
|
-
|
707
|
-
/** @id MochiKit.DragAndDrop.startScrolling */
|
708
|
-
startScrolling: function (speed) {
|
709
|
-
if (!speed[0] && !speed[1]) {
|
710
|
-
return;
|
711
|
-
}
|
712
|
-
this.scrollSpeed = [speed[0] * this.options.scrollSpeed,
|
713
|
-
speed[1] * this.options.scrollSpeed];
|
714
|
-
this.lastScrolled = new Date();
|
715
|
-
this.scrollInterval = setInterval(MochiKit.Base.bind(this.scroll, this), 10);
|
716
|
-
},
|
717
|
-
|
718
|
-
/** @id MochiKit.DragAndDrop.scroll */
|
719
|
-
scroll: function () {
|
720
|
-
var current = new Date();
|
721
|
-
var delta = current - this.lastScrolled;
|
722
|
-
this.lastScrolled = current;
|
723
|
-
|
724
|
-
if (this.options.scroll == window) {
|
725
|
-
var s = this._getWindowScroll(this.options.scroll);
|
726
|
-
if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
|
727
|
-
var dm = delta / 1000;
|
728
|
-
this.options.scroll.scrollTo(s.left + dm * this.scrollSpeed[0],
|
729
|
-
s.top + dm * this.scrollSpeed[1]);
|
730
|
-
}
|
731
|
-
} else {
|
732
|
-
this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
|
733
|
-
this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
|
734
|
-
}
|
735
|
-
|
736
|
-
var d = MochiKit.DragAndDrop;
|
737
|
-
|
738
|
-
MochiKit.Position.prepare();
|
739
|
-
d.Droppables.show(d.Draggables._lastPointer, this.element);
|
740
|
-
d.Draggables.notify('drag', this);
|
741
|
-
if (this._isScrollChild) {
|
742
|
-
d.Draggables._lastScrollPointer = d.Draggables._lastScrollPointer || d.Draggables._lastPointer;
|
743
|
-
d.Draggables._lastScrollPointer.x += this.scrollSpeed[0] * delta / 1000;
|
744
|
-
d.Draggables._lastScrollPointer.y += this.scrollSpeed[1] * delta / 1000;
|
745
|
-
if (d.Draggables._lastScrollPointer.x < 0) {
|
746
|
-
d.Draggables._lastScrollPointer.x = 0;
|
747
|
-
}
|
748
|
-
if (d.Draggables._lastScrollPointer.y < 0) {
|
749
|
-
d.Draggables._lastScrollPointer.y = 0;
|
750
|
-
}
|
751
|
-
this.draw(d.Draggables._lastScrollPointer);
|
752
|
-
}
|
753
|
-
|
754
|
-
this.options.onchange(this);
|
755
|
-
},
|
756
|
-
|
757
|
-
_getWindowScroll: function (win) {
|
758
|
-
var vp, w, h;
|
759
|
-
MochiKit.DOM.withWindow(win, function () {
|
760
|
-
vp = MochiKit.Style.getViewportPosition(win.document);
|
761
|
-
});
|
762
|
-
if (win.innerWidth) {
|
763
|
-
w = win.innerWidth;
|
764
|
-
h = win.innerHeight;
|
765
|
-
} else if (win.document.documentElement && win.document.documentElement.clientWidth) {
|
766
|
-
w = win.document.documentElement.clientWidth;
|
767
|
-
h = win.document.documentElement.clientHeight;
|
768
|
-
} else {
|
769
|
-
w = win.document.body.offsetWidth;
|
770
|
-
h = win.document.body.offsetHeight;
|
771
|
-
}
|
772
|
-
return {top: vp.y, left: vp.x, width: w, height: h};
|
773
|
-
},
|
774
|
-
|
775
|
-
/** @id MochiKit.DragAndDrop.repr */
|
776
|
-
repr: function () {
|
777
|
-
return '[' + this.__class__.NAME + ", options:" + MochiKit.Base.repr(this.options) + "]";
|
778
|
-
}
|
779
|
-
};
|
780
|
-
|
781
|
-
MochiKit.DragAndDrop.__new__ = function () {
|
782
|
-
MochiKit.Base.nameFunctions(this);
|
783
|
-
|
784
|
-
this.EXPORT_TAGS = {
|
785
|
-
":common": this.EXPORT,
|
786
|
-
":all": MochiKit.Base.concat(this.EXPORT, this.EXPORT_OK)
|
787
|
-
};
|
788
|
-
};
|
789
|
-
|
790
|
-
MochiKit.DragAndDrop.__new__();
|
791
|
-
|
792
|
-
MochiKit.Base._exportSymbols(this, MochiKit.DragAndDrop);
|
793
|
-
|