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,168 +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.DateTime - "what time is it anyway?"</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.DateTime - "what time is it anyway?"</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<pre class="literal-block">
|
|
25
|
-
stringDate = toISOTimestamp(new Date());
|
|
26
|
-
dateObject = isoTimestamp(stringDate);
|
|
27
|
-
</pre>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="section">
|
|
30
|
-
<h1><a id="description" name="description">Description</a></h1>
|
|
31
|
-
<p>Remote servers don't give you JavaScript Date objects, and they
|
|
32
|
-
certainly don't want them from you, so you need to deal with string
|
|
33
|
-
representations of dates and timestamps. MochiKit.Date does that.</p>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="section">
|
|
36
|
-
<h1><a id="dependencies" name="dependencies">Dependencies</a></h1>
|
|
37
|
-
<p>None.</p>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="section">
|
|
40
|
-
<h1><a id="api-reference" name="api-reference">API Reference</a></h1>
|
|
41
|
-
<div class="section">
|
|
42
|
-
<h2><a id="functions" name="functions">Functions</a></h2>
|
|
43
|
-
<p>
|
|
44
|
-
<a name="fn-isodate"></a>
|
|
45
|
-
<a class="mochidef reference" href="#fn-isodate">isoDate(str)</a>:</p>
|
|
46
|
-
<blockquote>
|
|
47
|
-
<p>Convert an ISO 8601 date (YYYY-MM-DD) to a <tt class="docutils literal"><span class="pre">Date</span></tt> object.</p>
|
|
48
|
-
<dl class="docutils">
|
|
49
|
-
<dt><em>Availability</em>:</dt>
|
|
50
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
51
|
-
</dl>
|
|
52
|
-
</blockquote>
|
|
53
|
-
<p>
|
|
54
|
-
<a name="fn-isotimestamp"></a>
|
|
55
|
-
<a class="mochidef reference" href="#fn-isotimestamp">isoTimestamp(str)</a>:</p>
|
|
56
|
-
<blockquote>
|
|
57
|
-
<p>Convert any ISO 8601 <a class="footnote-reference" href="#id3" id="id1" name="id1">[1]</a> timestamp (or something reasonably close
|
|
58
|
-
to it) to a <tt class="docutils literal"><span class="pre">Date</span></tt> object. Will accept the "de facto" form:</p>
|
|
59
|
-
<blockquote>
|
|
60
|
-
YYYY-MM-DD hh:mm:ss</blockquote>
|
|
61
|
-
<p>or (the proper form):</p>
|
|
62
|
-
<blockquote>
|
|
63
|
-
YYYY-MM-DDThh:mm:ssZ</blockquote>
|
|
64
|
-
<p>If a time zone designator ("Z" or "[+-]HH:MM") is not present,
|
|
65
|
-
then the local timezone is used.</p>
|
|
66
|
-
<dl class="docutils">
|
|
67
|
-
<dt><em>Availability</em>:</dt>
|
|
68
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
69
|
-
</dl>
|
|
70
|
-
</blockquote>
|
|
71
|
-
<p>
|
|
72
|
-
<a name="fn-toisotime"></a>
|
|
73
|
-
<a class="mochidef reference" href="#fn-toisotime">toISOTime(date)</a>:</p>
|
|
74
|
-
<blockquote>
|
|
75
|
-
<p>Convert a <tt class="docutils literal"><span class="pre">Date</span></tt> object to a string in the form of hh:mm:ss</p>
|
|
76
|
-
<dl class="docutils">
|
|
77
|
-
<dt><em>Availability</em>:</dt>
|
|
78
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
79
|
-
</dl>
|
|
80
|
-
</blockquote>
|
|
81
|
-
<p>
|
|
82
|
-
<a name="fn-toisotimestamp"></a>
|
|
83
|
-
<a class="mochidef reference" href="#fn-toisotimestamp">toISOTimestamp(date, realISO=false)</a>:</p>
|
|
84
|
-
<blockquote>
|
|
85
|
-
<p>Convert a <tt class="docutils literal"><span class="pre">Date</span></tt> object to something that's ALMOST but not quite
|
|
86
|
-
an ISO 8601 [1]_timestamp. If it was a proper ISO timestamp it
|
|
87
|
-
would be:</p>
|
|
88
|
-
<blockquote>
|
|
89
|
-
YYYY-MM-DDThh:mm:ssZ</blockquote>
|
|
90
|
-
<p>However, we see junk in SQL and other places that looks like this:</p>
|
|
91
|
-
<blockquote>
|
|
92
|
-
YYYY-MM-DD hh:mm:ss</blockquote>
|
|
93
|
-
<p>So, this function returns the latter form, despite its name,
|
|
94
|
-
unless you pass <tt class="docutils literal"><span class="pre">true</span></tt> for <tt class="docutils literal"><span class="pre">realISO</span></tt>.</p>
|
|
95
|
-
<dl class="docutils">
|
|
96
|
-
<dt><em>Availability</em>:</dt>
|
|
97
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
98
|
-
</dl>
|
|
99
|
-
</blockquote>
|
|
100
|
-
<p>
|
|
101
|
-
<a name="fn-toisodate"></a>
|
|
102
|
-
<a class="mochidef reference" href="#fn-toisodate">toISODate(date)</a>:</p>
|
|
103
|
-
<blockquote>
|
|
104
|
-
<p>Convert a <tt class="docutils literal"><span class="pre">Date</span></tt> object to an ISO 8601 <a class="footnote-reference" href="#id3" id="id2" name="id2">[1]</a> date string
|
|
105
|
-
(YYYY-MM-DD)</p>
|
|
106
|
-
<dl class="docutils">
|
|
107
|
-
<dt><em>Availability</em>:</dt>
|
|
108
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
109
|
-
</dl>
|
|
110
|
-
</blockquote>
|
|
111
|
-
<p>
|
|
112
|
-
<a name="fn-americandate"></a>
|
|
113
|
-
<a class="mochidef reference" href="#fn-americandate">americanDate(str)</a>:</p>
|
|
114
|
-
<blockquote>
|
|
115
|
-
<p>Converts a MM/DD/YYYY date to a <tt class="docutils literal"><span class="pre">Date</span></tt> object</p>
|
|
116
|
-
<dl class="docutils">
|
|
117
|
-
<dt><em>Availability</em>:</dt>
|
|
118
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
119
|
-
</dl>
|
|
120
|
-
</blockquote>
|
|
121
|
-
<p>
|
|
122
|
-
<a name="fn-topaddedamericandate"></a>
|
|
123
|
-
<a class="mochidef reference" href="#fn-topaddedamericandate">toPaddedAmericanDate(date)</a>:</p>
|
|
124
|
-
<blockquote>
|
|
125
|
-
<p>Converts a <tt class="docutils literal"><span class="pre">Date</span></tt> object to an MM/DD/YYYY date, e.g. 01/01/2001</p>
|
|
126
|
-
<dl class="docutils">
|
|
127
|
-
<dt><em>Availability</em>:</dt>
|
|
128
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
129
|
-
</dl>
|
|
130
|
-
</blockquote>
|
|
131
|
-
<p>
|
|
132
|
-
<a name="fn-toamericandate"></a>
|
|
133
|
-
<a class="mochidef reference" href="#fn-toamericandate">toAmericanDate(date)</a>:</p>
|
|
134
|
-
<blockquote>
|
|
135
|
-
<p>Converts a <tt class="docutils literal"><span class="pre">Date</span></tt> object to an M/D/YYYY date, e.g. 1/1/2001</p>
|
|
136
|
-
<dl class="docutils">
|
|
137
|
-
<dt><em>Availability</em>:</dt>
|
|
138
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
139
|
-
</dl>
|
|
140
|
-
</blockquote>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="section">
|
|
144
|
-
<h1><a id="see-also" name="see-also">See Also</a></h1>
|
|
145
|
-
<table class="docutils footnote" frame="void" id="id3" rules="none">
|
|
146
|
-
<colgroup><col class="label" /><col /></colgroup>
|
|
147
|
-
<tbody valign="top">
|
|
148
|
-
<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> W3C profile of ISO 8601: <a class="reference" href="http://www.w3.org/TR/NOTE-datetime">http://www.w3.org/TR/NOTE-datetime</a></td></tr>
|
|
149
|
-
</tbody>
|
|
150
|
-
</table>
|
|
151
|
-
</div>
|
|
152
|
-
<div class="section">
|
|
153
|
-
<h1><a id="authors" name="authors">Authors</a></h1>
|
|
154
|
-
<ul class="simple">
|
|
155
|
-
<li>Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>></li>
|
|
156
|
-
</ul>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="section">
|
|
159
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
160
|
-
<p>Copyright 2005 Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>. This program is
|
|
161
|
-
dual-licensed free software; you can redistribute it and/or modify it
|
|
162
|
-
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
|
|
163
|
-
v2.1</a>.</p>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
</body>
|
|
168
|
-
</html>
|
|
@@ -1,187 +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.DragAndDrop - drag and drop elements with MochiKit</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.DragAndDrop - drag and drop elements with MochiKit</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<pre class="literal-block">
|
|
25
|
-
// Create a draggable
|
|
26
|
-
new Draggable('mydrag');
|
|
27
|
-
|
|
28
|
-
// Create a corresponding droppable
|
|
29
|
-
new Droppable('mydrop', {
|
|
30
|
-
accept: ['drag-class'],
|
|
31
|
-
ondrop: function (element) {
|
|
32
|
-
alert('"' + element.id + '" was dropped on me');
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
</pre>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="section">
|
|
38
|
-
<h1><a id="description" name="description">Description</a></h1>
|
|
39
|
-
<p>MochiKit.DragAndDrop enables you the power of dragging elements
|
|
40
|
-
through your pages, for richer interfaces.</p>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="section">
|
|
43
|
-
<h1><a id="dependencies" name="dependencies">Dependencies</a></h1>
|
|
44
|
-
<ul class="simple">
|
|
45
|
-
<li><a class="mochiref reference" href="Base.html">MochiKit.Base</a></li>
|
|
46
|
-
<li><a class="mochiref reference" href="Iter.html">MochiKit.Iter</a></li>
|
|
47
|
-
<li><a class="mochiref reference" href="DOM.html">MochiKit.DOM</a></li>
|
|
48
|
-
<li><a class="mochiref reference" href="Color.html">MochiKit.Color</a></li>
|
|
49
|
-
<li><a class="mochiref reference" href="Visual.html">MochiKit.Visual</a></li>
|
|
50
|
-
<li><a class="mochiref reference" href="Signal.html">MochiKit.Signal</a></li>
|
|
51
|
-
</ul>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="section">
|
|
54
|
-
<h1><a id="overview" name="overview">Overview</a></h1>
|
|
55
|
-
<p>The implementation was adapted from <a class="reference" href="http://script.aculo.us">Scriptaculous</a>.</p>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="section">
|
|
58
|
-
<h1><a id="api-reference" name="api-reference">API Reference</a></h1>
|
|
59
|
-
<div class="section">
|
|
60
|
-
<h2><a id="constructors" name="constructors">Constructors</a></h2>
|
|
61
|
-
<p>
|
|
62
|
-
<a name="fn-draggable"></a>
|
|
63
|
-
<a class="mochidef reference" href="#fn-draggable">Draggable(element[, options])</a>:</p>
|
|
64
|
-
<blockquote>
|
|
65
|
-
<p>A object that can be drag with the mouse.</p>
|
|
66
|
-
<p>You have the following options, with corresponding default values:</p>
|
|
67
|
-
<dl class="docutils">
|
|
68
|
-
<dt><tt class="docutils literal"><span class="pre">handle</span> <span class="pre">(false)</span></tt>:</dt>
|
|
69
|
-
<dd>Option for giving the element where starting the drag. By
|
|
70
|
-
default it's the element itself, but you can either put a
|
|
71
|
-
class of a subelement or the id of another element as handle.</dd>
|
|
72
|
-
<dt><tt class="docutils literal"><span class="pre">starteffect</span> <span class="pre">(MochiKit.Visual.Opacity)</span></tt>:</dt>
|
|
73
|
-
<dd>Function called once the drag has begun, taking the dragged
|
|
74
|
-
element as argument. It's an effect by default but you can
|
|
75
|
-
define any callback.</dd>
|
|
76
|
-
<dt><tt class="docutils literal"><span class="pre">reverteffect</span> <span class="pre">(MochiKit.Visual.Move)</span></tt>:</dt>
|
|
77
|
-
<dd>Effect applied when drag is cancelled. You have to define the
|
|
78
|
-
<tt class="docutils literal"><span class="pre">revert</span></tt> option to enable the call. By default it brings the
|
|
79
|
-
element back to its initial position, so you should know what
|
|
80
|
-
you want when you modify this. The function should return an
|
|
81
|
-
effect that can be cancelled.</dd>
|
|
82
|
-
<dt><tt class="docutils literal"><span class="pre">endeffect</span> <span class="pre">(MochiKit.Visual.Opacity)</span></tt>:</dt>
|
|
83
|
-
<dd>Pending part of starteffect. If you have modified your element
|
|
84
|
-
during start, you'd usually want to revert it in the function.</dd>
|
|
85
|
-
<dt><tt class="docutils literal"><span class="pre">zindex</span> <span class="pre">(1000)</span></tt>:</dt>
|
|
86
|
-
<dd>Zindex of the drag element. By default it brings it to front.</dd>
|
|
87
|
-
<dt><tt class="docutils literal"><span class="pre">revert</span> <span class="pre">(false)</span></tt>:</dt>
|
|
88
|
-
<dd>Indicate if the reverteffect function should be called. If you
|
|
89
|
-
define a function here, this function will be called before
|
|
90
|
-
reverteffect, with the element as first argument.</dd>
|
|
91
|
-
<dt><tt class="docutils literal"><span class="pre">snap</span> <span class="pre">(false)</span></tt>:</dt>
|
|
92
|
-
<dd>Define the behaviour of the drag element when moving. It can
|
|
93
|
-
either be a function, a value or an array of two values. If
|
|
94
|
-
it's a function, it should take the (x, y) position of the
|
|
95
|
-
element as arguments, and return the position draw in the
|
|
96
|
-
browser. If its a value, it's used as a modulo for each
|
|
97
|
-
coordinates. If it's an array, each value is applied for the
|
|
98
|
-
corresponding coordinate.</dd>
|
|
99
|
-
<dt><tt class="docutils literal"><span class="pre">selectclass</span> <span class="pre">(null)</span></tt>:</dt>
|
|
100
|
-
<dd>If defined, name of CSS class applied during the drag.</dd>
|
|
101
|
-
<dt><tt class="docutils literal"><span class="pre">ghosting</span> <span class="pre">(null)</span></tt>:</dt>
|
|
102
|
-
<dd>Make a ghost from the draggable: clone it at start, then
|
|
103
|
-
remove the clone at end.</dd>
|
|
104
|
-
<dt><tt class="docutils literal"><span class="pre">onchange</span> <span class="pre">(MochiKit.Base.noop)</span></tt>:</dt>
|
|
105
|
-
<dd>Function called when updates are made on the draggable object.</dd>
|
|
106
|
-
<dt><tt class="docutils literal"><span class="pre">scroll</span> <span class="pre">(false)</span></tt>:</dt>
|
|
107
|
-
<dd>Element to scroll around, if precised. For example, <tt class="docutils literal"><span class="pre">window</span></tt>
|
|
108
|
-
will allow the draggable to scroll in the page.</dd>
|
|
109
|
-
<dt><tt class="docutils literal"><span class="pre">scrollSensitivity</span> <span class="pre">(20)</span></tt>:</dt>
|
|
110
|
-
<dd>Scroll sensitivity, used when scroll is used.</dd>
|
|
111
|
-
<dt><tt class="docutils literal"><span class="pre">scrollSpeed</span> <span class="pre">(15)</span></tt>:</dt>
|
|
112
|
-
<dd>Scroll speed, used when scroll is used.</dd>
|
|
113
|
-
</dl>
|
|
114
|
-
<p>A draggable generates some signals during its lifetime: start, drag and
|
|
115
|
-
end. They are available through the Draggables handler, and are called
|
|
116
|
-
with a draggable as argument. You can register a callback for these events
|
|
117
|
-
like this:</p>
|
|
118
|
-
<pre class="literal-block">
|
|
119
|
-
onStart = function (draggable) {
|
|
120
|
-
// Do some stuff
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
connect(Draggables, 'start', onStart);
|
|
124
|
-
</pre>
|
|
125
|
-
<dl class="docutils">
|
|
126
|
-
<dt><em>Availability</em>:</dt>
|
|
127
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
128
|
-
</dl>
|
|
129
|
-
</blockquote>
|
|
130
|
-
<p>
|
|
131
|
-
<a name="fn-droppable"></a>
|
|
132
|
-
<a class="mochidef reference" href="#fn-droppable">Droppable(element[, options])</a>:</p>
|
|
133
|
-
<blockquote>
|
|
134
|
-
<p>A object where you can drop a draggable.</p>
|
|
135
|
-
<p>You have the following options, with corresponding default values:</p>
|
|
136
|
-
<dl class="docutils">
|
|
137
|
-
<dt><tt class="docutils literal"><span class="pre">greedy</span> <span class="pre">(true)</span></tt>:</dt>
|
|
138
|
-
<dd>Stop on this droppable when a draggable drops over it.</dd>
|
|
139
|
-
<dt><tt class="docutils literal"><span class="pre">hoverclass</span> <span class="pre">(null)</span></tt>:</dt>
|
|
140
|
-
<dd>If defined, name of CSS class applied when a draggable is
|
|
141
|
-
hover the droppable element (hover state).</dd>
|
|
142
|
-
<dt><tt class="docutils literal"><span class="pre">hoverfunc</span> <span class="pre">(MochiKit.Base.noop)</span></tt>:</dt>
|
|
143
|
-
<dd>Function called on hover state.</dd>
|
|
144
|
-
<dt><tt class="docutils literal"><span class="pre">accept</span> <span class="pre">(null)</span></tt>:</dt>
|
|
145
|
-
<dd>Array of CSS classes allowed to drop on this.</dd>
|
|
146
|
-
<dt><tt class="docutils literal"><span class="pre">activeclass</span> <span class="pre">(null)</span></tt>:</dt>
|
|
147
|
-
<dd>If defined, name of CSS class applied if a possible draggable
|
|
148
|
-
begins its start (active state).</dd>
|
|
149
|
-
<dt><tt class="docutils literal"><span class="pre">onactive</span> <span class="pre">(MochiKit.Base.noop)</span></tt>:</dt>
|
|
150
|
-
<dd>Function called on active state.</dd>
|
|
151
|
-
<dt><tt class="docutils literal"><span class="pre">containment</span> <span class="pre">([])</span></tt>:</dt>
|
|
152
|
-
<dd>Specify a list of elements to check for active state: only the
|
|
153
|
-
children of the specified elements can be dropped. Mainly
|
|
154
|
-
useful for Sortable.</dd>
|
|
155
|
-
<dt><tt class="docutils literal"><span class="pre">onhover</span> <span class="pre">(MochiKit.Base.noop)</span></tt>:</dt>
|
|
156
|
-
<dd>Specific hover function, mainly used for Sortable.</dd>
|
|
157
|
-
<dt><tt class="docutils literal"><span class="pre">ondrop</span> <span class="pre">(MochiKit.Base.noop)</span></tt>:</dt>
|
|
158
|
-
<dd>Function called when a draggable is dropped. The function
|
|
159
|
-
takes three arguments: the draggable element, the droppable
|
|
160
|
-
element, and the event that raised the drop.</dd>
|
|
161
|
-
<dt><em>Availability</em>:</dt>
|
|
162
|
-
<dd>Available in MochiKit 1.4+</dd>
|
|
163
|
-
</dl>
|
|
164
|
-
</blockquote>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
<div class="section">
|
|
168
|
-
<h1><a id="authors" name="authors">Authors</a></h1>
|
|
169
|
-
<ul class="simple">
|
|
170
|
-
<li>Thomas Herve <<a class="reference" href="mailto:therve@gmail.com">therve@gmail.com</a>></li>
|
|
171
|
-
<li>Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>></li>
|
|
172
|
-
<li>Originally adapted from Script.aculo.us <<a class="reference" href="http://script.aculo.us/">http://script.aculo.us/</a>></li>
|
|
173
|
-
</ul>
|
|
174
|
-
</div>
|
|
175
|
-
<div class="section">
|
|
176
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
177
|
-
<p>Copyright 2005 Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>. This program is
|
|
178
|
-
dual-licensed free software; you can redistribute it and/or modify it
|
|
179
|
-
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
|
|
180
|
-
v2.1</a>.</p>
|
|
181
|
-
<p>Portions adapted from <a class="reference" href="http://script.aculo.us">Scriptaculous</a> are available under the terms
|
|
182
|
-
of the <a class="reference" href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.</p>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
</body>
|
|
187
|
-
</html>
|
|
@@ -1,300 +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.Format - string formatting goes here</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.Format - string formatting goes here</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="section">
|
|
23
|
-
<h1><a id="synopsis" name="synopsis">Synopsis</a></h1>
|
|
24
|
-
<pre class="literal-block">
|
|
25
|
-
assert( truncToFixed(0.12345, 4) == "0.1234" );
|
|
26
|
-
assert( roundToFixed(0.12345, 4) == "0.1235" );
|
|
27
|
-
assert( twoDigitAverage(1, 0) == "0" );
|
|
28
|
-
assert( twoDigitFloat(1.2345) == "1.23" );
|
|
29
|
-
assert( twoDigitFloat(1) == "1" );
|
|
30
|
-
assert( percentFormat(1.234567) == "123.46%" );
|
|
31
|
-
assert( numberFormatter("###,###%")(125) == "12,500%" );
|
|
32
|
-
assert( numberFormatter("##.000")(1.25) == "1.250" );
|
|
33
|
-
</pre>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="section">
|
|
36
|
-
<h1><a id="description" name="description">Description</a></h1>
|
|
37
|
-
<p>Formatting strings and stringifying numbers is boring, so a couple
|
|
38
|
-
useful functions in that domain live here.</p>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="section">
|
|
41
|
-
<h1><a id="dependencies" name="dependencies">Dependencies</a></h1>
|
|
42
|
-
<p>None.</p>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="section">
|
|
45
|
-
<h1><a id="overview" name="overview">Overview</a></h1>
|
|
46
|
-
<div class="section">
|
|
47
|
-
<h2><a id="formatting-numbers" name="formatting-numbers">Formatting Numbers</a></h2>
|
|
48
|
-
<p>MochiKit provides an extensible number formatting facility, modeled
|
|
49
|
-
loosely after the Number Format Pattern Syntax <a class="footnote-reference" href="#id2" id="id1" name="id1">[1]</a> from Java.
|
|
50
|
-
<a class="mochiref reference" href="#fn-numberformatter">numberFormatter(pattern[, placeholder=""[,
|
|
51
|
-
locale="default"])</a> returns a function that converts Number to string
|
|
52
|
-
using the given information. <tt class="docutils literal"><span class="pre">pattern</span></tt> is a string consisting of
|
|
53
|
-
the following symbols:</p>
|
|
54
|
-
<table border="1" class="docutils">
|
|
55
|
-
<colgroup>
|
|
56
|
-
<col width="15%" />
|
|
57
|
-
<col width="85%" />
|
|
58
|
-
</colgroup>
|
|
59
|
-
<thead valign="bottom">
|
|
60
|
-
<tr><th class="head">Symbol</th>
|
|
61
|
-
<th class="head">Meaning</th>
|
|
62
|
-
</tr>
|
|
63
|
-
</thead>
|
|
64
|
-
<tbody valign="top">
|
|
65
|
-
<tr><td><tt class="docutils literal"><span class="pre">-</span></tt></td>
|
|
66
|
-
<td>If given, used as the position of the minus sign
|
|
67
|
-
for negative numbers. If not given, the position
|
|
68
|
-
to the left of the first number placeholder is used.</td>
|
|
69
|
-
</tr>
|
|
70
|
-
<tr><td><tt class="docutils literal"><span class="pre">#</span></tt></td>
|
|
71
|
-
<td>The placeholder for a number that does not imply zero
|
|
72
|
-
padding.</td>
|
|
73
|
-
</tr>
|
|
74
|
-
<tr><td><tt class="docutils literal"><span class="pre">0</span></tt></td>
|
|
75
|
-
<td>The placeholder for a number that implies zero padding.
|
|
76
|
-
If it is used to the right of a decimal separator, it
|
|
77
|
-
implies trailing zeros, otherwise leading zeros.</td>
|
|
78
|
-
</tr>
|
|
79
|
-
<tr><td><tt class="docutils literal"><span class="pre">,</span></tt></td>
|
|
80
|
-
<td>The placeholder for a "thousands separator". May be used
|
|
81
|
-
at most once, and it must be to the left of a decimal
|
|
82
|
-
separator. Will be replaced by <tt class="docutils literal"><span class="pre">locale.separator</span></tt> in the
|
|
83
|
-
result (the default is also <tt class="docutils literal"><span class="pre">,</span></tt>).</td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr><td><tt class="docutils literal"><span class="pre">.</span></tt></td>
|
|
86
|
-
<td>The decimal separator. The quantity of <tt class="docutils literal"><span class="pre">#</span></tt> or <tt class="docutils literal"><span class="pre">0</span></tt>
|
|
87
|
-
after the decimal separator will determine the precision of
|
|
88
|
-
the result. If no decimal separator is present, the
|
|
89
|
-
fractional precision is <tt class="docutils literal"><span class="pre">0</span></tt> -- meaning that it will be
|
|
90
|
-
rounded to the nearest integer.</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr><td><tt class="docutils literal"><span class="pre">%</span></tt></td>
|
|
93
|
-
<td>If present, the number will be multiplied by <tt class="docutils literal"><span class="pre">100</span></tt> and
|
|
94
|
-
the <tt class="docutils literal"><span class="pre">%</span></tt> will be replaced by <tt class="docutils literal"><span class="pre">locale.percent</span></tt>.</td>
|
|
95
|
-
</tr>
|
|
96
|
-
</tbody>
|
|
97
|
-
</table>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="section">
|
|
101
|
-
<h1><a id="api-reference" name="api-reference">API Reference</a></h1>
|
|
102
|
-
<div class="section">
|
|
103
|
-
<h2><a id="functions" name="functions">Functions</a></h2>
|
|
104
|
-
<p>
|
|
105
|
-
<a name="fn-formatlocale"></a>
|
|
106
|
-
<a class="mochidef reference" href="#fn-formatlocale">formatLocale(locale="default")</a>:</p>
|
|
107
|
-
<blockquote>
|
|
108
|
-
<p>Return a locale object for the given locale. <tt class="docutils literal"><span class="pre">locale</span></tt> may be
|
|
109
|
-
either a string, which is looked up in the
|
|
110
|
-
<tt class="docutils literal"><span class="pre">MochiKit.Format.LOCALE</span></tt> object, or a locale object. If no
|
|
111
|
-
locale is given, <tt class="docutils literal"><span class="pre">LOCALE.default</span></tt> is used (equivalent to
|
|
112
|
-
<tt class="docutils literal"><span class="pre">LOCALE.en_US</span></tt>).</p>
|
|
113
|
-
<dl class="docutils">
|
|
114
|
-
<dt><em>Availability</em>:</dt>
|
|
115
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
116
|
-
</dl>
|
|
117
|
-
</blockquote>
|
|
118
|
-
<p>
|
|
119
|
-
<a name="fn-lstrip"></a>
|
|
120
|
-
<a class="mochidef reference" href="#fn-lstrip">lstrip(str, chars="\s")</a>:</p>
|
|
121
|
-
<blockquote>
|
|
122
|
-
<p>Returns a string based on <tt class="docutils literal"><span class="pre">str</span></tt> with leading whitespace
|
|
123
|
-
stripped.</p>
|
|
124
|
-
<p>If <tt class="docutils literal"><span class="pre">chars</span></tt> is given, then that expression will be used instead
|
|
125
|
-
of whitespace. <tt class="docutils literal"><span class="pre">chars</span></tt> should be a string suitable for use in a
|
|
126
|
-
<tt class="docutils literal"><span class="pre">RegExp</span></tt> <tt class="docutils literal"><span class="pre">[character</span> <span class="pre">set]</span></tt>.</p>
|
|
127
|
-
<dl class="docutils">
|
|
128
|
-
<dt><em>Availability</em>:</dt>
|
|
129
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
130
|
-
</dl>
|
|
131
|
-
</blockquote>
|
|
132
|
-
<p>
|
|
133
|
-
<a name="fn-numberformatter"></a>
|
|
134
|
-
<a class="mochidef reference" href="#fn-numberformatter">numberFormatter(pattern, placeholder="", locale="default")</a>:</p>
|
|
135
|
-
<blockquote>
|
|
136
|
-
<p>Return a function <tt class="docutils literal"><span class="pre">formatNumber(aNumber)</span></tt> that formats numbers
|
|
137
|
-
as a string according to the given pattern, placeholder and
|
|
138
|
-
locale.</p>
|
|
139
|
-
<p><tt class="docutils literal"><span class="pre">pattern</span></tt> is a string that describes how the numbers should be
|
|
140
|
-
formatted, for more information see <a class="reference" href="#formatting-numbers">Formatting Numbers</a>.</p>
|
|
141
|
-
<p><tt class="docutils literal"><span class="pre">locale</span></tt> is a string of a known locale (en_US, de_DE, fr_FR,
|
|
142
|
-
default) or an object with the following fields:</p>
|
|
143
|
-
<table border="1" class="docutils">
|
|
144
|
-
<colgroup>
|
|
145
|
-
<col width="16%" />
|
|
146
|
-
<col width="84%" />
|
|
147
|
-
</colgroup>
|
|
148
|
-
<tbody valign="top">
|
|
149
|
-
<tr><td>separator</td>
|
|
150
|
-
<td>The "thousands" separator for this locale (en_US is ",")</td>
|
|
151
|
-
</tr>
|
|
152
|
-
<tr><td>decimal</td>
|
|
153
|
-
<td>The decimal separator for this locale (en_US is ".")</td>
|
|
154
|
-
</tr>
|
|
155
|
-
<tr><td>percent</td>
|
|
156
|
-
<td>The percent symbol for this locale (en_US is "%")</td>
|
|
157
|
-
</tr>
|
|
158
|
-
</tbody>
|
|
159
|
-
</table>
|
|
160
|
-
<dl class="docutils">
|
|
161
|
-
<dt><em>Availability</em>:</dt>
|
|
162
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
163
|
-
</dl>
|
|
164
|
-
</blockquote>
|
|
165
|
-
<p>
|
|
166
|
-
<a name="fn-percentformat"></a>
|
|
167
|
-
<a class="mochidef reference" href="#fn-percentformat">percentFormat(aNumber)</a>:</p>
|
|
168
|
-
<blockquote>
|
|
169
|
-
<p>Return a string representation of <tt class="docutils literal"><span class="pre">aNumber</span> <span class="pre">*</span> <span class="pre">100</span></tt>, rounded to a
|
|
170
|
-
maximum precision of 2 fractional digits. Roughly equivalent to:
|
|
171
|
-
<tt class="docutils literal"><span class="pre">sprintf("%.2f%%",</span> <span class="pre">aNumber</span> <span class="pre">*</span> <span class="pre">100)</span></tt></p>
|
|
172
|
-
<p>In new code, you probably want to use:
|
|
173
|
-
<a class="mochiref reference" href="#fn-numberformatter">numberFormatter("#.##%")(aNumber)</a> instead.</p>
|
|
174
|
-
<dl class="docutils">
|
|
175
|
-
<dt><em>Availability</em>:</dt>
|
|
176
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
177
|
-
</dl>
|
|
178
|
-
</blockquote>
|
|
179
|
-
<p>
|
|
180
|
-
<a name="fn-roundtofixed"></a>
|
|
181
|
-
<a class="mochidef reference" href="#fn-roundtofixed">roundToFixed(aNumber, precision)</a>:</p>
|
|
182
|
-
<blockquote>
|
|
183
|
-
<p>Return a string representation of <tt class="docutils literal"><span class="pre">aNumber</span></tt>, rounded to
|
|
184
|
-
<tt class="docutils literal"><span class="pre">precision</span></tt> digits with trailing zeros. This is similar to
|
|
185
|
-
<tt class="docutils literal"><span class="pre">Number.toFixed(aNumber,</span> <span class="pre">precision)</span></tt>, but this has
|
|
186
|
-
implementation consistent rounding behavior (some versions of
|
|
187
|
-
Safari round 0.5 down!) and also includes preceding <tt class="docutils literal"><span class="pre">0</span></tt> for
|
|
188
|
-
numbers less than <tt class="docutils literal"><span class="pre">1</span></tt> (Safari, again).</p>
|
|
189
|
-
<p>For example, <a class="mochiref reference" href="#fn-roundtofixed">roundToFixed(0.1357, 2)</a> returns <tt class="docutils literal"><span class="pre">0.14</span></tt>
|
|
190
|
-
on every supported platform, where some return <tt class="docutils literal"><span class="pre">.13</span></tt> for
|
|
191
|
-
<tt class="docutils literal"><span class="pre">(0.1357).toFixed(2)</span></tt>.</p>
|
|
192
|
-
<dl class="docutils">
|
|
193
|
-
<dt><em>Availability</em>:</dt>
|
|
194
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
195
|
-
</dl>
|
|
196
|
-
</blockquote>
|
|
197
|
-
<p>
|
|
198
|
-
<a name="fn-rstrip"></a>
|
|
199
|
-
<a class="mochidef reference" href="#fn-rstrip">rstrip(str, chars="\s")</a>:</p>
|
|
200
|
-
<blockquote>
|
|
201
|
-
<p>Returns a string based on <tt class="docutils literal"><span class="pre">str</span></tt> with trailing whitespace stripped.</p>
|
|
202
|
-
<p>If <tt class="docutils literal"><span class="pre">chars</span></tt> is given, then that expression will be used instead
|
|
203
|
-
of whitespace. <tt class="docutils literal"><span class="pre">chars</span></tt> should be a string suitable for use in a
|
|
204
|
-
<tt class="docutils literal"><span class="pre">RegExp</span></tt> <tt class="docutils literal"><span class="pre">[character</span> <span class="pre">set]</span></tt>.</p>
|
|
205
|
-
<dl class="docutils">
|
|
206
|
-
<dt><em>Availability</em>:</dt>
|
|
207
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
208
|
-
</dl>
|
|
209
|
-
</blockquote>
|
|
210
|
-
<p>
|
|
211
|
-
<a name="fn-strip"></a>
|
|
212
|
-
<a class="mochidef reference" href="#fn-strip">strip(str, chars="\s")</a>:</p>
|
|
213
|
-
<blockquote>
|
|
214
|
-
<p>Returns a string based on <tt class="docutils literal"><span class="pre">str</span></tt> with leading and trailing
|
|
215
|
-
whitespace stripped (equivalent to <a class="mochiref reference" href="#fn-lstrip">lstrip(rstrip(str,
|
|
216
|
-
chars), chars)</a>).</p>
|
|
217
|
-
<p>If <tt class="docutils literal"><span class="pre">chars</span></tt> is given, then that expression will be used instead
|
|
218
|
-
of whitespace. <tt class="docutils literal"><span class="pre">chars</span></tt> should be a string suitable for use in a
|
|
219
|
-
<tt class="docutils literal"><span class="pre">RegExp</span></tt> <tt class="docutils literal"><span class="pre">[character</span> <span class="pre">set]</span></tt>.</p>
|
|
220
|
-
<dl class="docutils">
|
|
221
|
-
<dt><em>Availability</em>:</dt>
|
|
222
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
223
|
-
</dl>
|
|
224
|
-
</blockquote>
|
|
225
|
-
<p>
|
|
226
|
-
<a name="fn-trunctofixed"></a>
|
|
227
|
-
<a class="mochidef reference" href="#fn-trunctofixed">truncToFixed(aNumber, precision)</a>:</p>
|
|
228
|
-
<blockquote>
|
|
229
|
-
<p>Return a string representation of <tt class="docutils literal"><span class="pre">aNumber</span></tt>, truncated to
|
|
230
|
-
<tt class="docutils literal"><span class="pre">precision</span></tt> digits with trailing zeros. This is similar to
|
|
231
|
-
<tt class="docutils literal"><span class="pre">aNumber.toFixed(precision)</span></tt>, but this truncates rather than
|
|
232
|
-
rounds and has implementation consistent behavior for numbers less
|
|
233
|
-
than 1. Specifically, <a class="mochiref reference" href="#fn-trunctofixed">truncToFixed(aNumber,
|
|
234
|
-
precision)</a> will always have a preceding <tt class="docutils literal"><span class="pre">0</span></tt> for numbers less
|
|
235
|
-
than <tt class="docutils literal"><span class="pre">1</span></tt>.</p>
|
|
236
|
-
<p>For example, <a class="mochiref reference" href="#fn-trunctofixed">truncToFixed(0.1357, 2)</a> returns <tt class="docutils literal"><span class="pre">0.13</span></tt>.</p>
|
|
237
|
-
<dl class="docutils">
|
|
238
|
-
<dt><em>Availability</em>:</dt>
|
|
239
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
240
|
-
</dl>
|
|
241
|
-
</blockquote>
|
|
242
|
-
<p>
|
|
243
|
-
<a name="fn-twodigitaverage"></a>
|
|
244
|
-
<a class="mochidef reference" href="#fn-twodigitaverage">twoDigitAverage(numerator, denominator)</a>:</p>
|
|
245
|
-
<blockquote>
|
|
246
|
-
<p>Calculate an average from a numerator and a denominator and return
|
|
247
|
-
it as a string rounded to a maximum precision of two fractional
|
|
248
|
-
digits (e.g. "1.23").</p>
|
|
249
|
-
<p>If the denominator is 0, "0" will be returned instead of <tt class="docutils literal"><span class="pre">NaN</span></tt>.</p>
|
|
250
|
-
<dl class="docutils">
|
|
251
|
-
<dt><em>Availability</em>:</dt>
|
|
252
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
253
|
-
</dl>
|
|
254
|
-
</blockquote>
|
|
255
|
-
<p>
|
|
256
|
-
<a name="fn-twodigitfloat"></a>
|
|
257
|
-
<a class="mochidef reference" href="#fn-twodigitfloat">twoDigitFloat(aNumber)</a>:</p>
|
|
258
|
-
<blockquote>
|
|
259
|
-
<p>Return a string representation of <tt class="docutils literal"><span class="pre">aNumber</span></tt>, rounded to a maximum
|
|
260
|
-
precision of 2 fractional digits. This is a variation of
|
|
261
|
-
<a class="mochiref reference" href="#fn-roundtofixed">roundToFixed(aNumber, 2)</a> that removes trailing zeros from
|
|
262
|
-
the fractional part.</p>
|
|
263
|
-
<p>For example, <tt class="docutils literal"><span class="pre">twoDigitFloat(0.1357)</span></tt> returns <tt class="docutils literal"><span class="pre">0.14</span></tt>
|
|
264
|
-
and <tt class="docutils literal"><span class="pre">twoDigitFloat(12.00)</span></tt> returns <tt class="docutils literal"><span class="pre">12</span></tt>.</p>
|
|
265
|
-
<p>In new code, you probably want to use:
|
|
266
|
-
<a class="mochiref reference" href="#fn-numberformatter">numberFormatter("#.##")(aNumber)</a> instead.</p>
|
|
267
|
-
<dl class="docutils">
|
|
268
|
-
<dt><em>Availability</em>:</dt>
|
|
269
|
-
<dd>Available in MochiKit 1.3.1+</dd>
|
|
270
|
-
</dl>
|
|
271
|
-
</blockquote>
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
274
|
-
<div class="section">
|
|
275
|
-
<h1><a id="see-also" name="see-also">See Also</a></h1>
|
|
276
|
-
<table class="docutils footnote" frame="void" id="id2" rules="none">
|
|
277
|
-
<colgroup><col class="label" /><col /></colgroup>
|
|
278
|
-
<tbody valign="top">
|
|
279
|
-
<tr><td class="label"><a class="fn-backref" href="#id1" name="id2">[1]</a></td><td>Java Number Format Pattern Syntax:
|
|
280
|
-
<a class="reference" href="http://java.sun.com/docs/books/tutorial/i18n/format/numberpattern.html">http://java.sun.com/docs/books/tutorial/i18n/format/numberpattern.html</a></td></tr>
|
|
281
|
-
</tbody>
|
|
282
|
-
</table>
|
|
283
|
-
</div>
|
|
284
|
-
<div class="section">
|
|
285
|
-
<h1><a id="authors" name="authors">Authors</a></h1>
|
|
286
|
-
<ul class="simple">
|
|
287
|
-
<li>Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>></li>
|
|
288
|
-
</ul>
|
|
289
|
-
</div>
|
|
290
|
-
<div class="section">
|
|
291
|
-
<h1><a id="copyright" name="copyright">Copyright</a></h1>
|
|
292
|
-
<p>Copyright 2005 Bob Ippolito <<a class="reference" href="mailto:bob@redivi.com">bob@redivi.com</a>>. This program is
|
|
293
|
-
dual-licensed free software; you can redistribute it and/or modify it
|
|
294
|
-
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
|
|
295
|
-
v2.1</a>.</p>
|
|
296
|
-
</div>
|
|
297
|
-
</div>
|
|
298
|
-
|
|
299
|
-
</body>
|
|
300
|
-
</html>
|