old_sql 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,38 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
|
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
-
<head>
|
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
|
-
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
|
|
8
|
-
<title>MochiKit.Position - DOM Position manipulation API</title>
|
|
9
|
-
|
|
10
|
-
<link rel="stylesheet" href="../../../include/css/documentation.css" type="text/css" />
|
|
11
|
-
<script type="text/javascript" src="../../../packed/lib/MochiKit/MochiKit.js"></script>
|
|
12
|
-
<script type="text/javascript" src="../../js/toc.js"></script>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<a href="http://mochikit.com"><img id="mainlink" src="../../../include/_img/g_logo_doc.gif" alt="MochiKit" /></a>
|
|
16
|
-
<a class='indexlink' href='index.html'>Back to docs index</a>
|
|
17
|
-
<div class="document">
|
|
18
|
-
<div class="section">
|
|
19
|
-
<h1><a id="name" name="name">Name</a></h1>
|
|
20
|
-
<p>MochiKit.Position - DOM Position manipulation API</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<p>This module is experimental and is present in MochiKit 1.4+ only. No
|
|
25
|
-
functions are currently exported from this module. Documentation is
|
|
26
|
-
forthcoming.</p>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="section">
|
|
29
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
30
|
-
<p>Copyright 2005-2006 Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>, and others.
|
|
31
|
-
This program is dual-licensed free
|
|
32
|
-
software; you can redistribute it and/or modify it under the terms of
|
|
33
|
-
the <a class="reference" href="http://www.opensource.org/licenses/mit-license.php">MIT License</a> or the <a class="reference" href="http://www.opensource.org/licenses/afl-2.1.php">Academic Free License v2.1</a>.</p>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
</body>
|
|
38
|
-
</html>
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
|
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
-
<head>
|
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
|
-
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
|
|
8
|
-
<title>MochiKit.Selector - Selecting elements by CSS selector syntax</title>
|
|
9
|
-
|
|
10
|
-
<link rel="stylesheet" href="../../../include/css/documentation.css" type="text/css" />
|
|
11
|
-
<script type="text/javascript" src="../../../packed/lib/MochiKit/MochiKit.js"></script>
|
|
12
|
-
<script type="text/javascript" src="../../js/toc.js"></script>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<a href="http://mochikit.com"><img id="mainlink" src="../../../include/_img/g_logo_doc.gif" alt="MochiKit" /></a>
|
|
16
|
-
<a class='indexlink' href='index.html'>Back to docs index</a>
|
|
17
|
-
<div class="document">
|
|
18
|
-
<div class="section">
|
|
19
|
-
<h1><a id="name" name="name">Name</a></h1>
|
|
20
|
-
<p>MochiKit.Selector - Selecting elements by CSS selector syntax</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<pre class="literal-block">
|
|
25
|
-
MochiKit.Base.map(MochiKit.Visual.fade, $$('p.fademe'));
|
|
26
|
-
</pre>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="section">
|
|
29
|
-
<h1><a id="description" name="description">Description</a></h1>
|
|
30
|
-
<p>MochiKit.Selector provides utilities to select elements by CSS
|
|
31
|
-
selector syntax. In particular it provides the <a class="mochiref reference" href="#fn-$$">$$</a>
|
|
32
|
-
function.</p>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="section">
|
|
35
|
-
<h1><a id="dependencies" name="dependencies">Dependencies</a></h1>
|
|
36
|
-
<ul class="simple">
|
|
37
|
-
<li><a class="mochiref reference" href="Base.html">MochiKit.Base</a></li>
|
|
38
|
-
<li><a class="mochiref reference" href="DOM.html">MochiKit.DOM</a></li>
|
|
39
|
-
<li><a class="mochiref reference" href="Iter.html">MochiKit.Iter</a></li>
|
|
40
|
-
</ul>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="section">
|
|
43
|
-
<h1><a id="overview" name="overview">Overview</a></h1>
|
|
44
|
-
<p>This module provides facilities to select childs of a DOM node by
|
|
45
|
-
using CSS selector syntax. In particular, it provides the
|
|
46
|
-
<a class="mochiref reference" href="#fn-$$">$$</a> function, which performs such a selection on the
|
|
47
|
-
current document.</p>
|
|
48
|
-
<p>Many of CSS3 <a class="footnote-reference" href="#id3" id="id1" name="id1">[1]</a> selectors are supported:</p>
|
|
49
|
-
<ul>
|
|
50
|
-
<li><p class="first">Select by tag name (<tt class="docutils literal"><span class="pre">A</span></tt>)</p>
|
|
51
|
-
</li>
|
|
52
|
-
<li><p class="first">Select by class (<tt class="docutils literal"><span class="pre">.theclass</span></tt>)</p>
|
|
53
|
-
</li>
|
|
54
|
-
<li><p class="first">Select by id (<tt class="docutils literal"><span class="pre">#someid</span></tt>)</p>
|
|
55
|
-
</li>
|
|
56
|
-
<li><dl class="first docutils">
|
|
57
|
-
<dt>Combinators</dt>
|
|
58
|
-
<dd><ul class="first last simple">
|
|
59
|
-
<li>Descendant: <tt class="docutils literal"><span class="pre">E</span> <span class="pre">F</span></tt></li>
|
|
60
|
-
<li>Child: <tt class="docutils literal"><span class="pre">E</span> <span class="pre">></span> <span class="pre">F</span></tt></li>
|
|
61
|
-
<li>Immediate following sibling: <tt class="docutils literal"><span class="pre">E</span> <span class="pre">+</span> <span class="pre">F</span></tt></li>
|
|
62
|
-
<li>Following sibling: <tt class="docutils literal"><span class="pre">E</span> <span class="pre">~</span> <span class="pre">F</span></tt></li>
|
|
63
|
-
</ul>
|
|
64
|
-
</dd>
|
|
65
|
-
</dl>
|
|
66
|
-
</li>
|
|
67
|
-
<li><dl class="first docutils">
|
|
68
|
-
<dt>Attribute selectors</dt>
|
|
69
|
-
<dd><ul class="first last simple">
|
|
70
|
-
<li>simple "has attribute" (without operator)</li>
|
|
71
|
-
<li><tt class="docutils literal"><span class="pre">=</span></tt> equal</li>
|
|
72
|
-
<li><tt class="docutils literal"><span class="pre">!=</span></tt> not equal (not in CSS std.)</li>
|
|
73
|
-
<li><tt class="docutils literal"><span class="pre">~=</span></tt> word containment</li>
|
|
74
|
-
<li><tt class="docutils literal"><span class="pre">^=</span></tt> starts-with</li>
|
|
75
|
-
<li><tt class="docutils literal"><span class="pre">$=</span></tt> ends-with</li>
|
|
76
|
-
<li><tt class="docutils literal"><span class="pre">*=</span></tt> substring containment</li>
|
|
77
|
-
<li><tt class="docutils literal"><span class="pre">|=</span></tt> first part of hyphen deleimited (eg. lang|="en" matches lang="en-US")</li>
|
|
78
|
-
</ul>
|
|
79
|
-
</dd>
|
|
80
|
-
</dl>
|
|
81
|
-
</li>
|
|
82
|
-
<li><dl class="first docutils">
|
|
83
|
-
<dt>Pseudo-classes</dt>
|
|
84
|
-
<dd><ul class="first last simple">
|
|
85
|
-
<li><tt class="docutils literal"><span class="pre">:nth-child</span></tt>, <tt class="docutils literal"><span class="pre">:nth-last-child</span></tt>, <tt class="docutils literal"><span class="pre">:first-child</span></tt>, <tt class="docutils literal"><span class="pre">:last-child</span></tt>, <tt class="docutils literal"><span class="pre">:only-child</span></tt>, <tt class="docutils literal"><span class="pre">:empty</span></tt>, <tt class="docutils literal"><span class="pre">:enabled</span></tt>, <tt class="docutils literal"><span class="pre">:disabled</span></tt>, <tt class="docutils literal"><span class="pre">:checked</span></tt>, <tt class="docutils literal"><span class="pre">:not(<any</span> <span class="pre">other</span> <span class="pre">selector>)</span></tt></li>
|
|
86
|
-
</ul>
|
|
87
|
-
</dd>
|
|
88
|
-
</dl>
|
|
89
|
-
</li>
|
|
90
|
-
<li><dl class="first docutils">
|
|
91
|
-
<dt>Deprecated Pseudo-classes (to be removed in 1.5)</dt>
|
|
92
|
-
<dd><ul class="first last simple">
|
|
93
|
-
<li><tt class="docutils literal"><span class="pre">:root</span></tt>, <tt class="docutils literal"><span class="pre">:nth-of-type</span></tt>, <tt class="docutils literal"><span class="pre">:nth-last-of-type</span></tt>, <tt class="docutils literal"><span class="pre">:first-of-type</span></tt>, <tt class="docutils literal"><span class="pre">:last-of-type</span></tt>, <tt class="docutils literal"><span class="pre">:only-of-type</span></tt></li>
|
|
94
|
-
</ul>
|
|
95
|
-
</dd>
|
|
96
|
-
</dl>
|
|
97
|
-
</li>
|
|
98
|
-
</ul>
|
|
99
|
-
<p>Multiple selectors can be concatenated, like this: <tt class="docutils literal"><span class="pre">P.quote[author~='Torvalds']</span></tt>,
|
|
100
|
-
in which case elements matching <em>all</em> the selectors are returned. Furthermore, such
|
|
101
|
-
concatenations can be <em>combined</em> by joining them with spaces and combinators.
|
|
102
|
-
This invokes the regular CSS behaviour of matching parts of the combination in
|
|
103
|
-
sequence, starting off each part from the elements returned by the preceeding part.</p>
|
|
104
|
-
<p>For the <tt class="docutils literal"><span class="pre">:nth-*</span></tt> pseudoclasses, the <tt class="docutils literal"><span class="pre">an+b</span></tt> syntax is partially
|
|
105
|
-
supported, specifically a and b must be non-negative and only a is
|
|
106
|
-
optional (this differs from the CSS std.) Also, <tt class="docutils literal"><span class="pre">odd</span></tt> and <tt class="docutils literal"><span class="pre">even</span></tt>
|
|
107
|
-
are supported, e.g. <tt class="docutils literal"><span class="pre">table</span> <span class="pre">tr:nth-child(odd)</span></tt> gives you every
|
|
108
|
-
other row of table starting with the first one.</p>
|
|
109
|
-
<p>For further documentation of CSS selectors, refer to the W3C CSS standard. <a class="footnote-reference" href="#id3" id="id2" name="id2">[1]</a></p>
|
|
110
|
-
<p>The original version of this module was ported from Prototype.</p>
|
|
111
|
-
<p><strong>Note:</strong> This module is currently experimental and API stability cannot be
|
|
112
|
-
fully guaranteed. The implementation is scheduled to be replaced with a new
|
|
113
|
-
faster version (now in development) during the MochiKit 1.5 development
|
|
114
|
-
cycle.</p>
|
|
115
|
-
<p><strong>Note:</strong> Due to how Internet Explorer handles node attributes, some attribute
|
|
116
|
-
selectors may not work as expected. In particular <tt class="docutils literal"><span class="pre">a[title]</span></tt> will not work
|
|
117
|
-
as all <tt class="docutils literal"><span class="pre">A</span></tt> elements in the Internet Explorer DOM model have a title attribute
|
|
118
|
-
regardless of whether it's specified in the markup or not.</p>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="section">
|
|
121
|
-
<h1><a id="api-reference" name="api-reference">API Reference</a></h1>
|
|
122
|
-
<div class="section">
|
|
123
|
-
<h2><a id="functions" name="functions">Functions</a></h2>
|
|
124
|
-
<p>
|
|
125
|
-
<a name="fn-finddocelements"></a>
|
|
126
|
-
<a class="mochidef reference" href="#fn-finddocelements">findDocElements(expression[, ...])</a>:</p>
|
|
127
|
-
<blockquote>
|
|
128
|
-
<p>Performs a selection on the active document. Equivalent
|
|
129
|
-
to <tt class="docutils literal"><span class="pre">findChildElements(MochiKit.DOM.currentDocument(),</span> <span class="pre">[expression,</span> <span class="pre">...])</span></tt></p>
|
|
130
|
-
<dl class="docutils">
|
|
131
|
-
<dt><em>Availability</em>:</dt>
|
|
132
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
133
|
-
</dl>
|
|
134
|
-
</blockquote>
|
|
135
|
-
<p>
|
|
136
|
-
<a name="fn-findchildelements"></a>
|
|
137
|
-
<a class="mochidef reference" href="#fn-findchildelements">findChildElements(element, expressions)</a>:</p>
|
|
138
|
-
<blockquote>
|
|
139
|
-
<p>Traverses the child nodes of <tt class="docutils literal"><span class="pre">element</span></tt> and returns the subset
|
|
140
|
-
of those that match any of the selector expressions in <tt class="docutils literal"><span class="pre">expressions</span></tt>.</p>
|
|
141
|
-
<p>Each expression can be a combination of simple expressions, by concatenating
|
|
142
|
-
them with spaces or combinators. In that case, normal CSS rules apply, each
|
|
143
|
-
simple expression is evaluated in turn and the results of that one is used
|
|
144
|
-
as the scope for the succeeding expression (see <a class="mochiref reference" href="#fn-selector.findelements">Selector.findElements</a>).
|
|
145
|
-
Finally, the results of the last simple expression is returned as the search result.</p>
|
|
146
|
-
<dl class="docutils">
|
|
147
|
-
<dt><em>Availability</em>:</dt>
|
|
148
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
149
|
-
</dl>
|
|
150
|
-
</blockquote>
|
|
151
|
-
<p>
|
|
152
|
-
<a name="fn-$$"></a>
|
|
153
|
-
<a class="mochidef reference" href="#fn-$$">$$(expression[, ...])</a>:</p>
|
|
154
|
-
<blockquote>
|
|
155
|
-
<p>An alias to <tt class="docutils literal"><span class="pre">findDocElements</span></tt>.</p>
|
|
156
|
-
<dl class="docutils">
|
|
157
|
-
<dt><em>Availability</em>:</dt>
|
|
158
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
159
|
-
</dl>
|
|
160
|
-
</blockquote>
|
|
161
|
-
</div>
|
|
162
|
-
<div class="section">
|
|
163
|
-
<h2><a id="constructors" name="constructors">Constructors</a></h2>
|
|
164
|
-
<p>
|
|
165
|
-
<a name="fn-selector"></a>
|
|
166
|
-
<a class="mochidef reference" href="#fn-selector">Selector(simpleExpression)</a>:</p>
|
|
167
|
-
<blockquote>
|
|
168
|
-
<p>An object storing the parsed version of a simple CSS selector expression
|
|
169
|
-
and providing functions for executing searches.</p>
|
|
170
|
-
<p><em>Simple</em> means that the expression is not a combination of expressions,
|
|
171
|
-
i.e. it does not contain any spaces.</p>
|
|
172
|
-
<p>Usually the user would not instantiate or use this object directly, but
|
|
173
|
-
heres how:</p>
|
|
174
|
-
<pre class="literal-block">
|
|
175
|
-
var selector = new MochiKit.Selector.Selector('#someelementid');
|
|
176
|
-
var searchResults = selector.findElements(rootElement);
|
|
177
|
-
</pre>
|
|
178
|
-
<dl class="docutils">
|
|
179
|
-
<dt><em>Deprecated</em>:</dt>
|
|
180
|
-
<dd>Use <a class="mochiref reference" href="#fn-findchildelements">findChildElements</a> instead. The Selector class will be
|
|
181
|
-
removed in version 1.5.</dd>
|
|
182
|
-
<dt><em>Availability</em>:</dt>
|
|
183
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
184
|
-
</dl>
|
|
185
|
-
</blockquote>
|
|
186
|
-
<p>
|
|
187
|
-
<a name="fn-selector.findelements"></a>
|
|
188
|
-
<a class="mochidef reference" href="#fn-selector.findelements">Selector.findElements(scope[, axis=""])</a>:</p>
|
|
189
|
-
<blockquote>
|
|
190
|
-
<p>Performs a search on <tt class="docutils literal"><span class="pre">scope</span></tt>. The value of axis controls what relatives
|
|
191
|
-
of <tt class="docutils literal"><span class="pre">scope</span></tt> are considered.</p>
|
|
192
|
-
<dl class="docutils">
|
|
193
|
-
<dt><tt class="docutils literal"><span class="pre">scope</span></tt>:</dt>
|
|
194
|
-
<dd>A DOM node that acts as a starting point for the search.</dd>
|
|
195
|
-
<dt><tt class="docutils literal"><span class="pre">axis</span></tt>:</dt>
|
|
196
|
-
<dd>One of <tt class="docutils literal"><span class="pre">">"</span></tt>, <tt class="docutils literal"><span class="pre">"+"</span></tt>, <tt class="docutils literal"><span class="pre">"~"</span></tt> or the empty string (default).
|
|
197
|
-
If the empty string, all descendant nodes of <tt class="docutils literal"><span class="pre">scope</span></tt> are tested against
|
|
198
|
-
the expression. If <tt class="docutils literal"><span class="pre">></span></tt> only direct child nodes of <tt class="docutils literal"><span class="pre">scope</span></tt> are tested,
|
|
199
|
-
if <tt class="docutils literal"><span class="pre">+</span></tt> only the next sibling (if any) of <tt class="docutils literal"><span class="pre">scope</span></tt> is tested and if
|
|
200
|
-
<tt class="docutils literal"><span class="pre">~</span></tt> all succeeding siblings of <tt class="docutils literal"><span class="pre">scope</span></tt> are tested.</dd>
|
|
201
|
-
<dt><em>Deprecated</em>:</dt>
|
|
202
|
-
<dd>Use <a class="mochiref reference" href="#fn-findchildelements">findChildElements</a> instead. The Selector class will be
|
|
203
|
-
removed in version 1.5.</dd>
|
|
204
|
-
<dt><em>Availability</em>:</dt>
|
|
205
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
206
|
-
</dl>
|
|
207
|
-
</blockquote>
|
|
208
|
-
</div>
|
|
209
|
-
</div>
|
|
210
|
-
<div class="section">
|
|
211
|
-
<h1><a id="see-also" name="see-also">See Also</a></h1>
|
|
212
|
-
<table class="docutils footnote" frame="void" id="id3" rules="none">
|
|
213
|
-
<colgroup><col class="label" /><col /></colgroup>
|
|
214
|
-
<tbody valign="top">
|
|
215
|
-
<tr><td class="label"><a name="id3">[1]</a></td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>)</em> CSS Selectors Level 3 (Last Call, oct. 2006):
|
|
216
|
-
<a class="reference" href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/">http://www.w3.org/TR/2005/WD-css3-selectors-20051215/</a></td></tr>
|
|
217
|
-
</tbody>
|
|
218
|
-
</table>
|
|
219
|
-
</div>
|
|
220
|
-
<div class="section">
|
|
221
|
-
<h1><a id="authors" name="authors">Authors</a></h1>
|
|
222
|
-
<ul class="simple">
|
|
223
|
-
<li>Arnar Birgisson <<a class="reference" href="mailto:arnarbi@gmail.com">arnarbi@gmail.com</a>></li>
|
|
224
|
-
<li>Thomas Herve <<a class="reference" href="mailto:therve@gmail.com">therve@gmail.com</a>></li>
|
|
225
|
-
<li>Originally ported from Prototype <<a class="reference" href="http://prototype.conio.net/">http://prototype.conio.net/</a>></li>
|
|
226
|
-
</ul>
|
|
227
|
-
</div>
|
|
228
|
-
<div class="section">
|
|
229
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
230
|
-
<p>Copyright 2005 Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>. This program is
|
|
231
|
-
dual-licensed free software; you can redistribute it and/or modify it
|
|
232
|
-
under the terms of the <a class="reference" href="http://www.opensource.org/licenses/mit-license.php">MIT License</a> or the <a class="reference" href="http://www.opensource.org/licenses/afl-2.1.php">Academic Free License
|
|
233
|
-
v2.1</a>.</p>
|
|
234
|
-
<p>Based on Prototype, (c) 2005 Sam Stephenson, available under the <a class="reference" href="http://dev.rubyonrails.org/browser/spinoffs/prototype/LICENSE?rev=3362">Prototype
|
|
235
|
-
license</a></p>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
</body>
|
|
240
|
-
</html>
|
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
|
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
-
<head>
|
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
|
-
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
|
|
8
|
-
<title>MochiKit.Signal - Simple universal event handling</title>
|
|
9
|
-
|
|
10
|
-
<link rel="stylesheet" href="../../../include/css/documentation.css" type="text/css" />
|
|
11
|
-
<script type="text/javascript" src="../../../packed/lib/MochiKit/MochiKit.js"></script>
|
|
12
|
-
<script type="text/javascript" src="../../js/toc.js"></script>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<a href="http://mochikit.com"><img id="mainlink" src="../../../include/_img/g_logo_doc.gif" alt="MochiKit" /></a>
|
|
16
|
-
<a class='indexlink' href='index.html'>Back to docs index</a>
|
|
17
|
-
<div class="document">
|
|
18
|
-
<div class="section">
|
|
19
|
-
<h1><a id="name" name="name">Name</a></h1>
|
|
20
|
-
<p>MochiKit.Signal - Simple universal event handling</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<p>Signal for DOM events:</p>
|
|
25
|
-
<pre class="literal-block">
|
|
26
|
-
// DOM events are also signals. Connect freely! The functions will be
|
|
27
|
-
// called with the custom event as a parameter.
|
|
28
|
-
|
|
29
|
-
// calls myClicked.apply(getElement('myID'), [event])
|
|
30
|
-
connect('myID', 'onclick', myClicked);
|
|
31
|
-
|
|
32
|
-
// calls wasClicked.apply(myObject, [event])
|
|
33
|
-
connect('myID', 'onclick', myObject, wasClicked);
|
|
34
|
-
|
|
35
|
-
// calls myObject.wasClicked(event)
|
|
36
|
-
connect('myID', 'onclick', myObject, 'wasClicked');
|
|
37
|
-
|
|
38
|
-
// the event is normalized, no more e = e || window.event!
|
|
39
|
-
myObject.wasClicked = function(e) {
|
|
40
|
-
var crossBrowserCoordinates = e.mouse().page;
|
|
41
|
-
// e.mouse().page is a MochiKit.Style.Coordinates object
|
|
42
|
-
}
|
|
43
|
-
</pre>
|
|
44
|
-
<p>Signal for non-DOM events:</p>
|
|
45
|
-
<pre class="literal-block">
|
|
46
|
-
// otherObject.gotFlash() will be called when 'flash' signalled.
|
|
47
|
-
connect(myObject, 'flash', otherObject, 'gotFlash');
|
|
48
|
-
|
|
49
|
-
// gotBang.apply(otherObject, [...]) will be called when 'bang' signalled.
|
|
50
|
-
// You can access otherObject from within gotBang as 'this'.
|
|
51
|
-
connect(myObject, 'bang', otherObject, gotBang);
|
|
52
|
-
|
|
53
|
-
// myFunc.apply(myObject, [...]) will be called when 'flash' signalled.
|
|
54
|
-
// You can access myObject from within myFunc as 'this'.
|
|
55
|
-
var ident = connect(myObject, 'flash', myFunc);
|
|
56
|
-
|
|
57
|
-
// You may disconnect with the return value from connect
|
|
58
|
-
disconnect(ident);
|
|
59
|
-
|
|
60
|
-
// Signal can take parameters. These will be passed along to the
|
|
61
|
-
// connected functions.
|
|
62
|
-
signal(myObject, 'flash');
|
|
63
|
-
signal(myObject, 'bang', 'BANG!');
|
|
64
|
-
</pre>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="section">
|
|
67
|
-
<h1><a id="description" name="description">Description</a></h1>
|
|
68
|
-
<p>Event handling was never so easy!</p>
|
|
69
|
-
<p>This module takes care of all the hard work—figuring out which
|
|
70
|
-
event model to use, trying to retrieve the event object, and handling
|
|
71
|
-
your own internal events, as well as cleanup when the page is unloaded
|
|
72
|
-
to clean up IE's nasty memory leakage.</p>
|
|
73
|
-
<p>This event system is largely based on Qt's signal/slot system. Read
|
|
74
|
-
more on how that is handled and also how it is used in model/view
|
|
75
|
-
programming at: <a class="reference" href="http://doc.trolltech.com/">http://doc.trolltech.com/</a></p>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="section">
|
|
78
|
-
<h1><a id="dependencies" name="dependencies">Dependencies</a></h1>
|
|
79
|
-
<ul class="simple">
|
|
80
|
-
<li><a class="mochiref reference" href="Base.html">MochiKit.Base</a></li>
|
|
81
|
-
<li><a class="mochiref reference" href="DOM.html">MochiKit.DOM</a></li>
|
|
82
|
-
</ul>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="section">
|
|
85
|
-
<h1><a id="overview" name="overview">Overview</a></h1>
|
|
86
|
-
<div class="section">
|
|
87
|
-
<h2><a id="using-signal-for-dom-events" name="using-signal-for-dom-events">Using Signal for DOM Events</a></h2>
|
|
88
|
-
<p>When using MochiKit.Signal, do not use the browser's native event
|
|
89
|
-
API. That means, no <tt class="docutils literal"><span class="pre">onclick="blah"</span></tt>, no
|
|
90
|
-
<tt class="docutils literal"><span class="pre">elem.addEventListener(...)</span></tt>, and certainly no
|
|
91
|
-
<tt class="docutils literal"><span class="pre">elem.attachEvent(...)</span></tt>. This also means that
|
|
92
|
-
<a class="mochiref reference" href="DOM.html#fn-addtocallstack">MochiKit.DOM.addToCallStack</a> and
|
|
93
|
-
<a class="mochiref reference" href="DOM.html#fn-addloadevent">MochiKit.DOM.addLoadEvent</a> should not be used in
|
|
94
|
-
combination with this module.</p>
|
|
95
|
-
<p>Signals for DOM objects are named with the <tt class="docutils literal"><span class="pre">'on'</span></tt> prefix, e.g.:
|
|
96
|
-
<tt class="docutils literal"><span class="pre">'onclick'</span></tt>, <tt class="docutils literal"><span class="pre">'onkeyup'</span></tt>, etc.</p>
|
|
97
|
-
<p>When the signal fires, your slot will be called with one parameter,
|
|
98
|
-
the custom event object.</p>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="section">
|
|
101
|
-
<h2><a id="custom-event-objects-for-dom-events" name="custom-event-objects-for-dom-events">Custom Event Objects for DOM events</a></h2>
|
|
102
|
-
<p>Signals triggered by DOM events are called with a custom event object
|
|
103
|
-
as a parameter. The custom event object presents a consistent view of
|
|
104
|
-
the event across all supported platforms and browsers, and provides
|
|
105
|
-
many conveniences not available even in a correct W3C implementation.</p>
|
|
106
|
-
<p>See the <a class="reference" href="#dom-custom-event-object-reference">DOM Custom Event Object Reference</a> for a detailed API
|
|
107
|
-
description of this object.</p>
|
|
108
|
-
<p>If you find that you're accessing the native event for any reason,
|
|
109
|
-
create a <a class="reference" href="http://trac.mochikit.com/newticket">new ticket</a> and we'll look into normalizing the behavior
|
|
110
|
-
you're looking for.</p>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="section">
|
|
113
|
-
<h2><a id="memory-usage" name="memory-usage">Memory Usage</a></h2>
|
|
114
|
-
<p>Any object that has connected slots (via <a class="mochiref reference" href="#fn-connect">connect()</a>) is
|
|
115
|
-
referenced by the Signal mechanism until it is disconnected via
|
|
116
|
-
<a class="mochiref reference" href="#fn-disconnect">disconnect()</a> or <a class="mochiref reference" href="#fn-disconnectall">disconnectAll()</a>.</p>
|
|
117
|
-
<p>Signal does not leak. It registers an <tt class="docutils literal"><span class="pre">'onunload'</span></tt> event that
|
|
118
|
-
disconnects all objects on the page when the browser leaves the
|
|
119
|
-
page. However, memory usage will grow during the page view for every
|
|
120
|
-
connection made until it is disconnected. Even if the DOM object is
|
|
121
|
-
removed from the document, it will still be referenced by Signal until
|
|
122
|
-
it is explicitly disconnected.</p>
|
|
123
|
-
<p>In order to conserve memory during the page view,
|
|
124
|
-
<a class="mochiref reference" href="#fn-disconnectall">disconnectAll()</a> any DOM elements that are about to be
|
|
125
|
-
removed from the document.</p>
|
|
126
|
-
</div>
|
|
127
|
-
<div class="section">
|
|
128
|
-
<h2><a id="synthesized-events" name="synthesized-events">Synthesized Events</a></h2>
|
|
129
|
-
<p>Certain events supported by MochiKit are not generated natively by all
|
|
130
|
-
browsers. MochiKit can synthesize these events even for non-supporting
|
|
131
|
-
browsers, however, by watching for related events and triggering the
|
|
132
|
-
appropriate signals at the right times.</p>
|
|
133
|
-
<p>These events include:</p>
|
|
134
|
-
<p><tt class="docutils literal"><span class="pre">onmouseenter</span></tt></p>
|
|
135
|
-
<blockquote>
|
|
136
|
-
<p>Similar to <tt class="docutils literal"><span class="pre">'onmouseover'</span></tt>, but does not "bubble" up to parent
|
|
137
|
-
nodes. Such bubbling is often a cause of confusion. On an
|
|
138
|
-
<tt class="docutils literal"><span class="pre">'onmouseenter'</span></tt> event, you can be certain that the mouse has
|
|
139
|
-
left the node attached to the event.</p>
|
|
140
|
-
<dl class="docutils">
|
|
141
|
-
<dt><em>Availability:</em></dt>
|
|
142
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
143
|
-
</dl>
|
|
144
|
-
</blockquote>
|
|
145
|
-
<p><tt class="docutils literal"><span class="pre">onmouseleave</span></tt></p>
|
|
146
|
-
<blockquote>
|
|
147
|
-
<p>Similar to <tt class="docutils literal"><span class="pre">'onmouseout'</span></tt>, but does not "bubble" up to parent
|
|
148
|
-
nodes. This is the analog to <tt class="docutils literal"><span class="pre">'onmouseenter'</span></tt>.</p>
|
|
149
|
-
<dl class="docutils">
|
|
150
|
-
<dt><em>Availability:</em></dt>
|
|
151
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
152
|
-
</dl>
|
|
153
|
-
</blockquote>
|
|
154
|
-
<p><tt class="docutils literal"><span class="pre">onmousewheel</span></tt></p>
|
|
155
|
-
<blockquote>
|
|
156
|
-
<p>Not strictly synthesized, but named <tt class="docutils literal"><span class="pre">'DOMMouseScroll'</span></tt> in
|
|
157
|
-
Gecko-based browsers. MochiKit translates <tt class="docutils literal"><span class="pre">'onmousewheel'</span></tt> to
|
|
158
|
-
the corresponding event in these browsers.</p>
|
|
159
|
-
<dl class="docutils">
|
|
160
|
-
<dt><em>Availability:</em></dt>
|
|
161
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
162
|
-
</dl>
|
|
163
|
-
</blockquote>
|
|
164
|
-
</div>
|
|
165
|
-
<div class="section">
|
|
166
|
-
<h2><a id="using-signal-for-non-dom-objects" name="using-signal-for-non-dom-objects">Using Signal for non-DOM objects</a></h2>
|
|
167
|
-
<p>Signals are triggered with the <a class="mochiref reference" href="#fn-signal">signal(src, 'signal', ...)</a>
|
|
168
|
-
function. Additional parameters passed to this are passed onto the
|
|
169
|
-
connected slots. Explicit signals are not required for DOM events.</p>
|
|
170
|
-
<p>Slots that are connected to a signal are called in the following
|
|
171
|
-
manner when that signal is signalled:</p>
|
|
172
|
-
<ul class="simple">
|
|
173
|
-
<li>If the slot was a single function, then it is called with <tt class="docutils literal"><span class="pre">this</span></tt>
|
|
174
|
-
set to the object originating the signal with whatever parameters
|
|
175
|
-
it was signalled with.</li>
|
|
176
|
-
<li>If the slot was an object and a function, then it is called with
|
|
177
|
-
<tt class="docutils literal"><span class="pre">this</span></tt> set to the object, and with whatever parameters it was
|
|
178
|
-
signalled with.</li>
|
|
179
|
-
<li>If the slot was an object and a string, then <tt class="docutils literal"><span class="pre">object[string]</span></tt> is
|
|
180
|
-
called with the parameters to the signal.</li>
|
|
181
|
-
</ul>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
<div class="section">
|
|
185
|
-
<h1><a id="api-reference" name="api-reference">API Reference</a></h1>
|
|
186
|
-
<div class="section">
|
|
187
|
-
<h2><a id="signal-api-reference" name="signal-api-reference">Signal API Reference</a></h2>
|
|
188
|
-
<p>
|
|
189
|
-
<a name="fn-connect"></a>
|
|
190
|
-
<a class="mochidef reference" href="#fn-connect">connect(src, signal, dest[, func])</a>:</p>
|
|
191
|
-
<blockquote>
|
|
192
|
-
<p>Connects a signal to a slot, and return a unique identifier that
|
|
193
|
-
can be used to disconnect that signal.</p>
|
|
194
|
-
<p><tt class="docutils literal"><span class="pre">src</span></tt> is the object that has the signal. You may pass in a
|
|
195
|
-
string, in which case, it is interpreted as an id for an HTML
|
|
196
|
-
element.</p>
|
|
197
|
-
<p><tt class="docutils literal"><span class="pre">signal</span></tt> is a string that represents a signal name. If 'src' is
|
|
198
|
-
an HTML Element, <tt class="docutils literal"><span class="pre">window</span></tt>, or the <tt class="docutils literal"><span class="pre">document</span></tt>, then it can be
|
|
199
|
-
one of the 'on-XYZ' events. You must include the 'on' prefix, and
|
|
200
|
-
it must be all lower-case.</p>
|
|
201
|
-
<p><tt class="docutils literal"><span class="pre">dest</span></tt> and <tt class="docutils literal"><span class="pre">func</span></tt> describe the slot, or the action to take
|
|
202
|
-
when the signal is triggered.</p>
|
|
203
|
-
<blockquote>
|
|
204
|
-
<ul class="simple">
|
|
205
|
-
<li>If <tt class="docutils literal"><span class="pre">dest</span></tt> is an object and <tt class="docutils literal"><span class="pre">func</span></tt> is a string, then
|
|
206
|
-
<tt class="docutils literal"><span class="pre">dest[func].apply(dest,</span> <span class="pre">[...])</span></tt> will be called when the
|
|
207
|
-
signal is signalled.</li>
|
|
208
|
-
<li>If <tt class="docutils literal"><span class="pre">dest</span></tt> is an object and <tt class="docutils literal"><span class="pre">func</span></tt> is a function, then
|
|
209
|
-
<tt class="docutils literal"><span class="pre">func.apply(dest,</span> <span class="pre">[...])</span></tt> will be called when the signal
|
|
210
|
-
is signalled.</li>
|
|
211
|
-
<li>If <tt class="docutils literal"><span class="pre">func</span></tt> is undefined and <tt class="docutils literal"><span class="pre">dest</span></tt> is a function, then
|
|
212
|
-
<tt class="docutils literal"><span class="pre">dest.apply(src,</span> <span class="pre">[...])</span></tt> will be called when the signal is
|
|
213
|
-
signalled.</li>
|
|
214
|
-
</ul>
|
|
215
|
-
</blockquote>
|
|
216
|
-
<p>No other combinations are allowed and will raise an exception.</p>
|
|
217
|
-
<p>The return value can be passed to <a class="mochiref reference" href="#fn-disconnect">disconnect</a> to
|
|
218
|
-
disconnect the signal.</p>
|
|
219
|
-
<p>In MochiKit 1.4+, if <tt class="docutils literal"><span class="pre">src</span></tt> is an object that has a <tt class="docutils literal"><span class="pre">__connect__</span></tt>
|
|
220
|
-
method, then <tt class="docutils literal"><span class="pre">src.__connect__(ident,</span> <span class="pre">signal,</span> <span class="pre">objOrFunc,</span> <span class="pre">funcOrStr)</span></tt>
|
|
221
|
-
will be called. The <tt class="docutils literal"><span class="pre">__connect__</span></tt> method is allowed to disconnect
|
|
222
|
-
the signal. DOM objects can not implement this feature.</p>
|
|
223
|
-
<dl class="docutils">
|
|
224
|
-
<dt><em>Availability</em>:</dt>
|
|
225
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
226
|
-
</dl>
|
|
227
|
-
</blockquote>
|
|
228
|
-
<p>
|
|
229
|
-
<a name="fn-disconnect"></a>
|
|
230
|
-
<a class="mochidef reference" href="#fn-disconnect">disconnect(ident)</a>:</p>
|
|
231
|
-
<blockquote>
|
|
232
|
-
<p>To disconnect a signal, pass its ident returned by
|
|
233
|
-
<a class="mochiref reference" href="#fn-connect">connect()</a>. This is similar to how the browser's
|
|
234
|
-
<tt class="docutils literal"><span class="pre">setTimeout</span></tt> and <tt class="docutils literal"><span class="pre">clearTimeout</span></tt> works.</p>
|
|
235
|
-
<p>In MochiKit 1.4+, if the signal source is an object that has a
|
|
236
|
-
<tt class="docutils literal"><span class="pre">__disconnect__</span></tt> method, then
|
|
237
|
-
<tt class="docutils literal"><span class="pre">src.__disconnect__(ident,</span> <span class="pre">signal,</span> <span class="pre">objOrFunc,</span> <span class="pre">funcOrStr)</span></tt>
|
|
238
|
-
will be called. DOM objects can not implement this feature.</p>
|
|
239
|
-
<dl class="docutils">
|
|
240
|
-
<dt><em>Availability</em>:</dt>
|
|
241
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
242
|
-
</dl>
|
|
243
|
-
</blockquote>
|
|
244
|
-
<p>
|
|
245
|
-
<a name="fn-disconnectall"></a>
|
|
246
|
-
<a class="mochidef reference" href="#fn-disconnectall">disconnectAll(src[, signal, ...])</a>:</p>
|
|
247
|
-
<blockquote>
|
|
248
|
-
<p>Removes a set of signals from <tt class="docutils literal"><span class="pre">src</span></tt>, similar to calling
|
|
249
|
-
<a class="mochiref reference" href="#fn-disconnect">disconnect(ident)</a> for each one.</p>
|
|
250
|
-
<p><tt class="docutils literal"><span class="pre">disconnectAll(src)</span></tt> removes all signals from src.</p>
|
|
251
|
-
<p><tt class="docutils literal"><span class="pre">disconnectAll(src,</span> <span class="pre">'onmousedown',</span> <span class="pre">'mySignal')</span></tt> will remove all
|
|
252
|
-
<tt class="docutils literal"><span class="pre">'onmousedown'</span></tt> and <tt class="docutils literal"><span class="pre">'mySignal'</span></tt> signals from src.</p>
|
|
253
|
-
<dl class="docutils">
|
|
254
|
-
<dt><em>Availability</em>:</dt>
|
|
255
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
256
|
-
</dl>
|
|
257
|
-
</blockquote>
|
|
258
|
-
<p>
|
|
259
|
-
<a name="fn-disconnectallto"></a>
|
|
260
|
-
<a class="mochidef reference" href="#fn-disconnectallto">disconnectAllTo(dest[, func])</a>:</p>
|
|
261
|
-
<blockquote>
|
|
262
|
-
<p>Removes a set of signals connected to <tt class="docutils literal"><span class="pre">dest</span></tt>, similar to calling
|
|
263
|
-
<a class="mochiref reference" href="#fn-disconnect">disconnect(ident)</a> for each one.</p>
|
|
264
|
-
<p><tt class="docutils literal"><span class="pre">disconnectAllTo(dest)</span></tt> removes all signals connected to dest.</p>
|
|
265
|
-
<p><tt class="docutils literal"><span class="pre">disconnectAllTo(dest,</span> <span class="pre">func)</span></tt> will remove all
|
|
266
|
-
signals connected to dest using func.</p>
|
|
267
|
-
<dl class="docutils">
|
|
268
|
-
<dt><em>Availability</em>:</dt>
|
|
269
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
270
|
-
</dl>
|
|
271
|
-
</blockquote>
|
|
272
|
-
<p>
|
|
273
|
-
<a name="fn-signal"></a>
|
|
274
|
-
<a class="mochidef reference" href="#fn-signal">signal(src, signal, ...)</a>:</p>
|
|
275
|
-
<blockquote>
|
|
276
|
-
<p>This will signal a signal, passing whatever additional parameters
|
|
277
|
-
on to the connected slots. <tt class="docutils literal"><span class="pre">src</span></tt> and <tt class="docutils literal"><span class="pre">signal</span></tt> are the same as
|
|
278
|
-
for <a class="mochiref reference" href="#fn-connect">connect()</a>.</p>
|
|
279
|
-
<dl class="docutils">
|
|
280
|
-
<dt><em>Availability</em>:</dt>
|
|
281
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
282
|
-
</dl>
|
|
283
|
-
</blockquote>
|
|
284
|
-
</div>
|
|
285
|
-
<div class="section">
|
|
286
|
-
<h2><a id="dom-custom-event-object-reference" name="dom-custom-event-object-reference">DOM Custom Event Object Reference</a></h2>
|
|
287
|
-
<p>
|
|
288
|
-
<a name="fn-event"></a>
|
|
289
|
-
<a class="mochidef reference" href="#fn-event">event()</a>:</p>
|
|
290
|
-
<blockquote>
|
|
291
|
-
<p>The native event produced by the browser. You should not need to
|
|
292
|
-
use this.</p>
|
|
293
|
-
<dl class="docutils">
|
|
294
|
-
<dt><em>Availability</em>:</dt>
|
|
295
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
296
|
-
</dl>
|
|
297
|
-
</blockquote>
|
|
298
|
-
<p>
|
|
299
|
-
<a name="fn-src"></a>
|
|
300
|
-
<a class="mochidef reference" href="#fn-src">src()</a>:</p>
|
|
301
|
-
<blockquote>
|
|
302
|
-
<p>The element that this signal is connected to.</p>
|
|
303
|
-
<dl class="docutils">
|
|
304
|
-
<dt><em>Availability</em>:</dt>
|
|
305
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
306
|
-
</dl>
|
|
307
|
-
</blockquote>
|
|
308
|
-
<p>
|
|
309
|
-
<a name="fn-type"></a>
|
|
310
|
-
<a class="mochidef reference" href="#fn-type">type()</a>:</p>
|
|
311
|
-
<blockquote>
|
|
312
|
-
<p>The event type (<tt class="docutils literal"><span class="pre">'click'</span></tt>, <tt class="docutils literal"><span class="pre">'mouseover'</span></tt>, <tt class="docutils literal"><span class="pre">'keypress'</span></tt>,
|
|
313
|
-
etc.) as a string. Does not include the <tt class="docutils literal"><span class="pre">'on'</span></tt> prefix.</p>
|
|
314
|
-
<dl class="docutils">
|
|
315
|
-
<dt><em>Availability</em>:</dt>
|
|
316
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
317
|
-
</dl>
|
|
318
|
-
</blockquote>
|
|
319
|
-
<p>
|
|
320
|
-
<a name="fn-target"></a>
|
|
321
|
-
<a class="mochidef reference" href="#fn-target">target()</a>:</p>
|
|
322
|
-
<blockquote>
|
|
323
|
-
<p>The element that triggered the event. This may be a child of
|
|
324
|
-
<a class="mochiref reference" href="#fn-src">src()</a>.</p>
|
|
325
|
-
<dl class="docutils">
|
|
326
|
-
<dt><em>Availability</em>:</dt>
|
|
327
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
328
|
-
</dl>
|
|
329
|
-
</blockquote>
|
|
330
|
-
<p>
|
|
331
|
-
<a name="fn-modifier"></a>
|
|
332
|
-
<a class="mochidef reference" href="#fn-modifier">modifier()</a>:</p>
|
|
333
|
-
<blockquote>
|
|
334
|
-
<p>Returns <tt class="docutils literal"><span class="pre">{shift,</span> <span class="pre">ctrl,</span> <span class="pre">meta,</span> <span class="pre">alt,</span> <span class="pre">any}</span></tt>, where each property is
|
|
335
|
-
<tt class="docutils literal"><span class="pre">true</span></tt> if its respective modifier key was pressed, <tt class="docutils literal"><span class="pre">false</span></tt>
|
|
336
|
-
otherwise. <tt class="docutils literal"><span class="pre">any</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt> if any modifier is pressed,
|
|
337
|
-
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p>
|
|
338
|
-
<dl class="docutils">
|
|
339
|
-
<dt><em>Availability</em>:</dt>
|
|
340
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
341
|
-
</dl>
|
|
342
|
-
</blockquote>
|
|
343
|
-
<p>
|
|
344
|
-
<a name="fn-stoppropagation"></a>
|
|
345
|
-
<a class="mochidef reference" href="#fn-stoppropagation">stopPropagation()</a>:</p>
|
|
346
|
-
<blockquote>
|
|
347
|
-
<p>Works like W3C's <a class="reference" href="http://developer.mozilla.org/en/docs/DOM:event.stopPropagation">stopPropagation()</a>.</p>
|
|
348
|
-
<dl class="docutils">
|
|
349
|
-
<dt><em>Availability</em>:</dt>
|
|
350
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
351
|
-
</dl>
|
|
352
|
-
</blockquote>
|
|
353
|
-
<p>
|
|
354
|
-
<a name="fn-preventdefault"></a>
|
|
355
|
-
<a class="mochidef reference" href="#fn-preventdefault">preventDefault()</a>:</p>
|
|
356
|
-
<blockquote>
|
|
357
|
-
<p>Works like W3C's <a class="reference" href="http://developer.mozilla.org/en/docs/DOM:event.preventDefault">preventDefault()</a>.</p>
|
|
358
|
-
<dl class="docutils">
|
|
359
|
-
<dt><em>Availability</em>:</dt>
|
|
360
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
361
|
-
</dl>
|
|
362
|
-
</blockquote>
|
|
363
|
-
<p>
|
|
364
|
-
<a name="fn-stop"></a>
|
|
365
|
-
<a class="mochidef reference" href="#fn-stop">stop()</a>:</p>
|
|
366
|
-
<blockquote>
|
|
367
|
-
<p>Shortcut that calls <tt class="docutils literal"><span class="pre">stopPropagation()</span></tt> and
|
|
368
|
-
<tt class="docutils literal"><span class="pre">preventDefault()</span></tt>.</p>
|
|
369
|
-
<dl class="docutils">
|
|
370
|
-
<dt><em>Availability</em>:</dt>
|
|
371
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
372
|
-
</dl>
|
|
373
|
-
</blockquote>
|
|
374
|
-
<p>
|
|
375
|
-
<a name="fn-key"></a>
|
|
376
|
-
<a class="mochidef reference" href="#fn-key">key()</a>:</p>
|
|
377
|
-
<blockquote>
|
|
378
|
-
<p>Returns <tt class="docutils literal"><span class="pre">{code,</span> <span class="pre">string}</span></tt>.</p>
|
|
379
|
-
<p>Use <tt class="docutils literal"><span class="pre">'onkeydown'</span></tt> and <tt class="docutils literal"><span class="pre">'onkeyup'</span></tt> handlers to detect control
|
|
380
|
-
characters such as <tt class="docutils literal"><span class="pre">'KEY_F1'</span></tt>. Use the <tt class="docutils literal"><span class="pre">'onkeypress'</span></tt>
|
|
381
|
-
handler to detect "printable" characters, such as <tt class="docutils literal"><span class="pre">'é'</span></tt>.</p>
|
|
382
|
-
<p>When a user presses F1, in <tt class="docutils literal"><span class="pre">'onkeydown'</span></tt> and <tt class="docutils literal"><span class="pre">'onkeyup'</span></tt> this
|
|
383
|
-
method returns <tt class="docutils literal"><span class="pre">{code:</span> <span class="pre">122,</span> <span class="pre">string:</span> <span class="pre">'KEY_F1'}</span></tt>. In
|
|
384
|
-
<tt class="docutils literal"><span class="pre">'onkeypress'</span></tt>, it returns <tt class="docutils literal"><span class="pre">{code:</span> <span class="pre">0,</span> <span class="pre">string:</span> <span class="pre">''}</span></tt>.</p>
|
|
385
|
-
<p>If a user presses Shift+2 on a US keyboard, this method returns
|
|
386
|
-
<tt class="docutils literal"><span class="pre">{code:</span> <span class="pre">50,</span> <span class="pre">string:</span> <span class="pre">'KEY_2'}</span></tt> in <tt class="docutils literal"><span class="pre">'onkeydown'</span></tt> and
|
|
387
|
-
<tt class="docutils literal"><span class="pre">'onkeyup'</span></tt>. In <tt class="docutils literal"><span class="pre">'onkeypress'</span></tt>, it returns <tt class="docutils literal"><span class="pre">{code:</span> <span class="pre">64,</span>
|
|
388
|
-
<span class="pre">string:</span> <span class="pre">'@'}</span></tt>.</p>
|
|
389
|
-
<p>See <tt class="docutils literal"><span class="pre">_specialKeys</span></tt> in the source code for a comprehensive list
|
|
390
|
-
of control characters.</p>
|
|
391
|
-
<dl class="docutils">
|
|
392
|
-
<dt><em>Availability</em>:</dt>
|
|
393
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
394
|
-
</dl>
|
|
395
|
-
</blockquote>
|
|
396
|
-
<p>
|
|
397
|
-
<a name="fn-mouse"></a>
|
|
398
|
-
<a class="mochidef reference" href="#fn-mouse">mouse()</a>:</p>
|
|
399
|
-
<blockquote>
|
|
400
|
-
<p>Properties for <tt class="docutils literal"><span class="pre">'onmouse*'</span></tt>, <tt class="docutils literal"><span class="pre">'onclick'</span></tt>, <tt class="docutils literal"><span class="pre">'ondblclick'</span></tt>,
|
|
401
|
-
and <tt class="docutils literal"><span class="pre">'oncontextmenu'</span></tt>:</p>
|
|
402
|
-
<blockquote>
|
|
403
|
-
<ul class="simple">
|
|
404
|
-
<li><tt class="docutils literal"><span class="pre">page</span></tt> is a <a class="mochiref reference" href="Style.html#fn-coordinates">MochiKit.Style.Coordinates</a> object
|
|
405
|
-
that represents the cursor position relative to the HTML
|
|
406
|
-
document. Equivalent to <tt class="docutils literal"><span class="pre">pageX</span></tt> and <tt class="docutils literal"><span class="pre">pageY</span></tt> in
|
|
407
|
-
Safari, Mozilla, and Opera.</li>
|
|
408
|
-
<li><tt class="docutils literal"><span class="pre">client</span></tt> is a <a class="mochiref reference" href="Style.html#fn-coordinates">MochiKit.Style.Coordinates</a>
|
|
409
|
-
object that represents the cursor position relative to the
|
|
410
|
-
visible portion of the HTML document. Equivalent to
|
|
411
|
-
<tt class="docutils literal"><span class="pre">clientX</span></tt> and <tt class="docutils literal"><span class="pre">clientY</span></tt> on all browsers. Current versions of
|
|
412
|
-
Safari incorrectly return clientX as relative to the canvas
|
|
413
|
-
instead of relative to the viewport (<a class="reference" href="http://bugs.webkit.org/show_bug.cgi?id=8707">Safari Bug 8707</a>).</li>
|
|
414
|
-
</ul>
|
|
415
|
-
</blockquote>
|
|
416
|
-
<p>Properties for <tt class="docutils literal"><span class="pre">'onmouseup'</span></tt>, <tt class="docutils literal"><span class="pre">'onmousedown'</span></tt>, <tt class="docutils literal"><span class="pre">'onclick'</span></tt>,
|
|
417
|
-
and <tt class="docutils literal"><span class="pre">'ondblclick'</span></tt>:</p>
|
|
418
|
-
<blockquote>
|
|
419
|
-
<ul class="simple">
|
|
420
|
-
<li><tt class="docutils literal"><span class="pre">mouse().button</span></tt> returns <tt class="docutils literal"><span class="pre">{left,</span> <span class="pre">right,</span> <span class="pre">middle}</span></tt> where
|
|
421
|
-
each property is <tt class="docutils literal"><span class="pre">true</span></tt> if the mouse button was pressed,
|
|
422
|
-
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</li>
|
|
423
|
-
</ul>
|
|
424
|
-
</blockquote>
|
|
425
|
-
<p>Properties for <tt class="docutils literal"><span class="pre">'onmousewheel'</span></tt>:</p>
|
|
426
|
-
<blockquote>
|
|
427
|
-
<ul class="simple">
|
|
428
|
-
<li><tt class="docutils literal"><span class="pre">mouse().wheel</span></tt> is a <a class="mochiref reference" href="Style.html#fn-coordinates">MochiKit.Style.Coordinates</a>
|
|
429
|
-
object containing the scroll wheel offset. The number will be
|
|
430
|
-
positive when scrolling down (or to the right) and negative
|
|
431
|
-
when scrolling up (or to the left). Note that only Safari 3
|
|
432
|
-
currently supports horizontal scrolling. In other browsers,
|
|
433
|
-
the <tt class="docutils literal"><span class="pre">'y'</span></tt> component will contain the scroll offset for
|
|
434
|
-
both directions.</li>
|
|
435
|
-
</ul>
|
|
436
|
-
</blockquote>
|
|
437
|
-
<p>Known browser bugs:</p>
|
|
438
|
-
<blockquote>
|
|
439
|
-
<ul>
|
|
440
|
-
<li><p class="first">Current versions of Safari won't signal <tt class="docutils literal"><span class="pre">'ondblclick'</span></tt>
|
|
441
|
-
when attached via <tt class="docutils literal"><span class="pre">connect()</span></tt> (<a class="reference" href="http://bugs.webkit.org/show_bug.cgi?id=7790">Safari Bug 7790</a>).</p>
|
|
442
|
-
</li>
|
|
443
|
-
<li><p class="first">In Safari < 2.0.4, calling <tt class="docutils literal"><span class="pre">preventDefault()</span></tt> or <tt class="docutils literal"><span class="pre">stop()</span></tt>
|
|
444
|
-
in <tt class="docutils literal"><span class="pre">'onclick'</span></tt> events signalled from <tt class="docutils literal"><span class="pre"><a></span></tt> tags does not
|
|
445
|
-
prevent the browser from following those links.</p>
|
|
446
|
-
</li>
|
|
447
|
-
<li><p class="first">Mac browsers don't report right-click consistently. Firefox
|
|
448
|
-
signals the slot and sets <tt class="docutils literal"><span class="pre">modifier().ctrl</span></tt> to true,
|
|
449
|
-
Opera signals the slot and sets <tt class="docutils literal"><span class="pre">modifier().meta</span></tt> to
|
|
450
|
-
<tt class="docutils literal"><span class="pre">true</span></tt>, and Safari doesn't signal the slot at all
|
|
451
|
-
(<a class="reference" href="http://bugs.webkit.org/show_bug.cgi?id=6595">Safari Bug 6595</a>).</p>
|
|
452
|
-
<p>To find a right-click in Safari, Firefox, and IE, you can
|
|
453
|
-
connect an element to <tt class="docutils literal"><span class="pre">'oncontextmenu'</span></tt>. This doesn't
|
|
454
|
-
work in Opera.</p>
|
|
455
|
-
</li>
|
|
456
|
-
</ul>
|
|
457
|
-
</blockquote>
|
|
458
|
-
<dl class="docutils">
|
|
459
|
-
<dt><em>Availability</em>:</dt>
|
|
460
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
461
|
-
</dl>
|
|
462
|
-
</blockquote>
|
|
463
|
-
<p>
|
|
464
|
-
<a name="fn-relatedtarget"></a>
|
|
465
|
-
<a class="mochidef reference" href="#fn-relatedtarget">relatedTarget()</a>:</p>
|
|
466
|
-
<blockquote>
|
|
467
|
-
<p>Returns the document element that the mouse has moved to. This is
|
|
468
|
-
generated for <tt class="docutils literal"><span class="pre">'onmouseover'</span></tt> and <tt class="docutils literal"><span class="pre">'onmouseout'</span></tt> events.</p>
|
|
469
|
-
<dl class="docutils">
|
|
470
|
-
<dt><em>Availability</em>:</dt>
|
|
471
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
472
|
-
</dl>
|
|
473
|
-
</blockquote>
|
|
474
|
-
<p>
|
|
475
|
-
<a name="fn-confirmunload"></a>
|
|
476
|
-
<a class="mochidef reference" href="#fn-confirmunload">confirmUnload(msg)</a>:</p>
|
|
477
|
-
<blockquote>
|
|
478
|
-
<p>In browsers that support the <tt class="docutils literal"><span class="pre">'onbeforeunload'</span></tt> event (IE and
|
|
479
|
-
Firefox), calling this in the event handler will show a dialog box
|
|
480
|
-
that allows the user to confirm or cancel the navigation away from
|
|
481
|
-
the page.</p>
|
|
482
|
-
<dl class="docutils">
|
|
483
|
-
<dt><em>Availability</em>:</dt>
|
|
484
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
485
|
-
</dl>
|
|
486
|
-
</blockquote>
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
<div class="section">
|
|
490
|
-
<h1><a id="authors" name="authors">Authors</a></h1>
|
|
491
|
-
<ul class="simple">
|
|
492
|
-
<li>Jonathan Gardner <<a class="reference" href="mailto:jgardner@jonathangardner.net">jgardner@jonathangardner.net</a>></li>
|
|
493
|
-
<li>Beau Hartshorne <<a class="reference" href="mailto:beau@hartshornesoftware.com">beau@hartshornesoftware.com</a>></li>
|
|
494
|
-
<li>Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>></li>
|
|
495
|
-
</ul>
|
|
496
|
-
</div>
|
|
497
|
-
<div class="section">
|
|
498
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
499
|
-
<p>Copyright 2006 Jonathan Gardner <<a class="reference" href="mailto:jgardner@jonathangardner.net">jgardner@jonathangardner.net</a>>, Beau
|
|
500
|
-
Hartshorne <<a class="reference" href="mailto:beau@hartshornesoftware.com">beau@hartshornesoftware.com</a>>, and Bob Ippolito
|
|
501
|
-
<<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>. This program is dual-licensed free software; you
|
|
502
|
-
can redistribute it and/or modify it under the terms of the <a class="reference" href="http://www.opensource.org/licenses/mit-license.php">MIT
|
|
503
|
-
License</a> or the <a class="reference" href="http://www.opensource.org/licenses/afl-2.1.php">Academic Free License v2.1</a>.</p>
|
|
504
|
-
</div>
|
|
505
|
-
</div>
|
|
506
|
-
|
|
507
|
-
</body>
|
|
508
|
-
</html>
|