From 4f68a0933c4d1e6deb326e3d06713abfa895dc20 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 7 Nov 2006 23:15:57 +0000 Subject: [PATCH] added YUI and YUI-ext fixed the resizable text area with IE problem fixed the ad space with IE problem merged the 7.2.0 and 7.1.4 change logs --- docs/changelog/7.x.x.txt | 6 +- docs/upgrades/upgrade_7.1.3-7.2.0.pl | 22 +- lib/WebGUI/AdSpace.pm | 19 + lib/WebGUI/AdSpace/Ad.pm | 11 +- lib/WebGUI/Asset/Wobject/Matrix.pm | 32 +- lib/WebGUI/Form/Textarea.pm | 27 +- lib/WebGUI/Operation/AdSpace.pm | 11 +- lib/WebGUI/Session/Style.pm | 20 +- lib/WebGUI/i18n/English/Form_Textarea.pm | 12 - www/extras/yui-ext/README.txt | 8 + www/extras/yui-ext/animator-lib.js | 39 + www/extras/yui-ext/basic-grid-lib.js | 181 + www/extras/yui-ext/build/DomHelper-min.js | 28 + www/extras/yui-ext/build/Element-min.js | 48 + www/extras/yui-ext/build/EventManager-min.js | 28 + www/extras/yui-ext/build/State-min.js | 24 + www/extras/yui-ext/build/UpdateManager-min.js | 25 + www/extras/yui-ext/build/anim/Actor-min.js | 27 + www/extras/yui-ext/build/anim/Animator-min.js | 20 + .../build/data/AbstractDataModel-min.js | 10 + .../build/data/DefaultDataModel-min.js | 20 + .../yui-ext/build/data/JSONDataModel-min.js | 16 + .../build/data/LoadableDataModel-min.js | 20 + .../yui-ext/build/data/XMLDataModel-min.js | 26 + .../build/grid/AbstractColumnModel-min.js | 10 + .../build/grid/DefaultColumnModel-min.js | 20 + .../yui-ext/build/grid/EditorGrid-min.js | 10 + .../build/grid/EditorSelectionModel-min.js | 21 + www/extras/yui-ext/build/grid/Grid-min.js | 40 + www/extras/yui-ext/build/grid/GridDD-min.js | 10 + www/extras/yui-ext/build/grid/GridView-min.js | 47 + .../yui-ext/build/grid/PagedGridView-min.js | 12 + .../yui-ext/build/grid/SelectionModel-min.js | 18 + .../build/grid/editor/CellEditor-min.js | 12 + .../build/grid/editor/CheckboxEditor-min.js | 12 + .../build/grid/editor/DateEditor-min.js | 23 + .../build/grid/editor/NumberEditor-min.js | 19 + .../build/grid/editor/SelectEditor-min.js | 11 + .../build/grid/editor/TextEditor-min.js | 16 + .../yui-ext/build/widgets/DatePicker-min.js | 22 + .../yui-ext/build/widgets/Resizable-min.js | 17 + .../yui-ext/build/widgets/SplitBar-min.js | 24 + .../yui-ext/build/widgets/TabPanel-min.js | 17 + .../yui-ext/build/widgets/Toolbar-min.js | 12 + www/extras/yui-ext/build/yutil-min.js | 70 + www/extras/yui-ext/docs/Date.html | 530 + www/extras/yui-ext/docs/Function.html | 335 + .../yui-ext/docs/YAHOO.ext.Actor.Action.html | 202 + .../docs/YAHOO.ext.Actor.AsyncAction.html | 202 + .../docs/YAHOO.ext.Actor.PauseAction.html | 202 + www/extras/yui-ext/docs/YAHOO.ext.Actor.html | 1967 + .../docs/YAHOO.ext.Animator.AnimSequence.html | 485 + .../YAHOO.ext.Animator.CompositeSequence.html | 334 + .../yui-ext/docs/YAHOO.ext.Animator.html | 803 + .../yui-ext/docs/YAHOO.ext.DatePicker.html | 1084 + .../docs/YAHOO.ext.DomHelper.Template.html | 465 + .../yui-ext/docs/YAHOO.ext.DomHelper.html | 493 + .../yui-ext/docs/YAHOO.ext.Element.html | 3670 ++ .../yui-ext/docs/YAHOO.ext.EventManager.html | 412 + .../yui-ext/docs/YAHOO.ext.EventObject.html | 945 + .../yui-ext/docs/YAHOO.ext.Resizable.html | 142 + ...OO.ext.SplitBar.AbsoluteLayoutAdapter.html | 308 + ...YAHOO.ext.SplitBar.BasicLayoutAdapter.html | 295 + .../yui-ext/docs/YAHOO.ext.SplitBar.html | 725 + .../yui-ext/docs/YAHOO.ext.TabPanel.html | 636 + .../yui-ext/docs/YAHOO.ext.TabPanelItem.html | 516 + .../yui-ext/docs/YAHOO.ext.Toolbar.html | 311 + .../yui-ext/docs/YAHOO.ext.ToolbarButton.html | 311 + ...YAHOO.ext.UpdateManager.BasicRenderer.html | 218 + .../yui-ext/docs/YAHOO.ext.UpdateManager.html | 1026 + .../YAHOO.ext.grid.AbstractColumnModel.html | 674 + .../YAHOO.ext.grid.AbstractDataModel.html | 865 + .../docs/YAHOO.ext.grid.CellEditor.html | 464 + .../docs/YAHOO.ext.grid.CheckboxEditor.html | 365 + .../docs/YAHOO.ext.grid.DateEditor.html | 870 + .../YAHOO.ext.grid.DefaultColumnModel.html | 1183 + .../docs/YAHOO.ext.grid.DefaultDataModel.html | 838 + .../YAHOO.ext.grid.DefaultSelectionModel.html | 1169 + .../YAHOO.ext.grid.DisableSelectionModel.html | 234 + ...AHOO.ext.grid.EditorAndSelectionModel.html | 233 + .../YAHOO.ext.grid.EditorSelectionModel.html | 470 + .../yui-ext/docs/YAHOO.ext.grid.Grid.html | 1821 + .../yui-ext/docs/YAHOO.ext.grid.GridDD.html | 512 + .../yui-ext/docs/YAHOO.ext.grid.GridView.html | 1512 + .../docs/YAHOO.ext.grid.HeaderController.html | 333 + .../docs/YAHOO.ext.grid.JSONDataModel.html | 348 + .../YAHOO.ext.grid.LoadableDataModel.html | 1052 + .../docs/YAHOO.ext.grid.NumberEditor.html | 656 + .../docs/YAHOO.ext.grid.PagedGridView.html | 570 + .../docs/YAHOO.ext.grid.SelectEditor.html | 200 + .../YAHOO.ext.grid.SingleSelectionModel.html | 174 + .../docs/YAHOO.ext.grid.TextEditor.html | 522 + .../docs/YAHOO.ext.grid.XMLDataModel.html | 794 + www/extras/yui-ext/docs/YAHOO.ext.grid.html | 303 + www/extras/yui-ext/docs/YAHOO.ext.html | 208 + .../yui-ext/docs/YAHOO.ext.util.Bench.html | 387 + .../yui-ext/docs/YAHOO.ext.util.Browser.html | 201 + .../yui-ext/docs/YAHOO.ext.util.CSS.html | 378 + .../docs/YAHOO.ext.util.DelayedTask.html | 272 + .../docs/YAHOO.ext.util.Observable.html | 336 + www/extras/yui-ext/docs/YAHOO.ext.util.html | 160 + .../yui-ext/docs/YAHOO.util.CustomEvent.html | 164 + www/extras/yui-ext/docs/allclasses-frame.html | 145 + .../yui-ext/docs/allclasses-noframe.html | 372 + www/extras/yui-ext/docs/help-doc.html | 160 + www/extras/yui-ext/docs/index-all.html | 5321 ++ www/extras/yui-ext/docs/index.html | 27 + .../docs/overview-AbstractColumnModel.js.html | 34 + .../docs/overview-AbstractDataModel.js.html | 34 + .../yui-ext/docs/overview-Actor.js.html | 40 + .../yui-ext/docs/overview-Animator.js.html | 38 + .../yui-ext/docs/overview-CellEditor.js.html | 34 + .../docs/overview-CheckboxEditor.js.html | 34 + .../yui-ext/docs/overview-DateEditor.js.html | 34 + .../yui-ext/docs/overview-DatePicker.js.html | 34 + .../docs/overview-DefaultColumnModel.js.html | 34 + .../docs/overview-DefaultDataModel.js.html | 34 + .../yui-ext/docs/overview-DomHelper.js.html | 34 + .../yui-ext/docs/overview-EditorGrid.js.html | 32 + .../overview-EditorSelectionModel.js.html | 36 + .../yui-ext/docs/overview-Element.js.html | 34 + .../docs/overview-EventManager.js.html | 32 + www/extras/yui-ext/docs/overview-Grid.js.html | 34 + .../yui-ext/docs/overview-GridDD.js.html | 34 + .../yui-ext/docs/overview-GridView.js.html | 36 + .../docs/overview-JSONDataModel.js.html | 34 + .../docs/overview-LoadableDataModel.js.html | 34 + .../docs/overview-NumberEditor.js.html | 34 + .../docs/overview-PagedGridView.js.html | 34 + .../yui-ext/docs/overview-Resizable.js.html | 34 + .../docs/overview-SelectEditor.js.html | 34 + .../docs/overview-SelectionModel.js.html | 38 + .../yui-ext/docs/overview-SplitBar.js.html | 38 + .../yui-ext/docs/overview-State.js.html | 32 + .../yui-ext/docs/overview-TabPanel.js.html | 36 + .../yui-ext/docs/overview-TextEditor.js.html | 34 + .../yui-ext/docs/overview-Toolbar.js.html | 36 + .../docs/overview-UpdateManager.js.html | 36 + .../docs/overview-XMLDataModel.js.html | 34 + www/extras/yui-ext/docs/overview-frame.html | 107 + ...erview-summary-AbstractColumnModel.js.html | 170 + ...overview-summary-AbstractDataModel.js.html | 225 + .../docs/overview-summary-Actor.js.html | 738 + .../docs/overview-summary-Animator.js.html | 444 + .../docs/overview-summary-CellEditor.js.html | 150 + .../overview-summary-CheckboxEditor.js.html | 116 + .../docs/overview-summary-DateEditor.js.html | 306 + .../docs/overview-summary-DatePicker.js.html | 398 + ...verview-summary-DefaultColumnModel.js.html | 360 + .../overview-summary-DefaultDataModel.js.html | 369 + .../docs/overview-summary-DomHelper.js.html | 376 + .../docs/overview-summary-EditorGrid.js.html | 56 + ...rview-summary-EditorSelectionModel.js.html | 244 + .../docs/overview-summary-Element.js.html | 1307 + .../overview-summary-EventManager.js.html | 422 + .../docs/overview-summary-Grid.js.html | 789 + .../docs/overview-summary-GridDD.js.html | 168 + .../docs/overview-summary-GridView.js.html | 846 + .../overview-summary-JSONDataModel.js.html | 138 + ...overview-summary-LoadableDataModel.js.html | 405 + .../overview-summary-NumberEditor.js.html | 203 + .../overview-summary-PagedGridView.js.html | 207 + .../docs/overview-summary-Resizable.js.html | 280 + .../overview-summary-SelectEditor.js.html | 78 + .../overview-summary-SelectionModel.js.html | 499 + .../docs/overview-summary-SplitBar.js.html | 497 + .../docs/overview-summary-State.js.html | 218 + .../docs/overview-summary-TabPanel.js.html | 445 + .../docs/overview-summary-TextEditor.js.html | 154 + .../docs/overview-summary-Toolbar.js.html | 243 + .../overview-summary-UpdateManager.js.html | 488 + .../overview-summary-XMLDataModel.js.html | 297 + .../docs/overview-summary-yutil.js.html | 942 + www/extras/yui-ext/docs/overview-summary.html | 221 + www/extras/yui-ext/docs/overview-tree.html | 352 + .../yui-ext/docs/overview-yutil.js.html | 38 + www/extras/yui-ext/docs/stylesheet.css | 141 + www/extras/yui-ext/editor-grid-lib.js | 255 + www/extras/yui-ext/resizable-lib.js | 17 + www/extras/yui-ext/resources/css/grid.css | 660 + .../yui-ext/resources/css/reset-min.css | 7 + .../yui-ext/resources/css/resizable.css | 82 + www/extras/yui-ext/resources/css/tabs.css | 35 + www/extras/yui-ext/resources/css/toolbar.css | 53 + .../images/grid/arrow-left-white.gif | Bin 0 -> 825 bytes .../images/grid/arrow-right-white.gif | Bin 0 -> 825 bytes .../yui-ext/resources/images/grid/done.gif | Bin 0 -> 133 bytes .../yui-ext/resources/images/grid/drop-no.gif | Bin 0 -> 947 bytes .../resources/images/grid/drop-yes.gif | Bin 0 -> 860 bytes .../resources/images/grid/footer-bg.gif | Bin 0 -> 834 bytes .../resources/images/grid/grid-blue-hd.gif | Bin 0 -> 829 bytes .../resources/images/grid/grid-blue-split.gif | Bin 0 -> 817 bytes .../resources/images/grid/grid-loading.gif | Bin 0 -> 701 bytes .../resources/images/grid/grid-split.gif | Bin 0 -> 817 bytes .../resources/images/grid/grid-vista-hd.gif | Bin 0 -> 829 bytes .../resources/images/grid/invalid_line.gif | Bin 0 -> 815 bytes .../yui-ext/resources/images/grid/loading.gif | Bin 0 -> 771 bytes .../yui-ext/resources/images/grid/mso-hd.gif | Bin 0 -> 875 bytes .../yui-ext/resources/images/grid/nowait.gif | Bin 0 -> 884 bytes .../images/grid/page-first-disabled.gif | Bin 0 -> 925 bytes .../resources/images/grid/page-first.gif | Bin 0 -> 925 bytes .../images/grid/page-last-disabled.gif | Bin 0 -> 923 bytes .../resources/images/grid/page-last.gif | Bin 0 -> 923 bytes .../images/grid/page-next-disabled.gif | Bin 0 -> 875 bytes .../resources/images/grid/page-next.gif | Bin 0 -> 875 bytes .../images/grid/page-prev-disabled.gif | Bin 0 -> 879 bytes .../resources/images/grid/page-prev.gif | Bin 0 -> 879 bytes .../resources/images/grid/pick-button.gif | Bin 0 -> 1036 bytes .../yui-ext/resources/images/grid/refresh.gif | Bin 0 -> 1015 bytes .../resources/images/grid/sort_asc.gif | Bin 0 -> 826 bytes .../resources/images/grid/sort_desc.gif | Bin 0 -> 825 bytes .../yui-ext/resources/images/grid/wait.gif | Bin 0 -> 1100 bytes .../resources/images/sizer/e-handle-dark.gif | Bin 0 -> 1062 bytes .../resources/images/sizer/e-handle.gif | Bin 0 -> 1586 bytes .../resources/images/sizer/s-handle-dark.gif | Bin 0 -> 1060 bytes .../resources/images/sizer/s-handle.gif | Bin 0 -> 1314 bytes .../resources/images/sizer/se-handle-dark.gif | Bin 0 -> 838 bytes .../resources/images/sizer/se-handle.gif | Bin 0 -> 853 bytes .../images/tabs/tab-inactive-left-bg.gif | Bin 0 -> 875 bytes .../images/tabs/tab-inactive-right-bg.gif | Bin 0 -> 1602 bytes .../resources/images/tabs/tab-left-bg.gif | Bin 0 -> 877 bytes .../resources/images/tabs/tab-right-bg.gif | Bin 0 -> 1607 bytes www/extras/yui-ext/source/DomHelper.js | 329 + www/extras/yui-ext/source/Element.js | 1247 + www/extras/yui-ext/source/EventManager.js | 381 + www/extras/yui-ext/source/State.js | 176 + www/extras/yui-ext/source/UpdateManager.js | 418 + www/extras/yui-ext/source/anim/Actor.js | 665 + www/extras/yui-ext/source/anim/Animator.js | 367 + .../yui-ext/source/data/AbstractDataModel.js | 167 + .../yui-ext/source/data/DefaultDataModel.js | 311 + .../yui-ext/source/data/JSONDataModel.js | 83 + .../yui-ext/source/data/LoadableDataModel.js | 346 + .../yui-ext/source/data/XMLDataModel.js | 239 + .../source/grid/AbstractColumnModel.js | 111 + .../yui-ext/source/grid/DefaultColumnModel.js | 302 + www/extras/yui-ext/source/grid/EditorGrid.js | 15 + .../source/grid/EditorSelectionModel.js | 181 + www/extras/yui-ext/source/grid/Grid.js | 736 + www/extras/yui-ext/source/grid/GridDD.js | 109 + www/extras/yui-ext/source/grid/GridView.js | 791 + .../yui-ext/source/grid/PagedGridView.js | 148 + .../yui-ext/source/grid/SelectionModel.js | 431 + .../yui-ext/source/grid/editor/CellEditor.js | 92 + .../source/grid/editor/CheckboxEditor.js | 58 + .../yui-ext/source/grid/editor/DateEditor.js | 248 + .../source/grid/editor/NumberEditor.js | 145 + .../source/grid/editor/SelectEditor.js | 20 + .../yui-ext/source/grid/editor/TextEditor.js | 96 + .../yui-ext/source/widgets/DatePicker.js | 340 + .../yui-ext/source/widgets/Resizable.js | 222 + www/extras/yui-ext/source/widgets/SplitBar.js | 437 + www/extras/yui-ext/source/widgets/TabPanel.js | 394 + www/extras/yui-ext/source/widgets/Toolbar.js | 180 + www/extras/yui-ext/source/yutil.js | 870 + www/extras/yui-ext/splitbar-lib.js | 24 + www/extras/yui-ext/tabs-lib.js | 17 + www/extras/yui-ext/yui-ext-core.js | 183 + www/extras/yui-ext/yui-ext.js | 479 + www/extras/yui-ext/yui-ext.jsb | 187 + www/extras/yui/README | 110 + www/extras/yui/build/animation/README | 30 + .../yui/build/animation/animation-debug.js | 1261 + .../yui/build/animation/animation-min.js | 1 + www/extras/yui/build/animation/animation.js | 1255 + www/extras/yui/build/autocomplete/README | 40 + .../build/autocomplete/autocomplete-debug.js | 2788 + .../build/autocomplete/autocomplete-min.js | 175 + .../yui/build/autocomplete/autocomplete.js | 2756 + www/extras/yui/build/calendar/README | 30 + .../yui/build/calendar/assets/calendar.css | 161 + .../yui/build/calendar/assets/callt.gif | Bin 0 -> 93 bytes .../yui/build/calendar/assets/calrt.gif | Bin 0 -> 94 bytes www/extras/yui/build/calendar/assets/calx.gif | Bin 0 -> 88 bytes .../yui/build/calendar/calendar-debug.js | 2902 + www/extras/yui/build/calendar/calendar-min.js | 150 + www/extras/yui/build/calendar/calendar.js | 2860 + www/extras/yui/build/connection/README | 127 + .../yui/build/connection/connection-debug.js | 844 + .../yui/build/connection/connection-min.js | 88 + www/extras/yui/build/connection/connection.js | 814 + www/extras/yui/build/container/README | 68 + .../yui/build/container/assets/alrt16_1.gif | Bin 0 -> 971 bytes .../yui/build/container/assets/blck16_1.gif | Bin 0 -> 591 bytes .../yui/build/container/assets/close12_1.gif | Bin 0 -> 85 bytes .../yui/build/container/assets/container.css | 211 + .../yui/build/container/assets/hlp16_1.gif | Bin 0 -> 928 bytes .../yui/build/container/assets/info16_1.gif | Bin 0 -> 601 bytes .../yui/build/container/assets/tip16_1.gif | Bin 0 -> 552 bytes .../yui/build/container/assets/warn16_1.gif | Bin 0 -> 580 bytes .../yui/build/container/container-debug.js | 4003 ++ .../yui/build/container/container-min.js | 142 + www/extras/yui/build/container/container.js | 3963 ++ .../build/container/container_core-debug.js | 2278 + .../yui/build/container/container_core-min.js | 86 + .../yui/build/container/container_core.js | 2249 + www/extras/yui/build/dom/README | 61 + www/extras/yui/build/dom/dom-debug.js | 933 + www/extras/yui/build/dom/dom-min.js | 1 + www/extras/yui/build/dom/dom.js | 899 + www/extras/yui/build/dragdrop/README | 77 + .../yui/build/dragdrop/dragdrop-debug.js | 2827 + www/extras/yui/build/dragdrop/dragdrop-min.js | 2 + www/extras/yui/build/dragdrop/dragdrop.js | 2712 + www/extras/yui/build/event/README | 73 + www/extras/yui/build/event/event-debug.js | 1353 + www/extras/yui/build/event/event-min.js | 1 + www/extras/yui/build/event/event.js | 1326 + www/extras/yui/build/fonts/README | 9 + www/extras/yui/build/fonts/fonts-min.css | 2 + www/extras/yui/build/fonts/fonts.css | 34 + www/extras/yui/build/grids/README | 10 + www/extras/yui/build/grids/grids-min.css | 2 + www/extras/yui/build/grids/grids.css | 88 + www/extras/yui/build/logger/README | 27 + www/extras/yui/build/logger/assets/logger.css | 21 + www/extras/yui/build/logger/logger-debug.js | 1290 + www/extras/yui/build/logger/logger-min.js | 56 + www/extras/yui/build/logger/logger.js | 1290 + www/extras/yui/build/menu/README | 133 + www/extras/yui/build/menu/assets/menu.css | 299 + .../build/menu/assets/menuarodwn8_dim_1.gif | Bin 0 -> 53 bytes .../build/menu/assets/menuarodwn8_hov_1.gif | Bin 0 -> 53 bytes .../build/menu/assets/menuarodwn8_nrm_1.gif | Bin 0 -> 53 bytes .../build/menu/assets/menuarorght8_dim_1.gif | Bin 0 -> 54 bytes .../build/menu/assets/menuarorght8_hov_1.gif | Bin 0 -> 54 bytes .../build/menu/assets/menuarorght8_nrm_1.gif | Bin 0 -> 54 bytes .../yui/build/menu/assets/menuchk8_dim_1.gif | Bin 0 -> 65 bytes .../yui/build/menu/assets/menuchk8_hov_1.gif | Bin 0 -> 67 bytes .../yui/build/menu/assets/menuchk8_nrm_1.gif | Bin 0 -> 67 bytes www/extras/yui/build/menu/menu-debug.js | 5599 ++ www/extras/yui/build/menu/menu-min.js | 2 + www/extras/yui/build/menu/menu.js | 5313 ++ www/extras/yui/build/reset/README | 9 + www/extras/yui/build/reset/reset-min.css | 2 + www/extras/yui/build/reset/reset.css | 14 + www/extras/yui/build/slider/README | 33 + www/extras/yui/build/slider/slider-debug.js | 944 + www/extras/yui/build/slider/slider-min.js | 1 + www/extras/yui/build/slider/slider.js | 904 + www/extras/yui/build/treeview/README | 90 + www/extras/yui/build/treeview/assets/lm.gif | Bin 0 -> 94 bytes www/extras/yui/build/treeview/assets/lmh.gif | Bin 0 -> 106 bytes www/extras/yui/build/treeview/assets/ln.gif | Bin 0 -> 142 bytes .../yui/build/treeview/assets/loading.gif | Bin 0 -> 2673 bytes www/extras/yui/build/treeview/assets/lp.gif | Bin 0 -> 130 bytes www/extras/yui/build/treeview/assets/lph.gif | Bin 0 -> 111 bytes www/extras/yui/build/treeview/assets/tm.gif | Bin 0 -> 545 bytes www/extras/yui/build/treeview/assets/tmh.gif | Bin 0 -> 563 bytes www/extras/yui/build/treeview/assets/tn.gif | Bin 0 -> 504 bytes www/extras/yui/build/treeview/assets/tp.gif | Bin 0 -> 539 bytes www/extras/yui/build/treeview/assets/tph.gif | Bin 0 -> 568 bytes www/extras/yui/build/treeview/assets/tree.css | 103 + .../yui/build/treeview/assets/vline.gif | Bin 0 -> 503 bytes .../yui/build/treeview/treeview-debug.js | 2010 + www/extras/yui/build/treeview/treeview-min.js | 1 + www/extras/yui/build/treeview/treeview.js | 1967 + www/extras/yui/build/yahoo/README | 25 + www/extras/yui/build/yahoo/yahoo-debug.js | 107 + www/extras/yui/build/yahoo/yahoo-min.js | 1 + www/extras/yui/build/yahoo/yahoo.js | 107 + .../yui/docs/animation/YAHOO.util.Anim.html | 1131 + .../docs/animation/YAHOO.util.Anim.init.html | 277 + .../docs/animation/YAHOO.util.AnimMgr.html | 591 + .../yui/docs/animation/YAHOO.util.Bezier.html | 386 + .../docs/animation/YAHOO.util.ColorAnim.html | 601 + .../yui/docs/animation/YAHOO.util.Dom.html | 826 + .../yui/docs/animation/YAHOO.util.Easing.html | 1396 + .../yui/docs/animation/YAHOO.util.Motion.html | 609 + .../yui/docs/animation/YAHOO.util.Point.html | 457 + .../yui/docs/animation/YAHOO.util.Region.html | 710 + .../yui/docs/animation/YAHOO.util.Scroll.html | 388 + www/extras/yui/docs/animation/YAHOO.util.html | 330 + .../yui/docs/animation/allclasses-frame.html | 60 + .../docs/animation/allclasses-noframe.html | 235 + www/extras/yui/docs/animation/index-all.html | 711 + www/extras/yui/docs/animation/index.html | 213 + www/extras/yui/docs/animation/logo.gif | Bin 0 -> 705 bytes .../yui/docs/animation/overview-Anim.js.html | 25 + .../docs/animation/overview-AnimMgr.js.html | 13 + .../docs/animation/overview-Bezier.js.html | 13 + .../docs/animation/overview-ColorAnim.js.html | 25 + .../yui/docs/animation/overview-Dom.js.html | 13 + .../docs/animation/overview-Easing.js.html | 25 + .../docs/animation/overview-Motion.js.html | 25 + .../docs/animation/overview-Region.js.html | 30 + .../docs/animation/overview-Scroll.js.html | 25 + .../yui/docs/animation/overview-frame.html | 100 + .../animation/overview-summary-Anim.js.html | 624 + .../overview-summary-AnimMgr.js.html | 348 + .../animation/overview-summary-Bezier.js.html | 237 + .../overview-summary-ColorAnim.js.html | 349 + .../animation/overview-summary-Dom.js.html | 422 + .../animation/overview-summary-Easing.js.html | 438 + .../animation/overview-summary-Motion.js.html | 376 + .../animation/overview-summary-Region.js.html | 364 + .../animation/overview-summary-Scroll.js.html | 300 + .../yui/docs/animation/overview-summary.html | 255 + .../yui/docs/animation/overview-tree.html | 200 + www/extras/yui/docs/animation/stylesheet.css | 84 + .../yui/docs/assets/dpSyntaxHighlighter.css | 180 + .../yui/docs/assets/dpSyntaxHighlighter.js | 735 + www/extras/yui/docs/assets/examples.css | 79 + www/extras/yui/docs/assets/logo.gif | Bin 0 -> 705 bytes .../yui/docs/assets/yui-0.11-cheatsheets.zip | Bin 0 -> 1513071 bytes .../YAHOO.widget.AutoComplete.html | 1594 + .../autocomplete/YAHOO.widget.DS_JSArray.html | 409 + .../YAHOO.widget.DS_JSFunction.html | 409 + .../autocomplete/YAHOO.widget.DS_XHR.html | 739 + .../autocomplete/YAHOO.widget.DataSource.html | 819 + .../yui/docs/autocomplete/YAHOO.widget.html | 276 + .../docs/autocomplete/allclasses-frame.html | 50 + .../docs/autocomplete/allclasses-noframe.html | 166 + .../yui/docs/autocomplete/index-all.html | 805 + www/extras/yui/docs/autocomplete/index.html | 169 + www/extras/yui/docs/autocomplete/logo.gif | Bin 0 -> 705 bytes .../overview-AutoComplete.js.html | 25 + .../autocomplete/overview-DataSource.js.html | 40 + .../overview-summary-AutoComplete.js.html | 1982 + .../overview-summary-DataSource.js.html | 1184 + .../docs/autocomplete/overview-summary.html | 175 + .../yui/docs/autocomplete/overview-tree.html | 147 + .../yui/docs/autocomplete/stylesheet.css | 84 + .../docs/calendar/YAHOO.widget.Calendar.html | 451 + .../calendar/YAHOO.widget.Calendar2up.html | 699 + .../YAHOO.widget.Calendar2up_Cal.html | 385 + .../calendar/YAHOO.widget.CalendarGroup.html | 1354 + .../calendar/YAHOO.widget.Calendar_Core.html | 3831 ++ .../docs/calendar/YAHOO.widget.DateMath.html | 1114 + .../yui/docs/calendar/YAHOO.widget.html | 419 + .../yui/docs/calendar/allclasses-frame.html | 55 + .../yui/docs/calendar/allclasses-noframe.html | 198 + www/extras/yui/docs/calendar/index-all.html | 1395 + www/extras/yui/docs/calendar/index.html | 191 + www/extras/yui/docs/calendar/logo.gif | Bin 0 -> 705 bytes .../docs/calendar/overview-Calendar.js.html | 25 + .../calendar/overview-Calendar2up.js.html | 30 + .../calendar/overview-CalendarGroup.js.html | 25 + .../calendar/overview-Calendar_Core.js.html | 25 + .../docs/calendar/overview-DateMath.js.html | 13 + .../yui/docs/calendar/overview-frame.html | 85 + .../overview-summary-Calendar.js.html | 310 + .../overview-summary-Calendar2up.js.html | 467 + .../overview-summary-CalendarGroup.js.html | 658 + .../overview-summary-Calendar_Core.js.html | 2076 + .../overview-summary-DateMath.js.html | 482 + .../yui/docs/calendar/overview-summary.html | 187 + .../yui/docs/calendar/overview-tree.html | 173 + www/extras/yui/docs/calendar/stylesheet.css | 93 + .../docs/connection/YAHOO.util.Connect.html | 1278 + www/extras/yui/docs/connection/index-all.html | 362 + www/extras/yui/docs/connection/index.html | 141 + www/extras/yui/docs/connection/logo.gif | Bin 0 -> 705 bytes .../overview-summary-connection.js.html | 889 + .../yui/docs/connection/overview-tree.html | 99 + www/extras/yui/docs/connection/stylesheet.css | 93 + .../yui/docs/container/YAHOO.util.Config.html | 1219 + .../container/YAHOO.util.KeyListener.html | 627 + www/extras/yui/docs/container/YAHOO.util.html | 328 + .../YAHOO.widget.ContainerEffect.html | 954 + .../docs/container/YAHOO.widget.Dialog.html | 1290 + .../docs/container/YAHOO.widget.Module.html | 1949 + .../docs/container/YAHOO.widget.Overlay.html | 1700 + .../YAHOO.widget.OverlayManager.html | 890 + .../docs/container/YAHOO.widget.Panel.html | 1250 + .../container/YAHOO.widget.SimpleDialog.html | 854 + .../docs/container/YAHOO.widget.Tooltip.html | 932 + .../yui/docs/container/YAHOO.widget.html | 358 + .../yui/docs/container/allclasses-frame.html | 74 + .../docs/container/allclasses-noframe.html | 271 + www/extras/yui/docs/container/index-all.html | 2001 + www/extras/yui/docs/container/index.html | 234 + www/extras/yui/docs/container/logo.gif | Bin 0 -> 705 bytes .../docs/container/overview-Config.js.html | 25 + .../overview-ContainerEffect.js.html | 25 + .../docs/container/overview-Dialog.js.html | 25 + .../container/overview-KeyListener.js.html | 25 + .../docs/container/overview-Module.js.html | 25 + .../docs/container/overview-Overlay.js.html | 25 + .../container/overview-OverlayEffect.js.html | 25 + .../container/overview-OverlayManager.js.html | 25 + .../yui/docs/container/overview-Panel.js.html | 25 + .../container/overview-SimpleDialog.js.html | 25 + .../docs/container/overview-Tooltip.js.html | 25 + .../yui/docs/container/overview-frame.html | 135 + .../container/overview-summary-Config.js.html | 706 + .../overview-summary-ContainerEffect.js.html | 539 + .../container/overview-summary-Dialog.js.html | 764 + .../overview-summary-KeyListener.js.html | 408 + .../container/overview-summary-Module.js.html | 965 + .../overview-summary-Overlay.js.html | 998 + .../overview-summary-OverlayManager.js.html | 527 + .../container/overview-summary-Panel.js.html | 782 + .../overview-summary-SimpleDialog.js.html | 416 + .../overview-summary-Tooltip.js.html | 551 + .../yui/docs/container/overview-summary.html | 296 + .../yui/docs/container/overview-tree.html | 236 + www/extras/yui/docs/container/stylesheet.css | 93 + www/extras/yui/docs/dom/YAHOO.util.Dom.html | 1404 + www/extras/yui/docs/dom/YAHOO.util.Point.html | 451 + .../yui/docs/dom/YAHOO.util.Region.html | 704 + www/extras/yui/docs/dom/YAHOO.util.html | 266 + www/extras/yui/docs/dom/allclasses-frame.html | 37 + .../yui/docs/dom/allclasses-noframe.html | 154 + www/extras/yui/docs/dom/index-all.html | 502 + www/extras/yui/docs/dom/index.html | 159 + www/extras/yui/docs/dom/logo.gif | Bin 0 -> 705 bytes www/extras/yui/docs/dom/overview-Dom.js.html | 25 + .../yui/docs/dom/overview-Region.js.html | 30 + www/extras/yui/docs/dom/overview-frame.html | 55 + .../yui/docs/dom/overview-summary-Dom.js.html | 896 + .../docs/dom/overview-summary-Region.js.html | 387 + www/extras/yui/docs/dom/overview-summary.html | 166 + www/extras/yui/docs/dom/overview-tree.html | 133 + www/extras/yui/docs/dom/stylesheet.css | 84 + .../yui/docs/dragdrop/YAHOO.util.DD.html | 765 + .../yui/docs/dragdrop/YAHOO.util.DDProxy.html | 758 + .../docs/dragdrop/YAHOO.util.DDTarget.html | 369 + .../docs/dragdrop/YAHOO.util.DragDrop.html | 2378 + .../docs/dragdrop/YAHOO.util.DragDropMgr.html | 1871 + www/extras/yui/docs/dragdrop/YAHOO.util.html | 289 + .../yui/docs/dragdrop/allclasses-frame.html | 50 + .../yui/docs/dragdrop/allclasses-noframe.html | 179 + www/extras/yui/docs/dragdrop/index-all.html | 835 + www/extras/yui/docs/dragdrop/index.html | 182 + www/extras/yui/docs/dragdrop/logo.gif | Bin 0 -> 705 bytes .../yui/docs/dragdrop/overview-DD.js.html | 25 + .../docs/dragdrop/overview-DDProxy.js.html | 25 + .../docs/dragdrop/overview-DDTarget.js.html | 25 + .../docs/dragdrop/overview-DragDrop.js.html | 25 + .../dragdrop/overview-DragDropMgr.js.html | 25 + .../docs/dragdrop/overview-summary-DD.js.html | 531 + .../dragdrop/overview-summary-DDProxy.js.html | 437 + .../overview-summary-DDTarget.js.html | 243 + .../overview-summary-DragDrop.js.html | 902 + .../overview-summary-DragDropMgr.js.html | 1083 + .../yui/docs/dragdrop/overview-summary.html | 209 + .../yui/docs/dragdrop/overview-tree.html | 160 + www/extras/yui/docs/dragdrop/stylesheet.css | 84 + .../docs/event/YAHOO.util.CustomEvent.html | 617 + .../yui/docs/event/YAHOO.util.Event.html | 1381 + .../yui/docs/event/YAHOO.util.Subscriber.html | 464 + www/extras/yui/docs/event/YAHOO.util.html | 254 + .../yui/docs/event/allclasses-frame.html | 40 + .../yui/docs/event/allclasses-noframe.html | 142 + www/extras/yui/docs/event/index-all.html | 512 + www/extras/yui/docs/event/index.html | 157 + www/extras/yui/docs/event/logo.gif | Bin 0 -> 705 bytes .../docs/event/overview-CustomEvent.js.html | 30 + .../yui/docs/event/overview-Event.js.html | 25 + .../overview-summary-CustomEvent.js.html | 400 + .../docs/event/overview-summary-Event.js.html | 847 + .../yui/docs/event/overview-summary.html | 163 + www/extras/yui/docs/event/overview-tree.html | 127 + www/extras/yui/docs/event/stylesheet.css | 84 + .../docs/logger/YAHOO.widget.LogReader.html | 803 + .../docs/logger/YAHOO.widget.LogWriter.html | 440 + www/extras/yui/docs/logger/YAHOO.widget.html | 251 + .../yui/docs/logger/allclasses-frame.html | 35 + .../yui/docs/logger/allclasses-noframe.html | 138 + www/extras/yui/docs/logger/index-all.html | 372 + www/extras/yui/docs/logger/index.html | 159 + www/extras/yui/docs/logger/logo.gif | Bin 0 -> 705 bytes .../docs/logger/overview-LogReader.js.html | 25 + .../docs/logger/overview-LogWriter.js.html | 25 + .../yui/docs/logger/overview-Logger.js.html | 13 + .../logger/overview-summary-LogReader.js.html | 1037 + .../logger/overview-summary-LogWriter.js.html | 268 + .../logger/overview-summary-Logger.js.html | 457 + .../yui/docs/logger/overview-summary.html | 172 + www/extras/yui/docs/logger/overview-tree.html | 125 + www/extras/yui/docs/logger/stylesheet.css | 84 + .../docs/menu/YAHOO.widget.ContextMenu.html | 544 + .../menu/YAHOO.widget.ContextMenuItem.html | 418 + .../yui/docs/menu/YAHOO.widget.Menu.html | 440 + .../yui/docs/menu/YAHOO.widget.MenuBar.html | 447 + .../docs/menu/YAHOO.widget.MenuBarItem.html | 527 + .../yui/docs/menu/YAHOO.widget.MenuItem.html | 755 + .../docs/menu/YAHOO.widget.MenuModule.html | 1393 + .../menu/YAHOO.widget.MenuModuleItem.html | 1944 + .../yui/docs/menu/allclasses-frame.html | 60 + .../yui/docs/menu/allclasses-noframe.html | 219 + www/extras/yui/docs/menu/index-all.html | 1080 + www/extras/yui/docs/menu/index.html | 210 + www/extras/yui/docs/menu/logo.gif | Bin 0 -> 705 bytes .../docs/menu/overview-contextmenu.js.html | 25 + .../menu/overview-contextmenuitem.js.html | 25 + .../yui/docs/menu/overview-menu.js.html | 23 + .../yui/docs/menu/overview-menubar.js.html | 25 + .../docs/menu/overview-menubaritem.js.html | 25 + .../yui/docs/menu/overview-menuitem.js.html | 23 + .../yui/docs/menu/overview-menumodule.js.html | 23 + .../docs/menu/overview-menumoduleitem.js.html | 23 + .../menu/overview-summary-contextmenu.js.html | 545 + .../overview-summary-contextmenuitem.js.html | 319 + .../docs/menu/overview-summary-menu.js.html | 447 + .../menu/overview-summary-menubar.js.html | 341 + .../menu/overview-summary-menubaritem.js.html | 447 + .../menu/overview-summary-menuitem.js.html | 847 + .../menu/overview-summary-menumodule.js.html | 2624 + .../overview-summary-menumoduleitem.js.html | 1926 + .../yui/docs/menu/overview-summary.html | 259 + www/extras/yui/docs/menu/overview-tree.html | 204 + www/extras/yui/docs/menu/stylesheet.css | 93 + .../yui/docs/slider/YAHOO.widget.Slider.html | 1260 + .../docs/slider/YAHOO.widget.SliderThumb.html | 763 + www/extras/yui/docs/slider/YAHOO.widget.html | 239 + .../yui/docs/slider/allclasses-frame.html | 35 + .../yui/docs/slider/allclasses-noframe.html | 126 + www/extras/yui/docs/slider/index-all.html | 479 + www/extras/yui/docs/slider/index.html | 147 + www/extras/yui/docs/slider/logo.gif | Bin 0 -> 705 bytes .../slider/overview-summary-Slider.js.html | 1098 + .../yui/docs/slider/overview-summary.html | 146 + www/extras/yui/docs/slider/overview-tree.html | 119 + www/extras/yui/docs/slider/stylesheet.css | 84 + .../docs/treeview/YAHOO.widget.HTMLNode.html | 634 + .../docs/treeview/YAHOO.widget.MenuNode.html | 451 + .../yui/docs/treeview/YAHOO.widget.Node.html | 2207 + .../docs/treeview/YAHOO.widget.RootNode.html | 507 + .../docs/treeview/YAHOO.widget.TVAnim.html | 311 + .../docs/treeview/YAHOO.widget.TVFadeIn.html | 508 + .../docs/treeview/YAHOO.widget.TVFadeOut.html | 508 + .../docs/treeview/YAHOO.widget.TextNode.html | 680 + .../docs/treeview/YAHOO.widget.TreeView.html | 1576 + .../yui/docs/treeview/YAHOO.widget.html | 351 + .../yui/docs/treeview/allclasses-frame.html | 70 + .../yui/docs/treeview/allclasses-noframe.html | 245 + www/extras/yui/docs/treeview/index-all.html | 1196 + www/extras/yui/docs/treeview/index.html | 224 + www/extras/yui/docs/treeview/logo.gif | Bin 0 -> 705 bytes .../docs/treeview/overview-HTMLNode.js.html | 25 + .../docs/treeview/overview-MenuNode.js.html | 25 + .../yui/docs/treeview/overview-Node.js.html | 25 + .../docs/treeview/overview-RootNode.js.html | 25 + .../yui/docs/treeview/overview-TVAnim.js.html | 25 + .../docs/treeview/overview-TVFadeIn.js.html | 25 + .../docs/treeview/overview-TVFadeOut.js.html | 25 + .../docs/treeview/overview-TextNode.js.html | 25 + .../docs/treeview/overview-TreeView.js.html | 25 + .../overview-summary-HTMLNode.js.html | 379 + .../overview-summary-MenuNode.js.html | 288 + .../treeview/overview-summary-Node.js.html | 1169 + .../overview-summary-RootNode.js.html | 293 + .../treeview/overview-summary-TVAnim.js.html | 306 + .../overview-summary-TVFadeIn.js.html | 321 + .../overview-summary-TVFadeOut.js.html | 318 + .../overview-summary-TextNode.js.html | 432 + .../overview-summary-TreeView.js.html | 805 + .../yui/docs/treeview/overview-summary.html | 279 + .../yui/docs/treeview/overview-tree.html | 218 + www/extras/yui/docs/treeview/stylesheet.css | 84 + www/extras/yui/docs/yahoo/YAHOO.html | 423 + .../yui/docs/yahoo/allclasses-frame.html | 35 + .../yui/docs/yahoo/allclasses-noframe.html | 128 + www/extras/yui/docs/yahoo/index-all.html | 191 + www/extras/yui/docs/yahoo/index.html | 149 + www/extras/yui/docs/yahoo/logo.gif | Bin 0 -> 705 bytes .../docs/yahoo/overview-summary-YAHOO.js.html | 241 + .../yui/docs/yahoo/overview-summary.html | 148 + www/extras/yui/docs/yahoo/overview-tree.html | 118 + www/extras/yui/docs/yahoo/stylesheet.css | 84 + .../yui/examples/animation/anim_basic.html | 30 + .../yui/examples/animation/anim_from.html | 29 + .../yui/examples/animation/anim_size.html | 35 + .../examples/animation/anim_size_plus.html | 36 + .../animation/anim_size_plus_alt.html | 38 + .../yui/examples/animation/anim_units.html | 29 + www/extras/yui/examples/animation/colors.html | 39 + .../yui/examples/animation/css/anim.css | 87 + .../yui/examples/animation/css/demo.css | 95 + www/extras/yui/examples/animation/easing.html | 30 + www/extras/yui/examples/animation/fade.html | 29 + .../yui/examples/animation/img/logo.gif | Bin 0 -> 705 bytes www/extras/yui/examples/animation/index.html | 38 + .../yui/examples/animation/motion_basic.html | 31 + .../yui/examples/animation/motion_by.html | 30 + .../examples/animation/motion_control.html | 38 + .../examples/animation/motion_controls.html | 39 + .../yui/examples/animation/motion_plus.html | 40 + .../yui/examples/animation/scroll_by.html | 30 + .../yui/examples/animation/scroll_horiz.html | 34 + .../yui/examples/animation/scroll_vert.html | 34 + .../examples/autocomplete/css/examples.css | 23 + .../yui/examples/autocomplete/customize.html | 350 + .../yui/examples/autocomplete/flickr_xml.html | 210 + .../yui/examples/autocomplete/img/logo.gif | Bin 0 -> 705 bytes .../yui/examples/autocomplete/index.html | 32 + .../yui/examples/autocomplete/js/json.js | 150 + .../autocomplete/js/states_jsfunction.js | 107 + .../autocomplete/php/flickr_proxy.php | 33 + .../autocomplete/php/ysearch_flat.php | 44109 ++++++++++++++++ .../autocomplete/php/ysearch_proxy.php | 45 + .../examples/autocomplete/states_jsarray.html | 675 + .../autocomplete/states_jsfunction.html | 273 + .../examples/autocomplete/ysearch_flat.html | 281 + .../examples/autocomplete/ysearch_json.html | 167 + .../examples/autocomplete/ysearch_xml.html | 164 + .../yui/examples/calendar/css/examples.css | 70 + .../examples/calendar/default/img/callt.gif | Bin 0 -> 93 bytes .../examples/calendar/default/img/calrt.gif | Bin 0 -> 94 bytes .../examples/calendar/default/img/calx.gif | Bin 0 -> 88 bytes .../yui/examples/calendar/default/index.html | 76 + .../calendar/default_2up/img/callt.gif | Bin 0 -> 93 bytes .../calendar/default_2up/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/default_2up/img/calx.gif | Bin 0 -> 88 bytes .../calendar/default_2up/img/ytravel.gif | Bin 0 -> 53117 bytes .../examples/calendar/default_2up/index.html | 396 + .../yui/examples/calendar/events/index.html | 92 + www/extras/yui/examples/calendar/img/logo.gif | Bin 0 -> 705 bytes .../yui/examples/calendar/img/pdate.gif | Bin 0 -> 167 bytes www/extras/yui/examples/calendar/index.html | 37 + .../calendar/intl_germany/css/Calendar_DE.css | 7 + .../calendar/intl_germany/img/callt.gif | Bin 0 -> 93 bytes .../calendar/intl_germany/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/intl_germany/img/calx.gif | Bin 0 -> 88 bytes .../calendar/intl_germany/img/ytravel.gif | Bin 0 -> 87208 bytes .../examples/calendar/intl_germany/index.html | 451 + .../intl_germany/js/Calendar2up_DE.js | 36 + .../calendar/intl_japan/css/Calendar_JP.css | 15 + .../calendar/intl_japan/img/callt.gif | Bin 0 -> 93 bytes .../calendar/intl_japan/img/calrt.gif | Bin 0 -> 94 bytes .../examples/calendar/intl_japan/img/calx.gif | Bin 0 -> 88 bytes .../calendar/intl_japan/img/ytravel.gif | Bin 0 -> 39993 bytes .../examples/calendar/intl_japan/index.html | 237 + .../calendar/intl_japan/js/Calendar2up_JP.js | 36 + .../calendar/min_max_date/img/callt.gif | Bin 0 -> 93 bytes .../calendar/min_max_date/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/min_max_date/img/calx.gif | Bin 0 -> 88 bytes .../examples/calendar/min_max_date/index.html | 80 + .../calendar/multi_select/img/callt.gif | Bin 0 -> 93 bytes .../calendar/multi_select/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/multi_select/img/calx.gif | Bin 0 -> 88 bytes .../examples/calendar/multi_select/index.html | 72 + .../calendar/multi_select_2up/img/callt.gif | Bin 0 -> 93 bytes .../calendar/multi_select_2up/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/multi_select_2up/img/calx.gif | Bin 0 -> 88 bytes .../calendar/multi_select_2up/index.html | 85 + .../examples/calendar/renderer/img/callt.gif | Bin 0 -> 93 bytes .../examples/calendar/renderer/img/calrt.gif | Bin 0 -> 94 bytes .../examples/calendar/renderer/img/calx.gif | Bin 0 -> 88 bytes .../yui/examples/calendar/renderer/index.html | 90 + .../calendar/restriction/img/callt.gif | Bin 0 -> 93 bytes .../calendar/restriction/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/restriction/img/calx.gif | Bin 0 -> 88 bytes .../examples/calendar/restriction/index.html | 75 + .../calendar/row_highlight/img/callt.gif | Bin 0 -> 93 bytes .../calendar/row_highlight/img/calrt.gif | Bin 0 -> 94 bytes .../calendar/row_highlight/img/calx.gif | Bin 0 -> 88 bytes .../calendar/row_highlight/index.html | 159 + www/extras/yui/examples/connection/abort.html | 112 + www/extras/yui/examples/connection/get.html | 123 + www/extras/yui/examples/connection/index.html | 23 + .../yui/examples/connection/php/get.php | 3 + .../yui/examples/connection/php/post.php | 3 + .../yui/examples/connection/php/sync.php | 18 + .../yui/examples/connection/php/weather.php | 19 + www/extras/yui/examples/connection/post.html | 102 + .../yui/examples/connection/weather.html | 138 + .../examples/container/css/ResizePanel.css | 14 + .../yui/examples/container/css/example.css | 187 + .../yui/examples/container/css/module.css | 65 + .../yui/examples/container/css/panel-aqua.css | 77 + .../yui/examples/container/css/panel-xp.css | 104 + .../yui/examples/container/css/photobox.css | 82 + www/extras/yui/examples/container/dialog.html | 130 + .../yui/examples/container/img/aqua-bg.gif | Bin 0 -> 101 bytes .../yui/examples/container/img/aqua-hd-bg.gif | Bin 0 -> 268 bytes .../container/img/aqua-hd-close-over.gif | Bin 0 -> 1140 bytes .../examples/container/img/aqua-hd-close.gif | Bin 0 -> 1140 bytes .../yui/examples/container/img/aqua-hd-lt.gif | Bin 0 -> 338 bytes .../yui/examples/container/img/aqua-hd-rt.gif | Bin 0 -> 340 bytes www/extras/yui/examples/container/img/bg.png | Bin 0 -> 360 bytes www/extras/yui/examples/container/img/ctx.gif | Bin 0 -> 4946 bytes .../yui/examples/container/img/xp-bl.gif | Bin 0 -> 330 bytes .../examples/container/img/xp-border-rt.gif | Bin 0 -> 54 bytes .../yui/examples/container/img/xp-br.gif | Bin 0 -> 322 bytes .../yui/examples/container/img/xp-brdr-lt.gif | Bin 0 -> 54 bytes .../yui/examples/container/img/xp-brdr-rt.gif | Bin 0 -> 302 bytes .../yui/examples/container/img/xp-close.gif | Bin 0 -> 1235 bytes .../yui/examples/container/img/xp-ft.gif | Bin 0 -> 190 bytes .../yui/examples/container/img/xp-hd.gif | Bin 0 -> 193 bytes .../yui/examples/container/img/xp-tl.gif | Bin 0 -> 598 bytes .../yui/examples/container/img/xp-tr.gif | Bin 0 -> 598 bytes .../yui/examples/container/img/ybox-back.gif | Bin 0 -> 145 bytes .../yui/examples/container/img/ybox-close.gif | Bin 0 -> 177 bytes .../yui/examples/container/img/ybox-next.gif | Bin 0 -> 145 bytes www/extras/yui/examples/container/index.html | 62 + .../yui/examples/container/js/PanelEffect.js | 202 + .../yui/examples/container/js/PhotoBox.js | 246 + .../yui/examples/container/js/ResizePanel.js | 105 + .../yui/examples/container/keylistener.html | 62 + www/extras/yui/examples/container/module.html | 220 + .../examples/container/overlay-manager.html | 374 + .../yui/examples/container/overlay.html | 373 + .../yui/examples/container/panel-aqua.html | 61 + .../yui/examples/container/panel-photo.html | 66 + .../yui/examples/container/panel-resize.html | 59 + .../yui/examples/container/panel-wait.html | 88 + .../yui/examples/container/panel-xp.html | 65 + www/extras/yui/examples/container/panel.html | 321 + .../yui/examples/container/php/post.php | 32 + .../yui/examples/container/php/somedata.php | 8 + .../yui/examples/container/simpledialog.html | 86 + .../yui/examples/container/tooltip.html | 54 + www/extras/yui/examples/dom/addclass.html | 38 + www/extras/yui/examples/dom/css/dom.css | 79 + .../examples/dom/getelementsbyclassname.html | 49 + www/extras/yui/examples/dom/getstyle.html | 40 + www/extras/yui/examples/dom/getxy.html | 41 + www/extras/yui/examples/dom/hasclass.html | 37 + www/extras/yui/examples/dom/img/logo.gif | Bin 0 -> 705 bytes www/extras/yui/examples/dom/index.html | 27 + www/extras/yui/examples/dom/removeclass.html | 38 + www/extras/yui/examples/dom/setstyle.html | 38 + www/extras/yui/examples/dom/setxy.html | 39 + www/extras/yui/examples/dragdrop/css/ie.css | 1 + .../yui/examples/dragdrop/css/screen.css | 301 + www/extras/yui/examples/dragdrop/drag.html | 201 + www/extras/yui/examples/dragdrop/grid.html | 178 + .../yui/examples/dragdrop/img/GREYBG.PNG | Bin 0 -> 200 bytes .../yui/examples/dragdrop/img/HEADER.GIF | Bin 0 -> 203 bytes .../yui/examples/dragdrop/img/bullet.gif | Bin 0 -> 172 bytes .../yui/examples/dragdrop/img/channel.png | Bin 0 -> 3468 bytes www/extras/yui/examples/dragdrop/img/grid.png | Bin 0 -> 450 bytes .../yui/examples/dragdrop/img/hline.png | Bin 0 -> 416 bytes .../yui/examples/dragdrop/img/horizBg.png | Bin 0 -> 519 bytes .../yui/examples/dragdrop/img/horizSlider.png | Bin 0 -> 1115 bytes .../examples/dragdrop/img/horizSlider_on.png | Bin 0 -> 1117 bytes www/extras/yui/examples/dragdrop/img/hue.png | Bin 0 -> 1344 bytes www/extras/yui/examples/dragdrop/img/logo.gif | Bin 0 -> 705 bytes .../yui/examples/dragdrop/img/lthumb.png | Bin 0 -> 1191 bytes .../yui/examples/dragdrop/img/navHover2.png | Bin 0 -> 875 bytes .../yui/examples/dragdrop/img/pickerbg.png | Bin 0 -> 12421 bytes .../yui/examples/dragdrop/img/qbottom.png | Bin 0 -> 1351 bytes .../yui/examples/dragdrop/img/qmiddle.png | Bin 0 -> 385 bytes www/extras/yui/examples/dragdrop/img/qtop.png | Bin 0 -> 2030 bytes .../yui/examples/dragdrop/img/select.gif | Bin 0 -> 78 bytes .../yui/examples/dragdrop/img/select.png | Bin 0 -> 192 bytes .../yui/examples/dragdrop/img/sortList.png | Bin 0 -> 298 bytes www/extras/yui/examples/dragdrop/img/sq1.png | Bin 0 -> 9253 bytes www/extras/yui/examples/dragdrop/img/sq2.png | Bin 0 -> 9475 bytes www/extras/yui/examples/dragdrop/img/sq3.png | Bin 0 -> 10264 bytes .../yui/examples/dragdrop/img/vertBg.png | Bin 0 -> 572 bytes .../yui/examples/dragdrop/img/vertSlider.png | Bin 0 -> 1112 bytes .../examples/dragdrop/img/vertSlider_on.png | Bin 0 -> 1160 bytes .../yui/examples/dragdrop/img/vline.png | Bin 0 -> 481 bytes www/extras/yui/examples/dragdrop/index.html | 74 + .../yui/examples/dragdrop/interface.html | 147 + www/extras/yui/examples/dragdrop/js/DDList.js | 102 + www/extras/yui/examples/dragdrop/js/DDMy.js | 48 + www/extras/yui/examples/dragdrop/js/DDMy2.js | 62 + .../yui/examples/dragdrop/js/DDOnTop.js | 49 + .../yui/examples/dragdrop/js/DDPlayer.js | 169 + .../yui/examples/dragdrop/js/DDResize.js | 46 + .../yui/examples/dragdrop/js/DDResize2.js | 106 + www/extras/yui/examples/dragdrop/js/DDSwap.js | 170 + www/extras/yui/examples/dragdrop/js/color.js | 101 + www/extras/yui/examples/dragdrop/js/key.js | 34 + www/extras/yui/examples/dragdrop/js/log.js | 20 + www/extras/yui/examples/dragdrop/list.html | 206 + .../yui/examples/dragdrop/multihandle.html | 162 + www/extras/yui/examples/dragdrop/ontop.html | 204 + www/extras/yui/examples/dragdrop/proxy.html | 278 + www/extras/yui/examples/dragdrop/resize.html | 191 + www/extras/yui/examples/dragdrop/slider.html | 576 + .../yui/examples/dragdrop/targetable.html | 215 + www/extras/yui/examples/fonts/default.html | 13 + www/extras/yui/examples/fonts/fontfamily.html | 23 + www/extras/yui/examples/fonts/fontsize.html | 23 + www/extras/yui/examples/grids/example_t1.html | 66 + .../yui/examples/grids/example_t2-g1.html | 73 + .../yui/examples/grids/example_t2-g10.html | 92 + .../yui/examples/grids/example_t2-g2.html | 89 + .../yui/examples/grids/example_t2-g3.html | 103 + .../yui/examples/grids/example_t2-g4.html | 93 + .../yui/examples/grids/example_t2-g5.html | 93 + .../yui/examples/grids/example_t2-g6.html | 120 + .../yui/examples/grids/example_t2-g7.html | 107 + .../yui/examples/grids/example_t2-g8.html | 107 + .../yui/examples/grids/example_t2-g9.html | 93 + www/extras/yui/examples/grids/example_t2.html | 66 + www/extras/yui/examples/grids/example_t3.html | 66 + www/extras/yui/examples/grids/example_t4.html | 66 + www/extras/yui/examples/grids/example_t5.html | 66 + www/extras/yui/examples/grids/example_t6.html | 66 + www/extras/yui/examples/grids/example_t7.html | 55 + .../yui/examples/logger/autocomplete.html | 185 + .../yui/examples/logger/css/examples.css | 18 + www/extras/yui/examples/logger/img/logo.gif | Bin 0 -> 705 bytes www/extras/yui/examples/logger/index.html | 29 + .../yui/examples/logger/js/animation-debug.js | 972 + .../examples/logger/js/autocomplete-debug.js | 2738 + .../yui/examples/logger/js/event-debug.js | 1180 + www/extras/yui/examples/logger/readlogs.html | 135 + .../yui/examples/logger/readlogscustom.html | 180 + www/extras/yui/examples/logger/writelogs.html | 175 + .../yui/examples/menu/applicationmenubar.html | 434 + www/extras/yui/examples/menu/contextmenu.html | 380 + www/extras/yui/examples/menu/example01.html | 71 + www/extras/yui/examples/menu/example02.html | 88 + www/extras/yui/examples/menu/example03.html | 83 + www/extras/yui/examples/menu/example04.html | 161 + www/extras/yui/examples/menu/example05.html | 86 + www/extras/yui/examples/menu/example06.html | 164 + www/extras/yui/examples/menu/example07.html | 151 + www/extras/yui/examples/menu/example08.html | 119 + www/extras/yui/examples/menu/example09.html | 134 + www/extras/yui/examples/menu/example10.html | 194 + www/extras/yui/examples/menu/example11.html | 123 + www/extras/yui/examples/menu/example12.html | 166 + www/extras/yui/examples/menu/example13.html | 292 + www/extras/yui/examples/menu/img/dolly.jpg | Bin 0 -> 4244 bytes www/extras/yui/examples/menu/index.html | 71 + .../yui/examples/menu/leftnavfromjs.html | 404 + .../yui/examples/menu/leftnavfrommarkup.html | 324 + .../yui/examples/menu/programsmenu.html | 416 + .../yui/examples/menu/topnavfromjs.html | 490 + .../yui/examples/menu/topnavfrommarkup.html | 409 + www/extras/yui/examples/slider/basic.html | 215 + www/extras/yui/examples/slider/css/screen.css | 282 + www/extras/yui/examples/slider/img/bullet.gif | Bin 0 -> 172 bytes www/extras/yui/examples/slider/img/greybg.png | Bin 0 -> 197 bytes www/extras/yui/examples/slider/img/header.gif | Bin 0 -> 203 bytes www/extras/yui/examples/slider/img/hline.png | Bin 0 -> 416 bytes .../yui/examples/slider/img/horizBg.png | Bin 0 -> 519 bytes .../yui/examples/slider/img/horizSlider.png | Bin 0 -> 1115 bytes .../examples/slider/img/horizSlider_on.png | Bin 0 -> 1117 bytes www/extras/yui/examples/slider/img/hue.png | Bin 0 -> 1344 bytes www/extras/yui/examples/slider/img/logo.gif | Bin 0 -> 705 bytes www/extras/yui/examples/slider/img/lthumb.png | Bin 0 -> 1191 bytes .../yui/examples/slider/img/navHover2.png | Bin 0 -> 875 bytes .../yui/examples/slider/img/pickerbg.png | Bin 0 -> 12421 bytes .../yui/examples/slider/img/qbottom.png | Bin 0 -> 1351 bytes .../yui/examples/slider/img/qmiddle.png | Bin 0 -> 385 bytes www/extras/yui/examples/slider/img/qtop.png | Bin 0 -> 2030 bytes www/extras/yui/examples/slider/img/select.gif | Bin 0 -> 78 bytes www/extras/yui/examples/slider/img/select.png | Bin 0 -> 192 bytes www/extras/yui/examples/slider/img/vertBg.png | Bin 0 -> 572 bytes .../yui/examples/slider/img/vertSlider.png | Bin 0 -> 1112 bytes .../yui/examples/slider/img/vertSlider_on.png | Bin 0 -> 1160 bytes www/extras/yui/examples/slider/img/vline.png | Bin 0 -> 481 bytes www/extras/yui/examples/slider/index.html | 372 + www/extras/yui/examples/slider/js/color.js | 101 + www/extras/yui/examples/slider/js/key.js | 34 + www/extras/yui/examples/slider/js/log.js | 15 + www/extras/yui/examples/slider/js/logger.js | 1131 + www/extras/yui/examples/slider/rgb.html | 429 + www/extras/yui/examples/slider/rgb2.html | 342 + www/extras/yui/examples/treeview/anim.html | 180 + www/extras/yui/examples/treeview/check.html | 236 + .../yui/examples/treeview/css/check/tree.css | 1 + www/extras/yui/examples/treeview/css/code.css | 1 + .../examples/treeview/css/default/tree.css | 98 + .../treeview/css/default/tree.css.orig | 98 + .../examples/treeview/css/folders/tree.css | 55 + .../yui/examples/treeview/css/local/tree.css | 99 + .../yui/examples/treeview/css/menu/tree.css | 58 + .../yui/examples/treeview/css/screen.css | 1 + www/extras/yui/examples/treeview/default.html | 200 + www/extras/yui/examples/treeview/dynamic.html | 274 + www/extras/yui/examples/treeview/folders.html | 183 + www/extras/yui/examples/treeview/html.html | 214 + .../yui/examples/treeview/img/bullet.gif | Bin 0 -> 172 bytes .../examples/treeview/img/check/check0.gif | Bin 0 -> 608 bytes .../examples/treeview/img/check/check1.gif | Bin 0 -> 609 bytes .../examples/treeview/img/check/check2.gif | Bin 0 -> 622 bytes .../yui/examples/treeview/img/check/lm.gif | Bin 0 -> 94 bytes .../yui/examples/treeview/img/check/lmh.gif | Bin 0 -> 106 bytes .../yui/examples/treeview/img/check/ln.gif | Bin 0 -> 142 bytes .../examples/treeview/img/check/loading.gif | Bin 0 -> 2673 bytes .../yui/examples/treeview/img/check/lp.gif | Bin 0 -> 130 bytes .../yui/examples/treeview/img/check/lph.gif | Bin 0 -> 111 bytes .../yui/examples/treeview/img/check/tm.gif | Bin 0 -> 545 bytes .../yui/examples/treeview/img/check/tmh.gif | Bin 0 -> 563 bytes .../yui/examples/treeview/img/check/tn.gif | Bin 0 -> 504 bytes .../yui/examples/treeview/img/check/tp.gif | Bin 0 -> 539 bytes .../yui/examples/treeview/img/check/tph.gif | Bin 0 -> 568 bytes .../yui/examples/treeview/img/check/vline.gif | Bin 0 -> 503 bytes .../yui/examples/treeview/img/default/lm.gif | Bin 0 -> 94 bytes .../yui/examples/treeview/img/default/lmh.gif | Bin 0 -> 106 bytes .../yui/examples/treeview/img/default/ln.gif | Bin 0 -> 142 bytes .../examples/treeview/img/default/loading.gif | Bin 0 -> 2673 bytes .../yui/examples/treeview/img/default/lp.gif | Bin 0 -> 130 bytes .../yui/examples/treeview/img/default/lph.gif | Bin 0 -> 111 bytes .../yui/examples/treeview/img/default/tm.gif | Bin 0 -> 545 bytes .../yui/examples/treeview/img/default/tmh.gif | Bin 0 -> 563 bytes .../yui/examples/treeview/img/default/tn.gif | Bin 0 -> 504 bytes .../yui/examples/treeview/img/default/tp.gif | Bin 0 -> 539 bytes .../yui/examples/treeview/img/default/tph.gif | Bin 0 -> 568 bytes .../examples/treeview/img/default/vline.gif | Bin 0 -> 503 bytes .../yui/examples/treeview/img/folders/lm.gif | Bin 0 -> 666 bytes .../yui/examples/treeview/img/folders/lmh.gif | Bin 0 -> 677 bytes .../yui/examples/treeview/img/folders/ln.gif | Bin 0 -> 142 bytes .../examples/treeview/img/folders/loading.gif | Bin 0 -> 2673 bytes .../yui/examples/treeview/img/folders/lp.gif | Bin 0 -> 641 bytes .../yui/examples/treeview/img/folders/lph.gif | Bin 0 -> 651 bytes .../yui/examples/treeview/img/folders/tm.gif | Bin 0 -> 1281 bytes .../yui/examples/treeview/img/folders/tmh.gif | Bin 0 -> 1295 bytes .../yui/examples/treeview/img/folders/tn.gif | Bin 0 -> 504 bytes .../yui/examples/treeview/img/folders/tp.gif | Bin 0 -> 1243 bytes .../yui/examples/treeview/img/folders/tph.gif | Bin 0 -> 1263 bytes .../examples/treeview/img/folders/vline.gif | Bin 0 -> 503 bytes .../yui/examples/treeview/img/greybg.png | Bin 0 -> 197 bytes .../yui/examples/treeview/img/header.gif | Bin 0 -> 203 bytes www/extras/yui/examples/treeview/img/logo.gif | Bin 0 -> 705 bytes .../examples/treeview/img/menu/collapse.gif | Bin 0 -> 56 bytes .../examples/treeview/img/menu/collapseh.gif | Bin 0 -> 67 bytes .../examples/treeview/img/menu/collapseon.gif | Bin 0 -> 64 bytes .../yui/examples/treeview/img/menu/dash.gif | Bin 0 -> 114 bytes .../yui/examples/treeview/img/menu/expand.gif | Bin 0 -> 57 bytes .../examples/treeview/img/menu/expandh.gif | Bin 0 -> 66 bytes .../examples/treeview/img/menu/expandon.gif | Bin 0 -> 65 bytes .../examples/treeview/img/menu/loading.gif | Bin 0 -> 2673 bytes .../yui/examples/treeview/img/navHover2.png | Bin 0 -> 875 bytes .../yui/examples/treeview/img/qbottom.png | Bin 0 -> 1351 bytes .../yui/examples/treeview/img/qmiddle.png | Bin 0 -> 385 bytes www/extras/yui/examples/treeview/img/qtop.png | Bin 0 -> 2030 bytes www/extras/yui/examples/treeview/index.html | 44 + .../examples/treeview/js/CheckOnClickNode.js | 23 + .../yui/examples/treeview/js/TaskNode.js | 253 + .../treeview/js/dpSyntaxHighlighter.js | 736 + www/extras/yui/examples/treeview/js/json.js | 150 + www/extras/yui/examples/treeview/js/key.js | 34 + www/extras/yui/examples/treeview/js/log.js | 15 + www/extras/yui/examples/treeview/menu.html | 246 + 1026 files changed, 331404 insertions(+), 60 deletions(-) delete mode 100644 lib/WebGUI/i18n/English/Form_Textarea.pm create mode 100644 www/extras/yui-ext/README.txt create mode 100644 www/extras/yui-ext/animator-lib.js create mode 100644 www/extras/yui-ext/basic-grid-lib.js create mode 100644 www/extras/yui-ext/build/DomHelper-min.js create mode 100644 www/extras/yui-ext/build/Element-min.js create mode 100644 www/extras/yui-ext/build/EventManager-min.js create mode 100644 www/extras/yui-ext/build/State-min.js create mode 100644 www/extras/yui-ext/build/UpdateManager-min.js create mode 100644 www/extras/yui-ext/build/anim/Actor-min.js create mode 100644 www/extras/yui-ext/build/anim/Animator-min.js create mode 100644 www/extras/yui-ext/build/data/AbstractDataModel-min.js create mode 100644 www/extras/yui-ext/build/data/DefaultDataModel-min.js create mode 100644 www/extras/yui-ext/build/data/JSONDataModel-min.js create mode 100644 www/extras/yui-ext/build/data/LoadableDataModel-min.js create mode 100644 www/extras/yui-ext/build/data/XMLDataModel-min.js create mode 100644 www/extras/yui-ext/build/grid/AbstractColumnModel-min.js create mode 100644 www/extras/yui-ext/build/grid/DefaultColumnModel-min.js create mode 100644 www/extras/yui-ext/build/grid/EditorGrid-min.js create mode 100644 www/extras/yui-ext/build/grid/EditorSelectionModel-min.js create mode 100644 www/extras/yui-ext/build/grid/Grid-min.js create mode 100644 www/extras/yui-ext/build/grid/GridDD-min.js create mode 100644 www/extras/yui-ext/build/grid/GridView-min.js create mode 100644 www/extras/yui-ext/build/grid/PagedGridView-min.js create mode 100644 www/extras/yui-ext/build/grid/SelectionModel-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/CellEditor-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/CheckboxEditor-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/DateEditor-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/NumberEditor-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/SelectEditor-min.js create mode 100644 www/extras/yui-ext/build/grid/editor/TextEditor-min.js create mode 100644 www/extras/yui-ext/build/widgets/DatePicker-min.js create mode 100644 www/extras/yui-ext/build/widgets/Resizable-min.js create mode 100644 www/extras/yui-ext/build/widgets/SplitBar-min.js create mode 100644 www/extras/yui-ext/build/widgets/TabPanel-min.js create mode 100644 www/extras/yui-ext/build/widgets/Toolbar-min.js create mode 100644 www/extras/yui-ext/build/yutil-min.js create mode 100644 www/extras/yui-ext/docs/Date.html create mode 100644 www/extras/yui-ext/docs/Function.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Actor.Action.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Actor.AsyncAction.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Actor.PauseAction.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Actor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Animator.AnimSequence.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Animator.CompositeSequence.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Animator.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.DatePicker.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.DomHelper.Template.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.DomHelper.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Element.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.EventManager.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.EventObject.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Resizable.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.SplitBar.BasicLayoutAdapter.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.SplitBar.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.TabPanel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.TabPanelItem.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.Toolbar.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.ToolbarButton.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.BasicRenderer.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractColumnModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractDataModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.CellEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.CheckboxEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.DateEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultColumnModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultSelectionModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.DisableSelectionModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.EditorAndSelectionModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.EditorSelectionModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.Grid.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.GridDD.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.GridView.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.HeaderController.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.JSONDataModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.LoadableDataModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.NumberEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.PagedGridView.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.SelectEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.SingleSelectionModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.TextEditor.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.XMLDataModel.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.grid.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.Bench.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.Browser.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.CSS.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.DelayedTask.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.Observable.html create mode 100644 www/extras/yui-ext/docs/YAHOO.ext.util.html create mode 100644 www/extras/yui-ext/docs/YAHOO.util.CustomEvent.html create mode 100644 www/extras/yui-ext/docs/allclasses-frame.html create mode 100644 www/extras/yui-ext/docs/allclasses-noframe.html create mode 100644 www/extras/yui-ext/docs/help-doc.html create mode 100644 www/extras/yui-ext/docs/index-all.html create mode 100644 www/extras/yui-ext/docs/index.html create mode 100644 www/extras/yui-ext/docs/overview-AbstractColumnModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-AbstractDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-Actor.js.html create mode 100644 www/extras/yui-ext/docs/overview-Animator.js.html create mode 100644 www/extras/yui-ext/docs/overview-CellEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-CheckboxEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-DateEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-DatePicker.js.html create mode 100644 www/extras/yui-ext/docs/overview-DefaultColumnModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-DefaultDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-DomHelper.js.html create mode 100644 www/extras/yui-ext/docs/overview-EditorGrid.js.html create mode 100644 www/extras/yui-ext/docs/overview-EditorSelectionModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-Element.js.html create mode 100644 www/extras/yui-ext/docs/overview-EventManager.js.html create mode 100644 www/extras/yui-ext/docs/overview-Grid.js.html create mode 100644 www/extras/yui-ext/docs/overview-GridDD.js.html create mode 100644 www/extras/yui-ext/docs/overview-GridView.js.html create mode 100644 www/extras/yui-ext/docs/overview-JSONDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-LoadableDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-NumberEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-PagedGridView.js.html create mode 100644 www/extras/yui-ext/docs/overview-Resizable.js.html create mode 100644 www/extras/yui-ext/docs/overview-SelectEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-SelectionModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-SplitBar.js.html create mode 100644 www/extras/yui-ext/docs/overview-State.js.html create mode 100644 www/extras/yui-ext/docs/overview-TabPanel.js.html create mode 100644 www/extras/yui-ext/docs/overview-TextEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-Toolbar.js.html create mode 100644 www/extras/yui-ext/docs/overview-UpdateManager.js.html create mode 100644 www/extras/yui-ext/docs/overview-XMLDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-frame.html create mode 100644 www/extras/yui-ext/docs/overview-summary-AbstractColumnModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-AbstractDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Actor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Animator.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-CellEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-CheckboxEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-DateEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-DatePicker.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-DefaultColumnModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-DefaultDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-DomHelper.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-EditorGrid.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-EditorSelectionModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Element.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-EventManager.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Grid.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-GridDD.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-GridView.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-JSONDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-LoadableDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-NumberEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-PagedGridView.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Resizable.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-SelectEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-SelectionModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-SplitBar.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-State.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-TabPanel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-TextEditor.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-Toolbar.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-UpdateManager.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-XMLDataModel.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary-yutil.js.html create mode 100644 www/extras/yui-ext/docs/overview-summary.html create mode 100644 www/extras/yui-ext/docs/overview-tree.html create mode 100644 www/extras/yui-ext/docs/overview-yutil.js.html create mode 100644 www/extras/yui-ext/docs/stylesheet.css create mode 100644 www/extras/yui-ext/editor-grid-lib.js create mode 100644 www/extras/yui-ext/resizable-lib.js create mode 100644 www/extras/yui-ext/resources/css/grid.css create mode 100644 www/extras/yui-ext/resources/css/reset-min.css create mode 100644 www/extras/yui-ext/resources/css/resizable.css create mode 100644 www/extras/yui-ext/resources/css/tabs.css create mode 100644 www/extras/yui-ext/resources/css/toolbar.css create mode 100644 www/extras/yui-ext/resources/images/grid/arrow-left-white.gif create mode 100644 www/extras/yui-ext/resources/images/grid/arrow-right-white.gif create mode 100644 www/extras/yui-ext/resources/images/grid/done.gif create mode 100644 www/extras/yui-ext/resources/images/grid/drop-no.gif create mode 100644 www/extras/yui-ext/resources/images/grid/drop-yes.gif create mode 100644 www/extras/yui-ext/resources/images/grid/footer-bg.gif create mode 100644 www/extras/yui-ext/resources/images/grid/grid-blue-hd.gif create mode 100644 www/extras/yui-ext/resources/images/grid/grid-blue-split.gif create mode 100644 www/extras/yui-ext/resources/images/grid/grid-loading.gif create mode 100644 www/extras/yui-ext/resources/images/grid/grid-split.gif create mode 100644 www/extras/yui-ext/resources/images/grid/grid-vista-hd.gif create mode 100644 www/extras/yui-ext/resources/images/grid/invalid_line.gif create mode 100644 www/extras/yui-ext/resources/images/grid/loading.gif create mode 100644 www/extras/yui-ext/resources/images/grid/mso-hd.gif create mode 100644 www/extras/yui-ext/resources/images/grid/nowait.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-first-disabled.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-first.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-last-disabled.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-last.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-next-disabled.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-next.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-prev-disabled.gif create mode 100644 www/extras/yui-ext/resources/images/grid/page-prev.gif create mode 100644 www/extras/yui-ext/resources/images/grid/pick-button.gif create mode 100644 www/extras/yui-ext/resources/images/grid/refresh.gif create mode 100644 www/extras/yui-ext/resources/images/grid/sort_asc.gif create mode 100644 www/extras/yui-ext/resources/images/grid/sort_desc.gif create mode 100644 www/extras/yui-ext/resources/images/grid/wait.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/e-handle-dark.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/e-handle.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/s-handle-dark.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/s-handle.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/se-handle-dark.gif create mode 100644 www/extras/yui-ext/resources/images/sizer/se-handle.gif create mode 100644 www/extras/yui-ext/resources/images/tabs/tab-inactive-left-bg.gif create mode 100644 www/extras/yui-ext/resources/images/tabs/tab-inactive-right-bg.gif create mode 100644 www/extras/yui-ext/resources/images/tabs/tab-left-bg.gif create mode 100644 www/extras/yui-ext/resources/images/tabs/tab-right-bg.gif create mode 100644 www/extras/yui-ext/source/DomHelper.js create mode 100644 www/extras/yui-ext/source/Element.js create mode 100644 www/extras/yui-ext/source/EventManager.js create mode 100644 www/extras/yui-ext/source/State.js create mode 100644 www/extras/yui-ext/source/UpdateManager.js create mode 100644 www/extras/yui-ext/source/anim/Actor.js create mode 100644 www/extras/yui-ext/source/anim/Animator.js create mode 100644 www/extras/yui-ext/source/data/AbstractDataModel.js create mode 100644 www/extras/yui-ext/source/data/DefaultDataModel.js create mode 100644 www/extras/yui-ext/source/data/JSONDataModel.js create mode 100644 www/extras/yui-ext/source/data/LoadableDataModel.js create mode 100644 www/extras/yui-ext/source/data/XMLDataModel.js create mode 100644 www/extras/yui-ext/source/grid/AbstractColumnModel.js create mode 100644 www/extras/yui-ext/source/grid/DefaultColumnModel.js create mode 100644 www/extras/yui-ext/source/grid/EditorGrid.js create mode 100644 www/extras/yui-ext/source/grid/EditorSelectionModel.js create mode 100644 www/extras/yui-ext/source/grid/Grid.js create mode 100644 www/extras/yui-ext/source/grid/GridDD.js create mode 100644 www/extras/yui-ext/source/grid/GridView.js create mode 100644 www/extras/yui-ext/source/grid/PagedGridView.js create mode 100644 www/extras/yui-ext/source/grid/SelectionModel.js create mode 100644 www/extras/yui-ext/source/grid/editor/CellEditor.js create mode 100644 www/extras/yui-ext/source/grid/editor/CheckboxEditor.js create mode 100644 www/extras/yui-ext/source/grid/editor/DateEditor.js create mode 100644 www/extras/yui-ext/source/grid/editor/NumberEditor.js create mode 100644 www/extras/yui-ext/source/grid/editor/SelectEditor.js create mode 100644 www/extras/yui-ext/source/grid/editor/TextEditor.js create mode 100644 www/extras/yui-ext/source/widgets/DatePicker.js create mode 100644 www/extras/yui-ext/source/widgets/Resizable.js create mode 100644 www/extras/yui-ext/source/widgets/SplitBar.js create mode 100644 www/extras/yui-ext/source/widgets/TabPanel.js create mode 100644 www/extras/yui-ext/source/widgets/Toolbar.js create mode 100644 www/extras/yui-ext/source/yutil.js create mode 100644 www/extras/yui-ext/splitbar-lib.js create mode 100644 www/extras/yui-ext/tabs-lib.js create mode 100644 www/extras/yui-ext/yui-ext-core.js create mode 100644 www/extras/yui-ext/yui-ext.js create mode 100644 www/extras/yui-ext/yui-ext.jsb create mode 100644 www/extras/yui/README create mode 100644 www/extras/yui/build/animation/README create mode 100644 www/extras/yui/build/animation/animation-debug.js create mode 100644 www/extras/yui/build/animation/animation-min.js create mode 100644 www/extras/yui/build/animation/animation.js create mode 100644 www/extras/yui/build/autocomplete/README create mode 100644 www/extras/yui/build/autocomplete/autocomplete-debug.js create mode 100644 www/extras/yui/build/autocomplete/autocomplete-min.js create mode 100644 www/extras/yui/build/autocomplete/autocomplete.js create mode 100644 www/extras/yui/build/calendar/README create mode 100644 www/extras/yui/build/calendar/assets/calendar.css create mode 100644 www/extras/yui/build/calendar/assets/callt.gif create mode 100644 www/extras/yui/build/calendar/assets/calrt.gif create mode 100644 www/extras/yui/build/calendar/assets/calx.gif create mode 100644 www/extras/yui/build/calendar/calendar-debug.js create mode 100644 www/extras/yui/build/calendar/calendar-min.js create mode 100644 www/extras/yui/build/calendar/calendar.js create mode 100644 www/extras/yui/build/connection/README create mode 100644 www/extras/yui/build/connection/connection-debug.js create mode 100644 www/extras/yui/build/connection/connection-min.js create mode 100644 www/extras/yui/build/connection/connection.js create mode 100644 www/extras/yui/build/container/README create mode 100644 www/extras/yui/build/container/assets/alrt16_1.gif create mode 100644 www/extras/yui/build/container/assets/blck16_1.gif create mode 100644 www/extras/yui/build/container/assets/close12_1.gif create mode 100644 www/extras/yui/build/container/assets/container.css create mode 100644 www/extras/yui/build/container/assets/hlp16_1.gif create mode 100644 www/extras/yui/build/container/assets/info16_1.gif create mode 100644 www/extras/yui/build/container/assets/tip16_1.gif create mode 100644 www/extras/yui/build/container/assets/warn16_1.gif create mode 100644 www/extras/yui/build/container/container-debug.js create mode 100644 www/extras/yui/build/container/container-min.js create mode 100644 www/extras/yui/build/container/container.js create mode 100644 www/extras/yui/build/container/container_core-debug.js create mode 100644 www/extras/yui/build/container/container_core-min.js create mode 100644 www/extras/yui/build/container/container_core.js create mode 100644 www/extras/yui/build/dom/README create mode 100644 www/extras/yui/build/dom/dom-debug.js create mode 100644 www/extras/yui/build/dom/dom-min.js create mode 100644 www/extras/yui/build/dom/dom.js create mode 100644 www/extras/yui/build/dragdrop/README create mode 100644 www/extras/yui/build/dragdrop/dragdrop-debug.js create mode 100644 www/extras/yui/build/dragdrop/dragdrop-min.js create mode 100644 www/extras/yui/build/dragdrop/dragdrop.js create mode 100644 www/extras/yui/build/event/README create mode 100644 www/extras/yui/build/event/event-debug.js create mode 100644 www/extras/yui/build/event/event-min.js create mode 100644 www/extras/yui/build/event/event.js create mode 100644 www/extras/yui/build/fonts/README create mode 100644 www/extras/yui/build/fonts/fonts-min.css create mode 100644 www/extras/yui/build/fonts/fonts.css create mode 100644 www/extras/yui/build/grids/README create mode 100644 www/extras/yui/build/grids/grids-min.css create mode 100644 www/extras/yui/build/grids/grids.css create mode 100644 www/extras/yui/build/logger/README create mode 100644 www/extras/yui/build/logger/assets/logger.css create mode 100644 www/extras/yui/build/logger/logger-debug.js create mode 100644 www/extras/yui/build/logger/logger-min.js create mode 100644 www/extras/yui/build/logger/logger.js create mode 100644 www/extras/yui/build/menu/README create mode 100644 www/extras/yui/build/menu/assets/menu.css create mode 100644 www/extras/yui/build/menu/assets/menuarodwn8_dim_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuarodwn8_hov_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuarodwn8_nrm_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuarorght8_dim_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuarorght8_hov_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuarorght8_nrm_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuchk8_dim_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuchk8_hov_1.gif create mode 100644 www/extras/yui/build/menu/assets/menuchk8_nrm_1.gif create mode 100644 www/extras/yui/build/menu/menu-debug.js create mode 100644 www/extras/yui/build/menu/menu-min.js create mode 100644 www/extras/yui/build/menu/menu.js create mode 100644 www/extras/yui/build/reset/README create mode 100644 www/extras/yui/build/reset/reset-min.css create mode 100644 www/extras/yui/build/reset/reset.css create mode 100644 www/extras/yui/build/slider/README create mode 100644 www/extras/yui/build/slider/slider-debug.js create mode 100644 www/extras/yui/build/slider/slider-min.js create mode 100644 www/extras/yui/build/slider/slider.js create mode 100644 www/extras/yui/build/treeview/README create mode 100644 www/extras/yui/build/treeview/assets/lm.gif create mode 100644 www/extras/yui/build/treeview/assets/lmh.gif create mode 100644 www/extras/yui/build/treeview/assets/ln.gif create mode 100644 www/extras/yui/build/treeview/assets/loading.gif create mode 100644 www/extras/yui/build/treeview/assets/lp.gif create mode 100644 www/extras/yui/build/treeview/assets/lph.gif create mode 100644 www/extras/yui/build/treeview/assets/tm.gif create mode 100644 www/extras/yui/build/treeview/assets/tmh.gif create mode 100644 www/extras/yui/build/treeview/assets/tn.gif create mode 100644 www/extras/yui/build/treeview/assets/tp.gif create mode 100644 www/extras/yui/build/treeview/assets/tph.gif create mode 100644 www/extras/yui/build/treeview/assets/tree.css create mode 100644 www/extras/yui/build/treeview/assets/vline.gif create mode 100644 www/extras/yui/build/treeview/treeview-debug.js create mode 100644 www/extras/yui/build/treeview/treeview-min.js create mode 100644 www/extras/yui/build/treeview/treeview.js create mode 100644 www/extras/yui/build/yahoo/README create mode 100644 www/extras/yui/build/yahoo/yahoo-debug.js create mode 100644 www/extras/yui/build/yahoo/yahoo-min.js create mode 100644 www/extras/yui/build/yahoo/yahoo.js create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Anim.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Anim.init.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.AnimMgr.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Bezier.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.ColorAnim.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Dom.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Easing.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Motion.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Point.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Region.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.Scroll.html create mode 100644 www/extras/yui/docs/animation/YAHOO.util.html create mode 100644 www/extras/yui/docs/animation/allclasses-frame.html create mode 100644 www/extras/yui/docs/animation/allclasses-noframe.html create mode 100644 www/extras/yui/docs/animation/index-all.html create mode 100644 www/extras/yui/docs/animation/index.html create mode 100644 www/extras/yui/docs/animation/logo.gif create mode 100644 www/extras/yui/docs/animation/overview-Anim.js.html create mode 100644 www/extras/yui/docs/animation/overview-AnimMgr.js.html create mode 100644 www/extras/yui/docs/animation/overview-Bezier.js.html create mode 100644 www/extras/yui/docs/animation/overview-ColorAnim.js.html create mode 100644 www/extras/yui/docs/animation/overview-Dom.js.html create mode 100644 www/extras/yui/docs/animation/overview-Easing.js.html create mode 100644 www/extras/yui/docs/animation/overview-Motion.js.html create mode 100644 www/extras/yui/docs/animation/overview-Region.js.html create mode 100644 www/extras/yui/docs/animation/overview-Scroll.js.html create mode 100644 www/extras/yui/docs/animation/overview-frame.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Anim.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-AnimMgr.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Bezier.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-ColorAnim.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Dom.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Easing.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Motion.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Region.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary-Scroll.js.html create mode 100644 www/extras/yui/docs/animation/overview-summary.html create mode 100644 www/extras/yui/docs/animation/overview-tree.html create mode 100644 www/extras/yui/docs/animation/stylesheet.css create mode 100644 www/extras/yui/docs/assets/dpSyntaxHighlighter.css create mode 100644 www/extras/yui/docs/assets/dpSyntaxHighlighter.js create mode 100644 www/extras/yui/docs/assets/examples.css create mode 100644 www/extras/yui/docs/assets/logo.gif create mode 100644 www/extras/yui/docs/assets/yui-0.11-cheatsheets.zip create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.AutoComplete.html create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.DS_JSArray.html create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.DS_JSFunction.html create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.DS_XHR.html create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.DataSource.html create mode 100644 www/extras/yui/docs/autocomplete/YAHOO.widget.html create mode 100644 www/extras/yui/docs/autocomplete/allclasses-frame.html create mode 100644 www/extras/yui/docs/autocomplete/allclasses-noframe.html create mode 100644 www/extras/yui/docs/autocomplete/index-all.html create mode 100644 www/extras/yui/docs/autocomplete/index.html create mode 100644 www/extras/yui/docs/autocomplete/logo.gif create mode 100644 www/extras/yui/docs/autocomplete/overview-AutoComplete.js.html create mode 100644 www/extras/yui/docs/autocomplete/overview-DataSource.js.html create mode 100644 www/extras/yui/docs/autocomplete/overview-summary-AutoComplete.js.html create mode 100644 www/extras/yui/docs/autocomplete/overview-summary-DataSource.js.html create mode 100644 www/extras/yui/docs/autocomplete/overview-summary.html create mode 100644 www/extras/yui/docs/autocomplete/overview-tree.html create mode 100644 www/extras/yui/docs/autocomplete/stylesheet.css create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.Calendar.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.Calendar2up.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.Calendar2up_Cal.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.CalendarGroup.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.Calendar_Core.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.DateMath.html create mode 100644 www/extras/yui/docs/calendar/YAHOO.widget.html create mode 100644 www/extras/yui/docs/calendar/allclasses-frame.html create mode 100644 www/extras/yui/docs/calendar/allclasses-noframe.html create mode 100644 www/extras/yui/docs/calendar/index-all.html create mode 100644 www/extras/yui/docs/calendar/index.html create mode 100644 www/extras/yui/docs/calendar/logo.gif create mode 100644 www/extras/yui/docs/calendar/overview-Calendar.js.html create mode 100644 www/extras/yui/docs/calendar/overview-Calendar2up.js.html create mode 100644 www/extras/yui/docs/calendar/overview-CalendarGroup.js.html create mode 100644 www/extras/yui/docs/calendar/overview-Calendar_Core.js.html create mode 100644 www/extras/yui/docs/calendar/overview-DateMath.js.html create mode 100644 www/extras/yui/docs/calendar/overview-frame.html create mode 100644 www/extras/yui/docs/calendar/overview-summary-Calendar.js.html create mode 100644 www/extras/yui/docs/calendar/overview-summary-Calendar2up.js.html create mode 100644 www/extras/yui/docs/calendar/overview-summary-CalendarGroup.js.html create mode 100644 www/extras/yui/docs/calendar/overview-summary-Calendar_Core.js.html create mode 100644 www/extras/yui/docs/calendar/overview-summary-DateMath.js.html create mode 100644 www/extras/yui/docs/calendar/overview-summary.html create mode 100644 www/extras/yui/docs/calendar/overview-tree.html create mode 100644 www/extras/yui/docs/calendar/stylesheet.css create mode 100644 www/extras/yui/docs/connection/YAHOO.util.Connect.html create mode 100644 www/extras/yui/docs/connection/index-all.html create mode 100644 www/extras/yui/docs/connection/index.html create mode 100644 www/extras/yui/docs/connection/logo.gif create mode 100644 www/extras/yui/docs/connection/overview-summary-connection.js.html create mode 100644 www/extras/yui/docs/connection/overview-tree.html create mode 100644 www/extras/yui/docs/connection/stylesheet.css create mode 100644 www/extras/yui/docs/container/YAHOO.util.Config.html create mode 100644 www/extras/yui/docs/container/YAHOO.util.KeyListener.html create mode 100644 www/extras/yui/docs/container/YAHOO.util.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.ContainerEffect.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.Dialog.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.Module.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.Overlay.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.OverlayManager.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.Panel.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.SimpleDialog.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.Tooltip.html create mode 100644 www/extras/yui/docs/container/YAHOO.widget.html create mode 100644 www/extras/yui/docs/container/allclasses-frame.html create mode 100644 www/extras/yui/docs/container/allclasses-noframe.html create mode 100644 www/extras/yui/docs/container/index-all.html create mode 100644 www/extras/yui/docs/container/index.html create mode 100644 www/extras/yui/docs/container/logo.gif create mode 100644 www/extras/yui/docs/container/overview-Config.js.html create mode 100644 www/extras/yui/docs/container/overview-ContainerEffect.js.html create mode 100644 www/extras/yui/docs/container/overview-Dialog.js.html create mode 100644 www/extras/yui/docs/container/overview-KeyListener.js.html create mode 100644 www/extras/yui/docs/container/overview-Module.js.html create mode 100644 www/extras/yui/docs/container/overview-Overlay.js.html create mode 100644 www/extras/yui/docs/container/overview-OverlayEffect.js.html create mode 100644 www/extras/yui/docs/container/overview-OverlayManager.js.html create mode 100644 www/extras/yui/docs/container/overview-Panel.js.html create mode 100644 www/extras/yui/docs/container/overview-SimpleDialog.js.html create mode 100644 www/extras/yui/docs/container/overview-Tooltip.js.html create mode 100644 www/extras/yui/docs/container/overview-frame.html create mode 100644 www/extras/yui/docs/container/overview-summary-Config.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-ContainerEffect.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-Dialog.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-KeyListener.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-Module.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-Overlay.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-OverlayManager.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-Panel.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-SimpleDialog.js.html create mode 100644 www/extras/yui/docs/container/overview-summary-Tooltip.js.html create mode 100644 www/extras/yui/docs/container/overview-summary.html create mode 100644 www/extras/yui/docs/container/overview-tree.html create mode 100644 www/extras/yui/docs/container/stylesheet.css create mode 100644 www/extras/yui/docs/dom/YAHOO.util.Dom.html create mode 100644 www/extras/yui/docs/dom/YAHOO.util.Point.html create mode 100644 www/extras/yui/docs/dom/YAHOO.util.Region.html create mode 100644 www/extras/yui/docs/dom/YAHOO.util.html create mode 100644 www/extras/yui/docs/dom/allclasses-frame.html create mode 100644 www/extras/yui/docs/dom/allclasses-noframe.html create mode 100644 www/extras/yui/docs/dom/index-all.html create mode 100644 www/extras/yui/docs/dom/index.html create mode 100644 www/extras/yui/docs/dom/logo.gif create mode 100644 www/extras/yui/docs/dom/overview-Dom.js.html create mode 100644 www/extras/yui/docs/dom/overview-Region.js.html create mode 100644 www/extras/yui/docs/dom/overview-frame.html create mode 100644 www/extras/yui/docs/dom/overview-summary-Dom.js.html create mode 100644 www/extras/yui/docs/dom/overview-summary-Region.js.html create mode 100644 www/extras/yui/docs/dom/overview-summary.html create mode 100644 www/extras/yui/docs/dom/overview-tree.html create mode 100644 www/extras/yui/docs/dom/stylesheet.css create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.DD.html create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.DDProxy.html create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.DDTarget.html create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.DragDrop.html create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.DragDropMgr.html create mode 100644 www/extras/yui/docs/dragdrop/YAHOO.util.html create mode 100644 www/extras/yui/docs/dragdrop/allclasses-frame.html create mode 100644 www/extras/yui/docs/dragdrop/allclasses-noframe.html create mode 100644 www/extras/yui/docs/dragdrop/index-all.html create mode 100644 www/extras/yui/docs/dragdrop/index.html create mode 100644 www/extras/yui/docs/dragdrop/logo.gif create mode 100644 www/extras/yui/docs/dragdrop/overview-DD.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-DDProxy.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-DDTarget.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-DragDrop.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-DragDropMgr.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary-DD.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary-DDProxy.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary-DDTarget.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary-DragDrop.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary-DragDropMgr.js.html create mode 100644 www/extras/yui/docs/dragdrop/overview-summary.html create mode 100644 www/extras/yui/docs/dragdrop/overview-tree.html create mode 100644 www/extras/yui/docs/dragdrop/stylesheet.css create mode 100644 www/extras/yui/docs/event/YAHOO.util.CustomEvent.html create mode 100644 www/extras/yui/docs/event/YAHOO.util.Event.html create mode 100644 www/extras/yui/docs/event/YAHOO.util.Subscriber.html create mode 100644 www/extras/yui/docs/event/YAHOO.util.html create mode 100644 www/extras/yui/docs/event/allclasses-frame.html create mode 100644 www/extras/yui/docs/event/allclasses-noframe.html create mode 100644 www/extras/yui/docs/event/index-all.html create mode 100644 www/extras/yui/docs/event/index.html create mode 100644 www/extras/yui/docs/event/logo.gif create mode 100644 www/extras/yui/docs/event/overview-CustomEvent.js.html create mode 100644 www/extras/yui/docs/event/overview-Event.js.html create mode 100644 www/extras/yui/docs/event/overview-summary-CustomEvent.js.html create mode 100644 www/extras/yui/docs/event/overview-summary-Event.js.html create mode 100644 www/extras/yui/docs/event/overview-summary.html create mode 100644 www/extras/yui/docs/event/overview-tree.html create mode 100644 www/extras/yui/docs/event/stylesheet.css create mode 100644 www/extras/yui/docs/logger/YAHOO.widget.LogReader.html create mode 100644 www/extras/yui/docs/logger/YAHOO.widget.LogWriter.html create mode 100644 www/extras/yui/docs/logger/YAHOO.widget.html create mode 100644 www/extras/yui/docs/logger/allclasses-frame.html create mode 100644 www/extras/yui/docs/logger/allclasses-noframe.html create mode 100644 www/extras/yui/docs/logger/index-all.html create mode 100644 www/extras/yui/docs/logger/index.html create mode 100644 www/extras/yui/docs/logger/logo.gif create mode 100644 www/extras/yui/docs/logger/overview-LogReader.js.html create mode 100644 www/extras/yui/docs/logger/overview-LogWriter.js.html create mode 100644 www/extras/yui/docs/logger/overview-Logger.js.html create mode 100644 www/extras/yui/docs/logger/overview-summary-LogReader.js.html create mode 100644 www/extras/yui/docs/logger/overview-summary-LogWriter.js.html create mode 100644 www/extras/yui/docs/logger/overview-summary-Logger.js.html create mode 100644 www/extras/yui/docs/logger/overview-summary.html create mode 100644 www/extras/yui/docs/logger/overview-tree.html create mode 100644 www/extras/yui/docs/logger/stylesheet.css create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.ContextMenu.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.ContextMenuItem.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.Menu.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.MenuBar.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.MenuBarItem.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.MenuItem.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.MenuModule.html create mode 100644 www/extras/yui/docs/menu/YAHOO.widget.MenuModuleItem.html create mode 100644 www/extras/yui/docs/menu/allclasses-frame.html create mode 100644 www/extras/yui/docs/menu/allclasses-noframe.html create mode 100644 www/extras/yui/docs/menu/index-all.html create mode 100644 www/extras/yui/docs/menu/index.html create mode 100644 www/extras/yui/docs/menu/logo.gif create mode 100644 www/extras/yui/docs/menu/overview-contextmenu.js.html create mode 100644 www/extras/yui/docs/menu/overview-contextmenuitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-menu.js.html create mode 100644 www/extras/yui/docs/menu/overview-menubar.js.html create mode 100644 www/extras/yui/docs/menu/overview-menubaritem.js.html create mode 100644 www/extras/yui/docs/menu/overview-menuitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-menumodule.js.html create mode 100644 www/extras/yui/docs/menu/overview-menumoduleitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-contextmenu.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-contextmenuitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menu.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menubar.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menubaritem.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menuitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menumodule.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary-menumoduleitem.js.html create mode 100644 www/extras/yui/docs/menu/overview-summary.html create mode 100644 www/extras/yui/docs/menu/overview-tree.html create mode 100644 www/extras/yui/docs/menu/stylesheet.css create mode 100644 www/extras/yui/docs/slider/YAHOO.widget.Slider.html create mode 100644 www/extras/yui/docs/slider/YAHOO.widget.SliderThumb.html create mode 100644 www/extras/yui/docs/slider/YAHOO.widget.html create mode 100644 www/extras/yui/docs/slider/allclasses-frame.html create mode 100644 www/extras/yui/docs/slider/allclasses-noframe.html create mode 100644 www/extras/yui/docs/slider/index-all.html create mode 100644 www/extras/yui/docs/slider/index.html create mode 100644 www/extras/yui/docs/slider/logo.gif create mode 100644 www/extras/yui/docs/slider/overview-summary-Slider.js.html create mode 100644 www/extras/yui/docs/slider/overview-summary.html create mode 100644 www/extras/yui/docs/slider/overview-tree.html create mode 100644 www/extras/yui/docs/slider/stylesheet.css create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.HTMLNode.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.MenuNode.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.Node.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.RootNode.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.TVAnim.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.TVFadeIn.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.TVFadeOut.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.TextNode.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.TreeView.html create mode 100644 www/extras/yui/docs/treeview/YAHOO.widget.html create mode 100644 www/extras/yui/docs/treeview/allclasses-frame.html create mode 100644 www/extras/yui/docs/treeview/allclasses-noframe.html create mode 100644 www/extras/yui/docs/treeview/index-all.html create mode 100644 www/extras/yui/docs/treeview/index.html create mode 100644 www/extras/yui/docs/treeview/logo.gif create mode 100644 www/extras/yui/docs/treeview/overview-HTMLNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-MenuNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-Node.js.html create mode 100644 www/extras/yui/docs/treeview/overview-RootNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-TVAnim.js.html create mode 100644 www/extras/yui/docs/treeview/overview-TVFadeIn.js.html create mode 100644 www/extras/yui/docs/treeview/overview-TVFadeOut.js.html create mode 100644 www/extras/yui/docs/treeview/overview-TextNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-TreeView.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-HTMLNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-MenuNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-Node.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-RootNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-TVAnim.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-TVFadeIn.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-TVFadeOut.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-TextNode.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary-TreeView.js.html create mode 100644 www/extras/yui/docs/treeview/overview-summary.html create mode 100644 www/extras/yui/docs/treeview/overview-tree.html create mode 100644 www/extras/yui/docs/treeview/stylesheet.css create mode 100644 www/extras/yui/docs/yahoo/YAHOO.html create mode 100644 www/extras/yui/docs/yahoo/allclasses-frame.html create mode 100644 www/extras/yui/docs/yahoo/allclasses-noframe.html create mode 100644 www/extras/yui/docs/yahoo/index-all.html create mode 100644 www/extras/yui/docs/yahoo/index.html create mode 100644 www/extras/yui/docs/yahoo/logo.gif create mode 100644 www/extras/yui/docs/yahoo/overview-summary-YAHOO.js.html create mode 100644 www/extras/yui/docs/yahoo/overview-summary.html create mode 100644 www/extras/yui/docs/yahoo/overview-tree.html create mode 100644 www/extras/yui/docs/yahoo/stylesheet.css create mode 100644 www/extras/yui/examples/animation/anim_basic.html create mode 100644 www/extras/yui/examples/animation/anim_from.html create mode 100644 www/extras/yui/examples/animation/anim_size.html create mode 100644 www/extras/yui/examples/animation/anim_size_plus.html create mode 100644 www/extras/yui/examples/animation/anim_size_plus_alt.html create mode 100644 www/extras/yui/examples/animation/anim_units.html create mode 100644 www/extras/yui/examples/animation/colors.html create mode 100644 www/extras/yui/examples/animation/css/anim.css create mode 100644 www/extras/yui/examples/animation/css/demo.css create mode 100644 www/extras/yui/examples/animation/easing.html create mode 100644 www/extras/yui/examples/animation/fade.html create mode 100644 www/extras/yui/examples/animation/img/logo.gif create mode 100644 www/extras/yui/examples/animation/index.html create mode 100644 www/extras/yui/examples/animation/motion_basic.html create mode 100644 www/extras/yui/examples/animation/motion_by.html create mode 100644 www/extras/yui/examples/animation/motion_control.html create mode 100644 www/extras/yui/examples/animation/motion_controls.html create mode 100644 www/extras/yui/examples/animation/motion_plus.html create mode 100644 www/extras/yui/examples/animation/scroll_by.html create mode 100644 www/extras/yui/examples/animation/scroll_horiz.html create mode 100644 www/extras/yui/examples/animation/scroll_vert.html create mode 100644 www/extras/yui/examples/autocomplete/css/examples.css create mode 100644 www/extras/yui/examples/autocomplete/customize.html create mode 100644 www/extras/yui/examples/autocomplete/flickr_xml.html create mode 100644 www/extras/yui/examples/autocomplete/img/logo.gif create mode 100644 www/extras/yui/examples/autocomplete/index.html create mode 100644 www/extras/yui/examples/autocomplete/js/json.js create mode 100644 www/extras/yui/examples/autocomplete/js/states_jsfunction.js create mode 100644 www/extras/yui/examples/autocomplete/php/flickr_proxy.php create mode 100644 www/extras/yui/examples/autocomplete/php/ysearch_flat.php create mode 100644 www/extras/yui/examples/autocomplete/php/ysearch_proxy.php create mode 100644 www/extras/yui/examples/autocomplete/states_jsarray.html create mode 100644 www/extras/yui/examples/autocomplete/states_jsfunction.html create mode 100644 www/extras/yui/examples/autocomplete/ysearch_flat.html create mode 100644 www/extras/yui/examples/autocomplete/ysearch_json.html create mode 100644 www/extras/yui/examples/autocomplete/ysearch_xml.html create mode 100644 www/extras/yui/examples/calendar/css/examples.css create mode 100644 www/extras/yui/examples/calendar/default/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/default/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/default/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/default/index.html create mode 100644 www/extras/yui/examples/calendar/default_2up/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/default_2up/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/default_2up/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/default_2up/img/ytravel.gif create mode 100644 www/extras/yui/examples/calendar/default_2up/index.html create mode 100644 www/extras/yui/examples/calendar/events/index.html create mode 100644 www/extras/yui/examples/calendar/img/logo.gif create mode 100644 www/extras/yui/examples/calendar/img/pdate.gif create mode 100644 www/extras/yui/examples/calendar/index.html create mode 100644 www/extras/yui/examples/calendar/intl_germany/css/Calendar_DE.css create mode 100644 www/extras/yui/examples/calendar/intl_germany/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/intl_germany/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/intl_germany/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/intl_germany/img/ytravel.gif create mode 100644 www/extras/yui/examples/calendar/intl_germany/index.html create mode 100644 www/extras/yui/examples/calendar/intl_germany/js/Calendar2up_DE.js create mode 100644 www/extras/yui/examples/calendar/intl_japan/css/Calendar_JP.css create mode 100644 www/extras/yui/examples/calendar/intl_japan/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/intl_japan/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/intl_japan/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/intl_japan/img/ytravel.gif create mode 100644 www/extras/yui/examples/calendar/intl_japan/index.html create mode 100644 www/extras/yui/examples/calendar/intl_japan/js/Calendar2up_JP.js create mode 100644 www/extras/yui/examples/calendar/min_max_date/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/min_max_date/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/min_max_date/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/min_max_date/index.html create mode 100644 www/extras/yui/examples/calendar/multi_select/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/multi_select/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/multi_select/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/multi_select/index.html create mode 100644 www/extras/yui/examples/calendar/multi_select_2up/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/multi_select_2up/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/multi_select_2up/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/multi_select_2up/index.html create mode 100644 www/extras/yui/examples/calendar/renderer/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/renderer/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/renderer/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/renderer/index.html create mode 100644 www/extras/yui/examples/calendar/restriction/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/restriction/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/restriction/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/restriction/index.html create mode 100644 www/extras/yui/examples/calendar/row_highlight/img/callt.gif create mode 100644 www/extras/yui/examples/calendar/row_highlight/img/calrt.gif create mode 100644 www/extras/yui/examples/calendar/row_highlight/img/calx.gif create mode 100644 www/extras/yui/examples/calendar/row_highlight/index.html create mode 100644 www/extras/yui/examples/connection/abort.html create mode 100644 www/extras/yui/examples/connection/get.html create mode 100644 www/extras/yui/examples/connection/index.html create mode 100644 www/extras/yui/examples/connection/php/get.php create mode 100644 www/extras/yui/examples/connection/php/post.php create mode 100644 www/extras/yui/examples/connection/php/sync.php create mode 100644 www/extras/yui/examples/connection/php/weather.php create mode 100644 www/extras/yui/examples/connection/post.html create mode 100644 www/extras/yui/examples/connection/weather.html create mode 100644 www/extras/yui/examples/container/css/ResizePanel.css create mode 100644 www/extras/yui/examples/container/css/example.css create mode 100644 www/extras/yui/examples/container/css/module.css create mode 100644 www/extras/yui/examples/container/css/panel-aqua.css create mode 100644 www/extras/yui/examples/container/css/panel-xp.css create mode 100644 www/extras/yui/examples/container/css/photobox.css create mode 100644 www/extras/yui/examples/container/dialog.html create mode 100644 www/extras/yui/examples/container/img/aqua-bg.gif create mode 100644 www/extras/yui/examples/container/img/aqua-hd-bg.gif create mode 100644 www/extras/yui/examples/container/img/aqua-hd-close-over.gif create mode 100644 www/extras/yui/examples/container/img/aqua-hd-close.gif create mode 100644 www/extras/yui/examples/container/img/aqua-hd-lt.gif create mode 100644 www/extras/yui/examples/container/img/aqua-hd-rt.gif create mode 100644 www/extras/yui/examples/container/img/bg.png create mode 100644 www/extras/yui/examples/container/img/ctx.gif create mode 100644 www/extras/yui/examples/container/img/xp-bl.gif create mode 100644 www/extras/yui/examples/container/img/xp-border-rt.gif create mode 100644 www/extras/yui/examples/container/img/xp-br.gif create mode 100644 www/extras/yui/examples/container/img/xp-brdr-lt.gif create mode 100644 www/extras/yui/examples/container/img/xp-brdr-rt.gif create mode 100644 www/extras/yui/examples/container/img/xp-close.gif create mode 100644 www/extras/yui/examples/container/img/xp-ft.gif create mode 100644 www/extras/yui/examples/container/img/xp-hd.gif create mode 100644 www/extras/yui/examples/container/img/xp-tl.gif create mode 100644 www/extras/yui/examples/container/img/xp-tr.gif create mode 100644 www/extras/yui/examples/container/img/ybox-back.gif create mode 100644 www/extras/yui/examples/container/img/ybox-close.gif create mode 100644 www/extras/yui/examples/container/img/ybox-next.gif create mode 100644 www/extras/yui/examples/container/index.html create mode 100644 www/extras/yui/examples/container/js/PanelEffect.js create mode 100644 www/extras/yui/examples/container/js/PhotoBox.js create mode 100644 www/extras/yui/examples/container/js/ResizePanel.js create mode 100644 www/extras/yui/examples/container/keylistener.html create mode 100644 www/extras/yui/examples/container/module.html create mode 100644 www/extras/yui/examples/container/overlay-manager.html create mode 100644 www/extras/yui/examples/container/overlay.html create mode 100644 www/extras/yui/examples/container/panel-aqua.html create mode 100644 www/extras/yui/examples/container/panel-photo.html create mode 100644 www/extras/yui/examples/container/panel-resize.html create mode 100644 www/extras/yui/examples/container/panel-wait.html create mode 100644 www/extras/yui/examples/container/panel-xp.html create mode 100644 www/extras/yui/examples/container/panel.html create mode 100644 www/extras/yui/examples/container/php/post.php create mode 100644 www/extras/yui/examples/container/php/somedata.php create mode 100644 www/extras/yui/examples/container/simpledialog.html create mode 100644 www/extras/yui/examples/container/tooltip.html create mode 100644 www/extras/yui/examples/dom/addclass.html create mode 100644 www/extras/yui/examples/dom/css/dom.css create mode 100644 www/extras/yui/examples/dom/getelementsbyclassname.html create mode 100644 www/extras/yui/examples/dom/getstyle.html create mode 100644 www/extras/yui/examples/dom/getxy.html create mode 100644 www/extras/yui/examples/dom/hasclass.html create mode 100644 www/extras/yui/examples/dom/img/logo.gif create mode 100644 www/extras/yui/examples/dom/index.html create mode 100644 www/extras/yui/examples/dom/removeclass.html create mode 100644 www/extras/yui/examples/dom/setstyle.html create mode 100644 www/extras/yui/examples/dom/setxy.html create mode 100644 www/extras/yui/examples/dragdrop/css/ie.css create mode 100644 www/extras/yui/examples/dragdrop/css/screen.css create mode 100644 www/extras/yui/examples/dragdrop/drag.html create mode 100644 www/extras/yui/examples/dragdrop/grid.html create mode 100644 www/extras/yui/examples/dragdrop/img/GREYBG.PNG create mode 100644 www/extras/yui/examples/dragdrop/img/HEADER.GIF create mode 100644 www/extras/yui/examples/dragdrop/img/bullet.gif create mode 100644 www/extras/yui/examples/dragdrop/img/channel.png create mode 100644 www/extras/yui/examples/dragdrop/img/grid.png create mode 100644 www/extras/yui/examples/dragdrop/img/hline.png create mode 100644 www/extras/yui/examples/dragdrop/img/horizBg.png create mode 100644 www/extras/yui/examples/dragdrop/img/horizSlider.png create mode 100644 www/extras/yui/examples/dragdrop/img/horizSlider_on.png create mode 100644 www/extras/yui/examples/dragdrop/img/hue.png create mode 100644 www/extras/yui/examples/dragdrop/img/logo.gif create mode 100644 www/extras/yui/examples/dragdrop/img/lthumb.png create mode 100644 www/extras/yui/examples/dragdrop/img/navHover2.png create mode 100644 www/extras/yui/examples/dragdrop/img/pickerbg.png create mode 100644 www/extras/yui/examples/dragdrop/img/qbottom.png create mode 100644 www/extras/yui/examples/dragdrop/img/qmiddle.png create mode 100644 www/extras/yui/examples/dragdrop/img/qtop.png create mode 100644 www/extras/yui/examples/dragdrop/img/select.gif create mode 100644 www/extras/yui/examples/dragdrop/img/select.png create mode 100644 www/extras/yui/examples/dragdrop/img/sortList.png create mode 100644 www/extras/yui/examples/dragdrop/img/sq1.png create mode 100644 www/extras/yui/examples/dragdrop/img/sq2.png create mode 100644 www/extras/yui/examples/dragdrop/img/sq3.png create mode 100644 www/extras/yui/examples/dragdrop/img/vertBg.png create mode 100644 www/extras/yui/examples/dragdrop/img/vertSlider.png create mode 100644 www/extras/yui/examples/dragdrop/img/vertSlider_on.png create mode 100644 www/extras/yui/examples/dragdrop/img/vline.png create mode 100644 www/extras/yui/examples/dragdrop/index.html create mode 100644 www/extras/yui/examples/dragdrop/interface.html create mode 100644 www/extras/yui/examples/dragdrop/js/DDList.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDMy.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDMy2.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDOnTop.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDPlayer.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDResize.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDResize2.js create mode 100644 www/extras/yui/examples/dragdrop/js/DDSwap.js create mode 100644 www/extras/yui/examples/dragdrop/js/color.js create mode 100644 www/extras/yui/examples/dragdrop/js/key.js create mode 100644 www/extras/yui/examples/dragdrop/js/log.js create mode 100644 www/extras/yui/examples/dragdrop/list.html create mode 100644 www/extras/yui/examples/dragdrop/multihandle.html create mode 100644 www/extras/yui/examples/dragdrop/ontop.html create mode 100644 www/extras/yui/examples/dragdrop/proxy.html create mode 100644 www/extras/yui/examples/dragdrop/resize.html create mode 100644 www/extras/yui/examples/dragdrop/slider.html create mode 100644 www/extras/yui/examples/dragdrop/targetable.html create mode 100644 www/extras/yui/examples/fonts/default.html create mode 100644 www/extras/yui/examples/fonts/fontfamily.html create mode 100644 www/extras/yui/examples/fonts/fontsize.html create mode 100644 www/extras/yui/examples/grids/example_t1.html create mode 100644 www/extras/yui/examples/grids/example_t2-g1.html create mode 100644 www/extras/yui/examples/grids/example_t2-g10.html create mode 100644 www/extras/yui/examples/grids/example_t2-g2.html create mode 100644 www/extras/yui/examples/grids/example_t2-g3.html create mode 100644 www/extras/yui/examples/grids/example_t2-g4.html create mode 100644 www/extras/yui/examples/grids/example_t2-g5.html create mode 100644 www/extras/yui/examples/grids/example_t2-g6.html create mode 100644 www/extras/yui/examples/grids/example_t2-g7.html create mode 100644 www/extras/yui/examples/grids/example_t2-g8.html create mode 100644 www/extras/yui/examples/grids/example_t2-g9.html create mode 100644 www/extras/yui/examples/grids/example_t2.html create mode 100644 www/extras/yui/examples/grids/example_t3.html create mode 100644 www/extras/yui/examples/grids/example_t4.html create mode 100644 www/extras/yui/examples/grids/example_t5.html create mode 100644 www/extras/yui/examples/grids/example_t6.html create mode 100644 www/extras/yui/examples/grids/example_t7.html create mode 100644 www/extras/yui/examples/logger/autocomplete.html create mode 100644 www/extras/yui/examples/logger/css/examples.css create mode 100644 www/extras/yui/examples/logger/img/logo.gif create mode 100644 www/extras/yui/examples/logger/index.html create mode 100644 www/extras/yui/examples/logger/js/animation-debug.js create mode 100644 www/extras/yui/examples/logger/js/autocomplete-debug.js create mode 100644 www/extras/yui/examples/logger/js/event-debug.js create mode 100644 www/extras/yui/examples/logger/readlogs.html create mode 100644 www/extras/yui/examples/logger/readlogscustom.html create mode 100644 www/extras/yui/examples/logger/writelogs.html create mode 100644 www/extras/yui/examples/menu/applicationmenubar.html create mode 100644 www/extras/yui/examples/menu/contextmenu.html create mode 100644 www/extras/yui/examples/menu/example01.html create mode 100644 www/extras/yui/examples/menu/example02.html create mode 100644 www/extras/yui/examples/menu/example03.html create mode 100644 www/extras/yui/examples/menu/example04.html create mode 100644 www/extras/yui/examples/menu/example05.html create mode 100644 www/extras/yui/examples/menu/example06.html create mode 100644 www/extras/yui/examples/menu/example07.html create mode 100644 www/extras/yui/examples/menu/example08.html create mode 100644 www/extras/yui/examples/menu/example09.html create mode 100644 www/extras/yui/examples/menu/example10.html create mode 100644 www/extras/yui/examples/menu/example11.html create mode 100644 www/extras/yui/examples/menu/example12.html create mode 100644 www/extras/yui/examples/menu/example13.html create mode 100644 www/extras/yui/examples/menu/img/dolly.jpg create mode 100644 www/extras/yui/examples/menu/index.html create mode 100644 www/extras/yui/examples/menu/leftnavfromjs.html create mode 100644 www/extras/yui/examples/menu/leftnavfrommarkup.html create mode 100644 www/extras/yui/examples/menu/programsmenu.html create mode 100644 www/extras/yui/examples/menu/topnavfromjs.html create mode 100644 www/extras/yui/examples/menu/topnavfrommarkup.html create mode 100644 www/extras/yui/examples/slider/basic.html create mode 100644 www/extras/yui/examples/slider/css/screen.css create mode 100644 www/extras/yui/examples/slider/img/bullet.gif create mode 100644 www/extras/yui/examples/slider/img/greybg.png create mode 100644 www/extras/yui/examples/slider/img/header.gif create mode 100644 www/extras/yui/examples/slider/img/hline.png create mode 100644 www/extras/yui/examples/slider/img/horizBg.png create mode 100644 www/extras/yui/examples/slider/img/horizSlider.png create mode 100644 www/extras/yui/examples/slider/img/horizSlider_on.png create mode 100644 www/extras/yui/examples/slider/img/hue.png create mode 100644 www/extras/yui/examples/slider/img/logo.gif create mode 100644 www/extras/yui/examples/slider/img/lthumb.png create mode 100644 www/extras/yui/examples/slider/img/navHover2.png create mode 100644 www/extras/yui/examples/slider/img/pickerbg.png create mode 100644 www/extras/yui/examples/slider/img/qbottom.png create mode 100644 www/extras/yui/examples/slider/img/qmiddle.png create mode 100644 www/extras/yui/examples/slider/img/qtop.png create mode 100644 www/extras/yui/examples/slider/img/select.gif create mode 100644 www/extras/yui/examples/slider/img/select.png create mode 100644 www/extras/yui/examples/slider/img/vertBg.png create mode 100644 www/extras/yui/examples/slider/img/vertSlider.png create mode 100644 www/extras/yui/examples/slider/img/vertSlider_on.png create mode 100644 www/extras/yui/examples/slider/img/vline.png create mode 100644 www/extras/yui/examples/slider/index.html create mode 100644 www/extras/yui/examples/slider/js/color.js create mode 100644 www/extras/yui/examples/slider/js/key.js create mode 100644 www/extras/yui/examples/slider/js/log.js create mode 100644 www/extras/yui/examples/slider/js/logger.js create mode 100644 www/extras/yui/examples/slider/rgb.html create mode 100644 www/extras/yui/examples/slider/rgb2.html create mode 100644 www/extras/yui/examples/treeview/anim.html create mode 100644 www/extras/yui/examples/treeview/check.html create mode 100644 www/extras/yui/examples/treeview/css/check/tree.css create mode 100644 www/extras/yui/examples/treeview/css/code.css create mode 100644 www/extras/yui/examples/treeview/css/default/tree.css create mode 100644 www/extras/yui/examples/treeview/css/default/tree.css.orig create mode 100644 www/extras/yui/examples/treeview/css/folders/tree.css create mode 100644 www/extras/yui/examples/treeview/css/local/tree.css create mode 100644 www/extras/yui/examples/treeview/css/menu/tree.css create mode 100644 www/extras/yui/examples/treeview/css/screen.css create mode 100644 www/extras/yui/examples/treeview/default.html create mode 100644 www/extras/yui/examples/treeview/dynamic.html create mode 100644 www/extras/yui/examples/treeview/folders.html create mode 100644 www/extras/yui/examples/treeview/html.html create mode 100644 www/extras/yui/examples/treeview/img/bullet.gif create mode 100644 www/extras/yui/examples/treeview/img/check/check0.gif create mode 100644 www/extras/yui/examples/treeview/img/check/check1.gif create mode 100644 www/extras/yui/examples/treeview/img/check/check2.gif create mode 100644 www/extras/yui/examples/treeview/img/check/lm.gif create mode 100644 www/extras/yui/examples/treeview/img/check/lmh.gif create mode 100644 www/extras/yui/examples/treeview/img/check/ln.gif create mode 100644 www/extras/yui/examples/treeview/img/check/loading.gif create mode 100644 www/extras/yui/examples/treeview/img/check/lp.gif create mode 100644 www/extras/yui/examples/treeview/img/check/lph.gif create mode 100644 www/extras/yui/examples/treeview/img/check/tm.gif create mode 100644 www/extras/yui/examples/treeview/img/check/tmh.gif create mode 100644 www/extras/yui/examples/treeview/img/check/tn.gif create mode 100644 www/extras/yui/examples/treeview/img/check/tp.gif create mode 100644 www/extras/yui/examples/treeview/img/check/tph.gif create mode 100644 www/extras/yui/examples/treeview/img/check/vline.gif create mode 100644 www/extras/yui/examples/treeview/img/default/lm.gif create mode 100644 www/extras/yui/examples/treeview/img/default/lmh.gif create mode 100644 www/extras/yui/examples/treeview/img/default/ln.gif create mode 100644 www/extras/yui/examples/treeview/img/default/loading.gif create mode 100644 www/extras/yui/examples/treeview/img/default/lp.gif create mode 100644 www/extras/yui/examples/treeview/img/default/lph.gif create mode 100644 www/extras/yui/examples/treeview/img/default/tm.gif create mode 100644 www/extras/yui/examples/treeview/img/default/tmh.gif create mode 100644 www/extras/yui/examples/treeview/img/default/tn.gif create mode 100644 www/extras/yui/examples/treeview/img/default/tp.gif create mode 100644 www/extras/yui/examples/treeview/img/default/tph.gif create mode 100644 www/extras/yui/examples/treeview/img/default/vline.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/lm.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/lmh.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/ln.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/loading.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/lp.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/lph.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/tm.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/tmh.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/tn.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/tp.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/tph.gif create mode 100644 www/extras/yui/examples/treeview/img/folders/vline.gif create mode 100644 www/extras/yui/examples/treeview/img/greybg.png create mode 100644 www/extras/yui/examples/treeview/img/header.gif create mode 100644 www/extras/yui/examples/treeview/img/logo.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/collapse.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/collapseh.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/collapseon.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/dash.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/expand.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/expandh.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/expandon.gif create mode 100644 www/extras/yui/examples/treeview/img/menu/loading.gif create mode 100644 www/extras/yui/examples/treeview/img/navHover2.png create mode 100644 www/extras/yui/examples/treeview/img/qbottom.png create mode 100644 www/extras/yui/examples/treeview/img/qmiddle.png create mode 100644 www/extras/yui/examples/treeview/img/qtop.png create mode 100644 www/extras/yui/examples/treeview/index.html create mode 100644 www/extras/yui/examples/treeview/js/CheckOnClickNode.js create mode 100644 www/extras/yui/examples/treeview/js/TaskNode.js create mode 100644 www/extras/yui/examples/treeview/js/dpSyntaxHighlighter.js create mode 100644 www/extras/yui/examples/treeview/js/json.js create mode 100644 www/extras/yui/examples/treeview/js/key.js create mode 100644 www/extras/yui/examples/treeview/js/log.js create mode 100644 www/extras/yui/examples/treeview/menu.html diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c7f0535a6..7f90d98ce 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -25,11 +25,15 @@ - fix: editing posts loses changes in preview - change: Asset::getContainer no longer changes the session asset - fix: Survey numeric multiple choice options + - fix: Matrix/can't remove picture from listing - fix: inability to create shortcuts to threads - fix: Style templates do not render metadata - fix: Survey duplication not working - fix: "Open link in new window" with WebGUI asset tree link in TinyMCE - fix: Admin Users submenu doesn't fill in uid + - Added YUI javascript library to the core, so that we can begin converting + to a standard javascript API. + - fix: Resizable textarea no longer works in IE - fix: EMS Manage Events broken - fix: "orig_dependant" JavaScript error in PM quick task display - fix: Tasks now start at zero duration in the PM system @@ -43,8 +47,6 @@ - fix: Default PM Dashboard Template extra form element not implemented yet - refactor: move Dashboard, Folder, and HttpProxy getEditForm overrides into definition clauses - possible fix: Dates messed up on subscriptions - -7.1.4 - Template variables in the main Survey Template were out of date in the documentation. - fix: SQLReport no longer paginates or runs nested queries when downloading. diff --git a/docs/upgrades/upgrade_7.1.3-7.2.0.pl b/docs/upgrades/upgrade_7.1.3-7.2.0.pl index eb91381d0..7e459de76 100644 --- a/docs/upgrades/upgrade_7.1.3-7.2.0.pl +++ b/docs/upgrades/upgrade_7.1.3-7.2.0.pl @@ -13,6 +13,7 @@ use strict; use Getopt::Long; use WebGUI::Session; use WebGUI::Workflow; +use WebGUI::AdSpace; my $toVersion = "7.2.0"; # make this match what version you're going to my $quiet; # this line required @@ -27,15 +28,34 @@ addLastExportedAs($session); addDeletionWorkflows($session); addRSSFromParent($session); reorderSurveyCollateral($session); +deleteFiles($session); +fixAds($session); finish($session); # this line required +#-------------------------------------------------- +sub deleteFiles { + my $session = shift; + print "\tDelete unnecessary files.\n" unless ($quiet); + unlink "../../lib/WebGUI/i18n/English/Form_Textarea.pm"; +} + +#-------------------------------------------------- +sub fixAds { + my $session = shift; + print "\tFixing ads so they work in IE.\n" unless ($quiet); + foreach my $adSpace (@{WebGUI::AdSpace->getAdSpaces($session)}) { + foreach my $ad (@{$adSpace->getAds}) { + $ad->set({}); + } + } +} + #-------------------------------------------------- sub addRssUrlMacroProcessing { my $session = shift; print "\tAdding option to process macros in a Syndicated Content RSS Url.\n" unless ($quiet); $session->db->write("alter table SyndicatedContent add column processMacroInRssUrl int(11) default 0"); - } ##------------------------------------------------- diff --git a/lib/WebGUI/AdSpace.pm b/lib/WebGUI/AdSpace.pm index 459bc1c37..ad8869daa 100644 --- a/lib/WebGUI/AdSpace.pm +++ b/lib/WebGUI/AdSpace.pm @@ -178,6 +178,25 @@ sub getAds { #------------------------------------------------------------------- +=head2 getAdSpaces ( session ) + +Returns an array reference containing all the ad spaces. This is a class method. + +=cut + +sub getAdSpaces { + my $class = shift; + my $session = shift; + my @ads = (); + my $rs = $session->db->read("select adSpaceId from adSpace order by title"); + while (my ($id) = $rs->array) { + push(@ads, WebGUI::AdSpace->new($session, $id)); + } + return \@ads; +} + +#------------------------------------------------------------------- + =head2 getId ( ) Returns the id of this object. diff --git a/lib/WebGUI/AdSpace/Ad.pm b/lib/WebGUI/AdSpace/Ad.pm index ab5f70c50..a530699be 100644 --- a/lib/WebGUI/AdSpace/Ad.pm +++ b/lib/WebGUI/AdSpace/Ad.pm @@ -254,17 +254,10 @@ sub set { # prerender the ad for faster display my $adSpace = WebGUI::AdSpace->new($self->session, $self->get("adSpaceId")); if ($self->get("type") eq "text") { - $self->{_properties}{renderedAd} = 'getId) - .'" style="text-decoration: none;">
get("height") - 2).'px; color: '.$self->get("textColor") - .'; background-color: '.$self->get("backgroundColor") - .'; border: 1px solid '.$self->get("borderColor").';">' - .$self->get("title").'
'.$self->get("adText").'
'; + $self->{_properties}{renderedAd} = '
get("height")-2).'px; margin:0px; overflow:hidden; border:solid '.$self->get("borderColor").' 1px;">getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top; background-color:'.$self->get("backgroundColor").'; font-size: 13px; font-weight: normal;">'.$self->get("title").'
'.$self->get("adText").'
'; } elsif ($self->get("type") eq "image") { my $storage = WebGUI::Storage::Image->get($self->session, $self->get("storageId")); - $self->{_properties}{renderedAd} = 'getId).'">
get("height").'px;">'.$self->get(
'; - + $self->{_properties}{renderedAd} = '
get("height").'px; margin:0px; overflow:hidden; border:0px;">getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top;">'.$self->get(
'; } elsif ($self->get("type") eq "rich") { $self->{_properties}{renderedAd} = $self->get("richMedia"); } diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index c2e58ac77..dd8b799a2 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -516,13 +516,33 @@ sub www_edit { $i18n->get("edit matrix")); } +#------------------------------------------------------------------- + +=head2 www_deleteImage ( ) + +Deletes and attached file. + +=cut + +sub www_deleteImage { + my $self = shift; + my $listing = $self->session->db->getRow("Matrix_listing","listingId",$self->session->form->process("listingId")); + my $i18n = WebGUI::International->new($self->session,'Asset_Matrix'); + return $i18n->get('no edit rights') unless ($self->session->user->userId eq $listing->{maintainerId} || $self->canEdit); + if ($listing->{storageId} ne "") { + my $storage = WebGUI::Storage::Image->get($self->session, $listing->{storageId}); + $storage->delete; + } + return $self->www_editListing($listing, $i18n); +} + #------------------------------------------------------------------- sub www_editListing { my $self = shift; - my $listing= $self->session->db->getRow("Matrix_listing","listingId",$self->session->form->process("listingId")); - my $i18n = WebGUI::International->new($self->session,'Asset_Matrix'); + my $listing= shift || $self->session->db->getRow("Matrix_listing","listingId",$self->session->form->process("listingId")); + my $i18n = shift || WebGUI::International->new($self->session,'Asset_Matrix'); return $i18n->get('no edit rights') unless (($self->session->form->process("listingId") eq "new" && $self->session->user->isInGroup($self->get("groupToAdd"))) || $self->session->user->userId eq $listing->{maintainerId} || $self->canEdit); my $f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl); $f->hidden( @@ -555,12 +575,10 @@ sub www_editListing { $f->image( name=>"screenshot", label=>$i18n->get("screenshot"), - hoverHelp=>$i18n->get("screenshot help") + value=>$listing->{storageId}, + hoverHelp=>$i18n->get("screenshot help"), + deleteFileUrl=>$self->getUrl("func=deleteImage;listingId=".$listing->{listingId}.";filename=") ); - if ($listing->{filename} && $listing->{storageId}) { - my $storage = WebGUI::Storage::Image->get($self->session, $listing->{storageId}); - $f->readOnly(value=>''.$listing->{filename}.''); - } $f->text( -name=>"manufacturerName", -value=>$listing->{manufacturerName}, diff --git a/lib/WebGUI/Form/Textarea.pm b/lib/WebGUI/Form/Textarea.pm index 91620cc38..590c302b0 100644 --- a/lib/WebGUI/Form/Textarea.pm +++ b/lib/WebGUI/Form/Textarea.pm @@ -106,17 +106,30 @@ Renders an input tag of type text. sub toHtml { my $self = shift; - my $resize = undef; - if ($self->get("resizeable")) { - my $i18n = WebGUI::International->new($self->session, "Form_Textarea"); - $self->session->style->setScript($self->session->url->extras("resizeable_textarea.js"), {type=>"text/javascript"}); - $resize = ''.$i18n->get('; - } my $value = $self->fixMacros($self->fixTags($self->fixSpecialCharacters($self->get("value")))); my $width = $self->get('width') || 400; my $height = $self->get('height') || 150; my $style = "width: ".$width."px; height: ".$height."px; ".$self->get("style"); - return ''.$resize; + my $out = ''; + if ($self->get("resizeable")) { + $out = '
'.$out.'
'; + my ($style, $url) = $self->session->quick(qw(style url)); + $style->setScript($url->extras("yui/build/yahoo/yahoo.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui/build/event/event.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui/build/dom/dom.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui/build/dragdrop/dragdrop.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui/build/logger/logger.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui-ext/yui-ext-core.js"), {type=>"text/javascript"}); + $style->setScript($url->extras("yui-ext/resizable-lib.js"), {type=>"text/javascript"}); + $style->setLink($url->extras("yui-ext/resources/css/resizable.css"), {type=>"text/css", rel=>"stylesheet"}); + $out .= qq| + + |; + } + return $out; } diff --git a/lib/WebGUI/Operation/AdSpace.pm b/lib/WebGUI/Operation/AdSpace.pm index 9b463920d..b6ed2a47e 100644 --- a/lib/WebGUI/Operation/AdSpace.pm +++ b/lib/WebGUI/Operation/AdSpace.pm @@ -380,13 +380,12 @@ sub www_manageAdSpaces { my $ac = WebGUI::AdminConsole->new($session,"adSpace"); my $i18n = WebGUI::International->new($session,"AdSpace"); my $output = ""; - my $rs = $session->db->read("select adSpaceId, title from adSpace order by title"); - while (my ($id, $title) = $rs->array) { + foreach my $adSpace (@{WebGUI::AdSpace->getAdSpaces($session)}) { $output .= '
' - .$session->icon->delete("op=deleteAdSpace;adSpaceId=".$id, undef, $i18n->get("confirm ad space delete")) - .$session->icon->edit("op=editAdSpace;adSpaceId=".$id) - .' '.$title.'
' - .WebGUI::AdSpace->new($session, $id)->displayImpression(1) + .$session->icon->delete("op=deleteAdSpace;adSpaceId=".$adSpace->getId, undef, $i18n->get("confirm ad space delete")) + .$session->icon->edit("op=editAdSpace;adSpaceId=".$adSpace->getId) + .' '.$adSpace->get("title").'
' + .$adSpace->displayImpression(1) .'
'; } $output .= '
'; diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index d04e8e2cc..9f7acbf48 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -78,11 +78,7 @@ Macros are processed in the tags if processed by this method. sub generateAdditionalHeadTags { my $self = shift; - # generate additional raw tags my $tags = $self->{_raw}; - # generate additional link tags - # generate additional javascript tags - $tags .= join '', values %{ $self->{_link} }, values %{ $self->{_javascript} }; delete $self->{_raw}; delete $self->{_javascript}; delete $self->{_link}; @@ -287,12 +283,8 @@ sub setLink { $tag .= ' '.$name.'="'.$params->{$name}.'"'; } $tag .= ' />'."\n"; - if ($self->sent) { - $self->session->output->print($tag); - } - else { - $self->{_link}{$url} = $tag; - } + $self->{_link}{$url} = 1; + $self->setRawHeadTags($tag); } #------------------------------------------------------------------- @@ -401,12 +393,8 @@ sub setScript { $tag .= ' '.$name.'="'.$params->{$name}.'"'; } $tag .= '>'."\n"; - if ($self->sent) { - $self->session->output->print($tag); - } - else { - $self->{_javascript}{$url} = $tag; - } + $self->{_javascript}{$url} = 1; + $self->setRawHeadTags($tag); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/i18n/English/Form_Textarea.pm b/lib/WebGUI/i18n/English/Form_Textarea.pm deleted file mode 100644 index a3050e644..000000000 --- a/lib/WebGUI/i18n/English/Form_Textarea.pm +++ /dev/null @@ -1,12 +0,0 @@ -package WebGUI::i18n::English::Form_Textarea; ##Be sure to change the package name to match the filename - -our $I18N = { ##hashref of hashes - 'drag to resize' => { - message => q|Drag to Resize|, - lastUpdated => 0, - context => q|alt tag for the text area drag icon| - }, - -}; - -1; diff --git a/www/extras/yui-ext/README.txt b/www/extras/yui-ext/README.txt new file mode 100644 index 000000000..7936cdf33 --- /dev/null +++ b/www/extras/yui-ext/README.txt @@ -0,0 +1,8 @@ +yui-ext.js includes the entire library. + +All other files in this directory depend on yui-ext-core.js. + +editor-grid-lib.js includes everything in basic-grid-lib.js AND editing support. basic-grid-lib.js is NOT required for editor-grid-lib.js. + +If you have the JS Builder, you can create your own output files using yui-ext.jsb. + diff --git a/www/extras/yui-ext/animator-lib.js b/www/extras/yui-ext/animator-lib.js new file mode 100644 index 000000000..011d123c6 --- /dev/null +++ b/www/extras/yui-ext/animator-lib.js @@ -0,0 +1,39 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.Actor=function(element,animator,selfCapture){YAHOO.ext.Actor.superclass.constructor.call(this,element,true);this.el=YAHOO.ext.Element.get(this.id);this.onCapture=new YAHOO.util.CustomEvent('Actor.onCapture');if(animator){animator.addActor(this);} +this.capturing=selfCapture;this.playlist=selfCapture?new YAHOO.ext.Animator.AnimSequence():null;};YAHOO.extendX(YAHOO.ext.Actor,YAHOO.ext.Element);YAHOO.ext.Actor.prototype.capture=function(action){if(this.playlist!=null){this.playlist.add(action);} +this.onCapture.fireDirect(this,action);return action;};YAHOO.ext.Actor.overrideAnimation=function(method,animParam,onParam){return function(){if(!this.capturing){return method.apply(this,arguments);} +var args=Array.prototype.slice.call(arguments,0);if(args[animParam]===true){return this.capture(new YAHOO.ext.Actor.AsyncAction(this,method,args,onParam));}else{return this.capture(new YAHOO.ext.Actor.Action(this,method,args));}};} +YAHOO.ext.Actor.overrideBasic=function(method){return function(){if(!this.capturing){return method.apply(this,arguments);} +var args=Array.prototype.slice.call(arguments,0);return this.capture(new YAHOO.ext.Actor.Action(this,method,args));};} +YAHOO.ext.Actor.prototype.setVisibilityMode=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setVisibilityMode);YAHOO.ext.Actor.prototype.enableDisplayMode=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.enableDisplayMode);YAHOO.ext.Actor.prototype.focus=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.focus);YAHOO.ext.Actor.prototype.addClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.addClass);YAHOO.ext.Actor.prototype.removeClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.removeClass);YAHOO.ext.Actor.prototype.replaceClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.replaceClass);YAHOO.ext.Actor.prototype.setStyle=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setStyle);YAHOO.ext.Actor.prototype.setX=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setX);YAHOO.ext.Actor.prototype.setY=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setY);YAHOO.ext.Actor.prototype.setLeft=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setLeft);YAHOO.ext.Actor.prototype.setTop=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setTop);YAHOO.ext.Actor.prototype.setAbsolutePositioned=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setAbsolutePositioned);YAHOO.ext.Actor.prototype.setRelativePositioned=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setRelativePositioned);YAHOO.ext.Actor.prototype.clearPositioning=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearPositioning);YAHOO.ext.Actor.prototype.setPositioning=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setPositioning);YAHOO.ext.Actor.prototype.clip=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clip);YAHOO.ext.Actor.prototype.unclip=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.unclip);YAHOO.ext.Actor.prototype.clearOpacity=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearOpacity);YAHOO.ext.Actor.prototype.update=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.update);YAHOO.ext.Actor.prototype.animate=function(args,duration,onComplete,easing,animType){if(!this.capturing){return YAHOO.ext.Actor.superclass.animate.apply(this,arguments);} +return this.capture(new YAHOO.ext.Actor.AsyncAction(this,YAHOO.ext.Actor.superclass.animate,[args,duration,onComplete,easing,animType],2));};YAHOO.ext.Actor.prototype.setVisible=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setVisible,1,3);YAHOO.ext.Actor.prototype.toggle=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.toggle,0,2);YAHOO.ext.Actor.prototype.setXY=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setXY,1,3);YAHOO.ext.Actor.prototype.setLocation=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setLocation,2,4);YAHOO.ext.Actor.prototype.setWidth=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setWidth,1,3);YAHOO.ext.Actor.prototype.setHeight=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight,1,3);YAHOO.ext.Actor.prototype.setSize=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setSize,2,4);YAHOO.ext.Actor.prototype.setBounds=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setBounds,4,6);YAHOO.ext.Actor.prototype.setOpacity=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight,1,3);YAHOO.ext.Actor.prototype.moveTo=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.moveTo,2,4);YAHOO.ext.Actor.prototype.move=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.move,2,4);YAHOO.ext.Actor.prototype.alignTo=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.alignTo,3,5);YAHOO.ext.Actor.prototype.hide=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.hide,0,2);YAHOO.ext.Actor.prototype.show=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.show,0,2);YAHOO.ext.Actor.prototype.startCapture=function(){this.capturing=true;this.playlist=new YAHOO.ext.Animator.AnimSequence();};YAHOO.ext.Actor.prototype.stopCapture=function(){this.capturing=false;};YAHOO.ext.Actor.prototype.clear=function(){this.playlist=new YAHOO.ext.Animator.AnimSequence();};YAHOO.ext.Actor.prototype.play=function(oncomplete){this.capturing=false;if(this.playlist){this.playlist.play(oncomplete);}};YAHOO.ext.Actor.prototype.addCall=function(fcn,args,scope){this.capture(new YAHOO.ext.Actor.Action(scope,fcn,args||[]));};YAHOO.ext.Actor.prototype.addAsyncCall=function(fcn,callbackIndex,args,scope){this.capture(new YAHOO.ext.Actor.AsyncAction(scope,fcn,args||[],callbackIndex));},YAHOO.ext.Actor.prototype.pause=function(seconds){this.capture(new YAHOO.ext.Actor.PauseAction(seconds));};YAHOO.ext.Actor.prototype.shake=function(){this.move('left',20,true,.05);this.move('right',40,true,.05);this.move('left',40,true,.05);this.move('right',20,true,.05);};YAHOO.ext.Actor.prototype.bounce=function(){this.move('up',20,true,.05);this.move('down',40,true,.05);this.move('up',40,true,.05);this.move('down',20,true,.05);};YAHOO.ext.Actor.prototype.blindShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;} +this.unclip();return size;};YAHOO.ext.Actor.prototype.blindHide=function(anchor,duration,easing){var size=this.getSize();this.clip();anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setSize(size.width,1,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'l':case'left':this.setSize(1,size.height,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'r':case'right':this.animate({width:{to:1},points:{by:[this.getWidth(),0]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;case'b':case'bottom':this.animate({height:{to:1},points:{by:[0,this.getHeight()]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;} +return size;};YAHOO.ext.Actor.prototype.slideShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();var firstChild=this.dom.firstChild;if(!firstChild||(firstChild.nodeName&&"#TEXT"==firstChild.nodeName.toUpperCase())){this.blindShow(anchor,newSize,duration,easing);return;} +var child=YAHOO.ext.Element.get(firstChild,true);var pos=child.getPositioning();this.addCall(child.setAbsolutePositioned,null,child);this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.addCall(child.setStyle,['right','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;} +this.addCall(child.setPositioning,[pos],child);this.unclip();return size;};YAHOO.ext.Actor.prototype.slideHide=function(anchor,duration,easing){var size=this.getSize();this.clip();var firstChild=this.dom.firstChild;if(!firstChild||(firstChild.nodeName&&"#TEXT"==firstChild.nodeName.toUpperCase())){this.blindHide(anchor,duration,easing);return;} +var child=YAHOO.ext.Element.get(firstChild,true);var pos=child.getPositioning();this.addCall(child.setAbsolutePositioned,null,child);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.setSize(size.width,1,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'l':case'left':this.addCall(child.setStyle,['right','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.setSize(1,size.height,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'r':case'right':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.animate({width:{to:1},points:{by:[this.getWidth(),0]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;case'b':case'bottom':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.animate({height:{to:1},points:{by:[0,this.getHeight()]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;} +this.addCall(child.setPositioning,[pos],child);return size;};YAHOO.ext.Actor.prototype.squish=function(duration){var size=this.getSize();this.clip();this.setSize(1,1,true,duration||.5);this.setVisible(false);return size;};YAHOO.ext.Actor.prototype.appear=function(duration){this.setVisible(true,true,duration);};YAHOO.ext.Actor.prototype.fade=function(duration){this.setVisible(false,true,duration);};YAHOO.ext.Actor.prototype.switchOff=function(duration){this.clip();this.setVisible(false,true,.1);this.clearOpacity();this.setVisible(true);this.animate({height:{to:1},points:{by:[0,this.getHeight()/2]}},duration||.5,null,YAHOO.util.Easing.easeOut,YAHOO.util.Motion);this.setVisible(false);};YAHOO.ext.Actor.prototype.highlight=function(color,fromColor,duration,attribute){attribute=attribute||'backgroundColor';var original=this.getStyle(attribute);fromColor=fromColor||((original&&original!=''&&original!='transparent')?original:'#FFFFFF');var cfg={};cfg[attribute]={to:color,from:fromColor};this.setVisible(true);this.animate(cfg,duration||.5,null,YAHOO.util.Easing.bounceOut,YAHOO.util.ColorAnim);this.setStyle(attribute,original);};YAHOO.ext.Actor.prototype.pulsate=function(count,duration){count=count||3;for(var i=0;i=this.sequences.length&&this.onComplete){this.onComplete();}},stop:function(){for(var i=0;ithis.resizingEl.getX()?YAHOO.ext.SplitBar.LEFT:YAHOO.ext.SplitBar.RIGHT);this.el.setStyle('cursor','e-resize');}else{this.placement=placement||(this.el.getY()>this.resizingEl.getY()?YAHOO.ext.SplitBar.TOP:YAHOO.ext.SplitBar.BOTTOM);this.el.setStyle('cursor','n-resize');} +this.events={'resize':this.onMoved,'moved':this.onMoved}} +YAHOO.ext.SplitBar.prototype={fireEvent:YAHOO.ext.util.Observable.prototype.fireEvent,addListener:YAHOO.ext.util.Observable.prototype.addListener,delayedListener:YAHOO.ext.util.Observable.prototype.delayedListener,removeListener:YAHOO.ext.util.Observable.prototype.removeListener,onStartProxyDrag:function(x,y){if(this.useShim){if(!this.shim){this.shim=YAHOO.ext.SplitBar.createShim();} +this.shim.setVisible(true);} +YAHOO.util.Dom.setStyle(this.proxy,'display','block');var size=this.adapter.getElementSize(this);var c1=size-this.minSize;var c2=Math.max(this.maxSize-size,0);if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==YAHOO.ext.SplitBar.LEFT?c1:c2,this.placement==YAHOO.ext.SplitBar.LEFT?c2:c1);this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==YAHOO.ext.SplitBar.TOP?c1:c2,this.placement==YAHOO.ext.SplitBar.TOP?c2:c1);} +this.dragSpecs.startSize=size;this.dragSpecs.startPoint=[x,y];YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd,x,y);},onEndProxyDrag:function(e){YAHOO.util.Dom.setStyle(this.proxy,'display','none');var endPoint=YAHOO.util.Event.getXY(e);if(this.useShim){this.shim.setVisible(false);} +var newSize;if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.LEFT?endPoint[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-endPoint[0]);}else{newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.TOP?endPoint[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-endPoint[1]);} +newSize=Math.min(Math.max(newSize,this.minSize),this.maxSize);if(newSize!=this.dragSpecs.startSize){this.adapter.setElementSize(this,newSize);this.onMoved.fireDirect(this,newSize);}},getAdapter:function(){return this.adapter;},setAdapter:function(adapter){this.adapter=adapter;this.adapter.init(this);},getMinimumSize:function(){return this.minSize;},setMinimumSize:function(minSize){this.minSize=minSize;},getMaximumSize:function(){return this.maxSize;},setMaximumSize:function(maxSize){this.maxSize=maxSize;},setCurrentSize:function(size){var oldAnimate=this.animate;this.animate=false;this.adapter.setElementSize(this,size);this.animate=oldAnimate;}};YAHOO.ext.SplitBar.createShim=function(){var shim=document.createElement('div');YAHOO.util.Dom.generateId(shim,'split-shim');YAHOO.util.Dom.setStyle(shim,'width','100%');YAHOO.util.Dom.setStyle(shim,'height','100%');YAHOO.util.Dom.setStyle(shim,'position','absolute');YAHOO.util.Dom.setStyle(shim,'background','white');YAHOO.util.Dom.setStyle(shim,'visibility','hidden');YAHOO.util.Dom.setStyle(shim,'z-index',2);window.document.body.appendChild(shim);var shimEl=YAHOO.ext.Element.get(shim);shimEl.setOpacity(.01);shimEl.setXY([0,0]);return shimEl;} +YAHOO.ext.SplitBar.createProxy=function(orientation){var proxy=document.createElement('div');YAHOO.util.Dom.generateId(proxy,'split-proxy');YAHOO.util.Dom.setStyle(proxy,'position','absolute');YAHOO.util.Dom.setStyle(proxy,'visibility','hidden');YAHOO.util.Dom.setStyle(proxy,'z-index',999);YAHOO.util.Dom.setStyle(proxy,'background-color',"#aaa");if(orientation==YAHOO.ext.SplitBar.HORIZONTAL){YAHOO.util.Dom.setStyle(proxy,'cursor','e-resize');}else{YAHOO.util.Dom.setStyle(proxy,'cursor','n-resize');} +YAHOO.util.Dom.setStyle(proxy,'line-height','0px');YAHOO.util.Dom.setStyle(proxy,'font-size','0px');window.document.body.appendChild(proxy);return proxy;} +YAHOO.ext.SplitBar.BasicLayoutAdapter=function(){} +YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype={init:function(s){},getElementSize:function(s){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){return s.resizingEl.getWidth();}else{return s.resizingEl.getHeight();}},setElementSize:function(s,newSize,onComplete){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setWidth(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setWidth(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}else{if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setHeight(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setHeight(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}}};YAHOO.ext.SplitBar.AbsoluteLayoutAdapter=function(container){this.basic=new YAHOO.ext.SplitBar.BasicLayoutAdapter();this.container=getEl(container);} +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(s){this.basic.init(s);},getElementSize:function(s){return this.basic.getElementSize(s);},setElementSize:function(s,newSize,onComplete){this.basic.setElementSize(s,newSize,this.moveSplitter.createDelegate(this,[s]));},moveSplitter:function(s){var yes=YAHOO.ext.SplitBar;switch(s.placement){case yes.LEFT:s.el.setX(s.resizingEl.getRight());break;case yes.RIGHT:s.el.setStyle('right',(this.container.getWidth()-s.resizingEl.getLeft())+'px');break;case yes.TOP:s.el.setY(s.resizingEl.getBottom());break;case yes.BOTTOM:s.el.setY(s.resizingEl.getTop()-s.el.getHeight());break;}}};YAHOO.ext.SplitBar.VERTICAL=1;YAHOO.ext.SplitBar.HORIZONTAL=2;YAHOO.ext.SplitBar.LEFT=1;YAHOO.ext.SplitBar.RIGHT=2;YAHOO.ext.SplitBar.TOP=3;YAHOO.ext.SplitBar.BOTTOM=4; + +YAHOO.ext.Toolbar=function(container){this.el=getEl(container,true);var div=document.createElement('div');div.className='ytoolbar';var tb=document.createElement('table');tb.border=0;tb.cellPadding=0;tb.cellSpacing=0;div.appendChild(tb);var tbody=document.createElement('tbody');tb.appendChild(tbody);var tr=document.createElement('tr');tbody.appendChild(tr);this.el.dom.appendChild(div);this.tr=tr;};YAHOO.ext.Toolbar.prototype={add:function(){for(var i=0;i=pos&&x=this.grid.dataModel.getRowCount()){return null;} +return[colIndex,rowIndex];} +return null;},_adjustForScroll:function(){this.forceScrollUpdate();if(this.scrollbarMode==YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP){var adjustment=0;if(this.wrap.clientWidth&&this.wrap.clientWidth!=0){adjustment=this.wrap.offsetWidth-this.wrap.clientWidth;} +this.hwrap.setWidth(this.wrap.offsetWidth-adjustment);}else{this.hwrap.setWidth(this.wrap.offsetWidth);} +this.bwrap.setWidth(Math.max(this.grid.colModel.getTotalWidth(),this.wrap.clientWidth));},focusRow:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;try{row.childNodes.item(0).hideFocus=true;row.childNodes.item(0).focus();}catch(e){} +this.ensureVisible(row);this.wrap.scrollLeft=left;this.handleScroll();this.lastFocusedRow=row;},ensureVisible:function(row,disableDelay){if(!disableDelay){this.ensureVisibleTask.delay(50,this._ensureVisible,this,[row]);}else{this._ensureVisible(row);}},_ensureVisible:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;var rowTop=parseInt(row.offsetTop,10);var rowBottom=rowTop+row.offsetHeight;var clientTop=parseInt(this.wrap.scrollTop,10);var clientBottom=clientTop+this.wrap.clientHeight;if(rowTopclientBottom){this.wrap.scrollTop=rowBottom-this.wrap.clientHeight;} +this.wrap.scrollLeft=left;this.handleScroll();},updateColumns:function(){this.grid.stopEditing();var colModel=this.grid.colModel;var hcols=this.headers;var colCount=colModel.getColumnCount();var pos=0;var totalWidth=colModel.getTotalWidth();for(var i=0;i'+'{1}'+''+''}]});htemplate.compile();for(var i=0;i0){this.removeRows(0,count-1);}};YAHOO.ext.grid.DefaultDataModel.prototype.query=function(spec,returnUnmatched){var d=this.data;var r=[];for(var i=0;iv2) +return dsc?+1:-1;return 0;};this.data.sort(fn);if(!suppressEvent){this.fireRowsSorted(columnIndex,direction);}}; + +YAHOO.ext.grid.LoadableDataModel=function(dataType){YAHOO.ext.grid.LoadableDataModel.superclass.constructor.call(this,[]);this.onLoad=new YAHOO.util.CustomEvent('load');this.onLoadException=new YAHOO.util.CustomEvent('loadException');this.events['load']=this.onLoad;this.events['beforeload']=new YAHOO.util.CustomEvent('beforeload');this.events['loadexception']=this.onLoadException;this.dataType=dataType;this.preprocessors=[];this.postprocessors=[];this.loadedPage=1;this.remoteSort=false;this.pageSize=0;this.pageUrl=null;this.baseParams={};this.paramMap={'page':'page','pageSize':'pageSize','sortColumn':'sortColumn','sortDir':'sortDir'};};YAHOO.extendX(YAHOO.ext.grid.LoadableDataModel,YAHOO.ext.grid.DefaultDataModel);YAHOO.ext.grid.LoadableDataModel.prototype.setLoadedPage=function(pageNum,userCallback){this.loadedPage=pageNum;if(typeof userCallback=='function'){userCallback();}};YAHOO.ext.grid.LoadableDataModel.prototype.isPaged=function(){return this.pageSize>0;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalRowCount=function(){return this.totalCount||this.getRowCount();};YAHOO.ext.grid.LoadableDataModel.prototype.getPageSize=function(){return this.pageSize;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalPages=function(){if(this.getPageSize()==0||this.getTotalRowCount()==0){return 1;} +return Math.ceil(this.getTotalRowCount()/this.getPageSize());};YAHOO.ext.grid.LoadableDataModel.prototype.initPaging=function(url,pageSize,baseParams){this.pageUrl=url;this.pageSize=pageSize;this.remoteSort=true;if(baseParams)this.baseParams=baseParams;};YAHOO.ext.grid.LoadableDataModel.prototype.createParams=function(pageNum,sortColumn,sortDir){var params={},map=this.paramMap;for(var key in this.baseParams){if(typeof this.baseParams[key]!='function'){params[key]=this.baseParams[key];}} +params[map['page']]=pageNum;params[map['pageSize']]=this.getPageSize();params[map['sortColumn']]=(typeof sortColumn=='undefined'?'':sortColumn);params[map['sortDir']]=sortDir||'';return params;};YAHOO.ext.grid.LoadableDataModel.prototype.loadPage=function(pageNum,callback,keepExisting){var sort=this.getSortState();var params=this.createParams(pageNum,sort.column,sort.direction);this.load(this.pageUrl,params,this.setLoadedPage.createDelegate(this,[pageNum,callback]),keepExisting?(pageNum-1)*this.pageSize:null);};YAHOO.ext.grid.LoadableDataModel.prototype.applySort=function(suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.applySort.apply(this,arguments);}else if(!suppressEvent){var sort=this.getSortState();if(sort.column){this.fireRowsSorted(sort.column,sort.direction,true);}}};YAHOO.ext.grid.LoadableDataModel.prototype.resetPaging=function(){this.loadedPage=1;};YAHOO.ext.grid.LoadableDataModel.prototype.sort=function(columnModel,columnIndex,direction,suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.sort.apply(this,arguments);}else{this.columnModel=columnModel;this.sortColumn=columnIndex;this.sortDir=direction;var params=this.createParams(this.loadedPage,columnIndex,direction);this.load(this.pageUrl,params,this.fireRowsSorted.createDelegate(this,[columnIndex,direction,true]));}} +YAHOO.ext.grid.LoadableDataModel.prototype.load=function(url,params,callback,insertIndex){this.fireEvent('beforeload');if(params&&typeof params!='string'){var buf=[];for(var key in params){if(typeof params[key]!='function'){buf.push(encodeURIComponent(key),'=',encodeURIComponent(params[key]),'&');}} +delete buf[buf.length-1];params=buf.join('');} +var cb={success:this.processResponse,failure:this.processException,scope:this,argument:{callback:callback,insertIndex:insertIndex}};var method=params?'POST':'GET';YAHOO.util.Connect.asyncRequest(method,url,cb,params);};YAHOO.ext.grid.LoadableDataModel.prototype.processResponse=function(response){var cb=response.argument.callback;var keepExisting=(typeof response.argument.insertIndex=='number');var insertIndex=response.argument.insertIndex;switch(this.dataType){case YAHOO.ext.grid.LoadableDataModel.XML:this.loadData(response.responseXML,cb,keepExisting,insertIndex);break;case YAHOO.ext.grid.LoadableDataModel.JSON:var rtext=response.responseText;try{while(rtext.substring(0,1)==" "){rtext=rtext.substring(1,rtext.length);} +if(rtext.indexOf("{")<0){throw"Invalid JSON response";} +if(rtext.indexOf("{}")===0){this.loadData({},response.argument.callback);return;} +var jsonObjRaw=eval("("+rtext+")");if(!jsonObjRaw){throw"Error evaling JSON response";} +this.loadData(jsonObjRaw,cb,keepExisting,insertIndex);}catch(e){this.fireLoadException(e,response);if(typeof callback=='function'){callback(this,false);}} +break;case YAHOO.ext.grid.LoadableDataModel.TEXT:this.loadData(response.responseText,cb,keepExisting,insertIndex);break;};};YAHOO.ext.grid.LoadableDataModel.prototype.processException=function(response){this.fireLoadException(null,response);if(typeof response.argument.callback=='function'){response.argument.callback(this,false);}};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadException=function(e,responseObj){this.onLoadException.fireDirect(this,e,responseObj);};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadEvent=function(){this.fireEvent('load',this.loadedPage,this.getTotalPages());};YAHOO.ext.grid.LoadableDataModel.prototype.addPreprocessor=function(columnIndex,fn){this.preprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPreprocessor=function(columnIndex){return this.preprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePreprocessor=function(columnIndex){this.preprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.addPostprocessor=function(columnIndex,fn){this.postprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPostprocessor=function(columnIndex){return this.postprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePostprocessor=function(columnIndex){this.postprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.loadData=function(data,callback,keepExisting,insertIndex){};YAHOO.ext.grid.LoadableDataModel.XML='xml';YAHOO.ext.grid.LoadableDataModel.JSON='json';YAHOO.ext.grid.LoadableDataModel.TEXT='text'; + +YAHOO.ext.grid.XMLDataModel=function(schema,xml){YAHOO.ext.grid.XMLDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.XML);this.schema=schema;this.xml=xml;if(xml){this.loadData(xml);}};YAHOO.extendX(YAHOO.ext.grid.XMLDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.XMLDataModel.prototype.getDocument=function(){return this.xml;};YAHOO.ext.grid.XMLDataModel.prototype.loadData=function(doc,callback,keepExisting,insertIndex){this.xml=doc;var idField=this.schema.id;var fields=this.schema.fields;if(this.schema.totalTag){this.totalCount=null;var totalNode=doc.getElementsByTagName(this.schema.totalTag);if(totalNode&&totalNode.item(0)&&totalNode.item(0).firstChild){var v=parseInt(totalNode.item(0).firstChild.nodeValue,10);if(!isNaN(v)){this.totalCount=v;}}} +var rowData=[];var nodes=doc.getElementsByTagName(this.schema.tagName);if(nodes&&nodes.length>0){for(var i=0;i0){return this.getNamedValue(node,name.substr(index+1),defaultValue);}}} +return nodeValue;};YAHOO.ext.grid.XMLDataModel.prototype.setNamedValue=function(node,name,value){if(!node||!name){return;} +var attrNode=node.attributes.getNamedItem(name);if(attrNode){attrNode.value=value;return;} +var childNode=node.getElementsByTagName(name);if(childNode&&childNode.item(0)&&childNode.item(0).firstChild){childNode.item(0).firstChild.nodeValue=value;}else{var index=name.indexOf(':');if(index>0){this.setNamedValue(node,name.substr(index+1),value);}}};YAHOO.ext.grid.XMLDataModel.prototype.setValueAt=function(value,rowIndex,colIndex){var node=this.data[rowIndex].node;if(node){var nodeValue=value;if(this.postprocessors[colIndex]){nodeValue=this.postprocessors[colIndex](value);} +this.setNamedValue(node,this.schema.fields[colIndex],nodeValue);} +YAHOO.ext.grid.XMLDataModel.superclass.setValueAt.call(this,value,rowIndex,colIndex);};YAHOO.ext.grid.XMLDataModel.prototype.getRowId=function(rowIndex){return this.data[rowIndex].id;}; + +YAHOO.ext.grid.JSONDataModel=function(schema){YAHOO.ext.grid.JSONDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.JSON);this.schema=schema;};YAHOO.extendX(YAHOO.ext.grid.JSONDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.JSONDataModel.prototype.loadData=function(data,callback,keepExisting){var idField=this.schema.id;var fields=this.schema.fields;var rowData=[];try{var root=eval('data.'+this.schema.root);for(var i=0;i0){var ids=this.selectedRowIds.concat();this.clearSelections();this.selectRowsById(ids,true);}},selectRowsById:function(id,keepExisting){var rows=this.grid.getRowsById(id);this.selectRows(rows,keepExisting);},getCount:function(){return this.selectedRows.length;},selectFirstRow:function(){for(var j=0;j=0;j--){var row=this.grid.rows[j];if(this.isSelectable(row)){this.focusRow(row);this.setRowState(row,true,keepExisting);return;}}}},getSelectedRows:function(){return this.selectedRows;},getSelectedRowIds:function(){return this.selectedRowIds;},clearSelections:function(){if(this.isLocked())return;var oldSelections=this.selectedRows.concat();for(var j=0;j0;},isSelected:function(row){return row&&(row.selected===true||row.getAttribute('selected')=='true');},isSelectable:function(row){return row&&row.getAttribute('selectable')!='false';},rowClick:function(grid,rowIndex,e){if(this.isLocked())return;var row=grid.getRow(rowIndex);if(this.isSelectable(row)){if(e.shiftKey&&this.lastSelectedRow){var lastIndex=this.lastSelectedRow.rowIndex;this.selectRange(this.lastSelectedRow,row,e.ctrlKey);this.lastSelectedRow=this.grid.el.dom.rows[lastIndex];}else{this.focusRow(row);var rowState=e.ctrlKey?!this.isSelected(row):true;this.setRowState(row,rowState,e.hasModifier());}}},focusRow:function(row){this.grid.view.focusRow(row);},selectRow:function(row,keepExisting){this.setRowState(this.getRow(row),true,keepExisting);},selectRows:function(rows,keepExisting){if(!keepExisting){this.clearSelections();} +for(var i=0;i';return b;} +function createDom(o,parentNode){var el=d.createElement(o.tag);var useSet=el.setAttribute?true:false;for(var attr in o){if(attr=='tag'||attr=='children'||attr=='html'||attr=='style'||typeof o[attr]=='function')continue;if(attr=='cls'){el.className=o['cls'];}else{if(useSet)el.setAttribute(attr,o[attr]);else el[attr]=o[attr];}} +applyStyles(el,o.style);if(o.children){for(var i=0,len=o.children.length;i "'+where+'"';} +var range=el.ownerDocument.createRange();var frag;if(where=='beforeBegin'){range.setStartBefore(el);frag=range.createContextualFragment(html);el.parentNode.insertBefore(frag,el);return el.previousSibling;}else if(where=='afterBegin'){range.selectNodeContents(el);range.collapse(true);frag=range.createContextualFragment(html);el.insertBefore(frag,el.firstChild);return el.firstChild;}else if(where=='beforeEnd'){range.selectNodeContents(el);range.collapse(false);frag=range.createContextualFragment(html);el.appendChild(frag);return el.lastChild;}else if(where=='afterEnd'){range.setStartAfter(el);frag=range.createContextualFragment(html);el.parentNode.insertBefore(frag,el.nextSibling);return el.nextSibling;}else{throw'Illegal insertion point -> "'+where+'"';}};this.insertBefore=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.parentNode.insertBefore(newNode,el);}else{var html=createHtml(o);newNode=this.insertHtml('beforeBegin',el,html);} +return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.insertAfter=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.parentNode.insertBefore(newNode,el.nextSibling);}else{var html=createHtml(o);newNode=this.insertHtml('afterEnd',el,html);} +return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.append=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.appendChild(newNode);}else{var html=createHtml(o);newNode=this.insertHtml('beforeEnd',el,html);} +return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.overwrite=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);el.innerHTML=createHtml(o);return returnElement?YAHOO.ext.Element.get(el.firstChild,true):el.firstChild;};this.createTemplate=function(o){var html=createHtml(o);return new YAHOO.ext.DomHelper.Template(html);};}();YAHOO.ext.DomHelper.Template=function(html){this.html=html;this.re=/\{(\w+)\}/g;};YAHOO.ext.DomHelper.Template.prototype={applyTemplate:function(values){if(this.compiled){return this.compiled(values);} +var empty='';var fn=function(match,index){if(typeof values[index]!='undefined'){return values[index];}else{return empty;}} +return this.html.replace(this.re,fn);},compile:function(){var html=this.html;var re=/\{(\w+)\}/g;var body=[];body.push("this.compiled = function(values){ return ");var result;var lastMatchEnd=0;while((result=re.exec(html))!=null){body.push("'",html.substring(lastMatchEnd,result.index),"' + ");body.push("values[",html.substring(result.index+1,re.lastIndex-1),"] + ");lastMatchEnd=re.lastIndex;} +body.push("'",html.substr(lastMatchEnd),"';};");eval(body.join(''));},insertBefore:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('beforeBegin',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},insertAfter:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('afterEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},append:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('beforeEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},overwrite:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);el.innerHTML='';var newNode=YAHOO.ext.DomHelper.insertHtml('beforeEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;}}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/Element-min.js b/www/extras/yui-ext/build/Element-min.js new file mode 100644 index 000000000..2dadd3b99 --- /dev/null +++ b/www/extras/yui-ext/build/Element-min.js @@ -0,0 +1,48 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.Element=function(elementId,forceNew){var dom=YAHOO.util.Dom.get(elementId);if(!dom){return;} +if(!forceNew&&YAHOO.ext.Element.cache[dom.id]){return YAHOO.ext.Element.cache[dom.id];} +this.dom=dom;this.id=this.dom.id;this.visibilityMode=YAHOO.ext.Element.VISIBILITY;this.originalDisplay=YAHOO.util.Dom.getStyle(this.dom,'display');if(!this.originalDisplay||this.originalDisplay=='none'){this.originalDisplay='';} +this.defaultUnit='px';this.originalClip=YAHOO.util.Dom.getStyle(this.dom,'overflow');this.onVisibilityChanged=new YAHOO.util.CustomEvent('visibilityChanged');this.onMoved=new YAHOO.util.CustomEvent('moved');this.onResized=new YAHOO.util.CustomEvent('resized');this.visibilityDelegate=this.fireVisibilityChanged.createDelegate(this);this.resizedDelegate=this.fireResized.createDelegate(this);this.movedDelegate=this.fireMoved.createDelegate(this);} +YAHOO.ext.Element.prototype={fireMoved:function(){this.onMoved.fireDirect(this,this.getX(),this.getY());},fireVisibilityChanged:function(){this.onVisibilityChanged.fireDirect(this,this.isVisible());},fireResized:function(){this.onResized.fireDirect(this,this.getWidth(),this.getHeight());},setVisibilityMode:function(visMode){this.visibilityMode=visMode;},enableDisplayMode:function(){this.setVisibilityMode(YAHOO.ext.Element.DISPLAY)},animate:function(args,duration,onComplete,easing,animType){this.anim(args,duration,onComplete,easing,animType);},anim:function(args,duration,onComplete,easing,animType){animType=animType||YAHOO.util.Anim;var anim=new animType(this.dom,args,duration||.35,easing||YAHOO.util.Easing.easeBoth);if(onComplete){if(!(onComplete instanceof Array)){anim.onComplete.subscribe(onComplete);}else{for(var i=0;ithis.getWidth()?YAHOO.util.Easing.easeOut:YAHOO.util.Easing.easeIn));}},setHeight:function(height,animate,duration,onComplete,easing){height=this.adjustHeight(height);if(!animate||!YAHOO.util.Anim){YAHOO.util.Dom.setStyle(this.dom,'height',this.addUnits(height));this.fireResized();}else{this.anim({height:{to:height}},duration,[onComplete,this.resizedDelegate],easing||(height>this.getHeight()?YAHOO.util.Easing.easeOut:YAHOO.util.Easing.easeIn));}},setSize:function(width,height,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){this.setWidth(width);this.setHeight(height);this.fireResized();}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({width:{to:width},height:{to:height}},duration,[onComplete,this.resizedDelegate],easing);}},setBounds:function(x,y,width,height,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){this.setWidth(width);this.setHeight(height);this.setLocation(x,y);this.fireResized();this.fireMoved();}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},duration,[onComplete,this.movedDelegate],easing,YAHOO.util.Motion);}},setRegion:function(region,animate,duration,onComplete,easing){this.setBounds(region.left,region.top,region.right-region.left,region.bottom-region.top,animate,duration,onComplete,easing);},addListener:function(eventName,handler,scope,override){YAHOO.util.Event.addListener(this.dom,eventName,handler,scope,override);},addHandler:function(eventName,stopPropagation,handler,scope,override){var fn=YAHOO.ext.Element.createStopHandler(stopPropagation,handler,scope,override);YAHOO.util.Event.addListener(this.dom,eventName,fn);},on:function(eventName,handler,scope,override){YAHOO.util.Event.addListener(this.dom,eventName,handler,scope,override);},addManagedListener:function(eventName,fn,scope,override){return YAHOO.ext.EventManager.on(this.dom,eventName,fn,scope,override);},mon:function(eventName,fn,scope,override){return YAHOO.ext.EventManager.on(this.dom,eventName,fn,scope,override);},removeListener:function(eventName,handler){YAHOO.util.Event.removeListener(this.dom,eventName,handler);},removeAllListeners:function(){YAHOO.util.Event.purgeElement(this.dom);},setOpacity:function(opacity,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){YAHOO.util.Dom.setStyle(this.dom,'opacity',opacity);}else{this.anim({opacity:{to:opacity}},duration,onComplete,easing);}},getLeft:function(){return this.getX();},getRight:function(){return this.getX()+this.getWidth();},getTop:function(){return this.getY();},getBottom:function(){return this.getY()+this.getHeight();},setAbsolutePositioned:function(zIndex){this.setStyle('position','absolute');if(zIndex){this.setStyle('z-index',zIndex);}},setRelativePositioned:function(zIndex){this.setStyle('position','relative');if(zIndex){this.setStyle('z-index',zIndex);}},clearPositioning:function(){this.setStyle('position','');this.setStyle('left','');this.setStyle('right','');this.setStyle('top','');this.setStyle('bottom','');},getPositioning:function(){return{'position':this.getStyle('position'),'left':this.getStyle('left'),'right':this.getStyle('right'),'top':this.getStyle('top'),'bottom':this.getStyle('bottom')};},getBorderWidth:function(side){var width=0;var b=YAHOO.ext.Element.borders;for(var s in b){if(typeof b[s]!='function'){if(side.indexOf(s)!==-1){var w=parseInt(this.getStyle(b[s]),10);if(!isNaN(w))width+=w;}}} +return width;},getPadding:function(side){var pad=0;var b=YAHOO.ext.Element.paddings;for(var s in b){if(typeof s[b]!='function'){if(side.indexOf(s)!==-1){var w=parseInt(this.getStyle(b[s]),10);if(!isNaN(w))pad+=w;}}} +return pad;},setPositioning:function(positionCfg){this.setStyle('position',positionCfg.position);this.setStyle('left',positionCfg.left);this.setStyle('right',positionCfg.right);this.setStyle('top',positionCfg.top);this.setStyle('bottom',positionCfg.bottom);},move:function(direction,distance,animate,duration,onComplete,easing){var xy=this.getXY();direction=direction.toLowerCase();switch(direction){case'left':this.moveTo(xy[0]-distance,xy[1],animate,duration,onComplete,easing);return;case'right':this.moveTo(xy[0]+distance,xy[1],animate,duration,onComplete,easing);return;case'up':this.moveTo(xy[0],xy[1]-distance,animate,duration,onComplete,easing);return;case'down':this.moveTo(xy[0],xy[1]+distance,animate,duration,onComplete,easing);return;}},clip:function(){this.setStyle('overflow','hidden');},unclip:function(){this.setStyle('overflow',this.originalClip);},alignTo:function(element,position,offsets,animate,duration,onComplete,easing){var otherEl=getEl(element);if(!otherEl){return;} +offsets=offsets||[0,0];var r=otherEl.getRegion();position=position.toLowerCase();switch(position){case'bl':this.moveTo(r.left+offsets[0],r.bottom+offsets[1],animate,duration,onComplete,easing);return;case'br':this.moveTo(r.right+offsets[0],r.bottom+offsets[1],animate,duration,onComplete,easing);return;case'tl':this.moveTo(r.left+offsets[0],r.top+offsets[1],animate,duration,onComplete,easing);return;case'tr':this.moveTo(r.right+offsets[0],r.top+offsets[1],animate,duration,onComplete,easing);return;}},clearOpacity:function(){if(window.ActiveXObject){this.dom.style.filter='';}else{this.dom.style.opacity='';this.dom.style['-moz-opacity']='';this.dom.style['-khtml-opacity']='';}},hide:function(animate,duration,onComplete,easing){this.setVisible(false,animate,duration,onComplete,easing);},show:function(animate,duration,onComplete,easing){this.setVisible(true,animate,duration,onComplete,easing);},addUnits:function(size){if(typeof size=='number'||!YAHOO.ext.Element.unitPattern.test(size)){return size+this.defaultUnit;} +return size;},beginMeasure:function(){var p=this.dom;if(p.offsetWidth||p.offsetHeight){return;} +var changed=[];var p=this.dom;while(p&&p.tagName.toLowerCase()!='body'){if(YAHOO.util.Dom.getStyle(p,'display')=='none'){changed.push({el:p,visibility:YAHOO.util.Dom.getStyle(p,'visibility')});p.style.visibility='hidden';p.style.display='block';} +p=p.parentNode;} +this._measureChanged=changed;},endMeasure:function(){var changed=this._measureChanged;if(changed){for(var i=0,len=changed.length;i.*<\/script>)|(?:([\S\s]*?)<\/script>)/ig;var match;while(match=re.exec(html)){var s0=document.createElement("script");if(match[1]) +s0.src=match[1];else if(match[2]) +s0.text=match[2];else +continue;docHead.appendChild(s0);}}else{for(var i=0;i');YAHOO.util.Event.on('ie-deferred-loader','readystatechange',function(){if(this.readyState=='complete'){fireDocReady();}});}else if(YAHOO.ext.util.Browser.isSafari){docReadyProcId=setInterval(function(){var rs=document.readyState;if(rs=='loaded'||rs=='complete'){fireDocReady();}},10);} +YAHOO.util.Event.on(window,'load',fireDocReady);};this.wrap=function(fn,scope,override){var wrappedFn=function(e){YAHOO.ext.EventObject.setEvent(e);fn.call(override?scope||window:window,YAHOO.ext.EventObject,scope);};return wrappedFn;};this.addListener=function(element,eventName,fn,scope,override){var wrappedFn=this.wrap(fn,scope,override);YAHOO.util.Event.addListener(element,eventName,wrappedFn);return wrappedFn;};this.removeListener=function(element,eventName,wrappedFn){return YAHOO.util.Event.removeListener(element,eventName,wrappedFn);};this.on=function(element,eventName,fn,scope,override){var wrappedFn=this.wrap(fn,scope,override);YAHOO.util.Event.addListener(element,eventName,wrappedFn);return wrappedFn;};this.onDocumentReady=function(fn,scope,override){if(!docReadyEvent){initDocReady();} +docReadyEvent.subscribe(fn,scope,override);}};YAHOO.ext.EventObject=new function(){this.browserEvent=null;this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.BACKSPACE=8;this.TAB=9;this.RETURN=13;this.ESC=27;this.SPACE=32;this.PAGEUP=33;this.PAGEDOWN=34;this.END=35;this.HOME=36;this.LEFT=37;this.UP=38;this.RIGHT=39;this.DOWN=40;this.DELETE=46;this.F5=116;this.setEvent=function(e){this.browserEvent=e;if(e){this.button=e.button;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;}};this.stopEvent=function(){if(this.browserEvent){YAHOO.util.Event.stopEvent(this.browserEvent);}};this.preventDefault=function(){if(this.browserEvent){YAHOO.util.Event.preventDefault(this.browserEvent);}};this.isNavKeyPress=function(){return(this.browserEvent.keyCode&&this.browserEvent.keyCode>=33&&this.browserEvent.keyCode<=40);};this.stopPropagation=function(){if(this.browserEvent){YAHOO.util.Event.stopPropagation(this.browserEvent);}};this.getCharCode=function(){if(this.browserEvent){return YAHOO.util.Event.getCharCode(this.browserEvent);} +return null;};this.getPageX=function(){if(this.browserEvent){return YAHOO.util.Event.getPageX(this.browserEvent);} +return null;};this.getPageY=function(){if(this.browserEvent){return YAHOO.util.Event.getPageY(this.browserEvent);} +return null;};this.getTime=function(){if(this.browserEvent){return YAHOO.util.Event.getTime(this.browserEvent);} +return null;};this.getXY=function(){if(this.browserEvent){return YAHOO.util.Event.getXY(this.browserEvent);} +return[];};this.getTarget=function(){if(this.browserEvent){return YAHOO.util.Event.getTarget(this.browserEvent);} +return null;};this.findTarget=function(className,tagName){if(tagName)tagName=tagName.toLowerCase();if(this.browserEvent){function isMatch(el){if(!el){return false;} +if(className&&!YAHOO.util.Dom.hasClass(el,className)){return false;} +if(tagName&&el.tagName.toLowerCase()!=tagName){return false;} +return true;};var t=this.getTarget();if(!t||isMatch(t)){return t;} +var p=t.parentNode;while(p&&p.tagName.toUpperCase()!='BODY'){if(isMatch(p)){return p;} +p=p.parentNode;}} +return null;};this.getRelatedTarget=function(){if(this.browserEvent){return YAHOO.util.Event.getRelatedTarget(this.browserEvent);} +return null;};this.getWheelDelta=function(){var e=this.browserEvent;var delta=0;if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera)delta=-delta;}else if(e.detail){delta=-e.detail/3;} +return delta;};this.hasModifier=function(){return this.ctrlKey||this.altKey||this.shiftKey;};}(); \ No newline at end of file diff --git a/www/extras/yui-ext/build/State-min.js b/www/extras/yui-ext/build/State-min.js new file mode 100644 index 000000000..9fa8057c1 --- /dev/null +++ b/www/extras/yui-ext/build/State-min.js @@ -0,0 +1,24 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.namespace('ext.state');YAHOO.ext.state.Provider=function(){YAHOO.ext.state.Provider.superclass.constructor.call(this);this.events={'statechange':new YAHOO.util.CustomEvent('statechange')};this.state={};};YAHOO.extendX(YAHOO.ext.state.Provider,YAHOO.ext.util.Observable,{get:function(name){return this.state[name];},clear:function(name){delete this.state[name];this.fireEvent('statechange',this,name,null);},set:function(name,value){this.state[name]=value;this.fireEvent('statechange',this,name,value);}});YAHOO.ext.state.Manager=new function(){var provider=new YAHOO.ext.state.Provider();return{setProvider:function(stateProvider){provider=stateProvider;},get:function(key){return provider.get(key);},set:function(key,value){provider.set(key,value);},clear:function(key){provider.clear(key);},getProvider:function(){return provider;}};}();YAHOO.ext.state.CookieProvider=function(config){YAHOO.ext.state.CookieProvider.superclass.constructor.call(this);this.path='/';this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;YAHOO.ext.util.Config.apply(this,config);this.state=this.readCookies();};YAHOO.extendX(YAHOO.ext.state.CookieProvider,YAHOO.ext.state.Provider,{set:function(name,value){if(typeof value=='undefined'||value===null){this.clear(name);return;} +this.setCookie(name,value);YAHOO.ext.state.CookieProvider.superclass.set.call(this,name,value);},clear:function(name){this.clearCookie(name);YAHOO.ext.state.CookieProvider.superclass.clear.call(this,name);},readCookies:function(){var cookies={};var c=document.cookie+';';var re=/\s?(.*?)=(.*?);/g;var matches;while((matches=re.exec(c))!=null){var name=matches[1];var value=matches[2];if(name&&name.substring(0,3)=='ys-'){cookies[name.substr(3)]=this.decodeValue(value);}} +return cookies;},decodeValue:function(cookie){var re=/^(a|n|d|b|s|o)\:(.*)$/;var matches=re.exec(unescape(cookie));if(!matches||!matches[1])return;var type=matches[1];var v=matches[2];switch(type){case'n':return parseFloat(v);case'd':return new Date(Date.parse(v));case'b':return(v=='1');case'a':var all=[];var values=v.split('^');for(var i=0,len=values.length;iLoading...'; \ No newline at end of file diff --git a/www/extras/yui-ext/build/anim/Actor-min.js b/www/extras/yui-ext/build/anim/Actor-min.js new file mode 100644 index 000000000..a678a5fa4 --- /dev/null +++ b/www/extras/yui-ext/build/anim/Actor-min.js @@ -0,0 +1,27 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.Actor=function(element,animator,selfCapture){YAHOO.ext.Actor.superclass.constructor.call(this,element,true);this.el=YAHOO.ext.Element.get(this.id);this.onCapture=new YAHOO.util.CustomEvent('Actor.onCapture');if(animator){animator.addActor(this);} +this.capturing=selfCapture;this.playlist=selfCapture?new YAHOO.ext.Animator.AnimSequence():null;};YAHOO.extendX(YAHOO.ext.Actor,YAHOO.ext.Element);YAHOO.ext.Actor.prototype.capture=function(action){if(this.playlist!=null){this.playlist.add(action);} +this.onCapture.fireDirect(this,action);return action;};YAHOO.ext.Actor.overrideAnimation=function(method,animParam,onParam){return function(){if(!this.capturing){return method.apply(this,arguments);} +var args=Array.prototype.slice.call(arguments,0);if(args[animParam]===true){return this.capture(new YAHOO.ext.Actor.AsyncAction(this,method,args,onParam));}else{return this.capture(new YAHOO.ext.Actor.Action(this,method,args));}};} +YAHOO.ext.Actor.overrideBasic=function(method){return function(){if(!this.capturing){return method.apply(this,arguments);} +var args=Array.prototype.slice.call(arguments,0);return this.capture(new YAHOO.ext.Actor.Action(this,method,args));};} +YAHOO.ext.Actor.prototype.setVisibilityMode=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setVisibilityMode);YAHOO.ext.Actor.prototype.enableDisplayMode=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.enableDisplayMode);YAHOO.ext.Actor.prototype.focus=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.focus);YAHOO.ext.Actor.prototype.addClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.addClass);YAHOO.ext.Actor.prototype.removeClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.removeClass);YAHOO.ext.Actor.prototype.replaceClass=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.replaceClass);YAHOO.ext.Actor.prototype.setStyle=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setStyle);YAHOO.ext.Actor.prototype.setX=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setX);YAHOO.ext.Actor.prototype.setY=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setY);YAHOO.ext.Actor.prototype.setLeft=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setLeft);YAHOO.ext.Actor.prototype.setTop=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setTop);YAHOO.ext.Actor.prototype.setAbsolutePositioned=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setAbsolutePositioned);YAHOO.ext.Actor.prototype.setRelativePositioned=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setRelativePositioned);YAHOO.ext.Actor.prototype.clearPositioning=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearPositioning);YAHOO.ext.Actor.prototype.setPositioning=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setPositioning);YAHOO.ext.Actor.prototype.clip=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clip);YAHOO.ext.Actor.prototype.unclip=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.unclip);YAHOO.ext.Actor.prototype.clearOpacity=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearOpacity);YAHOO.ext.Actor.prototype.update=YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.update);YAHOO.ext.Actor.prototype.animate=function(args,duration,onComplete,easing,animType){if(!this.capturing){return YAHOO.ext.Actor.superclass.animate.apply(this,arguments);} +return this.capture(new YAHOO.ext.Actor.AsyncAction(this,YAHOO.ext.Actor.superclass.animate,[args,duration,onComplete,easing,animType],2));};YAHOO.ext.Actor.prototype.setVisible=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setVisible,1,3);YAHOO.ext.Actor.prototype.toggle=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.toggle,0,2);YAHOO.ext.Actor.prototype.setXY=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setXY,1,3);YAHOO.ext.Actor.prototype.setLocation=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setLocation,2,4);YAHOO.ext.Actor.prototype.setWidth=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setWidth,1,3);YAHOO.ext.Actor.prototype.setHeight=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight,1,3);YAHOO.ext.Actor.prototype.setSize=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setSize,2,4);YAHOO.ext.Actor.prototype.setBounds=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setBounds,4,6);YAHOO.ext.Actor.prototype.setOpacity=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight,1,3);YAHOO.ext.Actor.prototype.moveTo=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.moveTo,2,4);YAHOO.ext.Actor.prototype.move=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.move,2,4);YAHOO.ext.Actor.prototype.alignTo=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.alignTo,3,5);YAHOO.ext.Actor.prototype.hide=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.hide,0,2);YAHOO.ext.Actor.prototype.show=YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.show,0,2);YAHOO.ext.Actor.prototype.startCapture=function(){this.capturing=true;this.playlist=new YAHOO.ext.Animator.AnimSequence();};YAHOO.ext.Actor.prototype.stopCapture=function(){this.capturing=false;};YAHOO.ext.Actor.prototype.clear=function(){this.playlist=new YAHOO.ext.Animator.AnimSequence();};YAHOO.ext.Actor.prototype.play=function(oncomplete){this.capturing=false;if(this.playlist){this.playlist.play(oncomplete);}};YAHOO.ext.Actor.prototype.addCall=function(fcn,args,scope){this.capture(new YAHOO.ext.Actor.Action(scope,fcn,args||[]));};YAHOO.ext.Actor.prototype.addAsyncCall=function(fcn,callbackIndex,args,scope){this.capture(new YAHOO.ext.Actor.AsyncAction(scope,fcn,args||[],callbackIndex));},YAHOO.ext.Actor.prototype.pause=function(seconds){this.capture(new YAHOO.ext.Actor.PauseAction(seconds));};YAHOO.ext.Actor.prototype.shake=function(){this.move('left',20,true,.05);this.move('right',40,true,.05);this.move('left',40,true,.05);this.move('right',20,true,.05);};YAHOO.ext.Actor.prototype.bounce=function(){this.move('up',20,true,.05);this.move('down',40,true,.05);this.move('up',40,true,.05);this.move('down',20,true,.05);};YAHOO.ext.Actor.prototype.blindShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;} +this.unclip();return size;};YAHOO.ext.Actor.prototype.blindHide=function(anchor,duration,easing){var size=this.getSize();this.clip();anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setSize(size.width,1,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'l':case'left':this.setSize(1,size.height,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'r':case'right':this.animate({width:{to:1},points:{by:[this.getWidth(),0]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;case'b':case'bottom':this.animate({height:{to:1},points:{by:[0,this.getHeight()]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;} +return size;};YAHOO.ext.Actor.prototype.slideShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();var firstChild=this.dom.firstChild;if(!firstChild||(firstChild.nodeName&&"#TEXT"==firstChild.nodeName.toUpperCase())){this.blindShow(anchor,newSize,duration,easing);return;} +var child=YAHOO.ext.Element.get(firstChild,true);var pos=child.getPositioning();this.addCall(child.setAbsolutePositioned,null,child);this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.addCall(child.setStyle,['right','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;} +this.addCall(child.setPositioning,[pos],child);this.unclip();return size;};YAHOO.ext.Actor.prototype.slideHide=function(anchor,duration,easing){var size=this.getSize();this.clip();var firstChild=this.dom.firstChild;if(!firstChild||(firstChild.nodeName&&"#TEXT"==firstChild.nodeName.toUpperCase())){this.blindHide(anchor,duration,easing);return;} +var child=YAHOO.ext.Element.get(firstChild,true);var pos=child.getPositioning();this.addCall(child.setAbsolutePositioned,null,child);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.setSize(size.width,1,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'l':case'left':this.addCall(child.setStyle,['right','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.setSize(1,size.height,true,duration||.5,null,easing||YAHOO.util.Easing.easeIn);this.setVisible(false);break;case'r':case'right':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['top','0px'],child);this.animate({width:{to:1},points:{by:[this.getWidth(),0]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;case'b':case'bottom':this.addCall(child.setStyle,['left','0px'],child);this.addCall(child.setStyle,['bottom','0px'],child);this.animate({height:{to:1},points:{by:[0,this.getHeight()]}},duration||.5,null,YAHOO.util.Easing.easeIn,YAHOO.util.Motion);this.setVisible(false);break;} +this.addCall(child.setPositioning,[pos],child);return size;};YAHOO.ext.Actor.prototype.squish=function(duration){var size=this.getSize();this.clip();this.setSize(1,1,true,duration||.5);this.setVisible(false);return size;};YAHOO.ext.Actor.prototype.appear=function(duration){this.setVisible(true,true,duration);};YAHOO.ext.Actor.prototype.fade=function(duration){this.setVisible(false,true,duration);};YAHOO.ext.Actor.prototype.switchOff=function(duration){this.clip();this.setVisible(false,true,.1);this.clearOpacity();this.setVisible(true);this.animate({height:{to:1},points:{by:[0,this.getHeight()/2]}},duration||.5,null,YAHOO.util.Easing.easeOut,YAHOO.util.Motion);this.setVisible(false);};YAHOO.ext.Actor.prototype.highlight=function(color,fromColor,duration,attribute){attribute=attribute||'backgroundColor';var original=this.getStyle(attribute);fromColor=fromColor||((original&&original!=''&&original!='transparent')?original:'#FFFFFF');var cfg={};cfg[attribute]={to:color,from:fromColor};this.setVisible(true);this.animate(cfg,duration||.5,null,YAHOO.util.Easing.bounceOut,YAHOO.util.ColorAnim);this.setStyle(attribute,original);};YAHOO.ext.Actor.prototype.pulsate=function(count,duration){count=count||3;for(var i=0;i=this.sequences.length&&this.onComplete){this.onComplete();}},stop:function(){for(var i=0;i0){this.removeRows(0,count-1);}};YAHOO.ext.grid.DefaultDataModel.prototype.query=function(spec,returnUnmatched){var d=this.data;var r=[];for(var i=0;iv2) +return dsc?+1:-1;return 0;};this.data.sort(fn);if(!suppressEvent){this.fireRowsSorted(columnIndex,direction);}}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/data/JSONDataModel-min.js b/www/extras/yui-ext/build/data/JSONDataModel-min.js new file mode 100644 index 000000000..dab72f09a --- /dev/null +++ b/www/extras/yui-ext/build/data/JSONDataModel-min.js @@ -0,0 +1,16 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.JSONDataModel=function(schema){YAHOO.ext.grid.JSONDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.JSON);this.schema=schema;};YAHOO.extendX(YAHOO.ext.grid.JSONDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.JSONDataModel.prototype.loadData=function(data,callback,keepExisting){var idField=this.schema.id;var fields=this.schema.fields;var rowData=[];try{var root=eval('data.'+this.schema.root);for(var i=0;i0;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalRowCount=function(){return this.totalCount||this.getRowCount();};YAHOO.ext.grid.LoadableDataModel.prototype.getPageSize=function(){return this.pageSize;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalPages=function(){if(this.getPageSize()==0||this.getTotalRowCount()==0){return 1;} +return Math.ceil(this.getTotalRowCount()/this.getPageSize());};YAHOO.ext.grid.LoadableDataModel.prototype.initPaging=function(url,pageSize,baseParams){this.pageUrl=url;this.pageSize=pageSize;this.remoteSort=true;if(baseParams)this.baseParams=baseParams;};YAHOO.ext.grid.LoadableDataModel.prototype.createParams=function(pageNum,sortColumn,sortDir){var params={},map=this.paramMap;for(var key in this.baseParams){if(typeof this.baseParams[key]!='function'){params[key]=this.baseParams[key];}} +params[map['page']]=pageNum;params[map['pageSize']]=this.getPageSize();params[map['sortColumn']]=(typeof sortColumn=='undefined'?'':sortColumn);params[map['sortDir']]=sortDir||'';return params;};YAHOO.ext.grid.LoadableDataModel.prototype.loadPage=function(pageNum,callback,keepExisting){var sort=this.getSortState();var params=this.createParams(pageNum,sort.column,sort.direction);this.load(this.pageUrl,params,this.setLoadedPage.createDelegate(this,[pageNum,callback]),keepExisting?(pageNum-1)*this.pageSize:null);};YAHOO.ext.grid.LoadableDataModel.prototype.applySort=function(suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.applySort.apply(this,arguments);}else if(!suppressEvent){var sort=this.getSortState();if(sort.column){this.fireRowsSorted(sort.column,sort.direction,true);}}};YAHOO.ext.grid.LoadableDataModel.prototype.resetPaging=function(){this.loadedPage=1;};YAHOO.ext.grid.LoadableDataModel.prototype.sort=function(columnModel,columnIndex,direction,suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.sort.apply(this,arguments);}else{this.columnModel=columnModel;this.sortColumn=columnIndex;this.sortDir=direction;var params=this.createParams(this.loadedPage,columnIndex,direction);this.load(this.pageUrl,params,this.fireRowsSorted.createDelegate(this,[columnIndex,direction,true]));}} +YAHOO.ext.grid.LoadableDataModel.prototype.load=function(url,params,callback,insertIndex){this.fireEvent('beforeload');if(params&&typeof params!='string'){var buf=[];for(var key in params){if(typeof params[key]!='function'){buf.push(encodeURIComponent(key),'=',encodeURIComponent(params[key]),'&');}} +delete buf[buf.length-1];params=buf.join('');} +var cb={success:this.processResponse,failure:this.processException,scope:this,argument:{callback:callback,insertIndex:insertIndex}};var method=params?'POST':'GET';YAHOO.util.Connect.asyncRequest(method,url,cb,params);};YAHOO.ext.grid.LoadableDataModel.prototype.processResponse=function(response){var cb=response.argument.callback;var keepExisting=(typeof response.argument.insertIndex=='number');var insertIndex=response.argument.insertIndex;switch(this.dataType){case YAHOO.ext.grid.LoadableDataModel.XML:this.loadData(response.responseXML,cb,keepExisting,insertIndex);break;case YAHOO.ext.grid.LoadableDataModel.JSON:var rtext=response.responseText;try{while(rtext.substring(0,1)==" "){rtext=rtext.substring(1,rtext.length);} +if(rtext.indexOf("{")<0){throw"Invalid JSON response";} +if(rtext.indexOf("{}")===0){this.loadData({},response.argument.callback);return;} +var jsonObjRaw=eval("("+rtext+")");if(!jsonObjRaw){throw"Error evaling JSON response";} +this.loadData(jsonObjRaw,cb,keepExisting,insertIndex);}catch(e){this.fireLoadException(e,response);if(typeof callback=='function'){callback(this,false);}} +break;case YAHOO.ext.grid.LoadableDataModel.TEXT:this.loadData(response.responseText,cb,keepExisting,insertIndex);break;};};YAHOO.ext.grid.LoadableDataModel.prototype.processException=function(response){this.fireLoadException(null,response);if(typeof response.argument.callback=='function'){response.argument.callback(this,false);}};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadException=function(e,responseObj){this.onLoadException.fireDirect(this,e,responseObj);};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadEvent=function(){this.fireEvent('load',this.loadedPage,this.getTotalPages());};YAHOO.ext.grid.LoadableDataModel.prototype.addPreprocessor=function(columnIndex,fn){this.preprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPreprocessor=function(columnIndex){return this.preprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePreprocessor=function(columnIndex){this.preprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.addPostprocessor=function(columnIndex,fn){this.postprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPostprocessor=function(columnIndex){return this.postprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePostprocessor=function(columnIndex){this.postprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.loadData=function(data,callback,keepExisting,insertIndex){};YAHOO.ext.grid.LoadableDataModel.XML='xml';YAHOO.ext.grid.LoadableDataModel.JSON='json';YAHOO.ext.grid.LoadableDataModel.TEXT='text'; \ No newline at end of file diff --git a/www/extras/yui-ext/build/data/XMLDataModel-min.js b/www/extras/yui-ext/build/data/XMLDataModel-min.js new file mode 100644 index 000000000..aa13e29c2 --- /dev/null +++ b/www/extras/yui-ext/build/data/XMLDataModel-min.js @@ -0,0 +1,26 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.XMLDataModel=function(schema,xml){YAHOO.ext.grid.XMLDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.XML);this.schema=schema;this.xml=xml;if(xml){this.loadData(xml);}};YAHOO.extendX(YAHOO.ext.grid.XMLDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.XMLDataModel.prototype.getDocument=function(){return this.xml;};YAHOO.ext.grid.XMLDataModel.prototype.loadData=function(doc,callback,keepExisting,insertIndex){this.xml=doc;var idField=this.schema.id;var fields=this.schema.fields;if(this.schema.totalTag){this.totalCount=null;var totalNode=doc.getElementsByTagName(this.schema.totalTag);if(totalNode&&totalNode.item(0)&&totalNode.item(0).firstChild){var v=parseInt(totalNode.item(0).firstChild.nodeValue,10);if(!isNaN(v)){this.totalCount=v;}}} +var rowData=[];var nodes=doc.getElementsByTagName(this.schema.tagName);if(nodes&&nodes.length>0){for(var i=0;i0){return this.getNamedValue(node,name.substr(index+1),defaultValue);}}} +return nodeValue;};YAHOO.ext.grid.XMLDataModel.prototype.setNamedValue=function(node,name,value){if(!node||!name){return;} +var attrNode=node.attributes.getNamedItem(name);if(attrNode){attrNode.value=value;return;} +var childNode=node.getElementsByTagName(name);if(childNode&&childNode.item(0)&&childNode.item(0).firstChild){childNode.item(0).firstChild.nodeValue=value;}else{var index=name.indexOf(':');if(index>0){this.setNamedValue(node,name.substr(index+1),value);}}};YAHOO.ext.grid.XMLDataModel.prototype.setValueAt=function(value,rowIndex,colIndex){var node=this.data[rowIndex].node;if(node){var nodeValue=value;if(this.postprocessors[colIndex]){nodeValue=this.postprocessors[colIndex](value);} +this.setNamedValue(node,this.schema.fields[colIndex],nodeValue);} +YAHOO.ext.grid.XMLDataModel.superclass.setValueAt.call(this,value,rowIndex,colIndex);};YAHOO.ext.grid.XMLDataModel.prototype.getRowId=function(rowIndex){return this.data[rowIndex].id;}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/grid/AbstractColumnModel-min.js b/www/extras/yui-ext/build/grid/AbstractColumnModel-min.js new file mode 100644 index 000000000..6142d317e --- /dev/null +++ b/www/extras/yui-ext/build/grid/AbstractColumnModel-min.js @@ -0,0 +1,10 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.AbstractColumnModel=function(){this.onWidthChange=new YAHOO.util.CustomEvent('widthChanged');this.onHeaderChange=new YAHOO.util.CustomEvent('headerChanged');this.onHiddenChange=new YAHOO.util.CustomEvent('hiddenChanged');};YAHOO.ext.grid.AbstractColumnModel.prototype={fireWidthChange:function(colIndex,newWidth){this.onWidthChange.fireDirect(this,colIndex,newWidth);},fireHeaderChange:function(colIndex,newHeader){this.onHeaderChange.fireDirect(this,colIndex,newHeader);},fireHiddenChange:function(colIndex,hidden){this.onHiddenChange.fireDirect(this,colIndex,hidden);},getColumnCount:function(){return 0;},isSortable:function(col){return false;},isHidden:function(col){return false;},getSortType:function(col){return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none;},getRenderer:function(col){return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer;},getColumnWidth:function(col){return 0;},getTotalWidth:function(){return 0;},getColumnHeader:function(col){return'';}}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/grid/DefaultColumnModel-min.js b/www/extras/yui-ext/build/grid/DefaultColumnModel-min.js new file mode 100644 index 000000000..392c81472 --- /dev/null +++ b/www/extras/yui-ext/build/grid/DefaultColumnModel-min.js @@ -0,0 +1,20 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.DefaultColumnModel=function(config){YAHOO.ext.grid.DefaultColumnModel.superclass.constructor.call(this);this.config=config;this.defaultWidth=100;this.defaultSortable=false;};YAHOO.extendX(YAHOO.ext.grid.DefaultColumnModel,YAHOO.ext.grid.AbstractColumnModel);YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnCount=function(){return this.config.length;};YAHOO.ext.grid.DefaultColumnModel.prototype.isSortable=function(col){if(typeof this.config[col].sortable=='undefined'){return this.defaultSortable;} +return this.config[col].sortable;};YAHOO.ext.grid.DefaultColumnModel.prototype.getSortType=function(col){if(!this.dataMap){var map=[];for(var i=0,len=this.config.length;i=pos&&x=this.grid.dataModel.getRowCount()){return null;} +return[colIndex,rowIndex];} +return null;},_adjustForScroll:function(){this.forceScrollUpdate();if(this.scrollbarMode==YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP){var adjustment=0;if(this.wrap.clientWidth&&this.wrap.clientWidth!=0){adjustment=this.wrap.offsetWidth-this.wrap.clientWidth;} +this.hwrap.setWidth(this.wrap.offsetWidth-adjustment);}else{this.hwrap.setWidth(this.wrap.offsetWidth);} +this.bwrap.setWidth(Math.max(this.grid.colModel.getTotalWidth(),this.wrap.clientWidth));},focusRow:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;try{row.childNodes.item(0).hideFocus=true;row.childNodes.item(0).focus();}catch(e){} +this.ensureVisible(row);this.wrap.scrollLeft=left;this.handleScroll();this.lastFocusedRow=row;},ensureVisible:function(row,disableDelay){if(!disableDelay){this.ensureVisibleTask.delay(50,this._ensureVisible,this,[row]);}else{this._ensureVisible(row);}},_ensureVisible:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;var rowTop=parseInt(row.offsetTop,10);var rowBottom=rowTop+row.offsetHeight;var clientTop=parseInt(this.wrap.scrollTop,10);var clientBottom=clientTop+this.wrap.clientHeight;if(rowTopclientBottom){this.wrap.scrollTop=rowBottom-this.wrap.clientHeight;} +this.wrap.scrollLeft=left;this.handleScroll();},updateColumns:function(){this.grid.stopEditing();var colModel=this.grid.colModel;var hcols=this.headers;var colCount=colModel.getColumnCount();var pos=0;var totalWidth=colModel.getTotalWidth();for(var i=0;i'+'{1}'+''+''}]});htemplate.compile();for(var i=0;i0){var ids=this.selectedRowIds.concat();this.clearSelections();this.selectRowsById(ids,true);}},selectRowsById:function(id,keepExisting){var rows=this.grid.getRowsById(id);this.selectRows(rows,keepExisting);},getCount:function(){return this.selectedRows.length;},selectFirstRow:function(){for(var j=0;j=0;j--){var row=this.grid.rows[j];if(this.isSelectable(row)){this.focusRow(row);this.setRowState(row,true,keepExisting);return;}}}},getSelectedRows:function(){return this.selectedRows;},getSelectedRowIds:function(){return this.selectedRowIds;},clearSelections:function(){if(this.isLocked())return;var oldSelections=this.selectedRows.concat();for(var j=0;j0;},isSelected:function(row){return row&&(row.selected===true||row.getAttribute('selected')=='true');},isSelectable:function(row){return row&&row.getAttribute('selectable')!='false';},rowClick:function(grid,rowIndex,e){if(this.isLocked())return;var row=grid.getRow(rowIndex);if(this.isSelectable(row)){if(e.shiftKey&&this.lastSelectedRow){var lastIndex=this.lastSelectedRow.rowIndex;this.selectRange(this.lastSelectedRow,row,e.ctrlKey);this.lastSelectedRow=this.grid.el.dom.rows[lastIndex];}else{this.focusRow(row);var rowState=e.ctrlKey?!this.isSelected(row):true;this.setRowState(row,rowState,e.hasModifier());}}},focusRow:function(row){this.grid.view.focusRow(row);},selectRow:function(row,keepExisting){this.setRowState(this.getRow(row),true,keepExisting);},selectRows:function(rows,keepExisting){if(!keepExisting){this.clearSelections();} +for(var i=0;ithis.maxValue.getTime()){dom.title=this.maxText.replace('%0',this.formatDate(this.maxValue));this.element.addClass('ygrid-editor-invalid');return false;} +if(this.disabledDays){var day=value.getDay();for(var i=0;ithis.maxValue){dom.title=this.maxText.replace('%0',this.maxValue);this.element.addClass('ygrid-editor-invalid');return false;} +var msg=this.validator(value);if(msg!==true){dom.title=msg;this.element.addClass('ygrid-editor-invalid');return false;} +dom.title='';this.element.removeClass('ygrid-editor-invalid');return true;};YAHOO.ext.grid.NumberEditor.prototype.show=function(){this.element.dom.title='';YAHOO.ext.grid.NumberEditor.superclass.show.call(this);if(this.selectOnFocus){try{this.element.dom.select();}catch(e){}} +this.validate(this.element.dom.value);};YAHOO.ext.grid.NumberEditor.prototype.getValue=function(){if(!this.validate()){return this.originalValue;}else{var value=this.element.dom.value;if(value.length<1){return value;}else{return this.fixPrecision(this.parseValue(value));}}};YAHOO.ext.grid.NumberEditor.prototype.parseValue=function(value){return parseFloat(new String(value).replace(this.decimalSeparator,'.'));};YAHOO.ext.grid.NumberEditor.prototype.fixPrecision=function(value){if(!this.allowDecimals||this.decimalPrecision==-1||isNaN(value)||value==0||!value){return value;} +var scale=Math.pow(10,this.decimalPrecision+1);var fixed=this.decimalPrecisionFcn(value*scale);fixed=this.decimalPrecisionFcn(fixed/10);return fixed/(scale/10);};YAHOO.ext.grid.NumberEditor.prototype.allowBlank=true;YAHOO.ext.grid.NumberEditor.prototype.allowDecimals=true;YAHOO.ext.grid.NumberEditor.prototype.decimalSeparator='.';YAHOO.ext.grid.NumberEditor.prototype.decimalPrecision=2;YAHOO.ext.grid.NumberEditor.prototype.decimalPrecisionFcn=Math.floor;YAHOO.ext.grid.NumberEditor.prototype.allowNegative=true;YAHOO.ext.grid.NumberEditor.prototype.selectOnFocus=true;YAHOO.ext.grid.NumberEditor.prototype.minValue=Number.NEGATIVE_INFINITY;YAHOO.ext.grid.NumberEditor.prototype.maxValue=Number.MAX_VALUE;YAHOO.ext.grid.NumberEditor.prototype.minText='The minimum value for this field is %0';YAHOO.ext.grid.NumberEditor.prototype.maxText='The maximum value for this field is %0';YAHOO.ext.grid.NumberEditor.prototype.blankText='This field cannot be blank';YAHOO.ext.grid.NumberEditor.prototype.nanText='%0 is not a valid number';YAHOO.ext.grid.NumberEditor.prototype.validationDelay=100;YAHOO.ext.grid.NumberEditor.prototype.validator=function(){return true;}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/grid/editor/SelectEditor-min.js b/www/extras/yui-ext/build/grid/editor/SelectEditor-min.js new file mode 100644 index 000000000..e24cfb62c --- /dev/null +++ b/www/extras/yui-ext/build/grid/editor/SelectEditor-min.js @@ -0,0 +1,11 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.SelectEditor=function(element){element.hideFocus=true;YAHOO.ext.grid.SelectEditor.superclass.constructor.call(this,element);};YAHOO.extendX(YAHOO.ext.grid.SelectEditor,YAHOO.ext.grid.CellEditor);YAHOO.ext.grid.SelectEditor.prototype.fitToCell=function(box){if(YAHOO.ext.util.Browser.isGecko){box.height-=3;} +this.element.setBox(box,true);}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/grid/editor/TextEditor-min.js b/www/extras/yui-ext/build/grid/editor/TextEditor-min.js new file mode 100644 index 000000000..860acf7d5 --- /dev/null +++ b/www/extras/yui-ext/build/grid/editor/TextEditor-min.js @@ -0,0 +1,16 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.TextEditor=function(config){var element=document.createElement('input');element.type='text';element.className='ygrid-editor ygrid-text-editor';element.setAttribute('autocomplete','off');document.body.appendChild(element);YAHOO.ext.grid.TextEditor.superclass.constructor.call(this,element);YAHOO.ext.util.Config.apply(this,config);};YAHOO.extendX(YAHOO.ext.grid.TextEditor,YAHOO.ext.grid.CellEditor);YAHOO.ext.grid.TextEditor.prototype.validate=function(){var dom=this.element.dom;var value=dom.value;if(value.length<1){if(this.allowBlank){dom.title='';this.element.removeClass('ygrid-editor-invalid');return true;}else{dom.title=this.blankText;this.element.addClass('ygrid-editor-invalid');return false;}} +if(value.lengththis.maxLength){dom.title=this.maxText.replace('%0',this.maxLength);this.element.addClass('ygrid-editor-invalid');return false;} +var msg=this.validator(value);if(msg!==true){dom.title=msg;this.element.addClass('ygrid-editor-invalid');return false;} +if(this.regex&&!this.regex.test(value)){dom.title=this.regexText;this.element.addClass('ygrid-editor-invalid');return false;} +dom.title='';this.element.removeClass('ygrid-editor-invalid');return true;};YAHOO.ext.grid.TextEditor.prototype.initEvents=function(){YAHOO.ext.grid.TextEditor.superclass.initEvents.call(this);var vtask=new YAHOO.ext.util.DelayedTask(this.validate,this);this.element.mon('keyup',vtask.delay.createDelegate(vtask,[this.validationDelay]));};YAHOO.ext.grid.TextEditor.prototype.show=function(){this.element.dom.title='';YAHOO.ext.grid.TextEditor.superclass.show.call(this);this.element.focus();if(this.selectOnFocus){try{this.element.dom.select();}catch(e){}} +this.validate(this.element.dom.value);};YAHOO.ext.grid.TextEditor.prototype.getValue=function(){if(!this.validate()){return this.originalValue;}else{return this.element.dom.value;}};YAHOO.ext.grid.TextEditor.prototype.allowBlank=true;YAHOO.ext.grid.TextEditor.prototype.minLength=0;YAHOO.ext.grid.TextEditor.prototype.maxLength=Number.MAX_VALUE;YAHOO.ext.grid.TextEditor.prototype.minText='The minimum length for this field is %0';YAHOO.ext.grid.TextEditor.prototype.maxText='The maximum length for this field is %0';YAHOO.ext.grid.TextEditor.prototype.selectOnFocus=true;YAHOO.ext.grid.TextEditor.prototype.blankText='This field cannot be blank';YAHOO.ext.grid.TextEditor.prototype.validator=function(){return true;};YAHOO.ext.grid.TextEditor.prototype.validationDelay=200;YAHOO.ext.grid.TextEditor.prototype.regex=null;YAHOO.ext.grid.TextEditor.prototype.regexText=''; \ No newline at end of file diff --git a/www/extras/yui-ext/build/widgets/DatePicker-min.js b/www/extras/yui-ext/build/widgets/DatePicker-min.js new file mode 100644 index 000000000..2d32da5ce --- /dev/null +++ b/www/extras/yui-ext/build/widgets/DatePicker-min.js @@ -0,0 +1,22 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.DatePicker=function(id,parentElement){this.id=id;this.selectedDate=new Date();this.visibleDate=new Date();this.element=null;this.shadow=null;this.callback=null;this.buildControl(parentElement||document.body);this.mouseDownHandler=YAHOO.ext.EventManager.wrap(this.handleMouseDown,this,true);this.keyDownHandler=YAHOO.ext.EventManager.wrap(this.handleKeyDown,this,true);this.wheelHandler=YAHOO.ext.EventManager.wrap(this.handleMouseWheel,this,true);};YAHOO.ext.DatePicker.prototype={show:function(x,y,value,callback){this.hide();this.selectedDate=value;this.visibleDate=value;this.callback=callback;this.refresh();this.element.show();this.element.moveTo(x,y);this.shadow.show();this.shadow.setRegion(this.element.getRegion());this.element.dom.tabIndex=1;this.element.focus();YAHOO.util.Event.on(document,"mousedown",this.mouseDownHandler);YAHOO.util.Event.on(document,"keydown",this.keyDownHandler);YAHOO.util.Event.on(document,"mousewheel",this.wheelHandler);YAHOO.util.Event.on(document,"DOMMouseScroll",this.wheelHandler);},hide:function(){this.shadow.hide();this.element.hide();YAHOO.util.Event.removeListener(document,"mousedown",this.mouseDownHandler);YAHOO.util.Event.removeListener(document,"keydown",this.keyDownHandler);YAHOO.util.Event.removeListener(document,"mousewheel",this.wheelHandler);YAHOO.util.Event.removeListener(document,"DOMMouseScroll",this.wheelHandler);},setSelectedDate:function(date){this.selectedDate=date;},getSelectedDate:function(){return this.selectedDate;},showPrevMonth:function(){this.visibleDate=this.getPrevMonth(this.visibleDate);this.refresh();},showNextMonth:function(){this.visibleDate=this.getNextMonth(this.visibleDate);this.refresh();},showPrevYear:function(){var d=this.visibleDate;this.visibleDate=new Date(d.getFullYear()-1,d.getMonth(),d.getDate());this.refresh();},showNextYear:function(){var d=this.visibleDate;this.visibleDate=new Date(d.getFullYear()+1,d.getMonth(),d.getDate());this.refresh();},handleMouseDown:function(e){var target=e.getTarget();if(target!=this.element.dom&&!YAHOO.util.Dom.isAncestor(this.element.dom,target)){this.hide();}},handleKeyDown:function(e){switch(e.browserEvent.keyCode){case e.LEFT:this.showPrevMonth();e.stopEvent();break;case e.RIGHT:this.showNextMonth();e.stopEvent();break;case e.DOWN:this.showPrevYear();e.stopEvent();break;case e.UP:this.showNextYear();e.stopEvent();break;}},handleMouseWheel:function(e){var delta=e.getWheelDelta();if(delta>0){this.showPrevMonth();e.stopEvent();}else if(delta<0){this.showNextMonth();e.stopEvent();}},handleClick:function(e){var d=this.visibleDate;var t=e.getTarget();if(t&&t.className){switch(t.className){case'active':this.handleSelection(new Date(d.getFullYear(),d.getMonth(),parseInt(t.innerHTML)));break;case'prevday':var p=this.getPrevMonth(d);this.handleSelection(new Date(p.getFullYear(),p.getMonth(),parseInt(t.innerHTML)));break;case'nextday':var n=this.getNextMonth(d);this.handleSelection(new Date(n.getFullYear(),n.getMonth(),parseInt(t.innerHTML)));break;case'ypopcal-today':this.handleSelection(new Date());break;case'next-month':this.showNextMonth();break;case'prev-month':this.showPrevMonth();break;}} +e.stopEvent();},selectToday:function(){this.handleSelection(new Date());},handleSelection:function(date){this.selectedDate=date;this.callback(date);this.hide();},getPrevMonth:function(d){var m=d.getMonth();var y=d.getFullYear();return(m==0?new Date(--y,11,1):new Date(y,--m,1));},getNextMonth:function(d){var m=d.getMonth();var y=d.getFullYear();return(m==11?new Date(++y,0,1):new Date(y,++m,1));},getDaysInMonth:function(m,y){return(m==1||m==3||m==5||m==7||m==8||m==10||m==12)?31:(m==4||m==6||m==9||m==11)?30:this.isLeapYear(y)?29:28;},isLeapYear:function(y){return(((y%4)==0)&&((y%100)!=0)||((y%400)==0));},clearTime:function(date){if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);} +return date;},refresh:function(){var d=this.visibleDate;this.buildInnerCal(d);this.calHead.update(this.monthNames[d.getMonth()]+' '+d.getFullYear());if(this.element.isVisible()){this.shadow.setRegion(this.element.getRegion());}}};YAHOO.ext.DatePicker.prototype.buildControl=function(parentElement){var c=document.createElement('div');c.style.position='absolute';c.style.visibility='hidden';document.body.appendChild(c);var html=''+'';c.innerHTML=html;this.shadow=getEl(c.childNodes[0],true);this.shadow.enableDisplayMode();this.element=getEl(c.childNodes[1],true);this.element.enableDisplayMode();document.body.appendChild(this.shadow.dom);document.body.appendChild(this.element.dom);document.body.removeChild(c);this.element.on("selectstart",function(){return false;});var tbody=this.element.dom.getElementsByTagName('tbody')[1];this.cells=tbody.getElementsByTagName('td');this.calHead=this.element.getChildrenByClassName('ypopcal-month','td')[0];this.element.mon('mousedown',this.handleClick,this,true);};YAHOO.ext.DatePicker.prototype.buildInnerCal=function(dateVal){var days=this.getDaysInMonth(dateVal.getMonth()+1,dateVal.getFullYear());var firstOfMonth=new Date(dateVal.getFullYear(),dateVal.getMonth(),1);var startingPos=firstOfMonth.getDay();if(startingPos==0)startingPos=7;var pm=this.getPrevMonth(dateVal);var prevStart=this.getDaysInMonth(pm.getMonth()+1,pm.getFullYear())-startingPos;var cells=this.cells;days+=startingPos;var day=86400000;var date=this.clearTime(new Date(pm.getFullYear(),pm.getMonth(),prevStart));var today=this.clearTime(new Date()).getTime();var sel=this.selectedDate?this.clearTime(this.selectedDate).getTime():today+1;var min=this.minDate?this.clearTime(this.minDate).getTime():Number.NEGATIVE_INFINITY;var max=this.maxDate?this.clearTime(this.maxDate).getTime():Number.POSITIVE_INFINITY;var ddMatch=this.disabledDatesRE;var ddText=this.disabledDatesText;var ddays=this.disabledDays;var ddaysText=this.disabledDaysText;var format=this.format;var setCellClass=function(cal,cell,d){cell.title='';var t=d.getTime();if(t==today){cell.className+=' today';cell.title=cal.todayText;} +if(t==sel){cell.className+=' selected';} +if(tmax){cell.className=' ypopcal-disabled';cell.title=cal.maxText;return;} +if(ddays){var day=d.getDay();for(var i=0;i=this.minWidth){this.proxy.setX(x);this.proxy.setWidth(w);}else if(this.dir=='north'&&h<=this.maxHeight&&h>=this.minHeight){this.proxy.setY(y);this.proxy.setHeight(h);}} +if(this.dynamic){this.resizeElement();}}},onMouseOver:function(){if(this.enabled)this.el.addClass('yresizable-over');},onMouseOut:function(){this.el.removeClass('yresizable-over');}}); \ No newline at end of file diff --git a/www/extras/yui-ext/build/widgets/SplitBar-min.js b/www/extras/yui-ext/build/widgets/SplitBar-min.js new file mode 100644 index 000000000..a76692ca2 --- /dev/null +++ b/www/extras/yui-ext/build/widgets/SplitBar-min.js @@ -0,0 +1,24 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.util.DragDropMgr.clickTimeThresh=350;YAHOO.ext.SplitBar=function(dragElement,resizingElement,orientation,placement){this.el=YAHOO.ext.Element.get(dragElement,true);this.resizingEl=YAHOO.ext.Element.get(resizingElement,true);this.orientation=orientation||YAHOO.ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.onMoved=new YAHOO.util.CustomEvent("SplitBarMoved",this);this.animate=false;this.useShim=false;this.shim=null;this.proxy=YAHOO.ext.SplitBar.createProxy(this.orientation);this.dd=new YAHOO.util.DDProxy(this.el.dom.id,"SplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new YAHOO.ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){this.placement=placement||(this.el.getX()>this.resizingEl.getX()?YAHOO.ext.SplitBar.LEFT:YAHOO.ext.SplitBar.RIGHT);this.el.setStyle('cursor','e-resize');}else{this.placement=placement||(this.el.getY()>this.resizingEl.getY()?YAHOO.ext.SplitBar.TOP:YAHOO.ext.SplitBar.BOTTOM);this.el.setStyle('cursor','n-resize');} +this.events={'resize':this.onMoved,'moved':this.onMoved}} +YAHOO.ext.SplitBar.prototype={fireEvent:YAHOO.ext.util.Observable.prototype.fireEvent,addListener:YAHOO.ext.util.Observable.prototype.addListener,delayedListener:YAHOO.ext.util.Observable.prototype.delayedListener,removeListener:YAHOO.ext.util.Observable.prototype.removeListener,onStartProxyDrag:function(x,y){if(this.useShim){if(!this.shim){this.shim=YAHOO.ext.SplitBar.createShim();} +this.shim.setVisible(true);} +YAHOO.util.Dom.setStyle(this.proxy,'display','block');var size=this.adapter.getElementSize(this);var c1=size-this.minSize;var c2=Math.max(this.maxSize-size,0);if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==YAHOO.ext.SplitBar.LEFT?c1:c2,this.placement==YAHOO.ext.SplitBar.LEFT?c2:c1);this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==YAHOO.ext.SplitBar.TOP?c1:c2,this.placement==YAHOO.ext.SplitBar.TOP?c2:c1);} +this.dragSpecs.startSize=size;this.dragSpecs.startPoint=[x,y];YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd,x,y);},onEndProxyDrag:function(e){YAHOO.util.Dom.setStyle(this.proxy,'display','none');var endPoint=YAHOO.util.Event.getXY(e);if(this.useShim){this.shim.setVisible(false);} +var newSize;if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.LEFT?endPoint[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-endPoint[0]);}else{newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.TOP?endPoint[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-endPoint[1]);} +newSize=Math.min(Math.max(newSize,this.minSize),this.maxSize);if(newSize!=this.dragSpecs.startSize){this.adapter.setElementSize(this,newSize);this.onMoved.fireDirect(this,newSize);}},getAdapter:function(){return this.adapter;},setAdapter:function(adapter){this.adapter=adapter;this.adapter.init(this);},getMinimumSize:function(){return this.minSize;},setMinimumSize:function(minSize){this.minSize=minSize;},getMaximumSize:function(){return this.maxSize;},setMaximumSize:function(maxSize){this.maxSize=maxSize;},setCurrentSize:function(size){var oldAnimate=this.animate;this.animate=false;this.adapter.setElementSize(this,size);this.animate=oldAnimate;}};YAHOO.ext.SplitBar.createShim=function(){var shim=document.createElement('div');YAHOO.util.Dom.generateId(shim,'split-shim');YAHOO.util.Dom.setStyle(shim,'width','100%');YAHOO.util.Dom.setStyle(shim,'height','100%');YAHOO.util.Dom.setStyle(shim,'position','absolute');YAHOO.util.Dom.setStyle(shim,'background','white');YAHOO.util.Dom.setStyle(shim,'visibility','hidden');YAHOO.util.Dom.setStyle(shim,'z-index',2);window.document.body.appendChild(shim);var shimEl=YAHOO.ext.Element.get(shim);shimEl.setOpacity(.01);shimEl.setXY([0,0]);return shimEl;} +YAHOO.ext.SplitBar.createProxy=function(orientation){var proxy=document.createElement('div');YAHOO.util.Dom.generateId(proxy,'split-proxy');YAHOO.util.Dom.setStyle(proxy,'position','absolute');YAHOO.util.Dom.setStyle(proxy,'visibility','hidden');YAHOO.util.Dom.setStyle(proxy,'z-index',999);YAHOO.util.Dom.setStyle(proxy,'background-color',"#aaa");if(orientation==YAHOO.ext.SplitBar.HORIZONTAL){YAHOO.util.Dom.setStyle(proxy,'cursor','e-resize');}else{YAHOO.util.Dom.setStyle(proxy,'cursor','n-resize');} +YAHOO.util.Dom.setStyle(proxy,'line-height','0px');YAHOO.util.Dom.setStyle(proxy,'font-size','0px');window.document.body.appendChild(proxy);return proxy;} +YAHOO.ext.SplitBar.BasicLayoutAdapter=function(){} +YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype={init:function(s){},getElementSize:function(s){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){return s.resizingEl.getWidth();}else{return s.resizingEl.getHeight();}},setElementSize:function(s,newSize,onComplete){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setWidth(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setWidth(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}else{if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setHeight(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setHeight(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}}};YAHOO.ext.SplitBar.AbsoluteLayoutAdapter=function(container){this.basic=new YAHOO.ext.SplitBar.BasicLayoutAdapter();this.container=getEl(container);} +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(s){this.basic.init(s);},getElementSize:function(s){return this.basic.getElementSize(s);},setElementSize:function(s,newSize,onComplete){this.basic.setElementSize(s,newSize,this.moveSplitter.createDelegate(this,[s]));},moveSplitter:function(s){var yes=YAHOO.ext.SplitBar;switch(s.placement){case yes.LEFT:s.el.setX(s.resizingEl.getRight());break;case yes.RIGHT:s.el.setStyle('right',(this.container.getWidth()-s.resizingEl.getLeft())+'px');break;case yes.TOP:s.el.setY(s.resizingEl.getBottom());break;case yes.BOTTOM:s.el.setY(s.resizingEl.getTop()-s.el.getHeight());break;}}};YAHOO.ext.SplitBar.VERTICAL=1;YAHOO.ext.SplitBar.HORIZONTAL=2;YAHOO.ext.SplitBar.LEFT=1;YAHOO.ext.SplitBar.RIGHT=2;YAHOO.ext.SplitBar.TOP=3;YAHOO.ext.SplitBar.BOTTOM=4; \ No newline at end of file diff --git a/www/extras/yui-ext/build/widgets/TabPanel-min.js b/www/extras/yui-ext/build/widgets/TabPanel-min.js new file mode 100644 index 000000000..cbb983f6f --- /dev/null +++ b/www/extras/yui-ext/build/widgets/TabPanel-min.js @@ -0,0 +1,17 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.TabPanel=function(container,onBottom){this.el=getEl(container);if(onBottom){this.bodyEl=getEl(this.createBody(this.el.dom));this.el.addClass('ytabs-bottom');} +this.stripWrap=getEl(this.createStrip(this.el.dom));this.stripEl=getEl(this.createStripList(this.stripWrap.dom));if(!onBottom){this.bodyEl=getEl(this.createBody(this.el.dom));} +this.items={};this.active=null;this.onTabChange=new YAHOO.util.CustomEvent('TabItem.onTabChange');this.activateDelegate=this.activate.createDelegate(this);} +YAHOO.ext.TabPanel.prototype={addTab:function(id,text,content){var item=new YAHOO.ext.TabPanelItem(this,id,text);this.addTabItem(item);if(content){item.setContent(content);} +return item;},getTab:function(id){return this.items[id];},addTabItem:function(item){this.items[item.id]=item;},removeTab:function(id){var tab=this.items[id];if(tab&&this.active==tab){for(var key in this.items){if(typeof this.items[key]!='function'&&this.items[key]!=tab){this.items[key].activate();break;}}} +this.stripEl.dom.removeChild(tab.onEl.dom);this.stripEl.dom.removeChild(tab.offEl.dom);this.bodyEl.dom.removeChild(tab.bodyEl.dom);delete this.items[id];},disableTab:function(id){var tab=this.items[id];if(tab&&this.active!=tab){tab.disable();}},enableTab:function(id){var tab=this.items[id];tab.enable();},activate:function(id){var tab=this.items[id];if(!tab.disabled){if(this.active){this.active.hide();} +this.active=this.items[id];this.active.show();this.onTabChange.fireDirect(this,this.active);}},getActiveTab:function(){return this.active;}};YAHOO.ext.TabPanelItem=function(tabPanel,id,text){this.tabPanel=tabPanel;this.id=id;this.disabled=false;this.text=text;this.loaded=false;this.bodyEl=getEl(tabPanel.createItemBody(tabPanel.bodyEl.dom,id));this.bodyEl.originalDisplay='block';this.bodyEl.setStyle('display','none');this.bodyEl.enableDisplayMode();var stripElements=tabPanel.createStripElements(tabPanel.stripEl.dom,text);this.onEl=getEl(stripElements.on,true);this.offEl=getEl(stripElements.off,true);this.onEl.originalDisplay='inline';this.onEl.enableDisplayMode();this.offEl.originalDisplay='inline';this.offEl.enableDisplayMode();this.offEl.on('click',tabPanel.activateDelegate.createCallback(id));this.onActivate=new YAHOO.util.CustomEvent('TabItem.onActivate');this.onDeactivate=new YAHOO.util.CustomEvent('TabItem.onDeactivate');};YAHOO.ext.TabPanelItem.prototype={show:function(){this.onEl.show();this.offEl.hide();this.bodyEl.show();this.onActivate.fireDirect(this.tabPanel,this);},setText:function(text){this.onEl.dom.firstChild.firstChild.firstChild.innerHTML=text;this.offEl.dom.firstChild.firstChild.innerHTML=text;},activate:function(){this.tabPanel.activate(this.id);},hide:function(){this.onEl.hide();this.offEl.show();this.bodyEl.hide();this.onDeactivate.fireDirect(this.tabPanel,this);},disable:function(){if(this.tabPanel.active!=this){this.disabled=true;this.offEl.addClass('disabled');this.offEl.dom.title='disabled';}},enable:function(){this.disabled=false;this.offEl.removeClass('disabled');this.offEl.dom.title='';},setContent:function(content){this.bodyEl.update(content);},getUpdateManager:function(){return this.bodyEl.getUpdateManager();},setUrl:function(url,params,loadOnce){this.onActivate.subscribe(this._handleRefresh.createDelegate(this,[url,params,loadOnce]));},_handleRefresh:function(url,params,loadOnce){if(!loadOnce||!this.loaded){var updater=this.bodyEl.getUpdateManager();updater.update(url,params,this._setLoaded.createDelegate(this));}},_setLoaded:function(){this.loaded=true;}};YAHOO.ext.TabPanel.prototype.createStrip=function(container){var strip=document.createElement('div');YAHOO.util.Dom.addClass(strip,'tabset');container.appendChild(strip);var stripInner=document.createElement('div');YAHOO.util.Dom.generateId(stripInner,'tab-strip');YAHOO.util.Dom.addClass(stripInner,'hd');strip.appendChild(stripInner);return stripInner;};YAHOO.ext.TabPanel.prototype.createStripList=function(strip){var list=document.createElement('ul');YAHOO.util.Dom.generateId(list,'tab-strip-list');strip.appendChild(list);return list;};YAHOO.ext.TabPanel.prototype.createBody=function(container){var body=document.createElement('div');YAHOO.util.Dom.generateId(body,'tab-body');YAHOO.util.Dom.addClass(body,'yui-ext-tabbody');container.appendChild(body);return body;};YAHOO.ext.TabPanel.prototype.createItemBody=function(bodyEl,id){var body=YAHOO.util.Dom.get(id);if(!body){body=document.createElement('div');body.id=id;} +YAHOO.util.Dom.addClass(body,'yui-ext-tabitembody');bodyEl.appendChild(body);return body;};YAHOO.ext.TabPanel.prototype.createStripElements=function(stripEl,text){var li=document.createElement('li');var a=document.createElement('a');var em=document.createElement('em');stripEl.appendChild(li);li.appendChild(a);a.appendChild(em);em.innerHTML=text;var li2=document.createElement('li');var a2=document.createElement('a');var em2=document.createElement('em');var strong=document.createElement('strong');stripEl.appendChild(li2);YAHOO.util.Dom.addClass(li2,'on');YAHOO.util.Dom.setStyle(li2,'display','none');li2.appendChild(a2);a2.appendChild(strong);strong.appendChild(em2);em2.innerHTML=text;return{on:li2,off:li};}; \ No newline at end of file diff --git a/www/extras/yui-ext/build/widgets/Toolbar-min.js b/www/extras/yui-ext/build/widgets/Toolbar-min.js new file mode 100644 index 000000000..832c9ce6c --- /dev/null +++ b/www/extras/yui-ext/build/widgets/Toolbar-min.js @@ -0,0 +1,12 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.Toolbar=function(container){this.el=getEl(container,true);var div=document.createElement('div');div.className='ytoolbar';var tb=document.createElement('table');tb.border=0;tb.cellPadding=0;tb.cellSpacing=0;div.appendChild(tb);var tbody=document.createElement('tbody');tb.appendChild(tbody);var tr=document.createElement('tr');tbody.appendChild(tr);this.el.dom.appendChild(div);this.tr=tr;};YAHOO.ext.Toolbar.prototype={add:function(){for(var i=0;i-1);this.isSafari=(ua.indexOf('webkit')>-1);this.isIE=(window.ActiveXObject);this.isIE7=(ua.indexOf('msie 7')>-1);this.isGecko=!this.isSafari&&(ua.indexOf('gecko')>-1);}();YAHOO.util.CustomEvent.prototype.fireDirect=function(){var len=this.subscribers.length;for(var i=0;i');} +return results;},show:function(){alert(this.toString());}};YAHOO.ext.util.DelayedTask=function(fn,scope,args){var timeoutId=null;this.delay=function(delay,newFn,newScope,newArgs){if(timeoutId){clearTimeout(timeoutId);} +fn=newFn||fn;scope=newScope||scope;args=newArgs||args;timeoutId=setTimeout(fn.createDelegate(scope,args),delay);};this.cancel=function(){if(timeoutId){clearTimeout(timeoutId);timeoutId=null;}};};YAHOO.ext.util.Observable=function(){};YAHOO.ext.util.Observable.prototype={fireEvent:function(){var ce=this.events[arguments[0].toLowerCase()];ce.fireDirect.apply(ce,Array.prototype.slice.call(arguments,1));},addListener:function(eventName,fn,scope,override){eventName=eventName.toLowerCase();if(!this.events[eventName]){throw'You are trying to listen for an event that does not exist: "'+eventName+'".';} +this.events[eventName].subscribe(fn,scope,override);},delayedListener:function(eventName,fn,scope,delay){var newFn=function(){setTimeout(fn.createDelegate(scope,arguments),delay||1);} +this.addListener(eventName,newFn);return newFn;},removeListener:function(eventName,fn,scope){this.events[eventName.toLowerCase()].unsubscribe(fn,scope);}};YAHOO.ext.util.Observable.prototype.on=YAHOO.ext.util.Observable.prototype.addListener;YAHOO.ext.util.Config={apply:function(obj,config){if(config){for(var prop in config){obj[prop]=config[prop];}}}};YAHOO.ext.util.CSS=new function(){var rules=null;var toCamel=function(property){var convert=function(prop){var test=/(-[a-z])/i.exec(prop);return prop.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());};while(property.indexOf('-')>-1){property=convert(property);} +return property;};this.getRules=function(refreshCache){if(rules==null||refreshCache){rules={};var ds=document.styleSheets;for(var i=0,len=ds.length;i=0;--j){rules[ssRules[j].selectorText]=ssRules[j];}}catch(e){}}} +return rules;};this.getRule=function(selector,refreshCache){var rs=this.getRules(refreshCache);if(!(selector instanceof Array)){return rs[selector];} +for(var i=0;i 0) {" +var regex="";var special=false;var ch='';for(var i=0;i 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n" ++"{return new Date(y, m, d, h, i);}\n" ++"else if (y > 0 && m >= 0 && d > 0 && h >= 0)\n" ++"{return new Date(y, m, d, h);}\n" ++"else if (y > 0 && m >= 0 && d > 0)\n" ++"{return new Date(y, m, d);}\n" ++"else if (y > 0 && m >= 0)\n" ++"{return new Date(y, m);}\n" ++"else if (y > 0)\n" ++"{return new Date(y);}\n" ++"}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code);};Date.formatCodeToRegex=function(character,currentGroup){switch(character){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:0,c:null,s:"(?:\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+currentGroup+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+currentGroup+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+currentGroup+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+currentGroup+"], 10);\n" ++"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+currentGroup+"] == 'am') {\n" ++"if (h == 12) { h = 0; }\n" ++"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+currentGroup+"] == 'AM') {\n" ++"if (h == 12) { h = 0; }\n" ++"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(character)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+") ++String.leftPad(Math.floor(this.getTimezoneOffset()/60),2,"0") ++String.leftPad(this.getTimezoneOffset()%60,2,"0");};Date.prototype.getDayOfYear=function(){var num=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var i=0;i3){s=s.substring(0,s.length-1);} +s+="\n}";return s;}} +Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11}; \ No newline at end of file diff --git a/www/extras/yui-ext/docs/Date.html b/www/extras/yui-ext/docs/Date.html new file mode 100644 index 000000000..75a859890 --- /dev/null +++ b/www/extras/yui-ext/docs/Date.html @@ -0,0 +1,530 @@ + + + + + +Date + + + + + + +

Class Date

+
Object
+   |
+   +--Date
+
+ + +
+
+ +
class + Date + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  Objectformat +
+   Same as dateFormat()
+ <static>  ObjectdayNames +
+   Override these values for international dates, for example...
+ <static>  ObjectmonthNames +
+   Override these values for international dates, for example...
+   + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + dateFormat(format) + +
+    + Formats a date given to the supplied format - the format syntax is the same as PHP's date() function. +
+ +  Object + + + + + getDayOfYear() + +
+    + +
+ +  Object + + + + + getDaysInMonth() + +
+    + +
+ +  Object + + + + + getFirstDayOfMonth() + +
+    + +
+ +  Object + + + + + getGMTOffset() + +
+    + +
+ +  Object + + + + + getLastDayOfMonth() + +
+    + +
+ +  Object + + + + + getTimezone() + +
+    + +
+ +  Object + + + + + getWeekOfYear() + +
+    + +
+ +  Object + + + + + isLeapYear() + +
+    + +
+ + <static> Object + + + + + parseDate(input, format) + +
+    + Parses a date given the supplied format - the format syntax is the same as PHP's date() function. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

format

+
Object format
+ +
+ + +

dayNames

+
<static> Object dayNames
+
    + Override these values for international dates, for example... + Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...]; + +
+
+ + +

monthNames

+
<static> Object monthNames
+
    + Override these values for international dates, for example... + Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...]; + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

dateFormat

+
Object dateFormat(format)
+ + + + + + + + + + + + + +
+ + +

getDayOfYear

+
Object getDayOfYear()
+ + + + + + + + + + + +
+ + +

getDaysInMonth

+
Object getDaysInMonth()
+ + + + + + + + + + + +
+ + +

getFirstDayOfMonth

+
Object getFirstDayOfMonth()
+ + + + + + + + + + + +
+ + +

getGMTOffset

+
Object getGMTOffset()
+ + + + + + + + + + + +
+ + +

getLastDayOfMonth

+
Object getLastDayOfMonth()
+ + + + + + + + + + + +
+ + +

getTimezone

+
Object getTimezone()
+ + + + + + + + + + + +
+ + +

getWeekOfYear

+
Object getWeekOfYear()
+ + + + + + + + + + + +
+ + +

isLeapYear

+
Object isLeapYear()
+ + + + + + + + + + + +
+ + +

parseDate

+
<static> Object parseDate(input, format)
+ + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/Function.html b/www/extras/yui-ext/docs/Function.html new file mode 100644 index 000000000..1176c91fd --- /dev/null +++ b/www/extras/yui-ext/docs/Function.html @@ -0,0 +1,335 @@ + + + + + +Function + + + + + + +

Class Function

+
Object
+   |
+   +--Function
+
+ + +
+
+ +
class + Function + + +
+ +
+ + + + + + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Function + + + + + createCallback() + +
+    + Creates a callback that passes arguments[0], arguments[1], arguments[2], ... +
+ +  Function + + + + + createDelegate(<Object> obj, <Array> args, <Boolean> appendArgs) + +
+    + Creates a delegate (callback) that sets the scope to obj. +
+ +  Function + + + + + createInterceptor(<Function> fcn, <Object> scope) + +
+    + Creates an interceptor function. +
+ +  Function + + + + + createSequence(<Function> fcn, <Object> scope) + +
+    + Create a combined function call sequence of the original function + the passed function. +
+ + + +

+ + + + + + + + + + + + + + + + + +


+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

createCallback

+
Function createCallback()
+ +
    Creates a callback that passes arguments[0], arguments[1], arguments[2], ... + Call directly on any function. Example: myFunction.createCallback(myarg, myarg2) + Will create a function that is bound to those 2 args.
+ + + + + + + +
    + Returns: +
      + The new function +
    +
+ + + + + +
+ + +

createDelegate

+
Function createDelegate(<Object> obj, <Array> args, <Boolean> appendArgs)
+ +
    Creates a delegate (callback) that sets the scope to obj. + Call directly on any function. Example: this.myFunction.createDelegate(this) + Will create a function that is automatically scoped to this.
+ + + + +
    + Parameters: + +
      obj - The object for which the scope is set +
    + +
      args - (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) +
    + +
      appendArgs - (optional) if True args are appended to call args instead of overriding +
    + +
+ + + + +
    + Returns: +
      + The new function +
    +
+ + + + + +
+ + +

createInterceptor

+
Function createInterceptor(<Function> fcn, <Object> scope)
+ +
    Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called. + The resulting function returns the results of the original function. + The passed fcn is called with the parameters of the original function.
+ + + + +
    + Parameters: + +
      fcn - The function to call before the original +
    + +
      scope - (optional) The scope of the passed fcn (Defaults to scope of original function or window) +
    + +
+ + + + +
    + Returns: +
      + The new function +
    +
+ + + + + +
+ + +

createSequence

+
Function createSequence(<Function> fcn, <Object> scope)
+ +
    Create a combined function call sequence of the original function + the passed function. + The resulting function returns the results of the original function. + The passed fcn is called with the parameters of the original function
+ + + + +
    + Parameters: + +
      fcn - The function to sequence +
    + +
      scope - (optional) The scope of the passed fcn (Defaults to scope of original function or window) +
    + +
+ + + + +
    + Returns: +
      + The new function +
    +
+ + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Actor.Action.html b/www/extras/yui-ext/docs/YAHOO.ext.Actor.Action.html new file mode 100644 index 000000000..94689fc21 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Actor.Action.html @@ -0,0 +1,202 @@ + + + + + +YAHOO.ext.Actor.Action + + + + + + +

Class YAHOO.ext.Actor.Action

+
Object
+   |
+   +--YAHOO.ext.Actor.Action
+
+ + +
+
+ +
class + YAHOO.ext.Actor.Action + + +
+ +

+
Used by YAHOO.ext.Actor to queue standard calls. Generally used internally. Documentation to come.

+ +
Defined in Actor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Actor.Action + + (actor, method, args) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + play(onComplete) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Actor.Action

+
YAHOO.ext.Actor.Action(actor, method, args)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

play

+
void play(onComplete)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Actor.AsyncAction.html b/www/extras/yui-ext/docs/YAHOO.ext.Actor.AsyncAction.html new file mode 100644 index 000000000..1b6afe229 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Actor.AsyncAction.html @@ -0,0 +1,202 @@ + + + + + +YAHOO.ext.Actor.AsyncAction + + + + + + +

Class YAHOO.ext.Actor.AsyncAction

+
Object
+   |
+   +--YAHOO.ext.Actor.AsyncAction
+
+ + +
+
+ +
class + YAHOO.ext.Actor.AsyncAction + + +
+ +

+
Used by YAHOO.ext.Actor to queue animations. Generally used internally. Documentation to come.

+ +
Defined in Actor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Actor.AsyncAction + + (actor, method, args, onIndex) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + play(onComplete) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Actor.AsyncAction

+
YAHOO.ext.Actor.AsyncAction(actor, method, args, onIndex)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

play

+
void play(onComplete)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Actor.PauseAction.html b/www/extras/yui-ext/docs/YAHOO.ext.Actor.PauseAction.html new file mode 100644 index 000000000..0a433946b --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Actor.PauseAction.html @@ -0,0 +1,202 @@ + + + + + +YAHOO.ext.Actor.PauseAction + + + + + + +

Class YAHOO.ext.Actor.PauseAction

+
Object
+   |
+   +--YAHOO.ext.Actor.PauseAction
+
+ + +
+
+ +
class + YAHOO.ext.Actor.PauseAction + + +
+ +

+
Used by YAHOO.ext.Actor to perform pauses. Generally used internally. Documentation to come.

+ +
Defined in Actor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Actor.PauseAction + + (seconds) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + play(onComplete) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Actor.PauseAction

+
YAHOO.ext.Actor.PauseAction(seconds)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

play

+
void play(onComplete)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Actor.html b/www/extras/yui-ext/docs/YAHOO.ext.Actor.html new file mode 100644 index 000000000..3ce769f28 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Actor.html @@ -0,0 +1,1967 @@ + + + + + +YAHOO.ext.Actor + + + + + + +

Class YAHOO.ext.Actor

+
Object
+   |
+   +--YAHOO.ext.Element
+         |
+         +--YAHOO.ext.Actor
+
+ + +
+
+ +
class + YAHOO.ext.Actor + +
extends YAHOO.ext.Element + + +
+ +

+
Provides support for syncing and chaining of Element Yahoo! UI based animation and some common effects. Actors support "self-play" without an Animator.

+ Note: Along with the animation methods defined below, this class inherits and captures all of the "set" or animation methods of YAHOO.ext.Element. "get" methods are not captured and execute immediately. +

Usage:
+


+ var actor = new YAHOO.ext.Actor('myElementId');
+ actor.startCapture(true);
+ actor.moveTo(100, 100, true);
+ actor.squish();
+ actor.play();
+ 
+ // or to start capturing immediately, with no Animator (the null second param) +
+ var actor = new YAHOO.ext.Actor('myElementId', null, true); + actor.moveTo(100, 100, true); + actor.squish(); + actor.play(); +
+
Defined in Actor.js

Requires: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.Actor.Action
+ <static class>YAHOO.ext.Actor.AsyncAction
+ <static class>YAHOO.ext.Actor.PauseAction
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  FunctionaddClass +
+   Capturing override - See YAHOO.ext.Element.addClass() for method details.
+  FunctionalignTo +
+   Capturing and animation syncing override - See YAHOO.ext.Element.alignTo() for method details.
+  Objectcapturing +
+   Whether this actor is currently capturing
+  FunctionclearOpacity +
+   Capturing override - See YAHOO.ext.Element.clearOpacity() for method details.
+  FunctionclearPositioning +
+   Capturing override - See YAHOO.ext.Element.clearPositioning() for method details.
+  Functionclip +
+   Capturing override - See YAHOO.ext.Element.clip() for method details.
+  Objectel +
+   
+  FunctionenableDisplayMode +
+   Capturing override - See YAHOO.ext.Element.enableDisplayMode() for method details.
+  Functionfocus +
+   Capturing override - See YAHOO.ext.Element.focus() for method details.
+  Functionhide +
+   Capturing and animation syncing override - See YAHOO.ext.Element.hide() for method details.
+  Functionmove +
+   Capturing and animation syncing override - See YAHOO.ext.Element.move() for method details.
+  FunctionmoveTo +
+   Capturing and animation syncing override - See YAHOO.ext.Element.moveTo() for method details.
+  ObjectonCapture +
+   
+  Objectplaylist +
+   
+  FunctionremoveClass +
+   Capturing override - See YAHOO.ext.Element.removeClass() for method details.
+  FunctionreplaceClass +
+   Capturing override - See YAHOO.ext.Element.replaceClass() for method details.
+  FunctionsetAbsolutePositioned +
+   Capturing override - See YAHOO.ext.Element.setAbsolutePositioned() for method details.
+  FunctionsetBounds +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setBounds() for method details.
+  FunctionsetHeight +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setHeight() for method details.
+  FunctionsetLeft +
+   Capturing override - See YAHOO.ext.Element.setLeft() for method details.
+  FunctionsetLocation +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setLocation() for method details.
+  FunctionsetOpacity +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setHeight() for method details.
+  FunctionsetPositioning +
+   Capturing override - See YAHOO.ext.Element.setPositioning() for method details.
+  FunctionsetRelativePositioned +
+   Capturing override - See YAHOO.ext.Element.setRelativePositioned() for method details.
+  FunctionsetSize +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setSize() for method details.
+  FunctionsetStyle +
+   Capturing override - See YAHOO.ext.Element.setStyle() for method details.
+  FunctionsetTop +
+   Capturing override - See YAHOO.ext.Element.setTop() for method details.
+  FunctionsetVisibilityMode +
+   Capturing override - See YAHOO.ext.Element.setVisibilityMode() for method details.
+  FunctionsetVisible +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setVisible() for method details.
+  FunctionsetWidth +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setWidth() for method details.
+  FunctionsetX +
+   Capturing override - See YAHOO.ext.Element.setX() for method details.
+  FunctionsetXY +
+   Capturing and animation syncing override - See YAHOO.ext.Element.setXY() for method details.
+  FunctionsetY +
+   Capturing override - See YAHOO.ext.Element.setY() for method details.
+  Functionshow +
+   Capturing and animation syncing override - See YAHOO.ext.Element.show() for method details.
+  Functiontoggle +
+   Capturing and animation syncing override - See YAHOO.ext.Element.toggle() for method details.
+  Functionunclip +
+   Capturing override - See YAHOO.ext.Element.unclip() for method details.
+  Functionupdate +
+   Capturing override - See YAHOO.ext.Element.clearOpacity() for method details.
+   + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.Element
+ id, defaultUnit, onVisibilityChanged, onMoved, onResized, autoBoxAdjust +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Actor + + (element, <YAHOO.ext.Animator> animator, <Boolean> selfCapture) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope) + +
+    + Capture an async function call. +
+ +  void + + + + + addCall(<Function> fcn, <Array> args, <Object> scope) + +
+    + Capture a function call. +
+ +  Function + + + + + animate(args, duration, onComplete, easing, animType) + +
+    + Capturing and animation syncing override - See YAHOO.ext.Element.animate() for method details. +
+ +  void + + + + + appear(<Float> duration) + +
+    + Fade an element in +
+ +  Object + + + + + blindHide(<String> anchor, <Float> duration, <Function> easing) + +
+    + Hide the element using a "blinds" effect +
+ +  Object + + + + + blindShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing) + +
+    + Show the element using a "blinds" effect +
+ +  void + + + + + bounce() + +
+    + Bounce this element from up and down +
+ +  Object + + + + + capture(<YAHOO.ext.Actor.Action> action) + +
+    + Captures an action for this actor. +
+ +  void + + + + + clear() + +
+    + Clears any calls that have been self captured. +
+ +  void + + + + + dropOut(<Float> duration) + +
+    + Fade the element as it is falling from it's current position +
+ +  void + + + + + fade(<Float> duration) + +
+    + Fade an element out +
+ +  void + + + + + highlight(<String> color, <String> fromColor, <Float> duration, <String> attribute) + +
+    + Highlight the element using a background color (or passed attribute) animation +
+ +  void + + + + + moveIn(<String> anchor, <Array> to, <Float> duration, <Function> easing) + +
+    + Show the element in a way that it appears as if it is flying onto the screen +
+ +  void + + + + + moveOut(<String> anchor, <Float> duration, <Function> easing) + +
+    + Hide the element in a way that it appears as if it is flying off the screen +
+ +  void + + + + + pause(<Number> seconds) + +
+    + Capture a pause (in seconds). +
+ +  void + + + + + play(<Function> oncomplete) + +
+    + Starts playback of self captured calls. +
+ +  void + + + + + pulsate(<Number> count, <Float> duration) + +
+    + Fade the element in and out the specified amount of times +
+ +  void + + + + + shake() + +
+    + Shake this element from side to side +
+ +  Object + + + + + slideHide(<String> anchor, <Float> duration, <Function> easing) + +
+    + Hide the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindHide effect is rendered. +
+ +  Object + + + + + slideShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing) + +
+    + Show the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindShow effect is rendered. +
+ +  Object + + + + + squish(<Float> duration) + +
+    + Hide the element by "squishing" it into the corner +
+ +  void + + + + + startCapture() + +
+    + Start self capturing calls on this Actor. +
+ +  void + + + + + stopCapture() + +
+    + Stop self capturing calls on this Actor. +
+ +  void + + + + + switchOff(<Float> duration) + +
+    + Blink the element as if it was clicked and then collapse on it's center +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.Element
+ +setVisibilityMode, enableDisplayMode, isVisible, setVisible, toggle, focus, addClass, radioClass, removeClass, toggleClass, hasClass, replaceClass, getStyle, setStyle, getX, getY, getXY, setX, setY, setLeft, setTop, setRight, setBottom, setXY, setLocation, moveTo, getRegion, getHeight, getWidth, getSize, setWidth, setHeight, setSize, setBounds, setRegion, addListener, addHandler, on, addManagedListener, mon, removeListener, removeAllListeners, setOpacity, getLeft, getRight, getTop, getBottom, setAbsolutePositioned, setRelativePositioned, clearPositioning, getPositioning, getBorderWidth, getPadding, setPositioning, move, clip, unclip, alignTo, clearOpacity, hide, show, beginMeasure, endMeasure, update, getUpdateManager, getCenterXY, getChildrenByTagName, getChildrenByClassName, isBorderBox, getBox, setBox +
+  + +

+ + + + + + + + + + +
Field Detail
+ + + +

addClass

+
Function addClass
+ +
+ + +

alignTo

+
Function alignTo
+ +
+ + +

capturing

+
Object capturing
+
    + Whether this actor is currently capturing + +
+
+ + +

clearOpacity

+
Function clearOpacity
+ +
+ + +

clearPositioning

+
Function clearPositioning
+ +
+ + +

clip

+
Function clip
+ +
+ + +

el

+
Object el
+
    + + +
+
+ + +

enableDisplayMode

+
Function enableDisplayMode
+ +
+ + +

focus

+
Function focus
+ +
+ + +

hide

+
Function hide
+ +
+ + +

move

+
Function move
+ +
+ + +

moveTo

+
Function moveTo
+ +
+ + +

onCapture

+
Object onCapture
+
    + + +
+
+ + +

playlist

+
Object playlist
+
    + + +
+
+ + +

removeClass

+
Function removeClass
+ +
+ + +

replaceClass

+
Function replaceClass
+ +
+ + +

setAbsolutePositioned

+
Function setAbsolutePositioned
+ +
+ + +

setBounds

+
Function setBounds
+ +
+ + +

setHeight

+
Function setHeight
+ +
+ + +

setLeft

+
Function setLeft
+ +
+ + +

setLocation

+
Function setLocation
+ +
+ + +

setOpacity

+
Function setOpacity
+ +
+ + +

setPositioning

+
Function setPositioning
+ +
+ + +

setRelativePositioned

+
Function setRelativePositioned
+ +
+ + +

setSize

+
Function setSize
+ +
+ + +

setStyle

+
Function setStyle
+ +
+ + +

setTop

+
Function setTop
+ +
+ + +

setVisibilityMode

+
Function setVisibilityMode
+ +
+ + +

setVisible

+
Function setVisible
+ +
+ + +

setWidth

+
Function setWidth
+ +
+ + +

setX

+
Function setX
+ +
+ + +

setXY

+
Function setXY
+ +
+ + +

setY

+
Function setY
+ +
+ + +

show

+
Function show
+ +
+ + +

toggle

+
Function toggle
+ +
+ + +

unclip

+
Function unclip
+ +
+ + +

update

+
Function update
+ +
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Actor

+
YAHOO.ext.Actor(element, <YAHOO.ext.Animator> animator, <Boolean> selfCapture)
+ + + + +
    + Parameters: + +
      animator - (optional) The Animator that will capture this Actor's actions +
    + +
      selfCapture - (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false) +
    + +
      el - The dom element or element id +
    + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addAsyncCall

+
void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
+ +
    Capture an async function call.
+ + + + +
    + Parameters: + +
      fcn - The function to call +
    + +
      callbackIndex - The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. +
    + +
      args - The arguments to call the function with +
    + +
      scope - (optional) The scope of the function +
    + +
+ + + + + + + + +
+ + +

addCall

+
void addCall(<Function> fcn, <Array> args, <Object> scope)
+ +
    Capture a function call.
+ + + + +
    + Parameters: + +
      fcn - The function to call +
    + +
      args - (optional) The arguments to call the function with +
    + +
      scope - (optional) The scope of the function +
    + +
+ + + + + + + + +
+ + +

animate

+
Function animate(args, duration, onComplete, easing, animType)
+ + + + + + + + + + + + + +
+ + +

appear

+
void appear(<Float> duration)
+ +
    Fade an element in
+ + + + +
    + Parameters: + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + +

blindHide

+
Object blindHide(<String> anchor, <Float> duration, <Function> easing)
+ +
    Hide the element using a "blinds" effect
+ + + + +
    + Parameters: + +
      anchor - The part of the element that it should appear to collapse to. The short/long options are t/top, l/left, b/bottom, r/right. +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +
    + +
+ + + + + + + + +
+ + +

blindShow

+
Object blindShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
+ +
    Show the element using a "blinds" effect
+ + + + +
    + Parameters: + +
      anchor - The part of the element that it should appear to exapand from. The short/long options currently are t/top, l/left +
    + +
      newSize - (optional) The size to animate to. (Default to current size) +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut) +
    + +
+ + + + + + + + +
+ + +

bounce

+
void bounce()
+ +
    Bounce this element from up and down
+ + + + + + + + + + + +
+ + +

capture

+
Object capture(<YAHOO.ext.Actor.Action> action)
+ +
    Captures an action for this actor. Generally called internally but can be called directly. + #
+ + + + +
    + Parameters: + +
      action - +
    + +
+ + + + + + + + +
+ + +

clear

+
void clear()
+ +
    Clears any calls that have been self captured.
+ + + + + + + + + + + +
+ + +

dropOut

+
void dropOut(<Float> duration)
+ +
    Fade the element as it is falling from it's current position
+ + + + +
    + Parameters: + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + +

fade

+
void fade(<Float> duration)
+ +
    Fade an element out
+ + + + +
    + Parameters: + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + +

highlight

+
void highlight(<String> color, <String> fromColor, <Float> duration, <String> attribute)
+ +
    Highlight the element using a background color (or passed attribute) animation
+ + + + +
    + Parameters: + +
      color - (optional) The color to use for the highlight +
    + +
      fromColor - (optional) If the element does not currently have a background color, you will need to pass in a color to animate from +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      attribute - (optional) Specify a CSS attribute to use other than background color - camelCase +
    + +
+ + + + + + + + +
+ + +

moveIn

+
void moveIn(<String> anchor, <Array> to, <Float> duration, <Function> easing)
+ +
    Show the element in a way that it appears as if it is flying onto the screen
+ + + + +
    + Parameters: + +
      anchor - The part of the page that the element should appear to move from. The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, tr/top-right, bl/bottom-left or br/bottom-right. +
    + +
      to - (optional) Array of x and y position to move to like [x, y] (Defaults to center screen) +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut) +
    + +
+ + + + + + + + +
+ + +

moveOut

+
void moveOut(<String> anchor, <Float> duration, <Function> easing)
+ +
    Hide the element in a way that it appears as if it is flying off the screen
+ + + + +
    + Parameters: + +
      anchor - The part of the page that the element should appear to move to. The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, tr/top-right, bl/bottom-left or br/bottom-right. +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +
    + +
+ + + + + + + + +
+ + +

pause

+
void pause(<Number> seconds)
+ +
    Capture a pause (in seconds).
+ + + + +
    + Parameters: + +
      seconds - The seconds to pause +
    + +
+ + + + + + + + +
+ + +

play

+
void play(<Function> oncomplete)
+ +
    Starts playback of self captured calls.
+ + + + +
    + Parameters: + +
      oncomplete - (optional) Callback to execute when playback has completed +
    + +
+ + + + + + + + +
+ + +

pulsate

+
void pulsate(<Number> count, <Float> duration)
+ +
    Fade the element in and out the specified amount of times
+ + + + +
    + Parameters: + +
      count - (optional) How many times to pulse (Defaults to 3) +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + +

shake

+
void shake()
+ +
    Shake this element from side to side
+ + + + + + + + + + + +
+ + +

slideHide

+
Object slideHide(<String> anchor, <Float> duration, <Function> easing)
+ +
    Hide the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindHide effect is rendered.
+ + + + +
    + Parameters: + +
      anchor - The part of the element that it should appear to slide to. The short/long options are t/top, l/left, b/bottom, r/right. +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +
    + +
+ + + + + + + + +
+ + +

slideShow

+
Object slideShow(<String> anchor, <Number> newSize, <Float> duration, <Function> easing)
+ +
    Show the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindShow effect is rendered.
+ + + + +
    + Parameters: + +
      anchor - The part of the element that it should appear to slide from. The short/long options currently are t/top, l/left +
    + +
      newSize - (optional) The size to animate to. (Default to current size) +
    + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOuth) +
    + +
+ + + + + + + + +
+ + +

squish

+
Object squish(<Float> duration)
+ +
    Hide the element by "squishing" it into the corner
+ + + + +
    + Parameters: + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + +

startCapture

+
void startCapture()
+ +
    Start self capturing calls on this Actor. All subsequent calls are captured and executed when play() is called.
+ + + + + + + + + + + +
+ + +

stopCapture

+
void stopCapture()
+ +
    Stop self capturing calls on this Actor.
+ + + + + + + + + + + +
+ + +

switchOff

+
void switchOff(<Float> duration)
+ +
    Blink the element as if it was clicked and then collapse on it's center
+ + + + +
    + Parameters: + +
      duration - (optional) How long the effect lasts (in seconds) +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Animator.AnimSequence.html b/www/extras/yui-ext/docs/YAHOO.ext.Animator.AnimSequence.html new file mode 100644 index 000000000..985ebed2d --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Animator.AnimSequence.html @@ -0,0 +1,485 @@ + + + + + +YAHOO.ext.Animator.AnimSequence + + + + + + +

Class YAHOO.ext.Animator.AnimSequence

+
Object
+   |
+   +--YAHOO.ext.Animator.AnimSequence
+
+ + +
+
+ +
class + YAHOO.ext.Animator.AnimSequence + + +
+ +

+
Used by YAHOO.ext.Animator to sequence animations. Generally used internally. Documentation to come.

+ +
Defined in Animator.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Animator.AnimSequence + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + add(action) + +
+    + +
+ +  void + + + + + addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope) + +
+    + Add an async function call to the capture queue. +
+ +  void + + + + + addCall(fcn, args, scope) + +
+    + +
+ +  void + + + + + clear() + +
+    + +
+ +  Object + + + + + isPlaying() + +
+    + +
+ +  void + + + + + next() + +
+    + +
+ +  void + + + + + pause(seconds) + +
+    + +
+ +  void + + + + + play(oncomplete) + +
+    + +
+ +  void + + + + + stop() + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Animator.AnimSequence

+
YAHOO.ext.Animator.AnimSequence()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

add

+
void add(action)
+ + + + + + + + + + + +
+ + +

addAsyncCall

+
void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
+ +
    Add an async function call to the capture queue.
+ + + + +
    + Parameters: + +
      fcn - The function to call +
    + +
      callbackIndex - The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. +
    + +
      args - The arguments to call the function with +
    + +
      scope - (optional) The scope of the function +
    + +
+ + + + + + + + +
+ + +

addCall

+
void addCall(fcn, args, scope)
+ + + + + + + + + + + +
+ + +

clear

+
void clear()
+ + + + + + + + + + + +
+ + +

isPlaying

+
Object isPlaying()
+ + + + + + + + + + + +
+ + +

next

+
void next()
+ + + + + + + + + + + +
+ + +

pause

+
void pause(seconds)
+ + + + + + + + + + + +
+ + +

play

+
void play(oncomplete)
+ + + + + + + + + + + +
+ + +

stop

+
void stop()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Animator.CompositeSequence.html b/www/extras/yui-ext/docs/YAHOO.ext.Animator.CompositeSequence.html new file mode 100644 index 000000000..60615150a --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Animator.CompositeSequence.html @@ -0,0 +1,334 @@ + + + + + +YAHOO.ext.Animator.CompositeSequence + + + + + + +

Class YAHOO.ext.Animator.CompositeSequence

+
Object
+   |
+   +--YAHOO.ext.Animator.CompositeSequence
+
+ + +
+
+ +
class + YAHOO.ext.Animator.CompositeSequence + + +
+ +

+
Used by YAHOO.ext.Animator to run multiple animation sequences at once. Generally used internally. Documentation to come.

+ +
Defined in Animator.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Animator.CompositeSequence + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + add(sequence) + +
+    + +
+ +  Object + + + + + isPlaying() + +
+    + +
+ +  void + + + + + play(onComplete) + +
+    + +
+ +  void + + + + + stop() + +
+    + +
+ +  void + + + + + trackCompletion() + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Animator.CompositeSequence

+
YAHOO.ext.Animator.CompositeSequence()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

add

+
void add(sequence)
+ + + + + + + + + + + +
+ + +

isPlaying

+
Object isPlaying()
+ + + + + + + + + + + +
+ + +

play

+
void play(onComplete)
+ + + + + + + + + + + +
+ + +

stop

+
void stop()
+ + + + + + + + + + + +
+ + +

trackCompletion

+
void trackCompletion()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Animator.html b/www/extras/yui-ext/docs/YAHOO.ext.Animator.html new file mode 100644 index 000000000..89ed233e7 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Animator.html @@ -0,0 +1,803 @@ + + + + + +YAHOO.ext.Animator + + + + + + +

Class YAHOO.ext.Animator

+
Object
+   |
+   +--YAHOO.ext.Element
+         |
+         +--YAHOO.ext.Animator
+
+ + +
+
+ +
class + YAHOO.ext.Animator + +
extends YAHOO.ext.Element + + +
+ +

+
Provides support for syncing animations for multiple YAHOO.ext.Actors.

+

This example can be seen in action here by clicking on "Click here and I will point it out".
+


+var animator = new YAHOO.ext.Animator();
+var cursor = new YAHOO.ext.Actor('cursor-img', animator);
+var click = new YAHOO.ext.Actor('click-img', animator);
+var resize = new YAHOO.ext.Actor('resize-img', animator);
+
+// start capturing
+animator.startCapture();
+
+// these animations will be run in sequence
+cursor.show();
+cursor.moveTo(500,400);
+cursor.moveTo(20, getEl('navbar').getY()+10, true, .75);
+click.show();
+click.alignTo(cursor, 'tl', [-4, -4]);
+
+// Add an async function call, pass callback to argument 1
+animator.addAsyncCall(Blog.navbar.undockDelegate, 1);
+
+// pause .5 seconds
+animator.pause(.5);
+
+// again, these animations will be run in sequence
+click.hide(true, .7);
+cursor.alignTo('splitter', 'tr', [0, +100], true, 1);
+resize.alignTo('splitter', 'tr', [-12, +100]);
+
+// start sync block: these animations will run at the same time
+animator.beginSync();
+cursor.hide();
+resize.show();
+animator.endSync();
+
+// play the captured animation sequences, call myCallback when done
+animator.play(myCallback);
+ 
+
Defined in Animator.js

Requires: +

+ +
+ + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.Animator.AnimSequence
+ <static class>YAHOO.ext.Animator.CompositeSequence
+  + + + + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.Element
+ id, defaultUnit, onVisibilityChanged, onMoved, onResized, autoBoxAdjust +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Animator + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addActor(<YAHOO.ext.Actor> actor) + +
+    + Add an actor. +
+ +  void + + + + + addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope) + +
+    + Add an async function call to the playlist. +
+ +  void + + + + + addCall(<Function> fcn, <Array> args, <Object> scope) + +
+    + Add a function call to the playlist. +
+ +  void + + + + + beginSync() + +
+    + Start a multi-actor sync block. +
+ +  void + + + + + clear() + +
+    + Clear the playlist +
+ +  void + + + + + endSync() + +
+    + End the multi-actor sync block +
+ +  Object + + + + + isCapturing(<YAHOO.ext.Actor> actor) + +
+    + Checks whether this animator is listening to a specific actor. +
+ +  Object + + + + + isPlaying() + +
+    + Check if this animator is currently playing +
+ +  void + + + + + pause(<Number> seconds) + +
+    + Add a pause to the playlist (in seconds) +
+ +  void + + + + + play(<Function> oncomplete) + +
+    + Starts playback of the playlist, also stops any capturing. +
+ +  void + + + + + startCapture(<Boolean> clearPlaylist) + +
+    + Start capturing actions on the added actors. +
+ +  void + + + + + stop() + +
+    + Stop at the next available stopping point +
+ +  void + + + + + stopCapture() + +
+    + Stop capturing on all added actors. +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.Element
+ +setVisibilityMode, enableDisplayMode, animate, isVisible, setVisible, toggle, focus, addClass, radioClass, removeClass, toggleClass, hasClass, replaceClass, getStyle, setStyle, getX, getY, getXY, setX, setY, setLeft, setTop, setRight, setBottom, setXY, setLocation, moveTo, getRegion, getHeight, getWidth, getSize, setWidth, setHeight, setSize, setBounds, setRegion, addListener, addHandler, on, addManagedListener, mon, removeListener, removeAllListeners, setOpacity, getLeft, getRight, getTop, getBottom, setAbsolutePositioned, setRelativePositioned, clearPositioning, getPositioning, getBorderWidth, getPadding, setPositioning, move, clip, unclip, alignTo, clearOpacity, hide, show, beginMeasure, endMeasure, update, getUpdateManager, getCenterXY, getChildrenByTagName, getChildrenByClassName, isBorderBox, getBox, setBox +
+  + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Animator

+
YAHOO.ext.Animator()
+ + + + +
    + Parameters: + +
      el - The dom element or element id +
    + +
      animator - (optional) The Animator that will capture this Actor's actions +
    + +
      selfCapture - (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false) +
    + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addActor

+
void addActor(<YAHOO.ext.Actor> actor)
+ +
    Add an actor. The actor is also set to capturing = true.
+ + + + +
    + Parameters: + +
      actor - +
    + +
+ + + + + + + + +
+ + +

addAsyncCall

+
void addAsyncCall(<Function> fcn, <Number> callbackIndex, <Array> args, <Object> scope)
+ +
    Add an async function call to the playlist.
+ + + + +
    + Parameters: + +
      fcn - The function to call +
    + +
      callbackIndex - The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. +
    + +
      args - The arguments to call the function with +
    + +
      scope - (optional) The scope of the function +
    + +
+ + + + + + + + +
+ + +

addCall

+
void addCall(<Function> fcn, <Array> args, <Object> scope)
+ +
    Add a function call to the playlist.
+ + + + +
    + Parameters: + +
      fcn - The function to call +
    + +
      args - The arguments to call the function with +
    + +
      scope - (optional) The scope of the function +
    + +
+ + + + + + + + +
+ + +

beginSync

+
void beginSync()
+ +
    Start a multi-actor sync block. By default all animations are run in sequence. While in the sync block + each actor's own animations will still be sequenced, but all actors will animate at the same time.
+ + + + + + + + + + + +
+ + +

clear

+
void clear()
+ +
    Clear the playlist
+ + + + + + + + + + + +
+ + +

endSync

+
void endSync()
+ +
    End the multi-actor sync block
+ + + + + + + + + + + +
+ + +

isCapturing

+
Object isCapturing(<YAHOO.ext.Actor> actor)
+ +
    Checks whether this animator is listening to a specific actor.
+ + + + +
    + Parameters: + +
      actor - +
    + +
+ + + + + + + + +
+ + +

isPlaying

+
Object isPlaying()
+ +
    Check if this animator is currently playing
+ + + + + + + + + + + +
+ + +

pause

+
void pause(<Number> seconds)
+ +
    Add a pause to the playlist (in seconds)
+ + + + +
    + Parameters: + +
      seconds - The number of seconds to pause. +
    + +
+ + + + + + + + +
+ + +

play

+
void play(<Function> oncomplete)
+ +
    Starts playback of the playlist, also stops any capturing. To start capturing again call startCapture().
+ + + + +
    + Parameters: + +
      oncomplete - (optional) Callback to execute when playback has completed +
    + +
+ + + + + + + + +
+ + +

startCapture

+
void startCapture(<Boolean> clearPlaylist)
+ +
    Start capturing actions on the added actors.
+ + + + +
    + Parameters: + +
      clearPlaylist - Whether to also create a new playlist +
    + +
+ + + + + + + + +
+ + +

stop

+
void stop()
+ +
    Stop at the next available stopping point
+ + + + + + + + + + + +
+ + +

stopCapture

+
void stopCapture()
+ +
    Stop capturing on all added actors.
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.DatePicker.html b/www/extras/yui-ext/docs/YAHOO.ext.DatePicker.html new file mode 100644 index 000000000..81ac92fbd --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.DatePicker.html @@ -0,0 +1,1084 @@ + + + + + +YAHOO.ext.DatePicker + + + + + + +

Class YAHOO.ext.DatePicker

+
Object
+   |
+   +--YAHOO.ext.DatePicker
+
+ + +
+
+ +
class + YAHOO.ext.DatePicker + + +
+ +

+ Defined in DatePicker.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectdayNames +
+   
+  ObjectdisabledDatesRE +
+   
+  ObjectdisabledDatesText +
+   
+  ObjectdisabledDays +
+   
+  ObjectdisabledDaysText +
+   
+  Objectformat +
+   
+  ObjectmaxDate +
+   
+  ObjectmaxText +
+   
+  ObjectminDate +
+   
+  ObjectminText +
+   
+  ObjectmonthNames +
+   
+  ObjecttodayText +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.DatePicker + + (id, parentElement) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + buildInnerCal(dateVal) + +
+    + +
+ +  Object + + + + + clearTime(date) + +
+    + +
+ +  Object + + + + + getDaysInMonth(m, y) + +
+    + +
+ +  Object + + + + + getNextMonth(d) + +
+    + +
+ +  Object + + + + + getPrevMonth(d) + +
+    + +
+ +  Object + + + + + getSelectedDate() + +
+    + +
+ +  void + + + + + handleClick(e) + +
+    + +
+ +  void + + + + + handleKeyDown(e) + +
+    + +
+ +  void + + + + + handleMouseDown(e) + +
+    + +
+ +  void + + + + + handleMouseWheel(e) + +
+    + +
+ +  void + + + + + handleSelection(date) + +
+    + +
+ +  void + + + + + hide() + +
+    + +
+ +  Object + + + + + isLeapYear(y) + +
+    + +
+ +  void + + + + + refresh() + +
+    + +
+ +  void + + + + + selectToday() + +
+    + +
+ +  void + + + + + setSelectedDate(date) + +
+    + +
+ +  void + + + + + show(x, y, value, callback) + +
+    + +
+ +  void + + + + + showNextMonth() + +
+    + +
+ +  void + + + + + showNextYear() + +
+    + +
+ +  void + + + + + showPrevMonth() + +
+    + +
+ +  void + + + + + showPrevYear() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

dayNames

+
Object dayNames
+
    + + +
+
+ + +

disabledDatesRE

+
Object disabledDatesRE
+
    + + +
+
+ + +

disabledDatesText

+
Object disabledDatesText
+
    + + +
+
+ + +

disabledDays

+
Object disabledDays
+
    + + +
+
+ + +

disabledDaysText

+
Object disabledDaysText
+
    + + +
+
+ + +

format

+
Object format
+
    + + +
+
+ + +

maxDate

+
Object maxDate
+
    + + +
+
+ + +

maxText

+
Object maxText
+
    + + +
+
+ + +

minDate

+
Object minDate
+
    + + +
+
+ + +

minText

+
Object minText
+
    + + +
+
+ + +

monthNames

+
Object monthNames
+
    + + +
+
+ + +

todayText

+
Object todayText
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.DatePicker

+
YAHOO.ext.DatePicker(id, parentElement)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

buildInnerCal

+
void buildInnerCal(dateVal)
+ + + + + + + + + + + +
+ + +

clearTime

+
Object clearTime(date)
+ + + + + + + + + + + +
+ + +

getDaysInMonth

+
Object getDaysInMonth(m, y)
+ + + + + + + + + + + +
+ + +

getNextMonth

+
Object getNextMonth(d)
+ + + + + + + + + + + +
+ + +

getPrevMonth

+
Object getPrevMonth(d)
+ + + + + + + + + + + +
+ + +

getSelectedDate

+
Object getSelectedDate()
+ + + + + + + + + + + +
+ + +

handleClick

+
void handleClick(e)
+ + + + + + + + + + + +
+ + +

handleKeyDown

+
void handleKeyDown(e)
+ + + + + + + + + + + +
+ + +

handleMouseDown

+
void handleMouseDown(e)
+ + + + + + + + + + + +
+ + +

handleMouseWheel

+
void handleMouseWheel(e)
+ + + + + + + + + + + +
+ + +

handleSelection

+
void handleSelection(date)
+ + + + + + + + + + + +
+ + +

hide

+
void hide()
+ + + + + + + + + + + +
+ + +

isLeapYear

+
Object isLeapYear(y)
+ + + + + + + + + + + +
+ + +

refresh

+
void refresh()
+ + + + + + + + + + + +
+ + +

selectToday

+
void selectToday()
+ + + + + + + + + + + +
+ + +

setSelectedDate

+
void setSelectedDate(date)
+ + + + + + + + + + + +
+ + +

show

+
void show(x, y, value, callback)
+ + + + + + + + + + + +
+ + +

showNextMonth

+
void showNextMonth()
+ + + + + + + + + + + +
+ + +

showNextYear

+
void showNextYear()
+ + + + + + + + + + + +
+ + +

showPrevMonth

+
void showPrevMonth()
+ + + + + + + + + + + +
+ + +

showPrevYear

+
void showPrevYear()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.Template.html b/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.Template.html new file mode 100644 index 000000000..196ab76a2 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.Template.html @@ -0,0 +1,465 @@ + + + + + +YAHOO.ext.DomHelper.Template + + + + + + +

Class YAHOO.ext.DomHelper.Template

+
Object
+   |
+   +--YAHOO.ext.DomHelper.Template
+
+ + +
+
+ +
class + YAHOO.ext.DomHelper.Template + + +
+ +

+
Represents an HTML fragment template +
Defined in DomHelper.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.DomHelper.Template + + (<String> html) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  HTMLElement + + + + + append(<HTMLElement> el, <Object> values) + +
+    + Applies the supplied values to the template and append the new node(s) to el +
+ +  String + + + + + applyTemplate(<Object> values) + +
+    + Returns an HTML fragment of this template with the specified values applied +
+ +  void + + + + + compile() + +
+    + Compiles the template into an internal function, eliminating the RegEx overhead +
+ +  HTMLElement + + + + + insertAfter(<HTMLElement> el, <Object> values) + +
+    + Applies the supplied values to the template and inserts the new node(s) after el +
+ +  HTMLElement + + + + + insertBefore(<HTMLElement> el, <Object> values) + +
+    + Applies the supplied values to the template and inserts the new node(s) before el +
+ +  HTMLElement + + + + + overwrite(<HTMLElement> el, <Object> values) + +
+    + Applies the supplied values to the template and overwrites the content of el with the new node(s) +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.DomHelper.Template

+
YAHOO.ext.DomHelper.Template(<String> html)
+ + + + +
    + Parameters: + +
      html - The HTML fragment +
    + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

append

+
HTMLElement append(<HTMLElement> el, <Object> values)
+ +
    Applies the supplied values to the template and append the new node(s) to el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      values - The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {YAHOO.ext.DomHelper.Template.prototype.foo = 'bar';}) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

applyTemplate

+
String applyTemplate(<Object> values)
+ +
    Returns an HTML fragment of this template with the specified values applied
+ + + + +
    + Parameters: + +
      values - The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {YAHOO.ext.DomHelper.Template.prototype.foo = 'bar';}) +
    + +
+ + + + + + + + +
+ + +

compile

+
void compile()
+ +
    Compiles the template into an internal function, eliminating the RegEx overhead
+ + + + + + + + + + + +
+ + +

insertAfter

+
HTMLElement insertAfter(<HTMLElement> el, <Object> values)
+ +
    Applies the supplied values to the template and inserts the new node(s) after el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      values - The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {YAHOO.ext.DomHelper.Template.prototype.foo = 'bar';}) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

insertBefore

+
HTMLElement insertBefore(<HTMLElement> el, <Object> values)
+ +
    Applies the supplied values to the template and inserts the new node(s) before el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      values - The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {YAHOO.ext.DomHelper.Template.prototype.foo = 'bar';}) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

overwrite

+
HTMLElement overwrite(<HTMLElement> el, <Object> values)
+ +
    Applies the supplied values to the template and overwrites the content of el with the new node(s)
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      values - The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {YAHOO.ext.DomHelper.Template.prototype.foo = 'bar';}) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.html b/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.html new file mode 100644 index 000000000..a00f420a1 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.DomHelper.html @@ -0,0 +1,493 @@ + + + + + +YAHOO.ext.DomHelper + + + + + + +

Class YAHOO.ext.DomHelper

+
Object
+   |
+   +--YAHOO.ext.DomHelper
+
+ + +
+
+ +
class + YAHOO.ext.DomHelper + + +
+ +
+ + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.DomHelper.Template
+  + + + + + + + + + + + + + + + + + + + +
Field Summary
+  BooleanuseDom +
+   True to force the use of DOM instead of html fragments
+   + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  HTMLElement + + + + + append(<HTMLElement> el, <Object> o) + +
+    + Creates new Dom element(s) and appends them to el +
+ +  YAHOO.ext.DomHelper.Template + + + + + createTemplate(<Object> o) + +
+    + Creates a new YAHOO.ext.DomHelper.Template from the Dom object spec +
+ +  HTMLElement + + + + + insertAfter(<HTMLElement> el, <Object> o) + +
+    + Creates new Dom element(s) and inserts them after el +
+ +  HTMLElement + + + + + insertBefore(<HTMLElement> el, <Object> o) + +
+    + Creates new Dom element(s) and inserts them before el +
+ +  HTMLElement + + + + + insertHtml(<String> where, <HTMLElement> el, <String> html) + +
+    + Inserts an HTML fragment into the Dom +
+ +  HTMLElement + + + + + overwrite(<HTMLElement> el, <Object> o) + +
+    + Creates new Dom element(s) and overwrites the contents of el with them +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

useDom

+
Boolean useDom
+
    + True to force the use of DOM instead of html fragments + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

append

+
HTMLElement append(<HTMLElement> el, <Object> o)
+ +
    Creates new Dom element(s) and appends them to el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      o - The Dom object spec (and children) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

createTemplate

+
YAHOO.ext.DomHelper.Template createTemplate(<Object> o)
+ +
    Creates a new YAHOO.ext.DomHelper.Template from the Dom object spec
+ + + + +
    + Parameters: + +
      o - The Dom object spec (and children) +
    + +
+ + + + +
    + Returns: +
      + The new template +
    +
+ + + + + +
+ + +

insertAfter

+
HTMLElement insertAfter(<HTMLElement> el, <Object> o)
+ +
    Creates new Dom element(s) and inserts them after el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      o - The Dom object spec (and children) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

insertBefore

+
HTMLElement insertBefore(<HTMLElement> el, <Object> o)
+ +
    Creates new Dom element(s) and inserts them before el
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      o - The Dom object spec (and children) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

insertHtml

+
HTMLElement insertHtml(<String> where, <HTMLElement> el, <String> html)
+ +
    Inserts an HTML fragment into the Dom
+ + + + +
    + Parameters: + +
      where - Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. +
    + +
      el - The context element +
    + +
      html - The HTML fragmenet +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + +

overwrite

+
HTMLElement overwrite(<HTMLElement> el, <Object> o)
+ +
    Creates new Dom element(s) and overwrites the contents of el with them
+ + + + +
    + Parameters: + +
      el - The context element +
    + +
      o - The Dom object spec (and children) +
    + +
+ + + + +
    + Returns: +
      + The new node +
    +
+ + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Element.html b/www/extras/yui-ext/docs/YAHOO.ext.Element.html new file mode 100644 index 000000000..f0456f3fa --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Element.html @@ -0,0 +1,3670 @@ + + + + + +YAHOO.ext.Element + + + + + + +

Class YAHOO.ext.Element

+
Object
+   |
+   +--YAHOO.ext.Element
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.Actor, YAHOO.ext.Animator +
+
+ + +
+
+ +
class + YAHOO.ext.Element + + +
+ +

+
Wraps around a DOM element and provides convenient access to Yahoo + UI library functionality.

+ Usage:
+


+ var el = YAHOO.ext.Element.get('myElementId');
+ // or the shorter
+ var el = getEl('myElementId');
+ 
+ Using YAHOO.ext.Element.get() instead of calling the constructor directly ensures you get the same object + each call instead of constructing a new one.
+
Defined in Element.js

Requires:
    - YAHOO.util.Dom
    - YAHOO.util.Event
    - YAHOO.util.CustomEvent
    - YAHOO.util.Anim (optional) to support animation
    - YAHOO.util.Motion (optional) to support animation
    - YAHOO.util.Easing (optional) to support animation
+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectautoBoxAdjust +
+   Whether to automatically adjust width and height settings for box-model issues
+  StringdefaultUnit +
+   The default unit to append to CSS values where a unit isn't provided (Defaults to px).
+  Stringid +
+   The DOM element ID
+  CustomEventonMoved +
+   Fires when element moves.
+  CustomEventonResized +
+   Fires when element is resized.
+  CustomEventonVisibilityChanged +
+   Fires when visibility changes.
+ <static>  NumberDISPLAY +
+   Visibility mode constant - Use display to hide element
+ <static>  NumberVISIBILITY +
+   Visibility mode constant - Use visibility to hide element
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Element + + (<String> elementId, <Boolean> forceNew) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addClass(<String> className) + +
+    + Add a CSS class to the element. +
+ +  void + + + + + addHandler(<String> eventName, <Boolean> stopPropagation, <Function> handler, <Object> scope, <boolean> override) + +
+    + Appends an event handler to this element and automatically prevents the default action, and if set stops propagation (bubbling) as well +
+ +  void + + + + + addListener(<String> eventName, <Function> handler, <Object> scope, <boolean> override) + +
+    + Appends an event handler to this element +
+ +  Object + + + + + addManagedListener(<String> eventName, <Function> fn, <Object> scope, <boolean> override) + +
+    + Append a managed listener - See YAHOO.ext.EventObject for more details. +
+ +  void + + + + + alignTo(<String/HTMLElement/YAHOO.ext.Element> element, <String> position, <Array> offsets, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Align this element with another element. +
+ +  void + + + + + animate(<Object> args, <Float> duration, <Function> onComplete, <Function> easing, <Function> animType) + +
+    + Perform Yahoo UI animation on this element. +
+ +  void + + + + + beginMeasure() + +
+    + +
+ +  void + + + + + clearOpacity() + +
+    + Clears any opacity settings from this element. +
+ +  void + + + + + clearPositioning() + +
+    + Clear positioning back to the default when the document was loaded +
+ +  void + + + + + clip() + +
+    + Clip overflow on the element - use unclip() to remove +
+ +  void + + + + + enableDisplayMode() + +
+    + Convenience method for setVisibilityMode(Element.DISPLAY) +
+ +  void + + + + + endMeasure() + +
+    + +
+ +  void + + + + + focus() + +
+    + Tries to focus the element. +
+ +  Number + + + + + getBorderWidth(<String> side) + +
+    + Gets the width of the border(s) for the specified side(s) +
+ +  String + + + + + getBottom() + +
+    + Gets the bottom Y coordinate of the element (element Y position + element height) +
+ +  void + + + + + getBox(contentBox) + +
+    + Return a box {x, y, width, height} that can be used to set another elements + size to match this element. +
+ +  Array + + + + + getCenterXY(offsetScroll) + +
+    + Calculates the x, y to center this element on the screen +
+ +  Array + + + + + getChildrenByClassName(<String> className, <String> tagName) + +
+    + Gets an array of child YAHOO.ext.Element objects by class name and optional tagName +
+ +  Array + + + + + getChildrenByTagName(<String> tagName) + +
+    + Gets an array of child YAHOO.ext.Element objects by tag name +
+ +  Number + + + + + getHeight() + +
+    + Returns the offset height of the element +
+ +  Object + + + + + getLeft() + +
+    + Same as getX() +
+ +  Number + + + + + getPadding(<String> side) + +
+    + Gets the width of the padding(s) for the specified side(s) +
+ +  void + + + + + getPositioning() + +
+    + Gets an object with all CSS positioning properties. +
+ +  Region + + + + + getRegion() + +
+    + Returns the region position of the given element. +
+ +  String + + + + + getRight() + +
+    + Gets the right X coordinate of the element (element X position + element width) +
+ +  Object} + + + + + getSize() + +
+    + Returns the size of the element +
+ +  String + + + + + getStyle(name) + +
+    + Normalizes currentStyle and ComputedStyle. +
+ +  Object + + + + + getTop() + +
+    + Same as getY() +
+ +  YAHOO.ext.UpdateManager + + + + + getUpdateManager() + +
+    + Gets this elements UpdateManager +
+ +  Number + + + + + getWidth() + +
+    + Returns the offset width of the element +
+ +  Object + + + + + getX() + +
+    + Gets the current X position of the element based on page coordinates. +
+ +  Object + + + + + getXY() + +
+    + Gets the current position of the element based on page coordinates. +
+ +  Object + + + + + getY() + +
+    + Gets the current Y position of the element based on page coordinates. +
+ +  Boolean + + + + + hasClass(<String> className) + +
+    + Checks if a CSS class is in use by the element. +
+ +  void + + + + + hide(<Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Hide this element - Uses display mode to determine whether to use "display" or "visibility". +
+ +  void + + + + + isBorderBox() + +
+    + Tests various css rules/browsers to determine if this element uses a border box +
+ +  Boolean + + + + + isVisible(<Boolean> deep) + +
+    + Checks whether the element is currently visible using both visibility and display properties. +
+ +  Object + + + + + mon(<String> eventName, <Function> fn, <Object> scope, <boolean> override) + +
+    + Append a managed listener (shorthanded for addManagedListener()) +
+ +  void + + + + + move(<String> direction, <Number> distance, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Move this element relative to it's current position. +
+ +  void + + + + + moveTo(<Number> x, <Number> y, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the position of the element in page coordinates, regardless of how the element is positioned. +
+ +  void + + + + + on(<String> eventName, <Function> handler, <Object> scope, <boolean> override) + +
+    + Appends an event handler to this element (Same as addListener) +
+ +  void + + + + + radioClass(className) + +
+    + Adds the passed className to this element and removes the class from all siblings +
+ +  void + + + + + removeAllListeners() + +
+    + Removes all previous added listeners from this element +
+ +  void + + + + + removeClass(<String> className) + +
+    + Removes a CSS class from the element. +
+ +  void + + + + + removeListener(eventName, handler) + +
+    + Removes an event handler from this element +
+ +  void + + + + + replaceClass(<String> oldClassName, <String> newClassName) + +
+    + Replaces a CSS class on the element with another. +
+ +  void + + + + + setAbsolutePositioned(<Number> zIndex) + +
+    + Set the element as absolute positioned with the specified z-index +
+ +  void + + + + + setBottom(bottom) + +
+    + Set the element's css bottom style +
+ +  void + + + + + setBounds(<Number> x, <Number> y, <Number> width, <Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Sets the element's position and size in one shot. +
+ +  void + + + + + setBox(<Object> box, <Boolean> adjust, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Sets the element's box. +
+ +  void + + + + + setHeight(<Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the height of the element +
+ +  void + + + + + setLeft(<String> left) + +
+    + Set the element's X position directly using CSS style (instead of setX()) +
+ +  void + + + + + setLocation(<Number> x, <Number> y, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the position of the element in page coordinates, regardless of how the element is positioned. +
+ +  void + + + + + setOpacity(<Float> opacity, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the opacity of the element +
+ +  void + + + + + setPositioning(positionCfg) + +
+    + Set positioning with an object returned by getPositioning(). +
+ +  void + + + + + setRegion(<YAHOO.util.Region> region, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Sets the element's position and size the the specified region. +
+ +  void + + + + + setRelativePositioned(<Number> zIndex) + +
+    + Set the element as relative positioned with the specified z-index +
+ +  void + + + + + setRight(right) + +
+    + Set the element's css right style +
+ +  void + + + + + setSize(<Number> width, <Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the size of the element. +
+ +  void + + + + + setStyle(name, value) + +
+    + Wrapper for setting style properties +
+ +  void + + + + + setTop(<String> top) + +
+    + Set the element's Y position directly using CSS style (instead of setY()) +
+ +  void + + + + + setVisibilityMode(visMode) + +
+    + Sets the elements visibility mode. +
+ +  void + + + + + setVisible(<Boolean> visible, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Sets the visibility of the element (see details). +
+ +  void + + + + + setWidth(<Number> width, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the width of the element +
+ +  void + + + + + setX(x) + +
+    + Sets the X position of the element based on page coordinates. +
+ +  void + + + + + setXY(<Array> pos, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Set the position of the element in page coordinates, regardless of how the element is positioned. +
+ +  void + + + + + setY(y) + +
+    + Sets the Y position of the element based on page coordinates. +
+ +  void + + + + + show(<Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing) + +
+    + Show this element - Uses display mode to determine whether to use "display" or "visibility". +
+ +  void + + + + + toggle(<Boolean> animate, <float> duration, <Function> onComplete, <Function> easing) + +
+    + Toggles the elements visibility or display, depending on visibility mode. +
+ +  void + + + + + toggleClass(className) + +
+    + +
+ +  void + + + + + unclip() + +
+    + Return clipping (overflow) to original clipping when the document loaded +
+ +  void + + + + + update(<String> html, <Boolean> loadScripts) + +
+    + Update the innerHTML of this element, optionally searching for and processing scripts +
+ + <static> Element + + + + + get(<String/HTMLElement/Element> el, <Boolean> autoGenerateId) + +
+    + Static method to retreive Element objects. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

autoBoxAdjust

+
Object autoBoxAdjust
+
    + Whether to automatically adjust width and height settings for box-model issues + +
+
+ + +

defaultUnit

+
String defaultUnit
+
    + The default unit to append to CSS values where a unit isn't provided (Defaults to px). + +
+
+ + +

id

+
String id
+
    + The DOM element ID + +
+
+ + +

onMoved

+
CustomEvent onMoved
+
    + Fires when element moves. Uses fireDirect with signature: (oElement, newX, newY) + +
+
+ + +

onResized

+
CustomEvent onResized
+
    + Fires when element is resized. Uses fireDirect with signature: (oElement, newWidth, newHeight) + +
+
+ + +

onVisibilityChanged

+
CustomEvent onVisibilityChanged
+
    + Fires when visibility changes. Uses fireDirect with signature: (oElement, boolean isVisible) + +
+
+ + +

DISPLAY

+
<static> Number DISPLAY
+
    + Visibility mode constant - Use display to hide element + +
+
+ + +

VISIBILITY

+
<static> Number VISIBILITY
+
    + Visibility mode constant - Use visibility to hide element + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Element

+
YAHOO.ext.Element(<String> elementId, <Boolean> forceNew)
+ + + + +
    + Parameters: + +
      elementId - +
    + +
      forceNew - (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class). +
    + + +
+ + + + + + + + +
    +Requires:
      - YAHOO.util.Dom
      - YAHOO.util.Event
      - YAHOO.util.CustomEvent
      - YAHOO.util.Anim (optional) to support animation
      - YAHOO.util.Motion (optional) to support animation
      - YAHOO.util.Easing (optional) to support animation
    +
+ +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addClass

+
void addClass(<String> className)
+ +
    Add a CSS class to the element.
+ + + + +
    + Parameters: + +
      className - The CSS class to add +
    + +
+ + + + + + + + +
+ + +

addHandler

+
void addHandler(<String> eventName, <Boolean> stopPropagation, <Function> handler, <Object> scope, <boolean> override)
+ +
    Appends an event handler to this element and automatically prevents the default action, and if set stops propagation (bubbling) as well
+ + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      stopPropagation - Whether to also stopPropagation (bubbling) +
    + +
      handler - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

addListener

+
void addListener(<String> eventName, <Function> handler, <Object> scope, <boolean> override)
+ +
    Appends an event handler to this element
+ + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      handler - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

addManagedListener

+
Object addManagedListener(<String> eventName, <Function> fn, <Object> scope, <boolean> override)
+ + + + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      fn - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

alignTo

+
void alignTo(<String/HTMLElement/YAHOO.ext.Element> element, <String> position, <Array> offsets, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Align this element with another element.
+ + + + +
    + Parameters: + +
      element - The element to align to. +
    + +
      position - The position to align to. Possible values are 'tl' - top left, 'tr' - top right, 'bl' - bottom left, and 'br' - bottom right. +
    + +
      offsets - (optional) Offset the positioning by [x, y] +
    + +
      animate - (optional) Animate the movement (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. +
    + +
+ + + + + + + + +
+ + +

animate

+
void animate(<Object> args, <Float> duration, <Function> onComplete, <Function> easing, <Function> animType)
+ +
    Perform Yahoo UI animation on this element.
+ + + + +
    + Parameters: + +
      args - The YUI animation control args +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
      animType - (optional) YAHOO.util.Anim subclass to use. For YAHOO.ext.Element.prototype.example = YAHOO;.util.Motion +
    + +
+ + + + + + + + +
+ + +

beginMeasure

+
void beginMeasure()
+ + + + + + + + + + + +
+ + +

clearOpacity

+
void clearOpacity()
+ +
    Clears any opacity settings from this element. Required in some cases for IE.
+ + + + + + + + + + + +
+ + +

clearPositioning

+
void clearPositioning()
+ +
    Clear positioning back to the default when the document was loaded
+ + + + + + + + + + + +
+ + +

clip

+
void clip()
+ +
    Clip overflow on the element - use unclip() to remove
+ + + + + + + + + + + +
+ + +

enableDisplayMode

+
void enableDisplayMode()
+ +
    Convenience method for setVisibilityMode(Element.DISPLAY)
+ + + + + + + + + + + +
+ + +

endMeasure

+
void endMeasure()
+ + + + + + + + + + + +
+ + +

focus

+
void focus()
+ +
    Tries to focus the element. Any exceptions are caught.
+ + + + + + + + + + + +
+ + +

getBorderWidth

+
Number getBorderWidth(<String> side)
+ +
    Gets the width of the border(s) for the specified side(s)
+ + + + +
    + Parameters: + +
      side - Can be t, l, r, b or any combination of those to add multiple values. For example, passing lr would get the border (l)eft width + the border (r)ight width. +
    + +
+ + + + +
    + Returns: +
      + The width of the sides passed added together +
    +
+ + + + + +
+ + +

getBottom

+
String getBottom()
+ +
    Gets the bottom Y coordinate of the element (element Y position + element height)
+ + + + + + + +
    + Returns: +
      + The bottom position of the element +
    +
+ + + + + +
+ + +

getBox

+
void getBox(contentBox)
+ +
    Return a box {x, y, width, height} that can be used to set another elements + size to match this element. If contentBox is true, a box for the content + of the element is returned.
+ + + + + + + + + + + +
+ + +

getCenterXY

+
Array getCenterXY(offsetScroll)
+ +
    Calculates the x, y to center this element on the screen
+ + + + + + + +
    + Returns: +
      + The x, y values [x, y] +
    +
+ + + + + +
+ + +

getChildrenByClassName

+
Array getChildrenByClassName(<String> className, <String> tagName)
+ +
    Gets an array of child YAHOO.ext.Element objects by class name and optional tagName
+ + + + +
    + Parameters: + +
      className - +
    + +
      tagName - (optional) +
    + +
+ + + + +
    + Returns: +
      + The children +
    +
+ + + + + +
+ + +

getChildrenByTagName

+
Array getChildrenByTagName(<String> tagName)
+ +
    Gets an array of child YAHOO.ext.Element objects by tag name
+ + + + +
    + Parameters: + +
      tagName - +
    + +
+ + + + +
    + Returns: +
      + The children +
    +
+ + + + + +
+ + +

getHeight

+
Number getHeight()
+ +
    Returns the offset height of the element
+ + + + + + + +
    + Returns: +
      + The element's height +
    +
+ + + + + +
+ + +

getLeft

+
Object getLeft()
+ +
    Same as getX()
+ + + + + + + + + + + +
+ + +

getPadding

+
Number getPadding(<String> side)
+ +
    Gets the width of the padding(s) for the specified side(s)
+ + + + +
    + Parameters: + +
      side - Can be t, l, r, b or any combination of those to add multiple values. For example, passing lr would get the padding (l)eft + the padding (r)ight. +
    + +
+ + + + +
    + Returns: +
      + The padding of the sides passed added together +
    +
+ + + + + +
+ + +

getPositioning

+
void getPositioning()
+ +
    Gets an object with all CSS positioning properties. Useful along with setPositioning() to get snapshot before performing an update and then restoring the element.
+ + + + + + + + + + + +
+ + +

getRegion

+
Region getRegion()
+ +
    Returns the region position of the given element. + The element must be part of the DOM tree to have a region (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + + + + +
    + Returns: +
      + A YAHOO.util.Region containing "top, left, bottom, right" member data. +
    +
+ + + + + +
+ + +

getRight

+
String getRight()
+ +
    Gets the right X coordinate of the element (element X position + element width)
+ + + + + + + +
    + Returns: +
      + The left position of the element +
    +
+ + + + + +
+ + +

getSize

+
Object} getSize()
+ +
    Returns the size of the element
+ + + + + + + + + + + +
+ + +

getStyle

+
String getStyle(name)
+ +
    Normalizes currentStyle and ComputedStyle.
+ + + + +
    + Parameters: + +
      property - The style property whose value is returned. +
    + +
+ + + + +
    + Returns: +
      + The current value of the style property for this element. +
    +
+ + + + + +
+ + +

getTop

+
Object getTop()
+ +
    Same as getY()
+ + + + + + + + + + + +
+ + +

getUpdateManager

+
YAHOO.ext.UpdateManager getUpdateManager()
+ +
    Gets this elements UpdateManager
+ + + + + + + +
    + Returns: +
      + The UpdateManager +
    +
+ + + + + +
+ + +

getWidth

+
Number getWidth()
+ +
    Returns the offset width of the element
+ + + + + + + +
    + Returns: +
      + The element's width +
    +
+ + + + + +
+ + +

getX

+
Object getX()
+ +
    Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + + + + + + + + +
+ + +

getXY

+
Object getXY()
+ +
    Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + + + + + + + + +
+ + +

getY

+
Object getY()
+ +
    Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + + + + + + + + +
+ + +

hasClass

+
Boolean hasClass(<String> className)
+ +
    Checks if a CSS class is in use by the element.
+ + + + +
    + Parameters: + +
      className - The CSS class to check +
    + +
+ + + + +
    + Returns: +
      + true or false +
    +
+ + + + + +
+ + +

hide

+
void hide(<Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Hide this element - Uses display mode to determine whether to use "display" or "visibility". See setVisible().
+ + + + +
    + Parameters: + +
      animate - (optional) Animate (fade) the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

isBorderBox

+
void isBorderBox()
+ +
    Tests various css rules/browsers to determine if this element uses a border box
+ + + + + + + + + + + +
+ + +

isVisible

+
Boolean isVisible(<Boolean> deep)
+ +
    Checks whether the element is currently visible using both visibility and display properties.
+ + + + +
    + Parameters: + +
      deep - True to walk the dom and see if parent elements are hidden +
    + +
+ + + + +
    + Returns: +
      + Whether the element is currently visible +
    +
+ + + + + +
+ + +

mon

+
Object mon(<String> eventName, <Function> fn, <Object> scope, <boolean> override)
+ + + + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      fn - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

move

+
void move(<String> direction, <Number> distance, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Move this element relative to it's current position.
+ + + + +
    + Parameters: + +
      direction - Possible values YAHOO.ext.Element.prototype.are = 'left'; 'right', 'up', 'down'. +
    + +
      distance - How far to move the element in pixels +
    + +
      animate - (optional) Animate the movement (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. +
    + +
+ + + + + + + + +
+ + +

moveTo

+
void moveTo(<Number> x, <Number> y, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the position of the element in page coordinates, regardless of how the element is positioned. + The element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + +
    + Parameters: + +
      x - X value for new position (coordinates are page-based) +
    + +
      y - Y value for new position (coordinates are page-based) +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

on

+
void on(<String> eventName, <Function> handler, <Object> scope, <boolean> override)
+ +
    Appends an event handler to this element (Same as addListener)
+ + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      handler - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

radioClass

+
void radioClass(className)
+ +
    Adds the passed className to this element and removes the class from all siblings
+ + + + + + + + + + + +
+ + +

removeAllListeners

+
void removeAllListeners()
+ +
    Removes all previous added listeners from this element
+ + + + + + + + + + + +
+ + +

removeClass

+
void removeClass(<String> className)
+ +
    Removes a CSS class from the element.
+ + + + +
    + Parameters: + +
      className - The CSS class to remove +
    + +
+ + + + + + + + +
+ + +

removeListener

+
void removeListener(eventName, handler)
+ +
    Removes an event handler from this element
+ + + + +
    + Parameters: + +
      sType - the type of event to remove +
    + +
      fn - the method the event invokes +
    + +
+ + + + + + + + +
+ + +

replaceClass

+
void replaceClass(<String> oldClassName, <String> newClassName)
+ +
    Replaces a CSS class on the element with another.
+ + + + +
    + Parameters: + +
      oldClassName - The CSS class to replace +
    + +
      newClassName - The replacement CSS class +
    + +
+ + + + + + + + +
+ + +

setAbsolutePositioned

+
void setAbsolutePositioned(<Number> zIndex)
+ +
    Set the element as absolute positioned with the specified z-index
+ + + + +
    + Parameters: + +
      zIndex - (optional) +
    + +
+ + + + + + + + +
+ + +

setBottom

+
void setBottom(bottom)
+ +
    Set the element's css bottom style
+ + + + +
    + Parameters: + +
      top - The bottom CSS property value +
    + +
+ + + + + + + + +
+ + +

setBounds

+
void setBounds(<Number> x, <Number> y, <Number> width, <Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
+ + + + +
    + Parameters: + +
      x - X value for new position (coordinates are page-based) +
    + +
      y - Y value for new position (coordinates are page-based) +
    + +
      width - The new width +
    + +
      height - The new height +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setBox

+
void setBox(<Object> box, <Boolean> adjust, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
+ + + + +
    + Parameters: + +
      box - The box to fill {x, y, width, height} +
    + +
      adjust - (optional) Whether to adjust for box-model issues automatically +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setHeight

+
void setHeight(<Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the height of the element
+ + + + +
    + Parameters: + +
      height - The new height +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller) +
    + +
+ + + + + + + + +
+ + +

setLeft

+
void setLeft(<String> left)
+ +
    Set the element's X position directly using CSS style (instead of setX())
+ + + + +
    + Parameters: + +
      left - The left CSS property value +
    + +
+ + + + + + + + +
+ + +

setLocation

+
void setLocation(<Number> x, <Number> y, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the position of the element in page coordinates, regardless of how the element is positioned. + The element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + +
    + Parameters: + +
      x - X value for new position (coordinates are page-based) +
    + +
      y - Y value for new position (coordinates are page-based) +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setOpacity

+
void setOpacity(<Float> opacity, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the opacity of the element
+ + + + +
    + Parameters: + +
      opacity - The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc +
    + +
      animate - (optional) Animate (fade) the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller) +
    + +
+ + + + + + + + +
+ + +

setPositioning

+
void setPositioning(positionCfg)
+ + + + + + + + + + + + + +
+ + +

setRegion

+
void setRegion(<YAHOO.util.Region> region, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently.
+ + + + +
    + Parameters: + +
      region - The region to fill +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setRelativePositioned

+
void setRelativePositioned(<Number> zIndex)
+ +
    Set the element as relative positioned with the specified z-index
+ + + + +
    + Parameters: + +
      zIndex - (optional) +
    + +
+ + + + + + + + +
+ + +

setRight

+
void setRight(right)
+ +
    Set the element's css right style
+ + + + +
    + Parameters: + +
      left - The right CSS property value +
    + +
+ + + + + + + + +
+ + +

setSize

+
void setSize(<Number> width, <Number> height, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the size of the element. If animation is true, both width an height will be animated concurrently.
+ + + + +
    + Parameters: + +
      width - The new width +
    + +
      height - The new height +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setStyle

+
void setStyle(name, value)
+ +
    Wrapper for setting style properties
+ + + + +
    + Parameters: + +
      property - The style property to be set. +
    + +
      val - The value to apply to the given property. +
    + +
+ + + + + + + + +
+ + +

setTop

+
void setTop(<String> top)
+ +
    Set the element's Y position directly using CSS style (instead of setY())
+ + + + +
    + Parameters: + +
      top - The top CSS property value +
    + +
+ + + + + + + + +
+ + +

setVisibilityMode

+
void setVisibilityMode(visMode)
+ +
    Sets the elements visibility mode. When setVisible() is called it + will use this to determine whether to set the visibility or the display property.
+ + + + +
    + Parameters: + +
      visMode - Element.VISIBILITY or Element.DISPLAY +
    + +
+ + + + + + + + +
+ + +

setVisible

+
void setVisible(<Boolean> visible, <Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use + the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
+ + + + +
    + Parameters: + +
      visible - Whether the element is visible +
    + +
      animate - (optional) Fade the element in or out (Default is false) +
    + +
      duration - (optional) How long the fade effect lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing) +
    + +
+ + + + + + + + +
+ + +

setWidth

+
void setWidth(<Number> width, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the width of the element
+ + + + +
    + Parameters: + +
      width - The new width +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if width is larger or YAHOO.util.Easing.easeIn if it is smaller) +
    + +
+ + + + + + + + +
+ + +

setX

+
void setX(x)
+ +
    Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + +
    + Parameters: + +
      The - X position of the element +
    + +
+ + + + + + + + +
+ + +

setXY

+
void setXY(<Array> pos, <Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Set the position of the element in page coordinates, regardless of how the element is positioned. + The element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + +
    + Parameters: + +
      pos - Contains X & Y [x, y] values for new position (coordinates are page-based) +
    + +
      animate - (optional) Animate the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

setY

+
void setY(y)
+ +
    Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (YAHOO.ext.Element.prototype.display = none;or elements not appended return false).
+ + + + +
    + Parameters: + +
      The - Y position of the element +
    + +
+ + + + + + + + +
+ + +

show

+
void show(<Boolean> animate, <Float> duration, <Function> onComplete, <Function> easing)
+ +
    Show this element - Uses display mode to determine whether to use "display" or "visibility". See setVisible().
+ + + + +
    + Parameters: + +
      animate - (optional) Animate (fade in) the transition (Default is false) +
    + +
      duration - (optional) How long the animation lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) +
    + +
+ + + + + + + + +
+ + +

toggle

+
void toggle(<Boolean> animate, <float> duration, <Function> onComplete, <Function> easing)
+ +
    Toggles the elements visibility or display, depending on visibility mode.
+ + + + +
    + Parameters: + +
      animate - (optional) Fade the element in or out (Default is false) +
    + +
      duration - (optional) How long the fade effect lasts. (Defaults to .35 seconds) +
    + +
      onComplete - (optional) Function to call when animation completes. +
    + +
      easing - (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing) +
    + +
+ + + + + + + + +
+ + +

toggleClass

+
void toggleClass(className)
+ + + + + + + + + + + +
+ + +

unclip

+
void unclip()
+ +
    Return clipping (overflow) to original clipping when the document loaded
+ + + + + + + + + + + +
+ + +

update

+
void update(<String> html, <Boolean> loadScripts)
+ +
    Update the innerHTML of this element, optionally searching for and processing scripts
+ + + + +
    + Parameters: + +
      html - The new HTML +
    + +
      loadScripts - (optional) true to look for and process scripts +
    + +
+ + + + + + + + +
+ + +

get

+
<static> Element get(<String/HTMLElement/Element> el, <Boolean> autoGenerateId)
+ +
    Static method to retreive Element objects. Uses simple caching to consistently return the same object. + Automatically fixes if an object was recreated with the same id via AJAX or DOM.
+ + + + +
    + Parameters: + +
      el - The id of the element or the element to wrap (must have an id). If you pass in an element, it is returned +
    + +
      autoGenerateId - (optional) Set this flag to true if you are passing an element without an id (like document.body). It will auto generate an id if one isn't present. +
    + +
+ + + + +
    + Returns: +
      + The element object +
    +
+ + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.EventManager.html b/www/extras/yui-ext/docs/YAHOO.ext.EventManager.html new file mode 100644 index 000000000..608543639 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.EventManager.html @@ -0,0 +1,412 @@ + + + + + +YAHOO.ext.EventManager + + + + + + +

Class YAHOO.ext.EventManager

+
Object
+   |
+   +--YAHOO.ext.EventManager
+
+ + +
+
+ +
class + YAHOO.ext.EventManager + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectieDeferSrc +
+   
+   + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Function + + + + + addListener(<Object> element, <String> eventName, <Function> fn, <Object> scope, <boolean> override) + +
+    + Appends an event handler +
+ +  Function + + + + + on(<Object> element, <String> eventName, <Function> fn, <Object> scope, <boolean> override) + +
+    + Appends an event handler (shorthand for addListener) +
+ +  void + + + + + onDocumentReady(fn, scope, override) + +
+    + Fires when the document is ready (before onload) +
+ +  Boolean + + + + + removeListener(<Object> element, <String> eventName, <Function> wrappedFn) + +
+    + Removes an event handler +
+ +  Object + + + + + wrap(fn, scope, override) + +
+    + Places a simple wrapper around an event handler to override the browser event + object with a YAHOO.ext.EventObject +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

ieDeferSrc

+
Object ieDeferSrc
+
    + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addListener

+
Function addListener(<Object> element, <String> eventName, <Function> fn, <Object> scope, <boolean> override)
+ +
    Appends an event handler
+ + + + +
    + Parameters: + +
      element - The html element to assign the event to +
    + +
      eventName - The type of event to append +
    + +
      fn - The method the event invokes +
    + +
      scope - An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + +
    + Returns: +
      + The wrapper function created (to be used to remove the listener if necessary) +
    +
+ + + + + +
+ + +

on

+
Function on(<Object> element, <String> eventName, <Function> fn, <Object> scope, <boolean> override)
+ +
    Appends an event handler (shorthand for addListener)
+ + + + +
    + Parameters: + +
      element - The html element to assign the event to +
    + +
      eventName - The type of event to append +
    + +
      fn - The method the event invokes +
    + +
      scope - An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + +
    + Returns: +
      + The wrapper function created (to be used to remove the listener if necessary) +
    +
+ + + + + +
+ + +

onDocumentReady

+
void onDocumentReady(fn, scope, override)
+ +
    Fires when the document is ready (before onload)
+ + + + + + + + + + + +
+ + +

removeListener

+
Boolean removeListener(<Object> element, <String> eventName, <Function> wrappedFn)
+ +
    Removes an event handler
+ + + + +
    + Parameters: + +
      element - The html element to remove the event from +
    + +
      eventName - The type of event to append +
    + +
      wrappedFn - The wrapper method returned when adding the listener +
    + +
+ + + + +
    + Returns: +
      + True if a listener was actually removed +
    +
+ + + + + +
+ + +

wrap

+
Object wrap(fn, scope, override)
+ +
    Places a simple wrapper around an event handler to override the browser event + object with a YAHOO.ext.EventObject
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.EventObject.html b/www/extras/yui-ext/docs/YAHOO.ext.EventObject.html new file mode 100644 index 000000000..50a1332eb --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.EventObject.html @@ -0,0 +1,945 @@ + + + + + +YAHOO.ext.EventObject + + + + + + +

Class YAHOO.ext.EventObject

+
Object
+   |
+   +--YAHOO.ext.EventObject
+
+ + +
+
+ +
class + YAHOO.ext.EventObject + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectaltKey +
+   True if the alt key was down during the event
+  NumberBACKSPACE +
+   Key constant
+  ObjectbrowserEvent +
+   The normal browser event
+  Objectbutton +
+   The button pressed in a mouse event
+  ObjectctrlKey +
+   True if the control key was down during the event
+  NumberDELETE +
+   Key constant
+  NumberDOWN +
+   Key constant
+  NumberEND +
+   Key constant
+  NumberESC +
+   Key constant
+  NumberF5 +
+   Key constant
+  NumberHOME +
+   Key constant
+  NumberLEFT +
+   Key constant
+  NumberPAGEDOWN +
+   Key constant
+  NumberPAGEUP +
+   Key constant
+  NumberRETURN +
+   Key constant
+  NumberRIGHT +
+   Key constant
+  ObjectshiftKey +
+   True if the shift key was down during the event
+  NumberSPACE +
+   Key constant
+  NumberTAB +
+   Key constant
+  NumberUP +
+   Key constant
+   + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  HTMLelement + + + + + findTarget(className, tagName) + +
+    + Walk up the DOM looking for a particular target - if the default target matches, it is returned. +
+ +  Number + + + + + getCharCode() + +
+    + Gets the key code for the event. +
+ +  Number + + + + + getPageX() + +
+    + Gets the x coordinate of the event. +
+ +  Number + + + + + getPageY() + +
+    + Gets the y coordinate of the event. +
+ +  HTMLelement + + + + + getRelatedTarget() + +
+    + Gets the related target. +
+ +  HTMLelement + + + + + getTarget() + +
+    + Gets the target for the event. +
+ +  Number + + + + + getTime() + +
+    + Gets the time of the event. +
+ +  Object + + + + + getWheelDelta() + +
+    + Normalizes mouse wheel delta across browsers +
+ +  Array + + + + + getXY() + +
+    + Gets the page coordinates of the event. +
+ +  Boolean + + + + + hasModifier() + +
+    + Returns true if the control, shift or alt key was pressed during this event. +
+ +  void + + + + + preventDefault() + +
+    + Prevents the browsers default handling of the event. +
+ +  void + + + + + stopEvent() + +
+    + Stop the event. +
+ +  void + + + + + stopPropagation() + +
+    + Cancels bubbling of the event. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

altKey

+
Object altKey
+
    + True if the alt key was down during the event + +
+
+ + +

BACKSPACE

+
Number BACKSPACE
+
    + Key constant + +
+
+ + +

browserEvent

+
Object browserEvent
+
    + The normal browser event + +
+
+ + +

button

+
Object button
+
    + The button pressed in a mouse event + +
+
+ + +

ctrlKey

+
Object ctrlKey
+
    + True if the control key was down during the event + +
+
+ + +

DELETE

+
Number DELETE
+
    + Key constant + +
+
+ + +

DOWN

+
Number DOWN
+
    + Key constant + +
+
+ + +

END

+
Number END
+
    + Key constant + +
+
+ + +

ESC

+
Number ESC
+
    + Key constant + +
+
+ + +

F5

+
Number F5
+
    + Key constant + +
+
+ + +

HOME

+
Number HOME
+
    + Key constant + +
+
+ + +

LEFT

+
Number LEFT
+
    + Key constant + +
+
+ + +

PAGEDOWN

+
Number PAGEDOWN
+
    + Key constant + +
+
+ + +

PAGEUP

+
Number PAGEUP
+
    + Key constant + +
+
+ + +

RETURN

+
Number RETURN
+
    + Key constant + +
+
+ + +

RIGHT

+
Number RIGHT
+
    + Key constant + +
+
+ + +

shiftKey

+
Object shiftKey
+
    + True if the shift key was down during the event + +
+
+ + +

SPACE

+
Number SPACE
+
    + Key constant + +
+
+ + +

TAB

+
Number TAB
+
    + Key constant + +
+
+ + +

UP

+
Number UP
+
    + Key constant + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

findTarget

+
HTMLelement findTarget(className, tagName)
+ +
    Walk up the DOM looking for a particular target - if the default target matches, it is returned.
+ + + + + + + + + + + +
+ + +

getCharCode

+
Number getCharCode()
+ +
    Gets the key code for the event. Returns value from YAHOO.util.Event.getCharCode() if the event is not null.
+ + + + + + + + + + + +
+ + +

getPageX

+
Number getPageX()
+ +
    Gets the x coordinate of the event. Returns value from YAHOO.util.Event.getPageX() if the event is not null.
+ + + + + + + + + + + +
+ + +

getPageY

+
Number getPageY()
+ +
    Gets the y coordinate of the event. Returns value from YAHOO.util.Event.getPageY() if the event is not null.
+ + + + + + + + + + + +
+ + +

getRelatedTarget

+
HTMLelement getRelatedTarget()
+ +
    Gets the related target. Returns value from YAHOO.util.Event.getRelatedTarget() if the event is not null.
+ + + + + + + + + + + +
+ + +

getTarget

+
HTMLelement getTarget()
+ +
    Gets the target for the event. Returns value from YAHOO.util.Event.getTarget() if the event is not null.
+ + + + + + + + + + + +
+ + +

getTime

+
Number getTime()
+ +
    Gets the time of the event. Returns value from YAHOO.util.Event.getTime() if the event is not null.
+ + + + + + + + + + + +
+ + +

getWheelDelta

+
Object getWheelDelta()
+ +
    Normalizes mouse wheel delta across browsers
+ + + + + + + + + + + +
+ + +

getXY

+
Array getXY()
+ +
    Gets the page coordinates of the event. Returns value from YAHOO.util.Event.getXY() if the event is not null.
+ + + + + + + +
    + Returns: +
      + The xy values like [x, y] +
    +
+ + + + + +
+ + +

hasModifier

+
Boolean hasModifier()
+ +
    Returns true if the control, shift or alt key was pressed during this event.
+ + + + + + + + + + + +
+ + +

preventDefault

+
void preventDefault()
+ +
    Prevents the browsers default handling of the event. Calls YAHOO.util.Event.preventDefault() if the event is not null.
+ + + + + + + + + + + +
+ + +

stopEvent

+
void stopEvent()
+ +
    Stop the event. Calls YAHOO.util.Event.stopEvent() if the event is not null.
+ + + + + + + + + + + +
+ + +

stopPropagation

+
void stopPropagation()
+ +
    Cancels bubbling of the event. Calls YAHOO.util.Event.stopPropagation() if the event is not null.
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Resizable.html b/www/extras/yui-ext/docs/YAHOO.ext.Resizable.html new file mode 100644 index 000000000..f267eaf31 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Resizable.html @@ -0,0 +1,142 @@ + + + + + +YAHOO.ext.Resizable + + + + + + +

Class YAHOO.ext.Resizable

+
Object
+   |
+   +--YAHOO.ext.Resizable
+
+ + +
+
+ +
class + YAHOO.ext.Resizable + + +
+ +

+
Makes an element resizable. + +
Defined in Resizable.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Resizable + + (el, config) + +
+    + +
+ + + +  + + + + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Resizable

+
YAHOO.ext.Resizable(el, config)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.html b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.html new file mode 100644 index 000000000..38fb7c09e --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.html @@ -0,0 +1,308 @@ + + + + + +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter + + + + + + +

Class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter

+
Object
+   |
+   +--YAHOO.ext.SplitBar.AbsoluteLayoutAdapter
+
+ + +
+
+ +
class + YAHOO.ext.SplitBar.AbsoluteLayoutAdapter + + +
+ +

+
Adapter that moves the splitter element to align with the resized sizing element. + Used with an absolute positioned SplitBar. +
Defined in SplitBar.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.SplitBar.AbsoluteLayoutAdapter + + (<String/HTMLElement/Element> container) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getElementSize(s) + +
+    + +
+ +  void + + + + + init(s) + +
+    + +
+ +  void + + + + + moveSplitter(s) + +
+    + +
+ +  void + + + + + setElementSize(s, newSize, onComplete) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.SplitBar.AbsoluteLayoutAdapter

+
YAHOO.ext.SplitBar.AbsoluteLayoutAdapter(<String/HTMLElement/Element> container)
+ + + + +
    + Parameters: + +
      container - The container that wraps around the absolute positioned content. If it's document.body, make sure you assign an id to the body element. +
    + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getElementSize

+
Object getElementSize(s)
+ + + + + + + + + + + +
+ + +

init

+
void init(s)
+ + + + + + + + + + + +
+ + +

moveSplitter

+
void moveSplitter(s)
+ + + + + + + + + + + +
+ + +

setElementSize

+
void setElementSize(s, newSize, onComplete)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.BasicLayoutAdapter.html b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.BasicLayoutAdapter.html new file mode 100644 index 000000000..121a3c1e6 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.BasicLayoutAdapter.html @@ -0,0 +1,295 @@ + + + + + +YAHOO.ext.SplitBar.BasicLayoutAdapter + + + + + + +

Class YAHOO.ext.SplitBar.BasicLayoutAdapter

+
Object
+   |
+   +--YAHOO.ext.SplitBar.BasicLayoutAdapter
+
+ + +
+
+ +
class + YAHOO.ext.SplitBar.BasicLayoutAdapter + + +
+ +

+
Default Adapter. It assumes the splitter and resizing element are not positioned + elements and only gets/sets the width of the element. Generally used for table based layouts. + +
Defined in SplitBar.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.SplitBar.BasicLayoutAdapter + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getElementSize(<YAHOO.ext.SplitBar> s) + +
+    + Called before drag operations to get the current size of the resizing element. +
+ +  void + + + + + init(s) + +
+    + +
+ +  void + + + + + setElementSize(<YAHOO.ext.SplitBar> s, <Number> newSize, <Function> onComplete) + +
+    + Called after drag operations to set the size of the resizing element. +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.SplitBar.BasicLayoutAdapter

+
YAHOO.ext.SplitBar.BasicLayoutAdapter()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getElementSize

+
Object getElementSize(<YAHOO.ext.SplitBar> s)
+ +
    Called before drag operations to get the current size of the resizing element.
+ + + + +
    + Parameters: + +
      s - The SplitBar using this adapter +
    + +
+ + + + + + + + +
+ + +

init

+
void init(s)
+ + + + + + + + + + + +
+ + +

setElementSize

+
void setElementSize(<YAHOO.ext.SplitBar> s, <Number> newSize, <Function> onComplete)
+ +
    Called after drag operations to set the size of the resizing element.
+ + + + +
    + Parameters: + +
      s - The SplitBar using this adapter +
    + +
      newSize - The new size to set +
    + +
      onComplete - A function to be invoke when resizing is complete +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.html b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.html new file mode 100644 index 000000000..6c6488d60 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.SplitBar.html @@ -0,0 +1,725 @@ + + + + + +YAHOO.ext.SplitBar + + + + + + +

Class YAHOO.ext.SplitBar

+
Object
+   |
+   +--YAHOO.ext.SplitBar
+
+ + +
+
+ +
class + YAHOO.ext.SplitBar + + +
+ +

+
Creates draggable splitter bar functionality from two elements. +

+ Usage: +


+ var split = new YAHOO.ext.SplitBar('elementToDrag', 'elementToSize', 
+                   YAHOO.ext.SplitBar.HORIZONTAL, YAHOO.ext.SplitBar.LEFT);
+ split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter("container"));
+ split.minSize = 100;
+ split.maxSize = 600;
+ split.animate = true;
+ split.onMoved.subscribe(splitterMoved);
+ 
+
Defined in SplitBar.js

Requires:
    - YAHOO.ext.Element
    - YAHOO.util.Dom
    - YAHOO.util.Event
    - YAHOO.util.CustomEvent
    - YAHOO.util.DDProxy
    - YAHOO.util.Anim (optional) to support animation
    - YAHOO.util.Easing (optional) to support animation
+

+ +
+ + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.SplitBar.BasicLayoutAdapter
+ <static class>YAHOO.ext.SplitBar.AbsoluteLayoutAdapter
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  Booleananimate +
+   Whether to animate the transition to the new size
+  NumbermaxSize +
+   The maximum size of the resizing element.
+  NumberminSize +
+   The minimum size of the resizing element.
+  CustomEventonMoved +
+   Fires when the SplitBar is moved.
+  BooleanuseShim +
+   Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
+ <static>  NumberBOTTOM +
+   Placement constant - The resizing element is positioned under splitter element
+ <static>  NumberHORIZONTAL +
+   Orientation constant - Create a horizontal SplitBar
+ <static>  NumberLEFT +
+   Placement constant - The resizing element is to the left of the splitter element
+ <static>  NumberRIGHT +
+   Placement constant - The resizing element is to the right of the splitter element
+ <static>  NumberTOP +
+   Placement constant - The resizing element is positioned above the splitter element
+ <static>  NumberVERTICAL +
+   Orientation constant - Create a vertical SplitBar
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.SplitBar + + (<String/HTMLElement/Element> dragElement, <String/HTMLElement/Element> resizingElement, <Number> orientation, <Number> placement) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getAdapter() + +
+    + Get the adapter this SplitBar uses +
+ +  Number + + + + + getMaximumSize() + +
+    + Gets the maximum size for the resizing element +
+ +  Number + + + + + getMinimumSize() + +
+    + Gets the minimum size for the resizing element +
+ +  void + + + + + setAdapter(<Object> adapter) + +
+    + Set the adapter this SplitBar uses +
+ +  void + + + + + setCurrentSize(<Number> size) + +
+    + Sets the initialize size for the resizing element +
+ +  void + + + + + setMaximumSize(<Number> maxSize) + +
+    + Sets the maximum size for the resizing element +
+ +  void + + + + + setMinimumSize(<Number> minSize) + +
+    + Sets the minimum size for the resizing element +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

animate

+
Boolean animate
+
    + Whether to animate the transition to the new size + +
+
+ + +

maxSize

+
Number maxSize
+
    + The maximum size of the resizing element. (Defaults to 2000) + +
+
+ + +

minSize

+
Number minSize
+
    + The minimum size of the resizing element. (Defaults to 0) + +
+
+ + +

onMoved

+
CustomEvent onMoved
+
    + Fires when the SplitBar is moved. Uses fireDirect with signature: (this, newSize) + +
+
+ + +

useShim

+
Boolean useShim
+
    + Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. + +
+
+ + +

BOTTOM

+
<static> Number BOTTOM
+
    + Placement constant - The resizing element is positioned under splitter element + +
+
+ + +

HORIZONTAL

+
<static> Number HORIZONTAL
+
    + Orientation constant - Create a horizontal SplitBar + +
+
+ + +

LEFT

+
<static> Number LEFT
+
    + Placement constant - The resizing element is to the left of the splitter element + +
+
+ + +

RIGHT

+
<static> Number RIGHT
+
    + Placement constant - The resizing element is to the right of the splitter element + +
+
+ + +

TOP

+
<static> Number TOP
+
    + Placement constant - The resizing element is positioned above the splitter element + +
+
+ + +

VERTICAL

+
<static> Number VERTICAL
+
    + Orientation constant - Create a vertical SplitBar + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.SplitBar

+
YAHOO.ext.SplitBar(<String/HTMLElement/Element> dragElement, <String/HTMLElement/Element> resizingElement, <Number> orientation, <Number> placement)
+ + + + +
    + Parameters: + +
      dragElement - The element to be dragged and act as the SplitBar. +
    + +
      resizingElement - The element to be resized based on where the SplitBar element is dragged +
    + +
      orientation - (optional) Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) +
    + +
      placement - (optional) Either YAHOO.ext.SplitBar.LEFT or YAHOO.ext.SplitBar.RIGHT for horizontal or YAHOO.ext.SplitBar.TOP or YAHOO.ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the intial position position of the SplitBar). +
    + + +
+ + + + + + + + +
    +Requires:
      - YAHOO.ext.Element
      - YAHOO.util.Dom
      - YAHOO.util.Event
      - YAHOO.util.CustomEvent
      - YAHOO.util.DDProxy
      - YAHOO.util.Anim (optional) to support animation
      - YAHOO.util.Easing (optional) to support animation
    +
+ +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getAdapter

+
Object getAdapter()
+ +
    Get the adapter this SplitBar uses
+ + + + + + + +
    + Returns: +
      + The adapter object +
    +
+ + + + + +
+ + +

getMaximumSize

+
Number getMaximumSize()
+ +
    Gets the maximum size for the resizing element
+ + + + + + + +
    + Returns: +
      + The maximum size +
    +
+ + + + + +
+ + +

getMinimumSize

+
Number getMinimumSize()
+ +
    Gets the minimum size for the resizing element
+ + + + + + + +
    + Returns: +
      + The minimum size +
    +
+ + + + + +
+ + +

setAdapter

+
void setAdapter(<Object> adapter)
+ +
    Set the adapter this SplitBar uses
+ + + + +
    + Parameters: + +
      adapter - A SplitBar adapter object +
    + +
+ + + + + + + + +
+ + +

setCurrentSize

+
void setCurrentSize(<Number> size)
+ +
    Sets the initialize size for the resizing element
+ + + + +
    + Parameters: + +
      size - The initial size +
    + +
+ + + + + + + + +
+ + +

setMaximumSize

+
void setMaximumSize(<Number> maxSize)
+ +
    Sets the maximum size for the resizing element
+ + + + +
    + Parameters: + +
      maxSize - The maximum size +
    + +
+ + + + + + + + +
+ + +

setMinimumSize

+
void setMinimumSize(<Number> minSize)
+ +
    Sets the minimum size for the resizing element
+ + + + +
    + Parameters: + +
      minSize - The minimum size +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.TabPanel.html b/www/extras/yui-ext/docs/YAHOO.ext.TabPanel.html new file mode 100644 index 000000000..69a1d773b --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.TabPanel.html @@ -0,0 +1,636 @@ + + + + + +YAHOO.ext.TabPanel + + + + + + +

Class YAHOO.ext.TabPanel

+
Object
+   |
+   +--YAHOO.ext.TabPanel
+
+ + +
+
+ +
class + YAHOO.ext.TabPanel + + +
+ +

+
Creates a lightweight TabPanel component using Yahoo! UI. +

+ Usage: +


+    // basic tabs 1, built from existing content
+    var tabs = new YAHOO.ext.TabPanel('tabs1');
+    tabs.addTab('script', "View Script");
+    tabs.addTab('markup', "View Markup");
+    tabs.activate('script');
+    
+    // more advanced tabs, built from javascript
+    var jtabs = new YAHOO.ext.TabPanel('jtabs');
+    jtabs.addTab('jtabs-1', "Normal Tab", "My content was added during construction.");
+    
+    // set up the UpdateManager
+    var tab2 = jtabs.addTab('jtabs-2', "Ajax Tab 1");
+    var updater = tab2.getUpdateManager();
+    updater.setDefaultUrl('ajax1.htm');
+    tab2.onActivate.subscribe(updater.refresh, updater, true);
+    
+    // Use setUrl for Ajax loading
+    var tab3 = jtabs.addTab('jtabs-3', "Ajax Tab 2");
+    tab3.setUrl('ajax2.htm', null, true);
+    
+    // Disabled tab
+    var tab4 = jtabs.addTab('tabs1-5', "Disabled Tab", "Can't see me cause I'm disabled");
+    tab4.disable();
+    
+    jtabs.activate('jtabs-1');
+}
+ 
+
Defined in TabPanel.js

Requires: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  YAHOO.ext.ElementbodyEl +
+   The body element that contains TabPaneItem bodies.
+  YAHOO.ext.Elementel +
+   The container element for this TabPanel.
+  CustomEventonTabChange +
+   Fires when the active TabPanelItem changes.
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.TabPanel + + (<String/HTMLElement/Element> container) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + activate(<String> id) + +
+    + Activate a TabPanelItem. +
+ +  YAHOO.ext.TabPanelItem + + + + + addTab(<String> id, <String> text, <String> content) + +
+    + Creates a new TabPanelItem by looking for an existing element with the provided id - if it's not found it creates one. +
+ +  void + + + + + addTabItem(<YAHOO.ext.TabPanelItem> item) + +
+    + Add an existing TabPanelItem. +
+ +  void + + + + + disableTab(<String> id) + +
+    + Disable a TabPanelItem. +
+ +  void + + + + + enableTab(<String> id) + +
+    + Enable a TabPanelItem that is disabled. +
+ +  YAHOO.ext.TabPanelItem + + + + + getActiveTab() + +
+    + Get the active TabPanelItem +
+ +  YAHOO.ext.TabPanelItem + + + + + getTab(<String> id) + +
+    + Returns the TabPanelItem with the specified id +
+ +  void + + + + + removeTab(<String> id) + +
+    + Remove a TabPanelItem. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

bodyEl

+
YAHOO.ext.Element bodyEl
+
    + The body element that contains TabPaneItem bodies. + +
+
+ + +

el

+
YAHOO.ext.Element el
+
    + The container element for this TabPanel. + +
+
+ + +

onTabChange

+
CustomEvent onTabChange
+
    + Fires when the active TabPanelItem changes. Uses fireDirect with signature: (TabPanel this, TabPanelItem activedTab). + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.TabPanel

+
YAHOO.ext.TabPanel(<String/HTMLElement/Element> container)
+ + + + +
    + Parameters: + +
      container - The id, DOM element or YAHOO.ext.Element container where this TabPanel is to be rendered. +
    + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

activate

+
void activate(<String> id)
+ +
    Activate a TabPanelItem. The currently active will be deactivated.
+ + + + +
    + Parameters: + +
      id - The id of the TabPanelItem to activate. +
    + +
+ + + + + + + + +
+ + +

addTab

+
YAHOO.ext.TabPanelItem addTab(<String> id, <String> text, <String> content)
+ +
    Creates a new TabPanelItem by looking for an existing element with the provided id - if it's not found it creates one.
+ + + + +
    + Parameters: + +
      id - The id of the div to use or create +
    + +
      text - The text for the tab +
    + +
      content - (optional) Content to put in the TabPanelItem body +
    + +
+ + + + +
    + Returns: +
      + The created TabPanelItem +
    +
+ + + + + +
+ + +

addTabItem

+
void addTabItem(<YAHOO.ext.TabPanelItem> item)
+ +
    Add an existing TabPanelItem.
+ + + + +
    + Parameters: + +
      item - The TabPanelItem to add +
    + +
+ + + + + + + + +
+ + +

disableTab

+
void disableTab(<String> id)
+ +
    Disable a TabPanelItem. It cannot be the active tab, if it is this call is ignored..
+ + + + +
    + Parameters: + +
      id - The id of the TabPanelItem to disable. +
    + +
+ + + + + + + + +
+ + +

enableTab

+
void enableTab(<String> id)
+ +
    Enable a TabPanelItem that is disabled.
+ + + + +
    + Parameters: + +
      id - The id of the TabPanelItem to enable. +
    + +
+ + + + + + + + +
+ + +

getActiveTab

+
YAHOO.ext.TabPanelItem getActiveTab()
+ +
    Get the active TabPanelItem
+ + + + + + + +
    + Returns: +
      + The active TabPanelItem or null if none are active. +
    +
+ + + + + +
+ + +

getTab

+
YAHOO.ext.TabPanelItem getTab(<String> id)
+ +
    Returns the TabPanelItem with the specified id
+ + + + +
    + Parameters: + +
      id - The id of the TabPanelItem to fetch. +
    + +
+ + + + + + + + +
+ + +

removeTab

+
void removeTab(<String> id)
+ +
    Remove a TabPanelItem.
+ + + + +
    + Parameters: + +
      id - The id of the TabPanelItem to remove. +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.TabPanelItem.html b/www/extras/yui-ext/docs/YAHOO.ext.TabPanelItem.html new file mode 100644 index 000000000..ea68ab84f --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.TabPanelItem.html @@ -0,0 +1,516 @@ + + + + + +YAHOO.ext.TabPanelItem + + + + + + +

Class YAHOO.ext.TabPanelItem

+
Object
+   |
+   +--YAHOO.ext.TabPanelItem
+
+ + +
+
+ +
class + YAHOO.ext.TabPanelItem + + +
+ +

+ Defined in TabPanel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.TabPanelItem + + (tabPanel, id, text) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + activate() + +
+    + Activate this TabPanelItem - this does deactivate the currently active TabPanelItem. +
+ +  void + + + + + disable() + +
+    + Disable this TabPanelItem - this call is ignore if this is the active TabPanelItem. +
+ +  void + + + + + enable() + +
+    + Enable this TabPanelItem if it was previously disabled. +
+ +  YAHOO.ext.UpdateManager + + + + + getUpdateManager() + +
+    + Get the YAHOO.ext.UpdateManager for the body of this TabPanelItem. +
+ +  void + + + + + hide() + +
+    + Hide this TabPanelItem - if you don't activate another TabPanelItem this could look odd. +
+ +  void + + + + + setContent(<String> content) + +
+    + Set the content for this TabPanelItem. +
+ +  void + + + + + setText(text) + +
+    + +
+ +  YAHOO.ext.UpdateManager + + + + + setUrl(<String/Function> url, <String/Object> params, <Boolean> loadOnce) + +
+    + Set a URL to be used to load the content for this TabPanelItem. +
+ +  void + + + + + show() + +
+    + Show this TabPanelItem - this does not deactivate the currently active TabPanelItem. +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.TabPanelItem

+
YAHOO.ext.TabPanelItem(tabPanel, id, text)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

activate

+
void activate()
+ +
    Activate this TabPanelItem - this does deactivate the currently active TabPanelItem.
+ + + + + + + + + + + +
+ + +

disable

+
void disable()
+ +
    Disable this TabPanelItem - this call is ignore if this is the active TabPanelItem.
+ + + + + + + + + + + +
+ + +

enable

+
void enable()
+ +
    Enable this TabPanelItem if it was previously disabled.
+ + + + + + + + + + + +
+ + +

getUpdateManager

+
YAHOO.ext.UpdateManager getUpdateManager()
+ + + + + + + + + +
    + Returns: +
      + The UpdateManager +
    +
+ + + + + +
+ + +

hide

+
void hide()
+ +
    Hide this TabPanelItem - if you don't activate another TabPanelItem this could look odd.
+ + + + + + + + + + + +
+ + +

setContent

+
void setContent(<String> content)
+ +
    Set the content for this TabPanelItem.
+ + + + +
    + Parameters: + +
      content - The content +
    + +
+ + + + + + + + +
+ + +

setText

+
void setText(text)
+ + + + + + + + + + + +
+ + +

setUrl

+
YAHOO.ext.UpdateManager setUrl(<String/Function> url, <String/Object> params, <Boolean> loadOnce)
+ +
    Set a URL to be used to load the content for this TabPanelItem.
+ + + + +
    + Parameters: + +
      url - The url to load the content from or a function to call to get the url +
    + +
      params - (optional) The string params for the update call or an object of the params. See YAHOO.ext.UpdateManager.update() for more details. (Defaults to null) +
    + +
      loadOnce - (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this TabPanelItem is activated. (Defaults to false) +
    + +
+ + + + +
    + Returns: +
      + The UpdateManager +
    +
+ + + + + +
+ + +

show

+
void show()
+ +
    Show this TabPanelItem - this does not deactivate the currently active TabPanelItem.
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.Toolbar.html b/www/extras/yui-ext/docs/YAHOO.ext.Toolbar.html new file mode 100644 index 000000000..6ee92678c --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.Toolbar.html @@ -0,0 +1,311 @@ + + + + + +YAHOO.ext.Toolbar + + + + + + +

Class YAHOO.ext.Toolbar

+
Object
+   |
+   +--YAHOO.ext.Toolbar
+
+ + +
+
+ +
class + YAHOO.ext.Toolbar + + +
+ +

+
Basic Toolbar used by the Grid to create the paging toolbar. This class is reusable but functionality + is limited. Look for more functionality in a future version. + +
Defined in Toolbar.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.Toolbar + + (container) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + add() + +
+    + Adds element(s) to the toolbar - this function takes a variable number of + arguments of mixed type and adds them to the toolbar... +
+ +  YAHOO.ext.ToolbarButton + + + + + addButton(config) + +
+    + Adds a button, see YAHOO.ext.ToolbarButton for more info on the config +
+ +  void + + + + + addSeparator() + +
+    + +
+ +  Object + + + + + addText(text) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.Toolbar

+
YAHOO.ext.Toolbar(container)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

add

+
void add()
+ +
    Adds element(s) to the toolbar - this function takes a variable number of + arguments of mixed type and adds them to the toolbar... + If an argument is a ToolbarButton, it is added. If the element is a string, it is wrapped + in a ytb-text element and added unless the text is "separator" in which case a separator + is added. Otherwise, it is assumed the element is an HTMLElement and it is added directly.
+ + + + + + + + + + + +
+ + +

addButton

+
YAHOO.ext.ToolbarButton addButton(config)
+ + + + + + + + + + + + + +
+ + +

addSeparator

+
void addSeparator()
+ + + + + + + + + + + +
+ + +

addText

+
Object addText(text)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.ToolbarButton.html b/www/extras/yui-ext/docs/YAHOO.ext.ToolbarButton.html new file mode 100644 index 000000000..93c86a17b --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.ToolbarButton.html @@ -0,0 +1,311 @@ + + + + + +YAHOO.ext.ToolbarButton + + + + + + +

Class YAHOO.ext.ToolbarButton

+
Object
+   |
+   +--YAHOO.ext.ToolbarButton
+
+ + +
+
+ +
class + YAHOO.ext.ToolbarButton + + +
+ +

+
A toolbar button. The config has the following options: +

    +
  • className - The CSS class for the button. Use this to attach a background image for an icon.
  • +
  • text - The button's text
  • +
  • tooltip - The buttons tooltip text
  • +
  • click - function to call when the button is clicked
  • +
  • mouseover - function to call when the mouse moves over the button
  • +
  • mouseout - function to call when the mouse moves off the button
  • +
  • scope - The scope of the above event handlers
  • +
  • +
  • + +
    Defined in Toolbar.js

    +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + Constructor Summary +
    + + + YAHOO.ext.ToolbarButton + + (config) + +
    +    + +
    + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Method Summary + + * Parameter types in italic indicate optional parameters + +
    + +  void + + + + + disable() + +
    +    + +
    + +  void + + + + + enable() + +
    +    + +
    + +  Object + + + + + isDisabled() + +
    +    + +
    + +  void + + + + + setDisabled(disabled) + +
    +    + +
    + + + +

    + + + + + + + + + + + + + + + +
    + Constructor Detail +
    + +

    +YAHOO.ext.ToolbarButton

    +
    YAHOO.ext.ToolbarButton(config)
    + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

disable

+
void disable()
+ + + + + + + + + + + +
+ + +

enable

+
void enable()
+ + + + + + + + + + + +
+ + +

isDisabled

+
Object isDisabled()
+ + + + + + + + + + + +
+ + +

setDisabled

+
void setDisabled(disabled)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.BasicRenderer.html b/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.BasicRenderer.html new file mode 100644 index 000000000..df41d453d --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.BasicRenderer.html @@ -0,0 +1,218 @@ + + + + + +YAHOO.ext.UpdateManager.BasicRenderer + + + + + + +

Class YAHOO.ext.UpdateManager.BasicRenderer

+
Object
+   |
+   +--YAHOO.ext.UpdateManager.BasicRenderer
+
+ + +
+
+ +
class + YAHOO.ext.UpdateManager.BasicRenderer + + +
+ +

+
Default Content renderer. Updates the elements innerHTML with the responseText. + +
Defined in UpdateManager.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.UpdateManager.BasicRenderer + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + render(<YAHOO.ext.Element> el, <Object> response, updateManager) + +
+    + This is called when the transaction is completed and it's time to update the element - The BasicRenderer + updates the elements innerHTML with the responseText - To perform a custom render (i.e. +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.UpdateManager.BasicRenderer

+
YAHOO.ext.UpdateManager.BasicRenderer()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

render

+
void render(<YAHOO.ext.Element> el, <Object> response, updateManager)
+ +
    This is called when the transaction is completed and it's time to update the element - The BasicRenderer + updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing), + create an object with a "render(el, response)" method and pass it to setRenderer on the UpdateManager.
+ + + + +
    + Parameters: + +
      el - The element being rendered +
    + +
      response - The YUI Connect response object +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.html b/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.html new file mode 100644 index 000000000..fa3cc5b19 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.UpdateManager.html @@ -0,0 +1,1026 @@ + + + + + +YAHOO.ext.UpdateManager + + + + + + +

Class YAHOO.ext.UpdateManager

+
Object
+   |
+   +--YAHOO.ext.UpdateManager
+
+ + +
+
+ +
class + YAHOO.ext.UpdateManager + + +
+ +

+
Provides AJAX-style update for Element object using Yahoo + UI library YAHOO.util.Connect functionality.

+ Usage:
+


+ // Get it from a YAHOO.ext.Element object
+ var mgr = myElement.getUpdateManager();
+ mgr.update('http://myserver.com/index.php', 'param1=1&param2=2');
+ ...
+ mgr.formUpdate('myFormId', 'http://myserver.com/index.php');
+ 
+ // or directly (returns the same UpdateManager instance) + var mgr = new YAHOO.ext.UpdateManager('myElementId'); + mgr.startAutoRefresh('http://myserver.com/index.php', 60); + mgr.onUpdate.subscribe(myFcnNeedsToKnow); +
+
+
Defined in UpdateManager.js

Requires: +

+ +
+ + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.UpdateManager.BasicRenderer
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  YAHOO.util.CustomEventbeforeUpdate +
+   fired before update is made, return false from your handler and the update is cancelled.
+  StringdefaultUrl +
+   Cached url to use for refreshes.
+  BooleandisableCaching +
+   Whether to append unique parameter on get request to disable caching (Defaults to YAHOO.ext.UpdateManager.defaults.disableCaching or false).
+  YAHOO.ext.Elementel +
+   The Element object
+  FunctionformUpdateDelegate +
+   Delegate for formUpdate() prebound to 'this', use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
+  StringindicatorText +
+   Text for loading indicator (Defaults to YAHOO.ext.UpdateManager.defaults.indicatorText or '<div class="loading-indicator">Loading...</div>').
+  NumberloadScripts +
+   True to process scripts in the output (Defaults to YAHOO.ext.UpdateManager.defaults.loadScripts (false)).
+  YAHOO.util.CustomEventonFailure +
+   Fired on update failure.
+  YAHOO.util.CustomEventonUpdate +
+   Fired after successful update is made.
+  FunctionrefreshDelegate +
+   Delegate for refresh() prebound to 'this', use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
+  Objectrenderer +
+   The renderer for this UpdateManager.
+  StringshowLoadIndicator +
+   Whether to show indicatorText when loading (Defaults to YAHOO.ext.UpdateManager.defaults.showLoadIndicator or true).
+  StringsslBlankUrl +
+   Blank page URL to use with SSL file uploads (Defaults to YAHOO.ext.UpdateManager.defaults.sslBlankUrl or 'about:blank').
+  Numbertimeout +
+   Timeout for requests or form posts in seconds (Defaults to YAHOO.ext.UpdateManager.defaults.timeout or 30 seconds).
+  Objecttransaction +
+   YAHOO.util.Connect transaction object of current executing transaction
+  FunctionupdateDelegate +
+   Delegate for update() prebound to 'this', use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
+ <static>  Objectdefaults +
+   The defaults collection enables customizing the default behavior of UpdateManager
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.UpdateManager + + (<String/HTMLElement/YAHOO.ext.Element> el, <Boolean> forceNew) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + abort() + +
+    + Aborts the executing transaction +
+ +  void + + + + + formUpdate(<String/HTMLElement> form, <String> url, <Boolean> reset, <Function> callback) + +
+    + Performs an async form post, updating this element with the response. +
+ +  YAHOO.ext.Element + + + + + getEl() + +
+    + Get the Element this UpdateManager is bound to +
+ +  Object + + + + + getRenderer() + +
+    + +
+ +  Object + + + + + isUpdating() + +
+    + Returns true if an update is in progress +
+ +  void + + + + + refresh(<Function> callback) + +
+    + Refresh the element with the last used url or defaultUrl. +
+ +  void + + + + + setDefaultUrl(<String/Function> defaultUrl) + +
+    + Set the defaultUrl used for updates +
+ +  void + + + + + setRenderer(<Object> renderer) + +
+    + Set the content renderer for this UpdateManager. +
+ +  void + + + + + showLoading() + +
+    + Called to update the element to "Loading" state. +
+ +  void + + + + + startAutoRefresh(<Number> interval, <String/Function> url, <String/Object> params, <Function> callback, <Boolean> refreshNow) + +
+    + Set this element to auto refresh. +
+ +  void + + + + + stopAutoRefresh() + +
+    + Stop auto refresh on this element. +
+ +  void + + + + + update(<String/Function> url, <String/Object> params, <Function> callback, <Boolean> discardUrl) + +
+    + Performs an async request, updating this element with the response. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

beforeUpdate

+
YAHOO.util.CustomEvent beforeUpdate
+
    + fired before update is made, return false from your handler and the update is cancelled. + Uses fireDirect with signature: (oElement, url, params) + +
+
+ + +

defaultUrl

+
String defaultUrl
+
    + Cached url to use for refreshes. Overwritten every time update() is called unless 'discardUrl' param is set to true. + +
+
+ + +

disableCaching

+
Boolean disableCaching
+
    + Whether to append unique parameter on get request to disable caching (Defaults to YAHOO.ext.UpdateManager.defaults.disableCaching or false). + +
+
+ + +

el

+
YAHOO.ext.Element el
+
    + The Element object + +
+
+ + +

formUpdateDelegate

+
Function formUpdateDelegate
+
    + Delegate for formUpdate() prebound to 'this', use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments + +
+
+ + +

indicatorText

+
String indicatorText
+
    + Text for loading indicator (Defaults to YAHOO.ext.UpdateManager.defaults.indicatorText or '<div class="loading-indicator">Loading...</div>'). + +
+
+ + +

loadScripts

+
Number loadScripts
+
    + True to process scripts in the output (Defaults to YAHOO.ext.UpdateManager.defaults.loadScripts (false)). + +
+
+ + +

onFailure

+
YAHOO.util.CustomEvent onFailure
+
    + Fired on update failure. Uses fireDirect with signature: (oElement, oResponseObject) + +
+
+ + +

onUpdate

+
YAHOO.util.CustomEvent onUpdate
+
    + Fired after successful update is made. Uses fireDirect with signature: (oElement, oResponseObject) + +
+
+ + +

refreshDelegate

+
Function refreshDelegate
+
    + Delegate for refresh() prebound to 'this', use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments + +
+
+ + +

renderer

+
Object renderer
+ +
+ + +

showLoadIndicator

+
String showLoadIndicator
+
    + Whether to show indicatorText when loading (Defaults to YAHOO.ext.UpdateManager.defaults.showLoadIndicator or true). + +
+
+ + +

sslBlankUrl

+
String sslBlankUrl
+
    + Blank page URL to use with SSL file uploads (Defaults to YAHOO.ext.UpdateManager.defaults.sslBlankUrl or 'about:blank'). + +
+
+ + +

timeout

+
Number timeout
+
    + Timeout for requests or form posts in seconds (Defaults to YAHOO.ext.UpdateManager.defaults.timeout or 30 seconds). + +
+
+ + +

transaction

+
Object transaction
+
    + YAHOO.util.Connect transaction object of current executing transaction + +
+
+ + +

updateDelegate

+
Function updateDelegate
+
    + Delegate for update() prebound to 'this', use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments + +
+
+ + +

defaults

+
<static> Object defaults
+
    + The defaults collection enables customizing the default behavior of UpdateManager + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.UpdateManager

+
YAHOO.ext.UpdateManager(<String/HTMLElement/YAHOO.ext.Element> el, <Boolean> forceNew)
+ + + + +
    + Parameters: + +
      el - The element to update +
    + +
      forceNew - (optional) By default the constructor checks to see if the passed element already has an UpdateManager and if it does it returns the same instance. This will skip that check (useful for extending this class). +
    + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

abort

+
void abort()
+ +
    Aborts the executing transaction
+ + + + + + + + + + + +
+ + +

formUpdate

+
void formUpdate(<String/HTMLElement> form, <String> url, <Boolean> reset, <Function> callback)
+ +
    Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload. + Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning. See YUI docs for more info.
+ + + + +
    + Parameters: + +
      form - The form Id or form element +
    + +
      url - (optional) The url to pass the form to. If omitted the action attribute on the form will be used. +
    + +
      reset - (optional) Whether to try to reset the form after the update +
    + +
      callback - (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) +
    + +
+ + + + + + + + +
+ + +

getEl

+
YAHOO.ext.Element getEl()
+ +
    Get the Element this UpdateManager is bound to
+ + + + + + + +
    + Returns: +
      + The element +
    +
+ + + + + +
+ + +

getRenderer

+
Object getRenderer()
+ + + + + + + + + + + +
+ + +

isUpdating

+
Object isUpdating()
+ +
    Returns true if an update is in progress
+ + + + + + + + + + + +
+ + +

refresh

+
void refresh(<Function> callback)
+ +
    Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
+ + + + +
    + Parameters: + +
      callback - (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) +
    + +
+ + + + + + + + +
+ + +

setDefaultUrl

+
void setDefaultUrl(<String/Function> defaultUrl)
+ +
    Set the defaultUrl used for updates
+ + + + +
    + Parameters: + +
      defaultUrl - The url or a function to call to get the url +
    + +
+ + + + + + + + +
+ + +

setRenderer

+
void setRenderer(<Object> renderer)
+ + + + + + +
    + Parameters: + +
      renderer - The object implementing the render() method +
    + +
+ + + + + + + + +
+ + +

showLoading

+
void showLoading()
+ +
    Called to update the element to "Loading" state. Override to perform custom action.
+ + + + + + + + + + + +
+ + +

startAutoRefresh

+
void startAutoRefresh(<Number> interval, <String/Function> url, <String/Object> params, <Function> callback, <Boolean> refreshNow)
+ +
    Set this element to auto refresh.
+ + + + +
    + Parameters: + +
      interval - How often to update (in seconds). +
    + +
      url - (optional) The url for this request or a function to call to get the url (Defaults to the last used url) +
    + +
      params - (optional) The parameters to pass as either a url encoded string "¶m1=1¶m2=2" or as an object {YAHOO.ext.UpdateManager.prototype.param1 = 1; YAHOO.ext.UpdateManager.prototype.param2 = 2;} +
    + +
      callback - (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) +
    + +
      refreshNow - (optional) Whether to execute the refresh now, or wait the interval +
    + +
+ + + + + + + + +
+ + +

stopAutoRefresh

+
void stopAutoRefresh()
+ +
    Stop auto refresh on this element.
+ + + + + + + + + + + +
+ + +

update

+
void update(<String/Function> url, <String/Object> params, <Function> callback, <Boolean> discardUrl)
+ +
    Performs an async request, updating this element with the response. If params are specified it uses POST, otherwise it uses GET.
+ + + + +
    + Parameters: + +
      url - The url for this request or a function to call to get the url +
    + +
      params - (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or as an object {YAHOO.ext.UpdateManager.prototype.param1 = 1; YAHOO.ext.UpdateManager.prototype.param2 = 2;} +
    + +
      callback - (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) +
    + +
      discardUrl - (optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url. +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractColumnModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractColumnModel.html new file mode 100644 index 000000000..a3cfc1791 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractColumnModel.html @@ -0,0 +1,674 @@ + + + + + +YAHOO.ext.grid.AbstractColumnModel + + + + + + +

Class YAHOO.ext.grid.AbstractColumnModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractColumnModel
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.grid.DefaultColumnModel +
+
+ + +
+
+ +
class + YAHOO.ext.grid.AbstractColumnModel + + +
+ +

+
This abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid. +
Defined in AbstractColumnModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  YAHOO.util.CustomEventonHeaderChange +
+   Fires when a header has changed - fireDirect sig: (this, columnIndex, newHeader)
+  YAHOO.util.CustomEventonHiddenChange +
+   Fires when a column is hidden or unhidden - fireDirect sig: (this, columnIndex, hidden)
+  YAHOO.util.CustomEventonWidthChange +
+   Fires when a column width is changed - fireDirect sig: (this, columnIndex, newWidth)
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.AbstractColumnModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + fireHeaderChange(colIndex, newHeader) + +
+    + +
+ +  void + + + + + fireHiddenChange(colIndex, hidden) + +
+    + +
+ +  void + + + + + fireWidthChange(colIndex, newWidth) + +
+    + +
+ +  Number + + + + + getColumnCount() + +
+    + Interface method - Returns the number of columns. +
+ +  String + + + + + getColumnHeader(<Number> col) + +
+    + Interface method - Returns the header for the specified column. +
+ +  Number + + + + + getColumnWidth(<Number> col) + +
+    + Interface method - Returns the width for the specified column. +
+ +  Function + + + + + getRenderer(<Number> col) + +
+    + Interface method - Returns the rendering (formatting) function defined for the column. +
+ +  Function + + + + + getSortType(<Number> col) + +
+    + Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none). +
+ +  Number + + + + + getTotalWidth() + +
+    + Interface method - Returns the total width of all columns. +
+ +  Boolean + + + + + isHidden(<Number> col) + +
+    + Interface method - Returns true if the specified column is hidden. +
+ +  Boolean + + + + + isSortable(<Number> col) + +
+    + Interface method - Returns true if the specified column is sortable. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

onHeaderChange

+
YAHOO.util.CustomEvent onHeaderChange
+
    + Fires when a header has changed - fireDirect sig: (this, columnIndex, newHeader) + +
+
+ + +

onHiddenChange

+
YAHOO.util.CustomEvent onHiddenChange
+
    + Fires when a column is hidden or unhidden - fireDirect sig: (this, columnIndex, hidden) + +
+
+ + +

onWidthChange

+
YAHOO.util.CustomEvent onWidthChange
+
    + Fires when a column width is changed - fireDirect sig: (this, columnIndex, newWidth) + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.AbstractColumnModel

+
YAHOO.ext.grid.AbstractColumnModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fireHeaderChange

+
void fireHeaderChange(colIndex, newHeader)
+ + + + + + + + + + + +
+ + +

fireHiddenChange

+
void fireHiddenChange(colIndex, hidden)
+ + + + + + + + + + + +
+ + +

fireWidthChange

+
void fireWidthChange(colIndex, newWidth)
+ + + + + + + + + + + +
+ + +

getColumnCount

+
Number getColumnCount()
+ +
    Interface method - Returns the number of columns.
+ + + + + + + + + + + +
+ + +

getColumnHeader

+
String getColumnHeader(<Number> col)
+ +
    Interface method - Returns the header for the specified column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getColumnWidth

+
Number getColumnWidth(<Number> col)
+ +
    Interface method - Returns the width for the specified column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getRenderer

+
Function getRenderer(<Number> col)
+ +
    Interface method - Returns the rendering (formatting) function defined for the column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getSortType

+
Function getSortType(<Number> col)
+ +
    Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none).
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getTotalWidth

+
Number getTotalWidth()
+ +
    Interface method - Returns the total width of all columns.
+ + + + + + + + + + + +
+ + +

isHidden

+
Boolean isHidden(<Number> col)
+ +
    Interface method - Returns true if the specified column is hidden.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

isSortable

+
Boolean isSortable(<Number> col)
+ +
    Interface method - Returns true if the specified column is sortable.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractDataModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractDataModel.html new file mode 100644 index 000000000..9e0560981 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.AbstractDataModel.html @@ -0,0 +1,865 @@ + + + + + +YAHOO.ext.grid.AbstractDataModel + + + + + + +

Class YAHOO.ext.grid.AbstractDataModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractDataModel
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.grid.DefaultDataModel +
+
+ + +
+
+ +
class + YAHOO.ext.grid.AbstractDataModel + + +
+ +

+
This abstract class provides default implementations of the events required by the Grid. + It takes care of the creating the CustomEvents and provides some convenient methods for firing the events.

+
Defined in AbstractDataModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectaddListener +
+   
+  Objectevents +
+   
+  ObjectfireEvent +
+   
+  YAHOO.util.CustomEventonCellUpdated +
+   Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex)
+  YAHOO.util.CustomEventonRowsDeleted +
+   Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+  YAHOO.util.CustomEventonRowsInserted +
+   Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+  YAHOO.util.CustomEventonRowsSorted +
+   Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, + sortDirection = 'ASC' or 'DESC')
+  YAHOO.util.CustomEventonRowsUpdated +
+   Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+  YAHOO.util.CustomEventonTableDataChanged +
+   Fires when all data needs to be revalidated - fireDirect sig: (thisd)
+  ObjectremoveListener +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.AbstractDataModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + fireCellUpdated(row, col) + +
+    + Notifies listeners that the value of the cell at [row, col] has been updated +
+ +  void + + + + + fireRowsDeleted(firstRow, lastRow) + +
+    + Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted +
+ +  void + + + + + fireRowsInserted(firstRow, lastRow) + +
+    + Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted +
+ +  void + + + + + fireRowsSorted(sortColumnIndex, sortDir, noRefresh) + +
+    + Notifies listeners that rows have been sorted and any indexes may be invalid +
+ +  void + + + + + fireRowsUpdated(firstRow, lastRow) + +
+    + Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated +
+ +  void + + + + + fireTableDataChanged() + +
+    + Notifies listeners that all data for the grid may have changed - use as a last resort. +
+ +  void + + + + + getRowCount() + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method. +
+ +  void + + + + + getRowId(rowIndex) + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method. +
+ +  Object + + + + + getSortState() + +
+    + Interface method to supply the view with info regarding the Grid's current sort state - if overridden, + this should return an object like this {YAHOO.ext.grid.AbstractDataModel.prototype.column = this;.sortColumn, YAHOO.ext.grid.AbstractDataModel.prototype.direction = this;.sortDir}. +
+ +  Object + + + + + getTotalRowCount() + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts. +
+ +  void + + + + + getValueAt(rowIndex, colIndex) + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method. +
+ +  Object + + + + + isPaged() + +
+    + +
+ +  void + + + + + setValueAt(value, rowIndex, colIndex) + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method. +
+ +  void + + + + + sort(columnModel, columnIndex, direction, suppressEvent) + +
+    + Empty interface method - Classes which extend AbstractDataModel should implement this method. +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

addListener

+
Object addListener
+
    + + +
+
+ + +

events

+
Object events
+
    + + +
+
+ + +

fireEvent

+
Object fireEvent
+
    + + +
+
+ + +

onCellUpdated

+
YAHOO.util.CustomEvent onCellUpdated
+
    + Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex) + +
+
+ + +

onRowsDeleted

+
YAHOO.util.CustomEvent onRowsDeleted
+
    + Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex) + +
+
+ + +

onRowsInserted

+
YAHOO.util.CustomEvent onRowsInserted
+
    + Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex) + +
+
+ + +

onRowsSorted

+
YAHOO.util.CustomEvent onRowsSorted
+
    + Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, + sortDirection = 'ASC' or 'DESC') + +
+
+ + +

onRowsUpdated

+
YAHOO.util.CustomEvent onRowsUpdated
+
    + Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex) + +
+
+ + +

onTableDataChanged

+
YAHOO.util.CustomEvent onTableDataChanged
+
    + Fires when all data needs to be revalidated - fireDirect sig: (thisd) + +
+
+ + +

removeListener

+
Object removeListener
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.AbstractDataModel

+
YAHOO.ext.grid.AbstractDataModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fireCellUpdated

+
void fireCellUpdated(row, col)
+ +
    Notifies listeners that the value of the cell at [row, col] has been updated
+ + + + + + + + + + + +
+ + +

fireRowsDeleted

+
void fireRowsDeleted(firstRow, lastRow)
+ +
    Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted
+ + + + + + + + + + + +
+ + +

fireRowsInserted

+
void fireRowsInserted(firstRow, lastRow)
+ +
    Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted
+ + + + + + + + + + + +
+ + +

fireRowsSorted

+
void fireRowsSorted(sortColumnIndex, sortDir, noRefresh)
+ +
    Notifies listeners that rows have been sorted and any indexes may be invalid
+ + + + + + + + + + + +
+ + +

fireRowsUpdated

+
void fireRowsUpdated(firstRow, lastRow)
+ +
    Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated
+ + + + + + + + + + + +
+ + +

fireTableDataChanged

+
void fireTableDataChanged()
+ +
    Notifies listeners that all data for the grid may have changed - use as a last resort. This + also wipes out all selections a user might have made.
+ + + + + + + + + + + +
+ + +

getRowCount

+
void getRowCount()
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method. + See YAHOO.ext.DefaultDataModel for an example implementation.
+ + + + + + + + + + + +
+ + +

getRowId

+
void getRowId(rowIndex)
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method. + See YAHOO.ext.DefaultDataModel for an example implementation.
+ + + + + + + + + + + +
+ + +

getSortState

+
Object getSortState()
+ +
    Interface method to supply the view with info regarding the Grid's current sort state - if overridden, + this should return an object like this {YAHOO.ext.grid.AbstractDataModel.prototype.column = this;.sortColumn, YAHOO.ext.grid.AbstractDataModel.prototype.direction = this;.sortDir}.
+ + + + + + + + + + + +
+ + +

getTotalRowCount

+
Object getTotalRowCount()
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts.
+ + + + + + + + + + + +
+ + +

getValueAt

+
void getValueAt(rowIndex, colIndex)
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method. + See YAHOO.ext.DefaultDataModel for an example implementation.
+ + + + + + + + + + + +
+ + +

isPaged

+
Object isPaged()
+ + + + + + + + + + + +
+ + +

setValueAt

+
void setValueAt(value, rowIndex, colIndex)
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method. + See YAHOO.ext.DefaultDataModel for an example implementation.
+ + + + + + + + + + + +
+ + +

sort

+
void sort(columnModel, columnIndex, direction, suppressEvent)
+ +
    Empty interface method - Classes which extend AbstractDataModel should implement this method. + See YAHOO.ext.DefaultDataModel for an example implementation.
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.CellEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.CellEditor.html new file mode 100644 index 000000000..7962b199e --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.CellEditor.html @@ -0,0 +1,464 @@ + + + + + +YAHOO.ext.grid.CellEditor + + + + + + +

Class YAHOO.ext.grid.CellEditor

+
Object
+   |
+   +--YAHOO.ext.grid.CellEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.CellEditor + + +
+ +

+ Defined in CellEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.CellEditor + + (element) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + fitToCell(box) + +
+    + +
+ +  Object + + + + + getValue() + +
+    + +
+ +  void + + + + + hide() + +
+    + +
+ +  void + + + + + init(grid, bodyElement, callback) + +
+    + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  void + + + + + setValue(value) + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ +  void + + + + + startEditing(value, row, cell) + +
+    + +
+ +  void + + + + + stopEditing(focusCell) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.CellEditor

+
YAHOO.ext.grid.CellEditor(element)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fitToCell

+
void fitToCell(box)
+ + + + + + + + + + + +
+ + +

getValue

+
Object getValue()
+ + + + + + + + + + + +
+ + +

hide

+
void hide()
+ + + + + + + + + + + +
+ + +

init

+
void init(grid, bodyElement, callback)
+ + + + + + + + + + + +
+ + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

setValue

+
void setValue(value)
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + +

startEditing

+
void startEditing(value, row, cell)
+ + + + + + + + + + + +
+ + +

stopEditing

+
void stopEditing(focusCell)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.CheckboxEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.CheckboxEditor.html new file mode 100644 index 000000000..8e312ec9c --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.CheckboxEditor.html @@ -0,0 +1,365 @@ + + + + + +YAHOO.ext.grid.CheckboxEditor + + + + + + +

Class YAHOO.ext.grid.CheckboxEditor

+
Object
+   |
+   +--YAHOO.ext.grid.CheckboxEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.CheckboxEditor + + +
+ +

+ Defined in CheckboxEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.CheckboxEditor + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + fitToCell(box) + +
+    + +
+ +  Object + + + + + getValue() + +
+    + +
+ +  void + + + + + hide() + +
+    + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  void + + + + + setValue(value) + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.CheckboxEditor

+
YAHOO.ext.grid.CheckboxEditor()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fitToCell

+
void fitToCell(box)
+ + + + + + + + + + + +
+ + +

getValue

+
Object getValue()
+ + + + + + + + + + + +
+ + +

hide

+
void hide()
+ + + + + + + + + + + +
+ + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

setValue

+
void setValue(value)
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.DateEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.DateEditor.html new file mode 100644 index 000000000..bb92acb46 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.DateEditor.html @@ -0,0 +1,870 @@ + + + + + +YAHOO.ext.grid.DateEditor + + + + + + +

Class YAHOO.ext.grid.DateEditor

+
Object
+   |
+   +--YAHOO.ext.grid.DateEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.DateEditor + + +
+ +

+ Defined in DateEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectallowBlank +
+   
+  ObjectblankText +
+   
+  ObjectdisabledDates +
+   
+  ObjectdisabledDatesText +
+   
+  ObjectdisabledDays +
+   
+  ObjectdisabledDaysText +
+   
+  Objectformat +
+   
+  ObjectinvalidText +
+   
+  ObjectmaxText +
+   
+  ObjectmaxValue +
+   
+  ObjectminText +
+   
+  ObjectminValue +
+   
+  ObjectvalidationDelay +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.DateEditor + + (config) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + formatDate(date) + +
+    + +
+ +  Object + + + + + getValue() + +
+    + +
+ +  void + + + + + handleMouseDown(e) + +
+    + +
+ +  void + + + + + hide() + +
+    + +
+ +  void + + + + + init(grid, bodyElement, callback) + +
+    + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  Object + + + + + parseDate(value) + +
+    + +
+ +  void + + + + + setValue(value) + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ +  void + + + + + showCalendar(value) + +
+    + +
+ +  void + + + + + startEditing(value, row, cell) + +
+    + +
+ +  void + + + + + stopEditing(focusCell) + +
+    + +
+ +  Object + + + + + validate() + +
+    + +
+ +  Object + + + + + validator() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

allowBlank

+
Object allowBlank
+
    + + +
+
+ + +

blankText

+
Object blankText
+
    + + +
+
+ + +

disabledDates

+
Object disabledDates
+
    + + +
+
+ + +

disabledDatesText

+
Object disabledDatesText
+
    + + +
+
+ + +

disabledDays

+
Object disabledDays
+
    + + +
+
+ + +

disabledDaysText

+
Object disabledDaysText
+
    + + +
+
+ + +

format

+
Object format
+
    + + +
+
+ + +

invalidText

+
Object invalidText
+
    + + +
+
+ + +

maxText

+
Object maxText
+
    + + +
+
+ + +

maxValue

+
Object maxValue
+
    + + +
+
+ + +

minText

+
Object minText
+
    + + +
+
+ + +

minValue

+
Object minValue
+
    + + +
+
+ + +

validationDelay

+
Object validationDelay
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.DateEditor

+
YAHOO.ext.grid.DateEditor(config)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

formatDate

+
Object formatDate(date)
+ + + + + + + + + + + +
+ + +

getValue

+
Object getValue()
+ + + + + + + + + + + +
+ + +

handleMouseDown

+
void handleMouseDown(e)
+ + + + + + + + + + + +
+ + +

hide

+
void hide()
+ + + + + + + + + + + +
+ + +

init

+
void init(grid, bodyElement, callback)
+ + + + + + + + + + + +
+ + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

parseDate

+
Object parseDate(value)
+ + + + + + + + + + + +
+ + +

setValue

+
void setValue(value)
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + +

showCalendar

+
void showCalendar(value)
+ + + + + + + + + + + +
+ + +

startEditing

+
void startEditing(value, row, cell)
+ + + + + + + + + + + +
+ + +

stopEditing

+
void stopEditing(focusCell)
+ + + + + + + + + + + +
+ + +

validate

+
Object validate()
+ + + + + + + + + + + +
+ + +

validator

+
Object validator()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultColumnModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultColumnModel.html new file mode 100644 index 000000000..2729bab60 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultColumnModel.html @@ -0,0 +1,1183 @@ + + + + + +YAHOO.ext.grid.DefaultColumnModel + + + + + + +

Class YAHOO.ext.grid.DefaultColumnModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractColumnModel
+         |
+         +--YAHOO.ext.grid.DefaultColumnModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.DefaultColumnModel + +
extends YAHOO.ext.grid.AbstractColumnModel + + +
+ +

+
This is the default implementation of a ColumnModel used by the Grid. It defines + the columns in the grid. +
Usage:
+


+ var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;
+ var myColumns = [
+	{header: "Ticker", width: 60, sortable: true, sortType: sort.asUCString}, 
+	{header: "Company Name", width: 150, sortable: true, sortType: sort.asUCString}, 
+	{header: "Market Cap.", width: 100, sortable: true, sortType: sort.asFloat}, 
+	{header: "$ Sales", width: 100, sortable: true, sortType: sort.asFloat, renderer: money}, 
+	{header: "Employees", width: 100, sortable: true, sortType: sort.asFloat}
+ ];
+ var colModel = new YAHOO.ext.grid.DefaultColumnModel(myColumns);
+ 
+
Defined in DefaultColumnModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  Objectconfig +
+   The config passed into the constructor
+  BooleandefaultSortable +
+   Default sortable of columns which have no sortable specified (defaults to false)
+  NumberdefaultWidth +
+   The width of columns which have no width specified (defaults to 100)
+ <static>  ObjectsortTypes +
+   Defines the default sorting (casting?) comparison functions used when sorting data: +
  sortTypes.none - sorts data as it is without casting or parsing (the default) +
  sortTypes.asUCString - case insensitive string +
  sortTypes.asDate - attempts to parse data as a date +
  sortTypes.asFloat +
  sortTypes.asInt
+   + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.AbstractColumnModel
+ onWidthChange, onHeaderChange, onHiddenChange +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.DefaultColumnModel + + (config) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getCellEditor(<Number> colIndex, <Number> rowIndex) + +
+    + Returns the editor defined for the cell/column. +
+ +  Number + + + + + getColumnCount() + +
+    + Returns the number of columns. +
+ +  String + + + + + getColumnHeader(<Number> col) + +
+    + Returns the header for the specified column. +
+ +  Number + + + + + getColumnWidth(<Number> col) + +
+    + Returns the width for the specified column. +
+ +  Number + + + + + getDataIndex(<Number> col) + +
+    + Returns the dataIndex for the specified column. +
+ +  Function + + + + + getRenderer(<Number> col) + +
+    + Returns the rendering (formatting) function defined for the column. +
+ +  Function + + + + + getSortType(<Number> col) + +
+    + Returns the sorting comparison function defined for the column (defaults to sortTypes.none). +
+ +  Number + + + + + getTotalWidth(<Boolean> includeHidden) + +
+    + Returns the total width of all columns. +
+ +  Boolean + + + + + isCellEditable(<Number> colIndex, <Number> rowIndex) + +
+    + Returns true if the cell is editable. +
+ +  Boolean + + + + + isHidden(<Number> colIndex) + +
+    + Returns true if the column is hidden. +
+ +  Boolean + + + + + isSortable(<Number> col) + +
+    + Returns true if the specified column is sortable. +
+ +  void + + + + + setColumnHeader(<Number> col, <String> header) + +
+    + Sets the header for a column. +
+ +  void + + + + + setColumnWidth(<Number> col, <Number> width, suppressEvent) + +
+    + Sets the width for a column. +
+ +  void + + + + + setDataIndex(<Number> col, <Number> dataIndex) + +
+    + Sets the dataIndex for a column. +
+ +  void + + + + + setEditable(<Number> col, <Boolean> editable) + +
+    + Sets if a column is editable. +
+ +  void + + + + + setEditor(<Number> col, <Object> editor) + +
+    + Sets the editor for a column. +
+ +  void + + + + + setHidden(<Number> colIndex, hidden) + +
+    + Sets if a column is hidden. +
+ +  void + + + + + setRenderer(<Number> col, <Function> fn) + +
+    + Sets the rendering (formatting) function for a column. +
+ +  void + + + + + setSortType(<Number> col, <Function> fn) + +
+    + Sets the sorting comparison function for a column. +
+ + <static> Object + + + + + defaultRenderer(value) + +
+    + Default empty rendering function +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.AbstractColumnModel
+ +fireWidthChange, fireHeaderChange, fireHiddenChange +
+  + +

+ + + + + + + + + + +
Field Detail
+ + + +

config

+
Object config
+
    + The config passed into the constructor + +
+
+ + +

defaultSortable

+
Boolean defaultSortable
+
    + Default sortable of columns which have no sortable specified (defaults to false) + +
+
+ + +

defaultWidth

+
Number defaultWidth
+
    + The width of columns which have no width specified (defaults to 100) + +
+
+ + +

sortTypes

+
<static> Object sortTypes
+
    + Defines the default sorting (casting?) comparison functions used when sorting data: +
      sortTypes.none - sorts data as it is without casting or parsing (the default) +
      sortTypes.asUCString - case insensitive string +
      sortTypes.asDate - attempts to parse data as a date +
      sortTypes.asFloat +
      sortTypes.asInt + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.DefaultColumnModel

+
YAHOO.ext.grid.DefaultColumnModel(config)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getCellEditor

+
Object getCellEditor(<Number> colIndex, <Number> rowIndex)
+ +
    Returns the editor defined for the cell/column.
+ + + + +
    + Parameters: + +
      colIndex - The column index +
    + +
      rowIndex - The row index +
    + +
+ + + + + + + + +
+ + +

getColumnCount

+
Number getColumnCount()
+ +
    Returns the number of columns.
+ + + + + + + + + + + +
+ + +

getColumnHeader

+
String getColumnHeader(<Number> col)
+ +
    Returns the header for the specified column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getColumnWidth

+
Number getColumnWidth(<Number> col)
+ +
    Returns the width for the specified column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getDataIndex

+
Number getDataIndex(<Number> col)
+ +
    Returns the dataIndex for the specified column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getRenderer

+
Function getRenderer(<Number> col)
+ +
    Returns the rendering (formatting) function defined for the column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getSortType

+
Function getSortType(<Number> col)
+ +
    Returns the sorting comparison function defined for the column (defaults to sortTypes.none).
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

getTotalWidth

+
Number getTotalWidth(<Boolean> includeHidden)
+ +
    Returns the total width of all columns.
+ + + + +
    + Parameters: + +
      includeHidden - True to include hidden column widths +
    + +
+ + + + + + + + +
+ + +

isCellEditable

+
Boolean isCellEditable(<Number> colIndex, <Number> rowIndex)
+ +
    Returns true if the cell is editable.
+ + + + +
    + Parameters: + +
      colIndex - The column index +
    + +
      rowIndex - The row index +
    + +
+ + + + + + + + +
+ + +

isHidden

+
Boolean isHidden(<Number> colIndex)
+ +
    Returns true if the column is hidden.
+ + + + +
    + Parameters: + +
      colIndex - The column index +
    + +
+ + + + + + + + +
+ + +

isSortable

+
Boolean isSortable(<Number> col)
+ +
    Returns true if the specified column is sortable.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
+ + + + + + + + +
+ + +

setColumnHeader

+
void setColumnHeader(<Number> col, <String> header)
+ +
    Sets the header for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      header - The new header +
    + +
+ + + + + + + + +
+ + +

setColumnWidth

+
void setColumnWidth(<Number> col, <Number> width, suppressEvent)
+ +
    Sets the width for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      width - The new width +
    + +
+ + + + + + + + +
+ + +

setDataIndex

+
void setDataIndex(<Number> col, <Number> dataIndex)
+ +
    Sets the dataIndex for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      dataIndex - The new dataIndex +
    + +
+ + + + + + + + +
+ + +

setEditable

+
void setEditable(<Number> col, <Boolean> editable)
+ +
    Sets if a column is editable.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      editable - True if the column is editable +
    + +
+ + + + + + + + +
+ + +

setEditor

+
void setEditor(<Number> col, <Object> editor)
+ +
    Sets the editor for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      editor - The editor object +
    + +
+ + + + + + + + +
+ + +

setHidden

+
void setHidden(<Number> colIndex, hidden)
+ +
    Sets if a column is hidden.
+ + + + +
    + Parameters: + +
      colIndex - The column index +
    + +
+ + + + + + + + +
+ + +

setRenderer

+
void setRenderer(<Number> col, <Function> fn)
+ +
    Sets the rendering (formatting) function for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      fn - +
    + +
+ + + + + + + + +
+ + +

setSortType

+
void setSortType(<Number> col, <Function> fn)
+ +
    Sets the sorting comparison function for a column.
+ + + + +
    + Parameters: + +
      col - The column index +
    + +
      fn - +
    + +
+ + + + + + + + +
+ + +

defaultRenderer

+
<static> Object defaultRenderer(value)
+ +
    Default empty rendering function
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html new file mode 100644 index 000000000..85c297bf1 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultDataModel.html @@ -0,0 +1,838 @@ + + + + + +YAHOO.ext.grid.DefaultDataModel + + + + + + +

Class YAHOO.ext.grid.DefaultDataModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractDataModel
+         |
+         +--YAHOO.ext.grid.DefaultDataModel
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.grid.LoadableDataModel +
+
+ + +
+
+ +
class + YAHOO.ext.grid.DefaultDataModel + +
extends YAHOO.ext.grid.AbstractDataModel + + +
+ +

+
This is the default implementation of a DataModel used by the Grid. It works + with multi-dimensional array based data. Using the event system in the base class + YAHOO.ext.grid.AbstractDataModel, all updates to this DataModel are automatically + reflected in the user interface. +
Usage:
+


+ var myData = [
+	["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
+	["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"]
+ ];
+ var dataModel = new YAHOO.ext.grid.DefaultDataModel(myData);
+ 
+
Defined in DefaultDataModel.js

+

+ +
+ + + + + + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.AbstractDataModel
+ onCellUpdated, onTableDataChanged, onRowsDeleted, onRowsInserted, onRowsUpdated, onRowsSorted, events, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.DefaultDataModel + + (data) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Number + + + + + addRow(<Array> cellValues) + +
+    + Adds a row to the dataset. +
+ +  void + + + + + applySort(suppressEvent) + +
+    + Applies the last used sort to the current data. +
+ +  Number + + + + + filter(<Object> query) + +
+    + Filter the DataModel rows by the query defined in spec, see query() for more details + on the query spec. +
+ +  Array + + + + + getRow(rowIndex) + +
+    + Returns the column data for the specified row. +
+ +  Number + + + + + getRowCount() + +
+    + Returns the number of rows in the dataset +
+ +  Number + + + + + getRowId(rowIndex) + +
+    + Returns the ID of the specified row. +
+ +  Array + + + + + getRows(<Array> indexes) + +
+    + Returns the column data for the specified rows as a + multi-dimensional array: rows[3][0] would give you the value of row 4, column 0. +
+ +  Object + + + + + getValueAt(<Number> rowIndex, <Number> colIndex) + +
+    + Returns the value at the specified data position +
+ +  Number + + + + + insertRow(<Number> index, <Array> cellValues) + +
+    + Inserts a row a the specified location in the dataset. +
+ +  Array + + + + + query(<Object> spec, <Boolean> returnUnmatched) + +
+    + Query the DataModel rows by the filters defined in spec, for example... +
+ +  void + + + + + removeRow(<Number> index) + +
+    + Remove a row. +
+ +  void + + + + + setDefaultSort(columnModel, columnIndex, direction) + +
+    + +
+ +  void + + + + + setValueAt(<Object> value, <Number> rowIndex, <Number> colIndex) + +
+    + Sets the specified value at the specified data position +
+ +  void + + + + + sort(<YAHOO.ext.grid.DefaultColumnModel> columnModel, <Number> columnIndex, <String> direction, suppressEvent) + +
+    + Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel. +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.AbstractDataModel
+ +fireCellUpdated, fireTableDataChanged, fireRowsDeleted, fireRowsInserted, fireRowsUpdated, fireRowsSorted, getSortState, getTotalRowCount, isPaged +
+  + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.DefaultDataModel

+
YAHOO.ext.grid.DefaultDataModel(data)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addRow

+
Number addRow(<Array> cellValues)
+ +
    Adds a row to the dataset.
+ + + + +
    + Parameters: + +
      cellValues - The array of values for the new row +
    + +
+ + + + +
    + Returns: +
      + The index of the added row +
    +
+ + + + + +
+ + +

applySort

+
void applySort(suppressEvent)
+ +
    Applies the last used sort to the current data.
+ + + + + + + + + + + +
+ + +

filter

+
Number filter(<Object> query)
+ +
    Filter the DataModel rows by the query defined in spec, see query() for more details + on the query spec.
+ + + + +
    + Parameters: + + + +
+ + + + +
    + Returns: +
      + The number of rows removed +
    +
+ + + + + +
+ + +

getRow

+
Array getRow(rowIndex)
+ +
    Returns the column data for the specified row.
+ + + + + + + + + + + +
+ + +

getRowCount

+
Number getRowCount()
+ +
    Returns the number of rows in the dataset
+ + + + + + + + + + + +
+ + +

getRowId

+
Number getRowId(rowIndex)
+ +
    Returns the ID of the specified row. By default it return the value of the first column. + Override to provide more advanced ID handling.
+ + + + + + + + + + + +
+ + +

getRows

+
Array getRows(<Array> indexes)
+ +
    Returns the column data for the specified rows as a + multi-dimensional array: rows[3][0] would give you the value of row 4, column 0.
+ + + + +
    + Parameters: + +
      indexes - The row indexes to fetch +
    + +
+ + + + + + + + +
+ + +

getValueAt

+
Object getValueAt(<Number> rowIndex, <Number> colIndex)
+ +
    Returns the value at the specified data position
+ + + + +
    + Parameters: + +
      rowIndex - +
    + +
      colIndex - +
    + +
+ + + + + + + + +
+ + +

insertRow

+
Number insertRow(<Number> index, <Array> cellValues)
+ +
    Inserts a row a the specified location in the dataset.
+ + + + +
    + Parameters: + +
      index - The index where the row should be inserted +
    + +
      cellValues - The array of values for the new row +
    + +
+ + + + +
    + Returns: +
      + The index the row was inserted in +
    +
+ + + + + +
+ + +

query

+
Array query(<Object> spec, <Boolean> returnUnmatched)
+ +
    Query the DataModel rows by the filters defined in spec, for example... +
    
    + // column 1 starts with Jack, column 2 filtered by myFcn, column 3 equals 'Fred'
    + dataModel.filter({1: /^Jack.+/i}, 2: myFcn, 3: 'Fred'});
    + 
+ + + + +
    + Parameters: + +
      spec - The spec is generally an object literal consisting of column index and filter type. The filter type can be a string/number (exact match), a regular expression to test using String.search() or a function to call. If it's a function, it will be called with the value for the specified column and an array of the all column values for that row: yourFcn(value, columnData). If it returns anything other than true, the row is not a match. +
    + +
      returnUnmatched - True to return rows which don't match the query instead of rows that do match +
    + +
+ + + + +
    + Returns: +
      + An array of row indexes that match +
    +
+ + + + + +
+ + +

removeRow

+
void removeRow(<Number> index)
+ +
    Remove a row.
+ + + + +
    + Parameters: + +
      index - +
    + +
+ + + + + + + + +
+ + +

setDefaultSort

+
void setDefaultSort(columnModel, columnIndex, direction)
+ + + + + + + + + + + +
+ + +

setValueAt

+
void setValueAt(<Object> value, <Number> rowIndex, <Number> colIndex)
+ +
    Sets the specified value at the specified data position
+ + + + +
    + Parameters: + +
      value - The new value +
    + +
      rowIndex - +
    + +
      colIndex - +
    + +
+ + + + + + + + +
+ + +

sort

+
void sort(<YAHOO.ext.grid.DefaultColumnModel> columnModel, <Number> columnIndex, <String> direction, suppressEvent)
+ +
    Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel.
+ + + + +
    + Parameters: + +
      columnModel - The ColumnModel for this dataset +
    + +
      columnIndex - The column index to sort by +
    + +
      direction - The direction of the sort ('DESC' or 'ASC') +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultSelectionModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultSelectionModel.html new file mode 100644 index 000000000..154d4703e --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.DefaultSelectionModel.html @@ -0,0 +1,1169 @@ + + + + + +YAHOO.ext.grid.DefaultSelectionModel + + + + + + +

Class YAHOO.ext.grid.DefaultSelectionModel

+
Object
+   |
+   +--YAHOO.ext.grid.DefaultSelectionModel
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.grid.DisableSelectionModel, YAHOO.ext.grid.SingleSelectionModel, YAHOO.ext.grid.EditorSelectionModel +
+
+ + +
+
+ +
class + YAHOO.ext.grid.DefaultSelectionModel + + +
+ +

+
The default SelectionModel used by YAHOO.ext.grid.Grid. + It supports multiple selections and keyboard selection/navigation.

+
Defined in SelectionModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectaddListener +
+   
+  Objectevents +
+   
+  ObjectfireEvent +
+   
+  Objectlocked +
+   
+  YAHOO.util.CustomEventonRowSelect +
+   Fires when a row is selected or deselected - fireDirect sig: (this, row, isSelected)
+  YAHOO.util.CustomEventonSelectionChange +
+   Fires when the selection changes on the Grid - fireDirect sig: (this, selectedRows[], selectedRowIds[])
+  ObjectremoveListener +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.DefaultSelectionModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + clearSelections() + +
+    + Clears all selections. +
+ +  void + + + + + deselectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow) + +
+    + Deselects a range of rows. +
+ +  void + + + + + deselectRow(<Number/HTMLElement> row) + +
+    + Deselects a row. +
+ +  void + + + + + focusRow(<HTMLElement> row) + +
+    + Deprecated. +
+ +  Number + + + + + getCount() + +
+    + Gets the number of selected rows. +
+ +  Array + + + + + getSelectedRowIds() + +
+    + Returns the selected row ids. +
+ +  Array + + + + + getSelectedRows() + +
+    + Returns the selected rows. +
+ +  Boolean + + + + + hasSelection() + +
+    + Returns True if there is a selection. +
+ +  Object + + + + + isLocked() + +
+    + +
+ +  Boolean + + + + + isSelectable(<HTMLElement> row) + +
+    + Returns True if the specified row is selectable. +
+ +  Boolean + + + + + isSelected(<HTMLElement> row) + +
+    + Returns True if the specified row is selected. +
+ +  void + + + + + lock() + +
+    + +
+ +  void + + + + + selectAll() + +
+    + Selects all rows. +
+ +  void + + + + + selectFirstRow() + +
+    + Selects the first row in the grid. +
+ +  void + + + + + selectNext(<Boolean> keepExisting) + +
+    + Selects the row immediately following the last selected row. +
+ +  void + + + + + selectPrevious(<Boolean> keepExisting) + +
+    + Selects the row that precedes the last selected row. +
+ +  void + + + + + selectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow, <Boolean> keepExisting) + +
+    + Selects a range of rows. +
+ +  void + + + + + selectRow(<Number/HTMLElement> row, <Boolean> keepExisting) + +
+    + Selects a row. +
+ +  void + + + + + selectRows(<Array> rows, <Boolean> keepExisting) + +
+    + Selects multiple rows. +
+ +  void + + + + + selectRowsById(<String/Array> id, <Boolean> keepExisting) + +
+    + Set the selected rows by their ID(s). +
+ +  void + + + + + unlock() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

addListener

+
Object addListener
+
    + + +
+
+ + +

events

+
Object events
+
    + + +
+
+ + +

fireEvent

+
Object fireEvent
+
    + + +
+
+ + +

locked

+
Object locked
+
    + + +
+
+ + +

onRowSelect

+
YAHOO.util.CustomEvent onRowSelect
+
    + Fires when a row is selected or deselected - fireDirect sig: (this, row, isSelected) + +
+
+ + +

onSelectionChange

+
YAHOO.util.CustomEvent onSelectionChange
+
    + Fires when the selection changes on the Grid - fireDirect sig: (this, selectedRows[], selectedRowIds[]) + +
+
+ + +

removeListener

+
Object removeListener
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.DefaultSelectionModel

+
YAHOO.ext.grid.DefaultSelectionModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

clearSelections

+
void clearSelections()
+ +
    Clears all selections.
+ + + + + + + + + + + +
+ + +

deselectRange

+
void deselectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow)
+ +
    Deselects a range of rows. All rows in between startRow and endRow are also deselected.
+ + + + +
    + Parameters: + +
      startRow - The row or index of the first row in the range +
    + +
      endRow - The row or index of the last row in the range +
    + +
+ + + + + + + + +
+ + +

deselectRow

+
void deselectRow(<Number/HTMLElement> row)
+ +
    Deselects a row.
+ + + + +
    + Parameters: + +
      row - The row or index of the row to deselect +
    + +
+ + + + + + + + +
+ + +

focusRow

+
void focusRow(<HTMLElement> row)
+ +
    Deprecated. Tries to focus the row and scroll it into view - Use grid.scrollTo or grid.getView().focusRow() instead.
+ + + + +
    + Parameters: + +
      row - The row to focus +
    + +
+ + + + + + + +
    + Deprecated

    +
+ + +
+ + +

getCount

+
Number getCount()
+ +
    Gets the number of selected rows.
+ + + + + + + + + + + +
+ + +

getSelectedRowIds

+
Array getSelectedRowIds()
+ +
    Returns the selected row ids.
+ + + + + + + +
    + Returns: +
      + Array of String ids +
    +
+ + + + + +
+ + +

getSelectedRows

+
Array getSelectedRows()
+ +
    Returns the selected rows.
+ + + + + + + +
    + Returns: +
      + Array of DOM row elements +
    +
+ + + + + +
+ + +

hasSelection

+
Boolean hasSelection()
+ +
    Returns True if there is a selection.
+ + + + + + + + + + + +
+ + +

isLocked

+
Object isLocked()
+ + + + + + + + + + + +
+ + +

isSelectable

+
Boolean isSelectable(<HTMLElement> row)
+ +
    Returns True if the specified row is selectable.
+ + + + +
    + Parameters: + +
      row - The row to check +
    + +
+ + + + + + + + +
+ + +

isSelected

+
Boolean isSelected(<HTMLElement> row)
+ +
    Returns True if the specified row is selected.
+ + + + +
    + Parameters: + +
      row - The row to check +
    + +
+ + + + + + + + +
+ + +

lock

+
void lock()
+ + + + + + + + + + + +
+ + +

selectAll

+
void selectAll()
+ +
    Selects all rows.
+ + + + + + + + + + + +
+ + +

selectFirstRow

+
void selectFirstRow()
+ +
    Selects the first row in the grid.
+ + + + + + + + + + + +
+ + +

selectNext

+
void selectNext(<Boolean> keepExisting)
+ +
    Selects the row immediately following the last selected row.
+ + + + +
    + Parameters: + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

selectPrevious

+
void selectPrevious(<Boolean> keepExisting)
+ +
    Selects the row that precedes the last selected row.
+ + + + +
    + Parameters: + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

selectRange

+
void selectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow, <Boolean> keepExisting)
+ +
    Selects a range of rows. All rows in between startRow and endRow are also selected.
+ + + + +
    + Parameters: + +
      startRow - The row or index of the first row in the range +
    + +
      endRow - The row or index of the last row in the range +
    + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

selectRow

+
void selectRow(<Number/HTMLElement> row, <Boolean> keepExisting)
+ +
    Selects a row.
+ + + + +
    + Parameters: + +
      row - The row or index of the row to select +
    + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

selectRows

+
void selectRows(<Array> rows, <Boolean> keepExisting)
+ +
    Selects multiple rows.
+ + + + +
    + Parameters: + +
      rows - Array of the rows or indexes of the row to select +
    + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

selectRowsById

+
void selectRowsById(<String/Array> id, <Boolean> keepExisting)
+ +
    Set the selected rows by their ID(s). IDs must match what is returned by the DataModel getRowId(index).
+ + + + +
    + Parameters: + +
      id - The id(s) to select +
    + +
      keepExisting - (optional) True to retain existing selections +
    + +
+ + + + + + + + +
+ + +

unlock

+
void unlock()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.DisableSelectionModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.DisableSelectionModel.html new file mode 100644 index 000000000..ef1e6e186 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.DisableSelectionModel.html @@ -0,0 +1,234 @@ + + + + + +YAHOO.ext.grid.DisableSelectionModel + + + + + + +

Class YAHOO.ext.grid.DisableSelectionModel

+
Object
+   |
+   +--YAHOO.ext.grid.DefaultSelectionModel
+         |
+         +--YAHOO.ext.grid.DisableSelectionModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.DisableSelectionModel + +
extends YAHOO.ext.grid.DefaultSelectionModel + + +
+ +

+
Extends YAHOO.ext.grid.DefaultSelectionModel to disable row selection.

+
Defined in SelectionModel.js

+

+ +
+ + + + + + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ onRowSelect, onSelectionChange, events, locked, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.DisableSelectionModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + initEvents() + +
+    + +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ +lock, unlock, isLocked, selectRowsById, getCount, selectFirstRow, selectNext, selectPrevious, getSelectedRows, getSelectedRowIds, clearSelections, selectAll, hasSelection, isSelected, isSelectable, focusRow, selectRow, selectRows, deselectRow, selectRange, deselectRange +
+  + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.DisableSelectionModel

+
YAHOO.ext.grid.DisableSelectionModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorAndSelectionModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorAndSelectionModel.html new file mode 100644 index 000000000..93763de75 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorAndSelectionModel.html @@ -0,0 +1,233 @@ + + + + + +YAHOO.ext.grid.EditorAndSelectionModel + + + + + + +

Class YAHOO.ext.grid.EditorAndSelectionModel

+
Object
+   |
+   +--YAHOO.ext.grid.EditorAndSelectionModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.EditorAndSelectionModel + + +
+ +

+ Defined in EditorSelectionModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.EditorAndSelectionModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  void + + + + + onCellDblClick(grid, rowIndex, colIndex) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.EditorAndSelectionModel

+
YAHOO.ext.grid.EditorAndSelectionModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

onCellDblClick

+
void onCellDblClick(grid, rowIndex, colIndex)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorSelectionModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorSelectionModel.html new file mode 100644 index 000000000..1fc959701 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.EditorSelectionModel.html @@ -0,0 +1,470 @@ + + + + + +YAHOO.ext.grid.EditorSelectionModel + + + + + + +

Class YAHOO.ext.grid.EditorSelectionModel

+
Object
+   |
+   +--YAHOO.ext.grid.DefaultSelectionModel
+         |
+         +--YAHOO.ext.grid.EditorSelectionModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.EditorSelectionModel + +
extends YAHOO.ext.grid.DefaultSelectionModel + + +
+ +

+
Extends YAHOO.ext.grid.DefaultSelectionModel to enable cell navigation.

+
Defined in EditorSelectionModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  NumberclicksToActivateCell +
+   Number of clicks to activate a cell (for editing) - valid values are 1 or 2
+  ObjectcontrolForArrowNavigation +
+   
+  ObjectdisableArrowNavigation +
+   
+   + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ onRowSelect, onSelectionChange, events, locked, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.EditorSelectionModel + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + activate(row, cell) + +
+    + +
+ +  Object + + + + + allowArrowNav(e) + +
+    + +
+ +  Object + + + + + getEditorCellAfter(cell, spanRows) + +
+    + +
+ +  Object + + + + + getEditorCellBefore(cell, spanRows) + +
+    + +
+ +  void + + + + + onCellClick(grid, rowIndex, colIndex) + +
+    + +
+ +  void + + + + + onCellDblClick(grid, rowIndex, colIndex) + +
+    + +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ +lock, unlock, isLocked, selectRowsById, getCount, selectFirstRow, selectNext, selectPrevious, getSelectedRows, getSelectedRowIds, clearSelections, selectAll, hasSelection, isSelected, isSelectable, focusRow, selectRow, selectRows, deselectRow, selectRange, deselectRange +
+  + +

+ + + + + + + + + + +
Field Detail
+ + + +

clicksToActivateCell

+
Number clicksToActivateCell
+
    + Number of clicks to activate a cell (for editing) - valid values are 1 or 2 + +
+
+ + +

controlForArrowNavigation

+
Object controlForArrowNavigation
+
    + + +
+
+ + +

disableArrowNavigation

+
Object disableArrowNavigation
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.EditorSelectionModel

+
YAHOO.ext.grid.EditorSelectionModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

activate

+
void activate(row, cell)
+ + + + + + + + + + + +
+ + +

allowArrowNav

+
Object allowArrowNav(e)
+ + + + + + + + + + + +
+ + +

getEditorCellAfter

+
Object getEditorCellAfter(cell, spanRows)
+ + + + + + + + + + + +
+ + +

getEditorCellBefore

+
Object getEditorCellBefore(cell, spanRows)
+ + + + + + + + + + + +
+ + +

onCellClick

+
void onCellClick(grid, rowIndex, colIndex)
+ + + + + + + + + + + +
+ + +

onCellDblClick

+
void onCellDblClick(grid, rowIndex, colIndex)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.Grid.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.Grid.html new file mode 100644 index 000000000..be9fe6ed2 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.Grid.html @@ -0,0 +1,1821 @@ + + + + + +YAHOO.ext.grid.Grid + + + + + + +

Class YAHOO.ext.grid.Grid

+
Object
+   |
+   +--YAHOO.ext.grid.Grid
+
+ + +
+
+ +
class + YAHOO.ext.grid.Grid + + +
+ +

+
This class represents the primary interface of a component based grid control. +

Usage:


+ var grid = new YAHOO.ext.grid.Grid('my-container-id', dataModel, columnModel);
+ // set any options
+ grid.render();
+ 
+
Defined in Grid.js

Requires: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectallowTextSelectionPattern +
+   A regular expression defining tagNames + allowed to have text selection (Defaults to /INPUT|TEXTAREA/i)
+  BooleanautoSizeColumns +
+   True to automatically resize the columns to fit their content on initial render
+  BooleanautoSizeHeaders +
+   True to measure headers with column data when auto sizing columns
+  StringddText +
+   Configures the text is the drag proxy (defaults to "%0 selected row(s)").
+  BooleanenableDragDrop +
+   True to enable drag and drop of rows
+  NumbermaxRowsToMeasure +
+   If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of + rows measured to get a columns size - defaults to 0 (all rows).
+  NumberminColumnWidth +
+   The minimum width a column can be resized to.
+  BooleanstripeRows +
+   True to stripe the rows (default is true)
+  BooleantrackMouseOver +
+   True to highlight rows when the mouse is over (default is false)
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.Grid + + (<String/HTMLElement/YAHOO.ext.Element> container, <Object> dataModel, <Object> colModel, <Object> selectionModel) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addListener(<String> eventName, <Function> fn, <Object> scope, <boolean> override) + +
+    + Adds a listener for one of the many defined grid events +
+ +  void + + + + + autoSize() + +
+    + Causes the grid to manually recalculate it's dimensions. +
+ +  void + + + + + bindToField(fieldId) + +
+    + Binds this grid to the field with the specified id. +
+ +  void + + + + + clearSelections() + +
+    + Convenience method for getSelectionModel().clearSelections() - + See YAHOO.ext.grid.DefaultSelectionModel.clearSelections() for more details. +
+ +  HTMLElement + + + + + getCellAfter(<HTMLElement> cell, <Boolean> includeHidden) + +
+    + Returns the cell that comes after the specified cell - text nodes are skipped. +
+ +  HTMLElement + + + + + getCellBefore(<HTMLElement> cell, <Boolean> includeHidden) + +
+    + Returns the cell that comes before the specified cell - text nodes are skipped. +
+ +  HTMLElement + + + + + getCellFromChild(<HTMLElement> childEl) + +
+    + Returns the cell that contains the specified child element. +
+ +  Object + + + + + getColumnModel() + +
+    + Returns the grid's ColumnModel. +
+ +  Object + + + + + getDataModel() + +
+    + Returns the grid's DataModel. +
+ +  String + + + + + getDragDropText() + +
+    + Called to get grid's drag proxy text, by default returns this.ddText. +
+ +  HTMLElement + + + + + getFirstCell(<HTMLElement> row, <Boolean> includeHidden) + +
+    + Returns the first cell for the row - text nodes and hidden columns are skipped. +
+ +  HTMLElement + + + + + getHeaderFromChild(<HTMLElement> childEl) + +
+    + Returns the header element that contains the specified child element. +
+ +  HTMLElement + + + + + getLastCell(<HTMLElement> row, <Boolean> includeHidden) + +
+    + Returns the last cell for the row - text nodes and hidden columns are skipped. +
+ +  HTMLElement + + + + + getRow(index) + +
+    + Returns the table row at the specified index +
+ +  HTMLElement + + + + + getRowAfter(<HTMLElement> row) + +
+    + Returns the row that comes after the specified row - text nodes are skipped. +
+ +  HTMLElement + + + + + getRowBefore(<HTMLElement> row) + +
+    + Returns the row that comes before the specified row - text nodes are skipped. +
+ +  HTMLElement + + + + + getRowFromChild(<HTMLElement> childEl) + +
+    + Returns the row that contains the specified child element. +
+ +  HtmlElement/Array + + + + + getRowsById(id) + +
+    + Returns the rows that have the specified id(s). +
+ +  Object + + + + + getSelectedRow() + +
+    + Convenience method for getSelectionModel().getSelectedRows()[0] - + See YAHOO.ext.grid.DefaultSelectionModel.getSelectedRows() for more details. +
+ +  Object + + + + + getSelectedRowId() + +
+    + Convenience method for getSelectionModel().getSelectedRowIds()[0] - + See YAHOO.ext.grid.DefaultSelectionModel.getSelectedRowIds() for more details. +
+ +  Object + + + + + getSelectedRowIds() + +
+    + Convenience method for getSelectionModel().getSelectedRowIds() - + See YAHOO.ext.grid.DefaultSelectionModel.getSelectedRowIds() for more details. +
+ +  Number + + + + + getSelectedRowIndex() + +
+    + Gets the first selected row or -1 if none are selected +
+ +  Array + + + + + getSelectedRowIndexes() + +
+    + Get the selected row indexes +
+ +  Object + + + + + getSelectedRows() + +
+    + Convenience method for getSelectionModel().getSelectedRows() - + See YAHOO.ext.grid.DefaultSelectionModel.getSelectedRows() for more details. +
+ +  Object + + + + + getSelectionCount() + +
+    + Convenience method for getSelectionModel().getCount() - + See YAHOO.ext.grid.DefaultSelectionModel.getCount() for more details. +
+ +  Object + + + + + getSelectionModel() + +
+    + Returns the grid's SelectionModel. +
+ +  Object + + + + + getView() + +
+    + Returns the grid's GridView object. +
+ +  Object + + + + + hasSelection() + +
+    + Convenience method for getSelectionModel().hasSelection() - + See YAHOO.ext.grid.DefaultSelectionModel.hasSelection() for more details. +
+ +  void + + + + + on(eventName, fn, scope, override) + +
+    + Shorthand for addListener +
+ +  void + + + + + readField() + +
+    + Causes the grid to read and select the ids from the bound field - See bindToField(). +
+ +  void + + + + + removeListener(eventName, fn, scope) + +
+    + +
+ +  void + + + + + render() + +
+    + Called once after all setup has been completed and the grid is ready to be rendered. +
+ +  void + + + + + scrollTo(<Number/HTMLElement> row) + +
+    + Scrolls the grid to the specified row +
+ +  void + + + + + selectAll() + +
+    + Convenience method for getSelectionModel().selectAll() - + See YAHOO.ext.grid.DefaultSelectionModel.selectAll() for more details. +
+ +  void + + + + + setCellValue(value, rowIndex, colIndex) + +
+    + +
+ +  void + + + + + startEditing(rowIndex, colIndex) + +
+    + Starts editing the specified for the specified row/column +
+ +  void + + + + + stopEditing() + +
+    + Stops any active editing +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

allowTextSelectionPattern

+
Object allowTextSelectionPattern
+
    + A regular expression defining tagNames + allowed to have text selection (Defaults to /INPUT|TEXTAREA/i) + +
+
+ + +

autoSizeColumns

+
Boolean autoSizeColumns
+
    + True to automatically resize the columns to fit their content on initial render + +
+
+ + +

autoSizeHeaders

+
Boolean autoSizeHeaders
+
    + True to measure headers with column data when auto sizing columns + +
+
+ + +

ddText

+
String ddText
+
    + Configures the text is the drag proxy (defaults to "%0 selected row(s)"). + %0 is replaced with the number of selected rows. + +
+
+ + +

enableDragDrop

+
Boolean enableDragDrop
+
    + True to enable drag and drop of rows + +
+
+ + +

maxRowsToMeasure

+
Number maxRowsToMeasure
+
    + If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of + rows measured to get a columns size - defaults to 0 (all rows). + +
+
+ + +

minColumnWidth

+
Number minColumnWidth
+
    + The minimum width a column can be resized to. (Defaults to 25) + +
+
+ + +

stripeRows

+
Boolean stripeRows
+
    + True to stripe the rows (default is true) + +
+
+ + +

trackMouseOver

+
Boolean trackMouseOver
+
    + True to highlight rows when the mouse is over (default is false) + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.Grid

+
YAHOO.ext.grid.Grid(<String/HTMLElement/YAHOO.ext.Element> container, <Object> dataModel, <Object> colModel, <Object> selectionModel)
+ + + + +
    + Parameters: + +
      container - The element into which this grid will be rendered - The container MUST have some type of size defined for the grid to fill. The container will be automatically set to position relative if it isn't already. +
    + +
      dataModel - The data model to bind to +
    + +
      colModel - The column model with info about this grid's columns +
    + +
      selectionModel - (optional) The selection model for this grid (defaults to DefaultSelectionModel) +
    + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addListener

+
void addListener(<String> eventName, <Function> fn, <Object> scope, <boolean> override)
+ +
    Adds a listener for one of the many defined grid events
+ + + + +
    + Parameters: + +
      eventName - The type of event to listen for +
    + +
      fn - The method the event invokes +
    + +
      scope - (optional) An arbitrary object that will be passed as a parameter to the handler +
    + +
      override - (optional) If true, the obj passed in becomes the execution scope of the listener +
    + +
+ + + + + + + + +
+ + +

autoSize

+
void autoSize()
+ +
    Causes the grid to manually recalculate it's dimensions. Generally this is done automatically, + but if manual update is required this method will initiate it.
+ + + + + + + + + + + +
+ + +

bindToField

+
void bindToField(fieldId)
+ +
    Binds this grid to the field with the specified id. Initially reads and parses the comma + delimited ids in the field and selects those items. All selections made in the grid + will be persisted to the field by their ids comma delimited.
+ + + + +
    + Parameters: + +
      The - id of the field to bind to +
    + +
+ + + + + + + + +
+ + +

clearSelections

+
void clearSelections()
+ + + + + + + + + + + + + +
+ + +

getCellAfter

+
HTMLElement getCellAfter(<HTMLElement> cell, <Boolean> includeHidden)
+ +
    Returns the cell that comes after the specified cell - text nodes are skipped.
+ + + + +
    + Parameters: + +
      cell - +
    + +
      includeHidden - +
    + +
+ + + + + + + + +
+ + +

getCellBefore

+
HTMLElement getCellBefore(<HTMLElement> cell, <Boolean> includeHidden)
+ +
    Returns the cell that comes before the specified cell - text nodes are skipped.
+ + + + +
    + Parameters: + +
      cell - +
    + +
      includeHidden - +
    + +
+ + + + + + + + +
+ + +

getCellFromChild

+
HTMLElement getCellFromChild(<HTMLElement> childEl)
+ +
    Returns the cell that contains the specified child element.
+ + + + +
    + Parameters: + +
      childEl - +
    + +
+ + + + + + + + +
+ + +

getColumnModel

+
Object getColumnModel()
+ +
    Returns the grid's ColumnModel.
+ + + + + + + + + + + +
+ + +

getDataModel

+
Object getDataModel()
+ +
    Returns the grid's DataModel.
+ + + + + + + + + + + +
+ + +

getDragDropText

+
String getDragDropText()
+ +
    Called to get grid's drag proxy text, by default returns this.ddText.
+ + + + + + + + + + + +
+ + +

getFirstCell

+
HTMLElement getFirstCell(<HTMLElement> row, <Boolean> includeHidden)
+ +
    Returns the first cell for the row - text nodes and hidden columns are skipped.
+ + + + +
    + Parameters: + +
      row - +
    + +
      includeHidden - +
    + +
+ + + + + + + + +
+ + +

getHeaderFromChild

+
HTMLElement getHeaderFromChild(<HTMLElement> childEl)
+ +
    Returns the header element that contains the specified child element.
+ + + + +
    + Parameters: + +
      childEl - +
    + +
+ + + + + + + + +
+ + +

getLastCell

+
HTMLElement getLastCell(<HTMLElement> row, <Boolean> includeHidden)
+ +
    Returns the last cell for the row - text nodes and hidden columns are skipped.
+ + + + +
    + Parameters: + +
      row - +
    + +
      includeHidden - +
    + +
+ + + + + + + + +
+ + +

getRow

+
HTMLElement getRow(index)
+ +
    Returns the table row at the specified index
+ + + + + + + + + + + +
+ + +

getRowAfter

+
HTMLElement getRowAfter(<HTMLElement> row)
+ +
    Returns the row that comes after the specified row - text nodes are skipped.
+ + + + +
    + Parameters: + +
      row - +
    + +
+ + + + + + + + +
+ + +

getRowBefore

+
HTMLElement getRowBefore(<HTMLElement> row)
+ +
    Returns the row that comes before the specified row - text nodes are skipped.
+ + + + +
    + Parameters: + +
      row - +
    + +
+ + + + + + + + +
+ + +

getRowFromChild

+
HTMLElement getRowFromChild(<HTMLElement> childEl)
+ +
    Returns the row that contains the specified child element.
+ + + + +
    + Parameters: + +
      childEl - +
    + +
+ + + + + + + + +
+ + +

getRowsById

+
HtmlElement/Array getRowsById(id)
+ + + + + + +
    + Parameters: + +
      An - id to find or an array of ids +
    + +
+ + + + +
    + Returns: +
      + If one id was passed in, it returns one result. If an array of ids was specified, it returns an Array of HTMLElements +
    +
+ + + + + +
+ + +

getSelectedRow

+
Object getSelectedRow()
+ + + + + + + + + + + + + +
+ + +

getSelectedRowId

+
Object getSelectedRowId()
+ + + + + + + + + + + + + +
+ + +

getSelectedRowIds

+
Object getSelectedRowIds()
+ + + + + + + + + + + + + +
+ + +

getSelectedRowIndex

+
Number getSelectedRowIndex()
+ +
    Gets the first selected row or -1 if none are selected
+ + + + + + + + + + + +
+ + +

getSelectedRowIndexes

+
Array getSelectedRowIndexes()
+ +
    Get the selected row indexes
+ + + + + + + +
    + Returns: +
      + Array of indexes +
    +
+ + + + + +
+ + +

getSelectedRows

+
Object getSelectedRows()
+ + + + + + + + + + + + + +
+ + +

getSelectionCount

+
Object getSelectionCount()
+ + + + + + + + + + + + + +
+ + +

getSelectionModel

+
Object getSelectionModel()
+ +
    Returns the grid's SelectionModel.
+ + + + + + + + + + + +
+ + +

getView

+
Object getView()
+ +
    Returns the grid's GridView object.
+ + + + + + + + + + + +
+ + +

hasSelection

+
Object hasSelection()
+ + + + + + + + + + + + + +
+ + +

on

+
void on(eventName, fn, scope, override)
+ +
    Shorthand for addListener
+ + + + + + + + + + + +
+ + +

readField

+
void readField()
+ +
    Causes the grid to read and select the ids from the bound field - See bindToField().
+ + + + + + + + + + + +
+ + +

removeListener

+
void removeListener(eventName, fn, scope)
+ + + + + + + + + + + +
+ + +

render

+
void render()
+ +
    Called once after all setup has been completed and the grid is ready to be rendered.
+ + + + + + + + + + + +
+ + +

scrollTo

+
void scrollTo(<Number/HTMLElement> row)
+ +
    Scrolls the grid to the specified row
+ + + + +
    + Parameters: + +
      row - The row object or index of the row +
    + +
+ + + + + + + + +
+ + +

selectAll

+
void selectAll()
+ + + + + + + + + + + + + +
+ + +

setCellValue

+
void setCellValue(value, rowIndex, colIndex)
+ + + + + + + + + + + +
+ + +

startEditing

+
void startEditing(rowIndex, colIndex)
+ +
    Starts editing the specified for the specified row/column
+ + + + + + + + + + + +
+ + +

stopEditing

+
void stopEditing()
+ +
    Stops any active editing
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.GridDD.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.GridDD.html new file mode 100644 index 000000000..9380d309e --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.GridDD.html @@ -0,0 +1,512 @@ + + + + + +YAHOO.ext.grid.GridDD + + + + + + +

Class YAHOO.ext.grid.GridDD

+
Object
+   |
+   +--YAHOO.util.DDProxy
+         |
+         +--YAHOO.ext.grid.GridDD
+
+ + +
+
+ +
class + YAHOO.ext.grid.GridDD + +
extends YAHOO.util.DDProxy + + +
+ +

+
Custom implementation of YAHOO.util.DDProxy used internally by the grid +
Defined in GridDD.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.GridDD + + (grid, bwrap) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + autoOffset(iPageX, iPageY) + +
+    + +
+ +  void + + + + + endDrag(e) + +
+    + +
+ +  void + + + + + handleClick(e) + +
+    + +
+ +  void + + + + + handleMouseDown(e) + +
+    + +
+ +  void + + + + + onDragDrop(e, id) + +
+    + +
+ +  void + + + + + onDragEnter(e, id) + +
+    + +
+ +  void + + + + + onDragOut(e, id) + +
+    + +
+ +  void + + + + + onDragOver(e, id) + +
+    + +
+ +  void + + + + + setDropStatus(<Boolean> dropStatus) + +
+    + Updates the DD visual element to allow/not allow a drop +
+ +  void + + + + + startDrag(e) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.GridDD

+
YAHOO.ext.grid.GridDD(grid, bwrap)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

autoOffset

+
void autoOffset(iPageX, iPageY)
+ + + + + + + + + + + +
+ + +

endDrag

+
void endDrag(e)
+ + + + + + + + + + + +
+ + +

handleClick

+
void handleClick(e)
+ + + + + + + + + + + +
+ + +

handleMouseDown

+
void handleMouseDown(e)
+ + + + + + + + + + + +
+ + +

onDragDrop

+
void onDragDrop(e, id)
+ + + + + + + + + + + +
+ + +

onDragEnter

+
void onDragEnter(e, id)
+ + + + + + + + + + + +
+ + +

onDragOut

+
void onDragOut(e, id)
+ + + + + + + + + + + +
+ + +

onDragOver

+
void onDragOver(e, id)
+ + + + + + + + + + + +
+ + +

setDropStatus

+
void setDropStatus(<Boolean> dropStatus)
+ +
    Updates the DD visual element to allow/not allow a drop
+ + + + +
    + Parameters: + +
      dropStatus - True if drop is allowed on the target +
    + +
+ + + + + + + + +
+ + +

startDrag

+
void startDrag(e)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.GridView.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.GridView.html new file mode 100644 index 000000000..be220777a --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.GridView.html @@ -0,0 +1,1512 @@ + + + + + +YAHOO.ext.grid.GridView + + + + + + +

Class YAHOO.ext.grid.GridView

+
Object
+   |
+   +--YAHOO.ext.grid.GridView
+
+ + +
+
+ +
class + YAHOO.ext.grid.GridView + + +
+ +

+
Default UI code used internally by the Grid. Documentation to come. +
Defined in GridView.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  YAHOO.util.CustomEventonScroll +
+   Fires when the ViewPort is scrolled - fireDirect sig: (this, scrollLeft, scrollTop)
+  ObjectscrollbarMode +
+   
+ <static>  ObjectSCROLLBARS_OVERLAP +
+   
+ <static>  ObjectSCROLLBARS_UNDER +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.GridView + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + adjustForScroll(disableDelay) + +
+    + +
+ +  Object + + + + + appendFooter(parentEl) + +
+    + +
+ +  void + + + + + autoSizeColumn(colIndex, forceMinSize) + +
+    + +
+ +  void + + + + + autoSizeColumns() + +
+    + +
+ +  void + + + + + buildIndexMap() + +
+    + +
+ +  Object + + + + + calcColumnWidth(colIndex, maxRowsToMeasure) + +
+    + +
+ +  void + + + + + deleteRows(dataModel, firstRow, lastRow) + +
+    + +
+ +  void + + + + + ensureVisible(row, disableDelay) + +
+    + +
+ +  void + + + + + fireScroll(scrollLeft, scrollTop) + +
+    + +
+ +  void + + + + + focusRow(row) + +
+    + +
+ +  void + + + + + forceScrollUpdate() + +
+    + +
+ +  Object + + + + + getBodyTable() + +
+    + +
+ +  Object + + + + + getCellAtPoint(x, y) + +
+    + +
+ +  Object + + + + + getColumnIndexByDataIndex(dataIndex) + +
+    + +
+ +  Object + + + + + getColumnRenderers() + +
+    + Utility method that gets an array of the cell renderers +
+ +  Object + + + + + getDataIndexes() + +
+    + +
+ +  Object + + + + + getRowHeight() + +
+    + +
+ +  void + + + + + handleHiddenChange(colModel, colIndex, hidden) + +
+    + +
+ +  void + + + + + handleScroll() + +
+    + +
+ +  void + + + + + handleSort(dataModel, sortColumnIndex, sortDir, noRefresh) + +
+    + +
+ +  void + + + + + hideColumn(colIndex) + +
+    + +
+ +  void + + + + + init(grid) + +
+    + +
+ +  void + + + + + insertRows(dataModel, firstRow, lastRow) + +
+    + +
+ +  void + + + + + onColumnSplitterMoved(splitter, newSize) + +
+    + +
+ +  Object + + + + + render() + +
+    + +
+ +  void + + + + + renderRow(dataModel, row, rowIndex, colCount, renderers, dindexes) + +
+    + +
+ +  void + + + + + renderRows(dataModel) + +
+    + +
+ +  void + + + + + setCSSWidth(colIndex, width, pos) + +
+    + +
+ +  void + + + + + syncScroll() + +
+    + +
+ +  void + + + + + unhideColumn(colIndex) + +
+    + +
+ +  void + + + + + updateBodyHeight() + +
+    + +
+ +  void + + + + + updateCell(dataModel, rowIndex, dataIndex) + +
+    + +
+ +  void + + + + + updateColumns() + +
+    + +
+ +  void + + + + + updateHeaders() + +
+    + +
+ +  void + + + + + updateHeaderSortState() + +
+    + +
+ +  void + + + + + updateRowIndexes(firstRow, lastRow) + +
+    + +
+ +  void + + + + + updateRows(dataModel, firstRow, lastRow) + +
+    + +
+ +  void + + + + + updateWrapHeight() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

onScroll

+
YAHOO.util.CustomEvent onScroll
+
    + Fires when the ViewPort is scrolled - fireDirect sig: (this, scrollLeft, scrollTop) + +
+
+ + +

scrollbarMode

+
Object scrollbarMode
+
    + + +
+
+ + +

SCROLLBARS_OVERLAP

+
<static> Object SCROLLBARS_OVERLAP
+
    + + +
+
+ + +

SCROLLBARS_UNDER

+
<static> Object SCROLLBARS_UNDER
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.GridView

+
YAHOO.ext.grid.GridView()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

adjustForScroll

+
void adjustForScroll(disableDelay)
+ + + + + + + + + + + +
+ + +

appendFooter

+
Object appendFooter(parentEl)
+ + + + + + + + + + + +
+ + +

autoSizeColumn

+
void autoSizeColumn(colIndex, forceMinSize)
+ + + + + + + + + + + +
+ + +

autoSizeColumns

+
void autoSizeColumns()
+ + + + + + + + + + + +
+ + +

buildIndexMap

+
void buildIndexMap()
+ + + + + + + + + + + +
+ + +

calcColumnWidth

+
Object calcColumnWidth(colIndex, maxRowsToMeasure)
+ + + + + + + + + + + +
+ + +

deleteRows

+
void deleteRows(dataModel, firstRow, lastRow)
+ + + + + + + + + + + +
+ + +

ensureVisible

+
void ensureVisible(row, disableDelay)
+ + + + + + + + + + + +
+ + +

fireScroll

+
void fireScroll(scrollLeft, scrollTop)
+ + + + + + + + + + + +
+ + +

focusRow

+
void focusRow(row)
+ + + + + + + + + + + +
+ + +

forceScrollUpdate

+
void forceScrollUpdate()
+ + + + + + + + + + + +
+ + +

getBodyTable

+
Object getBodyTable()
+ + + + + + + + + + + +
+ + +

getCellAtPoint

+
Object getCellAtPoint(x, y)
+ + + + + + + + + + + +
+ + +

getColumnIndexByDataIndex

+
Object getColumnIndexByDataIndex(dataIndex)
+ + + + + + + + + + + +
+ + +

getColumnRenderers

+
Object getColumnRenderers()
+ +
    Utility method that gets an array of the cell renderers
+ + + + + + + + + + + +
+ + +

getDataIndexes

+
Object getDataIndexes()
+ + + + + + + + + + + +
+ + +

getRowHeight

+
Object getRowHeight()
+ + + + + + + + + + + +
+ + +

handleHiddenChange

+
void handleHiddenChange(colModel, colIndex, hidden)
+ + + + + + + + + + + +
+ + +

handleScroll

+
void handleScroll()
+ + + + + + + + + + + +
+ + +

handleSort

+
void handleSort(dataModel, sortColumnIndex, sortDir, noRefresh)
+ + + + + + + + + + + +
+ + +

hideColumn

+
void hideColumn(colIndex)
+ + + + + + + + + + + +
+ + +

init

+
void init(grid)
+ + + + + + + + + + + +
+ + +

insertRows

+
void insertRows(dataModel, firstRow, lastRow)
+ + + + + + + + + + + +
+ + +

onColumnSplitterMoved

+
void onColumnSplitterMoved(splitter, newSize)
+ + + + + + + + + + + +
+ + +

render

+
Object render()
+ + + + + + + + + + + +
+ + +

renderRow

+
void renderRow(dataModel, row, rowIndex, colCount, renderers, dindexes)
+ + + + + + + + + + + +
+ + +

renderRows

+
void renderRows(dataModel)
+ + + + + + + + + + + +
+ + +

setCSSWidth

+
void setCSSWidth(colIndex, width, pos)
+ + + + + + + + + + + +
+ + +

syncScroll

+
void syncScroll()
+ + + + + + + + + + + +
+ + +

unhideColumn

+
void unhideColumn(colIndex)
+ + + + + + + + + + + +
+ + +

updateBodyHeight

+
void updateBodyHeight()
+ + + + + + + + + + + +
+ + +

updateCell

+
void updateCell(dataModel, rowIndex, dataIndex)
+ + + + + + + + + + + +
+ + +

updateColumns

+
void updateColumns()
+ + + + + + + + + + + +
+ + +

updateHeaders

+
void updateHeaders()
+ + + + + + + + + + + +
+ + +

updateHeaderSortState

+
void updateHeaderSortState()
+ + + + + + + + + + + +
+ + +

updateRowIndexes

+
void updateRowIndexes(firstRow, lastRow)
+ + + + + + + + + + + +
+ + +

updateRows

+
void updateRows(dataModel, firstRow, lastRow)
+ + + + + + + + + + + +
+ + +

updateWrapHeight

+
void updateWrapHeight()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.HeaderController.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.HeaderController.html new file mode 100644 index 000000000..cb278d442 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.HeaderController.html @@ -0,0 +1,333 @@ + + + + + +YAHOO.ext.grid.HeaderController + + + + + + +

Class YAHOO.ext.grid.HeaderController

+
Object
+   |
+   +--YAHOO.ext.grid.HeaderController
+
+ + +
+
+ +
class + YAHOO.ext.grid.HeaderController + + +
+ +

+
Used internal by GridView to route header related events. +
Defined in GridView.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.HeaderController + + (grid) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + cancelTextSelection(e) + +
+    + +
+ +  void + + + + + headerClick(e) + +
+    + +
+ +  void + + + + + headerOut(e) + +
+    + +
+ +  void + + + + + headerOver(e) + +
+    + +
+ +  void + + + + + register(header) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.HeaderController

+
YAHOO.ext.grid.HeaderController(grid)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

cancelTextSelection

+
void cancelTextSelection(e)
+ + + + + + + + + + + +
+ + +

headerClick

+
void headerClick(e)
+ + + + + + + + + + + +
+ + +

headerOut

+
void headerOut(e)
+ + + + + + + + + + + +
+ + +

headerOver

+
void headerOver(e)
+ + + + + + + + + + + +
+ + +

register

+
void register(header)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.JSONDataModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.JSONDataModel.html new file mode 100644 index 000000000..418d2a279 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.JSONDataModel.html @@ -0,0 +1,348 @@ + + + + + +YAHOO.ext.grid.JSONDataModel + + + + + + +

Class YAHOO.ext.grid.JSONDataModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractDataModel
+         |
+         +--YAHOO.ext.grid.DefaultDataModel
+               |
+               +--YAHOO.ext.grid.LoadableDataModel
+                     |
+                     +--YAHOO.ext.grid.JSONDataModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.JSONDataModel + +
extends YAHOO.ext.grid.LoadableDataModel + + +
+ +

+
This is an implementation of a DataModel used by the Grid. It works + with JSON data. +
Example schema: +


+ var schema = {
+     root: 'Results.Result',
+     id: 'ASIN',
+     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ };
+ 
+
Defined in JSONDataModel.js

+

+ +
+ + + + + + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.LoadableDataModel
+ onLoad, onLoadException, loadedPage, remoteSort, pageSize, pageUrl, baseParams, paramMap +
+  + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.AbstractDataModel
+ onCellUpdated, onTableDataChanged, onRowsDeleted, onRowsInserted, onRowsUpdated, onRowsSorted, events, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.JSONDataModel + + (schema) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Number + + + + + getRowId(<Number> rowIndex) + +
+    + Overrides getRowId in DefaultDataModel to return the ID value of the specified node. +
+ +  void + + + + + loadData(<Object> data, <Function> callback, keepExisting) + +
+    + Overrides loadData in LoadableDataModel to process JSON data +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.LoadableDataModel
+ +isPaged, getTotalRowCount, getPageSize, getTotalPages, initPaging, loadPage, sort, load, fireLoadException, fireLoadEvent, addPreprocessor, getPreprocessor, removePreprocessor, addPostprocessor, getPostprocessor, removePostprocessor +
+  + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultDataModel
+ +getRowCount, getRow, getRows, getValueAt, setValueAt, removeRow, query, filter, addRow, insertRow, applySort, setDefaultSort +
+  + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.AbstractDataModel
+ +fireCellUpdated, fireTableDataChanged, fireRowsDeleted, fireRowsInserted, fireRowsUpdated, fireRowsSorted, getSortState +
+  + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.JSONDataModel

+
YAHOO.ext.grid.JSONDataModel(schema)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getRowId

+
Number getRowId(<Number> rowIndex)
+ +
    Overrides getRowId in DefaultDataModel to return the ID value of the specified node.
+ + + + +
    + Parameters: + +
      rowIndex - +
    + +
+ + + + + + + + +
+ + +

loadData

+
void loadData(<Object> data, <Function> callback, keepExisting)
+ +
    Overrides loadData in LoadableDataModel to process JSON data
+ + + + +
    + Parameters: + +
      data - The JSON object to load +
    + +
      callback - +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.LoadableDataModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.LoadableDataModel.html new file mode 100644 index 000000000..51a9c2793 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.LoadableDataModel.html @@ -0,0 +1,1052 @@ + + + + + +YAHOO.ext.grid.LoadableDataModel + + + + + + +

Class YAHOO.ext.grid.LoadableDataModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractDataModel
+         |
+         +--YAHOO.ext.grid.DefaultDataModel
+               |
+               +--YAHOO.ext.grid.LoadableDataModel
+
+ +
+
+ Direct Known Subclasses: +
+ YAHOO.ext.grid.XMLDataModel, YAHOO.ext.grid.JSONDataModel +
+
+ + +
+
+ +
class + YAHOO.ext.grid.LoadableDataModel + +
extends YAHOO.ext.grid.DefaultDataModel + + +
+ +

+
This class extends DefaultDataModel and adds the core functionality to load data remotely.

+
Defined in LoadableDataModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectbaseParams +
+   An object of key/value pairs to be passed as parameters + when loading pages/sorting
+  NumberloadedPage +
+   The active page
+  YAHOO.util.CustomEventonLoad +
+   Fires when a successful load is completed - fireDirect sig: (this)
+  YAHOO.util.CustomEventonLoadException +
+   Fires when a load fails - fireDirect sig: (this, errorMsg, responseObj)
+  NumberpageSize +
+   The number of records per page
+  StringpageUrl +
+   The script/page to call to provide paged/sorted data
+  ObjectparamMap +
+   Maps named params to url parameters - Override to specify your own param names
+  BooleanremoteSort +
+   True to use remote sorting, initPaging automatically sets this to true
+ <static>  ObjectJSON +
+   
+ <static>  ObjectTEXT +
+   
+ <static>  ObjectXML +
+   
+   + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.AbstractDataModel
+ onCellUpdated, onTableDataChanged, onRowsDeleted, onRowsInserted, onRowsUpdated, onRowsSorted, events, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.LoadableDataModel + + (<String> dataType) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addPostprocessor(columnIndex, fn) + +
+    + Adds a postprocessor function to format data before updating the underlying data source (ie. +
+ +  void + + + + + addPreprocessor(columnIndex, fn) + +
+    + Adds a preprocessor function to parse data before it is added to the Model - ie. +
+ +  void + + + + + fireLoadEvent() + +
+    + +
+ +  void + + + + + fireLoadException(e, responseObj) + +
+    + +
+ +  Number + + + + + getPageSize() + +
+    + Returns the number of records per page +
+ +  Object + + + + + getPostprocessor(columnIndex) + +
+    + Gets the postprocessor function for the specified column. +
+ +  Object + + + + + getPreprocessor(columnIndex) + +
+    + Gets the preprocessor function for the specified column. +
+ +  Number + + + + + getTotalPages() + +
+    + Returns the total number of pages available +
+ +  Number + + + + + getTotalRowCount() + +
+    + Returns the total number of records available, override if needed +
+ +  void + + + + + initPaging(url, pageSize, baseParams) + +
+    + Initializes paging for this model. +
+ +  Boolean + + + + + isPaged() + +
+    + Returns true if this model uses paging +
+ +  void + + + + + load(<Object/String> url, <String/Object> params, <Function> callback, <Number> insertIndex) + +
+    + Initiates the loading of the data from the specified URL - Failed load attempts will + fire the onLoadException event. +
+ +  void + + + + + loadData(data, callback, keepExisting, insertIndex) + +
+    + Empty interface method - Called to process the data returned by the XHR - Classes which extend LoadableDataModel should implement this method. +
+ +  void + + + + + loadPage(pageNum, callback, keepExisting) + +
+    + +
+ +  void + + + + + removePostprocessor(columnIndex) + +
+    + Removes a postprocessor function. +
+ +  void + + + + + removePreprocessor(columnIndex) + +
+    + Removes a preprocessor function. +
+ +  void + + + + + sort(columnModel, columnIndex, direction, suppressEvent) + +
+    + Overridden sort method to use remote sorting if turned on +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultDataModel
+ +getRowCount, getRowId, getRow, getRows, getValueAt, setValueAt, removeRow, query, filter, addRow, insertRow, applySort, setDefaultSort +
+  + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.AbstractDataModel
+ +fireCellUpdated, fireTableDataChanged, fireRowsDeleted, fireRowsInserted, fireRowsUpdated, fireRowsSorted, getSortState +
+  + +

+ + + + + + + + + + +
Field Detail
+ + + +

baseParams

+
Object baseParams
+
    + An object of key/value pairs to be passed as parameters + when loading pages/sorting + +
+
+ + +

loadedPage

+
Number loadedPage
+
    + The active page + +
+
+ + +

onLoad

+
YAHOO.util.CustomEvent onLoad
+
    + Fires when a successful load is completed - fireDirect sig: (this) + +
+
+ + +

onLoadException

+
YAHOO.util.CustomEvent onLoadException
+
    + Fires when a load fails - fireDirect sig: (this, errorMsg, responseObj) + +
+
+ + +

pageSize

+
Number pageSize
+
    + The number of records per page + +
+
+ + +

pageUrl

+
String pageUrl
+
    + The script/page to call to provide paged/sorted data + +
+
+ + +

paramMap

+
Object paramMap
+
    + Maps named params to url parameters - Override to specify your own param names + +
+
+ + +

remoteSort

+
Boolean remoteSort
+
    + True to use remote sorting, initPaging automatically sets this to true + +
+
+ + +

JSON

+
<static> Object JSON
+
    + + +
+
+ + +

TEXT

+
<static> Object TEXT
+
    + + +
+
+ + +

XML

+
<static> Object XML
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.LoadableDataModel

+
YAHOO.ext.grid.LoadableDataModel(<String> dataType)
+ + + + +
    + Parameters: + +
      dataType - YAHOO.ext.grid.LoadableDataModel.XML, YAHOO.ext.grid.LoadableDataModel.TEXT or YAHOO.ext.grid.JSON +
    + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addPostprocessor

+
void addPostprocessor(columnIndex, fn)
+ +
    Adds a postprocessor function to format data before updating the underlying data source (ie. convert date to string before updating XML document).
+ + + + + + + + + + + +
+ + +

addPreprocessor

+
void addPreprocessor(columnIndex, fn)
+ +
    Adds a preprocessor function to parse data before it is added to the Model - ie. Date.parse to parse dates.
+ + + + + + + + + + + +
+ + +

fireLoadEvent

+
void fireLoadEvent()
+ + + + + + + + + + + +
+ + +

fireLoadException

+
void fireLoadException(e, responseObj)
+ + + + + + + + + + + +
+ + +

getPageSize

+
Number getPageSize()
+ +
    Returns the number of records per page
+ + + + + + + + + + + +
+ + +

getPostprocessor

+
Object getPostprocessor(columnIndex)
+ +
    Gets the postprocessor function for the specified column.
+ + + + + + + + + + + +
+ + +

getPreprocessor

+
Object getPreprocessor(columnIndex)
+ +
    Gets the preprocessor function for the specified column.
+ + + + + + + + + + + +
+ + +

getTotalPages

+
Number getTotalPages()
+ +
    Returns the total number of pages available
+ + + + + + + + + + + +
+ + +

getTotalRowCount

+
Number getTotalRowCount()
+ +
    Returns the total number of records available, override if needed
+ + + + + + + + + + + +
+ + +

initPaging

+
void initPaging(url, pageSize, baseParams)
+ +
    Initializes paging for this model.
+ + + + + + + + + + + +
+ + +

isPaged

+
Boolean isPaged()
+ +
    Returns true if this model uses paging
+ + + + + + + + + + + +
+ + +

load

+
void load(<Object/String> url, <String/Object> params, <Function> callback, <Number> insertIndex)
+ +
    Initiates the loading of the data from the specified URL - Failed load attempts will + fire the onLoadException event.
+ + + + +
    + Parameters: + +
      url - The url from which the data can be loaded +
    + +
      params - (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or as an object {param1: 1, param2: 2} +
    + +
      callback - (optional) Callback when load is complete - called with signature (this, rowCountLoaded) +
    + +
      insertIndex - (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data +
    + +
+ + + + + + + + +
+ + +

loadData

+
void loadData(data, callback, keepExisting, insertIndex)
+ +
    Empty interface method - Called to process the data returned by the XHR - Classes which extend LoadableDataModel should implement this method. + See YAHOO.ext.XMLDataModel for an example implementation.
+ + + + + + + + + + + +
+ + +

loadPage

+
void loadPage(pageNum, callback, keepExisting)
+ + + + + + + + + + + +
+ + +

removePostprocessor

+
void removePostprocessor(columnIndex)
+ +
    Removes a postprocessor function.
+ + + + + + + + + + + +
+ + +

removePreprocessor

+
void removePreprocessor(columnIndex)
+ +
    Removes a preprocessor function.
+ + + + + + + + + + + +
+ + +

sort

+
void sort(columnModel, columnIndex, direction, suppressEvent)
+ +
    Overridden sort method to use remote sorting if turned on
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.NumberEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.NumberEditor.html new file mode 100644 index 000000000..3f25880ff --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.NumberEditor.html @@ -0,0 +1,656 @@ + + + + + +YAHOO.ext.grid.NumberEditor + + + + + + +

Class YAHOO.ext.grid.NumberEditor

+
Object
+   |
+   +--YAHOO.ext.grid.NumberEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.NumberEditor + + +
+ +

+ Defined in NumberEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectallowBlank +
+   
+  ObjectallowDecimals +
+   
+  ObjectallowNegative +
+   
+  ObjectblankText +
+   
+  ObjectdecimalPrecision +
+   
+  ObjectdecimalPrecisionFcn +
+   
+  ObjectdecimalSeparator +
+   
+  ObjectmaxText +
+   
+  ObjectmaxValue +
+   
+  ObjectminText +
+   
+  ObjectminValue +
+   
+  ObjectnanText +
+   
+  ObjectselectOnFocus +
+   
+  ObjectvalidationDelay +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.NumberEditor + + (config) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + fixPrecision(value) + +
+    + +
+ +  Object + + + + + getValue() + +
+    + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  Object + + + + + parseValue(value) + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ +  Object + + + + + validate() + +
+    + +
+ +  Object + + + + + validator() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

allowBlank

+
Object allowBlank
+
    + + +
+
+ + +

allowDecimals

+
Object allowDecimals
+
    + + +
+
+ + +

allowNegative

+
Object allowNegative
+
    + + +
+
+ + +

blankText

+
Object blankText
+
    + + +
+
+ + +

decimalPrecision

+
Object decimalPrecision
+
    + + +
+
+ + +

decimalPrecisionFcn

+
Object decimalPrecisionFcn
+
    + + +
+
+ + +

decimalSeparator

+
Object decimalSeparator
+
    + + +
+
+ + +

maxText

+
Object maxText
+
    + + +
+
+ + +

maxValue

+
Object maxValue
+
    + + +
+
+ + +

minText

+
Object minText
+
    + + +
+
+ + +

minValue

+
Object minValue
+
    + + +
+
+ + +

nanText

+
Object nanText
+
    + + +
+
+ + +

selectOnFocus

+
Object selectOnFocus
+
    + + +
+
+ + +

validationDelay

+
Object validationDelay
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.NumberEditor

+
YAHOO.ext.grid.NumberEditor(config)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fixPrecision

+
Object fixPrecision(value)
+ + + + + + + + + + + +
+ + +

getValue

+
Object getValue()
+ + + + + + + + + + + +
+ + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

parseValue

+
Object parseValue(value)
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + +

validate

+
Object validate()
+ + + + + + + + + + + +
+ + +

validator

+
Object validator()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.PagedGridView.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.PagedGridView.html new file mode 100644 index 000000000..ad5ed97ea --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.PagedGridView.html @@ -0,0 +1,570 @@ + + + + + +YAHOO.ext.grid.PagedGridView + + + + + + +

Class YAHOO.ext.grid.PagedGridView

+
Object
+   |
+   +--YAHOO.ext.grid.PagedGridView
+
+ + +
+
+ +
class + YAHOO.ext.grid.PagedGridView + + +
+ +

+ Defined in PagedGridView.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectafterPageText +
+   
+  ObjectbeforePageText +
+   
+  ObjectfirstText +
+   
+  ObjectlastText +
+   
+  ObjectnextText +
+   
+  ObjectprevText +
+   
+  ObjectrefreshText +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.PagedGridView + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + appendFooter(parentEl) + +
+    + +
+ +  void + + + + + beforeLoad() + +
+    + +
+ +  void + + + + + createPagingToolbar(container) + +
+    + +
+ +  Object + + + + + getPageToolbar() + +
+    + +
+ +  void + + + + + onClick(which) + +
+    + +
+ +  void + + + + + onEnter(e) + +
+    + +
+ +  void + + + + + onPageLoaded(pageNum, totalPages) + +
+    + +
+ +  Object + + + + + render() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

afterPageText

+
Object afterPageText
+
    + + +
+
+ + +

beforePageText

+
Object beforePageText
+
    + + +
+
+ + +

firstText

+
Object firstText
+
    + + +
+
+ + +

lastText

+
Object lastText
+
    + + +
+
+ + +

nextText

+
Object nextText
+
    + + +
+
+ + +

prevText

+
Object prevText
+
    + + +
+
+ + +

refreshText

+
Object refreshText
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.PagedGridView

+
YAHOO.ext.grid.PagedGridView()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

appendFooter

+
Object appendFooter(parentEl)
+ + + + + + + + + + + +
+ + +

beforeLoad

+
void beforeLoad()
+ + + + + + + + + + + +
+ + +

createPagingToolbar

+
void createPagingToolbar(container)
+ + + + + + + + + + + +
+ + +

getPageToolbar

+
Object getPageToolbar()
+ + + + + + + + + + + +
+ + +

onClick

+
void onClick(which)
+ + + + + + + + + + + +
+ + +

onEnter

+
void onEnter(e)
+ + + + + + + + + + + +
+ + +

onPageLoaded

+
void onPageLoaded(pageNum, totalPages)
+ + + + + + + + + + + +
+ + +

render

+
Object render()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.SelectEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.SelectEditor.html new file mode 100644 index 000000000..602113c6c --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.SelectEditor.html @@ -0,0 +1,200 @@ + + + + + +YAHOO.ext.grid.SelectEditor + + + + + + +

Class YAHOO.ext.grid.SelectEditor

+
Object
+   |
+   +--YAHOO.ext.grid.SelectEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.SelectEditor + + +
+ +

+ Defined in SelectEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.SelectEditor + + (element) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + fitToCell(box) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.SelectEditor

+
YAHOO.ext.grid.SelectEditor(element)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fitToCell

+
void fitToCell(box)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.SingleSelectionModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.SingleSelectionModel.html new file mode 100644 index 000000000..d589027ec --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.SingleSelectionModel.html @@ -0,0 +1,174 @@ + + + + + +YAHOO.ext.grid.SingleSelectionModel + + + + + + +

Class YAHOO.ext.grid.SingleSelectionModel

+
Object
+   |
+   +--YAHOO.ext.grid.DefaultSelectionModel
+         |
+         +--YAHOO.ext.grid.SingleSelectionModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.SingleSelectionModel + +
extends YAHOO.ext.grid.DefaultSelectionModel + + +
+ +

+
Extends YAHOO.ext.grid.DefaultSelectionModel to allow only one row to be selected at a time.

+
Defined in SelectionModel.js

+

+ +
+ + + + + + + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ onRowSelect, onSelectionChange, events, locked, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.SingleSelectionModel + + () + +
+    + +
+ + + +  + + + + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultSelectionModel
+ +lock, unlock, isLocked, selectRowsById, getCount, selectFirstRow, selectNext, selectPrevious, getSelectedRows, getSelectedRowIds, clearSelections, selectAll, hasSelection, isSelected, isSelectable, focusRow, selectRow, selectRows, deselectRow, selectRange, deselectRange +
+  + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.SingleSelectionModel

+
YAHOO.ext.grid.SingleSelectionModel()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.TextEditor.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.TextEditor.html new file mode 100644 index 000000000..63569263e --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.TextEditor.html @@ -0,0 +1,522 @@ + + + + + +YAHOO.ext.grid.TextEditor + + + + + + +

Class YAHOO.ext.grid.TextEditor

+
Object
+   |
+   +--YAHOO.ext.grid.TextEditor
+
+ + +
+
+ +
class + YAHOO.ext.grid.TextEditor + + +
+ +

+ Defined in TextEditor.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectallowBlank +
+   
+  ObjectblankText +
+   
+  ObjectmaxLength +
+   
+  ObjectmaxText +
+   
+  ObjectminLength +
+   
+  ObjectminText +
+   
+  Objectregex +
+   
+  ObjectregexText +
+   
+  ObjectselectOnFocus +
+   
+  ObjectvalidationDelay +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.TextEditor + + (config) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getValue() + +
+    + +
+ +  void + + + + + initEvents() + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ +  Object + + + + + validate() + +
+    + +
+ +  Object + + + + + validator() + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

allowBlank

+
Object allowBlank
+
    + + +
+
+ + +

blankText

+
Object blankText
+
    + + +
+
+ + +

maxLength

+
Object maxLength
+
    + + +
+
+ + +

maxText

+
Object maxText
+
    + + +
+
+ + +

minLength

+
Object minLength
+
    + + +
+
+ + +

minText

+
Object minText
+
    + + +
+
+ + +

regex

+
Object regex
+
    + + +
+
+ + +

regexText

+
Object regexText
+
    + + +
+
+ + +

selectOnFocus

+
Object selectOnFocus
+
    + + +
+
+ + +

validationDelay

+
Object validationDelay
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.TextEditor

+
YAHOO.ext.grid.TextEditor(config)
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getValue

+
Object getValue()
+ + + + + + + + + + + +
+ + +

initEvents

+
void initEvents()
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + +

validate

+
Object validate()
+ + + + + + + + + + + +
+ + +

validator

+
Object validator()
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.XMLDataModel.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.XMLDataModel.html new file mode 100644 index 000000000..856390fb8 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.XMLDataModel.html @@ -0,0 +1,794 @@ + + + + + +YAHOO.ext.grid.XMLDataModel + + + + + + +

Class YAHOO.ext.grid.XMLDataModel

+
Object
+   |
+   +--YAHOO.ext.grid.AbstractDataModel
+         |
+         +--YAHOO.ext.grid.DefaultDataModel
+               |
+               +--YAHOO.ext.grid.LoadableDataModel
+                     |
+                     +--YAHOO.ext.grid.XMLDataModel
+
+ + +
+
+ +
class + YAHOO.ext.grid.XMLDataModel + +
extends YAHOO.ext.grid.LoadableDataModel + + +
+ +

+
This is an implementation of a DataModel used by the Grid. It works + with XML data. +
Example schema from Amazon search: +


+ var schema = {
+     tagName: 'Item',
+     id: 'ASIN',
+     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ };
+ 
+
Defined in XMLDataModel.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  Objectxml +
+   
+   + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.LoadableDataModel
+ onLoad, onLoadException, loadedPage, remoteSort, pageSize, pageUrl, baseParams, paramMap +
+  + + + + + +   + + + + + + + +
Fields inherited from class YAHOO.ext.grid.AbstractDataModel
+ onCellUpdated, onTableDataChanged, onRowsDeleted, onRowsInserted, onRowsUpdated, onRowsSorted, events, addListener, removeListener, fireEvent +
+  + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.grid.XMLDataModel + + (<Object> schema, <XMLDocument> xml) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Number + + + + + addRow(<String> id, <Array> cellValues) + +
+    + Adds a row to this DataModel and syncs the XML document +
+ +  XMLNode + + + + + createNode(<XMLDocument> xmlDoc, id, <Array> colData) + +
+    + Override this method to define your own node creation routine for when new rows are added. +
+ +  Object + + + + + getDocument() + +
+    + +
+ +  Object + + + + + getNamedValue(node, name, defaultValue) + +
+    + Convenience function looks for value in attributes, then in children tags - also + normalizes namespace matches (ie matches ns:tag, FireFox matches tag and not ns:tag). +
+ +  Object + + + + + getNode(rowIndex) + +
+    + +
+ +  Number + + + + + getRowId(<Number> rowIndex) + +
+    + Overrides getRowId in DefaultDataModel to return the ID value of the specified node. +
+ +  Number + + + + + insertRow(<Number> index, <String> id, <Array> cellValues) + +
+    + Inserts a row into this DataModel and syncs the XML document +
+ +  void + + + + + loadData(<XMLDocument> doc, <Function> callback, <Boolean> keepExisting, <Number> insertIndex) + +
+    + Overrides loadData in LoadableDataModel to process XML +
+ +  void + + + + + removeRow(<Number> index) + +
+    + Removes the row from DataModel and syncs the XML document +
+ +  void + + + + + setNamedValue(node, name, value) + +
+    + Convenience function set a value in the underlying xml node. +
+ +  void + + + + + setValueAt(<Object> value, <Number> rowIndex, <Number> colIndex) + +
+    + Overrides DefaultDataModel.setValueAt to update the underlying XML Document +
+ + + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.LoadableDataModel
+ +isPaged, getTotalRowCount, getPageSize, getTotalPages, initPaging, loadPage, sort, load, fireLoadException, fireLoadEvent, addPreprocessor, getPreprocessor, removePreprocessor, addPostprocessor, getPostprocessor, removePostprocessor +
+  + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.DefaultDataModel
+ +getRowCount, getRow, getRows, getValueAt, query, filter, applySort, setDefaultSort +
+  + +  + + + + + + + +
Methods inherited from class YAHOO.ext.grid.AbstractDataModel
+ +fireCellUpdated, fireTableDataChanged, fireRowsDeleted, fireRowsInserted, fireRowsUpdated, fireRowsSorted, getSortState +
+  + +

+ + + + + + + + + + +
Field Detail
+ + + +

xml

+
Object xml
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.grid.XMLDataModel

+
YAHOO.ext.grid.XMLDataModel(<Object> schema, <XMLDocument> xml)
+ + + + +
    + Parameters: + +
      schema - The schema to use +
    + +
      xml - An XML document to load immediately +
    + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addRow

+
Number addRow(<String> id, <Array> cellValues)
+ +
    Adds a row to this DataModel and syncs the XML document
+ + + + +
    + Parameters: + +
      id - The id of the row, if null the next row index is used +
    + +
      cellValues - The cell values for this row +
    + +
+ + + + +
    + Returns: +
      + The index of the new row +
    +
+ + + + + +
+ + +

createNode

+
XMLNode createNode(<XMLDocument> xmlDoc, id, <Array> colData)
+ +
    Override this method to define your own node creation routine for when new rows are added. + By default this method clones the first node and sets the column values in the newly cloned node.
+ + + + +
    + Parameters: + +
      xmlDoc - The xml document being used by this model +
    + +
      colData - The column data for the new node +
    + +
+ + + + +
    + Returns: +
      + The created node +
    +
+ + + + + +
+ + +

getDocument

+
Object getDocument()
+ + + + + + + + + + + +
+ + +

getNamedValue

+
Object getNamedValue(node, name, defaultValue)
+ +
    Convenience function looks for value in attributes, then in children tags - also + normalizes namespace matches (ie matches ns:tag, FireFox matches tag and not ns:tag).
+ + + + + + + + + + + +
+ + +

getNode

+
Object getNode(rowIndex)
+ + + + + + + + + + + +
+ + +

getRowId

+
Number getRowId(<Number> rowIndex)
+ +
    Overrides getRowId in DefaultDataModel to return the ID value of the specified node.
+ + + + +
    + Parameters: + +
      rowIndex - +
    + +
+ + + + + + + + +
+ + +

insertRow

+
Number insertRow(<Number> index, <String> id, <Array> cellValues)
+ +
    Inserts a row into this DataModel and syncs the XML document
+ + + + +
    + Parameters: + +
      index - The index to insert the row +
    + +
      id - The id of the row, if null the next row index is used +
    + +
      cellValues - The cell values for this row +
    + +
+ + + + +
    + Returns: +
      + The index of the new row +
    +
+ + + + + +
+ + +

loadData

+
void loadData(<XMLDocument> doc, <Function> callback, <Boolean> keepExisting, <Number> insertIndex)
+ +
    Overrides loadData in LoadableDataModel to process XML
+ + + + +
    + Parameters: + +
      doc - The document to load +
    + +
      callback - (optional) callback to call when loading is complete +
    + +
      keepExisting - (optional) true to keep existing data +
    + +
      insertIndex - (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data +
    + +
+ + + + + + + + +
+ + +

removeRow

+
void removeRow(<Number> index)
+ +
    Removes the row from DataModel and syncs the XML document
+ + + + +
    + Parameters: + +
      index - The index of the row to remove +
    + +
+ + + + + + + + +
+ + +

setNamedValue

+
void setNamedValue(node, name, value)
+ +
    Convenience function set a value in the underlying xml node.
+ + + + + + + + + + + +
+ + +

setValueAt

+
void setValueAt(<Object> value, <Number> rowIndex, <Number> colIndex)
+ +
    Overrides DefaultDataModel.setValueAt to update the underlying XML Document
+ + + + +
    + Parameters: + +
      value - The new value +
    + +
      rowIndex - +
    + +
      colIndex - +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.grid.html b/www/extras/yui-ext/docs/YAHOO.ext.grid.html new file mode 100644 index 000000000..f7cda4232 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.grid.html @@ -0,0 +1,303 @@ + + + + + +YAHOO.ext.grid + + + + + + +

Class YAHOO.ext.grid

+
Object
+   |
+   +--YAHOO.ext.grid
+
+ + +
+
+ +
class + YAHOO.ext.grid + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.grid.AbstractDataModel
+ <static class>YAHOO.ext.grid.DefaultDataModel
+ <static class>YAHOO.ext.grid.JSONDataModel
+ <static class>YAHOO.ext.grid.LoadableDataModel
+ <static class>YAHOO.ext.grid.XMLDataModel
+ <static class>YAHOO.ext.grid.CellEditor
+ <static class>YAHOO.ext.grid.CheckboxEditor
+ <static class>YAHOO.ext.grid.DateEditor
+ <static class>YAHOO.ext.grid.NumberEditor
+ <static class>YAHOO.ext.grid.SelectEditor
+ <static class>YAHOO.ext.grid.TextEditor
+ <static class>YAHOO.ext.grid.AbstractColumnModel
+ <static class>YAHOO.ext.grid.DefaultColumnModel
+ <static class>YAHOO.ext.grid.EditorSelectionModel
+ <static class>YAHOO.ext.grid.EditorAndSelectionModel
+ <static class>YAHOO.ext.grid.Grid
+ <static class>YAHOO.ext.grid.GridDD
+ <static class>YAHOO.ext.grid.GridView
+ <static class>YAHOO.ext.grid.HeaderController
+ <static class>YAHOO.ext.grid.PagedGridView
+ <static class>YAHOO.ext.grid.DefaultSelectionModel
+ <static class>YAHOO.ext.grid.SingleSelectionModel
+ <static class>YAHOO.ext.grid.DisableSelectionModel
+  + + + + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ + <static> void + + + + + EditorGrid(container, dataModel, colModel) + +
+    + +
+ + + +

+ + + + + + + + + + + + + + + + + +


+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

EditorGrid

+
<static> void EditorGrid(container, dataModel, colModel)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.html b/www/extras/yui-ext/docs/YAHOO.ext.html new file mode 100644 index 000000000..5b5021455 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.html @@ -0,0 +1,208 @@ + + + + + +YAHOO.ext + + + + + + +

Class YAHOO.ext

+
Object
+   |
+   +--YAHOO.ext
+
+ + +
+
+ +
class + YAHOO.ext + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.Actor
+ <static class>YAHOO.ext.Animator
+ <static class>YAHOO.ext.DatePicker
+ <static class>YAHOO.ext.SplitBar
+ <static class>YAHOO.ext.TabPanel
+ <static class>YAHOO.ext.TabPanelItem
+ <static class>YAHOO.ext.Element
+ <static class>YAHOO.ext.UpdateManager
+ <static class>YAHOO.ext.Toolbar
+ <static class>YAHOO.ext.ToolbarButton
+ <static class>YAHOO.ext.Resizable
+  + + + + + + + + + + + + + + + + + + + +
Field Summary
+ <static>  ObjectStrict +
+   
+   + + + + + + + + + + + +  + + + + + +

+ + + + + + + + + + +
Field Detail
+ + + +

Strict

+
<static> Object Strict
+
    + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.Bench.html b/www/extras/yui-ext/docs/YAHOO.ext.util.Bench.html new file mode 100644 index 000000000..7e07a4f9a --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.Bench.html @@ -0,0 +1,387 @@ + + + + + +YAHOO.ext.util.Bench + + + + + + +

Class YAHOO.ext.util.Bench

+
Object
+   |
+   +--YAHOO.ext.util.Bench
+
+ + +
+
+ +
class + YAHOO.ext.util.Bench + + +
+ +

+
Very simple Benchmark class that supports multiple timers +
Defined in yutil.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  ObjectlastKey +
+   
+  Objecttimers +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.util.Bench + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + getElapsed(key) + +
+    + +
+ +  void + + + + + show() + +
+    + +
+ +  void + + + + + start(key) + +
+    + +
+ +  void + + + + + stop(key) + +
+    + +
+ +  Object + + + + + toString(html) + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

lastKey

+
Object lastKey
+
    + + +
+
+ + +

timers

+
Object timers
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.util.Bench

+
YAHOO.ext.util.Bench()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

getElapsed

+
Object getElapsed(key)
+ + + + + + + + + + + +
+ + +

show

+
void show()
+ + + + + + + + + + + +
+ + +

start

+
void start(key)
+ + + + + + + + + + + +
+ + +

stop

+
void stop(key)
+ + + + + + + + + + + +
+ + +

toString

+
Object toString(html)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.Browser.html b/www/extras/yui-ext/docs/YAHOO.ext.util.Browser.html new file mode 100644 index 000000000..5bdc854de --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.Browser.html @@ -0,0 +1,201 @@ + + + + + +YAHOO.ext.util.Browser + + + + + + +

Class YAHOO.ext.util.Browser

+
Object
+   |
+   +--YAHOO.ext.util.Browser
+
+ + +
+
+ +
class + YAHOO.ext.util.Browser + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  BooleanisGecko +
+   
+  BooleanisIE +
+   
+  BooleanisIE7 +
+   
+  BooleanisOpera +
+   
+  BooleanisSafari +
+   
+   + + + + + + + + + + + +  + + + + + +

+ + + + + + + + + + +
Field Detail
+ + + +

isGecko

+
Boolean isGecko
+
    + + +
+
+ + +

isIE

+
Boolean isIE
+
    + + +
+
+ + +

isIE7

+
Boolean isIE7
+
    + + +
+
+ + +

isOpera

+
Boolean isOpera
+
    + + +
+
+ + +

isSafari

+
Boolean isSafari
+
    + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.CSS.html b/www/extras/yui-ext/docs/YAHOO.ext.util.CSS.html new file mode 100644 index 000000000..a6fc1d76b --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.CSS.html @@ -0,0 +1,378 @@ + + + + + +YAHOO.ext.util.CSS + + + + + + +

Class YAHOO.ext.util.CSS

+
Object
+   |
+   +--YAHOO.ext.util.CSS
+
+ + +
+
+ +
class + YAHOO.ext.util.CSS + + +
+ +
+ + + + + + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + apply(el, <String/Array> selector) + +
+    + Applies a rule to an element without adding the class +
+ +  Object + + + + + applyFirst(el, id, selector) + +
+    + +
+ +  Object + + + + + getRule(selector, refreshCache) + +
+    + Searches for a rule by selector +
+ +  Object + + + + + getRules(refreshCache) + +
+    + Gets all css rules for the document +
+ +  Object + + + + + revert(el, selector) + +
+    + +
+ +  Object + + + + + revertFirst(el, id, selector) + +
+    + +
+ +  Object + + + + + updateRule(<String/Array> selector, property, value) + +
+    + Updates a rule property +
+ + + +

+ + + + + + + + + + + + + + + + + +


+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

apply

+
Object apply(el, <String/Array> selector)
+ +
    Applies a rule to an element without adding the class
+ + + + +
    + Parameters: + +
      selector - If it's an array it tries each selector until it finds one. Stops immediately once one is found. +
    + +
+ + + + + + + + +
+ + +

applyFirst

+
Object applyFirst(el, id, selector)
+ + + + + + + + + + + +
+ + +

getRule

+
Object getRule(selector, refreshCache)
+ +
    Searches for a rule by selector
+ + + + + + + + + + + +
+ + +

getRules

+
Object getRules(refreshCache)
+ +
    Gets all css rules for the document
+ + + + + + + + + + + +
+ + +

revert

+
Object revert(el, selector)
+ + + + + + + + + + + +
+ + +

revertFirst

+
Object revertFirst(el, id, selector)
+ + + + + + + + + + + +
+ + +

updateRule

+
Object updateRule(<String/Array> selector, property, value)
+ +
    Updates a rule property
+ + + + +
    + Parameters: + +
      selector - If it's an array it tries each selector until it finds one. Stops immediately once one is found. +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.DelayedTask.html b/www/extras/yui-ext/docs/YAHOO.ext.util.DelayedTask.html new file mode 100644 index 000000000..8b44275ea --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.DelayedTask.html @@ -0,0 +1,272 @@ + + + + + +YAHOO.ext.util.DelayedTask + + + + + + +

Class YAHOO.ext.util.DelayedTask

+
Object
+   |
+   +--YAHOO.ext.util.DelayedTask
+
+ + +
+
+ +
class + YAHOO.ext.util.DelayedTask + + +
+ +

+
Provides a convenient method of performing setTimeout where a new + timeout cancels the old timeout. An example would be performing validation on a keypress. + You can use this class to buffer + the keypress events for a certain number of milliseconds, and perform only if they stop + for that amount of time. +
Defined in yutil.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.util.DelayedTask + + (<Function> fn, <Object> scope, <Array> args) + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + cancel() + +
+    + Cancel the last queued timeout +
+ +  void + + + + + delay(<Number> delay, <Function> newFn, <Object> newScope, <Array> newArgs) + +
+    + Cancels any pending timeout and queues a new one +
+ + + +

+ + + + + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.util.DelayedTask

+
YAHOO.ext.util.DelayedTask(<Function> fn, <Object> scope, <Array> args)
+ + + + +
    + Parameters: + +
      fn - (optional) The default function to timeout +
    + +
      scope - (optional) The default scope of that timeout +
    + +
      args - (optional) The default Array of arguments +
    + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

cancel

+
void cancel()
+ +
    Cancel the last queued timeout
+ + + + + + + + + + + +
+ + +

delay

+
void delay(<Number> delay, <Function> newFn, <Object> newScope, <Array> newArgs)
+ +
    Cancels any pending timeout and queues a new one
+ + + + +
    + Parameters: + +
      delay - The milliseconds to delay +
    + +
      newFn - Overrides function passed to constructor +
    + +
      newScope - Overrides scope passed to constructor +
    + +
      newArgs - Overrides args passed to constructor +
    + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.Observable.html b/www/extras/yui-ext/docs/YAHOO.ext.util.Observable.html new file mode 100644 index 000000000..e62c700d9 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.Observable.html @@ -0,0 +1,336 @@ + + + + + +YAHOO.ext.util.Observable + + + + + + +

Class YAHOO.ext.util.Observable

+
Object
+   |
+   +--YAHOO.ext.util.Observable
+
+ + +
+
+ +
class + YAHOO.ext.util.Observable + + +
+ +

+ Defined in yutil.js

+

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Field Summary
+  Objecton +
+   
+   + + + + + + + + + + + + + + + + + +
+ Constructor Summary +
+ + + YAHOO.ext.util.Observable + + () + +
+    + +
+ + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  void + + + + + addListener(eventName, fn, scope, override) + +
+    + +
+ +  Object + + + + + delayedListener(eventName, fn, scope, delay) + +
+    + +
+ +  void + + + + + fireEvent() + +
+    + +
+ +  void + + + + + removeListener(eventName, fn, scope) + +
+    + +
+ + + +

+ + + + + + + + + + +
Field Detail
+ + + +

on

+
Object on
+
    + + +
+
+ + + + + + + + + + + + +
+ Constructor Detail +
+ +

+YAHOO.ext.util.Observable

+
YAHOO.ext.util.Observable()
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

addListener

+
void addListener(eventName, fn, scope, override)
+ + + + + + + + + + + +
+ + +

delayedListener

+
Object delayedListener(eventName, fn, scope, delay)
+ + + + + + + + + + + +
+ + +

fireEvent

+
void fireEvent()
+ + + + + + + + + + + +
+ + +

removeListener

+
void removeListener(eventName, fn, scope)
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.ext.util.html b/www/extras/yui-ext/docs/YAHOO.ext.util.html new file mode 100644 index 000000000..83efdcfbe --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.ext.util.html @@ -0,0 +1,160 @@ + + + + + +YAHOO.ext.util + + + + + + +

Class YAHOO.ext.util

+
Object
+   |
+   +--YAHOO.ext.util
+
+ + +
+
+ +
class + YAHOO.ext.util + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Nested Class Summary
+ <static class>YAHOO.ext.util.Bench
+ <static class>YAHOO.ext.util.DelayedTask
+ <static class>YAHOO.ext.util.Observable
+  + + + + + + + + + + + + + + + + + + + +
Field Summary
+ <static>  ObjectConfig +
+   
+   + + + + + + + + + + + +  + + + + + +

+ + + + + + + + + + +
Field Detail
+ + + +

Config

+
<static> Object Config
+
    + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/YAHOO.util.CustomEvent.html b/www/extras/yui-ext/docs/YAHOO.util.CustomEvent.html new file mode 100644 index 000000000..7148f9c78 --- /dev/null +++ b/www/extras/yui-ext/docs/YAHOO.util.CustomEvent.html @@ -0,0 +1,164 @@ + + + + + +YAHOO.util.CustomEvent + + + + + + +

Class YAHOO.util.CustomEvent

+
Object
+   |
+   +--YAHOO.util.CustomEvent
+
+ + +
+
+ +
class + YAHOO.util.CustomEvent + + +
+ +
+ + + + + + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + +
+ Method Summary + + * Parameter types in italic indicate optional parameters + +
+ +  Object + + + + + fireDirect() + +
+    + Enable custom handler signature and event cancelling. +
+ + + +

+ + + + + + + + + + + + + + + + + +


+ + + + + + + + + + + + +
+ Method Detail +
+ + + + +

fireDirect

+
Object fireDirect()
+ +
    Enable custom handler signature and event cancelling. Using fireDirect() instead of fire() calls the subscribed event handlers + with the exact parameters passed to fireDirect, instead of the usual (eventType, args[], obj). IMO this is more intuitive + and promotes cleaner code. Also, if an event handler returns false, it is returned by fireDirect and no other handlers will be called.
    + Example:

    
    + if(beforeUpdateEvent.fireDirect(myArg, myArg2) !== false){
    +     // do update
    + }
+ + + + + + + + + + + +
+ + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/allclasses-frame.html b/www/extras/yui-ext/docs/allclasses-frame.html new file mode 100644 index 000000000..0eeb5b17a --- /dev/null +++ b/www/extras/yui-ext/docs/allclasses-frame.html @@ -0,0 +1,145 @@ + + + + + + All Classes + + + + + + + +
+
All Classes
+
+ + Date + + Function + + YAHOO.ext + + YAHOO.ext.Actor + + YAHOO.ext.Actor.Action + + YAHOO.ext.Actor.AsyncAction + + YAHOO.ext.Actor.PauseAction + + YAHOO.ext.Animator + + YAHOO.ext.Animator.AnimSequence + + YAHOO.ext.Animator.CompositeSequence + + YAHOO.ext.DatePicker + + YAHOO.ext.DomHelper + + YAHOO.ext.DomHelper.Template + + YAHOO.ext.Element + + YAHOO.ext.EventManager + + YAHOO.ext.EventObject + + YAHOO.ext.grid + + YAHOO.ext.grid.AbstractColumnModel + + YAHOO.ext.grid.AbstractDataModel + + YAHOO.ext.grid.CellEditor + + YAHOO.ext.grid.CheckboxEditor + + YAHOO.ext.grid.DateEditor + + YAHOO.ext.grid.DefaultColumnModel + + YAHOO.ext.grid.DefaultDataModel + + YAHOO.ext.grid.DefaultSelectionModel + + YAHOO.ext.grid.DisableSelectionModel + + YAHOO.ext.grid.EditorAndSelectionModel + + YAHOO.ext.grid.EditorSelectionModel + + YAHOO.ext.grid.Grid + + YAHOO.ext.grid.GridDD + + YAHOO.ext.grid.GridView + + YAHOO.ext.grid.HeaderController + + YAHOO.ext.grid.JSONDataModel + + YAHOO.ext.grid.LoadableDataModel + + YAHOO.ext.grid.NumberEditor + + YAHOO.ext.grid.PagedGridView + + YAHOO.ext.grid.SelectEditor + + YAHOO.ext.grid.SingleSelectionModel + + YAHOO.ext.grid.TextEditor + + YAHOO.ext.grid.XMLDataModel + + YAHOO.ext.Resizable + + YAHOO.ext.SplitBar + + YAHOO.ext.SplitBar.AbsoluteLayoutAdapter + + YAHOO.ext.SplitBar.BasicLayoutAdapter + + YAHOO.ext.TabPanel + + YAHOO.ext.TabPanelItem + + YAHOO.ext.Toolbar + + YAHOO.ext.ToolbarButton + + YAHOO.ext.UpdateManager + + YAHOO.ext.UpdateManager.BasicRenderer + + YAHOO.ext.util + + YAHOO.ext.util.Bench + + YAHOO.ext.util.Browser + + YAHOO.ext.util.CSS + + YAHOO.ext.util.DelayedTask + + YAHOO.ext.util.Observable + + YAHOO.util.CustomEvent + +
+
+ + + diff --git a/www/extras/yui-ext/docs/allclasses-noframe.html b/www/extras/yui-ext/docs/allclasses-noframe.html new file mode 100644 index 000000000..5630279eb --- /dev/null +++ b/www/extras/yui-ext/docs/allclasses-noframe.html @@ -0,0 +1,372 @@ + + + + + All Classes + + + + + + + + +

+ +All Classes +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date +
+
Function +
+
YAHOO.ext +
+
YAHOO.ext.Actor +
+
YAHOO.ext.Actor.Action +
+
YAHOO.ext.Actor.AsyncAction +
+
YAHOO.ext.Actor.PauseAction +
+
YAHOO.ext.Animator +
+
YAHOO.ext.Animator.AnimSequence +
+
YAHOO.ext.Animator.CompositeSequence +
+
YAHOO.ext.DatePicker +
+
YAHOO.ext.DomHelper +
+
YAHOO.ext.DomHelper.Template +
+
YAHOO.ext.Element +
+
YAHOO.ext.EventManager +
+
YAHOO.ext.EventObject +
+
YAHOO.ext.grid +
+
YAHOO.ext.grid.AbstractColumnModel +
+
YAHOO.ext.grid.AbstractDataModel +
+
YAHOO.ext.grid.CellEditor +
+
YAHOO.ext.grid.CheckboxEditor +
+
YAHOO.ext.grid.DateEditor +
+
YAHOO.ext.grid.DefaultColumnModel +
+
YAHOO.ext.grid.DefaultDataModel +
+
YAHOO.ext.grid.DefaultSelectionModel +
+
YAHOO.ext.grid.DisableSelectionModel +
+
YAHOO.ext.grid.EditorAndSelectionModel +
+
YAHOO.ext.grid.EditorSelectionModel +
+
YAHOO.ext.grid.Grid +
+
YAHOO.ext.grid.GridDD +
+
YAHOO.ext.grid.GridView +
+
YAHOO.ext.grid.HeaderController +
+
YAHOO.ext.grid.JSONDataModel +
+
YAHOO.ext.grid.LoadableDataModel +
+
YAHOO.ext.grid.NumberEditor +
+
YAHOO.ext.grid.PagedGridView +
+
YAHOO.ext.grid.SelectEditor +
+
YAHOO.ext.grid.SingleSelectionModel +
+
YAHOO.ext.grid.TextEditor +
+
YAHOO.ext.grid.XMLDataModel +
+
YAHOO.ext.Resizable +
+
YAHOO.ext.SplitBar +
+
YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
+
YAHOO.ext.SplitBar.BasicLayoutAdapter +
+
YAHOO.ext.TabPanel +
+
YAHOO.ext.TabPanelItem +
+
YAHOO.ext.Toolbar +
+
YAHOO.ext.ToolbarButton +
+
YAHOO.ext.UpdateManager +
+
YAHOO.ext.UpdateManager.BasicRenderer +
+
YAHOO.ext.util +
+
YAHOO.ext.util.Bench +
+
YAHOO.ext.util.Browser +
+
YAHOO.ext.util.CSS +
+
YAHOO.ext.util.DelayedTask +
+
YAHOO.ext.util.Observable +
+
YAHOO.util.CustomEvent +
+
+ + + diff --git a/www/extras/yui-ext/docs/help-doc.html b/www/extras/yui-ext/docs/help-doc.html new file mode 100644 index 000000000..25a28e4da --- /dev/null +++ b/www/extras/yui-ext/docs/help-doc.html @@ -0,0 +1,160 @@ + + + + + API Help + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Class

+
+ +

+Each class has its own separate page. Each of these pages has three sections consisting of a class description, summary tables, and detailed member descriptions:

    +
  • Class inheritance diagram
  • Direct Subclasses
  • Class declaration
  • Class description +

    +

  • Field Summary
  • Constructor Summary
  • Method Summary +

    +

  • Field Detail
  • Constructor Detail
  • Method Detail
+Each summary entry contains the first sentence from the detailed description for that item.
+ + +

+Index

+
+The Index contains an alphabetic list of all classes, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + +
+ + +
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/index-all.html b/www/extras/yui-ext/docs/index-all.html new file mode 100644 index 000000000..ce71d5cca --- /dev/null +++ b/www/extras/yui-ext/docs/index-all.html @@ -0,0 +1,5321 @@ + + + + + +Index () + + + + + + + + + + + + + + + + + + +
+ + +
+ + +A B C D E F G H I J L M N O P Q R S T U V W X Y +
+ + +

+A

+ +
+
abort() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
activate() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
activate(id) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
activate(row, cell) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
add() - +Instance method in class YAHOO.ext.Toolbar +
  +
+ +
+
add(action) - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
add(sequence) - +Instance method in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
addActor(actor) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
addAsyncCall(fcn, callbackIndex, args, scope) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
addAsyncCall(fcn, callbackIndex, args, scope) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
addAsyncCall(fcn, callbackIndex, args, scope) - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
addButton(config) - +Instance method in class YAHOO.ext.Toolbar +
  +
+ +
+
addCall(fcn, args, scope) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
addCall(fcn, args, scope) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
addCall(fcn, args, scope) - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
addClass - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
addClass(className) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
addHandler(eventName, stopPropagation, handler, scope, override) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
addListener - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
addListener - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
addListener(element, eventName, fn, scope, override) - +Instance method in class YAHOO.ext.EventManager +
  +
+ +
+
addListener(eventName, fn, scope, override) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
addListener(eventName, fn, scope, override) - +Instance method in class YAHOO.ext.util.Observable +
  +
+ +
+
addListener(eventName, handler, scope, override) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
addManagedListener(eventName, fn, scope, override) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
addPostprocessor(columnIndex, fn) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
addPreprocessor(columnIndex, fn) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
addRow(cellValues) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
addRow(id, cellValues) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
addSeparator() - +Instance method in class YAHOO.ext.Toolbar +
  +
+ +
+
addTab(id, text, content) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
addTabItem(item) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
addText(text) - +Instance method in class YAHOO.ext.Toolbar +
  +
+ +
+
adjustForScroll(disableDelay) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
afterPageText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
alignTo - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
alignTo(element, position, offsets, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
allowArrowNav(e) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
allowBlank - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
allowBlank - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
allowBlank - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
allowDecimals - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
allowNegative - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
allowTextSelectionPattern - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
altKey - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
animate - +Instance field in class YAHOO.ext.SplitBar +
  +
+ +
+
animate(args, duration, onComplete, easing, animType) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
animate(args, duration, onComplete, easing, animType) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
appear(duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
append(el, o) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
append(el, values) - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
appendFooter(parentEl) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
appendFooter(parentEl) - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
apply(el, selector) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
applyFirst(el, id, selector) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
applySort(suppressEvent) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
applyTemplate(values) - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
autoBoxAdjust - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
autoOffset(iPageX, iPageY) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
autoSize() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
autoSizeColumn(colIndex, forceMinSize) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
autoSizeColumns - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
autoSizeColumns() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
autoSizeHeaders - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+ +

+B

+ +
+
BACKSPACE - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
baseParams - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
beforeLoad() - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
beforePageText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
beforeUpdate - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
beginMeasure() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
beginSync() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
bindToField(fieldId) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
blankText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
blankText - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
blankText - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
blindHide(anchor, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
blindShow(anchor, newSize, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
bodyEl - +Instance field in class YAHOO.ext.TabPanel +
  +
+ +
+
BOTTOM - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+
bounce() - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
browserEvent - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
buildIndexMap() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
buildInnerCal(dateVal) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
button - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+ +

+C

+ +
+
calcColumnWidth(colIndex, maxRowsToMeasure) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
cancel() - +Instance method in class YAHOO.ext.util.DelayedTask +
  +
+ +
+
cancelTextSelection(e) - +Instance method in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
capture(action) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
capturing - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
clear() - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
clear() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
clear() - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
clearOpacity - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
clearOpacity() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
clearPositioning - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
clearPositioning() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
clearSelections() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
clearSelections() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
clearTime(date) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
clicksToActivateCell - +Instance field in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
clip - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
clip() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
compile() - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
config - +Instance field in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
Config - +Class field in class YAHOO.ext.util +
  +
+ +
+
controlForArrowNavigation - +Instance field in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
createCallback() - +Instance method in class Function +
  +
+ +
+
createDelegate(obj, args, appendArgs) - +Instance method in class Function +
  +
+ +
+
createInterceptor(fcn, scope) - +Instance method in class Function +
  +
+ +
+
createNode(xmlDoc, id, colData) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
createPagingToolbar(container) - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
createSequence(fcn, scope) - +Instance method in class Function +
  +
+ +
+
createTemplate(o) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
ctrlKey - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+ +

+D

+ +
+
Date - + class Date +
  +
+ +
+
dateFormat(format) - +Instance method in class Date +
  +
+ +
+
dayNames - +Class field in class Date +
  +
+ +
+
dayNames - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
ddText - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
decimalPrecision - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
decimalPrecisionFcn - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
decimalSeparator - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
defaultRenderer(value) - +Class method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
defaults - +Class field in class YAHOO.ext.UpdateManager +
  +
+ +
+
defaultSortable - +Instance field in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
defaultUnit - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
defaultUrl - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
defaultWidth - +Instance field in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
delay(delay, newFn, newScope, newArgs) - +Instance method in class YAHOO.ext.util.DelayedTask +
  +
+ +
+
delayedListener(eventName, fn, scope, delay) - +Instance method in class YAHOO.ext.util.Observable +
  +
+ +
+
DELETE - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
deleteRows(dataModel, firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
deselectRange(startRow, endRow) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
deselectRow(row) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
disable() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
disable() - +Instance method in class YAHOO.ext.ToolbarButton +
  +
+ +
+
disableArrowNavigation - +Instance field in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
disableCaching - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
disabledDates - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
disabledDatesRE - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
disabledDatesText - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
disabledDatesText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
disabledDays - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
disabledDays - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
disabledDaysText - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
disabledDaysText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
disableTab(id) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
DISPLAY - +Class field in class YAHOO.ext.Element +
  +
+ +
+
DOWN - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
dropOut(duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+ +

+E

+ +
+
EditorGrid(container, dataModel, colModel) - +Class method in class YAHOO.ext.grid +
  +
+ +
+
el - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
el - +Instance field in class YAHOO.ext.TabPanel +
  +
+ +
+
el - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
enable() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
enable() - +Instance method in class YAHOO.ext.ToolbarButton +
  +
+ +
+
enableDisplayMode - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
enableDisplayMode() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
enableDragDrop - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
enableTab(id) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
END - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
endDrag(e) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
endMeasure() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
endSync() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
ensureVisible(row, disableDelay) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
ESC - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
events - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
events - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+ +

+F

+ +
+
F5 - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
fade(duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
filter(query) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
findTarget(className, tagName) - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
fireCellUpdated(row, col) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireDirect() - +Instance method in class YAHOO.util.CustomEvent +
  +
+ +
+
fireEvent - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireEvent - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
fireEvent() - +Instance method in class YAHOO.ext.util.Observable +
  +
+ +
+
fireHeaderChange(colIndex, newHeader) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
fireHiddenChange(colIndex, hidden) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
fireLoadEvent() - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
fireLoadException(e, responseObj) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
fireRowsDeleted(firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireRowsInserted(firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireRowsSorted(sortColumnIndex, sortDir, noRefresh) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireRowsUpdated(firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireScroll(scrollLeft, scrollTop) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
fireTableDataChanged() - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
fireWidthChange(colIndex, newWidth) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
firstText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
fitToCell(box) - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
fitToCell(box) - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
fitToCell(box) - +Instance method in class YAHOO.ext.grid.SelectEditor +
  +
+ +
+
fixPrecision(value) - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
focus - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
focus() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
focusRow(row) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
focusRow(row) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
forceScrollUpdate() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
format - +Instance field in class Date +
  +
+ +
+
format - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
format - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
formatDate(date) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
formUpdate(form, url, reset, callback) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
formUpdateDelegate - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
Function - + class Function +
  +
+ +
+ +

+G

+ +
+
get(el, autoGenerateId) - +Class method in class YAHOO.ext.Element +
  +
+ +
+
getActiveTab() - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
getAdapter() - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
getBodyTable() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getBorderWidth(side) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getBottom() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getBox(contentBox) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getCellAfter(cell, includeHidden) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getCellAtPoint(x, y) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getCellBefore(cell, includeHidden) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getCellEditor(colIndex, rowIndex) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getCellFromChild(childEl) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getCenterXY(offsetScroll) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getCharCode() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getChildrenByClassName(className, tagName) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getChildrenByTagName(tagName) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getColumnCount() - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getColumnCount() - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getColumnHeader(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getColumnHeader(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getColumnIndexByDataIndex(dataIndex) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getColumnModel() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getColumnRenderers() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getColumnWidth(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getColumnWidth(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getCount() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
getDataIndex(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getDataIndexes() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getDataModel() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getDayOfYear() - +Instance method in class Date +
  +
+ +
+
getDaysInMonth() - +Instance method in class Date +
  +
+ +
+
getDaysInMonth(m, y) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
getDocument() - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
getDragDropText() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getEditorCellAfter(cell, spanRows) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
getEditorCellBefore(cell, spanRows) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
getEl() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
getElapsed(key) - +Instance method in class YAHOO.ext.util.Bench +
  +
+ +
+
getElementSize(s) - +Instance method in class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
getElementSize(s) - +Instance method in class YAHOO.ext.SplitBar.BasicLayoutAdapter +
  +
+ +
+
getFirstCell(row, includeHidden) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getFirstDayOfMonth() - +Instance method in class Date +
  +
+ +
+
getGMTOffset() - +Instance method in class Date +
  +
+ +
+
getHeaderFromChild(childEl) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getHeight() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getLastCell(row, includeHidden) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getLastDayOfMonth() - +Instance method in class Date +
  +
+ +
+
getLeft() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getMaximumSize() - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
getMinimumSize() - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
getNamedValue(node, name, defaultValue) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
getNextMonth(d) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
getNode(rowIndex) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
getPadding(side) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getPageSize() - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
getPageToolbar() - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
getPageX() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getPageY() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getPositioning() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getPostprocessor(columnIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
getPreprocessor(columnIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
getPrevMonth(d) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
getRegion() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getRelatedTarget() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getRenderer() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
getRenderer(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getRenderer(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getRight() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getRow(index) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getRow(rowIndex) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
getRowAfter(row) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getRowBefore(row) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getRowCount() - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
getRowCount() - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
getRowFromChild(childEl) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getRowHeight() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
getRowId(rowIndex) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
getRowId(rowIndex) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
getRowId(rowIndex) - +Instance method in class YAHOO.ext.grid.JSONDataModel +
  +
+ +
+
getRowId(rowIndex) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
getRows(indexes) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
getRowsById(id) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getRule(selector, refreshCache) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
getRules(refreshCache) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
getSelectedDate() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
getSelectedRow() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectedRowId() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectedRowIds() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
getSelectedRowIds() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectedRowIndex() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectedRowIndexes() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectedRows() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
getSelectedRows() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectionCount() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSelectionModel() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getSize() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getSortState() - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
getSortType(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getSortType(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getStyle(name) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getTab(id) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
getTarget() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getTime() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getTimezone() - +Instance method in class Date +
  +
+ +
+
getTop() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getTotalPages() - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
getTotalRowCount() - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
getTotalRowCount() - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
getTotalWidth() - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
getTotalWidth(includeHidden) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
getUpdateManager() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getUpdateManager() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
getValue() - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
getValue() - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
getValue() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
getValue() - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
getValue() - +Instance method in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
getValueAt(rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
getValueAt(rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
getView() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
getWeekOfYear() - +Instance method in class Date +
  +
+ +
+
getWheelDelta() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getWidth() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getX() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getXY() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
getXY() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
getY() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+ +

+H

+ +
+
handleClick(e) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
handleClick(e) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
handleHiddenChange(colModel, colIndex, hidden) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
handleKeyDown(e) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
handleMouseDown(e) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
handleMouseDown(e) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
handleMouseDown(e) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
handleMouseWheel(e) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
handleScroll() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
handleSelection(date) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
handleSort(dataModel, sortColumnIndex, sortDir, noRefresh) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
hasClass(className) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
hasModifier() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
hasSelection() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
hasSelection() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
headerClick(e) - +Instance method in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
headerOut(e) - +Instance method in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
headerOver(e) - +Instance method in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
hide - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
hide() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
hide() - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
hide() - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
hide() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
hide() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
hide(animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
hideColumn(colIndex) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
highlight(color, fromColor, duration, attribute) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
HOME - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
HORIZONTAL - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+ +

+I

+ +
+
id - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
ieDeferSrc - +Instance field in class YAHOO.ext.EventManager +
  +
+ +
+
indicatorText - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
init(grid) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
init(grid, bodyElement, callback) - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
init(grid, bodyElement, callback) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
init(s) - +Instance method in class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
init(s) - +Instance method in class YAHOO.ext.SplitBar.BasicLayoutAdapter +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.DisableSelectionModel +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.EditorAndSelectionModel +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
initEvents() - +Instance method in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
initPaging(url, pageSize, baseParams) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
insertAfter(el, o) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
insertAfter(el, values) - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
insertBefore(el, o) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
insertBefore(el, values) - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
insertHtml(where, el, html) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
insertRow(index, cellValues) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
insertRow(index, id, cellValues) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
insertRows(dataModel, firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
invalidText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
isBorderBox() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
isCapturing(actor) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
isCellEditable(colIndex, rowIndex) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
isDisabled() - +Instance method in class YAHOO.ext.ToolbarButton +
  +
+ +
+
isGecko - +Instance field in class YAHOO.ext.util.Browser +
  +
+ +
+
isHidden(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
isHidden(colIndex) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
isIE - +Instance field in class YAHOO.ext.util.Browser +
  +
+ +
+
isIE7 - +Instance field in class YAHOO.ext.util.Browser +
  +
+ +
+
isLeapYear() - +Instance method in class Date +
  +
+ +
+
isLeapYear(y) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
isLocked() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
isOpera - +Instance field in class YAHOO.ext.util.Browser +
  +
+ +
+
isPaged() - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
isPaged() - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
isPlaying() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
isPlaying() - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
isPlaying() - +Instance method in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
isSafari - +Instance field in class YAHOO.ext.util.Browser +
  +
+ +
+
isSelectable(row) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
isSelected(row) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
isSortable(col) - +Instance method in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
isSortable(col) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
isUpdating() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
isVisible(deep) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+ +

+J

+ +
+
JSON - +Class field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+ +

+L

+ +
+
lastKey - +Instance field in class YAHOO.ext.util.Bench +
  +
+ +
+
lastText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
LEFT - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
LEFT - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+
load(url, params, callback, insertIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
loadData(data, callback, keepExisting) - +Instance method in class YAHOO.ext.grid.JSONDataModel +
  +
+ +
+
loadData(data, callback, keepExisting, insertIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
loadData(doc, callback, keepExisting, insertIndex) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
loadedPage - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
loadPage(pageNum, callback, keepExisting) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
loadScripts - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
lock() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
locked - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+ +

+M

+ +
+
maxDate - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
maxLength - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
maxRowsToMeasure - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
maxSize - +Instance field in class YAHOO.ext.SplitBar +
  +
+ +
+
maxText - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
maxText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
maxText - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
maxText - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
maxValue - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
maxValue - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
minColumnWidth - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
minDate - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
minLength - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
minSize - +Instance field in class YAHOO.ext.SplitBar +
  +
+ +
+
minText - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
minText - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
minText - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
minText - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
minValue - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
minValue - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
mon(eventName, fn, scope, override) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
monthNames - +Class field in class Date +
  +
+ +
+
monthNames - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
move - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
move(direction, distance, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
moveIn(anchor, to, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
moveOut(anchor, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
moveSplitter(s) - +Instance method in class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
moveTo - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
moveTo(x, y, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+ +

+N

+ +
+
nanText - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
next() - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
nextText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+ +

+O

+ +
+
on - +Instance field in class YAHOO.ext.util.Observable +
  +
+ +
+
on(element, eventName, fn, scope, override) - +Instance method in class YAHOO.ext.EventManager +
  +
+ +
+
on(eventName, fn, scope, override) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
on(eventName, handler, scope, override) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
onCapture - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
onCellClick(grid, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
onCellDblClick(grid, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.EditorAndSelectionModel +
  +
+ +
+
onCellDblClick(grid, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
onCellUpdated - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onClick(which) - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
onColumnSplitterMoved(splitter, newSize) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
onDocumentReady(fn, scope, override) - +Instance method in class YAHOO.ext.EventManager +
  +
+ +
+
onDragDrop(e, id) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
onDragEnter(e, id) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
onDragOut(e, id) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
onDragOver(e, id) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
onEnter(e) - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
onFailure - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
onHeaderChange - +Instance field in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
onHiddenChange - +Instance field in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
onLoad - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
onLoadException - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
onMoved - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
onMoved - +Instance field in class YAHOO.ext.SplitBar +
  +
+ +
+
onPageLoaded(pageNum, totalPages) - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
onResized - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
onRowsDeleted - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onRowSelect - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
onRowsInserted - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onRowsSorted - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onRowsUpdated - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onScroll - +Instance field in class YAHOO.ext.grid.GridView +
  +
+ +
+
onSelectionChange - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
onTabChange - +Instance field in class YAHOO.ext.TabPanel +
  +
+ +
+
onTableDataChanged - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
onUpdate - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
onVisibilityChanged - +Instance field in class YAHOO.ext.Element +
  +
+ +
+
onWidthChange - +Instance field in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
overwrite(el, o) - +Instance method in class YAHOO.ext.DomHelper +
  +
+ +
+
overwrite(el, values) - +Instance method in class YAHOO.ext.DomHelper.Template +
  +
+ +
+ +

+P

+ +
+
PAGEDOWN - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
pageSize - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
PAGEUP - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
pageUrl - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
paramMap - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
parseDate(input, format) - +Class method in class Date +
  +
+ +
+
parseDate(value) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
parseValue(value) - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
pause(seconds) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
pause(seconds) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
pause(seconds) - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
play(oncomplete) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
play(onComplete) - +Instance method in class YAHOO.ext.Actor.Action +
  +
+ +
+
play(onComplete) - +Instance method in class YAHOO.ext.Actor.AsyncAction +
  +
+ +
+
play(onComplete) - +Instance method in class YAHOO.ext.Actor.PauseAction +
  +
+ +
+
play(oncomplete) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
play(oncomplete) - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
play(onComplete) - +Instance method in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
playlist - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
preventDefault() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
prevText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
pulsate(count, duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+ +

+Q

+ +
+
query(spec, returnUnmatched) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+ +

+R

+ +
+
radioClass(className) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
readField() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
refresh() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
refresh(callback) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
refreshDelegate - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
refreshText - +Instance field in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
regex - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
regexText - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
register(header) - +Instance method in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
remoteSort - +Instance field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
removeAllListeners() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
removeClass - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
removeClass(className) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
removeListener - +Instance field in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
removeListener - +Instance field in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
removeListener(element, eventName, wrappedFn) - +Instance method in class YAHOO.ext.EventManager +
  +
+ +
+
removeListener(eventName, fn, scope) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
removeListener(eventName, fn, scope) - +Instance method in class YAHOO.ext.util.Observable +
  +
+ +
+
removeListener(eventName, handler) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
removePostprocessor(columnIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
removePreprocessor(columnIndex) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
removeRow(index) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
removeRow(index) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
removeTab(id) - +Instance method in class YAHOO.ext.TabPanel +
  +
+ +
+
render() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
render() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
render() - +Instance method in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
render(el, response, updateManager) - +Instance method in class YAHOO.ext.UpdateManager.BasicRenderer +
  +
+ +
+
renderer - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
renderRow(dataModel, row, rowIndex, colCount, renderers, dindexes) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
renderRows(dataModel) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
replaceClass - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
replaceClass(oldClassName, newClassName) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
RETURN - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
revert(el, selector) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
revertFirst(el, id, selector) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
RIGHT - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
RIGHT - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+ +

+S

+ +
+
scrollbarMode - +Instance field in class YAHOO.ext.grid.GridView +
  +
+ +
+
SCROLLBARS_OVERLAP - +Class field in class YAHOO.ext.grid.GridView +
  +
+ +
+
SCROLLBARS_UNDER - +Class field in class YAHOO.ext.grid.GridView +
  +
+ +
+
scrollTo(row) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
selectAll() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectAll() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
selectFirstRow() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectNext(keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectOnFocus - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
selectOnFocus - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
selectPrevious(keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectRange(startRow, endRow, keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectRow(row, keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectRows(rows, keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectRowsById(id, keepExisting) - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
selectToday() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
setAbsolutePositioned - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setAbsolutePositioned(zIndex) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setAdapter(adapter) - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
setBottom(bottom) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setBounds - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setBounds(x, y, width, height, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setBox(box, adjust, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setCellValue(value, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
setColumnHeader(col, header) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setColumnWidth(col, width, suppressEvent) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setContent(content) - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
setCSSWidth(colIndex, width, pos) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
setCurrentSize(size) - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
setDataIndex(col, dataIndex) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setDefaultSort(columnModel, columnIndex, direction) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
setDefaultUrl(defaultUrl) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
setDisabled(disabled) - +Instance method in class YAHOO.ext.ToolbarButton +
  +
+ +
+
setDropStatus(dropStatus) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
setEditable(col, editable) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setEditor(col, editor) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setElementSize(s, newSize, onComplete) - +Instance method in class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
setElementSize(s, newSize, onComplete) - +Instance method in class YAHOO.ext.SplitBar.BasicLayoutAdapter +
  +
+ +
+
setHeight - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setHeight(height, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setHidden(colIndex, hidden) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setLeft - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setLeft(left) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setLocation - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setLocation(x, y, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setMaximumSize(maxSize) - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
setMinimumSize(minSize) - +Instance method in class YAHOO.ext.SplitBar +
  +
+ +
+
setNamedValue(node, name, value) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
setOpacity - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setOpacity(opacity, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setPositioning - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setPositioning(positionCfg) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setRegion(region, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setRelativePositioned - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setRelativePositioned(zIndex) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setRenderer(col, fn) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setRenderer(renderer) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
setRight(right) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setSelectedDate(date) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
setSize - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setSize(width, height, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setSortType(col, fn) - +Instance method in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
setStyle - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setStyle(name, value) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setText(text) - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
setTop - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setTop(top) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setUrl(url, params, loadOnce) - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
setValue(value) - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
setValue(value) - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
setValue(value) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
setValueAt(value, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
setValueAt(value, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
setValueAt(value, rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
setVisibilityMode - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setVisibilityMode(visMode) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setVisible - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setVisible(visible, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setWidth - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setWidth(width, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setX - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setX(x) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setXY - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setXY(pos, animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
setY - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
setY(y) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
shake() - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
shiftKey - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
show - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.TabPanelItem +
  +
+ +
+
show() - +Instance method in class YAHOO.ext.util.Bench +
  +
+ +
+
show(animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
show(x, y, value, callback) - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
showCalendar(value) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
showLoadIndicator - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
showLoading() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
showNextMonth() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
showNextYear() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
showPrevMonth() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
showPrevYear() - +Instance method in class YAHOO.ext.DatePicker +
  +
+ +
+
slideHide(anchor, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
slideShow(anchor, newSize, duration, easing) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
sort(columnModel, columnIndex, direction, suppressEvent) - +Instance method in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
sort(columnModel, columnIndex, direction, suppressEvent) - +Instance method in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
sort(columnModel, columnIndex, direction, suppressEvent) - +Instance method in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
sortTypes - +Class field in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
SPACE - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
squish(duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
sslBlankUrl - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
start(key) - +Instance method in class YAHOO.ext.util.Bench +
  +
+ +
+
startAutoRefresh(interval, url, params, callback, refreshNow) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
startCapture() - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
startCapture(clearPlaylist) - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
startDrag(e) - +Instance method in class YAHOO.ext.grid.GridDD +
  +
+ +
+
startEditing(rowIndex, colIndex) - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
startEditing(value, row, cell) - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
startEditing(value, row, cell) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
stop() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
stop() - +Instance method in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
stop() - +Instance method in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
stop(key) - +Instance method in class YAHOO.ext.util.Bench +
  +
+ +
+
stopAutoRefresh() - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
stopCapture() - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
stopCapture() - +Instance method in class YAHOO.ext.Animator +
  +
+ +
+
stopEditing() - +Instance method in class YAHOO.ext.grid.Grid +
  +
+ +
+
stopEditing(focusCell) - +Instance method in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
stopEditing(focusCell) - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
stopEvent() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
stopPropagation() - +Instance method in class YAHOO.ext.EventObject +
  +
+ +
+
Strict - +Class field in class YAHOO.ext +
  +
+ +
+
stripeRows - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
switchOff(duration) - +Instance method in class YAHOO.ext.Actor +
  +
+ +
+
syncScroll() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+ +

+T

+ +
+
TAB - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
TEXT - +Class field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
timeout - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
timers - +Instance field in class YAHOO.ext.util.Bench +
  +
+ +
+
todayText - +Instance field in class YAHOO.ext.DatePicker +
  +
+ +
+
toggle - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
toggle(animate, duration, onComplete, easing) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
toggleClass(className) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
TOP - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+
toString(html) - +Instance method in class YAHOO.ext.util.Bench +
  +
+ +
+
trackCompletion() - +Instance method in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
trackMouseOver - +Instance field in class YAHOO.ext.grid.Grid +
  +
+ +
+
transaction - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+ +

+U

+ +
+
unclip - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
unclip() - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
unhideColumn(colIndex) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
unlock() - +Instance method in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
UP - +Instance field in class YAHOO.ext.EventObject +
  +
+ +
+
update - +Instance field in class YAHOO.ext.Actor +
  +
+ +
+
update(html, loadScripts) - +Instance method in class YAHOO.ext.Element +
  +
+ +
+
update(url, params, callback, discardUrl) - +Instance method in class YAHOO.ext.UpdateManager +
  +
+ +
+
updateBodyHeight() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateCell(dataModel, rowIndex, dataIndex) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateColumns() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateDelegate - +Instance field in class YAHOO.ext.UpdateManager +
  +
+ +
+
updateHeaders() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateHeaderSortState() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateRowIndexes(firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateRows(dataModel, firstRow, lastRow) - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
updateRule(selector, property, value) - +Instance method in class YAHOO.ext.util.CSS +
  +
+ +
+
updateWrapHeight() - +Instance method in class YAHOO.ext.grid.GridView +
  +
+ +
+
useDom - +Instance field in class YAHOO.ext.DomHelper +
  +
+ +
+
useShim - +Instance field in class YAHOO.ext.SplitBar +
  +
+ +
+ +

+V

+ +
+
validate() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
validate() - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
validate() - +Instance method in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
validationDelay - +Instance field in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
validationDelay - +Instance field in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
validationDelay - +Instance field in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
validator() - +Instance method in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
validator() - +Instance method in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
validator() - +Instance method in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
VERTICAL - +Class field in class YAHOO.ext.SplitBar +
  +
+ +
+
VISIBILITY - +Class field in class YAHOO.ext.Element +
  +
+ +
+ +

+W

+ +
+
wrap(fn, scope, override) - +Instance method in class YAHOO.ext.EventManager +
  +
+ +
+ +

+X

+ +
+
XML - +Class field in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
xml - +Instance field in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+ +

+Y

+ +
+
YAHOO.ext - + class YAHOO.ext +
  +
+ +
+
YAHOO.ext.Actor - + class YAHOO.ext.Actor +
  +
+ +
+
YAHOO.ext.Actor(element, animator, selfCapture) - +Constructor in class YAHOO.ext.Actor +
  +
+ +
+
YAHOO.ext.Actor.Action - + class YAHOO.ext.Actor.Action +
  +
+ +
+
YAHOO.ext.Actor.Action(actor, method, args) - +Constructor in class YAHOO.ext.Actor.Action +
  +
+ +
+
YAHOO.ext.Actor.AsyncAction - + class YAHOO.ext.Actor.AsyncAction +
  +
+ +
+
YAHOO.ext.Actor.AsyncAction(actor, method, args, onIndex) - +Constructor in class YAHOO.ext.Actor.AsyncAction +
  +
+ +
+
YAHOO.ext.Actor.PauseAction - + class YAHOO.ext.Actor.PauseAction +
  +
+ +
+
YAHOO.ext.Actor.PauseAction(seconds) - +Constructor in class YAHOO.ext.Actor.PauseAction +
  +
+ +
+
YAHOO.ext.Animator - + class YAHOO.ext.Animator +
  +
+ +
+
YAHOO.ext.Animator() - +Constructor in class YAHOO.ext.Animator +
  +
+ +
+
YAHOO.ext.Animator.AnimSequence - + class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
YAHOO.ext.Animator.AnimSequence() - +Constructor in class YAHOO.ext.Animator.AnimSequence +
  +
+ +
+
YAHOO.ext.Animator.CompositeSequence - + class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
YAHOO.ext.Animator.CompositeSequence() - +Constructor in class YAHOO.ext.Animator.CompositeSequence +
  +
+ +
+
YAHOO.ext.DatePicker - + class YAHOO.ext.DatePicker +
  +
+ +
+
YAHOO.ext.DatePicker(id, parentElement) - +Constructor in class YAHOO.ext.DatePicker +
  +
+ +
+
YAHOO.ext.DomHelper - + class YAHOO.ext.DomHelper +
  +
+ +
+
YAHOO.ext.DomHelper.Template - + class YAHOO.ext.DomHelper.Template +
  +
+ +
+
YAHOO.ext.DomHelper.Template(html) - +Constructor in class YAHOO.ext.DomHelper.Template +
  +
+ +
+
YAHOO.ext.Element - + class YAHOO.ext.Element +
  +
+ +
+
YAHOO.ext.Element(elementId, forceNew) - +Constructor in class YAHOO.ext.Element +
  +
+ +
+
YAHOO.ext.EventManager - + class YAHOO.ext.EventManager +
  +
+ +
+
YAHOO.ext.EventObject - + class YAHOO.ext.EventObject +
  +
+ +
+
YAHOO.ext.grid - + class YAHOO.ext.grid +
  +
+ +
+
YAHOO.ext.grid.AbstractColumnModel - + class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
YAHOO.ext.grid.AbstractColumnModel() - +Constructor in class YAHOO.ext.grid.AbstractColumnModel +
  +
+ +
+
YAHOO.ext.grid.AbstractDataModel - + class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
YAHOO.ext.grid.AbstractDataModel() - +Constructor in class YAHOO.ext.grid.AbstractDataModel +
  +
+ +
+
YAHOO.ext.grid.CellEditor - + class YAHOO.ext.grid.CellEditor +
  +
+ +
+
YAHOO.ext.grid.CellEditor(element) - +Constructor in class YAHOO.ext.grid.CellEditor +
  +
+ +
+
YAHOO.ext.grid.CheckboxEditor - + class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
YAHOO.ext.grid.CheckboxEditor() - +Constructor in class YAHOO.ext.grid.CheckboxEditor +
  +
+ +
+
YAHOO.ext.grid.DateEditor - + class YAHOO.ext.grid.DateEditor +
  +
+ +
+
YAHOO.ext.grid.DateEditor(config) - +Constructor in class YAHOO.ext.grid.DateEditor +
  +
+ +
+
YAHOO.ext.grid.DefaultColumnModel - + class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
YAHOO.ext.grid.DefaultColumnModel(config) - +Constructor in class YAHOO.ext.grid.DefaultColumnModel +
  +
+ +
+
YAHOO.ext.grid.DefaultDataModel - + class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
YAHOO.ext.grid.DefaultDataModel(data) - +Constructor in class YAHOO.ext.grid.DefaultDataModel +
  +
+ +
+
YAHOO.ext.grid.DefaultSelectionModel - + class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
YAHOO.ext.grid.DefaultSelectionModel() - +Constructor in class YAHOO.ext.grid.DefaultSelectionModel +
  +
+ +
+
YAHOO.ext.grid.DisableSelectionModel - + class YAHOO.ext.grid.DisableSelectionModel +
  +
+ +
+
YAHOO.ext.grid.DisableSelectionModel() - +Constructor in class YAHOO.ext.grid.DisableSelectionModel +
  +
+ +
+
YAHOO.ext.grid.EditorAndSelectionModel - + class YAHOO.ext.grid.EditorAndSelectionModel +
  +
+ +
+
YAHOO.ext.grid.EditorAndSelectionModel() - +Constructor in class YAHOO.ext.grid.EditorAndSelectionModel +
  +
+ +
+
YAHOO.ext.grid.EditorSelectionModel - + class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
YAHOO.ext.grid.EditorSelectionModel() - +Constructor in class YAHOO.ext.grid.EditorSelectionModel +
  +
+ +
+
YAHOO.ext.grid.Grid - + class YAHOO.ext.grid.Grid +
  +
+ +
+
YAHOO.ext.grid.Grid(container, dataModel, colModel, selectionModel) - +Constructor in class YAHOO.ext.grid.Grid +
  +
+ +
+
YAHOO.ext.grid.GridDD - + class YAHOO.ext.grid.GridDD +
  +
+ +
+
YAHOO.ext.grid.GridDD(grid, bwrap) - +Constructor in class YAHOO.ext.grid.GridDD +
  +
+ +
+
YAHOO.ext.grid.GridView - + class YAHOO.ext.grid.GridView +
  +
+ +
+
YAHOO.ext.grid.GridView() - +Constructor in class YAHOO.ext.grid.GridView +
  +
+ +
+
YAHOO.ext.grid.HeaderController - + class YAHOO.ext.grid.HeaderController +
  +
+ +
+
YAHOO.ext.grid.HeaderController(grid) - +Constructor in class YAHOO.ext.grid.HeaderController +
  +
+ +
+
YAHOO.ext.grid.JSONDataModel - + class YAHOO.ext.grid.JSONDataModel +
  +
+ +
+
YAHOO.ext.grid.JSONDataModel(schema) - +Constructor in class YAHOO.ext.grid.JSONDataModel +
  +
+ +
+
YAHOO.ext.grid.LoadableDataModel - + class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
YAHOO.ext.grid.LoadableDataModel(dataType) - +Constructor in class YAHOO.ext.grid.LoadableDataModel +
  +
+ +
+
YAHOO.ext.grid.NumberEditor - + class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
YAHOO.ext.grid.NumberEditor(config) - +Constructor in class YAHOO.ext.grid.NumberEditor +
  +
+ +
+
YAHOO.ext.grid.PagedGridView - + class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
YAHOO.ext.grid.PagedGridView() - +Constructor in class YAHOO.ext.grid.PagedGridView +
  +
+ +
+
YAHOO.ext.grid.SelectEditor - + class YAHOO.ext.grid.SelectEditor +
  +
+ +
+
YAHOO.ext.grid.SelectEditor(element) - +Constructor in class YAHOO.ext.grid.SelectEditor +
  +
+ +
+
YAHOO.ext.grid.SingleSelectionModel - + class YAHOO.ext.grid.SingleSelectionModel +
  +
+ +
+
YAHOO.ext.grid.SingleSelectionModel() - +Constructor in class YAHOO.ext.grid.SingleSelectionModel +
  +
+ +
+
YAHOO.ext.grid.TextEditor - + class YAHOO.ext.grid.TextEditor +
  +
+ +
+
YAHOO.ext.grid.TextEditor(config) - +Constructor in class YAHOO.ext.grid.TextEditor +
  +
+ +
+
YAHOO.ext.grid.XMLDataModel - + class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
YAHOO.ext.grid.XMLDataModel(schema, xml) - +Constructor in class YAHOO.ext.grid.XMLDataModel +
  +
+ +
+
YAHOO.ext.Resizable - + class YAHOO.ext.Resizable +
  +
+ +
+
YAHOO.ext.Resizable(el, config) - +Constructor in class YAHOO.ext.Resizable +
  +
+ +
+
YAHOO.ext.SplitBar - + class YAHOO.ext.SplitBar +
  +
+ +
+
YAHOO.ext.SplitBar(dragElement, resizingElement, orientation, placement) - +Constructor in class YAHOO.ext.SplitBar +
  +
+ +
+
YAHOO.ext.SplitBar.AbsoluteLayoutAdapter - + class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
YAHOO.ext.SplitBar.AbsoluteLayoutAdapter(container) - +Constructor in class YAHOO.ext.SplitBar.AbsoluteLayoutAdapter +
  +
+ +
+
YAHOO.ext.SplitBar.BasicLayoutAdapter - + class YAHOO.ext.SplitBar.BasicLayoutAdapter +
  +
+ +
+
YAHOO.ext.SplitBar.BasicLayoutAdapter() - +Constructor in class YAHOO.ext.SplitBar.BasicLayoutAdapter +
  +
+ +
+
YAHOO.ext.TabPanel - + class YAHOO.ext.TabPanel +
  +
+ +
+
YAHOO.ext.TabPanel(container) - +Constructor in class YAHOO.ext.TabPanel +
  +
+ +
+
YAHOO.ext.TabPanelItem - + class YAHOO.ext.TabPanelItem +
  +
+ +
+
YAHOO.ext.TabPanelItem(tabPanel, id, text) - +Constructor in class YAHOO.ext.TabPanelItem +
  +
+ +
+
YAHOO.ext.Toolbar - + class YAHOO.ext.Toolbar +
  +
+ +
+
YAHOO.ext.Toolbar(container) - +Constructor in class YAHOO.ext.Toolbar +
  +
+ +
+
YAHOO.ext.ToolbarButton - + class YAHOO.ext.ToolbarButton +
  +
+ +
+
YAHOO.ext.ToolbarButton(config) - +Constructor in class YAHOO.ext.ToolbarButton +
  +
+ +
+
YAHOO.ext.UpdateManager - + class YAHOO.ext.UpdateManager +
  +
+ +
+
YAHOO.ext.UpdateManager(el, forceNew) - +Constructor in class YAHOO.ext.UpdateManager +
  +
+ +
+
YAHOO.ext.UpdateManager.BasicRenderer - + class YAHOO.ext.UpdateManager.BasicRenderer +
  +
+ +
+
YAHOO.ext.UpdateManager.BasicRenderer() - +Constructor in class YAHOO.ext.UpdateManager.BasicRenderer +
  +
+ +
+
YAHOO.ext.util - + class YAHOO.ext.util +
  +
+ +
+
YAHOO.ext.util.Bench - + class YAHOO.ext.util.Bench +
  +
+ +
+
YAHOO.ext.util.Bench() - +Constructor in class YAHOO.ext.util.Bench +
  +
+ +
+
YAHOO.ext.util.Browser - + class YAHOO.ext.util.Browser +
  +
+ +
+
YAHOO.ext.util.CSS - + class YAHOO.ext.util.CSS +
  +
+ +
+
YAHOO.ext.util.DelayedTask - + class YAHOO.ext.util.DelayedTask +
  +
+ +
+
YAHOO.ext.util.DelayedTask(fn, scope, args) - +Constructor in class YAHOO.ext.util.DelayedTask +
  +
+ +
+
YAHOO.ext.util.Observable - + class YAHOO.ext.util.Observable +
  +
+ +
+
YAHOO.ext.util.Observable() - +Constructor in class YAHOO.ext.util.Observable +
  +
+ +
+
YAHOO.util.CustomEvent - + class YAHOO.util.CustomEvent +
  +
+ +
+ +A B C D E F G H I J L M N O P Q R S T U V W X Y + + + + + + + + + + + + + + +
+ + +
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/index.html b/www/extras/yui-ext/docs/index.html new file mode 100644 index 000000000..636779a06 --- /dev/null +++ b/www/extras/yui-ext/docs/index.html @@ -0,0 +1,27 @@ + + + + +Generated Javascript Documentation + + + + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to <A HREF="allclasses-frame.html">Non-frame version.</A> + diff --git a/www/extras/yui-ext/docs/overview-AbstractColumnModel.js.html b/www/extras/yui-ext/docs/overview-AbstractColumnModel.js.html new file mode 100644 index 000000000..c2fbbae0b --- /dev/null +++ b/www/extras/yui-ext/docs/overview-AbstractColumnModel.js.html @@ -0,0 +1,34 @@ + + + + + + AbstractColumnModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-AbstractDataModel.js.html b/www/extras/yui-ext/docs/overview-AbstractDataModel.js.html new file mode 100644 index 000000000..50372e229 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-AbstractDataModel.js.html @@ -0,0 +1,34 @@ + + + + + + AbstractDataModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-Actor.js.html b/www/extras/yui-ext/docs/overview-Actor.js.html new file mode 100644 index 000000000..712219794 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Actor.js.html @@ -0,0 +1,40 @@ + + + + + + Actor.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-Animator.js.html b/www/extras/yui-ext/docs/overview-Animator.js.html new file mode 100644 index 000000000..5741e9a6a --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Animator.js.html @@ -0,0 +1,38 @@ + + + + + + Animator.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-CellEditor.js.html b/www/extras/yui-ext/docs/overview-CellEditor.js.html new file mode 100644 index 000000000..bce1667f8 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-CellEditor.js.html @@ -0,0 +1,34 @@ + + + + + + CellEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-CheckboxEditor.js.html b/www/extras/yui-ext/docs/overview-CheckboxEditor.js.html new file mode 100644 index 000000000..9cb09c8a7 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-CheckboxEditor.js.html @@ -0,0 +1,34 @@ + + + + + + CheckboxEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-DateEditor.js.html b/www/extras/yui-ext/docs/overview-DateEditor.js.html new file mode 100644 index 000000000..252289984 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-DateEditor.js.html @@ -0,0 +1,34 @@ + + + + + + DateEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-DatePicker.js.html b/www/extras/yui-ext/docs/overview-DatePicker.js.html new file mode 100644 index 000000000..8be5afdb7 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-DatePicker.js.html @@ -0,0 +1,34 @@ + + + + + + DatePicker.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-DefaultColumnModel.js.html b/www/extras/yui-ext/docs/overview-DefaultColumnModel.js.html new file mode 100644 index 000000000..ca5d2ec27 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-DefaultColumnModel.js.html @@ -0,0 +1,34 @@ + + + + + + DefaultColumnModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-DefaultDataModel.js.html b/www/extras/yui-ext/docs/overview-DefaultDataModel.js.html new file mode 100644 index 000000000..6ee14c8ec --- /dev/null +++ b/www/extras/yui-ext/docs/overview-DefaultDataModel.js.html @@ -0,0 +1,34 @@ + + + + + + DefaultDataModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-DomHelper.js.html b/www/extras/yui-ext/docs/overview-DomHelper.js.html new file mode 100644 index 000000000..889ccf223 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-DomHelper.js.html @@ -0,0 +1,34 @@ + + + + + + DomHelper.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-EditorGrid.js.html b/www/extras/yui-ext/docs/overview-EditorGrid.js.html new file mode 100644 index 000000000..ad1cb3c96 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-EditorGrid.js.html @@ -0,0 +1,32 @@ + + + + + + EditorGrid.js + + + + + + + +
+
All Classes
+
+ +
+
+ + + diff --git a/www/extras/yui-ext/docs/overview-EditorSelectionModel.js.html b/www/extras/yui-ext/docs/overview-EditorSelectionModel.js.html new file mode 100644 index 000000000..e65fb4a96 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-EditorSelectionModel.js.html @@ -0,0 +1,36 @@ + + + + + + EditorSelectionModel.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-Element.js.html b/www/extras/yui-ext/docs/overview-Element.js.html new file mode 100644 index 000000000..a47953783 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Element.js.html @@ -0,0 +1,34 @@ + + + + + + Element.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-EventManager.js.html b/www/extras/yui-ext/docs/overview-EventManager.js.html new file mode 100644 index 000000000..4503f7205 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-EventManager.js.html @@ -0,0 +1,32 @@ + + + + + + EventManager.js + + + + + + + +
+
All Classes
+
+ +
+
+ + + diff --git a/www/extras/yui-ext/docs/overview-Grid.js.html b/www/extras/yui-ext/docs/overview-Grid.js.html new file mode 100644 index 000000000..d5c080aee --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Grid.js.html @@ -0,0 +1,34 @@ + + + + + + Grid.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-GridDD.js.html b/www/extras/yui-ext/docs/overview-GridDD.js.html new file mode 100644 index 000000000..341c12d5c --- /dev/null +++ b/www/extras/yui-ext/docs/overview-GridDD.js.html @@ -0,0 +1,34 @@ + + + + + + GridDD.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-GridView.js.html b/www/extras/yui-ext/docs/overview-GridView.js.html new file mode 100644 index 000000000..8084d75f0 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-GridView.js.html @@ -0,0 +1,36 @@ + + + + + + GridView.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-JSONDataModel.js.html b/www/extras/yui-ext/docs/overview-JSONDataModel.js.html new file mode 100644 index 000000000..0e3034532 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-JSONDataModel.js.html @@ -0,0 +1,34 @@ + + + + + + JSONDataModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-LoadableDataModel.js.html b/www/extras/yui-ext/docs/overview-LoadableDataModel.js.html new file mode 100644 index 000000000..b0c7d57e4 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-LoadableDataModel.js.html @@ -0,0 +1,34 @@ + + + + + + LoadableDataModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-NumberEditor.js.html b/www/extras/yui-ext/docs/overview-NumberEditor.js.html new file mode 100644 index 000000000..fc2986c82 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-NumberEditor.js.html @@ -0,0 +1,34 @@ + + + + + + NumberEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-PagedGridView.js.html b/www/extras/yui-ext/docs/overview-PagedGridView.js.html new file mode 100644 index 000000000..da01572b1 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-PagedGridView.js.html @@ -0,0 +1,34 @@ + + + + + + PagedGridView.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-Resizable.js.html b/www/extras/yui-ext/docs/overview-Resizable.js.html new file mode 100644 index 000000000..1d3483c2a --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Resizable.js.html @@ -0,0 +1,34 @@ + + + + + + Resizable.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-SelectEditor.js.html b/www/extras/yui-ext/docs/overview-SelectEditor.js.html new file mode 100644 index 000000000..3c0ea9a9d --- /dev/null +++ b/www/extras/yui-ext/docs/overview-SelectEditor.js.html @@ -0,0 +1,34 @@ + + + + + + SelectEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-SelectionModel.js.html b/www/extras/yui-ext/docs/overview-SelectionModel.js.html new file mode 100644 index 000000000..ff5ab11e2 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-SelectionModel.js.html @@ -0,0 +1,38 @@ + + + + + + SelectionModel.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-SplitBar.js.html b/www/extras/yui-ext/docs/overview-SplitBar.js.html new file mode 100644 index 000000000..050209835 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-SplitBar.js.html @@ -0,0 +1,38 @@ + + + + + + SplitBar.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-State.js.html b/www/extras/yui-ext/docs/overview-State.js.html new file mode 100644 index 000000000..ed2a1c5c2 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-State.js.html @@ -0,0 +1,32 @@ + + + + + + State.js + + + + + + + +
+
All Classes
+
+ +
+
+ + + diff --git a/www/extras/yui-ext/docs/overview-TabPanel.js.html b/www/extras/yui-ext/docs/overview-TabPanel.js.html new file mode 100644 index 000000000..8d39196ea --- /dev/null +++ b/www/extras/yui-ext/docs/overview-TabPanel.js.html @@ -0,0 +1,36 @@ + + + + + + TabPanel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-TextEditor.js.html b/www/extras/yui-ext/docs/overview-TextEditor.js.html new file mode 100644 index 000000000..80f83d15f --- /dev/null +++ b/www/extras/yui-ext/docs/overview-TextEditor.js.html @@ -0,0 +1,34 @@ + + + + + + TextEditor.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-Toolbar.js.html b/www/extras/yui-ext/docs/overview-Toolbar.js.html new file mode 100644 index 000000000..14cac6456 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-Toolbar.js.html @@ -0,0 +1,36 @@ + + + + + + Toolbar.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-UpdateManager.js.html b/www/extras/yui-ext/docs/overview-UpdateManager.js.html new file mode 100644 index 000000000..2191ab370 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-UpdateManager.js.html @@ -0,0 +1,36 @@ + + + + + + UpdateManager.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/overview-XMLDataModel.js.html b/www/extras/yui-ext/docs/overview-XMLDataModel.js.html new file mode 100644 index 000000000..0da9bd1a3 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-XMLDataModel.js.html @@ -0,0 +1,34 @@ + + + + + + XMLDataModel.js + + + + + + + +
+
All Classes
+ +
+ + + diff --git a/www/extras/yui-ext/docs/overview-frame.html b/www/extras/yui-ext/docs/overview-frame.html new file mode 100644 index 000000000..dcd4425ef --- /dev/null +++ b/www/extras/yui-ext/docs/overview-frame.html @@ -0,0 +1,107 @@ + + + + +Overview () + + + + + + + + +

+ + + + +
+ + + + + +
All Classes +

+ +Files +
+ +AbstractColumnModel.js
+ +AbstractDataModel.js
+ +Actor.js
+ +Animator.js
+ +CellEditor.js
+ +CheckboxEditor.js
+ +DateEditor.js
+ +DatePicker.js
+ +DefaultColumnModel.js
+ +DefaultDataModel.js
+ +DomHelper.js
+ +EditorGrid.js
+ +EditorSelectionModel.js
+ +Element.js
+ +EventManager.js
+ +Grid.js
+ +GridDD.js
+ +GridView.js
+ +JSONDataModel.js
+ +LoadableDataModel.js
+ +NumberEditor.js
+ +PagedGridView.js
+ +Resizable.js
+ +SelectEditor.js
+ +SelectionModel.js
+ +SplitBar.js
+ +State.js
+ +TabPanel.js
+ +TextEditor.js
+ +Toolbar.js
+ +UpdateManager.js
+ +XMLDataModel.js
+ +yutil.js
+ +

+ +

+  + + diff --git a/www/extras/yui-ext/docs/overview-summary-AbstractColumnModel.js.html b/www/extras/yui-ext/docs/overview-summary-AbstractColumnModel.js.html new file mode 100644 index 000000000..8fbf23799 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-AbstractColumnModel.js.html @@ -0,0 +1,170 @@ + + + + + Overview + + + + + +

+ +

AbstractColumnModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.AbstractColumnModelThis abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid.
+
+ + + + + + + +
/**
+ * @class
+ * This abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid. 
+ * @constructor
+*/
+YAHOO.ext.grid.AbstractColumnModel = function(){
+	/** Fires when a column width is changed - fireDirect sig: (this, columnIndex, newWidth)
+     * @type YAHOO.util.CustomEvent 
+     * */
+    this.onWidthChange = new YAHOO.util.CustomEvent('widthChanged');
+    /** Fires when a header has changed - fireDirect sig: (this, columnIndex, newHeader)
+     * @type YAHOO.util.CustomEvent 
+     * */
+    this.onHeaderChange = new YAHOO.util.CustomEvent('headerChanged');
+	/** Fires when a column is hidden or unhidden - fireDirect sig: (this, columnIndex, hidden)
+     * @type YAHOO.util.CustomEvent 
+     * */
+    this.onHiddenChange = new YAHOO.util.CustomEvent('hiddenChanged');
+};
+
+YAHOO.ext.grid.AbstractColumnModel.prototype = {
+	fireWidthChange : function(colIndex, newWidth){
+		this.onWidthChange.fireDirect(this, colIndex, newWidth);
+	},
+	
+	fireHeaderChange : function(colIndex, newHeader){
+		this.onHeaderChange.fireDirect(this, colIndex, newHeader);
+	},
+	
+	fireHiddenChange : function(colIndex, hidden){
+		this.onHiddenChange.fireDirect(this, colIndex, hidden);
+	},
+	
+	/**
+     * Interface method - Returns the number of columns.
+     * @return {Number}
+     */
+    getColumnCount : function(){
+        return 0;
+    },
+    
+    /**
+     * Interface method - Returns true if the specified column is sortable.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isSortable : function(col){
+        return false;
+    },
+    
+    /**
+     * Interface method - Returns true if the specified column is hidden.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isHidden : function(col){
+        return false;
+    },
+    
+    /**
+     * Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none).
+     * @param {Number} col The column index
+     * @return {Function}
+     */
+    getSortType : function(col){
+        return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none;
+    },
+    
+    /**
+     * Interface method - Returns the rendering (formatting) function defined for the column.
+     * @param {Number} col The column index
+     * @return {Function}
+     */
+    getRenderer : function(col){
+        return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer;
+    },
+    
+    /**
+     * Interface method - Returns the width for the specified column.
+     * @param {Number} col The column index
+     * @return {Number}
+     */
+    getColumnWidth : function(col){
+        return 0;
+    },
+    
+    /**
+     * Interface method - Returns the total width of all columns.
+     * @return {Number}
+     */
+    getTotalWidth : function(){
+        return 0;
+    },
+    
+    /**
+     * Interface method - Returns the header for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnHeader : function(col){
+        return '';
+    }
+};
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-AbstractDataModel.js.html b/www/extras/yui-ext/docs/overview-summary-AbstractDataModel.js.html new file mode 100644 index 000000000..d6e674c49 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-AbstractDataModel.js.html @@ -0,0 +1,225 @@ + + + + + Overview + + + + + +
+ +

AbstractDataModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.AbstractDataModelThis abstract class provides default implementations of the events required by the Grid.
+
+ + + + + + + +
/**
+ * @class
+ * This abstract class provides default implementations of the events required by the Grid. 
+ It takes care of the creating the CustomEvents and provides some convenient methods for firing the events. <br><br>
+ * @constructor
+*/
+YAHOO.ext.grid.AbstractDataModel = function(){
+    /** Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex)
+     * @type YAHOO.util.CustomEvent
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onCellUpdated = new YAHOO.util.CustomEvent('onCellUpdated');
+    /** Fires when all data needs to be revalidated - fireDirect sig: (thisd)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onTableDataChanged = new YAHOO.util.CustomEvent('onTableDataChanged');
+    /** Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onRowsDeleted = new YAHOO.util.CustomEvent('onRowsDeleted');
+    /** Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onRowsInserted = new YAHOO.util.CustomEvent('onRowsInserted');
+    /** Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onRowsUpdated = new YAHOO.util.CustomEvent('onRowsUpdated');
+    /** Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, 
+     * sortDirection = 'ASC' or 'DESC')
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onRowsSorted = new YAHOO.util.CustomEvent('onRowsSorted');
+    
+    this.events = {
+      'cellupdated' : this.onCellUpdated,
+      'datachanged' : this.onTableDataChanged,
+      'rowsdeleted' : this.onRowsDeleted,
+      'rowsinserted' : this.onRowsInserted,
+      'rowsupdated' : this.onRowsUpdated,
+      'rowssorted' : this.onRowsSorted
+    };
+};
+
+YAHOO.ext.grid.AbstractDataModel.prototype = {
+    
+    addListener : YAHOO.ext.grid.Grid.prototype.addListener,
+    removeListener : YAHOO.ext.grid.Grid.prototype.removeListener,
+    fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent,
+    
+    /**
+     *  Notifies listeners that the value of the cell at [row, col] has been updated
+     */
+    fireCellUpdated : function(row, col){
+        this.onCellUpdated.fireDirect(this, row, col);
+    },
+    
+    /**
+     *  Notifies listeners that all data for the grid may have changed - use as a last resort. This 
+     * also wipes out all selections a user might have made.
+     */
+    fireTableDataChanged : function(){
+        this.onTableDataChanged.fireDirect(this);
+    },
+    
+    /**
+     *  Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted
+     */
+    fireRowsDeleted : function(firstRow, lastRow){
+        this.onRowsDeleted.fireDirect(this, firstRow, lastRow);
+    },
+    
+    /**
+     *  Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted
+     */
+    fireRowsInserted : function(firstRow, lastRow){
+        this.onRowsInserted.fireDirect(this, firstRow, lastRow);
+    },
+    
+    /**
+     *  Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated
+     */
+    fireRowsUpdated : function(firstRow, lastRow){
+        this.onRowsUpdated.fireDirect(this, firstRow, lastRow);
+    },
+    
+    /**
+     *  Notifies listeners that rows have been sorted and any indexes may be invalid
+     */
+    fireRowsSorted : function(sortColumnIndex, sortDir, noRefresh){
+        this.onRowsSorted.fireDirect(this, sortColumnIndex, sortDir, noRefresh);
+    },
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method.
+     * See {@link YAHOO.ext.DefaultDataModel} for an example implementation.
+     */
+    sort : function(columnModel, columnIndex, direction, suppressEvent){
+    	
+    },
+    
+    /**
+     * Interface method to supply the view with info regarding the Grid's current sort state - if overridden,
+     * this should return an object like this {column: this.sortColumn, direction: this.sortDir}.
+     * @return {Object} 
+     */
+    getSortState : function(){
+    	return {column: this.sortColumn, direction: this.sortDir};
+    },
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method.
+     * See {@link YAHOO.ext.DefaultDataModel} for an example implementation.
+     */
+    getRowCount : function(){
+    	
+    },
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts.
+     */
+    getTotalRowCount : function(){
+    	return this.getRowCount();
+    },
+    
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method.
+     * See {@link YAHOO.ext.DefaultDataModel} for an example implementation.
+     */
+    getRowId : function(rowIndex){
+    	
+    },
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method.
+     * See {@link YAHOO.ext.DefaultDataModel} for an example implementation.
+     */
+    getValueAt : function(rowIndex, colIndex){
+    	
+    },
+    
+    /**
+     * Empty interface method - Classes which extend AbstractDataModel should implement this method.
+     * See {@link YAHOO.ext.DefaultDataModel} for an example implementation.
+     */
+    setValueAt : function(value, rowIndex, colIndex){
+    	
+    },
+    
+    isPaged : function(){
+        return false;
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Actor.js.html b/www/extras/yui-ext/docs/overview-summary-Actor.js.html new file mode 100644 index 000000000..af442d8f7 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Actor.js.html @@ -0,0 +1,738 @@ + + + + + Overview + + + + + +
+ +

Actor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.ActorProvides support for syncing and chaining of Element Yahoo!
YAHOO.ext.Actor.ActionUsed by YAHOO.ext.Actor to queue standard calls.
YAHOO.ext.Actor.AsyncActionUsed by YAHOO.ext.Actor to queue animations.
YAHOO.ext.Actor.PauseActionUsed by YAHOO.ext.Actor to perform pauses.
+
+ + + + + + + +
+/**
+ * @class
+ * Provides support for syncing and chaining of Element Yahoo! UI based animation and some common effects. Actors support "self-play" without an Animator.<br><br>
+ * <b>Note: Along with the animation methods defined below, this class inherits and captures all of the "set" or animation methods of {@link YAHOO.ext.Element}. "get" methods are not captured and execute immediately.</b>
+ * <br><br>Usage:<br>
+ * <pre><code>
+ * var actor = new YAHOO.ext.Actor('myElementId');
+ * actor.startCapture(true);
+ * actor.moveTo(100, 100, true);
+ * actor.squish();
+ * actor.play();
+ * <br>
+ * // or to start capturing immediately, with no Animator (the null second param)
+ * <br>
+ * var actor = new YAHOO.ext.Actor('myElementId', null, true);
+ * actor.moveTo(100, 100, true);
+ * actor.squish();
+ * actor.play();
+ * </code></pre>
+ * @extends YAHOO.ext.Element
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.ColorAnim
+ * @requires YAHOO.util.Motion
+ * @className YAHOO.ext.Actor
+ * @constructor
+ * Create new Actor.
+ * @param {String/HTMLElement} el The dom element or element id 
+ * @param {<i>YAHOO.ext.Animator</i>} animator (optional) The Animator that will capture this Actor's actions
+ * @param {<i>Boolean</i>} selfCapture (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false)
+ */
+YAHOO.ext.Actor = function(element, animator, selfCapture){
+    YAHOO.ext.Actor.superclass.constructor.call(this, element, true);
+    
+    this.el = YAHOO.ext.Element.get(this.id); // cache el object for playback
+    
+    this.onCapture = new YAHOO.util.CustomEvent('Actor.onCapture');
+    if(animator){
+        /**
+        * The animator used to sync this actor with other actors
+        * @member YAHOO.ext.Actor
+        */
+        animator.addActor(this);
+    }
+    /**
+    * Whether this actor is currently capturing
+    * @member YAHOO.ext.Actor
+    */
+    this.capturing = selfCapture;
+    this.playlist = selfCapture ? new YAHOO.ext.Animator.AnimSequence() : null;
+};
+
+YAHOO.extendX(YAHOO.ext.Actor, YAHOO.ext.Element);
+
+/**
+ * Captures an action for this actor. Generally called internally but can be called directly.
+ # @param {YAHOO.ext.Actor.Action} action
+ */
+YAHOO.ext.Actor.prototype.capture = function(action){
+    if(this.playlist != null){
+        this.playlist.add(action);
+    }
+    this.onCapture.fireDirect(this, action);
+    return action;
+};
+
+/** @ignore */
+YAHOO.ext.Actor.overrideAnimation = function(method, animParam, onParam){
+    return function(){
+        if(!this.capturing){
+            return method.apply(this, arguments);
+        }
+        var args = Array.prototype.slice.call(arguments, 0);
+        if(args[animParam] === true){
+            return this.capture(new YAHOO.ext.Actor.AsyncAction(this, method, args, onParam));
+        }else{
+            return this.capture(new YAHOO.ext.Actor.Action(this, method, args));
+        }
+    };
+}
+
+/** @ignore */
+YAHOO.ext.Actor.overrideBasic = function(method){
+    return function(){
+        if(!this.capturing){
+            return method.apply(this, arguments);
+        }
+        var args = Array.prototype.slice.call(arguments, 0);
+        return this.capture(new YAHOO.ext.Actor.Action(this, method, args));
+    };
+}
+
+// All of these methods below are marked "ignore" because JSDoc treats them as fields, not function. How brilliant. The Element methods are documented anyway though.
+/** Capturing override - See {@link YAHOO.ext.Element#setVisibilityMode} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setVisibilityMode = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setVisibilityMode);
+/** Capturing override - See {@link YAHOO.ext.Element#enableDisplayMode} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.enableDisplayMode = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.enableDisplayMode);
+/** Capturing override - See {@link YAHOO.ext.Element#focus} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.focus = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.focus);
+/** Capturing override - See {@link YAHOO.ext.Element#addClass} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.addClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.addClass);
+/** Capturing override - See {@link YAHOO.ext.Element#removeClass} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.removeClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.removeClass);
+/** Capturing override - See {@link YAHOO.ext.Element#replaceClass} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.replaceClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.replaceClass);
+/** Capturing override - See {@link YAHOO.ext.Element#setStyle} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setStyle = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setStyle);
+/** Capturing override - See {@link YAHOO.ext.Element#setX} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setX = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setX);
+/** Capturing override - See {@link YAHOO.ext.Element#setY} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setY = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setY);
+/** Capturing override - See {@link YAHOO.ext.Element#setLeft} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setLeft = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setLeft);
+/** Capturing override - See {@link YAHOO.ext.Element#setTop} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setTop = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setTop);
+/** Capturing override - See {@link YAHOO.ext.Element#setAbsolutePositioned} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setAbsolutePositioned = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setAbsolutePositioned);
+/** Capturing override - See {@link YAHOO.ext.Element#setRelativePositioned} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setRelativePositioned = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setRelativePositioned);
+/** Capturing override - See {@link YAHOO.ext.Element#clearPositioning} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.clearPositioning = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearPositioning);
+/** Capturing override - See {@link YAHOO.ext.Element#setPositioning} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setPositioning = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setPositioning);
+/** Capturing override - See {@link YAHOO.ext.Element#clip} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.clip = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clip);
+/** Capturing override - See {@link YAHOO.ext.Element#unclip} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.unclip = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.unclip);
+/** Capturing override - See {@link YAHOO.ext.Element#clearOpacity} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.clearOpacity = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearOpacity);
+/** Capturing override - See {@link YAHOO.ext.Element#clearOpacity} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.update = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.update);
+
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#animate} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.animate = function(args, duration, onComplete, easing, animType){
+    if(!this.capturing){
+        return YAHOO.ext.Actor.superclass.animate.apply(this, arguments);
+   }
+    return this.capture(new YAHOO.ext.Actor.AsyncAction(this, YAHOO.ext.Actor.superclass.animate, 
+        [args, duration, onComplete, easing, animType], 2));
+};
+
+/** Capturing and animation syncing override - See {@link YAHOO.ext.Element#setVisible} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setVisible = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setVisible, 1, 3);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#toggle} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.toggle = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.toggle, 0, 2);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setXY} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setXY = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setXY, 1, 3);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setLocation} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setLocation = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setLocation, 2, 4);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setWidth} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setWidth = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setWidth, 1, 3);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setHeight} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setHeight = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight, 1, 3);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setSize} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setSize = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setSize, 2, 4);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setBounds} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setBounds = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setBounds, 4, 6);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setHeight} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.setOpacity = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight, 1, 3);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#moveTo} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.moveTo = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.moveTo, 2, 4);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#move} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.move = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.move, 2, 4);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#alignTo} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.alignTo = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.alignTo, 3, 5);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#hide} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.hide = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.hide, 0, 2);
+/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#show} for method details.
+ * @type Function */
+YAHOO.ext.Actor.prototype.show = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.show, 0, 2);
+    
+/**
+ * Start self capturing calls on this Actor. All subsequent calls are captured and executed when play() is called.
+ */
+YAHOO.ext.Actor.prototype.startCapture = function(){
+    this.capturing = true;
+    this.playlist = new YAHOO.ext.Animator.AnimSequence();
+ };
+ 
+ /**
+ * Stop self capturing calls on this Actor.
+ */
+ YAHOO.ext.Actor.prototype.stopCapture = function(){
+     this.capturing = false;
+ };
+
+/**
+ * Clears any calls that have been self captured.
+ */
+YAHOO.ext.Actor.prototype.clear = function(){
+    this.playlist = new YAHOO.ext.Animator.AnimSequence();
+};
+
+/**
+ * Starts playback of self captured calls.
+ * @param {<i>Function</i>} oncomplete (optional) Callback to execute when playback has completed
+ */
+YAHOO.ext.Actor.prototype.play = function(oncomplete){
+    this.capturing = false;
+    if(this.playlist){
+        this.playlist.play(oncomplete);
+    }
+ };
+
+/**
+ * Capture a function call.
+ * @param {Function} fcn The function to call
+ * @param {<i>Array</i>} args (optional) The arguments to call the function with
+ * @param {<i>Object</i>} scope (optional) The scope of the function
+ */
+YAHOO.ext.Actor.prototype.addCall = function(fcn, args, scope){
+    this.capture(new YAHOO.ext.Actor.Action(scope, fcn, args || []));
+};
+
+/**
+ * Capture an async function call.
+ * @param {Function} fcn The function to call
+ * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED.
+ * @param {<i>Array</i>} args The arguments to call the function with
+ * @param {<i>Object</i>} scope (optional) The scope of the function
+ */
+YAHOO.ext.Actor.prototype.addAsyncCall = function(fcn, callbackIndex, args, scope){
+    this.capture(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex));
+ },
+ 
+/**
+ * Capture a pause (in seconds).
+ * @param {Number} seconds The seconds to pause
+ */
+YAHOO.ext.Actor.prototype.pause = function(seconds){
+    this.capture(new YAHOO.ext.Actor.PauseAction(seconds));
+ };
+ 
+/**
+* Shake this element from side to side
+*/
+YAHOO.ext.Actor.prototype.shake = function(){
+    this.move('left', 20, true, .05);
+    this.move('right', 40, true, .05);
+    this.move('left', 40, true, .05);
+    this.move('right', 20, true, .05);
+};
+
+/**
+* Bounce this element from up and down
+*/
+YAHOO.ext.Actor.prototype.bounce = function(){
+    this.move('up', 20, true, .05);
+    this.move('down', 40, true, .05);
+    this.move('up', 40, true, .05);
+    this.move('down', 20, true, .05);
+};
+
+/**
+* Show the element using a "blinds" effect
+* @param {String} anchor The part of the element that it should appear to exapand from. 
+                        The short/long options currently are t/top, l/left
+* @param {<i>Number</i>} newSize (optional) The size to animate to. (Default to current size)
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut)
+*/
+YAHOO.ext.Actor.prototype.blindShow = function(anchor, newSize, duration, easing){
+    var size = newSize || this.getSize();
+    this.clip();
+    this.setVisible(true);
+    anchor = anchor.toLowerCase();
+    switch(anchor){
+        case 't':
+        case 'top':
+            this.setHeight(1);
+            this.setHeight(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut);
+        break;
+        case 'l':
+        case 'left':
+            this.setWidth(1);
+            this.setWidth(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut);
+        break;
+    }
+    this.unclip();
+    return size;
+};
+
+/**
+* Hide the element using a "blinds" effect
+* @param {String} anchor The part of the element that it should appear to collapse to.
+                        The short/long options are t/top, l/left, b/bottom, r/right.
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
+*/
+YAHOO.ext.Actor.prototype.blindHide = function(anchor, duration, easing){
+    var size = this.getSize();
+    this.clip();
+    anchor = anchor.toLowerCase();
+    switch(anchor){
+        case 't':
+        case 'top':
+            this.setSize(size.width, 1, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn);
+            this.setVisible(false);
+        break;
+        case 'l':
+        case 'left':
+            this.setSize(1, size.height, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn);
+            this.setVisible(false);
+        break;
+        case 'r':
+        case 'right':
+            this.animate({width: {to: 1}, points: {by: [this.getWidth(), 0]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion);
+            this.setVisible(false);
+        break;
+        case 'b':
+        case 'bottom':
+            this.animate({height: {to: 1}, points: {by: [0, this.getHeight()]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion);
+            this.setVisible(false);
+        break;
+    }
+    return size;
+};
+
+/**
+* Show the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindShow effect is rendered. 
+* @param {String} anchor The part of the element that it should appear to slide from. 
+                        The short/long options currently are t/top, l/left
+* @param {<i>Number</i>} newSize (optional) The size to animate to. (Default to current size)
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOuth)
+*/
+YAHOO.ext.Actor.prototype.slideShow = function(anchor, newSize, duration, easing){
+    var size = newSize || this.getSize();
+    this.clip();
+    var firstChild = this.dom.firstChild;
+    if(!firstChild || (firstChild.nodeName && "#TEXT" == firstChild.nodeName.toUpperCase())) { // can't do a slide with only a textnode
+        this.blindShow(anchor, newSize, duration, easing);
+        return;
+    }
+    var child = YAHOO.ext.Element.get(firstChild, true);
+    var pos = child.getPositioning();
+    this.addCall(child.setAbsolutePositioned, null, child);
+    this.setVisible(true);
+    anchor = anchor.toLowerCase();
+    switch(anchor){
+        case 't':
+        case 'top':
+            this.addCall(child.setStyle, ['left', '0px'], child);
+            this.addCall(child.setStyle, ['bottom', '0px'], child);
+            this.setHeight(1);
+            this.setHeight(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut);
+        break;
+        case 'l':
+        case 'left':
+            this.addCall(child.setStyle, ['right', '0px'], child);
+            this.addCall(child.setStyle, ['top', '0px'], child);
+            this.setWidth(1);
+            this.setWidth(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut);
+        break;
+    }
+    this.addCall(child.setPositioning, [pos], child);
+    this.unclip();
+    return size;
+};
+
+/**
+* Hide the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindHide effect is rendered. 
+* @param {String} anchor The part of the element that it should appear to slide to.
+                        The short/long options are t/top, l/left, b/bottom, r/right.
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
+*/
+YAHOO.ext.Actor.prototype.slideHide = function(anchor, duration, easing){
+    var size = this.getSize();
+    this.clip();
+    var firstChild = this.dom.firstChild;
+    if(!firstChild || (firstChild.nodeName && "#TEXT" == firstChild.nodeName.toUpperCase())) { // can't do a slide with only a textnode
+        this.blindHide(anchor, duration, easing);
+        return;
+    }
+    var child = YAHOO.ext.Element.get(firstChild, true);
+    var pos = child.getPositioning();
+    this.addCall(child.setAbsolutePositioned, null, child);
+    anchor = anchor.toLowerCase();
+    switch(anchor){
+        case 't':
+        case 'top':
+            this.addCall(child.setStyle, ['left', '0px'], child);
+            this.addCall(child.setStyle, ['bottom', '0px'], child);
+            this.setSize(size.width, 1, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn);
+            this.setVisible(false);
+        break;
+        case 'l':
+        case 'left':
+            this.addCall(child.setStyle, ['right', '0px'], child);
+            this.addCall(child.setStyle, ['top', '0px'], child);
+            this.setSize(1, size.height, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn);
+            this.setVisible(false);
+        break;
+        case 'r':
+        case 'right':
+            this.addCall(child.setStyle, ['left', '0px'], child);
+            this.addCall(child.setStyle, ['top', '0px'], child);
+            this.animate({width: {to: 1}, points: {by: [this.getWidth(), 0]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion);
+            this.setVisible(false);
+        break;
+        case 'b':
+        case 'bottom':
+            this.addCall(child.setStyle, ['left', '0px'], child);
+            this.addCall(child.setStyle, ['bottom', '0px'], child);
+            this.animate({height: {to: 1}, points: {by: [0, this.getHeight()]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion);
+            this.setVisible(false);
+        break;
+    }
+    this.addCall(child.setPositioning, [pos], child);
+    return size;
+};
+
+/**
+* Hide the element by "squishing" it into the corner
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.squish = function(duration){
+    var size = this.getSize();
+    this.clip();
+    this.setSize(1, 1, true, duration || .5);
+    this.setVisible(false);
+    return size;
+};
+
+/**
+* Fade an element in
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.appear = function(duration){
+    this.setVisible(true, true, duration);
+};
+
+/**
+* Fade an element out
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.fade = function(duration){
+    this.setVisible(false, true, duration);
+};
+
+/**
+* Blink the element as if it was clicked and then collapse on it's center
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.switchOff = function(duration){
+    this.clip();
+    this.setVisible(false, true, .1);
+    this.clearOpacity();
+    this.setVisible(true);
+    this.animate({height: {to: 1}, points: {by: [0, this.getHeight()/2]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeOut, YAHOO.util.Motion);
+    this.setVisible(false);
+};
+
+/**
+* Highlight the element using a background color (or passed attribute) animation
+* @param {String} color (optional) The color to use for the highlight
+* @param {<i>String</i>} fromColor (optional) If the element does not currently have a background color, you will need to pass in a color to animate from
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>String</i>} attribute (optional) Specify a CSS attribute to use other than background color - camelCase
+*/
+YAHOO.ext.Actor.prototype.highlight = function(color, fromColor, duration, attribute){
+    attribute = attribute || 'backgroundColor';
+    var original = this.getStyle(attribute);
+    fromColor = fromColor || ((original && original != '' && original != 'transparent') ? original : '#FFFFFF');
+    var cfg = {};
+    cfg[attribute] = {to: color, from: fromColor};
+    this.setVisible(true);
+    this.animate(cfg, duration || .5, null, YAHOO.util.Easing.bounceOut, YAHOO.util.ColorAnim);
+    this.setStyle(attribute, original);
+};
+
+/**
+* Fade the element in and out the specified amount of times
+* @param {<i>Number</i>} count (optional) How many times to pulse (Defaults to 3)
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.pulsate = function(count, duration){
+    count = count || 3;
+    for(var i = 0; i < count; i++){
+        this.toggle(true, duration || .25);
+        this.toggle(true, duration || .25);
+    }
+};
+
+/**
+* Fade the element as it is falling from it's current position
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+*/
+YAHOO.ext.Actor.prototype.dropOut = function(duration){
+    this.animate({opacity: {to: 0}, points: {by: [0, this.getHeight()]}}, 
+            duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion);
+    this.setVisible(false);
+};
+
+/**
+* Hide the element in a way that it appears as if it is flying off the screen
+* @param {String} anchor The part of the page that the element should appear to move to. 
+                        The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, 
+                        tr/top-right, bl/bottom-left or br/bottom-right.
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn)
+*/
+YAHOO.ext.Actor.prototype.moveOut = function(anchor, duration, easing){
+    var Y = YAHOO.util;
+    var vw = Y.Dom.getViewportWidth();
+    var vh = Y.Dom.getViewportHeight();
+    var cpoints = this.getCenterXY()
+    var centerX = cpoints[0];
+    var centerY = cpoints[1];
+    var anchor = anchor.toLowerCase();
+    var p;
+    switch(anchor){
+        case 't':
+        case 'top':
+            p = [centerX, -this.getHeight()];
+        break;
+        case 'l':
+        case 'left':
+            p = [-this.getWidth(), centerY];
+        break;
+        case 'r':
+        case 'right':
+            p = [vw+this.getWidth(), centerY];
+        break;
+        case 'b':
+        case 'bottom':
+            p = [centerX, vh+this.getHeight()];
+        break;
+        case 'tl':
+        case 'top-left':
+            p = [-this.getWidth(), -this.getHeight()];
+        break;
+        case 'bl':
+        case 'bottom':
+            p = [-this.getWidth(), vh+this.getHeight()];
+        break;
+        case 'br':
+        case 'bottom-right':
+            p = [vw+this.getWidth(), vh+this.getHeight()];
+        break;
+        case 'tr':
+        case 'top-right':
+            p = [vw+this.getWidth(), -this.getHeight()];
+        break;
+    }
+    this.moveTo(p[0], p[1], true, duration || .35, null, easing || Y.Easing.easeIn);
+    this.setVisible(false);
+};
+
+/**
+* Show the element in a way that it appears as if it is flying onto the screen
+* @param {String} anchor The part of the page that the element should appear to move from. 
+                        The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, 
+                        tr/top-right, bl/bottom-left or br/bottom-right.
+* @param {<i>Array</i>} to (optional) Array of x and y position to move to like [x, y] (Defaults to center screen)
+* @param {<i>Float</i>} duration (optional) How long the effect lasts (in seconds)
+* @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut)
+*/
+YAHOO.ext.Actor.prototype.moveIn = function(anchor, to, duration, easing){
+    to = to || this.getCenterXY();
+    this.moveOut(anchor, .01);
+    this.setVisible(true);
+    this.setXY(to, true, duration || .35, null, easing || YAHOO.util.Easing.easeOut);
+};
+
+
+
+/**
+ * @class Used by {@link YAHOO.ext.Actor} to queue standard calls. Generally used internally. Documentation to come.<br><br>
+ */
+YAHOO.ext.Actor.Action = function(actor, method, args){
+      this.actor = actor;
+      this.method = method;
+      this.args = args;
+      //alert('queueing ' + actor.id + ' ' + method.toString());
+  }
+  
+YAHOO.ext.Actor.Action.prototype = {
+    play : function(onComplete){
+        this.method.apply(this.actor || window, this.args);
+        onComplete();
+    }  
+};
+
+
+/**
+ * @class Used by {@link YAHOO.ext.Actor} to queue animations. Generally used internally. Documentation to come.<br><br>
+ */
+YAHOO.ext.Actor.AsyncAction = function(actor, method, args, onIndex){
+    YAHOO.ext.Actor.AsyncAction.superclass.constructor.call(this, actor, method, args);
+    this.onIndex = onIndex;
+    this.originalCallback = this.args[onIndex];
+}
+YAHOO.extendX(YAHOO.ext.Actor.AsyncAction, YAHOO.ext.Actor.Action);
+
+YAHOO.ext.Actor.AsyncAction.prototype.play = function(onComplete){
+    var callbackArg = this.originalCallback ? 
+                        this.originalCallback.createSequence(onComplete) : onComplete;
+    this.args[this.onIndex] = callbackArg;
+    this.method.apply(this.actor, this.args);
+};
+
+
+/**
+ * @class Used by {@link YAHOO.ext.Actor} to perform pauses. Generally used internally. Documentation to come.<br><br>
+ */
+YAHOO.ext.Actor.PauseAction = function(seconds){
+    this.seconds = seconds;
+};
+YAHOO.ext.Actor.PauseAction.prototype = {
+    play : function(onComplete){
+        setTimeout(onComplete, this.seconds * 1000);
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Animator.js.html b/www/extras/yui-ext/docs/overview-summary-Animator.js.html new file mode 100644 index 000000000..9b72c988c --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Animator.js.html @@ -0,0 +1,444 @@ + + + + + Overview + + + + + +
+ +

Animator.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.AnimatorProvides support for syncing animations for multiple YAHOO.ext.Actors.

+

This example can be seen in action here by clicking on "Click here and I will point it out".
+

+var animator = new YAHOO.ext.Animator();
+var cursor = new YAHOO.ext.Actor('cursor-img', animator);
+var click = new YAHOO.ext.Actor('click-img', animator);
+var resize = new YAHOO.ext.Actor('resize-img', animator);
+
+
YAHOO.ext.Animator.AnimSequenceUsed by YAHOO.ext.Animator to sequence animations.
YAHOO.ext.Animator.CompositeSequenceUsed by YAHOO.ext.Animator to run multiple animation sequences at once.
+
+ + + + + + + +
/**
+ * @class
+ * Provides support for syncing animations for multiple {@link YAHOO.ext.Actor}s.<br><br>
+* <br><br>This example can be seen in action <a href="http://jackslocum.blogspot.com/2006/08/splitbar-component-for-yahoo-ui.html" target="_new">here</a> by clicking on "Click here and I will point it out".<br>
+ * <pre><code>
+var animator = new YAHOO.ext.Animator();
+var cursor = new YAHOO.ext.Actor('cursor-img', animator);
+var click = new YAHOO.ext.Actor('click-img', animator);
+var resize = new YAHOO.ext.Actor('resize-img', animator);
+
+// start capturing
+animator.startCapture();
+
+// these animations will be run in sequence
+cursor.show();
+cursor.moveTo(500,400);
+cursor.moveTo(20, getEl('navbar').getY()+10, true, .75);
+click.show();
+click.alignTo(cursor, 'tl', [-4, -4]);
+
+// Add an async function call, pass callback to argument 1
+animator.addAsyncCall(Blog.navbar.undockDelegate, 1);
+
+// pause .5 seconds
+animator.pause(.5);
+
+// again, these animations will be run in sequence
+click.hide(true, .7);
+cursor.alignTo('splitter', 'tr', [0, +100], true, 1);
+resize.alignTo('splitter', 'tr', [-12, +100]);
+
+// start sync block: these animations will run at the same time
+animator.beginSync();
+cursor.hide();
+resize.show();
+animator.endSync();
+
+// play the captured animation sequences, call myCallback when done
+animator.play(myCallback);
+ * </code></pre>
+ * @extends YAHOO.ext.Element
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.ColorAnim
+ * @requires YAHOO.util.Motion
+ * @constructor
+ * @param {String/HTMLElement} el The dom element or element id 
+ * @param {<i>YAHOO.ext.Animator</i>} animator (optional) The Animator that will capture this Actor's actions
+ * @param {<i>Boolean</i>} selfCapture (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false)
+ */ 
+  YAHOO.ext.Animator = function(/*Actors...*/){
+    /** @private */
+    this.actors = [];
+    /** @private */
+    this.playlist = new YAHOO.ext.Animator.AnimSequence();
+    /** @private */
+    this.captureDelegate = this.capture.createDelegate(this);
+    /** @private */
+    this.playDelegate = this.play.createDelegate(this);
+    /** @private */
+    this.syncing = false;
+    /** @private */
+    this.stopping = false;
+    /** @private */
+    this.playing = false;
+    for(var i = 0; i < arguments.length; i++){
+        this.addActor(arguments[i]);
+    }
+ };
+ 
+ YAHOO.ext.Animator.prototype = {
+ 
+    /**
+      * @private
+      */
+     capture : function(actor, action){
+        if(this.syncing){
+            if(!this.syncMap[actor.id]){
+                this.syncMap[actor.id] = new YAHOO.ext.Animator.AnimSequence();
+            }
+            this.syncMap[actor.id].add(action);
+        }else{
+            this.playlist.add(action);
+        }
+    },
+    
+    /**
+      * Add an actor. The actor is also set to capturing = true.
+      * @param {YAHOO.ext.Actor} actor
+      */
+     addActor : function(actor){
+        actor.onCapture.subscribe(this.captureDelegate);
+        this.actors.push(actor);
+    },
+    
+    
+    /**
+      * Start capturing actions on the added actors. 
+      * @param {<i>Boolean</i>} clearPlaylist Whether to also create a new playlist
+      */
+     startCapture : function(clearPlaylist){
+        for(var i = 0; i < this.actors.length; i++){
+            var a = this.actors[i];
+            if(!this.isCapturing(a)){
+                a.onCapture.subscribe(this.captureDelegate);
+            }
+            a.capturing = true;
+        }
+        if(clearPlaylist){
+            this.playlist = new YAHOO.ext.Animator.AnimSequence();
+        }
+     },
+     
+     /**
+      * Checks whether this animator is listening to a specific actor.
+      * @param {YAHOO.ext.Actor} actor
+      */
+     isCapturing : function(actor){
+        var subscribers = actor.onCapture.subscribers;
+        if(subscribers){
+            for(var i = 0; i < subscribers.length; i++){
+                if(subscribers[i] && subscribers[i].contains(this.captureDelegate)){
+                    return true;
+                }
+            }
+        }
+        return false;
+     },
+     
+     /**
+      * Stop capturing on all added actors.
+      */
+     stopCapture : function(){
+         for(var i = 0; i < this.actors.length; i++){
+            var a = this.actors[i];
+            a.onCapture.unsubscribe(this.captureDelegate);
+            a.capturing = false;
+         }
+     },
+     
+     /**
+     * Start a multi-actor sync block. By default all animations are run in sequence. While in the sync block
+     * each actor's own animations will still be sequenced, but all actors will animate at the same time. 
+     */
+    beginSync : function(){
+        this.syncing = true;
+        this.syncMap = {};
+     },
+     
+     /**
+     * End the multi-actor sync block
+     */
+    endSync : function(){
+         this.syncing = false;
+         var composite = new YAHOO.ext.Animator.CompositeSequence();
+         for(key in this.syncMap){
+             if(typeof this.syncMap[key] != 'function'){
+                composite.add(this.syncMap[key]);
+             }
+         }
+         this.playlist.add(composite);
+         this.syncMap = null;
+     },
+     
+    /**
+     * Starts playback of the playlist, also stops any capturing. To start capturing again call {@link #startCapture}.
+     * @param {<i>Function</i>} oncomplete (optional) Callback to execute when playback has completed
+     */
+    play : function(oncomplete){
+        if(this.playing) return; // can't play the same animation twice at once
+        this.stopCapture();
+        this.playlist.play(oncomplete);
+    },
+    
+    /**
+     * Stop at the next available stopping point
+     */
+    stop : function(){
+        this.playlist.stop();
+    },
+    
+    /**
+     * Check if this animator is currently playing
+     */
+    isPlaying : function(){
+        return this.playlist.isPlaying();
+    },
+    /**
+     * Clear the playlist
+     */
+    clear : function(){
+        this.playlist = new YAHOO.ext.Animator.AnimSequence();
+     },
+     
+    /**
+     * Add a function call to the playlist.
+     * @param {Function} fcn The function to call
+     * @param {<i>Array</i>} args The arguments to call the function with
+     * @param {<i>Object</i>} scope (optional) The scope of the function
+     */
+     addCall : function(fcn, args, scope){
+        this.playlist.add(new YAHOO.ext.Actor.Action(scope, fcn, args || []));
+     },
+     
+     /**
+     * Add an async function call to the playlist.
+     * @param {Function} fcn The function to call
+     * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED.
+     * @param {<i>Array</i>} args The arguments to call the function with
+     * @param {<i>Object</i>} scope (optional) The scope of the function
+     */
+    addAsyncCall : function(fcn, callbackIndex, args, scope){
+        this.playlist.add(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex));
+     },
+     
+     /**
+     * Add a pause to the playlist (in seconds)
+     * @param {Number} seconds The number of seconds to pause.
+     */
+    pause : function(seconds){
+        this.playlist.add(new YAHOO.ext.Actor.PauseAction(seconds));
+     }
+     
+  };
+
+
+/**
+ * @class Used by {@link YAHOO.ext.Animator} to sequence animations. Generally used internally. Documentation to come.<br><br>
+ */
+YAHOO.ext.Animator.AnimSequence = function(){
+    this.actions = [];
+    this.nextDelegate = this.next.createDelegate(this);
+    this.playDelegate = this.play.createDelegate(this);
+    this.oncomplete = null;
+    this.playing = false;
+    this.stopping = false;
+    this.actionIndex = -1;
+ };
+ 
+ YAHOO.ext.Animator.AnimSequence.prototype = {
+ 
+    add : function(action){
+        this.actions.push(action);
+    },
+    
+    next : function(){
+        if(this.stopping){
+            this.playing = false;
+            if(this.oncomplete){
+                this.oncomplete(this, false);
+            }
+            return;
+        }
+        var nextAction = this.actions[++this.actionIndex];
+        if(nextAction){
+            nextAction.play(this.nextDelegate);
+        }else{
+            this.playing = false;
+            if(this.oncomplete){
+                this.oncomplete(this, true);
+            }
+        }
+    },
+    
+    play : function(oncomplete){
+        if(this.playing) return; // can't play the same sequence twice at once
+        this.oncomplete = oncomplete;
+        this.stopping = false;
+        this.playing = true;
+        this.actionIndex = -1;
+        this.next();
+    },
+    
+    stop : function(){
+        this.stopping = true;
+    },
+    
+    isPlaying : function(){
+        return this.playing;
+    },
+    
+    clear : function(){
+        this.actions = [];
+    },
+     
+    addCall : function(fcn, args, scope){
+        this.actions.push(new YAHOO.ext.Actor.Action(scope, fcn, args || []));
+     },
+     
+     /**
+     * Add an async function call to the capture queue.
+     * @param {Function} fcn The function to call
+     * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED.
+     * @param {<i>Array</i>} args The arguments to call the function with
+     * @param {<i>Object</i>} scope (optional) The scope of the function
+     */
+    addAsyncCall : function(fcn, callbackIndex, args, scope){
+        this.actions.push(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex));
+     },
+     
+     pause : function(seconds){
+        this.actions.push(new YAHOO.ext.Actor.PauseAction(seconds));
+     }
+     
+  };
+
+/**
+ * @class Used by {@link YAHOO.ext.Animator} to run multiple animation sequences at once. Generally used internally. Documentation to come.<br><br>
+ */
+YAHOO.ext.Animator.CompositeSequence = function(){
+    this.sequences = [];
+    this.completed = 0;
+    this.trackDelegate = this.trackCompletion.createDelegate(this);
+}
+
+YAHOO.ext.Animator.CompositeSequence.prototype = {
+    add : function(sequence){
+        this.sequences.push(sequence);
+    },
+    
+    play : function(onComplete){
+        this.completed = 0;
+        if(this.sequences.length < 1){
+            if(onComplete)onComplete();
+            return;
+        }
+        this.onComplete = onComplete;
+        for(var i = 0; i < this.sequences.length; i++){
+            this.sequences[i].play(this.trackDelegate);
+        }
+    },
+    
+    trackCompletion : function(){
+        ++this.completed;
+        if(this.completed >= this.sequences.length && this.onComplete){
+            this.onComplete();
+        }
+    },
+    
+    stop : function(){
+        for(var i = 0; i < this.sequences.length; i++){
+            this.sequences[i].stop();
+        }
+    },
+    
+    isPlaying : function(){
+        for(var i = 0; i < this.sequences.length; i++){
+            if(this.sequences[i].isPlaying()){
+                return true;
+            }
+        }
+        return false;
+    }
+};
+
+
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-CellEditor.js.html b/www/extras/yui-ext/docs/overview-summary-CellEditor.js.html new file mode 100644 index 000000000..289888ad6 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-CellEditor.js.html @@ -0,0 +1,150 @@ + + + + + Overview + + + + + +
+ +

CellEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.CellEditor 
+
+ + + + + + + +
YAHOO.ext.grid.CellEditor = function(element){
+    this.colIndex = null;
+    this.rowIndex = null;
+    this.grid = null;
+    this.editing = false;
+    this.originalValue = null;
+    this.element = getEl(element, true);
+    this.element.addClass('ygrid-editor');
+    this.element.dom.tabIndex = 1;
+    this.initialized = false;
+    this.callback = null;
+};
+
+YAHOO.ext.grid.CellEditor.prototype = {
+    init : function(grid, bodyElement, callback){
+        // there's no way for the grid to know if multiple columns 
+        // share the same editor so it will try to initialize the 
+        // same one over and over
+        if(this.initialized) return;
+        this.initialized = true;
+        this.callback = callback;
+        this.grid = grid;
+        bodyElement.appendChild(this.element.dom);
+        this.initEvents();
+    },
+    
+    initEvents : function(){
+        var stopOnEnter = function(e){
+            if(e.browserEvent.keyCode == e.RETURN){
+                this.stopEditing(true);
+            }
+        }
+        this.element.mon('keydown', stopOnEnter, this, true);
+        this.element.on('blur', this.stopEditing, this, true);
+    },
+
+    startEditing : function(value, row, cell){
+        this.originalValue = value;
+        this.rowIndex = row.rowIndex;
+        this.colIndex = cell.columnIndex;
+        this.cell = cell;
+        this.setValue(value);
+        var cellbox = getEl(cell, true).getBox();
+        this.fitToCell(cellbox);
+        this.editing = true;
+        this.show();
+    },
+     
+    stopEditing : function(focusCell){
+         if(this.editing){
+             this.editing = false;
+             var newValue = this.getValue();
+             this.hide();
+             //if(focusCell){try{this.cell.focus();}catch(e){}}; // try to give the cell focus so keyboard nav still works
+             if(this.originalValue != newValue){
+                this.callback(newValue, this.rowIndex, this.colIndex);
+             }
+         }
+     },
+     
+    setValue : function(value){
+        this.element.dom.value = value;
+    },
+    
+    getValue : function(){
+        return this.element.dom.value;
+    },
+    
+    fitToCell : function(box){
+        this.element.setBox(box, true);
+    },
+    
+    show : function(){
+        this.element.show();
+        this.element.focus();
+    },
+    
+    hide : function(){
+        try{
+            this.element.dom.blur();
+        }catch(e){}
+        this.element.hide();
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-CheckboxEditor.js.html b/www/extras/yui-ext/docs/overview-summary-CheckboxEditor.js.html new file mode 100644 index 000000000..5d0a7e878 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-CheckboxEditor.js.html @@ -0,0 +1,116 @@ + + + + + Overview + + + + + +
+ +

CheckboxEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.CheckboxEditor 
+
+ + + + + + + +
+YAHOO.ext.grid.CheckboxEditor = function(){
+    var div = document.createElement('span');
+    div.className = 'ygrid-editor ygrid-checkbox-editor';
+    var cb = document.createElement('input');
+    cb.type = 'checkbox';
+    cb.setAttribute('autocomplete', 'off');
+    div.appendChild(cb);
+    document.body.appendChild(div);
+    YAHOO.ext.grid.CheckboxEditor.superclass.constructor.call(this, div);
+    div.tabIndex = '';
+    cb.tabIndex = 1;
+    this.cb = getEl(cb, true);
+};
+
+YAHOO.extendX(YAHOO.ext.grid.CheckboxEditor, YAHOO.ext.grid.CellEditor);
+
+YAHOO.ext.grid.CheckboxEditor.prototype.fitToCell = function(box){
+    this.element.setBox(box, true);
+};
+
+YAHOO.ext.grid.CheckboxEditor.prototype.setValue = function(value){
+     this.cb.dom.checked = (value === true || value === 'true' || value === 1 || value === '1');
+};
+
+YAHOO.ext.grid.CheckboxEditor.prototype.getValue = function(){
+     return this.cb.dom.checked;
+};
+
+YAHOO.ext.grid.CheckboxEditor.prototype.show = function(){
+    this.element.show();
+    this.cb.focus();
+};
+
+YAHOO.ext.grid.CheckboxEditor.prototype.initEvents = function(){
+    var stopOnEnter = function(e){
+        if(e.browserEvent.keyCode == e.RETURN){
+            this.stopEditing(true);
+        }
+    }
+    this.cb.mon('keydown', stopOnEnter, this, true);
+    this.cb.on('blur', this.stopEditing, this, true);
+};
+
+YAHOO.ext.grid.CheckboxEditor.prototype.hide = function(){
+    try{
+        this.cb.dom.blur();
+    }catch(e){}
+    this.element.hide();
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-DateEditor.js.html b/www/extras/yui-ext/docs/overview-summary-DateEditor.js.html new file mode 100644 index 000000000..6f26059d9 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-DateEditor.js.html @@ -0,0 +1,306 @@ + + + + + Overview + + + + + +
+ +

DateEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.DateEditor 
+
+ + + + + + + +
YAHOO.ext.grid.DateEditor = function(config){
+    var div = document.createElement('span');
+    div.className = 'ygrid-editor ygrid-editor-container';
+    
+    var element = document.createElement('input');
+    element.type = 'text';
+    element.tabIndex = 1;
+    element.setAttribute('autocomplete', 'off');
+    div.appendChild(element);
+    
+    var pick = document.createElement('span');
+    pick.className = 'pick-button';
+    div.appendChild(pick);
+    
+    document.body.appendChild(div);
+    
+    this.div = getEl(div, true);
+    this.element = getEl(element, true);
+    this.pick = getEl(pick, true);
+    
+    this.colIndex = null;
+    this.rowIndex = null;
+    this.grid = null;
+    this.editing = false;
+    this.originalValue = null;
+    this.initialized = false;
+    this.callback = null;
+    
+    this.cal = null;
+    this.mouseDownHandler = YAHOO.ext.EventManager.wrap(this.handleMouseDown, this, true);
+    
+    YAHOO.ext.util.Config.apply(this, config);
+    if(typeof this.minValue == 'string') this.minValue = this.parseDate(this.minValue);
+    if(typeof this.maxValue == 'string') this.maxValue = this.parseDate(this.maxValue);
+    this.ddMatch = /ddnone/;
+    if(this.disabledDates){
+        var dd = this.disabledDates;
+        var re = "(?:";
+        for(var i = 0; i < dd.length; i++){
+            re += dd[i];
+            if(i != dd.length-1) re += "|";
+        }
+        this.ddMatch = new RegExp(re + ")");
+    }
+};
+
+YAHOO.ext.grid.DateEditor.prototype = {
+    init : function(grid, bodyElement, callback){
+        if(this.initialized) return;
+        
+        this.initialized = true;
+        this.callback = callback;
+        this.grid = grid;
+        bodyElement.appendChild(this.div.dom);
+        this.initEvents();
+    },
+    
+    initEvents : function(){
+         var stopOnEnter = function(e){
+            if(e.browserEvent.keyCode == e.RETURN){
+                this.stopEditing(true);
+            }
+        }
+        this.element.mon('keydown', stopOnEnter, this, true);
+        var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this);
+        this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay]));
+        this.pick.on('click', this.showCalendar, this, true);
+    },
+    
+    startEditing : function(value, row, cell){
+        this.originalValue = value;
+        this.rowIndex = row.rowIndex;
+        this.colIndex = cell.columnIndex;
+        this.cell = cell;
+        this.setValue(value);
+        this.validate();
+        var cellbox = getEl(cell, true).getBox();
+        this.div.setBox(cellbox, true);
+        this.element.setWidth(cellbox.width-this.pick.getWidth());
+        this.editing = true;
+        YAHOO.util.Event.on(document, "mousedown", this.mouseDownHandler);
+        this.show();
+    },
+     
+     stopEditing : function(focusCell){
+         if(this.editing){
+             YAHOO.util.Event.removeListener(document, "mousedown", this.mouseDownHandler);
+             this.editing = false;
+             var newValue = this.getValue();
+             this.hide();
+             //if(focusCell){try{this.cell.focus();}catch(e){}}// try to give the cell focus so keyboard nav still works
+             if(this.originalValue != newValue){
+                this.callback(newValue, this.rowIndex, this.colIndex);
+             }
+         }
+     },
+    
+    setValue : function(value){
+        this.element.dom.value = this.formatDate(value);
+        this.validate();
+    },
+    
+    getValue : function(){
+        if(!this.validate()){
+           return this.originalValue;
+       }else{
+           var value = this.element.dom.value;
+           if(value.length < 1){
+               return value;
+           } else{
+               return this.parseDate(value);
+           }
+       }   
+    },
+    
+    show : function() {
+        this.div.show();
+        this.element.focus();
+        this.validate();
+    },
+    
+    hide : function(){
+        try{
+            this.element.dom.blur();
+        }catch(e){}
+        this.div.hide();
+    },
+    
+    validate : function(){
+        var dom = this.element.dom;
+        var value = dom.value;
+        if(value.length < 1){ // if it's blank
+             if(this.allowBlank){
+                 dom.title = '';
+                 this.element.removeClass('ygrid-editor-invalid');
+                 return true;
+             }else{
+                 dom.title = this.blankText;
+                 this.element.addClass('ygrid-editor-invalid');
+                 return false;
+             }
+        }
+        value = this.parseDate(value);
+        if(!value){
+            dom.title = this.invalidText.replace('%0', dom.value).replace('%1', this.format);
+            this.element.addClass('ygrid-editor-invalid');
+            return false;
+        }
+        var time = value.getTime();
+        if(this.minValue && time < this.minValue.getTime()){
+            dom.title = this.minText.replace('%0', this.formatDate(this.minValue));
+            this.element.addClass('ygrid-editor-invalid');
+            return false;
+        }
+        if(this.maxValue && time > this.maxValue.getTime()){
+            dom.title = this.maxText.replace('%0', this.formatDate(this.maxValue));
+            this.element.addClass('ygrid-editor-invalid');
+            return false;
+        }
+        if(this.disabledDays){
+            var day = value.getDay();
+            for(var i = 0; i < this.disabledDays.length; i++) {
+            	if(day === this.disabledDays[i]){
+            	    dom.title = this.disabledDaysText;
+                    this.element.addClass('ygrid-editor-invalid');
+                    return false;
+            	}
+            }
+        }
+        var fvalue = this.formatDate(value);
+        if(this.ddMatch.test(fvalue)){
+            dom.title = this.disabledDatesText.replace('%0', fvalue);
+            this.element.addClass('ygrid-editor-invalid');
+            return false;
+        }
+        var msg = this.validator(value);
+        if(msg !== true){
+            dom.title = msg;
+            this.element.addClass('ygrid-editor-invalid');
+            return false;
+        }
+        dom.title = '';
+        this.element.removeClass('ygrid-editor-invalid');
+        return true;
+    },
+    
+    handleMouseDown : function(e){
+        var t = e.getTarget();
+        var dom = this.div.dom;
+        if(t != dom && !YAHOO.util.Dom.isAncestor(dom, t)){
+            this.stopEditing();
+        }
+    },
+    
+    showCalendar : function(value){
+        if(this.cal == null){
+            this.cal = new YAHOO.ext.DatePicker(this.div.dom.parentNode.parentNode);
+        }
+        this.cal.minDate = this.minValue;
+        this.cal.maxDate = this.maxValue;
+        this.cal.disabledDatesRE = this.ddMatch;
+        this.cal.disabledDatesText = this.disabledDatesText;
+        this.cal.disabledDays = this.disabledDays;
+        this.cal.disabledDaysText = this.disabledDaysText;
+        this.cal.format = this.format;
+        if(this.minValue){
+            this.cal.minText = this.minText.replace('%0', this.formatDate(this.minValue));
+        }
+        if(this.maxValue){
+            this.cal.maxText = this.maxText.replace('%0', this.formatDate(this.maxValue));
+        }
+        var r = this.div.getRegion();
+        this.cal.show(r.left, r.bottom, this.getValue(), this.setValue.createDelegate(this));
+    },
+    
+    parseDate : function(value){
+        if(!value || value instanceof Date) return value;
+        return Date.parseDate(value, this.format);
+    },
+    
+    formatDate : function(date){
+        if(!date || !(date instanceof Date)) return date;
+        return date.format(this.format);
+    }
+};
+
+YAHOO.ext.grid.DateEditor.prototype.format = 'm/d/y';
+YAHOO.ext.grid.DateEditor.prototype.disabledDays = null;
+YAHOO.ext.grid.DateEditor.prototype.disabledDaysText = '';
+YAHOO.ext.grid.DateEditor.prototype.disabledDates = null;
+YAHOO.ext.grid.DateEditor.prototype.disabledDatesText = '';
+YAHOO.ext.grid.DateEditor.prototype.allowBlank = true;
+YAHOO.ext.grid.DateEditor.prototype.minValue = null;
+YAHOO.ext.grid.DateEditor.prototype.maxValue = null;
+YAHOO.ext.grid.DateEditor.prototype.minText = 'The date in this field must be after %0';
+YAHOO.ext.grid.DateEditor.prototype.maxText = 'The date in this field must be before %0';
+YAHOO.ext.grid.DateEditor.prototype.blankText = 'This field cannot be blank';
+YAHOO.ext.grid.DateEditor.prototype.invalidText = '%0 is not a valid date - it must be in the format %1';
+YAHOO.ext.grid.DateEditor.prototype.validationDelay = 200;
+YAHOO.ext.grid.DateEditor.prototype.validator = function(){return true;};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-DatePicker.js.html b/www/extras/yui-ext/docs/overview-summary-DatePicker.js.html new file mode 100644 index 000000000..4a81a82ff --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-DatePicker.js.html @@ -0,0 +1,398 @@ + + + + + Overview + + + + + +
+ +

DatePicker.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.DatePicker 
+
+ + + + + + + +
YAHOO.ext.DatePicker = function(id, parentElement){
+    this.id = id;
+    this.selectedDate = new Date();
+    this.visibleDate = new Date();
+    this.element = null;
+    this.shadow = null;
+    this.callback = null;
+    this.buildControl(parentElement || document.body);
+    this.mouseDownHandler = YAHOO.ext.EventManager.wrap(this.handleMouseDown, this, true);
+    this.keyDownHandler = YAHOO.ext.EventManager.wrap(this.handleKeyDown, this, true);
+    this.wheelHandler = YAHOO.ext.EventManager.wrap(this.handleMouseWheel, this, true);
+};
+
+YAHOO.ext.DatePicker.prototype = {
+    show : function(x, y, value, callback){
+        this.hide();
+        this.selectedDate = value;
+        this.visibleDate = value;
+        this.callback = callback;
+        this.refresh();
+        this.element.show();
+        this.element.moveTo(x, y);
+        this.shadow.show();
+        this.shadow.setRegion(this.element.getRegion());
+        this.element.dom.tabIndex = 1;
+        this.element.focus();
+        YAHOO.util.Event.on(document, "mousedown", this.mouseDownHandler);
+        YAHOO.util.Event.on(document, "keydown", this.keyDownHandler);
+        YAHOO.util.Event.on(document, "mousewheel", this.wheelHandler);
+        YAHOO.util.Event.on(document, "DOMMouseScroll", this.wheelHandler);
+    },
+    
+    hide : function(){
+        this.shadow.hide();
+        this.element.hide();
+        YAHOO.util.Event.removeListener(document, "mousedown", this.mouseDownHandler);
+        YAHOO.util.Event.removeListener(document, "keydown", this.keyDownHandler);
+        YAHOO.util.Event.removeListener(document, "mousewheel", this.wheelHandler);
+        YAHOO.util.Event.removeListener(document, "DOMMouseScroll", this.wheelHandler);
+    },
+    
+    setSelectedDate : function(date){
+        this.selectedDate = date;
+    },
+    
+    getSelectedDate : function(){
+        return this.selectedDate;
+    },
+    
+    showPrevMonth : function(){
+        this.visibleDate = this.getPrevMonth(this.visibleDate);
+        this.refresh();
+    },
+    
+    showNextMonth : function(){
+        this.visibleDate = this.getNextMonth(this.visibleDate);
+        this.refresh();
+    },
+    
+    showPrevYear : function(){
+        var d = this.visibleDate;
+        this.visibleDate = new Date(d.getFullYear()-1, d.getMonth(), d.getDate());
+        this.refresh();
+    },
+    
+    showNextYear : function(){
+        var d = this.visibleDate;
+        this.visibleDate = new Date(d.getFullYear()+1, d.getMonth(), d.getDate());
+        this.refresh();
+    },
+    
+    handleMouseDown : function(e){
+        var target = e.getTarget();
+        if(target != this.element.dom && !YAHOO.util.Dom.isAncestor(this.element.dom, target)){
+            this.hide();
+        }
+    },
+    
+    handleKeyDown : function(e){
+        switch(e.browserEvent.keyCode){
+            case e.LEFT:
+                this.showPrevMonth();
+                e.stopEvent();
+            break;
+            case e.RIGHT:
+                this.showNextMonth();
+                e.stopEvent();
+            break;
+            case e.DOWN:
+                this.showPrevYear();
+                e.stopEvent();
+            break;
+            case e.UP:
+                this.showNextYear();
+                e.stopEvent();
+            break;
+        }
+    },
+    
+    handleMouseWheel : function(e){
+        var delta = e.getWheelDelta();
+        if(delta > 0){
+            this.showPrevMonth();
+            e.stopEvent();
+        } else if(delta < 0){
+            this.showNextMonth();
+            e.stopEvent();
+        }
+    },
+    
+    handleClick : function(e){
+        var d = this.visibleDate;
+        var t = e.getTarget();
+        if(t && t.className){
+            switch(t.className){
+                case 'active':
+                    this.handleSelection(new Date(d.getFullYear(), d.getMonth(), parseInt(t.innerHTML)));
+                break;
+                case 'prevday':
+                    var p = this.getPrevMonth(d);
+                    this.handleSelection(new Date(p.getFullYear(), p.getMonth(), parseInt(t.innerHTML)));
+                break;
+                case 'nextday':
+                    var n = this.getNextMonth(d);
+                    this.handleSelection(new Date(n.getFullYear(), n.getMonth(), parseInt(t.innerHTML)));
+                break;
+                case 'ypopcal-today':
+                    this.handleSelection(new Date());
+                break;
+                case 'next-month':
+                    this.showNextMonth();
+                break;
+                case 'prev-month':
+                    this.showPrevMonth();
+                break;
+            }   
+        }
+        e.stopEvent();
+    },
+    
+    selectToday : function(){
+        this.handleSelection(new Date());
+    },
+    
+    handleSelection: function(date){
+        this.selectedDate = date;
+        this.callback(date);
+        this.hide();    
+    },
+    
+    getPrevMonth : function(d){
+        var m = d.getMonth();var y = d.getFullYear();
+        return (m == 0 ? new Date(--y, 11, 1) : new Date(y, --m, 1));
+    },
+    
+    getNextMonth : function(d){
+        var m = d.getMonth();var y = d.getFullYear();
+        return (m == 11 ? new Date(++y, 0, 1) : new Date(y, ++m, 1));
+    },
+    
+    getDaysInMonth : function(m, y){
+        return (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) ? 31 : (m == 4 || m == 6 || m == 9 || m == 11) ? 30 : this.isLeapYear(y) ? 29 : 28;
+    },
+    
+    isLeapYear : function(y){
+        return (((y % 4) == 0) && ((y % 100) != 0) || ((y % 400) == 0));
+    },
+    
+    clearTime : function(date){
+        if(date){
+            date.setHours(0);
+            date.setMinutes(0);
+            date.setSeconds(0);
+            date.setMilliseconds(0);
+        }
+        return date;
+    },
+    
+    refresh : function(){
+        var d = this.visibleDate;
+        this.buildInnerCal(d);
+        this.calHead.update(this.monthNames[d.getMonth()] + ' ' + d.getFullYear());
+        if(this.element.isVisible()){
+            this.shadow.setRegion(this.element.getRegion());
+        }
+    }
+};
+
+/**
+ * This code is not pretty, but it is fast!
+ * @ignore
+ */ 
+YAHOO.ext.DatePicker.prototype.buildControl = function(parentElement){
+    var c = document.createElement('div');
+    c.style.position = 'absolute';
+    c.style.visibility = 'hidden';
+    document.body.appendChild(c);
+    var html = '<iframe id="'+this.id+'_shdw" frameborder="0" style="position:absolute; z-index:2000; display:none; top:0px; left:0px;" class="ypopcal-shadow"></iframe>' +
+    '<div hidefocus="true" class="ypopcal" id="'+this.id+'" style="-moz-outline:none; position:absolute; z-index:2001; display:none; top:0px; left:0px;">' +
+    '<table class="ypopcal-head" border=0 cellpadding=0 cellspacing=0><tbody><tr><td class="ypopcal-arrow"><div class="prev-month">&nbsp;</div></td><td class="ypopcal-month">&nbsp;</td><td class="ypopcal-arrow"><div class="next-month">&nbsp;</div></td></tr></tbody></table>' +
+    '<center><div class="ypopcal-inner">';
+    html += "<table border=0 cellpadding=2 cellspacing=0 class=\"ypopcal-table\"><thead><tr class=\"ypopcal-daynames\">";
+    var names = this.dayNames;
+    for(var i = 0; i < names.length; i++){
+        html += '<td>' + names[i].substr(0, 1) + '</td>';
+    }
+    html+= "</tr></thead><tbody><tr>";
+    for(var i = 0; i < 42; i++) {
+        if(i % 7 == 0 && i != 0){
+            html += '</tr><tr>';
+        }
+        html += "<td>&nbsp;</td>";
+    }
+    html += "</tr></tbody></table>";
+    html += '</div><button class="ypopcal-today" style="margin-top:2px;">'+this.todayText+'</button></center></div>';
+    c.innerHTML = html;
+    this.shadow = getEl(c.childNodes[0], true);
+    this.shadow.enableDisplayMode();
+    this.element = getEl(c.childNodes[1], true);
+    this.element.enableDisplayMode();
+    document.body.appendChild(this.shadow.dom);
+    document.body.appendChild(this.element.dom);
+    document.body.removeChild(c);
+    this.element.on("selectstart", function(){return false;});
+    var tbody = this.element.dom.getElementsByTagName('tbody')[1];
+    this.cells = tbody.getElementsByTagName('td');
+    this.calHead = this.element.getChildrenByClassName('ypopcal-month', 'td')[0];
+    this.element.mon('mousedown', this.handleClick, this, true);
+};
+
+YAHOO.ext.DatePicker.prototype.buildInnerCal = function(dateVal){
+    var days = this.getDaysInMonth(dateVal.getMonth() + 1, dateVal.getFullYear());
+    var firstOfMonth = new Date(dateVal.getFullYear(), dateVal.getMonth(), 1);
+    var startingPos = firstOfMonth.getDay();
+    if(startingPos == 0) startingPos = 7;
+    var pm = this.getPrevMonth(dateVal);
+    var prevStart = this.getDaysInMonth(pm.getMonth()+1, pm.getFullYear())-startingPos;
+    var cells = this.cells;
+    days += startingPos;
+    
+    // convert everything to numbers so it's fast
+    var day = 86400000;
+    var date = this.clearTime(new Date(pm.getFullYear(), pm.getMonth(), prevStart));
+    var today = this.clearTime(new Date()).getTime();
+    var sel = this.selectedDate ? this.clearTime(this.selectedDate).getTime() : today + 1; //today +1 will never match anything
+    var min = this.minDate ? this.clearTime(this.minDate).getTime() : Number.NEGATIVE_INFINITY;
+    var max = this.maxDate ? this.clearTime(this.maxDate).getTime() : Number.POSITIVE_INFINITY;
+    var ddMatch = this.disabledDatesRE;
+    var ddText = this.disabledDatesText;
+    var ddays = this.disabledDays;
+    var ddaysText = this.disabledDaysText;
+    var format = this.format;
+    
+    var setCellClass = function(cal, cell, d){
+        cell.title = '';
+        var t = d.getTime();
+        if(t == today){
+            cell.className += ' today';
+            cell.title = cal.todayText;
+        }
+        if(t == sel){
+            cell.className += ' selected';
+        }
+        // disabling
+        if(t < min) {
+            cell.className = ' ypopcal-disabled';
+            cell.title = cal.minText;
+            return;
+        }
+        if(t > max) {
+            cell.className = ' ypopcal-disabled';
+            cell.title = cal.maxText;
+            return;
+        }
+        if(ddays){
+            var day = d.getDay();
+            for(var i = 0; i < ddays.length; i++) {
+            	if(day === ddays[i]){
+            	    cell.title = ddaysText;
+                    cell.className = ' ypopcal-disabled';
+                    return;
+                }
+            }
+        }
+        if(ddMatch && format){
+            var fvalue = d.format(format);
+            if(ddMatch.test(fvalue)){
+                cell.title = ddText.replace('%0', fvalue);
+                cell.className = ' ypopcal-disabled';
+                return;
+            }
+        }
+    };
+    
+    var i = 0;
+    for(; i < startingPos; i++) {
+        cells[i].innerHTML = (++prevStart);
+        date.setDate(date.getDate()+1);
+        cells[i].className = 'prevday';
+        setCellClass(this, cells[i], date);
+    }
+    for(; i < days; i++){
+        intDay = i - startingPos + 1;
+        cells[i].innerHTML = (intDay);
+        date.setDate(date.getDate()+1);
+        cells[i].className = 'active';
+        setCellClass(this, cells[i], date);
+    }
+    var extraDays = 0;
+    for(; i < 42; i++) {
+         cells[i].innerHTML = (++extraDays);
+         date.setDate(date.getDate()+1);
+         cells[i].className = 'nextday';
+         setCellClass(this, cells[i], date);
+    }
+};
+
+YAHOO.ext.DatePicker.prototype.todayText = "Today";
+YAHOO.ext.DatePicker.prototype.minDate = null;
+YAHOO.ext.DatePicker.prototype.maxDate = null;
+YAHOO.ext.DatePicker.prototype.minText = "This date is before the minimum date";
+YAHOO.ext.DatePicker.prototype.maxText = "This date is after the maximum date";
+YAHOO.ext.DatePicker.prototype.format = 'm/d/y';
+YAHOO.ext.DatePicker.prototype.disabledDays = null;
+YAHOO.ext.DatePicker.prototype.disabledDaysText = '';
+YAHOO.ext.DatePicker.prototype.disabledDatesRE = null;
+YAHOO.ext.DatePicker.prototype.disabledDatesText = '';
+
+
+YAHOO.ext.DatePicker.prototype.monthNames = Date.monthNames;
+
+YAHOO.ext.DatePicker.prototype.dayNames = Date.dayNames;
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-DefaultColumnModel.js.html b/www/extras/yui-ext/docs/overview-summary-DefaultColumnModel.js.html new file mode 100644 index 000000000..16ffad634 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-DefaultColumnModel.js.html @@ -0,0 +1,360 @@ + + + + + Overview + + + + + +
+ +

DefaultColumnModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.DefaultColumnModelThis is the default implementation of a ColumnModel used by the Grid.
+
+ + + + + + + +
+/**
+ * @class
+ * This is the default implementation of a ColumnModel used by the Grid. It defines
+ * the columns in the grid.
+ * <br>Usage:<br>
+ * <pre><code>
+ * var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;
+ * var myColumns = [
+	{header: "Ticker", width: 60, sortable: true, sortType: sort.asUCString}, 
+	{header: "Company Name", width: 150, sortable: true, sortType: sort.asUCString}, 
+	{header: "Market Cap.", width: 100, sortable: true, sortType: sort.asFloat}, 
+	{header: "$ Sales", width: 100, sortable: true, sortType: sort.asFloat, renderer: money}, 
+	{header: "Employees", width: 100, sortable: true, sortType: sort.asFloat}
+ * ];
+ * var colModel = new YAHOO.ext.grid.DefaultColumnModel(myColumns);
+ * </code></pre>
+ * @extends YAHOO.ext.grid.AbstractColumnModel
+ * @constructor
+*/
+YAHOO.ext.grid.DefaultColumnModel = function(config){
+	YAHOO.ext.grid.DefaultColumnModel.superclass.constructor.call(this);
+    /**
+     * The config passed into the constructor
+     */
+    this.config = config;
+    
+    /**
+     * The width of columns which have no width specified (defaults to 100)
+     * @type Number
+     */
+    this.defaultWidth = 100;
+    /**
+     * Default sortable of columns which have no sortable specified (defaults to false)
+     * @type Boolean
+     */
+    this.defaultSortable = false;
+};
+YAHOO.extendX(YAHOO.ext.grid.DefaultColumnModel, YAHOO.ext.grid.AbstractColumnModel);
+
+/**
+ * Returns the number of columns.
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnCount = function(){
+    return this.config.length;
+};
+    
+/**
+ * Returns true if the specified column is sortable.
+ * @param {Number} col The column index
+ * @return {Boolean}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.isSortable = function(col){
+    if(typeof this.config[col].sortable == 'undefined'){
+        return this.defaultSortable;
+    }
+    return this.config[col].sortable;
+};
+    
+/**
+ * Returns the sorting comparison function defined for the column (defaults to sortTypes.none).
+ * @param {Number} col The column index
+ * @return {Function}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getSortType = function(col){
+    if(!this.dataMap){
+        // build a lookup so we don't search every time
+        var map = [];
+        for(var i = 0, len = this.config.length; i < len; i++){
+            map[this.getDataIndex(i)] = i;
+        }
+        this.dataMap = map;
+    }
+    col = this.dataMap[col];
+    if(!this.config[col].sortType){
+        return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none;
+    }
+    return this.config[col].sortType;
+};
+    
+/**
+ * Sets the sorting comparison function for a column.
+ * @param {Number} col The column index
+ * @param {Function} fn
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setSortType = function(col, fn){
+    this.config[col].sortType = fn;
+};
+    
+
+/**
+ * Returns the rendering (formatting) function defined for the column.
+ * @param {Number} col The column index
+ * @return {Function}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getRenderer = function(col){
+    if(!this.config[col].renderer){
+        return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer;
+    }
+    return this.config[col].renderer;
+};
+    
+/**
+ * Sets the rendering (formatting) function for a column.
+ * @param {Number} col The column index
+ * @param {Function} fn
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setRenderer = function(col, fn){
+    this.config[col].renderer = fn;
+};
+    
+/**
+ * Returns the width for the specified column.
+ * @param {Number} col The column index
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnWidth = function(col){
+    return this.config[col].width || this.defaultWidth;
+};
+    
+/**
+ * Sets the width for a column.
+ * @param {Number} col The column index
+ * @param {Number} width The new width
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setColumnWidth = function(col, width, suppressEvent){
+    this.config[col].width = width;
+    this.totalWidth = null;
+    if(!suppressEvent){
+         this.onWidthChange.fireDirect(this, col, width);
+    }
+};
+    
+/**
+ * Returns the total width of all columns.
+ * @param {Boolean} includeHidden True to include hidden column widths
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getTotalWidth = function(includeHidden){
+    if(!this.totalWidth){
+        this.totalWidth = 0;
+        for(var i = 0; i < this.config.length; i++){
+            if(includeHidden || !this.isHidden(i)){
+                this.totalWidth += this.getColumnWidth(i);
+            }
+        }
+    }
+    return this.totalWidth;
+};
+    
+/**
+ * Returns the header for the specified column.
+ * @param {Number} col The column index
+ * @return {String}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnHeader = function(col){
+    return this.config[col].header;
+};
+     
+/**
+ * Sets the header for a column.
+ * @param {Number} col The column index
+ * @param {String} header The new header
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setColumnHeader = function(col, header){
+    this.config[col].header = header;
+    this.onHeaderChange.fireDirect(this, col, header);
+};
+/**
+ * Returns the dataIndex for the specified column.
+ * @param {Number} col The column index
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getDataIndex = function(col){
+    if(typeof this.config[col].dataIndex != 'number'){
+        return col;
+    }
+    return this.config[col].dataIndex;
+};
+     
+/**
+ * Sets the dataIndex for a column.
+ * @param {Number} col The column index
+ * @param {Number} dataIndex The new dataIndex
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setDataIndex = function(col, dataIndex){
+    this.config[col].dataIndex = dataIndex;
+};
+/**
+ * Returns true if the cell is editable.
+ * @param {Number} colIndex The column index
+ * @param {Number} rowIndex The row index
+ * @return {Boolean}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.isCellEditable = function(colIndex, rowIndex){
+    return this.config[colIndex].editable || (typeof this.config[colIndex].editable == 'undefined' && this.config[colIndex].editor);
+};
+
+/**
+ * Returns the editor defined for the cell/column.
+ * @param {Number} colIndex The column index
+ * @param {Number} rowIndex The row index
+ * @return {Object}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.getCellEditor = function(colIndex, rowIndex){
+    return this.config[colIndex].editor;
+};
+   
+/**
+ * Sets if a column is editable.
+ * @param {Number} col The column index
+ * @param {Boolean} editable True if the column is editable
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setEditable = function(col, editable){
+    this.config[col].editable = editable;
+};
+
+
+/**
+ * Returns true if the column is hidden.
+ * @param {Number} colIndex The column index
+ * @return {Boolean}
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.isHidden = function(colIndex){
+    return this.config[colIndex].hidden;
+};
+   
+/**
+ * Sets if a column is hidden.
+ * @param {Number} colIndex The column index
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setHidden = function(colIndex, hidden){
+    this.config[colIndex].hidden = hidden;
+    this.totalWidth = null;
+    this.fireHiddenChange(colIndex, hidden);
+};
+
+/**
+ * Sets the editor for a column.
+ * @param {Number} col The column index
+ * @param {Object} editor The editor object
+ */
+YAHOO.ext.grid.DefaultColumnModel.prototype.setEditor = function(col, editor){
+    this.config[col].editor = editor;
+};
+
+
+/**
+ * Default empty rendering function
+ */
+YAHOO.ext.grid.DefaultColumnModel.defaultRenderer = function(value){
+	if(typeof value == 'string' && value.length < 1){
+	    return '&nbsp;';
+	}
+	return value;
+}
+
+/**
+ * Defines the default sorting (casting?) comparison functions used when sorting data:
+ * <br>&nbsp;&nbsp;sortTypes.none - sorts data as it is without casting or parsing (the default)
+ * <br>&nbsp;&nbsp;sortTypes.asUCString - case insensitive string
+ * <br>&nbsp;&nbsp;sortTypes.asDate - attempts to parse data as a date
+ * <br>&nbsp;&nbsp;sortTypes.asFloat
+ * <br>&nbsp;&nbsp;sortTypes.asInt
+ */
+YAHOO.ext.grid.DefaultColumnModel.sortTypes = {};
+
+YAHOO.ext.grid.DefaultColumnModel.sortTypes.none = function(s) {
+	return s;
+};
+
+YAHOO.ext.grid.DefaultColumnModel.sortTypes.asUCString = function(s) {
+	return String(s).toUpperCase();
+};
+
+YAHOO.ext.grid.DefaultColumnModel.sortTypes.asDate = function(s) {
+    if(s instanceof Date){
+        return s;
+    }
+	return Date.parse(String(s));
+};
+
+YAHOO.ext.grid.DefaultColumnModel.sortTypes.asFloat = function(s) {
+	var val = parseFloat(String(s).replace(/,/g, ''));
+    if(isNaN(val)) val = 0;
+	return val;
+};
+
+YAHOO.ext.grid.DefaultColumnModel.sortTypes.asInt = function(s) {
+    var val = parseInt(String(s).replace(/,/g, ''));
+    if(isNaN(val)) val = 0;
+	return val;
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-DefaultDataModel.js.html b/www/extras/yui-ext/docs/overview-summary-DefaultDataModel.js.html new file mode 100644 index 000000000..c671de81d --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-DefaultDataModel.js.html @@ -0,0 +1,369 @@ + + + + + Overview + + + + + +
+ +

DefaultDataModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.DefaultDataModelThis is the default implementation of a DataModel used by the Grid.
+
+ + + + + + + +
+/**
+ * @class
+ * This is the default implementation of a DataModel used by the Grid. It works 
+ * with multi-dimensional array based data. Using the event system in the base class 
+ * {@link YAHOO.ext.grid.AbstractDataModel}, all updates to this DataModel are automatically
+ * reflected in the user interface.
+ * <br>Usage:<br>
+ * <pre><code>
+ * var myData = [
+	["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
+	["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"]
+ * ];
+ * var dataModel = new YAHOO.ext.grid.DefaultDataModel(myData);
+ * </code></pre>
+ * @extends YAHOO.ext.grid.AbstractDataModel
+ * @constructor
+*/
+YAHOO.ext.grid.DefaultDataModel = function(data){
+    YAHOO.ext.grid.DefaultDataModel.superclass.constructor.call(this);
+    /**@private*/
+    this.data = data;
+};
+YAHOO.extendX(YAHOO.ext.grid.DefaultDataModel, YAHOO.ext.grid.AbstractDataModel);
+
+/**
+ * Returns the number of rows in the dataset
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.getRowCount = function(){
+    return this.data.length;
+};
+    
+/**
+ * Returns the ID of the specified row. By default it return the value of the first column. 
+ * Override to provide more advanced ID handling. 
+ * @return {Number}
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.getRowId = function(rowIndex){
+    return this.data[rowIndex][0];
+};
+
+/**
+ * Returns the column data for the specified row. 
+ * @return {Array}
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.getRow = function(rowIndex){
+    return this.data[rowIndex];
+};
+
+/**
+ * Returns the column data for the specified rows as a 
+ * multi-dimensional array: rows[3][0] would give you the value of row 4, column 0. 
+ * @param {Array} indexes The row indexes to fetch
+ * @return {Array}
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.getRows = function(indexes){
+    var data = this.data;
+    var r = [];
+    for(var i = 0; i < indexes.length; i++){
+       r.push(data[indexes[i]]);
+    }
+    return r;
+};
+
+/**
+ * Returns the value at the specified data position
+ * @param {Number} rowIndex
+ * @param {Number} colIndex
+ * @return {Object}
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.getValueAt = function(rowIndex, colIndex){
+	return this.data[rowIndex][colIndex];
+};
+
+/**
+ * Sets the specified value at the specified data position
+ * @param {Object} value The new value
+ * @param {Number} rowIndex
+ * @param {Number} colIndex
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.setValueAt = function(value, rowIndex, colIndex){
+    this.data[rowIndex][colIndex] = value;
+    this.fireCellUpdated(rowIndex, colIndex);
+};
+
+/**
+ * @private
+ * Removes the specified range of rows.
+ * @param {Number} startIndex
+ * @param {<i>Number</i>} endIndex (optional) Defaults to startIndex
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.removeRows = function(startIndex, endIndex){
+    endIndex = endIndex || startIndex;
+    this.data.splice(startIndex, endIndex-startIndex+1);
+    this.fireRowsDeleted(startIndex, endIndex);
+};
+
+/**
+ * Remove a row.
+ * @param {Number} index
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.removeRow = function(index){
+    this.data.splice(index, 1);
+    this.fireRowsDeleted(index, index);
+};
+
+/**
+ * @private
+ * Removes all rows.
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.removeAll = function(){
+	var count = this.getRowCount();
+	if(count > 0){
+    	this.removeRows(0, count-1);
+	}
+};
+
+/**
+ * Query the DataModel rows by the filters defined in spec, for example...
+ * <pre><code>
+ * // column 1 starts with Jack, column 2 filtered by myFcn, column 3 equals 'Fred'
+ * dataModel.filter({1: /^Jack.+/i}, 2: myFcn, 3: 'Fred'});
+ * </code></pre> 
+ * @param {Object} spec The spec is generally an object literal consisting of
+ * column index and filter type. The filter type can be a string/number (exact match),
+ * a regular expression to test using String.search() or a function to call. If it's a function, 
+ * it will be called with the value for the specified column and an array of the all column 
+ * values for that row: yourFcn(value, columnData). If it returns anything other than true, 
+ * the row is not a match.
+ * @param {Boolean} returnUnmatched True to return rows which <b>don't</b> match the query instead
+ * of rows that do match
+ * @return {Array} An array of row indexes that match
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.query = function(spec, returnUnmatched){
+    var d = this.data;
+    var r = [];
+    for(var i = 0; i < d.length; i++){
+        var row = d[i];
+        var isMatch = true;
+        for(var col in spec){
+            if(typeof spec[col] != 'function'){
+                if(!isMatch) continue;
+                var filter = spec[col];
+                switch(typeof filter){
+                    case 'string':
+                    case 'number':
+                    case 'boolean':
+                      if(row[col] != filter){
+                          isMatch = false;
+                      }
+                    break;
+                    case 'function':
+                      if(!filter(row[col], row)){
+                          isMatch = false;
+                      }
+                    break;
+                    case 'object':
+                       if(filter instanceof RegExp){
+                           if(String(row[col]).search(filter) === -1){
+                               isMatch = false;
+                           }
+                       }
+                    break;
+                }
+            }
+        }
+        if(isMatch && !returnUnmatched){
+            r.push(i);
+        }else if(!isMatch && returnUnmatched){
+            r.push(i);
+        }
+    }
+    return r;
+};
+
+/**
+ * Filter the DataModel rows by the query defined in spec, see {@link #query} for more details 
+ * on the query spec.
+ * @param {Object} query The query spec {@link #query}
+ * @return {Number} The number of rows removed
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.filter = function(query){
+    var matches = this.query(query, true);
+    var data = this.data;
+    // go thru the data setting matches to deleted
+    // while not disturbing row indexes
+    for(var i = 0; i < matches.length; i++){ 
+        data[matches[i]]._deleted = true;
+    }
+    for(var i = 0; i < data.length; i++){
+        while(data[i] && data[i]._deleted === true){
+            this.removeRow(i);
+        }
+    }
+    return matches.length;
+};
+
+/**
+ * Adds a row to the dataset.
+ * @param {Array} cellValues The array of values for the new row
+ * @return {Number} The index of the added row
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.addRow = function(cellValues){
+    this.data.push(cellValues);
+    var newIndex = this.data.length-1;
+    this.fireRowsInserted(newIndex, newIndex);
+    this.applySort();
+    return newIndex;
+};
+
+/**
+ * @private
+ * Adds a set of rows.
+ * @param {Array} rowData This should be an array of arrays like the constructor takes
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.addRows = function(rowData){
+    this.data = this.data.concat(rowData);
+    var firstIndex = this.data.length-rowData.length;
+    this.fireRowsInserted(firstIndex, firstIndex+rowData.length-1);
+    this.applySort();
+};
+
+/**
+ * Inserts a row a the specified location in the dataset.
+ * @param {Number} index The index where the row should be inserted
+ * @param {Array} cellValues The array of values for the new row
+ * @return {Number} The index the row was inserted in
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.insertRow = function(index, cellValues){
+    this.data.splice(index, 0, cellValues);
+    this.fireRowsInserted(index, index);
+    this.applySort();
+    return index;
+};
+
+/**
+ * @private
+ * Inserts a set of rows.
+ * @param {Number} index The index where the rows should be inserted
+ * @param {Array} rowData This should be an array of arrays like the constructor takes
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.insertRows = function(index, rowData){
+    /*
+    if(index == this.data.length){ // try these two first since they are faster
+        this.data = this.data.concat(rowData);
+    }else if(index == 0){
+        this.data = rowData.concat(this.data);
+    }else{
+        var newData = this.data.slice(0, index);
+        newData.concat(rowData);
+        newData.concat(this.data.slice(index));
+        this.data = newData;
+    }*/
+    var args = rowData.concat();
+    args.splice(0, 0, index, 0);
+    this.data.splice.apply(this.data, args);
+    this.fireRowsInserted(index, index+rowData.length-1);
+    this.applySort();
+};
+
+/**
+ * Applies the last used sort to the current data.
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.applySort = function(suppressEvent){
+	if(this.columnModel && typeof this.sortColumn != 'undefined'){
+		this.sort(this.columnModel, this.sortColumn, this.sortDir, suppressEvent);
+	}
+};
+
+YAHOO.ext.grid.DefaultDataModel.prototype.setDefaultSort = function(columnModel, columnIndex, direction){
+    this.columnModel = columnModel;
+    this.sortColumn = columnIndex;
+    this.sortDir = direction;
+};
+/**
+ * Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel.
+ * @param {YAHOO.ext.grid.DefaultColumnModel} columnModel The ColumnModel for this dataset
+ * @param {Number} columnIndex The column index to sort by
+ * @param {String} direction The direction of the sort ('DESC' or 'ASC')
+ */
+YAHOO.ext.grid.DefaultDataModel.prototype.sort = function(columnModel, columnIndex, direction, suppressEvent){
+    // store these so we can maintain sorting when we load new data
+    this.columnModel = columnModel;
+    this.sortColumn = columnIndex;
+    this.sortDir = direction;
+    
+    var dsc = direction == 'DESC';
+    var sortType = columnModel.getSortType(columnIndex);
+    var fn = function(cells, cells2){
+        var v1 = sortType(cells[columnIndex], cells);
+        var v2 = sortType(cells2[columnIndex], cells2);
+        if(v1 < v2)
+			return dsc ? -1 : +1;
+		if(v1 > v2)
+			return dsc ? +1 : -1;
+	    return 0;
+    };
+    this.data.sort(fn);
+    if(!suppressEvent){
+       this.fireRowsSorted(columnIndex, direction);
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-DomHelper.js.html b/www/extras/yui-ext/docs/overview-summary-DomHelper.js.html new file mode 100644 index 000000000..27659d426 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-DomHelper.js.html @@ -0,0 +1,376 @@ + + + + + Overview + + + + + +
+ +

DomHelper.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.DomHelper.TemplateRepresents an HTML fragment template +
+
+ + + + + + + +
/**
+ * @class
+ * Utility class for working with DOM
+ */
+YAHOO.ext.DomHelper = new function(){
+    /**@private*/
+    var d = document;
+    
+    /** True to force the use of DOM instead of html fragments @type Boolean */
+    this.useDom = false;
+    
+    // parse and apply styles to dom element
+    /** @ignore */
+    function applyStyles(el, styles){
+        if(styles){
+            var D = YAHOO.util.Dom;
+            var re = /\s?(.*?)\:(.*?);/g;
+            var matches;
+            while ((matches = re.exec(styles)) != null){
+                D.setStyle(el, matches[1], matches[2]);
+            }
+        }
+    }
+    
+    // build as innerHTML where available
+    /** @ignore */
+    function createHtml(o){
+        var b = '';
+        b += '<' + o.tag;
+        for(var attr in o){
+            if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue;
+            if(attr == 'cls'){
+                b += ' class="' + o['cls'] + '"';
+            }else{
+                b += ' ' + attr + '="' + o[attr] + '"';
+            }
+        }
+        b += '>';
+        if(o.children){
+            for(var i = 0, len = o.children.length; i < len; i++) {
+                b += createHtml(o.children[i], b);
+            }
+        }
+        if(o.html){
+            b += o.html;
+        }
+        b += '</' + o.tag + '>';
+        return b;
+    }
+    
+    // build as dom
+    /** @ignore */
+    function createDom(o, parentNode){
+        var el = d.createElement(o.tag);
+        var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute
+        for(var attr in o){
+            if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue;
+            if(attr=='cls'){
+                el.className = o['cls'];
+            }else{
+                if(useSet) el.setAttribute(attr, o[attr]);
+                else el[attr] = o[attr];
+            }
+        }
+        applyStyles(el, o.style);
+        if(o.children){
+            for(var i = 0, len = o.children.length; i < len; i++) {
+             	createDom(o.children[i], el);
+            }
+        }
+        if(o.html){
+            el.innerHTML = o.html;
+        }
+        if(parentNode){
+           parentNode.appendChild(el);
+        }
+        return el;
+    }
+    
+    /**
+     * Inserts an HTML fragment into the Dom
+     * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
+     * @param {HTMLElement} el The context element
+     * @param {String} html The HTML fragmenet
+     * @return {HTMLElement} The new node
+     */
+    this.insertHtml = function(where, el, html){
+        if(el.insertAdjacentHTML){
+            if(where == 'beforeBegin'){
+                el.insertAdjacentHTML(where, html);
+                return el.previousSibling;
+            }else if(where == 'afterBegin'){
+                el.insertAdjacentHTML(where, html);
+                return el.firstChild;
+            }else if(where == 'beforeEnd'){
+                el.insertAdjacentHTML(where, html);
+                return el.lastChild;
+            }else if(where == 'afterEnd'){
+                el.insertAdjacentHTML(where, html);
+                return el.nextSibling;
+            }
+            throw 'Illegal insertion point -> "' + where + '"';
+        }
+        var range = el.ownerDocument.createRange();
+        var frag;
+        if(where == 'beforeBegin'){
+            range.setStartBefore(el);
+            frag = range.createContextualFragment(html);
+            el.parentNode.insertBefore(frag, el);
+            return el.previousSibling;
+        }else if(where == 'afterBegin'){
+            range.selectNodeContents(el);
+            range.collapse(true);
+            frag = range.createContextualFragment(html);
+            el.insertBefore(frag, el.firstChild);
+            return el.firstChild;
+        }else if(where == 'beforeEnd'){
+            range.selectNodeContents(el);
+            range.collapse(false);
+            frag = range.createContextualFragment(html);
+            el.appendChild(frag);
+            return el.lastChild;
+        }else if(where == 'afterEnd'){
+            range.setStartAfter(el);
+            frag = range.createContextualFragment(html);
+            el.parentNode.insertBefore(frag, el.nextSibling);
+            return el.nextSibling;
+        }else{
+            throw 'Illegal insertion point -> "' + where + '"';
+        } 
+    };
+    
+    /**
+     * Creates new Dom element(s) and inserts them before el
+     * @param {HTMLElement} el The context element
+     * @param {Object} o The Dom object spec (and children)
+     * @return {HTMLElement} The new node
+     */
+    this.insertBefore = function(el, o){
+        el = YAHOO.util.Dom.get(el);
+        var newNode;
+        if(this.useDom){
+            newNode = createDom(o, null);
+            el.parentNode.insertBefore(newNode, el);
+        }else{
+            var html = createHtml(o);
+            newNode = this.insertHtml('beforeBegin', el, html);
+        }
+        return newNode;
+    };
+    
+    /**
+     * Creates new Dom element(s) and inserts them after el
+     * @param {HTMLElement} el The context element
+     * @param {Object} o The Dom object spec (and children)
+     * @return {HTMLElement} The new node
+     */
+    this.insertAfter = function(el, o){
+        el = YAHOO.util.Dom.get(el);
+        var newNode;
+        if(this.useDom){
+            newNode = createDom(o, null);
+            el.parentNode.insertBefore(newNode, el.nextSibling);
+        }else{
+            var html = createHtml(o);
+            newNode = this.insertHtml('afterEnd', el, html);
+        }
+        return newNode;
+    };
+    
+    /**
+     * Creates new Dom element(s) and appends them to el
+     * @param {HTMLElement} el The context element
+     * @param {Object} o The Dom object spec (and children)
+     * @return {HTMLElement} The new node
+     */
+    this.append = function(el, o){
+        el = YAHOO.util.Dom.get(el);
+        var newNode;
+        if(this.useDom){
+            newNode = createDom(o, null);
+            el.appendChild(newNode);
+        }else{
+            var html = createHtml(o);
+            newNode = this.insertHtml('beforeEnd', el, html);
+        }
+        return newNode;
+    };
+    
+    /**
+     * Creates new Dom element(s) and overwrites the contents of el with them
+     * @param {HTMLElement} el The context element
+     * @param {Object} o The Dom object spec (and children)
+     * @return {HTMLElement} The new node
+     */
+    this.overwrite = function(el, o){
+        el = YAHOO.util.Dom.get(el);
+        el.innerHTML = createHtml(o);
+        return el.firstChild;
+    };
+    
+    /**
+     * Creates a new YAHOO.ext.DomHelper.Template from the Dom object spec 
+     * @param {Object} o The Dom object spec (and children)
+     * @return {YAHOO.ext.DomHelper.Template} The new template
+     */
+    this.createTemplate = function(o){
+        var html = createHtml(o);
+        return new YAHOO.ext.DomHelper.Template(html);
+    };
+}();
+
+/**
+* @class
+* Represents an HTML fragment template
+* @constructor
+* @param {String} html The HTML fragment
+*/
+YAHOO.ext.DomHelper.Template = function(html){
+    /**@private*/
+    this.html = html;
+    /**@private*/
+    this.re = /\{(\w+)\}/g;
+};
+YAHOO.ext.DomHelper.Template.prototype = {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String}
+     */
+    applyTemplate : function(values){
+        if(this.compiled){
+            return this.compiled(values);
+        }
+        var empty = '';
+        var fn = function(match, index){
+            if(typeof values[index] != 'undefined'){
+                return values[index];
+            }else{
+                return empty;
+            }
+        }
+        return this.html.replace(this.re, fn);
+    },
+    
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead
+     */
+    compile : function(){
+        var html = this.html;
+        var re = /\{(\w+)\}/g;
+        var body = [];
+        body.push("this.compiled = function(values){ return ");
+        var result;
+        var lastMatchEnd = 0;
+        while ((result = re.exec(html)) != null){
+            body.push("'", html.substring(lastMatchEnd, result.index), "' + ");
+            body.push("values[", html.substring(result.index+1,re.lastIndex-1), "] + ");
+            lastMatchEnd = re.lastIndex;
+        }
+        body.push("'", html.substr(lastMatchEnd), "';};");
+        eval(body.join(''));
+    },
+   
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) before el
+     * @param {HTMLElement} el The context element
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {HTMLElement} The new node
+     */
+    insertBefore: function(el, values){
+        el = YAHOO.util.Dom.get(el);
+        return YAHOO.ext.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values));
+    },
+    
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) after el
+     * @param {HTMLElement} el The context element
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {HTMLElement} The new node
+     */
+    insertAfter : function(el, values){
+        el = YAHOO.util.Dom.get(el);
+        return YAHOO.ext.DomHelper.insertHtml('afterEnd', el, this.applyTemplate(values));
+    },
+    
+    /**
+     * Applies the supplied values to the template and append the new node(s) to el
+     * @param {HTMLElement} el The context element
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {HTMLElement} The new node
+     */
+    append : function(el, values){
+        el = YAHOO.util.Dom.get(el);
+        return YAHOO.ext.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values));
+    },
+    
+    /**
+     * Applies the supplied values to the template and overwrites the content of el with the new node(s)
+     * @param {HTMLElement} el The context element
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {HTMLElement} The new node
+     */
+    overwrite : function(el, values){
+        el = YAHOO.util.Dom.get(el);
+        el.innerHTML = '';
+        return YAHOO.ext.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values));
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-EditorGrid.js.html b/www/extras/yui-ext/docs/overview-summary-EditorGrid.js.html new file mode 100644 index 000000000..86d321120 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-EditorGrid.js.html @@ -0,0 +1,56 @@ + + + + + Overview + + + + + +
+ +

EditorGrid.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + +
+YAHOO.ext.grid.EditorGrid = function(container, dataModel, colModel){
+    YAHOO.ext.grid.EditorGrid.superclass.constructor.call(this, container, dataModel, 
+                      colModel, new YAHOO.ext.grid.EditorSelectionModel());
+    this.container.addClass('yeditgrid');
+};
+YAHOO.extendX(YAHOO.ext.grid.EditorGrid, YAHOO.ext.grid.Grid);
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-EditorSelectionModel.js.html b/www/extras/yui-ext/docs/overview-summary-EditorSelectionModel.js.html new file mode 100644 index 000000000..bb482a9d6 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-EditorSelectionModel.js.html @@ -0,0 +1,244 @@ + + + + + Overview + + + + + +
+ +

EditorSelectionModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.EditorAndSelectionModel 
YAHOO.ext.grid.EditorSelectionModelExtends YAHOO.ext.grid.DefaultSelectionModel to enable cell navigation.
+
+ + + + + + + +
+/**
+ @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to enable cell navigation. <br><br> 
+ @extends YAHOO.ext.grid.DefaultSelectionModel
+ @constructor
+ */
+YAHOO.ext.grid.EditorSelectionModel = function(){
+    YAHOO.ext.grid.EditorSelectionModel.superclass.constructor.call(this);
+    /** Number of clicks to activate a cell (for editing) - valid values are 1 or 2
+     * @type Number */
+    this.clicksToActivateCell = 1;
+    this.events['cellactivate'] = new YAHOO.util.CustomEvent('cellactivate');
+};
+
+YAHOO.extendX(YAHOO.ext.grid.EditorSelectionModel, YAHOO.ext.grid.DefaultSelectionModel);
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.disableArrowNavigation = false;
+YAHOO.ext.grid.EditorSelectionModel.prototype.controlForArrowNavigation = false;
+
+/** @ignore */
+YAHOO.ext.grid.EditorSelectionModel.prototype.initEvents = function(){
+    this.grid.addListener("cellclick", this.onCellClick, this, true);
+    this.grid.addListener("celldblclick", this.onCellDblClick, this, true);
+    this.grid.addListener("keydown", this.keyDown, this, true);
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.onCellClick = function(grid, rowIndex, colIndex){
+    if(this.clicksToActivateCell == 1){
+        var row = this.grid.getRow(rowIndex);
+        var cell = row.childNodes[colIndex];
+        if(cell){
+            this.activate(row, cell);
+        }
+    }
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.activate = function(row, cell){
+    this.fireEvent('cellactivate', this, row, cell);
+    this.grid.doEdit(row, cell);
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.onCellDblClick = function(grid, rowIndex, colIndex){
+    if(this.clicksToActivateCell == 2){
+        var row = this.grid.getRow(rowIndex);
+        var cell = row.childNodes[colIndex];
+        if(cell){
+            this.activate(row, cell);
+        }
+    }
+};
+
+/** @ignore */
+YAHOO.ext.grid.EditorSelectionModel.prototype.setRowState = function(row, selected){
+    YAHOO.ext.grid.EditorSelectionModel.superclass.setRowState.call(this, row, false, false);
+};
+/** @ignore */
+YAHOO.ext.grid.EditorSelectionModel.prototype.focusRow = function(row, selected){
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.getEditorCellAfter = function(cell, spanRows){
+    var g = this.grid;
+    var next = g.getCellAfter(cell);
+    while(next && !g.colModel.isCellEditable(next.columnIndex)){
+        next = g.getCellAfter(next);
+    }
+    if(!next && spanRows){
+        var row = g.getRowAfter(g.getRowFromChild(cell));
+        next = g.getFirstCell(row);
+        if(!g.colModel.isCellEditable(next.columnIndex)){
+            next = this.getEditorCellAfter(next);
+        }
+    }
+    return next;
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.getEditorCellBefore = function(cell, spanRows){
+    var g = this.grid;
+    var prev = g.getCellBefore(cell);
+    while(prev && !g.colModel.isCellEditable(prev.columnIndex)){
+        prev = g.getCellBefore(prev);
+    }
+    if(!prev && spanRows){
+        var row = g.getRowBefore(g.getRowFromChild(cell));
+        prev = g.getLastCell(row);
+        if(!g.colModel.isCellEditable(prev.columnIndex)){
+            prev = this.getEditorCellBefore(prev);
+        }
+    }
+    return prev;
+};
+
+YAHOO.ext.grid.EditorSelectionModel.prototype.allowArrowNav = function(e){
+    return (!this.disableArrowNavigation && (!this.controlForArrowNavigation || e.ctrlKey));
+}
+/** @ignore */
+YAHOO.ext.grid.EditorSelectionModel.prototype.keyDown = function(e){
+    var g = this.grid, cm = g.colModel, cell = g.getEditingCell();
+    if(!cell) return;
+    var newCell;
+    switch(e.browserEvent.keyCode){
+         case e.TAB:
+             if(e.shiftKey){
+                 newCell = this.getEditorCellBefore(cell, true);
+             }else{
+                 newCell = this.getEditorCellAfter(cell, true);
+             }
+         break;
+         case e.DOWN:
+             if(this.allowArrowNav(e)){
+                 var next = g.getRowAfter(g.getRowFromChild(cell));
+                 if(next){
+                     newCell = next.childNodes[cell.columnIndex];
+                 }
+             }
+         break;
+         case e.UP:
+             if(this.allowArrowNav(e)){
+                 var prev = g.getRowBefore(g.getRowFromChild(cell));
+                 if(prev){
+                     newCell = prev.childNodes[cell.columnIndex];
+                 }
+             }
+         break;
+         case e.RETURN:
+             if(e.shiftKey){
+                 var prev = g.getRowBefore(g.getRowFromChild(cell));
+                 if(prev){
+                     newCell = prev.childNodes[cell.columnIndex];
+                 }
+             }else{
+                 var next = g.getRowAfter(g.getRowFromChild(cell));
+                 if(next){
+                     newCell = next.childNodes[cell.columnIndex];
+                 }
+             }
+         break;
+         case e.RIGHT:
+             if(this.allowArrowNav(e)){
+                 newCell = this.getEditorCellAfter(cell);
+             }
+         break;
+         case e.LEFT:
+             if(this.allowArrowNav(e)){
+                 newCell = this.getEditorCellBefore(cell);
+             }
+         break;
+    };
+    if(newCell){
+        this.activate(g.getRowFromChild(newCell), newCell);
+        e.stopEvent();
+    }
+};
+
+YAHOO.ext.grid.EditorAndSelectionModel = function(){
+    YAHOO.ext.grid.EditorAndSelectionModel.superclass.constructor.call(this);
+    this.events['cellactivate'] = new YAHOO.util.CustomEvent('cellactivate');
+};
+
+YAHOO.extendX(YAHOO.ext.grid.EditorAndSelectionModel, YAHOO.ext.grid.DefaultSelectionModel);
+
+YAHOO.ext.grid.EditorAndSelectionModel.prototype.initEvents = function(){
+    YAHOO.ext.grid.EditorAndSelectionModel.superclass.initEvents.call(this);
+    this.grid.addListener("celldblclick", this.onCellDblClick, this, true);
+};
+
+YAHOO.ext.grid.EditorAndSelectionModel.prototype.onCellDblClick = function(grid, rowIndex, colIndex){
+    var row = this.grid.getRow(rowIndex);
+    var cell = row.childNodes[colIndex];
+    if(cell){
+        this.fireEvent('cellactivate', this, row, cell);
+        this.grid.doEdit(row, cell);
+    }
+}; 
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Element.js.html b/www/extras/yui-ext/docs/overview-summary-Element.js.html new file mode 100644 index 000000000..4973a8a86 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Element.js.html @@ -0,0 +1,1307 @@ + + + + + Overview + + + + + +
+ +

Element.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.ElementWraps around a DOM element and provides convenient access to Yahoo + UI library functionality.

+ Usage:
+

+ var el = YAHOO.ext.Element.get('myElementId');
+ // or the shorter
+ var el = getEl('myElementId');
+ 
+ Using YAHOO.ext.Element.get() instead of calling the constructor directly ensures you get the same object + each call instead of constructing a new one.
+
+
+ + + + + + + +
/**
+ * @class Wraps around a DOM element and provides convenient access to Yahoo 
+ * UI library functionality.<br><br>
+ * Usage:<br>
+ * <pre><code>
+ * var el = YAHOO.ext.Element.get('myElementId');
+ * // or the shorter
+ * var el = getEl('myElementId');
+ * </code></pre>
+ * Using YAHOO.ext.Element.get() instead of calling the constructor directly ensures you get the same object 
+ * each call instead of constructing a new one.<br>
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.Anim (optional) to support animation
+ * @requires YAHOO.util.Motion (optional) to support animation
+ * @requires YAHOO.util.Easing (optional) to support animation
+ * @constructor Create a new Element directly.
+ * @param {String} elementId 
+ * @param {<i>Boolean</i>} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).
+ */
+YAHOO.ext.Element = function(elementId, forceNew){
+    var dom = YAHOO.util.Dom.get(elementId);
+    if(!dom){ // invalid id/element
+        return;
+    }
+    if(!forceNew && YAHOO.ext.Element.cache[dom.id]){ // element object already exists
+        return YAHOO.ext.Element.cache[dom.id];
+    }
+    /**
+     * The DOM element
+     * @type HTMLElement
+     */
+    this.dom = dom;
+    /**
+     * The DOM element ID
+     * @type String
+     */
+    this.id = this.dom.id;
+    /**
+     * @private the current visibility mode
+     */
+    this.visibilityMode = YAHOO.ext.Element.VISIBILITY;
+    
+    
+    /**
+     * @private the element's default display mode
+     */
+    this.originalDisplay = YAHOO.util.Dom.getStyle(this.dom, 'display');
+    if (!this.originalDisplay || this.originalDisplay == 'none') {
+        this.originalDisplay = '';
+    }
+    
+    /**
+     * The default unit to append to CSS values where a unit isn't provided (Defaults to px).
+     * @type String
+     */
+    this.defaultUnit = 'px';
+    
+    /**
+     * @private the element's default overflow
+     */
+    this.originalClip = YAHOO.util.Dom.getStyle(this.dom, 'overflow');
+    
+   
+    /**
+     * Fires when visibility changes. Uses fireDirect with signature: (oElement, boolean isVisible)
+     * @type CustomEvent
+     */
+    this.onVisibilityChanged = new YAHOO.util.CustomEvent('visibilityChanged');
+    
+    /**
+     * Fires when element moves. Uses fireDirect with signature: (oElement, newX, newY)
+     * @type CustomEvent
+     */
+    this.onMoved = new YAHOO.util.CustomEvent('moved');
+    
+    /**
+     * Fires when element is resized. Uses fireDirect with signature: (oElement, newWidth, newHeight)
+     * @type CustomEvent
+     */
+    this.onResized = new YAHOO.util.CustomEvent('resized');
+    
+    // The delegates below handle setting of 'this' when being called from other objects.
+    
+    /**
+     * @private
+     */
+    this.visibilityDelegate = this.fireVisibilityChanged.createDelegate(this);
+    /**
+     * @private
+     */
+    this.resizedDelegate = this.fireResized.createDelegate(this);
+    /**
+     * @private
+     */
+    this.movedDelegate = this.fireMoved.createDelegate(this);
+}
+
+YAHOO.ext.Element.prototype = {    
+    // Utility methods to make firing events painless.
+    /**
+     *@private
+     */
+    fireMoved : function(){
+        this.onMoved.fireDirect(this, this.getX(), this.getY());
+    },
+    
+    /**
+     *@private
+     */
+    fireVisibilityChanged : function(){
+        this.onVisibilityChanged.fireDirect(this, this.isVisible());
+    },
+    
+    /**
+     *@private
+     */
+    fireResized : function(){
+        this.onResized.fireDirect(this, this.getWidth(), this.getHeight());
+    },
+    
+    /**
+     * Sets the elements visibility mode. When setVisible() is called it
+     * will use this to determine whether to set the visibility or the display property.
+     * @param visMode Element.VISIBILITY or Element.DISPLAY
+     */
+    setVisibilityMode : function(visMode){
+        this.visibilityMode = visMode;
+    },
+    
+    /**
+     * Convenience method for setVisibilityMode(Element.DISPLAY)
+     */
+    enableDisplayMode : function(){
+        this.setVisibilityMode(YAHOO.ext.Element.DISPLAY)
+    },
+    
+    /**
+     * Perform Yahoo UI animation on this element. 
+     * @param {Object} args The YUI animation control args
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     * @param {<i>Function</i>} animType (optional) YAHOO.util.Anim subclass to use. For example: YAHOO.util.Motion
+     */
+    animate : function(args, duration, onComplete, easing, animType){
+        this.anim(args, duration, onComplete, easing, animType);
+    },
+    
+    /**
+     * @private Internal animation call
+     */
+    anim : function(args, duration, onComplete, easing, animType){
+        animType = animType || YAHOO.util.Anim;
+        var anim = new animType(this.dom, args, duration || .35, 
+                easing || YAHOO.util.Easing.easeBoth);
+        if(onComplete){
+            if(!(onComplete instanceof Array)){
+                anim.onComplete.subscribe(onComplete);
+            }else{
+                for(var i = 0; i < onComplete.length; i++){
+                    var fn = onComplete[i];
+                    if(fn) anim.onComplete.subscribe(fn);
+                }
+            }
+        }
+        anim.animate();
+    },
+    
+    /**
+     * Checks whether the element is currently visible using both visibility and display properties.
+     * @param {<i>Boolean</i>} deep True to walk the dom and see if parent elements are hidden
+     * @return {Boolean} Whether the element is currently visible 
+     */
+    isVisible : function(deep) {
+        var vis = YAHOO.util.Dom.getStyle(this.dom, 'visibility') != 'hidden' 
+               && YAHOO.util.Dom.getStyle(this.dom, 'display') != 'none';
+        if(!deep || !vis){
+            return vis;
+        }
+        var p = this.dom.parentNode;
+        while(p && p.tagName.toLowerCase() != 'body'){
+            if(YAHOO.util.Dom.getStyle(p, 'visibility') == 'hidden' || YAHOO.util.Dom.getStyle(p, 'display') == 'none'){
+                return false;
+            }
+            p = p.parentNode;
+        }
+        return true;
+    },
+    
+    /**
+     * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use 
+     * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
+     * @param {Boolean} visible Whether the element is visible
+     * @param {<i>Boolean</i>} animate (optional) Fade the element in or out (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the fade effect lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing)
+     */
+     setVisible : function(visible, animate, duration, onComplete, easing){
+        //if(this.isVisible() == visible) return; // nothing to do
+        if(!animate || !YAHOO.util.Anim){
+            if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){
+                this.setDisplayed(visible);
+            }else{
+                YAHOO.util.Dom.setStyle(this.dom, 'visibility', visible ? 'visible' : 'hidden');
+            }
+            this.fireVisibilityChanged();
+        }else{
+            // make sure they can see the transition
+            YAHOO.util.Dom.setStyle(this.dom, 'visibility', 'visible');
+            if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){
+                this.setDisplayed(true);
+            }
+            var args = {opacity: { from: (visible?0:1), to: (visible?1:0) }};
+            var anim = new YAHOO.util.Anim(this.dom, args, duration || .35, 
+                easing || (visible ? YAHOO.util.Easing.easeIn : YAHOO.util.Easing.easeOut));
+            anim.onComplete.subscribe((function(){
+                if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){
+                    this.setDisplayed(visible);
+                }else{
+                    YAHOO.util.Dom.setStyle(this.dom, 'visibility', visible ? 'visible' : 'hidden');
+                }
+                this.fireVisibilityChanged();
+            }).createDelegate(this));
+            if(onComplete){
+                anim.onComplete.subscribe(onComplete);
+            }
+            anim.animate();
+        }
+    },
+    
+    /**
+     *@private
+     */
+    isDisplayed : function() {
+        return YAHOO.util.Dom.getStyle(this.dom, 'display') != 'none';
+    },
+    
+    /**
+     * Toggles the elements visibility or display, depending on visibility mode.
+     * @param {<i>Boolean</i>} animate (optional) Fade the element in or out (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the fade effect lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing)
+     */
+    toggle : function(animate, duration, onComplete, easing){
+        this.setVisible(!this.isVisible(), animate, duration, onComplete, easing); 
+    },
+    
+    /**
+     *@private
+     */
+    setDisplayed : function(value) {
+        YAHOO.util.Dom.setStyle(this.dom, 'display', value ? this.originalDisplay : 'none');
+    },
+    
+    /**
+     * Tries to focus the element. Any exceptions are caught.
+     */
+    focus : function() {
+        try{
+            this.dom.focus();
+        }catch(e){}
+    },
+    
+    /**
+     * Add a CSS class to the element.
+     * @param {String} className The CSS class to add
+     */
+    addClass : function(className){
+        YAHOO.util.Dom.addClass(this.dom, className);
+    },
+    
+    /**
+     * Adds the passed className to this element and removes the class from all siblings
+     */
+    radioClass : function(className){
+        var siblings = this.dom.parentNode.childNodes;
+        for(var i = 0; i < siblings.length; i++) {
+        	var s = siblings[i];
+        	if(s.nodeType == 1){
+        	    YAHOO.util.Dom.removeClass(s, className);
+        	}
+        }
+        YAHOO.util.Dom.addClass(this.dom, className);
+    },
+    /**
+     * Removes a CSS class from the element.
+     * @param {String} className The CSS class to remove
+     */
+    removeClass : function(className){
+        YAHOO.util.Dom.removeClass(this.dom, className);
+    },
+    
+    toggleClass : function(className){
+        if(YAHOO.util.Dom.hasClass(this.dom, className)){
+            YAHOO.util.Dom.removeClass(this.dom, className);
+        }else{
+            YAHOO.util.Dom.addClass(this.dom, className);
+        }
+    },
+    
+    /**
+     * Checks if a CSS class is in use by the element.
+     * @param {String} className The CSS class to check
+     * @return {Boolean} true or false
+     */
+    hasClass : function(className){
+        return YAHOO.util.Dom.hasClass(this.dom, className);
+    },
+    
+    /**
+     * Replaces a CSS class on the element with another.
+     * @param {String} oldClassName The CSS class to replace
+     * @param {String} newClassName The replacement CSS class
+     */
+    replaceClass : function(oldClassName, newClassName){
+        YAHOO.util.Dom.replaceClass(this.dom, oldClassName, newClassName);
+    },
+    
+    /**
+       * Normalizes currentStyle and ComputedStyle.
+       * @param {String} property The style property whose value is returned.
+       * @return {String} The current value of the style property for this element.
+       */
+    getStyle : function(name){
+        return YAHOO.util.Dom.getStyle(this.dom, name);
+    },
+    
+    /**
+       * Wrapper for setting style properties
+       * @param {String} property The style property to be set.
+       * @param {String} val The value to apply to the given property.
+       */
+    setStyle : function(name, value){
+        YAHOO.util.Dom.setStyle(this.dom, name, value);
+    },
+    
+    /**
+       * Gets the current X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+       @ return {String} The X position of the element
+       */
+    getX : function(){
+        return YAHOO.util.Dom.getX(this.dom);
+    },
+    
+    /**
+       * Gets the current Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+       @ return {String} The Y position of the element
+       */
+    getY : function(){
+        return YAHOO.util.Dom.getY(this.dom);
+    },
+    
+    /**
+       * Gets the current position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+       @ return {Array} The XY position of the element
+       */
+    getXY : function(){
+        return YAHOO.util.Dom.getXY(this.dom);
+    },
+    
+    /**
+       * Sets the X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+       @param {String} The X position of the element
+       */
+    setX : function(x){
+        YAHOO.util.Dom.setX(this.dom, x);
+        this.fireMoved();
+    },
+    
+    /**
+       * Sets the Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+       @param {String} The Y position of the element
+       */
+    setY : function(y){
+        YAHOO.util.Dom.setY(this.dom, y);
+        this.fireMoved();
+    },
+    
+    /**
+     * Set the element's X position directly using CSS style (instead of setX())
+     * @param {String} left The left CSS property value
+     */
+    setLeft : function(left){
+        YAHOO.util.Dom.setStyle(this.dom, 'left', this.addUnits(left));
+        this.fireMoved();
+    },
+    
+    /**
+     * Set the element's Y position directly using CSS style (instead of setY())
+     * @param {String} top The top CSS property value
+     */
+    setTop : function(top){
+        YAHOO.util.Dom.setStyle(this.dom, 'top', this.addUnits(top));
+        this.fireMoved();
+    },
+    
+    /**
+     * Set the element's css right style
+     * @param {String} left The right CSS property value
+     */
+    setRight : function(right){
+        YAHOO.util.Dom.setStyle(this.dom, 'right', this.addUnits(right));
+        this.fireMoved();
+    },
+    
+    /**
+     * Set the element's css bottom style
+     * @param {String} top The bottom CSS property value
+     */
+    setBottom : function(bottom){
+        YAHOO.util.Dom.setStyle(this.dom, 'bottom', this.addUnits(bottom));
+        this.fireMoved();
+    },
+    
+    /**
+     * Set the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based)
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+        */
+    setXY : function(pos, animate, duration, onComplete, easing){
+        if(!animate || !YAHOO.util.Anim){
+            YAHOO.util.Dom.setXY(this.dom, pos);
+            this.fireMoved();
+        }else{
+            this.anim({points: {to: pos}}, duration, [onComplete, this.movedDelegate], easing, YAHOO.util.Motion);
+        }
+    },
+    
+    /**
+     * Set the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    setLocation : function(x, y, animate, duration, onComplete, easing){
+        this.setXY([x, y], animate, duration, onComplete, easing);
+    },
+    
+    /**
+     * Set the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    moveTo : function(x, y, animate, duration, onComplete, easing){
+        //YAHOO.util.Dom.setStyle(this.dom, 'left', this.addUnits(x));
+        //YAHOO.util.Dom.setStyle(this.dom, 'top', this.addUnits(y));
+        this.setXY([x, y], animate, duration, onComplete, easing);
+    },
+    
+    /**
+       * Returns the region position of the given element.
+       * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+       * @return {Region} A YAHOO.util.Region containing "top, left, bottom, right" member data.
+       */
+    getRegion : function(){
+        return YAHOO.util.Dom.getRegion(this.dom);
+    },
+    
+    /**
+     * Returns the offset height of the element
+     * @return {Number} The element's height
+     */
+    getHeight : function(){
+        return this.dom.offsetHeight;
+    },
+    
+    /**
+     * Returns the offset width of the element
+     * @return {Number} The element's width
+     */
+    getWidth : function(){
+        return this.dom.offsetWidth;
+    },
+    
+    /**
+     * Returns the size of the element
+     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+     */
+    getSize : function(){
+        return {width: this.getWidth(), height: this.getHeight()};
+    },
+    
+    /** @private */
+    adjustWidth : function(width){
+        if(this.autoBoxAdjust && typeof width == 'number' && !this.isBorderBox()){
+           width -= (this.getBorderWidth('lr') + this.getPadding('lr'));
+        }
+        return width;
+    },
+    
+    /** @private */
+    adjustHeight : function(height){
+        if(this.autoBoxAdjust && typeof height == 'number' && !this.isBorderBox()){
+           height -= (this.getBorderWidth('tb') + this.getPadding('tb'));
+        }
+        return height;
+    },
+    
+    /**
+     * Set the width of the element
+     * @param {Number} width The new width
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if width is larger or YAHOO.util.Easing.easeIn if it is smaller)
+     */
+    setWidth : function(width, animate, duration, onComplete, easing){
+        width = this.adjustWidth(width);
+        if(!animate || !YAHOO.util.Anim){
+            YAHOO.util.Dom.setStyle(this.dom, 'width', this.addUnits(width));
+            this.fireResized();
+        }else{
+            this.anim({width: {to: width}}, duration, [onComplete, this.resizedDelegate], 
+                easing || (width > this.getWidth() ? YAHOO.util.Easing.easeOut : YAHOO.util.Easing.easeIn));
+        }
+    },
+    
+    /**
+     * Set the height of the element
+     * @param {Number} height The new height
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller)
+     */
+     setHeight : function(height, animate, duration, onComplete, easing){
+        height = this.adjustHeight(height);
+        if(!animate || !YAHOO.util.Anim){
+            YAHOO.util.Dom.setStyle(this.dom, 'height', this.addUnits(height));
+            this.fireResized();
+        }else{
+            this.anim({height: {to: height}}, duration, [onComplete, this.resizedDelegate],  
+                   easing || (height > this.getHeight() ? YAHOO.util.Easing.easeOut : YAHOO.util.Easing.easeIn));
+        }
+    },
+    
+    /**
+     * Set the size of the element. If animation is true, both width an height will be animated concurrently.
+     * @param {Number} width The new width
+     * @param {Number} height The new height
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+     setSize : function(width, height, animate, duration, onComplete, easing){
+        if(!animate || !YAHOO.util.Anim){
+            this.setWidth(width);
+            this.setHeight(height);
+            this.fireResized();
+        }else{
+            width = this.adjustWidth(width); height = this.adjustHeight(height);
+            this.anim({width: {to: width}, height: {to: height}}, duration, [onComplete, this.resizedDelegate], easing);
+        }
+    },
+    
+    /**
+     * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Number} width The new width
+     * @param {Number} height The new height
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    setBounds : function(x, y, width, height, animate, duration, onComplete, easing){
+        if(!animate || !YAHOO.util.Anim){
+            this.setWidth(width);
+            this.setHeight(height);
+            this.setLocation(x, y);
+            this.fireResized();
+            this.fireMoved();
+        }else{
+            width = this.adjustWidth(width); height = this.adjustHeight(height);
+            this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, duration, [onComplete, this.movedDelegate], easing, YAHOO.util.Motion);
+        }
+    },
+    
+    /**
+     * Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {YAHOO.util.Region} region The region to fill
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    setRegion : function(region, animate, duration, onComplete, easing){
+        this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, animate, duration, onComplete, easing);
+    },
+    
+    /**
+     * Appends an event handler to this element
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Function} handler        The method the event invokes
+     * @param {<i>Object</i>}   scope  (optional)  An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    addListener : function(eventName, handler, scope, override){
+        YAHOO.util.Event.addListener(this.dom, eventName, handler, scope, override);
+    },
+    
+    /**
+     * Appends an event handler to this element and automatically prevents the default action, and if set stops propagation (bubbling) as well
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Boolean}   stopPropagation     Whether to also stopPropagation (bubbling) 
+     * @param {Function} handler        The method the event invokes
+     * @param {<i>Object</i>}   scope  (optional)  An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    addHandler : function(eventName, stopPropagation, handler, scope, override){
+        var fn = YAHOO.ext.Element.createStopHandler(stopPropagation, handler, scope, override);
+        YAHOO.util.Event.addListener(this.dom, eventName, fn);
+    },
+    
+    /** @private */
+    
+    /**
+     * Appends an event handler to this element (Same as addListener)
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Function} handler        The method the event invokes
+     * @param {<i>Object</i>}   scope (optional)   An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    on : function(eventName, handler, scope, override){
+        YAHOO.util.Event.addListener(this.dom, eventName, handler, scope, override);
+    },
+    
+    /**
+     * Append a managed listener - See {@link YAHOO.ext.EventObject} for more details.
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Function} fn        The method the event invokes
+     * @param {<i>Object</i>}   scope  (optional)  An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    addManagedListener : function(eventName, fn, scope, override){
+        return YAHOO.ext.EventManager.on(this.dom, eventName, fn, scope, override);
+    },
+    
+    /** 
+     * Append a managed listener (shorthanded for {@link #addManagedListener}) 
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Function} fn        The method the event invokes
+     * @param {<i>Object</i>}   scope  (optional)  An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    mon : function(eventName, fn, scope, override){
+        return YAHOO.ext.EventManager.on(this.dom, eventName, fn, scope, override);
+    },
+    /**
+     * Removes an event handler from this element
+     * @param {String} sType the type of event to remove
+     * @param {Function} fn the method the event invokes
+     */
+    removeListener : function(eventName, handler){
+        YAHOO.util.Event.removeListener(this.dom, eventName, handler);
+    },
+    
+    /**
+     * Removes all previous added listeners from this element
+     */
+    removeAllListeners : function(){
+        YAHOO.util.Event.purgeElement(this.dom);
+    },
+    
+    
+    /**
+     * Set the opacity of the element
+     * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc
+     * @param {<i>Boolean</i>} animate (optional) Animate (fade) the transition (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller)
+     */
+     setOpacity : function(opacity, animate, duration, onComplete, easing){
+        if(!animate || !YAHOO.util.Anim){
+            YAHOO.util.Dom.setStyle(this.dom, 'opacity', opacity);
+        }else{
+            this.anim({opacity: {to: opacity}}, duration, onComplete, easing);
+        }
+    },
+    
+    /**
+     * Same as getX()
+     */
+    getLeft : function(){
+        return this.getX();
+    },
+    
+    /**
+     * Gets the right X coordinate of the element (element X position + element width)
+     * @return {String} The left position of the element
+     */
+    getRight : function(){
+        return this.getX() + this.getWidth();
+    },
+    
+    /**
+     * Same as getY()
+     */
+    getTop : function() {
+        return this.getY();
+    },
+    
+    /**
+     * Gets the bottom Y coordinate of the element (element Y position + element height)
+     * @return {String} The bottom position of the element
+     */
+    getBottom : function(){
+        return this.getY() + this.getHeight();
+    },
+    
+    /**
+    * Set the element as absolute positioned with the specified z-index
+    * @param {<i>Number</i>} zIndex (optional)
+    */
+    setAbsolutePositioned : function(zIndex){
+        this.setStyle('position', 'absolute');
+        if(zIndex){
+            this.setStyle('z-index', zIndex);
+        }
+    },
+    
+    /**
+    * Set the element as relative positioned with the specified z-index
+    * @param {<i>Number</i>} zIndex (optional)
+    */
+    setRelativePositioned : function(zIndex){
+        this.setStyle('position', 'relative');
+        if(zIndex){
+            this.setStyle('z-index', zIndex);
+        }
+        //this.setStyle('left', 0);
+        //this.setStyle('top', 0);
+    },
+    
+    /**
+    * Clear positioning back to the default when the document was loaded
+    */
+    clearPositioning : function(){
+        this.setStyle('position', '');
+        this.setStyle('left', '');
+        this.setStyle('right', '');
+        this.setStyle('top', '');
+        this.setStyle('bottom', '');
+    },
+    
+    /**
+    * Gets an object with all CSS positioning properties. Useful along with {@link #setPositioning} to get snapshot before performing an update and then restoring the element.
+    */
+    getPositioning : function(){
+        return {
+            'position' : this.getStyle('position'),
+            'left' : this.getStyle('left'),
+            'right' : this.getStyle('right'),
+            'top' : this.getStyle('top'),
+            'bottom' : this.getStyle('bottom')
+        };
+    },
+    
+    /**
+     * Gets the width of the border(s) for the specified side(s)
+     * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, 
+     * passing lr would get the border (l)eft width + the border (r)ight width.
+     * @return {Number} The width of the sides passed added together
+     */
+    getBorderWidth : function(side){
+        var width = 0;
+        var b = YAHOO.ext.Element.borders;
+        for(var s in b){
+            if(typeof b[s] != 'function'){
+                if(side.indexOf(s) !== -1){
+                    var w = parseInt(this.getStyle(b[s]), 10);
+                    if(!isNaN(w)) width += w;
+                }
+            }
+        }
+        return width;
+    },
+    
+    /**
+     * Gets the width of the padding(s) for the specified side(s)
+     * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, 
+     * passing lr would get the padding (l)eft + the padding (r)ight.
+     * @return {Number} The padding of the sides passed added together
+     */
+    getPadding : function(side){
+        var pad = 0;
+        var b = YAHOO.ext.Element.paddings;
+        for(var s in b){
+            if(typeof s[b] != 'function'){
+                if(side.indexOf(s) !== -1){
+                    var w = parseInt(this.getStyle(b[s]), 10);
+                    if(!isNaN(w)) pad += w;
+                }
+            }
+        }
+        return pad;
+    },
+    
+    /**
+    * Set positioning with an object returned by {@link #getPositioning}.
+    */
+    setPositioning : function(positionCfg){
+        this.setStyle('position', positionCfg.position);
+        this.setStyle('left', positionCfg.left);
+        this.setStyle('right', positionCfg.right);
+        this.setStyle('top', positionCfg.top);
+        this.setStyle('bottom', positionCfg.bottom);
+    },
+    
+    /**
+     * Move this element relative to it's current position.
+     * @param {String} direction Possible values are: 'left', 'right', 'up', 'down'.
+     * @param {Number} distance How far to move the element in pixels
+     * @param {<i>Boolean</i>} animate (optional) Animate the movement (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. 
+     */
+     move : function(direction, distance, animate, duration, onComplete, easing){
+        var xy = this.getXY();
+        direction = direction.toLowerCase();
+        switch(direction){
+            case 'left':
+                this.moveTo(xy[0]-distance, xy[1], animate, duration, onComplete, easing);
+                return;
+           case 'right':
+                this.moveTo(xy[0]+distance, xy[1], animate, duration, onComplete, easing);
+                return;
+           case 'up':
+                this.moveTo(xy[0], xy[1]-distance, animate, duration, onComplete, easing);
+                return;
+           case 'down':
+                this.moveTo(xy[0], xy[1]+distance, animate, duration, onComplete, easing);
+                return;
+        }
+    },
+    
+    /**
+     *  Clip overflow on the element - use {@link #unclip} to remove
+     */
+    clip : function(){
+        this.setStyle('overflow', 'hidden');
+    },
+    
+    /**
+     *  Return clipping (overflow) to original clipping when the document loaded
+     */
+    unclip : function(){
+        this.setStyle('overflow', this.originalClip);
+    },
+    
+    /**
+     * Align this element with another element.
+     * @param {String/HTMLElement/YAHOO.ext.Element} element The element to align to.
+     * @param {String} position The position to align to. Possible values are 'tl' - top left, 'tr' - top right, 'bl' - bottom left, and 'br' - bottom right. 
+     * @param {<i>Array</i>} offsets (optional) Offset the positioning by [x, y]
+     * @param {<i>Boolean</i>} animate (optional) Animate the movement (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. 
+     */
+     alignTo : function(element, position, offsets, animate, duration, onComplete, easing){
+        var otherEl = getEl(element);
+        if(!otherEl){
+            return; // must not exist
+        }
+        offsets = offsets || [0, 0];
+        var r = otherEl.getRegion();
+        position = position.toLowerCase();
+        switch(position){
+           case 'bl':
+                this.moveTo(r.left + offsets[0], r.bottom + offsets[1], 
+                            animate, duration, onComplete, easing);
+                return;
+           case 'br':
+                this.moveTo(r.right + offsets[0], r.bottom + offsets[1], 
+                            animate, duration, onComplete, easing);
+                return;
+           case 'tl':
+                this.moveTo(r.left + offsets[0], r.top + offsets[1], 
+                            animate, duration, onComplete, easing);
+                return;
+           case 'tr':
+                this.moveTo(r.right + offsets[0], r.top + offsets[1], 
+                            animate, duration, onComplete, easing);
+                return;
+        }
+    },
+    
+    /**
+    * Clears any opacity settings from this element. Required in some cases for IE.
+    */
+    clearOpacity : function(){
+        if (window.ActiveXObject) {
+            this.dom.style.filter = '';
+        } else {
+            this.dom.style.opacity = '';
+            this.dom.style['-moz-opacity'] = '';
+            this.dom.style['-khtml-opacity'] = '';
+        }
+    },
+    
+    /**
+    * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+    * @param {<i>Boolean</i>} animate (optional) Animate (fade) the transition (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    hide : function(animate, duration, onComplete, easing){
+        this.setVisible(false, animate, duration, onComplete, easing);
+    },
+    
+    /**
+    * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+    * @param {<i>Boolean</i>} animate (optional) Animate (fade in) the transition (Default is false)
+     * @param {<i>Float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    show : function(animate, duration, onComplete, easing){
+        this.setVisible(true, animate, duration, onComplete, easing);
+    },
+    
+    /**
+     * @private Test if size has a unit, otherwise appends the default 
+     */
+    addUnits : function(size){
+        if(typeof size == 'number' || !YAHOO.ext.Element.unitPattern.test(size)){
+            return size + this.defaultUnit;
+        }
+        return size;
+    },
+    
+    beginMeasure : function(){
+        var p = this.dom;
+        if(p.offsetWidth || p.offsetHeight){
+            return; // offsets work already
+        }
+        var changed = [];
+        var p = this.dom; // start with this element
+        while(p && p.tagName.toLowerCase() != 'body'){
+            if(YAHOO.util.Dom.getStyle(p, 'display') == 'none'){
+                changed.push({el: p, visibility: YAHOO.util.Dom.getStyle(p, 'visibility')});
+                p.style.visibility = 'hidden';
+                p.style.display = 'block';
+            }
+            p = p.parentNode;
+        }
+        this._measureChanged = changed;        
+    },
+    
+    endMeasure : function(){
+        var changed = this._measureChanged;
+        if(changed){
+            for(var i = 0, len = changed.length; i < len; i++) {
+            	var r = changed[i];
+            	r.el.style.visibility = r.visibility;
+                r.el.style.display = 'none';
+            }
+            this._measureChanged = null;
+        }
+    },
+    /**
+    *   Update the innerHTML of this element, optionally searching for and processing scripts
+    * @param {String} html The new HTML
+    * @param {<i>Boolean</i>} loadScripts (optional) true to look for and process scripts
+    */
+    update : function(html, loadScripts){
+        this.dom.innerHTML = html;
+        if(!loadScripts) return;
+        
+        var dom = this.dom;
+        var _parseScripts = function(){
+            var s = this.dom.getElementsByTagName("script");
+            var docHead = document.getElementsByTagName("head")[0];
+            
+            //   For browsers which discard scripts when inserting innerHTML, extract the scripts using a RegExp
+            if(s.length == 0){
+                var re = /(?:<script.*(?:src=[\"\'](.*)[\"\']).*>.*<\/script>)|(?:<script.*>([\S\s]*?)<\/script>)/ig; // assumes HTML well formed and then loop through it.
+                var match;
+                while(match = re.exec(html)){
+                     var s0 = document.createElement("script");
+                     if (match[1])
+                        s0.src = match[1];
+                     else if (match[2])
+                        s0.text = match[2];
+                     else
+                          continue;
+                     docHead.appendChild(s0);
+                }
+            }else {
+              for(var i = 0; i < s.length; i++){
+                 var s0 = document.createElement("script");
+                 s0.type = s[i].type;
+                 if (s[i].text) {
+                    s0.text = s[i].text;
+                 } else {
+                    s0.src = s[i].src;
+                 }
+                 docHead.appendChild(s0);
+              }
+            }
+        }
+        // set timeout to give DOM opportunity to catch up
+        setTimeout(_parseScripts, 10);
+    },
+    
+    /**
+    * Gets this elements UpdateManager
+    * @return The UpdateManager
+    * @type YAHOO.ext.UpdateManager 
+    */
+    getUpdateManager : function(){
+        if(!this.updateManager){
+            this.updateManager = new YAHOO.ext.UpdateManager(this);
+        }
+        return this.updateManager;
+    },
+    
+    /**
+    * Calculates the x, y to center this element on the screen
+    * @return {Array} The x, y values [x, y]
+    */
+    getCenterXY : function(offsetScroll){
+        var centerX = Math.round((YAHOO.util.Dom.getViewportWidth()-this.getWidth())/2);
+        var centerY = Math.round((YAHOO.util.Dom.getViewportHeight()-this.getHeight())/2);
+        if(!offsetScroll){
+            return [centerX, centerY];
+        }else{
+            var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft || 0;
+            var scrollY = document.documentElement.scrollTop || document.body.scrollTop || 0;
+            return[centerX + scrollX, centerY + scrollY];
+        }
+    },
+    /**
+    * Gets an array of child YAHOO.ext.Element objects by tag name
+    * @param {String} tagName
+    * @return {Array} The children
+    */
+    getChildrenByTagName : function(tagName){
+        var children = this.dom.getElementsByTagName(tagName);
+        var len = children.length;
+        var ce = [len];
+        for(var i = 0; i < len; ++i){
+            ce[i] = YAHOO.ext.Element.get(children[i], true);
+        }
+        return ce;
+    },
+    
+    /**
+    * Gets an array of child YAHOO.ext.Element objects by class name and optional tagName
+    * @param {String} className
+    * @param {<i>String</i>} tagName (optional)
+    * @return {Array} The children
+    */
+    getChildrenByClassName : function(className, tagName){
+        var children = YAHOO.util.Dom.getElementsByClassName(className, tagName, this.dom);
+        var len = children.length;
+        var ce = [len];
+        for(var i = 0; i < len; ++i){
+            ce[i] = YAHOO.ext.Element.get(children[i], true);
+        }
+        return ce;
+    },
+    
+    /**
+     * Tests various css rules/browsers to determine if this element uses a border box
+     */
+    isBorderBox : function(){
+        var el = this.dom;
+        var b = YAHOO.ext.util.Browser;
+        var strict = YAHOO.ext.Strict;
+        return((b.isIE && !b.isIE7) || (b.isIE7 && !strict && el.style.boxSizing != 'content-box') || 
+           (b.isGecko && YAHOO.util.Dom.getStyle(el, "-moz-box-sizing") == 'border-box') || 
+           (!b.isSafari && YAHOO.util.Dom.getStyle(el, "box-sizing") == 'border-box'));  
+    },
+    
+    /**
+     * Return a box {x, y, width, height} that can be used to set another elements
+     * size to match this element. If contentBox is true, a box for the content 
+     * of the element is returned.
+     */
+    getBox : function(contentBox){
+        var xy = this.getXY();
+        var el = this.dom;
+        var w = el.offsetWidth;
+        var h = el.offsetHeight;
+        if(!contentBox){
+            return {x: xy[0], y: xy[1], width: w, height: h};
+        }else{
+            var l = this.getBorderWidth('l')+this.getPadding('l');
+            var r = this.getBorderWidth('r')+this.getPadding('r');
+            var t = this.getBorderWidth('t')+this.getPadding('t');
+            var b = this.getBorderWidth('b')+this.getPadding('b');
+            return {x: xy[0]+l, y: xy[1]+t, width: w-(l+r), height: h-(t+b)};
+        }
+    },
+    
+    /**
+     * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
+     * @param {Object} box The box to fill {x, y, width, height}
+     * @param {<i>Boolean</i>} adjust (optional) Whether to adjust for box-model issues automatically
+     * @param {<i>Boolean</i>} animate (optional) Animate the transition (Default is false)
+     * @param {<i>float</i>} duration (optional) How long the animation lasts. (Defaults to .35 seconds)
+     * @param {<i>Function</i>} onComplete (optional) Function to call when animation completes.
+     * @param {<i>Function</i>} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth)
+     */
+    setBox : function(box, adjust, animate, duration, onComplete, easing){
+        var w = box.width, h = box.height;
+        if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){
+           w -= (this.getBorderWidth('lr') + this.getPadding('lr'));
+           h -= (this.getBorderWidth('tb') + this.getPadding('tb'));
+        }
+        this.setBounds(box.x, box.y, w, h, animate, duration, onComplete, easing);
+    }
+};
+
+/**
+ * Whether to automatically adjust width and height settings for box-model issues
+ */
+YAHOO.ext.Element.prototype.autoBoxAdjust = true;
+
+/**
+ * @private Used to check if a value has a unit
+ */
+YAHOO.ext.Element.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;
+/**
+ * Visibility mode constant - Use visibility to hide element
+ * @type Number
+ */
+YAHOO.ext.Element.VISIBILITY = 1;
+/**
+ * Visibility mode constant - Use display to hide element
+ * @type Number
+ */
+YAHOO.ext.Element.DISPLAY = 2;
+
+/** @ignore */
+YAHOO.ext.Element.borders = {l: 'border-left-width', r: 'border-right-width', t: 'border-top-width', b: 'border-bottom-width'};
+/** @ignore */
+YAHOO.ext.Element.paddings = {l: 'padding-left', r: 'padding-right', t: 'padding-top', b: 'padding-bottom'};
+        
+/**
+ * @private Call out to here so we make minimal closure
+ */
+YAHOO.ext.Element.createStopHandler = function(stopPropagation, handler, scope, override){
+    return function(e){
+        if(e){
+            if(stopPropagation){
+                YAHOO.util.Event.stopEvent(e);
+            }else {
+                YAHOO.util.Event.preventDefault(e);
+            }
+        }
+        handler.call(override && scope ? scope : window, e, scope);
+    };
+};
+
+/**
+ * @private
+ */
+YAHOO.ext.Element.cache = {};
+
+/**
+ * Static method to retreive Element objects. Uses simple caching to consistently return the same object. 
+ * Automatically fixes if an object was recreated with the same id via AJAX or DOM.
+ * @param {String/HTMLElement/Element} el The id of the element or the element to wrap (must have an id). If you pass in an element, it is returned
+ * @param {<i>Boolean</i>} autoGenerateId (optional) Set this flag to true if you are passing an element without an id (like document.body). It will auto generate an id if one isn't present. 
+ * @return {Element} The element object
+ */
+YAHOO.ext.Element.get = function(el, autoGenerateId){
+    if(!el){ return null; }
+    if(el instanceof YAHOO.ext.Element){
+        el.dom = YAHOO.util.Dom.get(el.id); // refresh dom element in case no longer valid
+        YAHOO.ext.Element.cache[el.id] = el; // in case it was created directly with Element(), let's cache it
+        return el;
+    }
+    var key = el;
+    if(typeof el != 'string'){ // must be an element
+        if(!el.id && !autoGenerateId){ return null; }
+        YAHOO.util.Dom.generateId(el, 'elgen-');
+        key = el.id;
+    }
+    var element = YAHOO.ext.Element.cache[key];
+    if(!element){
+        element = new YAHOO.ext.Element(key);
+        YAHOO.ext.Element.cache[key] = element;
+    }else{
+        element.dom = YAHOO.util.Dom.get(key);
+    }
+    return element;
+};
+
+/**
+ * Shorthand function for YAHOO.ext.Element.get()
+ */
+var getEl = YAHOO.ext.Element.get;
+
+// clean up refs
+YAHOO.util.Event.addListener(window, 'unload', function(){ YAHOO.ext.Element.cache = null; });
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-EventManager.js.html b/www/extras/yui-ext/docs/overview-summary-EventManager.js.html new file mode 100644 index 000000000..e5e6b57a1 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-EventManager.js.html @@ -0,0 +1,422 @@ + + + + + Overview + + + + + +
+ +

EventManager.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + +
+/**
+ * @class 
+ * Registers event handlers that want to receive an EventObject instead of the standard browser event
+ * See {@link YAHOO.ext.EventObject} for more details on the usage of this object.
+ */
+YAHOO.ext.EventManager = new function(){
+    var docReadyEvent;
+    var docReadyProcId;
+    var docReadyState = false;
+    
+    this.ieDeferSrc = "javascript:false";
+    
+    var fireDocReady = function(){
+        if(!docReadyState){
+            docReadyState = true;
+            if(docReadyProcId){
+                clearInterval(docReadyProcId);
+            }
+            if(docReadyEvent){
+                docReadyEvent.fire();
+            }
+        }
+    };
+    
+    var initDocReady = function(){
+        docReadyEvent = new YAHOO.util.CustomEvent('documentready');
+        if(document.addEventListener) {
+            YAHOO.util.Event.on(document, "DOMContentLoaded", fireDocReady);
+        }else if(YAHOO.ext.util.Browser.isIE){
+            // inspired by  http://www.thefutureoftheweb.com/blog/2006/6/adddomloadevent
+            document.write('<s'+'cript id="ie-deferred-loader" defer="defer" src="' +
+                        YAHOO.ext.EventManager.ieDeferSrc + '"></s'+'cript>');
+            YAHOO.util.Event.on('ie-deferred-loader', 'readystatechange', function(){
+                if(this.readyState == 'complete'){
+                    fireDocReady();
+                }
+            });
+        }else if(YAHOO.ext.util.Browser.isSafari){ 
+            docReadyProcId = setInterval(function(){
+                var rs = document.readyState;
+                if(rs == 'loaded' || rs == 'complete') {
+                    fireDocReady();     
+                 }
+            }, 10);
+        }
+        // no matter what, make sure it fires on load
+        YAHOO.util.Event.on(window, 'load', fireDocReady);
+    };
+    /** 
+     * Places a simple wrapper around an event handler to override the browser event 
+     * object with a YAHOO.ext.EventObject
+     */
+    this.wrap = function(fn, scope, override){
+        var wrappedFn = function(e){
+            YAHOO.ext.EventObject.setEvent(e);
+            fn.call(override ? scope || window : window, YAHOO.ext.EventObject, scope);
+        };
+        return wrappedFn;
+    };
+    
+    /**
+     * Appends an event handler
+     *
+     * @param {Object}   element        The html element to assign the 
+     *                             event to
+     * @param {String}   eventName     The type of event to append
+     * @param {Function} fn        The method the event invokes
+     * @param {Object}   scope    An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {boolean}  override If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     * @return {Function} The wrapper function created (to be used to remove the listener if necessary)
+     */
+    this.addListener = function(element, eventName, fn, scope, override){
+        var wrappedFn = this.wrap(fn, scope, override);
+        YAHOO.util.Event.addListener(element, eventName, wrappedFn);
+        return wrappedFn;
+    };
+    
+    /**
+     * Removes an event handler
+     *
+     * @param {Object}   element        The html element to remove the 
+     *                             event from
+     * @param {String}   eventName     The type of event to append
+     * @param {Function} wrappedFn        The wrapper method returned when adding the listener
+     * @return {Boolean} True if a listener was actually removed
+     */
+    this.removeListener = function(element, eventName, wrappedFn){
+        return YAHOO.util.Event.removeListener(element, eventName, wrappedFn);
+    };
+    
+    /**
+     * Appends an event handler (shorthand for addListener)
+     *
+     * @param {Object}   element        The html element to assign the 
+     *                             event to
+     * @param {String}   eventName     The type of event to append
+     * @param {Function} fn        The method the event invokes
+     * @param {Object}   scope    An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {boolean}  override If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     * @return {Function} The wrapper function created (to be used to remove the listener if necessary)
+     */
+    this.on = function(element, eventName, fn, scope, override){
+        var wrappedFn = this.wrap(fn, scope, override);
+        YAHOO.util.Event.addListener(element, eventName, wrappedFn);
+        return wrappedFn;
+    };
+    
+    /**
+     * Fires when the document is ready (before onload)
+     */
+    this.onDocumentReady = function(fn, scope, override){
+        if(!docReadyEvent){
+            initDocReady();
+        }
+        docReadyEvent.subscribe(fn, scope, override);
+    }
+};
+
+/**
+ * @class 
+ * EventObject exposes the Yahoo! UI Event functionality directly on the object
+ * passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code 
+ * (All the YAHOO.util.Event methods throw javascript errors if the passed event is null).
+ * To get an EventObject instead of the standard browser event,
+ * your must register your listener thru the {@link YAHOO.ext.EventManager} or directly on an Element
+ * with {@link YAHOO.ext.Element#addManagedListener} or the shorthanded equivalent {@link YAHOO.ext.Element#mon}.<br>
+ * Example:
+ * <pre><code>
+ fu<>nction handleClick(e){ // e is not a standard event object, it is a YAHOO.ext.EventObject
+    e.preventDefault();
+    var target = e.getTarget();
+    ...
+ }
+ var myDiv = getEl('myDiv');
+ myDiv.mon('click', handleClick);
+ //or
+ YAHOO.ext.EventManager.on('myDiv', 'click', handleClick);
+ YAHOO.ext.EventManager.addListener('myDiv', 'click', handleClick);
+ </code></pre>
+ */
+YAHOO.ext.EventObject = new function(){
+    /** The normal browser event */ 
+    this.browserEvent = null;
+    /** The button pressed in a mouse event */ 
+    this.button = -1;
+    /** True if the shift key was down during the event */ 
+    this.shiftKey = false;
+    /** True if the control key was down during the event */ 
+    this.ctrlKey = false;
+    /** True if the alt key was down during the event */ 
+    this.altKey = false;
+    
+    /** Key constant @type Number */
+    this.BACKSPACE = 8;
+    /** Key constant @type Number */
+    this.TAB = 9;
+    /** Key constant @type Number */
+    this.RETURN = 13;
+    /** Key constant @type Number */
+    this.ESC = 27;
+    /** Key constant @type Number */
+    this.SPACE = 32;
+    /** Key constant @type Number */
+    this.PAGEUP = 33;
+    /** Key constant @type Number */
+    this.PAGEDOWN = 34;
+    /** Key constant @type Number */
+    this.END = 35;
+    /** Key constant @type Number */
+    this.HOME = 36;
+    /** Key constant @type Number */
+    this.LEFT = 37;
+    /** Key constant @type Number */
+    this.UP = 38;
+    /** Key constant @type Number */
+    this.RIGHT = 39;
+    /** Key constant @type Number */
+    this.DOWN = 40;
+    /** Key constant @type Number */
+    this.DELETE = 46;
+    /** Key constant @type Number */
+    this.F5 = 116;
+
+       /** @private */ 
+    this.setEvent = function(e){
+        this.browserEvent = e;
+        if(e){
+            this.button = e.button;
+            this.shiftKey = e.shiftKey;
+            this.ctrlKey = e.ctrlKey;
+            this.altKey = e.altKey;
+        }else{
+            this.button = -1;
+            this.shiftKey = false;
+            this.ctrlKey = false;
+            this.altKey = false;
+        }
+    };
+    
+    /**
+     * Stop the event. Calls YAHOO.util.Event.stopEvent() if the event is not null.
+     */ 
+    this.stopEvent = function(){
+        if(this.browserEvent){
+            YAHOO.util.Event.stopEvent(this.browserEvent);
+        }
+    };
+    
+    /**
+     * Prevents the browsers default handling of the event. Calls YAHOO.util.Event.preventDefault() if the event is not null.
+     */ 
+    this.preventDefault = function(){
+        if(this.browserEvent){
+            YAHOO.util.Event.preventDefault(this.browserEvent);
+        }
+    };
+    
+    /** @private */
+    this.isNavKeyPress = function(){
+        return (this.browserEvent.keyCode && this.browserEvent.keyCode >= 33 && this.browserEvent.keyCode <= 40);
+    };
+    
+    /**
+     * Cancels bubbling of the event. Calls YAHOO.util.Event.stopPropagation() if the event is not null.
+     */ 
+    this.stopPropagation = function(){
+        if(this.browserEvent){
+            YAHOO.util.Event.stopPropagation(this.browserEvent);
+        }
+    };
+    
+    /**
+     * Gets the key code for the event. Returns value from YAHOO.util.Event.getCharCode() if the event is not null.
+     * @return {Number}
+     */ 
+    this.getCharCode = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getCharCode(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Gets the x coordinate of the event. Returns value from YAHOO.util.Event.getPageX() if the event is not null.
+     * @return {Number}
+     */ 
+    this.getPageX = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getPageX(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Gets the y coordinate of the event. Returns value from YAHOO.util.Event.getPageY() if the event is not null.
+     * @return {Number}
+     */ 
+    this.getPageY = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getPageY(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Gets the time of the event. Returns value from YAHOO.util.Event.getTime() if the event is not null.
+     * @return {Number}
+     */ 
+    this.getTime = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getTime(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Gets the page coordinates of the event. Returns value from YAHOO.util.Event.getXY() if the event is not null.
+     * @return {Array} The xy values like [x, y]
+     */ 
+    this.getXY = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getXY(this.browserEvent);
+        }
+        return [];
+    };
+    
+    /**
+     * Gets the target for the event. Returns value from YAHOO.util.Event.getTarget() if the event is not null.
+     * @return {HTMLelement}
+     */ 
+    this.getTarget = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getTarget(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Walk up the DOM looking for a particular target - if the default target matches, it is returned.
+     * @return {HTMLelement}
+     */ 
+    this.findTarget = function(className, tagName){
+        if(tagName) tagName = tagName.toLowerCase();
+        if(this.browserEvent){
+            function isMatch(el){
+               if(!el){
+                   return false;
+               }
+               if(className && !YAHOO.util.Dom.hasClass(el, className)){
+                   return false;
+               }
+               if(tagName && el.tagName.toLowerCase() != tagName){
+                   return false;
+               }
+               return true;
+            };
+            
+            var t = this.getTarget();
+            if(!t || isMatch(t)){
+    		    return t;
+    	    }
+    	    var p = t.parentNode;
+    	    while(p && p.tagName.toUpperCase() != 'BODY'){
+                if(isMatch(p)){
+                	return p;
+                }
+                p = p.parentNode;
+            }
+    	}
+        return null;
+    };
+    /**
+     * Gets the related target. Returns value from YAHOO.util.Event.getRelatedTarget() if the event is not null.
+     * @return {HTMLelement}
+     */ 
+    this.getRelatedTarget = function(){
+        if(this.browserEvent){
+            return YAHOO.util.Event.getRelatedTarget(this.browserEvent);
+        }
+        return null;
+    };
+    
+    /**
+     * Normalizes mouse wheel delta across browsers
+     */
+    this.getWheelDelta = function(){
+        var e = this.browserEvent;
+        var delta = 0;
+        if(e.wheelDelta){ /* IE/Opera. */
+            delta = e.wheelDelta/120;
+            /** In Opera 9, delta differs in sign as compared to IE. */
+            if(window.opera) delta = -delta;
+        }else if(e.detail){ /** Mozilla case. */
+            delta = -e.detail/3;
+        }
+        return delta;
+    };
+    
+    /**
+     * Returns true if the control, shift or alt key was pressed during this event.
+     * @return {Boolean}
+     */ 
+    this.hasModifier = function(){
+        return this.ctrlKey || this.altKey || this.shiftKey;
+    };
+}();
+            
+    
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Grid.js.html b/www/extras/yui-ext/docs/overview-summary-Grid.js.html new file mode 100644 index 000000000..51becfbfa --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Grid.js.html @@ -0,0 +1,789 @@ + + + + + Overview + + + + + +
+ +

Grid.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.GridThis class represents the primary interface of a component based grid control.
+
+ + + + + + + +
YAHOO.namespace('ext.grid');
+
+/**
+ * @class
+ * This class represents the primary interface of a component based grid control.
+ * <br><br>Usage:<pre><code>
+ * var grid = new YAHOO.ext.grid.Grid('my-container-id', dataModel, columnModel);
+ * // set any options
+ * grid.render();
+ * </code></pre>
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.ext.util.Browser
+ * @requires YAHOO.ext.util.CSS
+ * @requires YAHOO.ext.SplitBar 
+ * @requires YAHOO.ext.EventObject 
+ * @constructor
+ * @param {String/HTMLElement/YAHOO.ext.Element} container The element into which this grid will be rendered - 
+ * The container MUST have some type of size defined for the grid to fill. The container will be 
+ * automatically set to position relative if it isn't already.
+ * @param {Object} dataModel The data model to bind to
+ * @param {Object} colModel The column model with info about this grid's columns
+ * @param {<i>Object</i>} selectionModel (optional) The selection model for this grid (defaults to DefaultSelectionModel)
+ */
+YAHOO.ext.grid.Grid = function(container, dataModel, colModel, selectionModel){
+	/** @private */
+	this.container = YAHOO.ext.Element.get(container);
+	if(this.container.getStyle('position') != 'absolute'){
+	    this.container.setStyle('position', 'relative');
+	}
+	/** @private */
+	this.id = this.container.id;
+	
+    /** @private */
+	this.rows = [];
+    /** @private */
+	this.rowCount = 0;
+    /** @private */
+	this.fieldId = null;
+    /** @private */
+	this.dataModel = dataModel;
+    /** @private */
+	this.colModel = colModel;
+    /** @private */
+	this.selModel = selectionModel;
+	
+	/** @private */
+	this.activeEditor = null;
+	
+	/** @private */
+	this.editingCell = null;
+	
+	/** The minimum width a column can be resized to. (Defaults to 25)
+	 * @type Number */
+	this.minColumnWidth = 25;
+	
+	/** True to automatically resize the columns to fit their content <b>on initial render</b>
+	 * @type Boolean */
+	this.autoSizeColumns = false;
+	
+	/** True to measure headers with column data when auto sizing columns
+	 * @type Boolean */
+	this.autoSizeHeaders = false;
+	
+	
+	/** If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of
+	 * rows measured to get a columns size - defaults to 0 (all rows).
+	 * @type Number */
+	this.maxRowsToMeasure = 0;
+	
+	/** True to highlight rows when the mouse is over (default is false)
+	 * @type Boolean */
+	this.trackMouseOver = false;
+	
+	/** True to enable drag and drop of rows
+	 * @type Boolean */
+	this.enableDragDrop = false;
+	
+	/** True to stripe the rows (default is true)
+	 * @type Boolean */
+	this.stripeRows = true;
+	
+	/** A regular expression defining tagNames 
+     * allowed to have text selection (Defaults to <code>/INPUT|TEXTAREA/i</code>) */
+    this.allowTextSelectionPattern = /INPUT|TEXTAREA|SELECT/i;
+	
+	/** @private */
+	this.setValueDelegate = this.setCellValue.createDelegate(this);
+	
+	var CE = YAHOO.util.CustomEvent;
+	/** @private */
+	this.events = {
+	    // raw events
+	    'click' : new CE('click'),
+	    'dblclick' : new CE('dblclick'),
+	    'mousedown' : new CE('mousedown'),
+	    'mouseup' : new CE('mouseup'),
+	    'mouseover' : new CE('mouseover'),
+	    'mouseout' : new CE('mouseout'),
+	    'keypress' : new CE('keypress'),
+	    'keydown' : new CE('keydown'),
+	    // custom events
+	    'cellclick' : new CE('cellclick'),
+	    'celldblclick' : new CE('celldblclick'),
+	    'rowclick' : new CE('rowclick'),
+	    'rowdblclick' : new CE('rowdblclick'),
+	    'headerclick' : new CE('headerclick'),
+	    'rowcontextmenu' : new CE('rowcontextmenu'),
+	    'headercontextmenu' : new CE('headercontextmenu'),
+	    'beforeedit' : new CE('beforeedit'),
+	    'afteredit' : new CE('afteredit'),
+	    'bodyscroll' : new CE('bodyscroll'),
+	    'columnresize' : new CE('columnresize'),
+	    'startdrag' : new CE('startdrag'),
+	    'enddrag' : new CE('enddrag'),
+	    'dragdrop' : new CE('dragdrop'),
+	    'dragover' : new CE('dragover'),
+	    'dragenter' : new CE('dragenter'),
+	    'dragout' : new CE('dragout')
+	};
+};
+
+YAHOO.ext.grid.Grid.prototype = { 
+    /**
+     * Called once after all setup has been completed and the grid is ready to be rendered.
+     */
+    render : function(){
+    	if(!this.view){
+    	    if(this.dataModel.isPaged()){
+    		    this.view = new YAHOO.ext.grid.PagedGridView();
+    	    }else{
+    	        this.view = new YAHOO.ext.grid.GridView();
+    	    }
+    	}
+    	this.view.init(this);
+        this.el = getEl(this.view.render(), true);
+        var c = this.container;
+        c.mon("click", this.onClick, this, true);
+        c.mon("dblclick", this.onDblClick, this, true);
+        c.mon("contextmenu", this.onContextMenu, this, true);
+        c.mon("selectstart", this.cancelTextSelection, this, true);
+        c.mon("mousedown", this.cancelTextSelection, this, true);
+        c.mon("mousedown", this.onMouseDown, this, true);
+        c.mon("mouseup", this.onMouseUp, this, true);
+        if(this.trackMouseOver){
+            this.el.mon("mouseover", this.onMouseOver, this, true);
+            this.el.mon("mouseout", this.onMouseOut, this, true);
+        }
+        c.mon("keypress", this.onKeyPress, this, true);
+        c.mon("keydown", this.onKeyDown, this, true);
+        this.init();
+    },
+    
+    /** @private */
+    init : function(){
+        this.rows = this.el.dom.rows;
+        if(!this.disableSelection){
+	        if(!this.selModel){
+	            this.selModel = new YAHOO.ext.grid.DefaultSelectionModel(this);
+	        }
+	        this.selModel.init(this);
+	        this.selModel.onSelectionChange.subscribe(this.updateField, this, true);
+        }else{
+            this.selModel = new YAHOO.ext.grid.DisableSelectionModel(this);
+            this.selModel.init(this);
+        }
+        
+        if(this.enableDragDrop){
+            this.dd = new YAHOO.ext.grid.GridDD(this, this.container.dom);
+        }
+     },   
+
+    /** @ignore */
+    onMouseDown : function(e){
+        this.fireEvent('mousedown', e);
+    },
+    
+    /** @ignore */
+    onMouseUp : function(e){
+        this.fireEvent('mouseup', e);
+    },
+    
+    /** @ignore */
+    onMouseOver : function(e){
+        this.fireEvent('mouseover', e);
+    },
+    
+    /** @ignore */
+    onMouseOut : function(e){
+        this.fireEvent('mouseout', e);
+    },
+    
+    /** @ignore */
+    onKeyPress : function(e){
+        this.fireEvent('keypress', e);
+    },
+    
+    /** @ignore */
+    onKeyDown : function(e){
+        this.fireEvent('keydown', e);
+    },
+    
+    /** 
+     * @private internal event firing 
+     * expects arguments[0] is the event name and the rest are the fireDirect arguments
+     */
+    fireEvent : function(){
+        var ce = this.events[arguments[0].toLowerCase()];
+        ce.fireDirect.apply(ce, Array.prototype.slice.call(arguments, 1));
+    },
+    /**
+     * Adds a listener for one of the many defined grid events
+     * @param {String}   eventName     The type of event to listen for
+     * @param {Function} fn        The method the event invokes
+     * @param {<i>Object</i>}   scope  (optional)  An arbitrary object that will be 
+     *                             passed as a parameter to the handler
+     * @param {<i>boolean</i>}  override (optional) If true, the obj passed in becomes
+     *                             the execution scope of the listener
+     */
+    addListener : function(eventName, fn, scope, override){
+        this.events[eventName.toLowerCase()].subscribe(fn, scope, override);
+    },
+    
+    /**
+     * Shorthand for addListener
+     */
+    on : function(eventName, fn, scope, override){
+        this.events[eventName.toLowerCase()].subscribe(fn, scope, override);
+    },
+    
+    removeListener : function(eventName, fn, scope){
+        this.events[eventName.toLowerCase()].unsubscribe(fn, scope);
+    },
+    
+    /** @ignore */
+    onClick : function(e){
+        this.fireEvent('click', e);
+        var target = e.getTarget();
+        var row = this.getRowFromChild(target);
+        var cell = this.getCellFromChild(target);
+        var header = this.getHeaderFromChild(target);
+        if(row){
+            this.fireEvent('rowclick', this, row.rowIndex, e);
+        }
+        if(cell){
+            this.fireEvent('cellclick', this, row.rowIndex, cell.columnIndex, e);
+        }
+        if(header){
+            this.fireEvent('headerclick', this, header.columnIndex, e);
+        }
+    },
+
+    /** @ignore */
+    onContextMenu : function(e){
+        var target = e.getTarget();
+        var row = this.getRowFromChild(target);
+        var header = this.getHeaderFromChild(target);
+        if(row){
+            this.fireEvent('rowcontextmenu', this, row.rowIndex, e);
+        }
+        if(header){
+            this.fireEvent('headercontextmenu', this, header.columnIndex, e);
+        }
+        e.preventDefault();
+    },
+
+    /** @ignore */
+    onDblClick : function(e){
+        this.fireEvent('dblclick', e);
+        var target = e.getTarget();
+        var row = this.getRowFromChild(target);
+        var cell = this.getCellFromChild(target);
+        if(row){
+            this.fireEvent('rowdblclick', this, row.rowIndex, e);
+        }
+        if(cell){
+            this.fireEvent('celldblclick', this, row.rowIndex, cell.columnIndex, e);
+        }
+    },
+    
+    /**
+     * Starts editing the specified for the specified row/column
+     */
+    startEditing : function(rowIndex, colIndex){
+        var row = this.rows[rowIndex];
+        var cell = row.childNodes[colIndex];
+        this.stopEditing();
+        setTimeout(this.doEdit.createDelegate(this, [row, cell]), 10);
+    },
+        
+    /**
+     * Stops any active editing
+     */
+    stopEditing : function(){
+        if(this.activeEditor){
+            this.activeEditor.stopEditing();
+        }
+    },
+        
+    /** @ignore */
+    doEdit : function(row, cell){
+        if(!row || !cell) return;
+        var cm = this.colModel;
+        var dm = this.dataModel;
+        var colIndex = cell.columnIndex;
+        var rowIndex = row.rowIndex;
+        if(cm.isCellEditable(colIndex, rowIndex)){
+           var ed = cm.getCellEditor(colIndex, rowIndex);
+           if(ed){
+               if(this.activeEditor){
+                   this.activeEditor.stopEditing();
+               }
+               this.fireEvent('beforeedit', this, rowIndex, colIndex);
+               this.activeEditor = ed;
+               this.editingCell = cell;
+               this.view.ensureVisible(row, true);
+               try{
+                   cell.focus();
+               }catch(e){}
+               ed.init(this, this.el.dom.parentNode, this.setValueDelegate);
+               var value = dm.getValueAt(rowIndex, cm.getDataIndex(colIndex));
+               // set timeout so firefox stops editing before starting a new edit
+               setTimeout(ed.startEditing.createDelegate(ed, [value, row, cell]), 1);
+           }   
+        }  
+    },
+    
+    setCellValue : function(value, rowIndex, colIndex){
+         this.dataModel.setValueAt(value, rowIndex, this.colModel.getDataIndex(colIndex));
+         this.fireEvent('afteredit', this, rowIndex, colIndex);
+    },
+    
+    /** @ignore Called when text selection starts or mousedown to prevent default */
+    cancelTextSelection : function(e){
+        var target = e.getTarget();
+        if(target && target != this.el.dom.parentNode && !this.allowTextSelectionPattern.test(target.tagName)){
+            e.preventDefault();
+        }
+    },
+    
+    /**
+     * Causes the grid to manually recalculate it's dimensions. Generally this is done automatically, 
+     * but if manual update is required this method will initiate it.
+     */
+    autoSize : function(){
+        this.view.updateWrapHeight();
+        this.view.adjustForScroll();
+    },
+    
+    /**
+     * Scrolls the grid to the specified row
+     * @param {Number/HTMLElement} row The row object or index of the row
+     */
+    scrollTo : function(row){
+        if(typeof row == 'number'){
+            row = this.rows[row];
+        }
+        this.view.ensureVisible(row, true);
+    },
+    
+    /** @private */
+    getEditingCell : function(){
+        return this.editingCell;    
+    },
+    
+    /**
+     * Binds this grid to the field with the specified id. Initially reads and parses the comma 
+     * delimited ids in the field and selects those items. All selections made in the grid
+     * will be persisted to the field by their ids comma delimited.
+     * @param {String} The id of the field to bind to
+     */
+    bindToField : function(fieldId){
+        this.fieldId = fieldId;
+        this.readField();
+    },
+    
+    /** @private */
+    updateField : function(){
+        if(this.fieldId){
+            var field = YAHOO.util.Dom.get(this.fieldId);
+            field.value = this.getSelectedRowIds().join(',');
+        }
+    },
+    
+    /**
+     * Causes the grid to read and select the ids from the bound field - See {@link #bindToField}.
+     */
+    readField : function(){
+        if(this.fieldId){
+            var field = YAHOO.util.Dom.get(this.fieldId);
+            var values = field.value.split(',');
+            var rows = this.getRowsById(values);
+            this.selModel.selectRows(rows, false);
+        }
+    },
+	
+	/**
+	 * Returns the table row at the specified index
+	 * @return {HTMLElement} 
+	 */
+    getRow : function(index){
+        return this.rows[index];
+    },
+	
+	/**
+	 * Returns the rows that have the specified id(s). The id value for a row is provided 
+	 * by the DataModel. See {@link YAHOO.ext.grid.DefaultDataModel#getRowId}.
+	 * @param {String/Array} An id to find or an array of ids
+	 * @return {HtmlElement/Array} If one id was passed in, it returns one result. 
+	 * If an array of ids was specified, it returns an Array of HTMLElements
+	 */
+    getRowsById : function(id){
+        var dm = this.dataModel;
+        if(!(id instanceof Array)){
+            for(var i = 0; i < this.rows.length; i++){
+                if(dm.getRowId(i) == id){
+                    return this.rows[i];
+                }
+            }
+            return null;
+        }
+        var found = [];
+        var re = "^(?:";
+        for(var i = 0; i < id.length; i++){
+            re += id[i];
+            if(i != id.length-1) re += "|";
+        }
+        var regex = new RegExp(re + ")$");
+        for(var i = 0; i < this.rows.length; i++){
+            if(regex.test(dm.getRowId(i))){
+                found.push(this.rows[i]);
+            }
+        }
+        return found;
+    },
+    
+    /**
+	 * Returns the row that comes after the specified row - text nodes are skipped.
+	 * @param {HTMLElement} row
+	 * @return {HTMLElement} 
+	 */
+    getRowAfter : function(row){
+        return this.getSibling('next', row);
+    },
+    
+    /**
+	 * Returns the row that comes before the specified row - text nodes are skipped.
+	 * @param {HTMLElement} row
+	 * @return {HTMLElement} 
+	 */
+    getRowBefore : function(row){
+        return this.getSibling('previous', row);
+    },
+    
+    /**
+	 * Returns the cell that comes after the specified cell - text nodes are skipped.
+	 * @param {HTMLElement} cell
+	 * @param {Boolean} includeHidden
+	 * @return {HTMLElement} 
+	 */
+    getCellAfter : function(cell, includeHidden){
+        var next = this.getSibling('next', cell);
+        if(next && !includeHidden && this.colModel.isHidden(next.columnIndex)){
+            return this.getCellAfter(next);
+        }
+        return next;
+    },
+    
+    /**
+	 * Returns the cell that comes before the specified cell - text nodes are skipped.
+	 * @param {HTMLElement} cell
+	 * @param {Boolean} includeHidden
+	 * @return {HTMLElement} 
+	 */
+    getCellBefore : function(cell, includeHidden){
+        var prev = this.getSibling('previous', cell);
+        if(prev && !includeHidden && this.colModel.isHidden(prev.columnIndex)){
+            return this.getCellBefore(prev);
+        }
+        return prev;
+    },
+    
+    /**
+	 * Returns the last cell for the row - text nodes and hidden columns are skipped.
+	 * @param {HTMLElement} row
+	 * @param {Boolean} includeHidden
+	 * @return {HTMLElement} 
+	 */
+    getLastCell : function(row, includeHidden){
+        var cell = this.getElement('previous', row.lastChild);
+        if(cell && !includeHidden && this.colModel.isHidden(cell.columnIndex)){
+            return this.getCellBefore(cell);
+        }
+        return cell;
+    },
+    
+    /**
+	 * Returns the first cell for the row - text nodes and hidden columns are skipped.
+	 * @param {HTMLElement} row
+	 * @param {Boolean} includeHidden
+	 * @return {HTMLElement} 
+	 */
+    getFirstCell : function(row, includeHidden){
+        var cell = this.getElement('next', row.firstChild);
+        if(cell && !includeHidden && this.colModel.isHidden(cell.columnIndex)){
+            return this.getCellAfter(cell);
+        }
+        return cell;
+    },
+    
+    /**
+     * Gets siblings, skipping text nodes
+     * @param {String} type The direction to walk: 'next' or 'previous'
+     * @private
+     */
+    getSibling : function(type, node){
+        if(!node) return null;
+        type += 'Sibling';
+        var n = node[type];
+        while(n && n.nodeType != 1){
+            n = n[type];
+        }
+        return n;
+    },
+    
+    /**
+     * Returns node if node is an HTMLElement else walks the siblings in direction looking for 
+     * a node that is an element
+     * @param {String} direction The direction to walk: 'next' or 'previous'
+     * @private
+     */
+    getElement : function(direction, node){
+        if(!node || node.nodeType == 1) return node;
+        else return this.getSibling(direction, node);
+    },
+    
+    /**
+     * @private
+     */
+    getElementFromChild : function(childEl, parentClass){
+        if(!childEl || (YAHOO.util.Dom.hasClass(childEl, parentClass))){
+		    return childEl;
+	    }
+	    var p = childEl.parentNode;
+	    while(p && p.tagName.toUpperCase() != 'BODY'){
+            if(YAHOO.util.Dom.hasClass(p, parentClass)){
+            	return p;
+            }
+            p = p.parentNode;
+        }
+	    return null;
+    },
+    
+    /**
+	 * Returns the row that contains the specified child element.
+	 * @param {HTMLElement} childEl
+	 * @return {HTMLElement} 
+	 */
+    getRowFromChild : function(childEl){
+        return this.getElementFromChild(childEl, 'ygrid-row');
+    },
+    
+    /**
+	 * Returns the cell that contains the specified child element.
+	 * @param {HTMLElement} childEl
+	 * @return {HTMLElement} 
+	 */
+    getCellFromChild : function(childEl){
+        return this.getElementFromChild(childEl, 'ygrid-col');
+    },
+    
+    
+    /**
+     * Returns the header element that contains the specified child element.
+     * @param {HTMLElement}  childEl
+	 * @return {HTMLElement} 
+	 */
+     getHeaderFromChild : function(childEl){
+        return this.getElementFromChild(childEl, 'ygrid-hd');
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().getSelectedRows() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRows}</small> for more details.
+     */
+    getSelectedRows : function(){
+        return this.selModel.getSelectedRows();
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().getSelectedRows()[0] - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRows}</small> for more details.
+     */
+    getSelectedRow : function(){
+        if(this.selModel.hasSelection()){
+            return this.selModel.getSelectedRows()[0];
+        }
+        return null;
+    },
+    
+    /**
+     * Get the selected row indexes
+     * @return {Array} Array of indexes
+     */
+    getSelectedRowIndexes : function(){
+        var a = [];
+        var rows = this.selModel.getSelectedRows();
+        for(var i = 0; i < rows.length; i++) {
+        	a[i] = rows[i].rowIndex;
+        }
+        return a;
+    },
+    
+    /**
+     * Gets the first selected row or -1 if none are selected
+     * @return {Number}
+     */
+    getSelectedRowIndex : function(){
+        if(this.selModel.hasSelection()){
+           return this.selModel.getSelectedRows()[0].rowIndex;
+        }
+        return -1;
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().getSelectedRowIds()[0] - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRowIds}</small> for more details.
+     */
+    getSelectedRowId : function(){
+        if(this.selModel.hasSelection()){
+           return this.selModel.getSelectedRowIds()[0];
+        }
+        return null;
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().getSelectedRowIds() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRowIds}</small> for more details.
+     */
+    getSelectedRowIds : function(){
+        return this.selModel.getSelectedRowIds();
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().clearSelections() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#clearSelections}</small> for more details.
+     */
+    clearSelections : function(){
+        this.selModel.clearSelections();
+    },
+    
+        
+    /**
+     * Convenience method for getSelectionModel().selectAll() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#selectAll}</small> for more details.
+     */
+    selectAll : function(){
+        this.selModel.selectAll();
+    },
+    
+        
+    /**
+     * Convenience method for getSelectionModel().getCount() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#getCount}</small> for more details.
+     */
+    getSelectionCount : function(){
+        return this.selModel.getCount();
+    },
+    
+    /**
+     * Convenience method for getSelectionModel().hasSelection() - 
+     * See <small>{@link YAHOO.ext.grid.DefaultSelectionModel#hasSelection}</small> for more details.
+     */
+    hasSelection : function(){
+        return this.selModel.hasSelection();
+    },
+    
+    /**
+     * Returns the grid's SelectionModel.
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new DefaultSelectionModel();
+        }
+        return this.selModel;
+    },
+    
+    /**
+     * Returns the grid's DataModel.
+     */
+    getDataModel : function(){
+        return this.dataModel;
+    },
+    
+    /**
+     * Returns the grid's ColumnModel.
+     */
+    getColumnModel : function(){
+        return this.colModel;
+    },
+    
+    /**
+     * Returns the grid's GridView object.
+     */
+    getView : function(){
+        return this.view;
+    },
+    /**
+     * Called to get grid's drag proxy text, by default returns this.ddText. 
+     * @return {String}
+     */
+    getDragDropText : function(){
+        return this.ddText.replace('%0', this.selModel.getCount());
+    }
+};
+/**
+ * Configures the text is the drag proxy (defaults to "%0 selected row(s)"). 
+ * %0 is replaced with the number of selected rows.
+ * @type String
+ */
+YAHOO.ext.grid.Grid.prototype.ddText = "%0 selected row(s)";
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-GridDD.js.html b/www/extras/yui-ext/docs/overview-summary-GridDD.js.html new file mode 100644 index 000000000..b646e56e9 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-GridDD.js.html @@ -0,0 +1,168 @@ + + + + + Overview + + + + + +
+ +

GridDD.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.GridDDCustom implementation of YAHOO.util.DDProxy used internally by the grid +
+
+ + + + + + + +
+// kill dependency issue
+if(YAHOO.util.DDProxy){
+/**
+ * @class
+ * Custom implementation of YAHOO.util.DDProxy used internally by the grid
+ * @extends YAHOO.util.DDProxy
+ */
+YAHOO.ext.grid.GridDD = function(grid, bwrap){
+    this.grid = grid;
+    var ddproxy = document.createElement('div');
+    ddproxy.id = grid.container.id + '-ddproxy';
+    ddproxy.className = 'ygrid-drag-proxy';
+    document.body.insertBefore(ddproxy, document.body.firstChild);
+    YAHOO.util.Dom.setStyle(ddproxy, 'opacity', .80);
+    var ddicon = document.createElement('span');
+    ddicon.className = 'ygrid-drop-icon ygrid-drop-nodrop';
+    ddproxy.appendChild(ddicon);
+    var ddtext = document.createElement('span');
+    ddtext.className = 'ygrid-drag-text';
+    ddtext.innerHTML = "&nbsp;";
+    ddproxy.appendChild(ddtext);
+    
+    this.ddproxy = ddproxy;
+    this.ddtext = ddtext;
+    this.ddicon = ddicon;
+    YAHOO.util.Event.on(bwrap, 'click', this.handleClick, this, true);
+    YAHOO.ext.grid.GridDD.superclass.constructor.call(this, bwrap.id, 'GridDD', 
+          {dragElId : ddproxy.id, resizeFrame: false});
+          
+    this.unlockDelegate = grid.selModel.unlock.createDelegate(grid.selModel);
+};
+YAHOO.extendX(YAHOO.ext.grid.GridDD, YAHOO.util.DDProxy);
+
+YAHOO.ext.grid.GridDD.prototype.handleMouseDown = function(e){
+    var row = this.grid.getRowFromChild(YAHOO.util.Event.getTarget(e));
+    if(!row) return;
+    if(this.grid.selModel.isSelected(row)){
+        YAHOO.ext.grid.GridDD.superclass.handleMouseDown.call(this, e);
+    }else {
+        this.grid.selModel.unlock();
+        YAHOO.ext.EventObject.setEvent(e);
+        this.grid.selModel.rowClick(this.grid, row.rowIndex, YAHOO.ext.EventObject);
+        YAHOO.ext.grid.GridDD.superclass.handleMouseDown.call(this, e);
+        this.grid.selModel.lock();
+    }
+};
+
+YAHOO.ext.grid.GridDD.prototype.handleClick = function(e){
+    if(this.grid.selModel.isLocked()){
+         setTimeout(this.unlockDelegate, 1);
+         YAHOO.util.Event.stopEvent(e);
+    }
+};
+
+/**
+ * Updates the DD visual element to allow/not allow a drop
+ * @param {Boolean} dropStatus True if drop is allowed on the target
+ */
+YAHOO.ext.grid.GridDD.prototype.setDropStatus = function(dropStatus){
+    if(dropStatus === true){
+        YAHOO.util.Dom.replaceClass(this.ddicon, 'ygrid-drop-nodrop', 'ygrid-drop-ok');
+    }else{
+        YAHOO.util.Dom.replaceClass(this.ddicon, 'ygrid-drop-ok', 'ygrid-drop-nodrop');
+    }
+};
+
+YAHOO.ext.grid.GridDD.prototype.startDrag = function(e){
+    this.ddtext.innerHTML = this.grid.getDragDropText();
+    this.setDropStatus(false);
+    this.grid.selModel.lock();
+    this.grid.fireEvent('startdrag', this.grid, this, e);
+};
+       
+YAHOO.ext.grid.GridDD.prototype.endDrag = function(e){
+    YAHOO.util.Dom.setStyle(this.ddproxy, 'visibility', 'hidden');
+    this.grid.fireEvent('enddrag', this.grid, this, e);
+};
+
+YAHOO.ext.grid.GridDD.prototype.autoOffset = function(iPageX, iPageY) {
+    this.setDelta(-12, -20);
+};
+
+YAHOO.ext.grid.GridDD.prototype.onDragEnter = function(e, id) {
+    this.setDropStatus(true);
+    this.grid.fireEvent('dragenter', this.grid, this, id, e);
+};
+
+YAHOO.ext.grid.GridDD.prototype.onDragDrop = function(e, id) {
+    this.grid.fireEvent('dragdrop', this.grid, this, id, e);
+};
+
+YAHOO.ext.grid.GridDD.prototype.onDragOver = function(e, id) {
+    this.grid.fireEvent('dragover', this.grid, this, id, e);
+};
+
+YAHOO.ext.grid.GridDD.prototype.onDragOut = function(e, id) {
+    this.setDropStatus(false);
+    this.grid.fireEvent('dragout', this.grid, this, id, e);
+};
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-GridView.js.html b/www/extras/yui-ext/docs/overview-summary-GridView.js.html new file mode 100644 index 000000000..7c71aa812 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-GridView.js.html @@ -0,0 +1,846 @@ + + + + + Overview + + + + + +
+ +

GridView.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.GridViewDefault UI code used internally by the Grid.
YAHOO.ext.grid.HeaderControllerUsed internal by GridView to route header related events.
+
+ + + + + + + +
/**
+ * @class
+ * Default UI code used internally by the Grid. Documentation to come.
+ * @constructor
+ */
+YAHOO.ext.grid.GridView = function(){
+	/** @private */
+	this.grid = null;
+	
+	/** @private */
+	this.lastFocusedRow = null;
+	/**
+	 * Fires when the ViewPort is scrolled - fireDirect sig: (this, scrollLeft, scrollTop)
+	 * @type YAHOO.util.CustomEvent
+	 * @deprecated
+	 */
+	this.onScroll = new YAHOO.util.CustomEvent('onscroll');
+	
+	/**
+	 * @private
+	 */
+	this.adjustScrollTask = new YAHOO.ext.util.DelayedTask(this._adjustForScroll, this);
+	/**
+	 * @private
+	 */
+	this.ensureVisibleTask = new YAHOO.ext.util.DelayedTask();
+};
+
+YAHOO.ext.grid.GridView.prototype = {
+	init: function(grid){
+		this.grid = grid;
+	},
+	
+	fireScroll: function(scrollLeft, scrollTop){
+		this.onScroll.fireDirect(this.grid, scrollLeft, scrollTop);
+	},
+	
+	/**
+	 * Utility method that gets an array of the cell renderers
+	 */
+	getColumnRenderers : function(){
+    	var renderers = [];
+    	var cm = this.grid.colModel;
+        var colCount = cm.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            renderers.push(cm.getRenderer(i));
+        }
+        return renderers;
+    },
+    
+    buildIndexMap : function(){
+        var colToData = {};
+        var dataToCol = {};
+        var cm = this.grid.colModel;
+        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+            var di = cm.getDataIndex(i);
+            colToData[i] = di;
+            dataToCol[di] = i;
+        }
+        return {'colToData': colToData, 'dataToCol': dataToCol};
+    },
+    
+    getDataIndexes : function(){
+    	if(!this.indexMap){
+            this.indexMap = this.buildIndexMap();
+        }
+        return this.indexMap.colToData;
+    },
+    
+    getColumnIndexByDataIndex : function(dataIndex){
+        if(!this.indexMap){
+            this.indexMap = this.buildIndexMap();
+        }
+    	return this.indexMap.dataToCol[dataIndex];
+    },
+    
+    updateHeaders : function(){
+        var colModel = this.grid.colModel;
+        var hcells = this.headers;
+        var colCount = colModel.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            hcells[i].textNode.innerHTML = colModel.getColumnHeader(i);
+        }
+    },
+    
+    adjustForScroll : function(disableDelay){
+        if(!disableDelay){
+            this.adjustScrollTask.delay(50);
+        }else{
+            this._adjustForScroll();
+        }
+    },
+    
+    getCellAtPoint : function(x, y){
+        var colIndex = null;        
+        var rowIndex = null;
+        
+        // translate page coordinates to local coordinates
+        var xy = YAHOO.util.Dom.getXY(this.wrap);
+        x = (x - xy[0]) + this.wrap.scrollLeft;
+        y = (y - xy[1]) + this.wrap.scrollTop;
+        
+        var colModel = this.grid.colModel;
+        var pos = 0;
+        var colCount = colModel.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            if(colModel.isHidden(i)) continue;
+            var width = colModel.getColumnWidth(i);
+            if(x >= pos && x < pos+width){
+                colIndex = i;
+                break;
+            }
+            pos += width;
+        }
+        if(colIndex != null){
+            rowIndex = (y == 0 ? 0 : Math.floor(y / this.getRowHeight()));
+            if(rowIndex >= this.grid.dataModel.getRowCount()){
+                return null;
+            }
+            return [colIndex, rowIndex];
+        }
+        return null;
+    },
+    
+    /** @private */
+    _adjustForScroll : function(){
+        this.forceScrollUpdate();
+        if(this.scrollbarMode == YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP){
+            var adjustment = 0;
+            if(this.wrap.clientWidth && this.wrap.clientWidth != 0){
+                adjustment = this.wrap.offsetWidth - this.wrap.clientWidth;
+            }
+            this.hwrap.setWidth(this.wrap.offsetWidth-adjustment);
+        }else{
+            this.hwrap.setWidth(this.wrap.offsetWidth);
+        }
+        this.bwrap.setWidth(Math.max(this.grid.colModel.getTotalWidth(), this.wrap.clientWidth));
+    },
+
+    focusRow : function(row){
+        if(typeof row == 'number'){
+            row = this.getBodyTable().childNodes[row];
+        }
+        if(!row) return;
+    	var left = this.wrap.scrollLeft;
+    	try{ // try catch for IE occasional focus bug
+    	    row.childNodes.item(0).hideFocus = true;
+        	row.childNodes.item(0).focus();
+        }catch(e){}
+        this.ensureVisible(row);
+        this.wrap.scrollLeft = left;
+        this.handleScroll();
+        this.lastFocusedRow = row;
+    },
+
+    ensureVisible : function(row, disableDelay){
+        if(!disableDelay){
+            this.ensureVisibleTask.delay(50, this._ensureVisible, this, [row]);
+        }else{
+            this._ensureVisible(row);
+        }
+    },
+
+    /** @ignore */
+    _ensureVisible : function(row){
+        if(typeof row == 'number'){
+            row = this.getBodyTable().childNodes[row];
+        }
+        if(!row) return;
+    	var left = this.wrap.scrollLeft;
+    	var rowTop = parseInt(row.offsetTop, 10); // parseInt for safari bug
+        var rowBottom = rowTop + row.offsetHeight;
+        var clientTop = parseInt(this.wrap.scrollTop, 10); // parseInt for safari bug
+        var clientBottom = clientTop + this.wrap.clientHeight;
+        if(rowTop < clientTop){
+        	this.wrap.scrollTop = rowTop;
+        }else if(rowBottom > clientBottom){
+            this.wrap.scrollTop = rowBottom-this.wrap.clientHeight;
+        }
+        this.wrap.scrollLeft = left;
+        this.handleScroll();
+    },
+    
+    updateColumns : function(){
+        this.grid.stopEditing();
+        var colModel = this.grid.colModel;
+        var hcols = this.headers;
+        var colCount = colModel.getColumnCount();
+        var pos = 0;
+        var totalWidth = colModel.getTotalWidth();
+        for(var i = 0; i < colCount; i++){
+            if(colModel.isHidden(i)) continue;
+            var width = colModel.getColumnWidth(i);
+            hcols[i].style.width = width + 'px';
+            hcols[i].style.left = pos + 'px';
+            hcols[i].split.style.left = (pos+width-3) + 'px';
+            this.setCSSWidth(i, width, pos);
+            pos += width;
+        }
+        this.lastWidth = totalWidth;
+        this.bwrap.setWidth(Math.max(totalWidth, this.wrap.clientWidth));
+        if(!YAHOO.ext.util.Browser.isIE){ // fix scrolling prob in gecko and opera
+        	this.wrap.scrollLeft = this.hwrap.dom.scrollLeft;
+        }
+        this.syncScroll();
+        this.forceScrollUpdate();
+    },
+    
+    setCSSWidth : function(colIndex, width, pos){
+        var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex];
+        YAHOO.ext.util.CSS.updateRule(selector, 'width', width + 'px');
+        if(typeof pos == 'number'){
+            YAHOO.ext.util.CSS.updateRule(selector, 'left', pos + 'px');
+        }
+    },
+    
+    handleHiddenChange : function(colModel, colIndex, hidden){
+        if(hidden){
+            this.hideColumn(colIndex);
+        }else{
+            this.unhideColumn(colIndex);
+        }
+        this.updateColumns();
+    },
+    
+    hideColumn : function(colIndex){
+        var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex];
+        YAHOO.ext.util.CSS.updateRule(selector, 'position', 'absolute');
+        YAHOO.ext.util.CSS.updateRule(selector, 'visibility', 'hidden');
+        
+        this.headers[colIndex].style.display = 'none';
+        this.headers[colIndex].split.style.display = 'none';
+    },
+    
+    unhideColumn : function(colIndex){
+        var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex];
+        YAHOO.ext.util.CSS.updateRule(selector, 'position', '');
+        YAHOO.ext.util.CSS.updateRule(selector, 'visibility', 'visible');
+        
+        this.headers[colIndex].style.display = '';
+        this.headers[colIndex].split.style.display = '';
+    },
+    
+    getBodyTable : function(){
+    	return this.bwrap.dom;
+    },
+    
+    updateRowIndexes : function(firstRow, lastRow){
+        var stripeRows = this.grid.stripeRows;
+        var bt = this.getBodyTable();
+        var nodes = bt.childNodes;
+        firstRow = firstRow || 0;
+        lastRow = lastRow || nodes.length-1;
+        var re = /^(?:ygrid-row ygrid-row-alt|ygrid-row)/;
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            var node = nodes[rowIndex];
+            if(stripeRows && (rowIndex+1) % 2 == 0){
+        		node.className = node.className.replace(re, 'ygrid-row ygrid-row-alt');
+        	}else{
+        		node.className = node.className.replace(re, 'ygrid-row');
+        	}
+            node.rowIndex = rowIndex;
+            nodes[rowIndex].style.top = (rowIndex * this.rowHeight) + 'px';
+        }
+    },
+
+    insertRows : function(dataModel, firstRow, lastRow){
+        this.updateBodyHeight();
+        this.adjustForScroll(true);
+        var renderers = this.getColumnRenderers();
+        var dindexes = this.getDataIndexes();
+        var colCount = this.grid.colModel.getColumnCount();
+        var beforeRow = null;
+        var bt = this.getBodyTable();
+        if(firstRow < bt.childNodes.length){
+            beforeRow = bt.childNodes[firstRow];
+        }
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            var row = document.createElement('span');
+            row.className = 'ygrid-row';
+            row.style.top = (rowIndex * this.rowHeight) + 'px';
+            this.renderRow(dataModel, row, rowIndex, colCount, renderers, dindexes);
+            if(beforeRow){
+            	bt.insertBefore(row, beforeRow);
+            }else{
+                bt.appendChild(row);
+            }
+        }
+        this.updateRowIndexes(firstRow);
+        this.adjustForScroll();
+    },
+    
+    renderRow : function(dataModel, row, rowIndex, colCount, renderers, dindexes){
+        for(var colIndex = 0; colIndex < colCount; colIndex++){
+            var td = document.createElement('span');
+            td.className = 'ygrid-col ygrid-col-' + colIndex + (colIndex == colCount-1 ? ' ygrid-col-last' : '');
+            td.columnIndex = colIndex;
+            td.tabIndex = 0;
+            var span = document.createElement('span');
+            span.className = 'ygrid-cell-text';
+            td.appendChild(span);
+            var val = renderers[colIndex](dataModel.getValueAt(rowIndex, dindexes[colIndex]), rowIndex, colIndex);
+            if(val == '') val = '&nbsp;';
+            span.innerHTML = val;
+            row.appendChild(td);
+        }
+    },
+    
+    deleteRows : function(dataModel, firstRow, lastRow){
+        this.updateBodyHeight();
+        // first make sure they are deselected
+        this.grid.selModel.deselectRange(firstRow, lastRow);
+        var bt = this.getBodyTable();
+        var rows = []; // get references because the rowIndex will change
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            rows.push(bt.childNodes[rowIndex]);
+        }
+        for(var i = 0; i < rows.length; i++){
+            bt.removeChild(rows[i]);
+            rows[i] = null;
+        }
+        rows = null;
+        this.updateRowIndexes(firstRow);
+        this.adjustForScroll();
+    },
+    
+    updateRows : function(dataModel, firstRow, lastRow){
+        var bt = this.getBodyTable();
+        var dindexes = this.getDataIndexes();
+        var renderers = this.getColumnRenderers();
+        var colCount = this.grid.colModel.getColumnCount();
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            var row = bt.rows[rowIndex];
+            var cells = row.childNodes;
+            for(var colIndex = 0; colIndex < colCount; colIndex++){
+                var td = cells[colIndex];
+                var val = renderers[colIndex](dataModel.getValueAt(rowIndex, dindexes[colIndex]), rowIndex, colIndex);
+                if(val == '') val = '&nbsp;';
+                td.firstChild.innerHTML = val;
+            }
+        }
+    },
+    
+    handleSort : function(dataModel, sortColumnIndex, sortDir, noRefresh){
+        this.grid.selModel.syncSelectionsToIds();
+        if(!noRefresh){
+           this.updateRows(dataModel, 0, dataModel.getRowCount()-1);
+        }
+        this.updateHeaderSortState();
+        if(this.lastFocusedRow){
+            this.focusRow(this.lastFocusedRow);
+        }
+    },
+    
+    syncScroll : function(){
+        this.hwrap.dom.scrollLeft = this.wrap.scrollLeft;
+    },
+    
+    handleScroll : function(){
+        this.syncScroll();
+        this.fireScroll(this.wrap.scrollLeft, this.wrap.scrollTop);
+        this.grid.fireEvent('bodyscroll', this.wrap.scrollLeft, this.wrap.scrollTop);
+    },
+    
+    getRowHeight : function(){
+        if(!this.rowHeight){
+            var rule = YAHOO.ext.util.CSS.getRule(["#" + this.grid.id + " .ygrid-row", ".ygrid-row"]);
+        	if(rule && rule.style.height){
+        	    this.rowHeight = parseInt(rule.style.height, 10);
+        	}else{
+        	    this.rowHeight = 21;
+        	}
+        }
+        return this.rowHeight;
+    },
+    
+    renderRows : function(dataModel){
+        if(this.grid.selModel){
+            this.grid.selModel.clearSelections();
+        }
+    	var bt = this.getBodyTable();
+    	bt.innerHTML = '';
+    	this.rowHeight = this.getRowHeight();
+    	this.insertRows(dataModel, 0, dataModel.getRowCount()-1);
+    },
+    
+    updateCell : function(dataModel, rowIndex, dataIndex){
+        var colIndex = this.getColumnIndexByDataIndex(dataIndex);
+        if(typeof colIndex == 'undefined'){ // not present in grid
+            return;
+        }
+        var bt = this.getBodyTable();
+        var row = bt.childNodes[rowIndex];
+        var cell = row.childNodes[colIndex];
+        var renderer = this.grid.colModel.getRenderer(colIndex);
+        var val = renderer(dataModel.getValueAt(rowIndex, dataIndex), rowIndex, colIndex);
+        if(val == '') val = '&nbsp;';
+        cell.firstChild.innerHTML = val;
+    },
+    
+    calcColumnWidth : function(colIndex, maxRowsToMeasure){
+        var maxWidth = 0;
+        var bt = this.getBodyTable();
+        var rows = bt.childNodes;
+        var stopIndex = Math.min(maxRowsToMeasure || rows.length, rows.length);
+        if(this.grid.autoSizeHeaders){
+            var h = this.headers[colIndex];
+            var curWidth = h.style.width;
+            h.style.width = this.grid.minColumnWidth+'px';
+            maxWidth = Math.max(maxWidth, h.scrollWidth);
+            h.style.width = curWidth;
+        }
+        for(var i = 0; i < stopIndex; i++){
+            var cell = rows[i].childNodes[colIndex].firstChild;
+            maxWidth = Math.max(maxWidth, cell.scrollWidth);
+        }
+        return maxWidth + /*margin for error in IE*/ 5;
+    },
+    
+    autoSizeColumn : function(colIndex, forceMinSize){
+        if(forceMinSize){
+           this.setCSSWidth(colIndex, this.grid.minColumnWidth);
+        }
+        var newWidth = this.calcColumnWidth(colIndex);
+        this.grid.colModel.setColumnWidth(colIndex,
+            Math.max(this.grid.minColumnWidth, newWidth));
+        this.grid.fireEvent('columnresize', colIndex, newWidth);
+    },
+    
+    autoSizeColumns : function(){
+        var colModel = this.grid.colModel;
+        var colCount = colModel.getColumnCount();
+        var wrap = this.wrap;
+        for(var i = 0; i < colCount; i++){
+            this.setCSSWidth(i, this.grid.minColumnWidth);
+            colModel.setColumnWidth(i, this.calcColumnWidth(i, this.grid.maxRowsToMeasure), true);
+        }
+        if(colModel.getTotalWidth() < wrap.clientWidth){
+            var diff = Math.floor((wrap.clientWidth - colModel.getTotalWidth()) / colCount);
+            for(var i = 0; i < colCount; i++){
+                colModel.setColumnWidth(i, colModel.getColumnWidth(i) + diff, true);
+            }
+        }
+        this.updateColumns();  
+    },
+    
+    updateWrapHeight : function(){
+        var box = this.grid.container.getBox(true);
+        this.wrapEl.setHeight(box.height-this.footerHeight-parseInt(this.wrap.offsetTop, 10));
+    },
+    
+    forceScrollUpdate : function(){
+        var wrap = this.wrap;
+        YAHOO.util.Dom.setStyle(wrap, 'width', (wrap.offsetWidth) +'px');
+        setTimeout(function(){ // set timeout so FireFox works
+            YAHOO.util.Dom.setStyle(wrap, 'width', '');
+        }, 1);
+    },
+    
+    updateHeaderSortState : function(){
+        var state = this.grid.dataModel.getSortState();
+        var sortColumn = this.getColumnIndexByDataIndex(state.column);
+        var sortDir = state.direction;
+        for(var i = 0, len = this.headers.length; i < len; i++){
+            var h = this.headers[i];
+            if(i != sortColumn){
+                h.sortDesc.style.display = 'none';
+                h.sortAsc.style.display = 'none';
+            }else{
+                h.sortDesc.style.display = sortDir == 'DESC' ? 'block' : 'none';
+                h.sortAsc.style.display = sortDir == 'ASC' ? 'block' : 'none';
+            }
+        }
+    },
+
+    render : function(){
+        var grid = this.grid;
+        var container = grid.container.dom;
+        var dataModel = grid.dataModel;
+        dataModel.onCellUpdated.subscribe(this.updateCell, this, true);
+        dataModel.onTableDataChanged.subscribe(this.renderRows, this, true);
+        dataModel.onRowsDeleted.subscribe(this.deleteRows, this, true);
+        dataModel.onRowsInserted.subscribe(this.insertRows, this, true);
+        dataModel.onRowsUpdated.subscribe(this.updateRows, this, true);
+        dataModel.onRowsSorted.subscribe(this.handleSort, this, true);
+    
+        var colModel = grid.colModel;
+        colModel.onWidthChange.subscribe(this.updateColumns, this, true);
+        colModel.onHeaderChange.subscribe(this.updateHeaders, this, true);
+        colModel.onHiddenChange.subscribe(this.handleHiddenChange, this, true);
+        
+        YAHOO.util.Event.on(window, 'resize', this.adjustForScroll, this, true);
+        YAHOO.util.Event.on(window, 'resize', this.updateWrapHeight, this, true);
+        
+        var autoSizeDelegate = this.autoSizeColumn.createDelegate(this);
+        
+        var colCount = colModel.getColumnCount();
+    
+        var dh = YAHOO.ext.DomHelper;
+        //create wrapper elements that handle offsets and scrolling
+        var wrap = dh.append(container, {tag: 'div', cls: 'ygrid-wrap'});
+        this.wrap = wrap;
+        this.wrapEl = getEl(wrap, true);
+        YAHOO.ext.EventManager.on(wrap, 'scroll', this.handleScroll, this, true);
+        
+        var hwrap = dh.append(container, {tag: 'div', cls: 'ygrid-wrap-headers'});
+        this.hwrap = getEl(hwrap, true);
+        
+        var bwrap = dh.append(wrap, {tag: 'div', cls: 'ygrid-wrap-body', id: container.id + '-body'});
+        this.bwrap = getEl(bwrap, true);
+        this.bwrap.setWidth(colModel.getTotalWidth());
+        bwrap.rows = bwrap.childNodes;
+        
+        this.footerHeight = 0;
+        var foot = this.appendFooter(container);
+        if(foot){
+            this.footer = getEl(foot, true);
+            this.footerHeight = this.footer.getHeight();
+        }
+        this.updateWrapHeight();
+        
+        var hrow = dh.append(hwrap, {tag: 'span', cls: 'ygrid-hrow'});
+        this.hrow = hrow;
+        
+        // IE doesn't like iframes, we will leave this alone
+        var iframe = document.createElement('iframe');
+        iframe.className = 'ygrid-hrow-frame';
+        iframe.frameBorder = 0;
+        hwrap.appendChild(iframe);
+        
+        this.headerCtrl = new YAHOO.ext.grid.HeaderController(this.grid);
+        this.headers = [];
+        this.cols = [];
+        
+        
+        
+        var htemplate = dh.createTemplate({
+           tag: 'span', cls: 'ygrid-hd ygrid-header-{0}', children: [{
+                tag: 'span', 
+                cls: 'ygrid-hd-body', 
+                html: '<table border="0" cellpadding="0" cellspacing="0">' +
+                      '<tbody><tr><td><span>{1}</span></td>' +
+                      '<td><span class="sort-desc"></span><span class="sort-asc"></span></td>' +
+                      '</tr></tbody></table>'
+           }]           
+        });
+        htemplate.compile();
+        for(var i = 0; i < colCount; i++){
+            var hd = htemplate.append(hrow, [i, colModel.getColumnHeader(i)]);
+            var spans = hd.getElementsByTagName('span');
+            hd.textNode = spans[1];
+            hd.sortDesc = spans[2];
+    	    hd.sortAsc = spans[3];
+    	    hd.columnIndex = i;
+            this.headers.push(hd);
+            if(colModel.isSortable(i)){
+                this.headerCtrl.register(hd);
+            }
+            var split = dh.append(hrow, {tag: 'span', cls: 'ygrid-hd-split'});
+            hd.split = split;
+        	
+        	YAHOO.util.Event.on(split, 'dblclick', autoSizeDelegate.createCallback(i+0, true));
+        	
+        	var sb = new YAHOO.ext.SplitBar(split, hd, null, YAHOO.ext.SplitBar.LEFT);
+        	sb.columnIndex = i;
+        	sb.minSize = grid.minColumnWidth;
+        	sb.onMoved.subscribe(this.onColumnSplitterMoved, this, true);
+        	YAHOO.util.Dom.addClass(sb.proxy, 'ygrid-column-sizer');
+        	YAHOO.util.Dom.setStyle(sb.proxy, 'background-color', '');
+        	sb.dd._resizeProxy = function(){
+        	    var el = this.getDragEl();
+        	    YAHOO.util.Dom.setStyle(el, 'height', (hwrap.clientHeight+wrap.clientHeight-2) +'px');
+        	};
+        }
+        if(grid.autoSizeColumns){
+            this.renderRows(dataModel);
+            this.autoSizeColumns();
+        }else{
+            this.updateColumns();
+            this.renderRows(dataModel);
+        }
+        
+        for(var i = 0; i < colCount; i++){
+            if(colModel.isHidden(i)){
+                this.hideColumn(i);
+            }
+        }
+        return this.bwrap;
+        
+        /*
+        // Old DOM code
+        //create wrapper elements that handle offsets and scrolling
+        var wrap = document.createElement('div');
+        wrap.className = 'ygrid-wrap';
+        grid.container.dom.appendChild(wrap);
+        this.wrap = wrap;
+        this.wrapEl = getEl(wrap, true);
+        YAHOO.ext.EventManager.on(wrap, 'scroll', this.handleScroll, this, true);
+        
+        var hwrap = document.createElement('div');
+        hwrap.className = 'ygrid-wrap-headers';
+        grid.container.dom.appendChild(hwrap);
+        this.hwrap = getEl(hwrap, true);
+        //this.hwrap.setWidth(colModel.getTotalWidth());
+        
+        var bwrap = document.createElement('div');
+        bwrap.id = grid.container.id + '-body';
+        bwrap.className = 'ygrid-wrap-body';
+        wrap.appendChild(bwrap);
+        this.bwrap = getEl(bwrap, true);
+        this.bwrap.setWidth(colModel.getTotalWidth());
+        bwrap.rows = bwrap.childNodes;
+        
+        this.footerHeight = 0;
+        var foot = this.appendFooter(grid.container.dom);
+        if(foot){
+            this.footer = getEl(foot, true);
+            this.footerHeight = this.footer.getHeight();
+        }
+        this.updateWrapHeight();
+        
+        var hrow = document.createElement('span');
+        hrow.className = 'ygrid-hrow';
+        hwrap.appendChild(hrow);
+        var iframe = document.createElement('iframe');
+        iframe.className = 'ygrid-hrow-frame';
+        iframe.frameBorder = 0;
+        hwrap.appendChild(iframe);
+        this.hrow = hrow;
+        this.headerCtrl = new YAHOO.ext.grid.HeaderController(this.grid);
+        this.headers = [];
+        this.cols = [];
+        for(var i = 0; i < colCount; i++){
+            var hd = document.createElement('span');
+        	hd.className = 'ygrid-hd ygrid-header-' + i;
+        	var span = document.createElement('span');
+            span.className = 'ygrid-hd-body';
+            hd.appendChild(span);
+            var tb = document.createElement('table');
+            span.appendChild(tb);
+            tb.border = 0;
+            tb.cellPadding=0;
+            tb.cellSpacing = 0;
+            var tbody = document.createElement('tbody');
+            tb.appendChild(tbody);
+            var tr = document.createElement('tr');
+            tbody.appendChild(tr);
+            var td = document.createElement('td');
+            tr.appendChild(td);
+            var td2 = document.createElement('td');
+            tr.appendChild(td2);
+            var text = document.createElement('span');
+            text.innerHTML = colModel.getColumnHeader(i);
+            td.appendChild(text);
+            hd.textNode = text;
+            hd.sortDesc = document.createElement('span');
+    	    hd.sortDesc.className = 'sort-desc';
+    	    hd.sortAsc = document.createElement('span');
+    	    hd.sortAsc.className = 'sort-asc';
+            td2.appendChild(hd.sortDesc);
+    	    td2.appendChild(hd.sortAsc);
+    	    hrow.appendChild(hd)
+            hd.columnIndex = i;
+            this.headers.push(hd);
+            if(colModel.isSortable(i)){
+                this.headerCtrl.register(hd);
+            }
+            var split = document.createElement('span');
+        	split.className = 'ygrid-hd-split';
+        	hrow.appendChild(split);
+        	hd.split = split;
+        	
+        	YAHOO.util.Event.on(split, 'dblclick', autoSizeDelegate.createCallback(i+0, true));
+        	
+        	var sb = new YAHOO.ext.SplitBar(split, hd, null, YAHOO.ext.SplitBar.LEFT);
+        	sb.columnIndex = i;
+        	sb.minSize = grid.minColumnWidth;
+        	// anonymous function = bad? 
+        	sb.onMoved.subscribe(function(splitter, newSize){
+        		colModel.setColumnWidth(splitter.columnIndex, newSize);
+        		grid.fireEvent('columnresize', splitter.columnIndex, newSize);
+        	});
+        	YAHOO.util.Dom.addClass(sb.proxy, 'ygrid-column-sizer');
+        	YAHOO.util.Dom.setStyle(sb.proxy, 'background-color', '');
+        	sb.dd._resizeProxy = function(){
+        	    var el = this.getDragEl();
+        	    YAHOO.util.Dom.setStyle(el, 'height', (hwrap.clientHeight+wrap.clientHeight-2) +'px');
+        	};
+        }
+        if(grid.autoSizeColumns){
+            this.renderRows(dataModel);
+            this.autoSizeColumns();
+        }else{
+            this.updateColumns();
+            this.renderRows(dataModel);
+        }
+        
+        for(var i = 0; i < colCount; i++){
+            if(colModel.isHidden(i)){
+                this.hideColumn(i);
+            }
+        }
+        return this.bwrap;*/
+    },
+    
+    onColumnSplitterMoved : function(splitter, newSize){
+        this.grid.colModel.setColumnWidth(splitter.columnIndex, newSize);
+        this.grid.fireEvent('columnresize', splitter.columnIndex, newSize);
+    },
+    
+    appendFooter : function(parentEl){
+        return null;  
+    },
+    
+    updateBodyHeight : function(){
+        YAHOO.util.Dom.setStyle(this.getBodyTable(), 'height', 
+                             (this.grid.dataModel.getRowCount()*this.rowHeight)+'px');
+    }
+};
+YAHOO.ext.grid.GridView.SCROLLBARS_UNDER = 0;
+YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP = 1;
+YAHOO.ext.grid.GridView.prototype.scrollbarMode = YAHOO.ext.grid.GridView.SCROLLBARS_UNDER;
+
+/**
+ * @class
+ * Used internal by GridView to route header related events.
+ * @constructor
+ */
+YAHOO.ext.grid.HeaderController = function(grid){
+	/** @private */
+	this.grid = grid;
+	/** @private */
+	this.headers = [];
+};
+
+YAHOO.ext.grid.HeaderController.prototype = {
+	register : function(header){
+		this.headers.push(header);
+		YAHOO.ext.EventManager.on(header, 'selectstart', this.cancelTextSelection, this, true);
+        YAHOO.ext.EventManager.on(header, 'mousedown', this.cancelTextSelection, this, true);
+        YAHOO.ext.EventManager.on(header, 'mouseover', this.headerOver, this, true);
+        YAHOO.ext.EventManager.on(header, 'mouseout', this.headerOut, this, true);
+        YAHOO.ext.EventManager.on(header, 'click', this.headerClick, this, true);
+	},
+	
+	headerClick : function(e){
+	    var grid = this.grid, cm = grid.colModel, dm = grid.dataModel;
+	    grid.stopEditing();
+        var header = grid.getHeaderFromChild(e.getTarget());
+        var direction = header.sortDir || 'ASC';
+        var state = dm.getSortState();
+        if(typeof state.column != 'undefined' && 
+                 grid.getView().getColumnIndexByDataIndex(state.column) == header.columnIndex){
+            direction = (direction == 'ASC' ? 'DESC' : 'ASC');
+        }
+        header.sortDir = direction;
+        dm.sort(cm, cm.getDataIndex(header.columnIndex), direction);
+    },
+    
+    headerOver : function(e){
+        var header = this.grid.getHeaderFromChild(e.getTarget());
+        YAHOO.util.Dom.addClass(header, 'ygrid-hd-over');
+        //YAHOO.ext.util.CSS.applyFirst(header, this.grid.id, '.ygrid-hd-over');
+    },
+    
+    headerOut : function(e){
+        var header = this.grid.getHeaderFromChild(e.getTarget());
+        YAHOO.util.Dom.removeClass(header, 'ygrid-hd-over');
+        //YAHOO.ext.util.CSS.revertFirst(header, this.grid.id, '.ygrid-hd-over');
+    },
+    
+    cancelTextSelection : function(e){
+    	e.preventDefault();
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-JSONDataModel.js.html b/www/extras/yui-ext/docs/overview-summary-JSONDataModel.js.html new file mode 100644 index 000000000..f070c7271 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-JSONDataModel.js.html @@ -0,0 +1,138 @@ + + + + + Overview + + + + + +
+ +

JSONDataModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.JSONDataModelThis is an implementation of a DataModel used by the Grid.
+
+ + + + + + + +
+/**
+ * @class
+ * This is an implementation of a DataModel used by the Grid. It works 
+ * with JSON data.
+ * <br>Example schema:
+ * <pre><code>
+ * var schema = {
+ *     root: 'Results.Result',
+ *     id: 'ASIN',
+ *     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ * };
+ * </code></pre>
+ * @extends YAHOO.ext.grid.LoadableDataModel
+ * @constructor
+*/
+YAHOO.ext.grid.JSONDataModel = function(schema){
+    YAHOO.ext.grid.JSONDataModel.superclass.constructor.call(this, YAHOO.ext.grid.LoadableDataModel.JSON);
+    /**@private*/
+    this.schema = schema;
+};
+YAHOO.extendX(YAHOO.ext.grid.JSONDataModel, YAHOO.ext.grid.LoadableDataModel);
+
+/**
+ * Overrides loadData in LoadableDataModel to process JSON data
+ * @param {Object} data The JSON object to load
+ * @param {Function} callback
+ */
+YAHOO.ext.grid.JSONDataModel.prototype.loadData = function(data, callback, keepExisting){
+	var idField = this.schema.id;
+	var fields = this.schema.fields;
+	var rowData = [];
+	try{
+	    var root = eval('data.' + this.schema.root);
+		for(var i = 0; i < root.length; i++){
+			var node = root[i];
+			var colData = [];
+			colData.node = node;
+			colData.id = node[idField] || String(i);
+			for(var j = 0; j < fields.length; j++) {
+			    var val = node[fields[j]] || "";
+	            if(this.preprocessors[j]){
+	                val = this.preprocessors[j](val);
+	            }
+	            colData.push(val);
+	        }
+	        rowData.push(colData);
+		}
+		if(keepExisting !== true){
+		  this.removeAll();
+		}
+        this.addRows(rowData);
+    	if(typeof callback == 'function'){
+	    	callback(this, true);
+	    }
+    	this.fireLoadEvent();
+	}catch(e){
+		this.fireLoadException(e, null);
+		if(typeof callback == 'function'){
+	    	callback(this, false);
+	    }
+	}
+};
+
+/**
+ * Overrides getRowId in DefaultDataModel to return the ID value of the specified node. 
+ * @param {Number} rowIndex
+ * @return {Number}
+ */
+YAHOO.ext.grid.JSONDataModel.prototype.getRowId = function(rowIndex){
+    return this.data[rowIndex].id;
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-LoadableDataModel.js.html b/www/extras/yui-ext/docs/overview-summary-LoadableDataModel.js.html new file mode 100644 index 000000000..a1651ccc4 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-LoadableDataModel.js.html @@ -0,0 +1,405 @@ + + + + + Overview + + + + + +
+ +

LoadableDataModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.LoadableDataModelThis class extends DefaultDataModel and adds the core functionality to load data remotely.
+
+ + + + + + + +
/**
+ * @class
+ * This class extends DefaultDataModel and adds the core functionality to load data remotely. <br><br>
+ * @extends YAHOO.ext.grid.DefaultDataModel
+ * @constructor
+ * @param {String} dataType YAHOO.ext.grid.LoadableDataModel.XML, YAHOO.ext.grid.LoadableDataModel.TEXT or YAHOO.ext.grid.JSON
+*/
+YAHOO.ext.grid.LoadableDataModel = function(dataType){
+    YAHOO.ext.grid.LoadableDataModel.superclass.constructor.call(this, []);
+    
+    /** Fires when a successful load is completed - fireDirect sig: (this)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onLoad = new YAHOO.util.CustomEvent('load');
+    /** Fires when a load fails - fireDirect sig: (this, errorMsg, responseObj)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated Use addListener instead of accessing directly
+     */
+    this.onLoadException = new YAHOO.util.CustomEvent('loadException');
+    
+    this.events['load'] = this.onLoad;
+    this.events['beforeload'] = new YAHOO.util.CustomEvent('beforeload');
+    this.events['loadexception'] = this.onLoadException;
+    
+    /**@private*/
+    this.dataType = dataType;
+    /**@private*/
+    this.preprocessors = [];
+    /**@private*/
+    this.postprocessors = [];
+    
+    // paging info
+    /** The active page @type Number*/
+    this.loadedPage = 1;
+    /** True to use remote sorting, initPaging automatically sets this to true @type Boolean */
+    this.remoteSort = false;
+    /** The number of records per page @type Number*/
+    this.pageSize = 0;
+    /** The script/page to call to provide paged/sorted data @type String*/
+    this.pageUrl = null;
+    /** An object of key/value pairs to be passed as parameters
+     * when loading pages/sorting @type Object*/
+    this.baseParams = {};
+    /** Maps named params to url parameters - Override to specify your own param names */
+    this.paramMap = {'page':'page', 'pageSize':'pageSize', 'sortColumn':'sortColumn', 'sortDir':'sortDir'};
+    
+};
+YAHOO.extendX(YAHOO.ext.grid.LoadableDataModel, YAHOO.ext.grid.DefaultDataModel);
+
+/** @ignore */
+YAHOO.ext.grid.LoadableDataModel.prototype.setLoadedPage = function(pageNum, userCallback){
+    this.loadedPage = pageNum;
+    if(typeof userCallback == 'function'){
+        userCallback();
+    }
+};
+
+/** Returns true if this model uses paging @type Boolean */
+YAHOO.ext.grid.LoadableDataModel.prototype.isPaged = function(){
+    return this.pageSize > 0;
+};
+
+/** Returns the total number of records available, override if needed @type Number */
+YAHOO.ext.grid.LoadableDataModel.prototype.getTotalRowCount = function(){
+    return this.totalCount || this.getRowCount();
+};
+
+/** Returns the number of records per page @type Number */
+YAHOO.ext.grid.LoadableDataModel.prototype.getPageSize = function(){
+    return this.pageSize;
+};
+
+/** Returns the total number of pages available @type Number */
+YAHOO.ext.grid.LoadableDataModel.prototype.getTotalPages = function(){
+    if(this.getPageSize() == 0 || this.getTotalRowCount() == 0){
+        return 1;
+    }
+    return Math.ceil(this.getTotalRowCount()/this.getPageSize());
+};
+
+/** Initializes paging for this model. */
+YAHOO.ext.grid.LoadableDataModel.prototype.initPaging = function(url, pageSize, baseParams){
+    this.pageUrl = url;
+    this.pageSize = pageSize;
+    this.remoteSort = true;
+    if(baseParams) this.baseParams = baseParams;
+};
+
+/** @ignore */
+YAHOO.ext.grid.LoadableDataModel.prototype.createParams = function(pageNum, sortColumn, sortDir){
+    var params = {}, map = this.paramMap;
+    for(var key in this.baseParams){
+        if(typeof this.baseParams[key] != 'function'){
+            params[key] = this.baseParams[key];
+        }
+    }
+    params[map['page']] = pageNum;
+    params[map['pageSize']] = this.getPageSize();
+    params[map['sortColumn']] = (typeof sortColumn == 'undefined' ? '' : sortColumn);
+    params[map['sortDir']] = sortDir || '';
+    return params;
+};
+
+YAHOO.ext.grid.LoadableDataModel.prototype.loadPage = function(pageNum, callback, keepExisting){
+    var sort = this.getSortState();
+    var params = this.createParams(pageNum, sort.column, sort.direction);
+    this.load(this.pageUrl, params, this.setLoadedPage.createDelegate(this, [pageNum, callback]), 
+               keepExisting ? (pageNum-1) * this.pageSize : null);
+};
+
+/** @ignore */
+YAHOO.ext.grid.LoadableDataModel.prototype.applySort = function(suppressEvent){
+	if(!this.remoteSort){
+        YAHOO.ext.grid.LoadableDataModel.superclass.applySort.apply(this, arguments);
+    }else if(!suppressEvent){
+        var sort = this.getSortState();
+        if(sort.column){
+           this.fireRowsSorted(sort.column, sort.direction, true);
+        }
+    }
+};
+
+/** @ignore */
+YAHOO.ext.grid.LoadableDataModel.prototype.resetPaging = function(){
+	this.loadedPage = 1;
+};
+
+/** Overridden sort method to use remote sorting if turned on */
+YAHOO.ext.grid.LoadableDataModel.prototype.sort = function(columnModel, columnIndex, direction, suppressEvent){
+    if(!this.remoteSort){
+        YAHOO.ext.grid.LoadableDataModel.superclass.sort.apply(this, arguments);
+    }else{
+        this.columnModel = columnModel;
+        this.sortColumn = columnIndex;
+        this.sortDir = direction;
+        var params = this.createParams(this.loadedPage, columnIndex, direction);
+        this.load(this.pageUrl, params, this.fireRowsSorted.createDelegate(this, [columnIndex, direction, true]));
+    }
+}
+/**
+ * Initiates the loading of the data from the specified URL - Failed load attempts will 
+ * fire the {@link #onLoadException} event.
+ * @param {Object/String} url The url from which the data can be loaded
+ * @param {<i>String/Object</i>} params (optional) The parameters to pass as either a url encoded string "param1=1&amp;param2=2" or as an object {param1: 1, param2: 2}
+ * @param {<i>Function</i>} callback (optional) Callback when load is complete - called with signature (this, rowCountLoaded)
+ * @param {<i>Number</i>} insertIndex (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.load = function(url, params, callback, insertIndex){
+	this.fireEvent('beforeload');
+	if(params && typeof params != 'string'){ // must be object
+        var buf = [];
+        for(var key in params){
+            if(typeof params[key] != 'function'){
+                buf.push(encodeURIComponent(key), '=', encodeURIComponent(params[key]), '&');
+            }
+        }
+        delete buf[buf.length-1];
+        params = buf.join('');
+    }
+    var cb = {
+        success: this.processResponse,
+        failure: this.processException,
+        scope: this,
+		argument: {callback: callback, insertIndex: insertIndex}
+    };
+    var method = params ? 'POST' : 'GET';
+    YAHOO.util.Connect.asyncRequest(method, url, cb, params);
+};
+
+/**@private*/
+YAHOO.ext.grid.LoadableDataModel.prototype.processResponse = function(response){
+    var cb = response.argument.callback;
+    var keepExisting = (typeof response.argument.insertIndex == 'number');
+    var insertIndex = response.argument.insertIndex;
+    switch(this.dataType){
+    	case YAHOO.ext.grid.LoadableDataModel.XML:
+    		this.loadData(response.responseXML, cb, keepExisting, insertIndex);
+    	break;
+    	case YAHOO.ext.grid.LoadableDataModel.JSON:
+    		var rtext = response.responseText;
+    		try { // this code is a modified version of Yahoo! UI DataSource JSON parsing
+		        // Trim leading spaces
+		        while(rtext.substring(0,1) == " ") {
+		            rtext = rtext.substring(1, rtext.length);
+		        }
+		        // Invalid JSON response
+		        if(rtext.indexOf("{") < 0) {
+		            throw "Invalid JSON response";
+		        }
+		
+		        // Empty (but not invalid) JSON response
+		        if(rtext.indexOf("{}") === 0) {
+		            this.loadData({}, response.argument.callback);
+		            return;
+		        }
+		
+		        // Turn the string into an object literal...
+		        // ...eval is necessary here
+		        var jsonObjRaw = eval("(" + rtext + ")");
+		        if(!jsonObjRaw) {
+		            throw "Error evaling JSON response";
+		        }
+				this.loadData(jsonObjRaw, cb, keepExisting, insertIndex);
+		    } catch(e) {
+		        this.fireLoadException(e, response);
+				if(typeof callback == 'function'){
+			    	callback(this, false);
+			    }
+		   	}
+    	break;
+    	case YAHOO.ext.grid.LoadableDataModel.TEXT:
+    		this.loadData(response.responseText, cb, keepExisting, insertIndex);
+    	break;
+    };
+};
+
+/**@private*/
+YAHOO.ext.grid.LoadableDataModel.prototype.processException = function(response){
+    this.fireLoadException(null, response);
+    if(typeof response.argument.callback == 'function'){
+        response.argument.callback(this, false);
+    }
+};
+
+YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadException = function(e, responseObj){
+    this.onLoadException.fireDirect(this, e, responseObj);
+};
+
+YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadEvent = function(){
+    this.fireEvent('load', this.loadedPage, this.getTotalPages());
+};
+
+/**
+ * Adds a preprocessor function to parse data before it is added to the Model - ie. Date.parse to parse dates.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.addPreprocessor = function(columnIndex, fn){
+    this.preprocessors[columnIndex] = fn;
+};
+
+/**
+ * Gets the preprocessor function for the specified column.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.getPreprocessor = function(columnIndex){
+    return this.preprocessors[columnIndex];
+};
+
+/**
+ * Removes a preprocessor function.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.removePreprocessor = function(columnIndex){
+    this.preprocessors[columnIndex] = null;
+};
+
+/**
+ * Adds a postprocessor function to format data before updating the underlying data source (ie. convert date to string before updating XML document).
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.addPostprocessor = function(columnIndex, fn){
+    this.postprocessors[columnIndex] = fn;
+};
+
+/**
+ * Gets the postprocessor function for the specified column.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.getPostprocessor = function(columnIndex){
+    return this.postprocessors[columnIndex];
+};
+
+/**
+ * Removes a postprocessor function.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.removePostprocessor = function(columnIndex){
+    this.postprocessors[columnIndex] = null;
+};
+/**
+ * Empty interface method - Called to process the data returned by the XHR - Classes which extend LoadableDataModel should implement this method.
+ * See {@link YAHOO.ext.XMLDataModel} for an example implementation.
+ */
+YAHOO.ext.grid.LoadableDataModel.prototype.loadData = function(data, callback, keepExisting, insertIndex){
+	
+};
+
+YAHOO.ext.grid.LoadableDataModel.XML = 'xml';
+YAHOO.ext.grid.LoadableDataModel.JSON = 'json';
+YAHOO.ext.grid.LoadableDataModel.TEXT = 'text';
+
+/*
+YAHOO.ext.grid.SparceDataset = function(bufferSize){
+    this.stack = [];
+    this.bufferSize = bufferSize || 1000;
+    this.maxIndex = 0;
+    
+    this.events = {
+        'rowsexpired' : new YAHOO.util.CustomEvent('rowsexpired')
+    };
+};
+
+YAHOO.ext.grid.SparceDataset.prototype = {
+    addListener : YAHOO.ext.grid.Grid.prototype.addListener,
+    removeListener : YAHOO.ext.grid.Grid.prototype.removeListener,
+    fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent,
+    
+    getRowAt : function(index){
+        return this[String(index)];
+    },
+    
+    splice : function(index, deleteCount){
+        this.insertRowsAt(index, Array.prototype.slice.call(arguments, 2));
+    },
+    
+    concat : function(){
+        this.insertRowsAt(index, Array.prototype.slice.call(arguments, 2));
+    },
+    
+    insertRowsAt: function(index, rowData){
+        for(var i = 0; i < rowData.length; i++) {
+        	var d = rowData[i];
+        	var dataIndex = index + i;
+        	this[dataIndex] = d;
+        	this.stack.push(dataIndex);
+        }
+        this.maxIndex = Math.max(this.maxIndex, index+rowData.length);
+        this.cleanup();
+    },
+    
+    cleanup : function(){
+        while(stack.length > this.bufferSize){
+            var dataIndex = stack.shift();
+            delete this[dataIndex];
+            this.fireEvent('rowsexpired', dataIndex);
+        }
+    }
+};*/
+
+
+
+
+
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-NumberEditor.js.html b/www/extras/yui-ext/docs/overview-summary-NumberEditor.js.html new file mode 100644 index 000000000..b0d40e077 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-NumberEditor.js.html @@ -0,0 +1,203 @@ + + + + + Overview + + + + + +
+ +

NumberEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.NumberEditor 
+
+ + + + + + + +
YAHOO.ext.grid.NumberEditor = function(config){
+    var element = document.createElement('input');
+    element.type = 'text';
+    element.className = 'ygrid-editor ygrid-num-editor';
+    element.setAttribute('autocomplete', 'off');
+    document.body.appendChild(element);
+    YAHOO.ext.grid.NumberEditor.superclass.constructor.call(this, element);
+    YAHOO.ext.util.Config.apply(this, config);
+};
+YAHOO.extendX(YAHOO.ext.grid.NumberEditor, YAHOO.ext.grid.CellEditor);
+
+YAHOO.ext.grid.NumberEditor.prototype.initEvents = function(){
+    var stopOnEnter = function(e){
+        if(e.browserEvent.keyCode == e.RETURN){
+            this.stopEditing(true);
+        }
+    };
+    
+    var allowed = "0123456789";
+    if(this.allowDecimals){
+        allowed += this.decimalSeparator;
+    }
+    if(this.allowNegative){
+        allowed += '-';
+    }
+    var keyPress = function(e){
+        var c = e.getCharCode();
+        if(c != e.BACKSPACE && allowed.indexOf(String.fromCharCode(c)) === -1){
+            e.stopEvent();
+        }
+    };
+    this.element.mon('keydown', stopOnEnter, this, true);
+    var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this);
+    this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay]));
+    this.element.mon('keypress', keyPress, this, true);
+    this.element.on('blur', this.stopEditing, this, true);
+};
+
+YAHOO.ext.grid.NumberEditor.prototype.validate = function(){
+    var dom = this.element.dom;
+    var value = dom.value;
+    if(value.length < 1){ // if it's blank
+         if(this.allowBlank){
+             dom.title = '';
+             this.element.removeClass('ygrid-editor-invalid');
+             return true;
+         }else{
+             dom.title = this.blankText;
+             this.element.addClass('ygrid-editor-invalid');
+             return false;
+         }
+    }
+    if(value.search(/\d+/) === -1){
+        dom.title = this.nanText.replace('%0', value);
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    var num = this.parseValue(value);
+    if(num < this.minValue){
+        dom.title = this.minText.replace('%0', this.minValue);
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    if(num > this.maxValue){
+        dom.title = this.maxText.replace('%0', this.maxValue);
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    var msg = this.validator(value);
+    if(msg !== true){
+        dom.title = msg;
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    dom.title = '';
+    this.element.removeClass('ygrid-editor-invalid');
+    return true;
+};
+
+YAHOO.ext.grid.NumberEditor.prototype.show = function(){
+    this.element.dom.title = '';
+    YAHOO.ext.grid.NumberEditor.superclass.show.call(this);
+    if(this.selectOnFocus){
+        try{
+            this.element.dom.select();
+        }catch(e){}
+    }
+    this.validate(this.element.dom.value);
+};
+
+YAHOO.ext.grid.NumberEditor.prototype.getValue = function(){
+   if(!this.validate()){
+       return this.originalValue;
+   }else{
+       var value = this.element.dom.value;
+       if(value.length < 1){
+           return value;
+       } else{
+           return this.fixPrecision(this.parseValue(value));
+       }
+   }   
+};
+YAHOO.ext.grid.NumberEditor.prototype.parseValue = function(value){
+    return parseFloat(new String(value).replace(this.decimalSeparator, '.'));
+};
+
+YAHOO.ext.grid.NumberEditor.prototype.fixPrecision = function(value){
+   if(!this.allowDecimals || this.decimalPrecision == -1 || isNaN(value) || value == 0 || !value){
+       return value;
+   }
+   // this should work but doesn't due to precision error in JS
+   // var scale = Math.pow(10, this.decimalPrecision);
+   // var fixed = this.decimalPrecisionFcn(value * scale);
+   // return fixed / scale;
+   //
+   // so here's our workaround:
+   var scale = Math.pow(10, this.decimalPrecision+1);
+   var fixed = this.decimalPrecisionFcn(value * scale);
+   fixed = this.decimalPrecisionFcn(fixed/10);
+   return fixed / (scale/10);
+};
+
+YAHOO.ext.grid.NumberEditor.prototype.allowBlank = true;
+YAHOO.ext.grid.NumberEditor.prototype.allowDecimals = true;
+YAHOO.ext.grid.NumberEditor.prototype.decimalSeparator = '.';
+YAHOO.ext.grid.NumberEditor.prototype.decimalPrecision = 2;
+YAHOO.ext.grid.NumberEditor.prototype.decimalPrecisionFcn = Math.floor;
+YAHOO.ext.grid.NumberEditor.prototype.allowNegative = true;
+YAHOO.ext.grid.NumberEditor.prototype.selectOnFocus = true;
+YAHOO.ext.grid.NumberEditor.prototype.minValue = Number.NEGATIVE_INFINITY;
+YAHOO.ext.grid.NumberEditor.prototype.maxValue = Number.MAX_VALUE;
+YAHOO.ext.grid.NumberEditor.prototype.minText = 'The minimum value for this field is %0';
+YAHOO.ext.grid.NumberEditor.prototype.maxText = 'The maximum value for this field is %0';
+YAHOO.ext.grid.NumberEditor.prototype.blankText = 'This field cannot be blank';
+YAHOO.ext.grid.NumberEditor.prototype.nanText = '%0 is not a valid number';
+YAHOO.ext.grid.NumberEditor.prototype.validationDelay = 100;
+YAHOO.ext.grid.NumberEditor.prototype.validator = function(){return true;};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-PagedGridView.js.html b/www/extras/yui-ext/docs/overview-summary-PagedGridView.js.html new file mode 100644 index 000000000..cb15c5da9 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-PagedGridView.js.html @@ -0,0 +1,207 @@ + + + + + Overview + + + + + +
+ +

PagedGridView.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.PagedGridView 
+
+ + + + + + + +
+YAHOO.ext.grid.PagedGridView = function(){
+    YAHOO.ext.grid.PagedGridView.superclass.constructor.call(this);
+    this.cursor = 1;
+};
+YAHOO.extendX(YAHOO.ext.grid.PagedGridView, YAHOO.ext.grid.GridView);
+
+YAHOO.ext.grid.PagedGridView.prototype.appendFooter = function(parentEl){
+    var fwrap = document.createElement('div');
+    fwrap.className = 'ygrid-wrap-footer';
+    var fbody = document.createElement('span');
+    fbody.className = 'ygrid-footer';
+    fwrap.appendChild(fbody);
+    parentEl.appendChild(fwrap);
+    this.createPagingToolbar(fbody);
+    return fwrap;
+};
+YAHOO.ext.grid.PagedGridView.prototype.createPagingToolbar = function(container){
+    var tb = new YAHOO.ext.Toolbar(container);
+    this.pageToolbar = tb;
+    this.first = tb.addButton({
+        tooltip: this.firstText, 
+        className: 'ygrid-page-first',
+        disabled: true,
+        click: this.onClick.createDelegate(this, ['first'])
+    });
+    this.prev = tb.addButton({
+        tooltip: this.prevText, 
+        className: 'ygrid-page-prev', 
+        disabled: true,
+        click: this.onClick.createDelegate(this, ['prev'])
+    });
+    tb.addSeparator();
+    tb.add(this.beforePageText);
+    var pageBox = document.createElement('input');
+    pageBox.type = 'text';
+    pageBox.size = 3;
+    pageBox.value = '1';
+    pageBox.className = 'ygrid-page-number';
+    tb.add(pageBox);
+    this.field = getEl(pageBox, true);
+    this.field.mon('keydown', this.onEnter, this, true);
+    this.field.on('focus', function(){pageBox.select();});
+    this.afterTextEl = tb.addText(this.afterPageText.replace('%0', '1'));
+    this.field.setHeight(18);
+    tb.addSeparator();
+    this.next = tb.addButton({
+        tooltip: this.nextText, 
+        className: 'ygrid-page-next', 
+        disabled: true,
+        click: this.onClick.createDelegate(this, ['next'])
+    });
+    this.last = tb.addButton({
+        tooltip: this.lastText, 
+        className: 'ygrid-page-last', 
+        disabled: true,
+        click: this.onClick.createDelegate(this, ['last'])
+    });
+    tb.addSeparator();
+    this.loading = tb.addButton({
+        tooltip: this.refreshText, 
+        className: 'ygrid-loading',
+        disabled: true,
+        click: this.onClick.createDelegate(this, ['refresh'])
+    });
+    this.onPageLoaded(1, this.grid.dataModel.getTotalPages());
+};
+YAHOO.ext.grid.PagedGridView.prototype.getPageToolbar = function(){
+    return this.pageToolbar;  
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.onPageLoaded = function(pageNum, totalPages){
+    this.cursor = pageNum;
+    this.lastPage = totalPages;
+    this.afterTextEl.innerHTML = this.afterPageText.replace('%0', totalPages);
+    this.field.dom.value = pageNum;
+    this.first.setDisabled(pageNum == 1);
+    this.prev.setDisabled(pageNum == 1);
+    this.next.setDisabled(pageNum == totalPages);
+    this.last.setDisabled(pageNum == totalPages);
+    this.loading.enable();
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.onEnter = function(e){
+    if(e.browserEvent.keyCode == e.RETURN){
+        var v = this.field.dom.value;
+        if(!v){
+            this.field.dom.value = this.cursor;
+            return;
+        }
+        var pageNum = parseInt(v, 10);
+        if(isNaN(v)){
+            this.field.dom.value = this.cursor;
+            return;
+        }
+        pageNum = Math.min(Math.max(1, pageNum), this.lastPage);
+        this.grid.dataModel.loadPage(pageNum);
+        e.stopEvent();
+    }
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.beforeLoad = function(){
+    if(this.loading){
+        this.loading.disable();
+    }  
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.onClick = function(which){
+    switch(which){
+        case 'first':
+            this.grid.dataModel.loadPage(1);
+        break;
+        case 'prev':
+            this.grid.dataModel.loadPage(this.cursor -1);
+        break;
+        case 'next':
+            this.grid.dataModel.loadPage(this.cursor + 1);
+        break;
+        case 'last':
+            this.grid.dataModel.loadPage(this.lastPage);
+        break;
+        case 'refresh':
+            this.grid.dataModel.loadPage(this.cursor);
+        break;
+    }
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.render = function(){
+    this.grid.dataModel.addListener('beforeload', this.beforeLoad, this, true);
+    this.grid.dataModel.addListener('load', this.onPageLoaded, this, true);
+    return YAHOO.ext.grid.PagedGridView.superclass.render.call(this);
+};
+
+YAHOO.ext.grid.PagedGridView.prototype.beforePageText = "Page";
+YAHOO.ext.grid.PagedGridView.prototype.afterPageText = "of %0";
+YAHOO.ext.grid.PagedGridView.prototype.firstText = "First Page";
+YAHOO.ext.grid.PagedGridView.prototype.prevText = "Previous Page";
+YAHOO.ext.grid.PagedGridView.prototype.nextText = "Next Page";
+YAHOO.ext.grid.PagedGridView.prototype.lastText = "Last Page";
+YAHOO.ext.grid.PagedGridView.prototype.refreshText = "Refresh";
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Resizable.js.html b/www/extras/yui-ext/docs/overview-summary-Resizable.js.html new file mode 100644 index 000000000..6d40f932f --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Resizable.js.html @@ -0,0 +1,280 @@ + + + + + Overview + + + + + +
+ +

Resizable.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.ResizableMakes an element resizable.
+
+ + + + + + + +
/**
+ * @class 
+ * Makes an element resizable.
+ */
+YAHOO.ext.Resizable = function(el, config){
+    // in case global fcn not defined
+    var getEl = YAHOO.ext.Element.get;
+    
+    this.el = getEl(el, true);
+    this.el.autoBoxAdjust = true;
+    // if the element isn't positioned, make it relative
+    if(this.el.getStyle('position') != 'absolute'){
+        this.el.setStyle('position', 'relative');
+    }
+    
+    // create the handles and proxy
+    var dh = YAHOO.ext.DomHelper;
+    var tpl = dh.createTemplate({tag: 'div', cls: 'yresizable-handle yresizable-handle-{0}', html: '&nbsp;'});
+    this.east = getEl(tpl.append(this.el.dom, ['east']), true);
+    this.south = getEl(tpl.append(this.el.dom, ['south']), true);
+    if(config && config.multiDirectional){
+        this.west = getEl(tpl.append(this.el.dom, ['west']), true);
+        this.north = getEl(tpl.append(this.el.dom, ['north']), true);
+    }
+    this.corner = getEl(tpl.append(this.el.dom, ['southeast']), true);
+    this.proxy = getEl(dh.insertBefore(document.body.firstChild, {tag: 'div', cls: 'yresizable-proxy', id: this.el.id + '-rzproxy'}), true);
+    this.proxy.autoBoxAdjust = true;
+    
+    // wrapped event handlers to add and remove when sizing
+    this.moveHandler = YAHOO.ext.EventManager.wrap(this.onMouseMove, this, true);
+    this.upHandler = YAHOO.ext.EventManager.wrap(this.onMouseUp, this, true);
+    this.selHandler = YAHOO.ext.EventManager.wrap(this.cancelSelection, this, true);
+    
+    // public events
+    this.events = {
+        'beforeresize' : new YAHOO.util.CustomEvent(),
+        'resize' : new YAHOO.util.CustomEvent()
+    };
+    
+    /** @private */
+    this.dir = null;
+    
+    // properties
+    this.resizeChild = false;
+    this.adjustments = [0, 0];
+    this.minWidth = 5;
+    this.minHeight = 5;
+    this.maxWidth = 10000;
+    this.maxHeight = 10000;
+    this.enabled = true;
+    this.animate = false;
+    this.duration = .35;
+    this.dynamic = false;
+    this.multiDirectional = false;
+    this.disableTrackOver = false;
+    this.easing = YAHOO.util.Easing ? YAHOO.util.Easing.easeOutStrong : null;
+    
+    YAHOO.ext.util.Config.apply(this, config);
+    
+    // listen for mouse down on the handles
+    var mdown = this.onMouseDown.createDelegate(this);
+    this.east.mon('mousedown', mdown);
+    this.south.mon('mousedown', mdown);
+    if(this.multiDirectional){
+        this.west.mon('mousedown', mdown);
+        this.north.mon('mousedown', mdown);
+    }
+    this.corner.mon('mousedown', mdown);
+    
+    if(!this.disableTrackOver){
+        // track mouse overs
+        var mover = this.onMouseOver.createDelegate(this);
+        // track mouse outs
+        var mout = this.onMouseOut.createDelegate(this);
+        
+        this.east.mon('mouseover', mover);
+        this.east.mon('mouseout', mout);
+        this.south.mon('mouseover', mover);
+        this.south.mon('mouseout', mout);
+        if(this.multiDirectional){
+            this.west.mon('mouseover', mover);
+            this.west.mon('mouseout', mout);
+            this.north.mon('mouseover', mover);
+            this.north.mon('mouseout', mout);
+        }
+        this.corner.mon('mouseover', mover);
+        this.corner.mon('mouseout', mout);
+    }
+    this.updateChildSize();
+};
+
+YAHOO.extendX(YAHOO.ext.Resizable, YAHOO.ext.util.Observable, {
+    resizeTo : function(width, height){
+        this.el.setSize(width, height);
+        this.fireEvent('resize', this, width, height, null);
+    },
+    
+    cancelSelection : function(e){
+        e.preventDefault();
+    },
+    
+    startSizing : function(e){
+        this.fireEvent('beforeresize', this, e);
+        if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler
+            e.preventDefault();
+            this.startBox = this.el.getBox();
+            this.startPoint = e.getXY();
+            this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0],
+                            (this.startBox.y + this.startBox.height) - this.startPoint[1]];
+            this.proxy.setBox(this.startBox);
+            if(!this.dynamic){
+                this.proxy.show();
+            }
+            YAHOO.util.Event.on(document.body, 'selectstart', this.selHandler);
+            YAHOO.util.Event.on(document.body, 'mousemove', this.moveHandler);
+            YAHOO.util.Event.on(document.body, 'mouseup', this.upHandler);
+        }
+    },
+    
+    onMouseDown : function(e){
+        if(this.enabled){
+            var t = e.getTarget();
+            if(t == this.corner.dom){
+                this.dir = 'both';
+                this.proxy.setStyle('cursor', this.corner.getStyle('cursor'));
+                this.startSizing(e);
+            }else if(t == this.east.dom){
+                this.dir = 'east';
+                this.proxy.setStyle('cursor', this.east.getStyle('cursor'));
+                this.startSizing(e);
+            }else if(t == this.south.dom){
+                this.dir = 'south';
+                this.proxy.setStyle('cursor', this.south.getStyle('cursor'));
+                this.startSizing(e);
+            }else if(t == this.west.dom){
+                this.dir = 'west';
+                this.proxy.setStyle('cursor', this.west.getStyle('cursor'));
+                this.startSizing(e);
+            }else if(t == this.north.dom){
+                this.dir = 'north';
+                this.proxy.setStyle('cursor', this.north.getStyle('cursor'));
+                this.startSizing(e);
+            }
+        }          
+    },
+    
+    onMouseUp : function(e){
+        YAHOO.util.Event.removeListener(document.body, 'selectstart', this.selHandler);
+        YAHOO.util.Event.removeListener(document.body, 'mousemove', this.moveHandler);
+        YAHOO.util.Event.removeListener(document.body, 'mouseup', this.upHandler);
+        var size = this.resizeElement();
+        this.fireEvent('resize', this, size.width, size.height, e);
+    },
+    
+    updateChildSize : function(){
+        if(this.resizeChild && this.el.dom.firstChild && this.el.dom.offsetWidth){
+            var el = this.el;
+            var adj = this.adjustments;
+            setTimeout(function(){
+                var c = YAHOO.ext.Element.get(el.dom.firstChild, true);
+                var b = el.getBox(true);
+                c.setSize(b.width+adj[0], b.height+adj[1]);
+            }, 1);
+        }
+    },
+    
+    resizeElement : function(){
+        var box = this.proxy.getBox();
+        this.el.setBox(box, false, this.animate, this.duration, null, this.easing);
+        this.updateChildSize();
+        this.proxy.hide();
+        return box;
+    },
+    
+    onMouseMove : function(e){
+        if(this.enabled){
+            var xy = e.getXY();
+            if(this.dir == 'both' || this.dir == 'east' || this.dir == 'south'){
+                var w = Math.min(Math.max(this.minWidth, xy[0]-this.startBox.x+this.offsets[0]),this.maxWidth);
+                var h = Math.min(Math.max(this.minHeight, xy[1]-this.startBox.y+this.offsets[1]), this.maxHeight);
+                if(this.dir == 'both'){
+                    this.proxy.setSize(w, h);
+                }else if(this.dir == 'east'){
+                    this.proxy.setWidth(w);
+                }else if(this.dir == 'south'){
+                    this.proxy.setHeight(h);
+                }
+            }else{
+                var x = this.startBox.x + (xy[0]-this.startPoint[0]);
+                var y = this.startBox.y + (xy[1]-this.startPoint[1]);
+                var w = this.startBox.width+(this.startBox.x-x);
+                var h = this.startBox.height+(this.startBox.y-y);
+                if(this.dir == 'west' && w <= this.maxWidth && w >= this.minWidth){
+                    this.proxy.setX(x);
+                    this.proxy.setWidth(w);
+                }else if(this.dir == 'north' && h <= this.maxHeight && h >= this.minHeight){
+                    this.proxy.setY(y);
+                    this.proxy.setHeight(h);
+                }
+            }
+            if(this.dynamic){
+                this.resizeElement();
+            }
+        }
+    },
+    
+    onMouseOver : function(){
+        if(this.enabled) this.el.addClass('yresizable-over');
+    },
+    
+    onMouseOut : function(){
+        this.el.removeClass('yresizable-over');
+    }
+});
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-SelectEditor.js.html b/www/extras/yui-ext/docs/overview-summary-SelectEditor.js.html new file mode 100644 index 000000000..45d66626c --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-SelectEditor.js.html @@ -0,0 +1,78 @@ + + + + + Overview + + + + + +
+ +

SelectEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.SelectEditor 
+
+ + + + + + + +
YAHOO.ext.grid.SelectEditor = function(element){
+    element.hideFocus = true;
+    YAHOO.ext.grid.SelectEditor.superclass.constructor.call(this, element);
+};
+YAHOO.extendX(YAHOO.ext.grid.SelectEditor, YAHOO.ext.grid.CellEditor);
+
+YAHOO.ext.grid.SelectEditor.prototype.fitToCell = function(box){
+    if(YAHOO.ext.util.Browser.isGecko){
+        box.height -= 3;
+    }
+    this.element.setBox(box, true);
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-SelectionModel.js.html b/www/extras/yui-ext/docs/overview-summary-SelectionModel.js.html new file mode 100644 index 000000000..9cc728596 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-SelectionModel.js.html @@ -0,0 +1,499 @@ + + + + + Overview + + + + + +
+ +

SelectionModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.DefaultSelectionModelThe default SelectionModel used by YAHOO.ext.grid.Grid.
YAHOO.ext.grid.DisableSelectionModelExtends YAHOO.ext.grid.DefaultSelectionModel to disable row selection.
YAHOO.ext.grid.SingleSelectionModelExtends YAHOO.ext.grid.DefaultSelectionModel to allow only one row to be selected at a time.
+
+ + + + + + + +
/**
+ @class The default SelectionModel used by {@link YAHOO.ext.grid.Grid}. 
+ It supports multiple selections and keyboard selection/navigation. <br><br>
+ @constructor
+ */
+YAHOO.ext.grid.DefaultSelectionModel = function(){
+    /** @private */
+    this.selectedRows = [];
+    /** @private */
+    this.selectedRowIds = [];
+    /** @private */
+    this.lastSelectedRow = null;
+    
+    /** Fires when a row is selected or deselected - fireDirect sig: (this, row, isSelected)
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated
+     */
+    this.onRowSelect = new YAHOO.util.CustomEvent('SelectionTable.rowSelected');
+    /** Fires when the selection changes on the Grid - fireDirect sig: (this, selectedRows[], selectedRowIds[])
+     * @type YAHOO.util.CustomEvent 
+     * @deprecated
+     */
+    this.onSelectionChange = new YAHOO.util.CustomEvent('SelectionTable.selectionChanged');
+    
+    this.events = {
+        'selectionchange' : this.onSelectionChange,
+        'rowselect' : this.onRowSelect
+    };
+    
+    this.locked = false;
+};
+
+YAHOO.ext.grid.DefaultSelectionModel.prototype = {
+    /** @ignore Called by the grid automatically. Do not call directly. */
+    init : function(grid){
+        this.grid = grid;
+        this.initEvents();
+    },
+    
+    lock : function(){
+        this.locked = true;
+    },
+    
+    unlock : function(){
+        this.locked = false;  
+    },
+    
+    isLocked : function(){
+        return this.locked;    
+    },
+    
+    /** @ignore */
+    initEvents : function(){
+        if(this.grid.trackMouseOver){
+        	this.grid.addListener("mouseover", this.handleOver, this, true);
+        	this.grid.addListener("mouseout", this.handleOut, this, true);
+        }
+        this.grid.addListener("rowclick", this.rowClick, this, true);
+        this.grid.addListener("keydown", this.keyDown, this, true);
+    },
+    
+    addListener : YAHOO.ext.grid.Grid.prototype.addListener,
+    removeListener : YAHOO.ext.grid.Grid.prototype.removeListener,
+    fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent,
+    
+    /** @ignore Syncs selectedRows with the correct row by looking it up by id. 
+      Used after a sort moves data around. */
+    syncSelectionsToIds : function(){
+        if(this.getCount() > 0){
+            var ids = this.selectedRowIds.concat();
+            this.clearSelections();
+            this.selectRowsById(ids, true);
+        }
+    },
+    
+    /**
+     * Set the selected rows by their ID(s). IDs must match what is returned by the DataModel getRowId(index).
+     * @param {String/Array} id The id(s) to select 
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections 
+     */
+    selectRowsById : function(id, keepExisting){
+        var rows = this.grid.getRowsById(id);
+        this.selectRows(rows, keepExisting);
+    },
+    
+    /**
+     * Gets the number of selected rows.
+     * @return {Number}
+     */
+    getCount : function(){
+        return this.selectedRows.length;
+    },
+    
+    /**
+     * Selects the first row in the grid.
+     */
+    selectFirstRow : function(){
+        for(var j = 0; j < this.grid.rows.length; j++){
+            if(this.isSelectable(this.grid.rows[j])){
+            	this.focusRow(this.grid.rows[j]);
+                this.setRowState(this.grid.rows[j], true);
+                return;
+            }
+        }
+    },
+    
+    /**
+     * Selects the row immediately following the last selected row.
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections
+     */
+    selectNext : function(keepExisting){
+        if(this.lastSelectedRow){
+            for(var j = (this.lastSelectedRow.rowIndex+1); j < this.grid.rows.length; j++){
+                var row = this.grid.rows[j];
+                if(this.isSelectable(row)){
+                    this.focusRow(row);
+                    this.setRowState(row, true, keepExisting);
+                    return;
+                }
+            }
+        }
+    },
+    
+    /**
+     * Selects the row that precedes the last selected row.
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections 
+     */
+    selectPrevious : function(keepExisting){
+        if(this.lastSelectedRow){
+            for(var j = (this.lastSelectedRow.rowIndex-1); j >= 0; j--){
+                var row = this.grid.rows[j];
+                if(this.isSelectable(row)){
+                    this.focusRow(row);
+                    this.setRowState(row, true, keepExisting);
+                    return;
+                }
+            }
+        }
+    },
+    
+    /**
+     * Returns the selected rows.
+     * @return {Array} Array of DOM row elements
+     */
+    getSelectedRows : function(){
+        return this.selectedRows;
+    },
+    
+    /**
+     * Returns the selected row ids.
+     * @return {Array} Array of String ids
+     */
+    getSelectedRowIds : function(){
+        return this.selectedRowIds;
+    },
+    
+    /**
+     * Clears all selections.
+     */
+    clearSelections : function(){
+        if(this.isLocked()) return;
+        var oldSelections = this.selectedRows.concat();
+        for(var j = 0; j < oldSelections.length; j++){
+            this.setRowState(oldSelections[j], false);
+        }
+        this.selectedRows = [];
+        this.selectedRowIds = [];
+    },
+    
+        
+    /**
+     * Selects all rows.
+     */
+    selectAll : function(){
+        if(this.isLocked()) return;
+        for(var j = 0; j < this.grid.rows.length; j++){
+            this.setRowState(this.grid.rows[j], true, true);
+        }
+    },
+    
+    /**
+     * Returns True if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selectedRows.length > 0;
+    },
+    
+    /**
+     * Returns True if the specified row is selected.
+     * @param {HTMLElement} row The row to check
+     * @return {Boolean}
+     */
+    isSelected : function(row){
+        return row && (row.selected === true || row.getAttribute('selected') == 'true');
+    },
+    
+    /**
+     * Returns True if the specified row is selectable.
+     * @param {HTMLElement} row The row to check
+     * @return {Boolean}
+     */
+    isSelectable : function(row){
+        return row && row.getAttribute('selectable') != 'false';
+    },
+    
+    /** @ignore */
+    rowClick : function(grid, rowIndex, e){
+        if(this.isLocked()) return;
+        var row = grid.getRow(rowIndex);
+        if(this.isSelectable(row)){
+            if(e.shiftKey && this.lastSelectedRow){
+                var lastIndex = this.lastSelectedRow.rowIndex;
+                this.selectRange(this.lastSelectedRow, row, e.ctrlKey);
+                this.lastSelectedRow = this.grid.el.dom.rows[lastIndex];
+            }else{
+                this.focusRow(row);
+                var rowState = e.ctrlKey ? !this.isSelected(row) : true;
+                this.setRowState(row, rowState, e.hasModifier());
+            }
+        }
+    },
+    
+    /**
+     * Deprecated. Tries to focus the row and scroll it into view - Use grid.scrollTo or grid.getView().focusRow() instead.
+     * @deprecated
+     * @param {HTMLElement} row The row to focus
+     */
+    focusRow : function(row){
+    	this.grid.view.focusRow(row);
+    },
+
+    /**
+     * Selects a row.
+     * @param {Number/HTMLElement} row The row or index of the row to select
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections 
+     */
+    selectRow : function(row, keepExisting){
+        this.setRowState(this.getRow(row), true, keepExisting);
+    },
+    
+    /**
+     * Selects multiple rows.
+     * @param {Array} rows Array of the rows or indexes of the row to select
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections 
+     */
+    selectRows : function(rows, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        for(var i = 0; i < rows.length; i++){
+            this.selectRow(rows[i], true);
+        }
+    },
+    
+    /**
+     * Deselects a row.
+     * @param {Number/HTMLElement} row The row or index of the row to deselect
+     */
+    deselectRow : function(row){
+        this.setRowState(this.getRow(row), false);
+    },
+    
+    /** @ignore */
+    getRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.rows[row];
+        }
+        return row;
+    },
+    
+    /**
+     * Selects a range of rows. All rows in between startRow and endRow are also selected.
+     * @param {Number/HTMLElement} startRow The row or index of the first row in the range
+     * @param {Number/HTMLElement} endRow The row or index of the last row in the range
+     * @param {<i>Boolean</i>} keepExisting (optional) True to retain existing selections 
+     */
+    selectRange : function(startRow, endRow, keepExisting){
+        startRow = this.getRow(startRow);
+        endRow = this.getRow(endRow);
+        this.setRangeState(startRow, endRow, true, keepExisting);
+    },
+    
+    /**
+     * Deselects a range of rows. All rows in between startRow and endRow are also deselected.
+     * @param {Number/HTMLElement} startRow The row or index of the first row in the range
+     * @param {Number/HTMLElement} endRow The row or index of the last row in the range
+     */
+    deselectRange : function(startRow, endRow){
+        startRow = this.getRow(startRow);
+        endRow = this.getRow(endRow);
+        this.setRangeState(startRow, endRow, false, true);
+    },
+    
+    /** @ignore */
+    setRowStateFromChild : function(childEl, selected, keepExisting){
+        var row = this.grid.getRowFromChild(childEl);
+        this.setRowState(row, selected, keepExisting);
+    },
+    
+    /** @ignore */
+    setRangeState : function(startRow, endRow, selected, keepExisting){
+        if(this.isLocked()) return;
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        var curRow = startRow;
+        while(curRow.rowIndex != endRow.rowIndex){
+            this.setRowState(curRow, selected, true);
+            curRow = (startRow.rowIndex < endRow.rowIndex ? 
+                        this.grid.getRowAfter(curRow) : this.grid.getRowBefore(curRow))
+        }
+        this.setRowState(endRow, selected, true);
+    },
+    
+    /** @ignore */
+    setRowState : function(row, selected, keepExisting){
+        if(this.isLocked()) return;
+        if(this.isSelectable(row)){
+            if(selected){
+                if(!keepExisting){
+                    this.clearSelections();
+                }
+                this.setRowClass(row, 'selected');
+                row.selected = true;
+                this.selectedRows.push(row);
+                this.selectedRowIds.push(this.grid.dataModel.getRowId(row.rowIndex));
+                this.lastSelectedRow = row;
+            }else{
+                this.setRowClass(row, '');
+                row.selected = false;
+                this._removeSelected(row);
+            }
+            this.fireEvent('rowselect', this, row, selected);
+            this.fireEvent('selectionchange', this, this.selectedRows, this.selectedRowIds);
+        }
+    },
+
+    /** @ignore */
+    handleOver : function(e){
+        var row = this.grid.getRowFromChild(e.getTarget());
+        if(this.isSelectable(row) && !this.isSelected(row)){
+            this.setRowClass(row, 'over');
+        }
+    },
+    
+    /** @ignore */
+    handleOut : function(e){
+        var row = this.grid.getRowFromChild(e.getTarget());
+        if(this.isSelectable(row) && !this.isSelected(row)){
+            this.setRowClass(row, '');
+        }
+    },
+    
+    /** @ignore */
+    keyDown : function(e){
+        if(e.browserEvent.keyCode == e.DOWN){
+            this.selectNext(e.shiftKey);
+            e.preventDefault();
+        }else if(e.browserEvent.keyCode == e.UP){
+            this.selectPrevious(e.shiftKey);
+            e.preventDefault();
+        }
+    },
+
+    /** @ignore */
+    setRowClass : function(row, cssClass){
+        if(this.isSelectable(row)){
+            if(cssClass == 'selected'){
+                YAHOO.util.Dom.removeClass(row, 'ygrid-row-over');
+                YAHOO.util.Dom.addClass(row, 'ygrid-row-selected');
+            }else if(cssClass == 'over'){
+                YAHOO.util.Dom.removeClass(row, 'ygrid-row-selected');
+                YAHOO.util.Dom.addClass(row, 'ygrid-row-over');
+            }else if(cssClass == ''){
+                YAHOO.util.Dom.removeClass(row, 'ygrid-row-selected');
+                YAHOO.util.Dom.removeClass(row, 'ygrid-row-over');
+            }
+        }
+    },
+    
+    /** @ignore */
+    _removeSelected : function(row){
+        var sr = this.selectedRows;
+        for (var i = 0; i < sr.length; i++) {
+          if (sr[i] === row){
+              this.selectedRows.splice(i, 1);
+              this.selectedRowIds.splice(i, 1);
+              return;
+          }
+        }
+    }
+};
+
+/**
+ @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to allow only one row to be selected at a time. <br><br> 
+ @extends YAHOO.ext.grid.DefaultSelectionModel
+ @constructor
+ */
+YAHOO.ext.grid.SingleSelectionModel = function(){
+    YAHOO.ext.grid.SingleSelectionModel.superclass.constructor.call(this);
+};
+
+YAHOO.extendX(YAHOO.ext.grid.SingleSelectionModel, YAHOO.ext.grid.DefaultSelectionModel);
+
+/** @ignore */
+YAHOO.ext.grid.SingleSelectionModel.prototype.setRowState = function(row, selected){
+    YAHOO.ext.grid.SingleSelectionModel.superclass.setRowState.call(this, row, selected, false);
+};
+
+/**
+ @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to disable row selection. <br><br> 
+ @extends YAHOO.ext.grid.DefaultSelectionModel
+ @constructor
+ */
+YAHOO.ext.grid.DisableSelectionModel = function(){
+    YAHOO.ext.grid.DisableSelectionModel.superclass.constructor.call(this);
+};
+
+YAHOO.extendX(YAHOO.ext.grid.DisableSelectionModel, YAHOO.ext.grid.DefaultSelectionModel);
+
+YAHOO.ext.grid.DisableSelectionModel.prototype.initEvents = function(){
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-SplitBar.js.html b/www/extras/yui-ext/docs/overview-summary-SplitBar.js.html new file mode 100644 index 000000000..17e050bda --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-SplitBar.js.html @@ -0,0 +1,497 @@ + + + + + Overview + + + + + +
+ +

SplitBar.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.SplitBarCreates draggable splitter bar functionality from two elements.
YAHOO.ext.SplitBar.AbsoluteLayoutAdapterAdapter that moves the splitter element to align with the resized sizing element.
YAHOO.ext.SplitBar.BasicLayoutAdapterDefault Adapter.
+
+ + + + + + + +
/*
+ * splitbar.js, version .7
+ * Copyright(c) 2006, Jack Slocum.
+ * Code licensed under the BSD License
+ */
+
+YAHOO.util.DragDropMgr.clickTimeThresh = 350;
+
+/**
+ * @class Creates draggable splitter bar functionality from two elements.
+ * <br><br>
+ * Usage:
+ * <pre><code>
+ * var split = new YAHOO.ext.SplitBar('elementToDrag', 'elementToSize', 
+ *                   YAHOO.ext.SplitBar.HORIZONTAL, YAHOO.ext.SplitBar.LEFT);
+ * split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter("container"));
+ * split.minSize = 100;
+ * split.maxSize = 600;
+ * split.animate = true;
+ * split.onMoved.subscribe(splitterMoved);
+ * </code></pre>
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.DDProxy
+ * @requires YAHOO.util.Anim (optional) to support animation
+ * @requires YAHOO.util.Easing (optional) to support animation
+ * @constructor
+ * @param {String/HTMLElement/Element} dragElement The element to be dragged and act as the SplitBar. 
+ * @param {String/HTMLElement/Element} resizingElement The element to be resized based on where the SplitBar element is dragged 
+ * @param {Number} orientation (optional) Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+ * @param {Number} placement (optional) Either YAHOO.ext.SplitBar.LEFT or YAHOO.ext.SplitBar.RIGHT for horizontal or  
+                        YAHOO.ext.SplitBar.TOP or YAHOO.ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the intial position 
+                        position of the SplitBar).
+ */
+YAHOO.ext.SplitBar = function(dragElement, resizingElement, orientation, placement){
+    
+    /** @private */
+    this.el = YAHOO.ext.Element.get(dragElement, true);
+    
+    /** @private */
+    this.resizingEl = YAHOO.ext.Element.get(resizingElement, true);
+    
+    /**
+     * @private
+     * The orientation of the split. Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+     * Note: If this is changed after creating the SplitBar, the placement property must be manually updated
+     * @type Number
+     */
+    this.orientation = orientation || YAHOO.ext.SplitBar.HORIZONTAL;
+    
+    /**
+     * The minimum size of the resizing element. (Defaults to 0)
+     * @type Number
+     */
+    this.minSize = 0;
+    
+    /**
+     * The maximum size of the resizing element. (Defaults to 2000)
+     * @type Number
+     */
+    this.maxSize = 2000;
+    
+    /**
+     * Fires when the SplitBar is moved. Uses fireDirect with signature: (this, newSize)
+     * @type CustomEvent
+     */
+    this.onMoved = new YAHOO.util.CustomEvent("SplitBarMoved", this);
+    
+    /**
+     * Whether to animate the transition to the new size
+     * @type Boolean
+     */
+    this.animate = false;
+    
+    /**
+     * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
+     * @type Boolean
+     */
+    this.useShim = false;
+    
+    /** @private */
+    this.shim = null;
+    
+    /** @private */
+    this.proxy = YAHOO.ext.SplitBar.createProxy(this.orientation);
+    
+    /** @private */
+    this.dd = new YAHOO.util.DDProxy(this.el.dom.id, "SplitBars", {dragElId : this.proxy.id});
+    
+    /** @private */
+    this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dragSpecs = {};
+    
+    /**
+     * @private The adapter to use to positon and resize elements
+     */
+    this.adapter = new YAHOO.ext.SplitBar.BasicLayoutAdapter();
+    this.adapter.init(this);
+    
+    if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+        /** @private */
+        this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? YAHOO.ext.SplitBar.LEFT : YAHOO.ext.SplitBar.RIGHT);
+        this.el.setStyle('cursor', 'e-resize');
+    }else{
+        /** @private */
+        this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? YAHOO.ext.SplitBar.TOP : YAHOO.ext.SplitBar.BOTTOM);
+        this.el.setStyle('cursor', 'n-resize');
+    }
+}
+
+YAHOO.ext.SplitBar.prototype = {
+    /** 
+     * @private Called before drag operation begins by the DDProxy
+     */
+    onStartProxyDrag : function(x, y){
+        if(this.useShim){
+            if(!this.shim){
+                this.shim = YAHOO.ext.SplitBar.createShim();
+            }
+            this.shim.setVisible(true);
+        }
+        YAHOO.util.Dom.setStyle(this.proxy, 'display', 'block');
+        var size = this.adapter.getElementSize(this);
+        var c1 = size - this.minSize;
+        var c2 = Math.max(this.maxSize - size, 0);
+        if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(
+                this.placement == YAHOO.ext.SplitBar.LEFT ? c1 : c2, 
+                this.placement == YAHOO.ext.SplitBar.LEFT ? c2 : c1
+            );
+            this.dd.setYConstraint(0, 0);
+        }else{
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(0, 0);
+            this.dd.setYConstraint(
+                this.placement == YAHOO.ext.SplitBar.TOP ? c1 : c2, 
+                this.placement == YAHOO.ext.SplitBar.TOP ? c2 : c1
+            );
+         }
+        this.dragSpecs.startSize = size;
+        this.dragSpecs.startPoint = [x, y];
+        
+        YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd, x, y);
+    },
+    
+    /** 
+     * @private Called after the drag operation by the DDProxy
+     */
+    onEndProxyDrag : function(e){
+        YAHOO.util.Dom.setStyle(this.proxy, 'display', 'none');
+        var endPoint = YAHOO.util.Event.getXY(e);
+        if(this.useShim){
+            this.shim.setVisible(false);
+        }
+        var newSize;
+        if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == YAHOO.ext.SplitBar.LEFT ?
+                    endPoint[0] - this.dragSpecs.startPoint[0] :
+                    this.dragSpecs.startPoint[0] - endPoint[0]
+                );
+        }else{
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == YAHOO.ext.SplitBar.TOP ?
+                    endPoint[1] - this.dragSpecs.startPoint[1] :
+                    this.dragSpecs.startPoint[1] - endPoint[1]
+                );
+        }
+        newSize = Math.min(Math.max(newSize, this.minSize), this.maxSize);
+        if(newSize != this.dragSpecs.startSize){
+            this.adapter.setElementSize(this, newSize);
+            this.onMoved.fireDirect(this, newSize);
+        }
+    },
+    
+    /**
+     * Get the adapter this SplitBar uses
+     * @return The adapter object
+     */
+    getAdapter : function(){
+        return this.adapter;
+    },
+    
+    /**
+     * Set the adapter this SplitBar uses
+     * @param {Object} adapter A SplitBar adapter object
+     */
+    setAdapter : function(adapter){
+        this.adapter = adapter;
+        this.adapter.init(this);
+    },
+    
+    /**
+     * Gets the minimum size for the resizing element
+     * @return {Number} The minimum size
+     */
+    getMinimumSize : function(){
+        return this.minSize;
+    },
+    
+    /**
+     * Sets the minimum size for the resizing element
+     * @param {Number} minSize The minimum size
+     */
+    setMinimumSize : function(minSize){
+        this.minSize = minSize;
+    },
+    
+    /**
+     * Gets the maximum size for the resizing element
+     * @return {Number} The maximum size
+     */
+    getMaximumSize : function(){
+        return this.maxSize;
+    },
+    
+    /**
+     * Sets the maximum size for the resizing element
+     * @param {Number} maxSize The maximum size
+     */
+    setMaximumSize : function(maxSize){
+        this.maxSize = maxSize;
+    },
+    
+    /**
+     * Sets the initialize size for the resizing element
+     * @param {Number} size The initial size
+     */
+    setCurrentSize : function(size){
+        var oldAnimate = this.animate;
+        this.animate = false;
+        this.adapter.setElementSize(this, size);
+        this.animate = oldAnimate;
+    }
+};
+
+/**
+ * @private static Create the shim to drag over iframes
+ */
+YAHOO.ext.SplitBar.createShim = function(){
+    var shim = document.createElement('div');
+    YAHOO.util.Dom.generateId(shim, 'split-shim');
+    YAHOO.util.Dom.setStyle(shim, 'width', '100%');
+    YAHOO.util.Dom.setStyle(shim, 'height', '100%');
+    YAHOO.util.Dom.setStyle(shim, 'position', 'absolute');
+    YAHOO.util.Dom.setStyle(shim, 'background', 'white');
+    YAHOO.util.Dom.setStyle(shim, 'visibility', 'hidden');
+    YAHOO.util.Dom.setStyle(shim, 'z-index', 2);
+    window.document.body.appendChild(shim);
+    var shimEl = YAHOO.ext.Element.get(shim);
+    shimEl.setOpacity(.01);
+    shimEl.setXY([0, 0]);  
+    return shimEl;
+}
+
+/**
+ * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color.
+ */
+YAHOO.ext.SplitBar.createProxy = function(orientation){
+    var proxy = document.createElement('div');
+    YAHOO.util.Dom.generateId(proxy, 'split-proxy');
+    YAHOO.util.Dom.setStyle(proxy, 'position', 'absolute');
+    YAHOO.util.Dom.setStyle(proxy, 'visibility', 'hidden');
+    YAHOO.util.Dom.setStyle(proxy, 'z-index', 999);
+    YAHOO.util.Dom.setStyle(proxy, 'background-color', "#aaa");
+    if(orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+        YAHOO.util.Dom.setStyle(proxy, 'cursor', 'e-resize');
+    }else{
+        YAHOO.util.Dom.setStyle(proxy, 'cursor', 'n-resize');
+    }
+    // the next 2 fix IE abs position div height problem
+    YAHOO.util.Dom.setStyle(proxy, 'line-height', '0px');
+    YAHOO.util.Dom.setStyle(proxy, 'font-size', '0px');
+    window.document.body.appendChild(proxy);
+    return proxy;
+}
+
+/** 
+ * @class
+ * Default Adapter. It assumes the splitter and resizing element are not positioned
+ * elements and only gets/sets the width of the element. Generally used for table based layouts.
+ */
+YAHOO.ext.SplitBar.BasicLayoutAdapter = function(){
+}
+
+YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype = {
+    // do nothing for now
+    init : function(s){
+    
+    },
+    /**
+     * Called before drag operations to get the current size of the resizing element. 
+     * @param {YAHOO.ext.SplitBar} s The SplitBar using this adapter
+     */
+     getElementSize : function(s){
+        if(s.orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+            return s.resizingEl.getWidth();
+        }else{
+            return s.resizingEl.getHeight();
+        }
+    },
+    
+    /**
+     * Called after drag operations to set the size of the resizing element.
+     * @param {YAHOO.ext.SplitBar} s The SplitBar using this adapter
+     * @param {Number} newSize The new size to set
+     * @param {Function} onComplete A function to be invoke when resizing is complete
+     */
+    setElementSize : function(s, newSize, onComplete){
+        if(s.orientation == YAHOO.ext.SplitBar.HORIZONTAL){
+            if(!YAHOO.util.Anim || !s.animate){
+                s.resizingEl.setWidth(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setWidth(newSize, true, .1, onComplete, YAHOO.util.Easing.easeOut);
+            }
+        }else{
+            
+            if(!YAHOO.util.Anim || !s.animate){
+                s.resizingEl.setHeight(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setHeight(newSize, true, .1, onComplete, YAHOO.util.Easing.easeOut);
+            }
+        }
+    }
+};
+
+/** 
+ *@class
+ * Adapter that  moves the splitter element to align with the resized sizing element. 
+ * Used with an absolute positioned SplitBar.
+ * @param {String/HTMLElement/Element} container The container that wraps around the absolute positioned content. If it's
+ * document.body, make sure you assign an id to the body element.
+ */
+YAHOO.ext.SplitBar.AbsoluteLayoutAdapter = function(container){
+    this.basic = new YAHOO.ext.SplitBar.BasicLayoutAdapter();
+    this.container = getEl(container);
+}
+
+YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype = {
+    init : function(s){
+        this.basic.init(s);
+        //YAHOO.util.Event.on(window, 'resize', this.moveSplitter.createDelegate(this, [s]));
+    },
+    
+    getElementSize : function(s){
+        return this.basic.getElementSize(s);
+    },
+    
+    setElementSize : function(s, newSize, onComplete){
+        this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s]));
+    },
+    
+    moveSplitter : function(s){
+        var yes = YAHOO.ext.SplitBar;
+        switch(s.placement){
+            case yes.LEFT:
+                s.el.setX(s.resizingEl.getRight());
+                break;
+            case yes.RIGHT:
+                s.el.setStyle('right', (this.container.getWidth() - s.resizingEl.getLeft()) + 'px');
+                break;
+            case yes.TOP:
+                s.el.setY(s.resizingEl.getBottom());
+                break;
+            case yes.BOTTOM:
+                s.el.setY(s.resizingEl.getTop() - s.el.getHeight());
+                break;
+        }
+    }
+};
+
+/**
+ * Orientation constant - Create a vertical SplitBar
+ * @type Number
+ */
+YAHOO.ext.SplitBar.VERTICAL = 1;
+
+/**
+ * Orientation constant - Create a horizontal SplitBar
+ * @type Number
+ */
+YAHOO.ext.SplitBar.HORIZONTAL = 2;
+
+/**
+ * Placement constant - The resizing element is to the left of the splitter element
+ * @type Number
+ */
+YAHOO.ext.SplitBar.LEFT = 1;
+
+/**
+ * Placement constant - The resizing element is to the right of the splitter element
+ * @type Number
+ */
+YAHOO.ext.SplitBar.RIGHT = 2;
+
+/**
+ * Placement constant - The resizing element is positioned above the splitter element
+ * @type Number
+ */
+YAHOO.ext.SplitBar.TOP = 3;
+
+/**
+ * Placement constant - The resizing element is positioned under splitter element
+ * @type Number
+ */
+YAHOO.ext.SplitBar.BOTTOM = 4;
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-State.js.html b/www/extras/yui-ext/docs/overview-summary-State.js.html new file mode 100644 index 000000000..7f104643d --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-State.js.html @@ -0,0 +1,218 @@ + + + + + Overview + + + + + +
+ +

State.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + +
YAHOO.namespace('ext.state');
+
+YAHOO.ext.state.Provider = function(){
+    YAHOO.ext.state.Provider.superclass.constructor.call(this);
+    this.events = {
+        'statechange': new YAHOO.util.CustomEvent('statechange')  
+    };
+    this.state = {};
+};
+YAHOO.extendX(YAHOO.ext.state.Provider, YAHOO.ext.util.Observable, {
+    get : function(name){
+        return this.state[name];
+    },
+    
+    clear : function(name){
+        delete this.state[name];
+        this.fireEvent('statechange', this, name, null);
+    },
+    
+    set : function(name, value){
+        this.state[name] = value;
+        this.fireEvent('statechange', this, name, value);
+    }
+});
+
+YAHOO.ext.state.Manager = new function(){
+    var provider = new YAHOO.ext.state.Provider();
+    
+    return {
+        setProvider : function(stateProvider){
+            provider = stateProvider;
+        },
+        
+        get : function(key){
+            return provider.get(key);
+        },
+        
+        set : function(key, value){
+            provider.set(key, value);
+        },
+        
+        clear : function(key){
+            provider.clear(key);
+        },
+        
+        getProvider : function(){
+            return provider;
+        }
+    };
+}();
+
+YAHOO.ext.state.CookieProvider = function(config){
+    YAHOO.ext.state.CookieProvider.superclass.constructor.call(this);
+    this.path = '/';
+    this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days
+    this.domain = null;
+    this.secure = false;
+    YAHOO.ext.util.Config.apply(this, config);
+    this.state = this.readCookies();
+};
+
+YAHOO.extendX(YAHOO.ext.state.CookieProvider, YAHOO.ext.state.Provider, {
+    set : function(name, value){
+        if(typeof value == 'undefined' || value === null){
+            this.clear(name);
+            return;
+        }
+        this.setCookie(name, value);
+        YAHOO.ext.state.CookieProvider.superclass.set.call(this, name, value);
+    },
+        
+    clear : function(name){
+        this.clearCookie(name);
+        YAHOO.ext.state.CookieProvider.superclass.clear.call(this, name);
+    },
+        
+    readCookies : function(){
+        var cookies = {};
+        var c = document.cookie + ';';
+        var re = /\s?(.*?)=(.*?);/g;
+    	var matches;
+    	while((matches = re.exec(c)) != null){
+            var name = matches[1];
+            var value = matches[2];
+            if(name && name.substring(0,3) == 'ys-'){
+                cookies[name.substr(3)] = this.decodeValue(value);
+            }
+        }
+        return cookies;
+    },
+    
+    decodeValue : function(cookie){
+        var re = /^(a|n|d|b|s|o)\:(.*)$/;
+        var matches = re.exec(unescape(cookie));
+        if(!matches || !matches[1]) return; // non state cookie
+        var type = matches[1];
+        var v = matches[2];
+        switch(type){
+            case 'n':
+                return parseFloat(v);
+            case 'd':
+                return new Date(Date.parse(v));
+            case 'b':
+                return (v == '1');
+            case 'a':
+                var all = [];
+                var values = v.split('^');
+                for(var i = 0, len = values.length; i < len; i++){
+                    all.push(this.decodeValue(values[i]))
+                }
+                return all;
+           case 'o':
+                var all = {};
+                var values = v.split('^');
+                for(var i = 0, len = values.length; i < len; i++){
+                    var kv = values[i].split('=');
+                    all[kv[0]] = this.decodeValue(kv[1]);
+                }
+                return all;
+           default:
+                return v;
+        }
+    },
+    
+    encodeValue : function(v){
+        var enc;
+        if(typeof v == 'number'){
+            enc = 'n:' + v;
+        }else if(typeof v == 'boolean'){
+            enc = 'b:' + (v ? '1' : '0');
+        }else if(v instanceof Date){
+            enc = 'd:' + v.toGMTString();
+        }else if(v instanceof Array){
+            var flat = '';
+            for(var i = 0, len = v.length; i < len; i++){
+                flat += this.encodeValue(v[i]);
+                if(i != len-1) flat += '^';
+            }
+            enc = 'a:' + flat;
+        }else if(typeof v == 'object'){
+            var flat = '';
+            for(var key in v){
+                if(typeof v[key] != 'function'){
+                    flat += key + '=' + this.encodeValue(v[key]) + '^';
+                }
+            }
+            enc = 'o:' + flat.substring(0, flat.length-1);
+        }else{
+            enc = 's:' + v;
+        }
+        return escape(enc);        
+    },
+    
+    setCookie : function(name, value){
+        document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
+           ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
+           ((this.path == null) ? "" : ("; path=" + this.path)) +
+           ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
+           ((this.secure == true) ? "; secure" : "");
+    },
+    
+    clearCookie : function(name){
+        document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" +
+           ((this.path == null) ? "" : ("; path=" + this.path)) +
+           ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
+           ((this.secure == true) ? "; secure" : "");
+    }
+});
+
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-TabPanel.js.html b/www/extras/yui-ext/docs/overview-summary-TabPanel.js.html new file mode 100644 index 000000000..a02e314e1 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-TabPanel.js.html @@ -0,0 +1,445 @@ + + + + + Overview + + + + + +
+ +

TabPanel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.TabPanelCreates a lightweight TabPanel component using Yahoo!
YAHOO.ext.TabPanelItem 
+
+ + + + + + + +
/*
+	tabpanel.js, version .1
+	Copyright(c) 2006, Jack Slocum.
+	Code licensed under the BSD License
+*/
+
+/**
+ * @class Creates a lightweight TabPanel component using Yahoo! UI.
+ * <br><br>
+ * Usage:
+ * <pre><code>
+    <font color="#008000">// basic tabs 1, built from existing content</font>
+    var tabs = new YAHOO.ext.TabPanel('tabs1');
+    tabs.addTab('script', "View Script");
+    tabs.addTab('markup', "View Markup");
+    tabs.activate('script');
+    
+    <font color="#008000">// more advanced tabs, built from javascript</font>
+    var jtabs = new YAHOO.ext.TabPanel('jtabs');
+    jtabs.addTab('jtabs-1', "Normal Tab", "My content was added during construction.");
+    
+    <font color="#008000">// set up the UpdateManager</font>
+    var tab2 = jtabs.addTab('jtabs-2', "Ajax Tab 1");
+    var updater = tab2.getUpdateManager();
+    updater.setDefaultUrl('ajax1.htm');
+    tab2.onActivate.subscribe(updater.refresh, updater, true);
+    
+    <font color="#008000">// Use setUrl for Ajax loading</font>
+    var tab3 = jtabs.addTab('jtabs-3', "Ajax Tab 2");
+    tab3.setUrl('ajax2.htm', null, true);
+    
+    <font color="#008000">// Disabled tab</font>
+    var tab4 = jtabs.addTab('tabs1-5', "Disabled Tab", "Can't see me cause I'm disabled");
+    tab4.disable();
+    
+    jtabs.activate('jtabs-1');
+}
+ * </code></pre>
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.ext.UpdateManager
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.DDProxy
+ * @requires YAHOO.util.Connect (optional)
+ * @constructor
+ * Create new TabPanel.
+ * @param {String/HTMLElement/Element} container The id, DOM element or YAHOO.ext.Element container where this TabPanel is to be rendered. 
+ */
+YAHOO.ext.TabPanel = function(container){
+    /**
+    * The container element for this TabPanel.
+    * @type YAHOO.ext.Element
+    */
+    this.el = getEl(container);
+    /** @private */
+    this.stripWrap = getEl(this.createStrip(this.el.dom));
+    /** @private */
+    this.stripEl = getEl(this.createStripList(this.stripWrap.dom));
+    /** The body element that contains TabPaneItem bodies. 
+     * @type YAHOO.ext.Element
+     */
+    this.bodyEl = getEl(this.createBody(this.el.dom));
+    /** @private */
+    this.items = {};
+    /** @private */
+    this.active = null;
+    /**
+     * Fires when the active TabPanelItem changes. Uses fireDirect with signature: (TabPanel this, TabPanelItem activedTab).
+     * @type CustomEvent
+     */
+    this.onTabChange = new YAHOO.util.CustomEvent('TabItem.onTabChange');
+    /** @private */
+    this.activateDelegate = this.activate.createDelegate(this);
+}
+
+YAHOO.ext.TabPanel.prototype = {
+    /**
+     * Creates a new TabPanelItem by looking for an existing element with the provided id - if it's not found it creates one.
+     * @param {String} id The id of the div to use or create
+     * @param {String} text The text for the tab
+     * @param {<i>String</i>} content (optional) Content to put in the TabPanelItem body
+     * @return {YAHOO.ext.TabPanelItem} The created TabPanelItem
+     */
+    addTab : function(id, text, content){
+        var item = new YAHOO.ext.TabPanelItem(this, id, text);
+        this.addTabItem(item);
+        if(content){
+            item.setContent(content);
+        }
+        return item;
+    },
+    
+    /**
+     * Returns the TabPanelItem with the specified id
+     * @param {String} id The id of the TabPanelItem to fetch.
+     * @return {YAHOO.ext.TabPanelItem}
+     */
+    getTab : function(id){
+        return this.items[id];
+    },
+    
+    /**
+     * Add an existing TabPanelItem.
+     * @param {YAHOO.ext.TabPanelItem} item The TabPanelItem to add
+     */
+    addTabItem : function(item){
+        this.items[item.id] = item;
+    },
+        
+    /**
+     * Remove a TabPanelItem.
+     * @param {String} id The id of the TabPanelItem to remove.
+     */
+    removeTab : function(id){
+        var tab = this.items[id];
+        if(tab && this.active != tab){
+            this.stripEl.dom.removeChild(tab.onEl.dom);
+            this.stripEl.dom.removeChild(tab.offEl.dom);
+            this.bodyEl.dom.removeChild(tab.bodyEl.dom);
+            delete this.items[id];
+        }
+    },
+    
+    /**
+     * Disable a TabPanelItem. <b>It cannot be the active tab, if it is this call is ignored.</b>. 
+     * @param {String} id The id of the TabPanelItem to disable.
+     */
+    disableTab : function(id){
+        var tab = this.items[id];
+        if(tab && this.active != tab){
+            tab.disable();
+        }
+    },
+    
+    /**
+     * Enable a TabPanelItem that is disabled.
+     * @param {String} id The id of the TabPanelItem to enable.
+     */
+    enableTab : function(id){
+        var tab = this.items[id];
+        tab.enable();
+    },
+    
+    /**
+     * Activate a TabPanelItem. The currently active will be deactivated. 
+     * @param {String} id The id of the TabPanelItem to activate.
+     */
+    activate : function(id){
+        var tab = this.items[id];
+        if(!tab.disabled){
+            if(this.active){
+                this.active.hide();
+            }
+            this.active = this.items[id];
+            this.active.show();
+            this.onTabChange.fireDirect(this, this.active);
+        }
+    },
+    
+    /**
+     * Get the active TabPanelItem
+     * @return {YAHOO.ext.TabPanelItem} The active TabPanelItem or null if none are active.
+     */
+    getActiveTab : function(){
+        return this.active;
+    }
+    
+};
+
+YAHOO.ext.TabPanelItem = function(tabPanel, id, text){
+    /**
+     * The TabPanel this TabPanelItem belongs to
+     * @type YAHOO.ext.TabPanel
+     */
+    this.tabPanel = tabPanel;
+    /**
+     * The id for this TabPanelItem
+     * @type String
+     */
+    this.id = id;
+    /** @private */
+    this.disabled = false;
+    /** @private */
+    this.text = text;
+    /** @private */
+    this.loaded = false;
+    
+    /** 
+     * The body element for this TabPanelItem
+     * @type YAHOO.ext.Element
+     */
+    this.bodyEl = getEl(tabPanel.createItemBody(tabPanel.bodyEl.dom, id));
+    this.bodyEl.originalDisplay = 'block';
+    this.bodyEl.setStyle('display', 'none');
+    this.bodyEl.enableDisplayMode();
+    
+    var stripElements =tabPanel.createStripElements(tabPanel.stripEl.dom, text);
+    /** @private */
+    this.onEl = getEl(stripElements.on, true);
+    /** @private */
+    this.offEl = getEl(stripElements.off, true);
+    this.onEl.originalDisplay = 'inline';
+    this.onEl.enableDisplayMode();
+    this.offEl.originalDisplay = 'inline';
+    this.offEl.enableDisplayMode();
+    this.offEl.on('click', tabPanel.activateDelegate.createCallback(id));
+    /**
+     * Fires when this TabPanelItem is activated. Uses fireDirect with signature: (TabPanel tabPanel, TabPanelItem this).
+     * @type CustomEvent
+     */
+    this.onActivate = new YAHOO.util.CustomEvent('TabItem.onActivate');
+    /**
+     * Fires when this TabPanelItem is deactivated. Uses fireDirect with signature: (TabPanel tabPanel, TabPanelItem this).
+     * @type CustomEvent
+     */
+    this.onDeactivate = new YAHOO.util.CustomEvent('TabItem.onDeactivate');
+};
+
+YAHOO.ext.TabPanelItem.prototype = {
+    /**
+     * Show this TabPanelItem - this <b>does not</b> deactivate the currently active TabPanelItem.
+     */
+    show : function(){
+        this.onEl.show();
+        this.offEl.hide();
+        this.bodyEl.show();
+        this.onActivate.fireDirect(this.tabPanel, this); 
+    },
+    
+    setText : function(text){
+        this.onEl.dom.firstChild.firstChild.firstChild.innerHTML = text;
+        this.offEl.dom.firstChild.firstChild.innerHTML = text;
+    },
+    /**
+     * Activate this TabPanelItem - this <b>does</b> deactivate the currently active TabPanelItem.
+     */
+    activate : function(){
+        this.tabPanel.activate(this.id);
+    },
+    
+    /**
+     * Hide this TabPanelItem - if you don't activate another TabPanelItem this could look odd.
+     */
+    hide : function(){
+        this.onEl.hide();
+        this.offEl.show();
+        this.bodyEl.hide();
+        this.onDeactivate.fireDirect(this.tabPanel, this); 
+    },
+    
+    /**
+     * Disable this TabPanelItem - this call is ignore if this is the active TabPanelItem.
+     */
+    disable : function(){
+        if(this.tabPanel.active != this){
+            this.disabled = true;
+            this.offEl.addClass('disabled');
+            this.offEl.dom.title = 'disabled';
+        }
+    },
+    
+    /**
+     * Enable this TabPanelItem if it was previously disabled.
+     */
+    enable : function(){
+        this.disabled = false;
+        this.offEl.removeClass('disabled');
+        this.offEl.dom.title = '';
+    },
+    
+    /**
+     * Set the content for this TabPanelItem.
+     * @param {String} content The content
+     */
+    setContent : function(content){
+        this.bodyEl.update(content);
+    },
+    
+    /**
+     * Get the {@link YAHOO.ext.UpdateManager} for the body of this TabPanelItem. Enables you to perform Ajax updates.
+     * @return {YAHOO.ext.UpdateManager} The UpdateManager
+     */
+    getUpdateManager : function(){
+        return this.bodyEl.getUpdateManager();
+    },
+    
+    /**
+     * Set a URL to be used to load the content for this TabPanelItem.
+     * @param {String/Function} url The url to load the content from or a function to call to get the url
+     * @param {<i>String/Object</i>} params (optional) The string params for the update call or an object of the params. See {@link YAHOO.ext.UpdateManager#update} for more details. (Defaults to null)
+     * @param {<i>Boolean</i>} loadOnce (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this TabPanelItem is activated. (Defaults to false)
+     * @return {YAHOO.ext.UpdateManager} The UpdateManager
+     */
+    setUrl : function(url, params, loadOnce){
+        this.onActivate.subscribe(this._handleRefresh.createDelegate(this, [url, params, loadOnce]));
+    },
+    
+    /** @private */
+    _handleRefresh : function(url, params, loadOnce){
+        if(!loadOnce || !this.loaded){
+            var updater = this.bodyEl.getUpdateManager();
+            updater.update(url, params, this._setLoaded.createDelegate(this));
+        }
+    },
+    
+    /** @private */
+    _setLoaded : function(){
+        this.loaded = true;
+    }   
+};
+/** @private */
+YAHOO.ext.TabPanel.prototype.createStrip = function(container){
+    var strip = document.createElement('div');
+    YAHOO.util.Dom.addClass(strip, 'tabset');
+    container.appendChild(strip);
+    var stripInner = document.createElement('div');
+    YAHOO.util.Dom.generateId(stripInner, 'tab-strip');
+    YAHOO.util.Dom.addClass(stripInner, 'hd');
+    strip.appendChild(stripInner);
+    return stripInner;
+};
+/** @private */
+YAHOO.ext.TabPanel.prototype.createStripList = function(strip){
+    var list = document.createElement('ul');
+    YAHOO.util.Dom.generateId(list, 'tab-strip-list');
+    strip.appendChild(list);
+    return list;
+};
+/** @private */
+YAHOO.ext.TabPanel.prototype.createBody = function(container){
+    var body = document.createElement('div');
+    YAHOO.util.Dom.generateId(body, 'tab-body');
+    YAHOO.util.Dom.addClass(body, 'yui-ext-tabbody');
+    container.appendChild(body);
+    return body;
+};
+/** @private */
+YAHOO.ext.TabPanel.prototype.createItemBody = function(bodyEl, id){
+    var body = YAHOO.util.Dom.get(id);
+    if(!body){
+        body = document.createElement('div');
+        body.id = id;
+    }
+    YAHOO.util.Dom.addClass(body, 'yui-ext-tabitembody');
+    bodyEl.appendChild(body);
+    return body;
+};
+/** @private */
+YAHOO.ext.TabPanel.prototype.createStripElements = function(stripEl, text){
+    var li = document.createElement('li');
+    var a = document.createElement('a');
+    var em = document.createElement('em');
+       
+    stripEl.appendChild(li);
+    li.appendChild(a);
+    a.appendChild(em);
+    em.innerHTML = text;
+    
+    var li2 = document.createElement('li');
+    var a2 = document.createElement('a');
+    var em2 = document.createElement('em');
+    var strong = document.createElement('strong');
+       
+    stripEl.appendChild(li2);
+    YAHOO.util.Dom.addClass(li2, 'on');
+    YAHOO.util.Dom.setStyle(li2, 'display', 'none');
+    li2.appendChild(a2);
+    a2.appendChild(strong);
+    strong.appendChild(em2);
+    em2.innerHTML = text;
+    
+    return {on: li2, off: li};
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-TextEditor.js.html b/www/extras/yui-ext/docs/overview-summary-TextEditor.js.html new file mode 100644 index 000000000..385d49417 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-TextEditor.js.html @@ -0,0 +1,154 @@ + + + + + Overview + + + + + +
+ +

TextEditor.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.TextEditor 
+
+ + + + + + + +
YAHOO.ext.grid.TextEditor = function(config){
+    var element = document.createElement('input');
+    element.type = 'text';
+    element.className = 'ygrid-editor ygrid-text-editor';
+    element.setAttribute('autocomplete', 'off');
+    document.body.appendChild(element);
+    YAHOO.ext.grid.TextEditor.superclass.constructor.call(this, element);
+    YAHOO.ext.util.Config.apply(this, config);
+};
+YAHOO.extendX(YAHOO.ext.grid.TextEditor, YAHOO.ext.grid.CellEditor);
+
+YAHOO.ext.grid.TextEditor.prototype.validate = function(){
+    var dom = this.element.dom;
+    var value = dom.value;
+    if(value.length < 1){ // if it's blank
+         if(this.allowBlank){
+             dom.title = '';
+             this.element.removeClass('ygrid-editor-invalid');
+             return true;
+         }else{
+             dom.title = this.blankText;
+             this.element.addClass('ygrid-editor-invalid');
+             return false;
+         }
+    }
+    if(value.length < this.minLength){
+        dom.title = this.minText.replace('%0', this.minLength);
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    if(value.length > this.maxLength){
+        dom.title = this.maxText.replace('%0', this.maxLength);
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    var msg = this.validator(value);
+    if(msg !== true){
+        dom.title = msg;
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    if(this.regex && !this.regex.test(value)){
+        dom.title = this.regexText;
+        this.element.addClass('ygrid-editor-invalid');
+        return false;
+    }
+    dom.title = '';
+    this.element.removeClass('ygrid-editor-invalid');
+    return true;
+};
+
+YAHOO.ext.grid.TextEditor.prototype.initEvents = function(){
+    YAHOO.ext.grid.TextEditor.superclass.initEvents.call(this);
+    var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this);
+    this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay]));
+};
+
+YAHOO.ext.grid.TextEditor.prototype.show = function(){
+    this.element.dom.title = '';
+    YAHOO.ext.grid.TextEditor.superclass.show.call(this);
+    this.element.focus();
+    if(this.selectOnFocus){
+        try{
+            this.element.dom.select();
+        }catch(e){}
+    }
+    this.validate(this.element.dom.value);
+};
+
+YAHOO.ext.grid.TextEditor.prototype.getValue = function(){
+   if(!this.validate()){
+       return this.originalValue;
+   }else{
+       return this.element.dom.value;
+   }   
+};
+
+YAHOO.ext.grid.TextEditor.prototype.allowBlank = true;
+YAHOO.ext.grid.TextEditor.prototype.minLength = 0;
+YAHOO.ext.grid.TextEditor.prototype.maxLength = Number.MAX_VALUE;
+YAHOO.ext.grid.TextEditor.prototype.minText = 'The minimum length for this field is %0';
+YAHOO.ext.grid.TextEditor.prototype.maxText = 'The maximum length for this field is %0';
+YAHOO.ext.grid.TextEditor.prototype.selectOnFocus = true;
+YAHOO.ext.grid.TextEditor.prototype.blankText = 'This field cannot be blank';
+YAHOO.ext.grid.TextEditor.prototype.validator = function(){return true;};
+YAHOO.ext.grid.TextEditor.prototype.validationDelay = 200;
+YAHOO.ext.grid.TextEditor.prototype.regex = null;
+YAHOO.ext.grid.TextEditor.prototype.regexText = '';
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-Toolbar.js.html b/www/extras/yui-ext/docs/overview-summary-Toolbar.js.html new file mode 100644 index 000000000..a5f795654 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-Toolbar.js.html @@ -0,0 +1,243 @@ + + + + + Overview + + + + + +
+ +

Toolbar.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.ToolbarBasic Toolbar used by the Grid to create the paging toolbar.
YAHOO.ext.ToolbarButtonA toolbar button.
+
+ + + + + + + +
/**
+ * @class
+ * Basic Toolbar used by the Grid to create the paging toolbar. This class is reusable but functionality
+ * is limited. Look for more functionality in a future version. 
+ */
+ YAHOO.ext.Toolbar = function(container){
+    this.el = getEl(container, true);
+    var div = document.createElement('div');
+    div.className = 'ytoolbar';
+    var tb = document.createElement('table');
+    tb.border = 0;
+    tb.cellPadding = 0;
+    tb.cellSpacing = 0;
+    div.appendChild(tb);
+    var tbody = document.createElement('tbody');
+    tb.appendChild(tbody);
+    var tr = document.createElement('tr');
+    tbody.appendChild(tr);
+    this.el.dom.appendChild(div);
+    this.tr = tr;
+};
+
+YAHOO.ext.Toolbar.prototype = {
+    /**
+     * Adds element(s) to the toolbar - this function takes a variable number of 
+     * arguments of mixed type and adds them to the toolbar...
+     * If an argument is a ToolbarButton, it is added. If the element is a string, it is wrapped 
+     * in a ytb-text element and added unless the text is "separator" in which case a separator
+     * is added. Otherwise, it is assumed the element is an HTMLElement and it is added directly.
+     */
+    add : function(){
+        for(var i = 0; i < arguments.length; i++){
+            var el = arguments[i];
+            var td = document.createElement('td');
+            this.tr.appendChild(td);
+            if(el instanceof YAHOO.ext.ToolbarButton){
+                el.init(td);
+            }else if(typeof el == 'string'){
+                var span = document.createElement('span');
+                if(el == 'separator'){
+                    span.className = 'ytb-sep';
+                }else{
+                    span.innerHTML = el;
+                    span.className = 'ytb-text';
+                }
+                td.appendChild(span);
+            }else if(typeof el == 'object'){ // must be element?
+                td.appendChild(el);
+            }
+        }
+    },
+    
+    addSeparator : function(){
+        var td = document.createElement('td');
+        this.tr.appendChild(td);
+        var span = document.createElement('span');
+        span.className = 'ytb-sep';
+        td.appendChild(span);
+    },
+    
+    /**
+     * Adds a button, see {@link YAHOO.ext.ToolbarButton} for more info on the config
+     * @return {YAHOO.ext.ToolbarButton}
+     */
+    addButton : function(config){
+        var b = new YAHOO.ext.ToolbarButton(config);
+        this.add(b);
+        return b;
+    },
+    
+    addText : function(text){
+        var td = document.createElement('td');
+        this.tr.appendChild(td);
+        var span = document.createElement('span');
+        span.className = 'ytb-text';
+        span.innerHTML = text;
+        td.appendChild(span);
+        return span;
+    }
+};
+
+/**
+ * @class
+ * A toolbar button. The config has the following options:
+ * <ul>
+ * <li>className - The CSS class for the button. Use this to attach a background image for an icon.</li>
+ * <li>text - The button's text</li>
+ * <li>tooltip - The buttons tooltip text</li>
+ * <li>click - function to call when the button is clicked</li>
+ * <li>mouseover - function to call when the mouse moves over the button</li>
+ * <li>mouseout - function to call when the mouse moves off the button</li>
+ * <li>scope - The scope of the above event handlers</li>
+ * <li></li>
+ * <li></li>
+ */
+YAHOO.ext.ToolbarButton = function(config){
+    YAHOO.ext.util.Config.apply(this, config);
+};
+
+YAHOO.ext.ToolbarButton.prototype = {
+    /** @private */
+    init : function(appendTo){
+        var element = document.createElement('span');
+        element.className = 'ytb-button';
+        this.disabled = (this.disabled === true);
+        var inner = document.createElement('span');
+        inner.className = 'ytb-button-inner ' + this.className;
+        if(this.tooltip){
+            element.setAttribute('title', this.tooltip);
+        }
+        element.appendChild(inner);
+        appendTo.appendChild(element);
+        this.el = getEl(element, true);
+        inner.innerHTML = (this.text ? this.text : '&nbsp;');
+        this.el.mon('click', this.onClick, this, true);    
+        this.el.mon('mouseover', this.onMouseOver, this, true);    
+        this.el.mon('mouseout', this.onMouseOut, this, true);
+    },
+    
+    disable : function(){
+        this.disabled = true;
+        if(this.el){
+            this.el.addClass('ytb-button-disabled');
+        }
+    },
+    
+    enable : function(){
+        this.disabled = false;
+        if(this.el){
+            this.el.removeClass('ytb-button-disabled');
+        }
+    },
+    
+    isDisabled : function(){
+        return this.disabled === true;
+    },
+    
+    setDisabled : function(disabled){
+        if(disabled){
+            this.disable();
+        }else{
+            this.enable();
+        }
+    },
+    
+    /** @private */
+    onClick : function(){
+        if(!this.disabled && this.click){
+            this.click.call(this.scope || window, this);
+        }
+    },
+    
+    /** @private */
+    onMouseOver : function(){
+        if(!this.disabled){
+            this.el.addClass('ytb-button-over');
+            if(this.mouseover){
+                this.mouseover.call(this.scope || window, this);
+            }
+        }
+    },
+    
+    /** @private */
+    onMouseOut : function(){
+        this.el.removeClass('ytb-button-over');
+        if(!this.disabled){
+            if(this.mouseout){
+                this.mouseout.call(this.scope || window, this);
+            }
+        }
+    }
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-UpdateManager.js.html b/www/extras/yui-ext/docs/overview-summary-UpdateManager.js.html new file mode 100644 index 000000000..61c1ca1ed --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-UpdateManager.js.html @@ -0,0 +1,488 @@ + + + + + Overview + + + + + +
+ +

UpdateManager.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.UpdateManagerProvides AJAX-style update for Element object using Yahoo + UI library YAHOO.util.Connect functionality.

+ Usage:
+

+ // Get it from a YAHOO.ext.Element object
+ var mgr = myElement.getUpdateManager();
+ mgr.update('http://myserver.com/index.php', 'param1=1&param2=2');
+ ...
YAHOO.ext.UpdateManager.BasicRendererDefault Content renderer.
+
+ + + + + + + +
/**
+ * @class Provides AJAX-style update for Element object using Yahoo 
+ * UI library YAHOO.util.Connect functionality.<br><br>
+ * Usage:<br>
+ * <pre><code>
+ * // Get it from a YAHOO.ext.Element object
+ * var mgr = myElement.getUpdateManager();
+ * mgr.update('http://myserver.com/index.php', 'param1=1&amp;param2=2');
+ * ...
+ * mgr.formUpdate('myFormId', 'http://myserver.com/index.php');
+ * <br>
+ * // or directly (returns the same UpdateManager instance)
+ * var mgr = new YAHOO.ext.UpdateManager('myElementId');
+ * mgr.startAutoRefresh('http://myserver.com/index.php', 60);
+ * mgr.onUpdate.subscribe(myFcnNeedsToKnow);
+ * <br>
+ * </code></pre>
+ * @requires YAHOO.ext.Element
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @requires YAHOO.util.Connect
+ * @constructor
+ * Create new UpdateManager.
+ * @param {String/HTMLElement/YAHOO.ext.Element} el The element to update 
+ * @param {<i>Boolean</i>} forceNew (optional) By default the constructor checks to see if the passed element already has an UpdateManager and if it does it returns the same instance. This will skip that check (useful for extending this class).
+ */
+YAHOO.ext.UpdateManager = function(el, forceNew){
+    el = YAHOO.ext.Element.get(el);
+    if(!forceNew && el.updateManager){
+        return el.updateManager;
+    }
+    /**
+     * The Element object
+     * @type YAHOO.ext.Element
+     */
+    this.el = el;
+    /**
+     * Cached url to use for refreshes. Overwritten every time update() is called unless 'discardUrl' param is set to true.
+     * @type String
+     */
+    this.defaultUrl = null;
+    /**
+     * fired before update is made, return false from your handler and the update is cancelled. 
+     * Uses fireDirect with signature: (oElement, url, params)
+     * @type YAHOO.util.CustomEvent
+     */
+    this.beforeUpdate = new YAHOO.util.CustomEvent('UpdateManager.beforeUpdate');
+    /**
+     * Fired after successful update is made. Uses fireDirect with signature: (oElement, oResponseObject)
+     * @type YAHOO.util.CustomEvent
+     */
+    this.onUpdate = new YAHOO.util.CustomEvent('UpdateManager.onUpdate');
+    /**
+     * Fired on update failure. Uses fireDirect with signature: (oElement, oResponseObject)
+     * @type YAHOO.util.CustomEvent
+     */
+    this.onFailure = new YAHOO.util.CustomEvent('UpdateManager.onFailure');
+    
+    /**
+     * Blank page URL to use with SSL file uploads (Defaults to YAHOO.ext.UpdateManager.defaults.sslBlankUrl or 'about:blank'). 
+     * @type String
+     */
+    this.sslBlankUrl = YAHOO.ext.UpdateManager.defaults.sslBlankUrl;
+    /**
+     * Whether to append unique parameter on get request to disable caching (Defaults to YAHOO.ext.UpdateManager.defaults.disableCaching or false). 
+     * @type Boolean
+     */
+    this.disableCaching = YAHOO.ext.UpdateManager.defaults.disableCaching;
+    /**
+     * Text for loading indicator (Defaults to YAHOO.ext.UpdateManager.defaults.indicatorText or '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;'). 
+     * @type String
+     */
+    this.indicatorText = YAHOO.ext.UpdateManager.defaults.indicatorText;
+    /**
+     * Whether to show indicatorText when loading (Defaults to YAHOO.ext.UpdateManager.defaults.showLoadIndicator or true). 
+     * @type String
+     */
+    this.showLoadIndicator = YAHOO.ext.UpdateManager.defaults.showLoadIndicator;
+    /**
+     * Timeout for requests or form posts in seconds (Defaults to YAHOO.ext.UpdateManager.defaults.timeout or 30 seconds). 
+     * @type Number
+     */
+    this.timeout = YAHOO.ext.UpdateManager.defaults.timeout;
+    
+    /**
+     * True to process scripts in the output (Defaults to YAHOO.ext.UpdateManager.defaults.loadScripts (false)). 
+     * @type Number
+     */
+    this.loadScripts = YAHOO.ext.UpdateManager.defaults.loadScripts;
+    
+    /**
+     * YAHOO.util.Connect transaction object of current executing transaction
+     */
+    this.transaction = null;
+    
+    /**
+     * @private
+     */
+    this.autoRefreshProcId = null;
+    /**
+     * Delegate for refresh() prebound to 'this', use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
+     * @type Function
+     */
+    this.refreshDelegate = this.refresh.createDelegate(this);
+    /**
+     * Delegate for update() prebound to 'this', use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
+     * @type Function
+     */
+    this.updateDelegate = this.update.createDelegate(this);
+    /**
+     * Delegate for formUpdate() prebound to 'this', use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
+     * @type Function
+     */
+    this.formUpdateDelegate = this.formUpdate.createDelegate(this);
+    /**
+     * @private
+     */
+    this.successDelegate = this.processSuccess.createDelegate(this);
+    /**
+     * @private
+     */
+     this.failureDelegate = this.processFailure.createDelegate(this);
+     
+     /**
+      * The renderer for this UpdateManager. Defaults to {@link YAHOO.ext.UpdateManager.BasicRenderer}. 
+      */
+      this.renderer = new YAHOO.ext.UpdateManager.BasicRenderer();
+};
+
+YAHOO.ext.UpdateManager.prototype = {
+    /**
+     * Get the Element this UpdateManager is bound to
+     * @return {YAHOO.ext.Element} The element
+     */
+    getEl : function(){
+        return this.el;
+    },
+    
+    /**
+     * Performs an async request, updating this element with the response. If params are specified it uses POST, otherwise it uses GET.
+     * @param {String/Function} url The url for this request or a function to call to get the url
+     * @param {<i>String/Object</i>} params (optional) The parameters to pass as either a url encoded string "param1=1&amp;param2=2" or as an object {param1: 1, param2: 2}
+     * @param {<i>Function</i>} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+     * @param {<i>Boolean</i>} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.
+     */
+    update : function(url, params, callback, discardUrl){
+        if(this.beforeUpdate.fireDirect(this.el, url, params) !== false){
+            this.showLoading();
+            if(!discardUrl){
+                this.defaultUrl = url;
+            }
+            if(typeof url == 'function'){
+                url = url();
+            }
+            if(params && typeof params != 'string'){ // must be object
+                var buf = [];
+                for(var key in params){
+                    if(typeof params[key] != 'function'){
+                        buf.push(encodeURIComponent(key), '=', encodeURIComponent(params[key]), '&');
+                    }
+                }
+                delete buf[buf.length-1];
+                params = buf.join('');
+            }
+            var callback = {
+                success: this.successDelegate,
+                failure: this.failureDelegate,
+                timeout: (this.timeout*1000),
+                argument: {'url': url, 'form': null, 'callback': callback, 'params': params}
+            };
+            var method = params ? 'POST' : 'GET';
+            if(method == 'GET'){
+                url = this.prepareUrl(url);
+            }
+            this.transaction = YAHOO.util.Connect.asyncRequest(method, url, callback, params);
+        }
+    },
+    
+    /**
+     * Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload.
+     * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning. See YUI docs for more info. 
+     * @param {String/HTMLElement} form The form Id or form element
+     * @param {<i>String</i>} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used.
+     * @param {<i>Boolean</i>} reset (optional) Whether to try to reset the form after the update
+     * @param {<i>Function</i>} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+     */
+    formUpdate : function(form, url, reset, callback){
+        if(this.beforeUpdate.fireDirect(this.el, form, url) !== false){
+            this.showLoading();
+            formEl = YAHOO.util.Dom.get(form);
+            if(typeof url == 'function'){
+                url = url();
+            }
+            url = url || formEl.action;
+            var callback = {
+                success: this.successDelegate,
+                failure: this.failureDelegate,
+                timeout: (this.timeout*1000),
+                argument: {'url': url, 'form': form, 'callback': callback, 'reset': reset}
+            };
+            var isUpload = false;
+            var enctype = formEl.getAttribute('enctype');
+            if(enctype && enctype.toLowerCase() == 'multipart/form-data'){
+                isUpload = true;
+            }
+            YAHOO.util.Connect.setForm(form, isUpload, this.sslBlankUrl);
+            this.transaction = YAHOO.util.Connect.asyncRequest('POST', url, callback);
+        }
+    },
+    
+    /**
+     * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
+     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+     */
+    refresh : function(callback){
+        if(this.defaultUrl == null){
+            return;
+        }
+        this.update(this.defaultUrl, null, callback, true);
+    },
+    
+    /**
+     * Set this element to auto refresh.
+     * @param {Number} interval How often to update (in seconds).
+     * @param {<i>String/Function</i>} url (optional) The url for this request or a function to call to get the url (Defaults to the last used url)
+     * @param {<i>String/Object</i>} params (optional) The parameters to pass as either a url encoded string "&param1=1&param2=2" or as an object {param1: 1, param2: 2}
+     * @param {<i>Function</i>} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+     * @param {<i>Boolean</i>} refreshNow (optional) Whether to execute the refresh now, or wait the interval
+     */
+    startAutoRefresh : function(interval, url, params, callback, refreshNow){
+        if(refreshNow){
+            this.update(url || this.defaultUrl, params, callback, true);
+        }
+        if(this.autoRefreshProcId){
+            clearInterval(this.autoRefreshProcId);
+        }
+        this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000);
+    },
+    
+    /**
+     * Stop auto refresh on this element.
+     */
+     stopAutoRefresh : function(){
+        if(this.autoRefreshProcId){
+            clearInterval(this.autoRefreshProcId);
+        }
+    },
+    
+    /**
+     * Called to update the element to "Loading" state. Override to perform custom action.
+     */
+    showLoading : function(){
+        if(this.showLoadIndicator){
+            this.el.update(this.indicatorText);
+        }
+    },
+    
+    /**
+     * Adds unique parameter to query string if disableCaching = true
+     * @private
+     */
+    prepareUrl : function(url){
+        if(this.disableCaching){
+            var append = '_dc=' + (new Date().getTime());
+            if(url.indexOf('?') !== -1){
+                url += '&' + append;
+            }else{
+                url += '?' + append;
+            }
+        }
+        return url;
+    },
+    
+    /**
+     * @private
+     */
+    processSuccess : function(response){
+        this.transaction = null;
+        this.renderer.render(this.el, response, this);
+        if(response.argument.form && response.argument.reset){
+            try{ // put in try/catch since some older FF releases had problems with this
+                response.argument.form.reset();
+            }catch(e){}
+        }
+        this.onUpdate.fireDirect(this.el, response);
+        if(typeof response.argument.callback == 'function'){
+            response.argument.callback(this.el, true);
+        }
+    },
+    
+    /**
+     * @private
+     */
+    processFailure : function(response){
+        this.transaction = null;
+        this.onFailure.fireDirect(this.el, response);
+        if(typeof response.argument.callback == 'function'){
+            response.argument.callback(this.el, false);
+        }
+    },
+    
+    /**
+     * Set the content renderer for this UpdateManager. See {@link YAHOO.ext.UpdateManager.BasicRenderer#render} for more details.
+     * @param {Object} renderer The object implementing the render() method
+     */
+    setRenderer : function(renderer){
+        this.renderer = renderer;
+    },
+    
+    getRenderer : function(){
+       return this.renderer;  
+    },
+    
+    /**
+     * Set the defaultUrl used for updates
+     * @param {String/Function} defaultUrl The url or a function to call to get the url
+     */
+    setDefaultUrl : function(defaultUrl){
+        this.defaultUrl = defaultUrl;
+    },
+    
+    /**
+     * Aborts the executing transaction
+     */
+    abort : function(){
+        if(this.transaction){
+            YAHOO.util.Connect.abort(this.transaction);
+        }
+    },
+    
+    /**
+     * Returns true if an update is in progress
+     */
+    isUpdating : function(){
+        if(this.transaction){
+            return YAHOO.util.Connect.isCallInProgress(this.transaction);
+        }
+        return false;
+    }
+};
+
+/**
+ * Static convenience method, Usage:
+ * YAHOO.ext.UpdateManager.update('my-div', 'stuff.php');
+ * @param {String/HTMLElement/YAHOO.ext.Element} el The element to update
+ * @param {String} url The url
+ * @param {<i>String/Object</i>} params (optional) Url encoded param string or an object of name/value pairs
+ * @param {<i>Object</i>} options (optional) A config object with any of the UpdateManager properties you want to set - for example: {disableCaching:true, indicatorText: 'Loading data...'}
+ */
+YAHOO.ext.UpdateManager.update = function(el, url, params, options){
+    var um = getEl(el, true).getUpdateManager();
+    YAHOO.ext.util.Config.apply(um, options);
+    um.update(url, params, options.callback);
+}
+
+/**
+ * @class
+ * Default Content renderer. Updates the elements innerHTML with the responseText.
+ */ 
+YAHOO.ext.UpdateManager.BasicRenderer = function(){};
+
+YAHOO.ext.UpdateManager.BasicRenderer.prototype = {
+    /**
+     * This is called when the transaction is completed and it's time to update the element - The BasicRenderer 
+     * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing), 
+     * create an object with a "render(el, response)" method and pass it to setRenderer on the UpdateManager.
+     * @param {YAHOO.ext.Element} el The element being rendered
+     * @param {Object} response The YUI Connect response object
+     */
+     render : function(el, response, updateManager){
+        el.update(response.responseText, updateManager.loadScripts);
+    }
+};
+
+/**
+ * The defaults collection enables customizing the default behavior of UpdateManager
+ */
+YAHOO.ext.UpdateManager.defaults = {};
+/**
+ * Timeout for requests or form posts in seconds (Defaults 30 seconds). 
+ * @type Number
+ */
+ YAHOO.ext.UpdateManager.defaults.timeout = 30;
+ /**
+ * True to process scripts by default (Defaults to false). 
+ * @type Number
+ */
+ YAHOO.ext.UpdateManager.defaults.loadScripts = false;
+ 
+/**
+* Blank page URL to use with SSL file uploads (Defaults to 'about:blank'). 
+* @type String
+*/
+YAHOO.ext.UpdateManager.defaults.sslBlankUrl = 'about:blank';
+/**
+ * Whether to append unique parameter on get request to disable caching (Defaults to false). 
+ * @type Boolean
+ */
+YAHOO.ext.UpdateManager.defaults.disableCaching = false;
+/**
+ * Whether to show indicatorText when loading (Defaults to true). 
+ * @type String
+ */
+YAHOO.ext.UpdateManager.defaults.showLoadIndicator = true;
+/**
+ * Text for loading indicator (Defaults to '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;'). 
+ * @type String
+ */
+YAHOO.ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Loading...</div>';
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-XMLDataModel.js.html b/www/extras/yui-ext/docs/overview-summary-XMLDataModel.js.html new file mode 100644 index 000000000..e8db4c0cc --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-XMLDataModel.js.html @@ -0,0 +1,297 @@ + + + + + Overview + + + + + +
+ +

XMLDataModel.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.grid.XMLDataModelThis is an implementation of a DataModel used by the Grid.
+
+ + + + + + + +
+/**
+ * @class
+ * This is an implementation of a DataModel used by the Grid. It works 
+ * with XML data. 
+ * <br>Example schema from Amazon search:
+ * <pre><code>
+ * var schema = {
+ *     tagName: 'Item',
+ *     id: 'ASIN',
+ *     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ * };
+ * </code></pre>
+ * @extends YAHOO.ext.grid.LoadableDataModel
+ * @constructor
+ * @param {Object} schema The schema to use
+ * @param {XMLDocument} xml An XML document to load immediately
+*/
+YAHOO.ext.grid.XMLDataModel = function(schema, xml){
+    YAHOO.ext.grid.XMLDataModel.superclass.constructor.call(this, YAHOO.ext.grid.LoadableDataModel.XML);
+    /**@private*/
+    this.schema = schema;
+    this.xml = xml;
+    if(xml){
+        this.loadData(xml);
+    }
+};
+YAHOO.extendX(YAHOO.ext.grid.XMLDataModel, YAHOO.ext.grid.LoadableDataModel);
+
+YAHOO.ext.grid.XMLDataModel.prototype.getDocument = function(){
+   return this.xml;    
+};
+
+/**
+ * Overrides loadData in LoadableDataModel to process XML
+ * @param {XMLDocument} doc The document to load
+ * @param {<i>Function</i>} callback (optional) callback to call when loading is complete
+ * @param {<i>Boolean</i>} keepExisting (optional) true to keep existing data
+ * @param {<i>Number</i>} insertIndex (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.loadData = function(doc, callback, keepExisting, insertIndex){
+	this.xml = doc;
+	var idField = this.schema.id;
+	var fields = this.schema.fields;
+	if(this.schema.totalTag){
+	    this.totalCount = null;
+	    var totalNode = doc.getElementsByTagName(this.schema.totalTag);
+	    if(totalNode && totalNode.item(0) && totalNode.item(0).firstChild) {
+            var v = parseInt(totalNode.item(0).firstChild.nodeValue, 10);
+            if(!isNaN(v)){
+                this.totalCount = v;
+            }
+    	}
+	}
+	var rowData = [];
+	var nodes = doc.getElementsByTagName(this.schema.tagName);
+    if(nodes && nodes.length > 0) {
+	    for(var i = 0; i < nodes.length; i++) {
+	        var node = nodes.item(i);
+	        var colData = [];
+	        colData.node = node;
+	        colData.id = this.getNamedValue(node, idField, String(i));
+	        for(var j = 0; j < fields.length; j++) {
+	            var val = this.getNamedValue(node, fields[j], "");
+	            if(this.preprocessors[j]){
+	                val = this.preprocessors[j](val);
+	            }
+	            colData.push(val);
+	        }
+	        rowData.push(colData);
+	    }
+    }
+    if(keepExisting !== true){
+       YAHOO.ext.grid.XMLDataModel.superclass.removeAll.call(this);
+	}
+	if(typeof insertIndex != 'number'){
+	    insertIndex = this.getRowCount();
+	}
+    YAHOO.ext.grid.XMLDataModel.superclass.insertRows.call(this, insertIndex, rowData);
+    if(typeof callback == 'function'){
+    	callback(this, true);
+    }
+    this.fireLoadEvent();
+};
+
+/**
+ * Adds a row to this DataModel and syncs the XML document
+ * @param {String} id The id of the row, if null the next row index is used
+ * @param {Array} cellValues The cell values for this row
+ * @return {Number} The index of the new row
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.addRow = function(id, cellValues){
+    var newIndex = this.getRowCount();
+    var node = this.createNode(this.xml, id, cellValues);
+    cellValues.id = id || newIndex;
+    cellValues.node = node;
+    YAHOO.ext.grid.XMLDataModel.superclass.addRow.call(this, cellValues);
+    return newIndex;
+};
+
+/**
+ * Inserts a row into this DataModel and syncs the XML document
+ * @param {Number} index The index to insert the row
+ * @param {String} id The id of the row, if null the next row index is used
+ * @param {Array} cellValues The cell values for this row
+ * @return {Number} The index of the new row
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.insertRow = function(index, id, cellValues){
+    var node = this.createNode(this.xml, id, cellValues);
+    cellValues.id = id || this.getRowCount();
+    cellValues.node = node;
+    YAHOO.ext.grid.XMLDataModel.superclass.insertRow.call(this, index, cellValues);
+    return index;
+};
+
+/**
+ * Removes the row from DataModel and syncs the XML document
+ * @param {Number} index The index of the row to remove
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.removeRow = function(index){
+    var node = this.data[index].node;
+    node.parentNode.removeChild(node);
+    YAHOO.ext.grid.XMLDataModel.superclass.removeRow.call(this, index, index);
+};
+
+YAHOO.ext.grid.XMLDataModel.prototype.getNode = function(rowIndex){
+    return this.data[rowIndex].node;
+};
+
+/**
+ * Override this method to define your own node creation routine for when new rows are added.
+ * By default this method clones the first node and sets the column values in the newly cloned node.
+ * @param {XMLDocument} xmlDoc The xml document being used by this model
+ * @param {Array} colData The column data for the new node
+ * @return {XMLNode} The created node
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.createNode = function(xmlDoc, id, colData){
+    var template = this.data[0].node;
+    var newNode = template.cloneNode(true);
+    var fields = this.schema.fields;
+    for(var i = 0; i < fields.length; i++){
+        var nodeValue = colData[i];
+        if(this.postprocessors[i]){
+            nodeValue = this.postprocessors[i](nodeValue);
+        }
+        this.setNamedValue(newNode, fields[i], nodeValue);
+    }
+    if(id){
+        this.setNamedValue(newNode, this.schema.idField, id);
+    }
+    template.parentNode.appendChild(newNode);
+    return newNode;
+};
+
+/**
+ * Convenience function looks for value in attributes, then in children tags - also 
+ * normalizes namespace matches (ie matches ns:tag, FireFox matches tag and not ns:tag).
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.getNamedValue = function(node, name, defaultValue){
+	if(!node || !name){
+		return defaultValue;
+	}
+	var nodeValue = defaultValue;
+    var attrNode = node.attributes.getNamedItem(name);
+    if(attrNode) {
+    	nodeValue = attrNode.value;
+    } else {
+        var childNode = node.getElementsByTagName(name);
+        if(childNode && childNode.item(0) && childNode.item(0).firstChild) {
+            nodeValue = childNode.item(0).firstChild.nodeValue;
+    	}else{
+    	    // try to strip namespace for FireFox
+    	    var index = name.indexOf(':');
+    	    if(index > 0){
+    	        return this.getNamedValue(node, name.substr(index+1), defaultValue);
+    	    }
+    	}
+    }
+    return nodeValue;
+};
+
+/**
+ * Convenience function set a value in the underlying xml node.
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.setNamedValue = function(node, name, value){
+	if(!node || !name){
+		return;
+	}
+	var attrNode = node.attributes.getNamedItem(name);
+    if(attrNode) {
+    	attrNode.value = value;
+    	return;
+    }
+    var childNode = node.getElementsByTagName(name);
+    if(childNode && childNode.item(0) && childNode.item(0).firstChild) {
+        childNode.item(0).firstChild.nodeValue = value;
+    }else{
+	    // try to strip namespace for FireFox
+	    var index = name.indexOf(':');
+	    if(index > 0){
+	        this.setNamedValue(node, name.substr(index+1), value);
+	    }
+	}
+};
+
+/**
+ * Overrides DefaultDataModel.setValueAt to update the underlying XML Document
+ * @param {Object} value The new value
+ * @param {Number} rowIndex
+ * @param {Number} colIndex
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.setValueAt = function(value, rowIndex, colIndex){
+    var node = this.data[rowIndex].node;
+    if(node){
+        var nodeValue = value;
+        if(this.postprocessors[colIndex]){
+            nodeValue = this.postprocessors[colIndex](value);
+        }
+        this.setNamedValue(node, this.schema.fields[colIndex], nodeValue);
+    }
+    YAHOO.ext.grid.XMLDataModel.superclass.setValueAt.call(this, value, rowIndex, colIndex);
+};
+
+/**
+ * Overrides getRowId in DefaultDataModel to return the ID value of the specified node. 
+ * @param {Number} rowIndex
+ * @return {Number}
+ */
+YAHOO.ext.grid.XMLDataModel.prototype.getRowId = function(rowIndex){
+    return this.data[rowIndex].id;
+};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary-yutil.js.html b/www/extras/yui-ext/docs/overview-summary-yutil.js.html new file mode 100644 index 000000000..37b117346 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary-yutil.js.html @@ -0,0 +1,942 @@ + + + + + Overview + + + + + +
+ +

yutil.js

+ +
+ + + + +

Summary

+

+ + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + Class Summary + +
YAHOO.ext.util.BenchVery simple Benchmark class that supports multiple timers +
YAHOO.ext.util.DelayedTaskProvides a convenient method of performing setTimeout where a new + timeout cancels the old timeout.
YAHOO.ext.util.Observable 
+
+ + + + + + + +
+YAHOO.namespace('ext');
+YAHOO.namespace('ext.util');
+YAHOO.ext.Strict = (document.compatMode == 'CSS1Compat');
+
+/**
+ * Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
+ * Call directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code>
+ * Will create a function that is bound to those 2 args.
+ * @addon
+ * @return {Function} The new function
+*/
+Function.prototype.createCallback = function(/*args...*/){
+    // make args available, in function below
+    var args = arguments;
+    var method = this;
+    return function() {
+        return method.apply(window, args);
+    }
+};
+
+/**
+ * Creates a delegate (callback) that sets the scope to obj.
+ * Call directly on any function. Example: <code>this.myFunction.createDelegate(this)</code>
+ * Will create a function that is automatically scoped to this.
+ * @addon
+ * @param {Object} obj The object for which the scope is set
+ * @param {<i>Array</i>} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)
+ * @param {<i>Boolean</i>} appendArgs (optional) if True args are appended to call args instead of overriding
+ * @return {Function} The new function
+ */
+Function.prototype.createDelegate = function(obj, args, appendArgs){
+    var method = this;
+    return function() {
+        var callargs = args || arguments;
+        if(appendArgs){
+            callargs = Array.prototype.concat.apply(arguments, args);
+        }
+        return method.apply(obj || window, callargs);
+    }
+};
+
+/**
+ * Create a combined function call sequence of the original function + the passed function.
+ * The resulting function returns the results of the original function.
+ * The passed fcn is called with the parameters of the original function
+ * @addon
+ * @param {Function} fcn The function to sequence
+ * @param {<i>Object</i>} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window)
+ * @return {Function} The new function
+ */
+Function.prototype.createSequence = function(fcn, scope){
+    if(typeof fcn != 'function'){
+        return this;
+    }
+    var method = this;
+    return function() {
+        var retval = method.apply(this || window, arguments);
+        fcn.apply(scope || this || window, arguments);
+        return retval;
+    }
+};
+
+/**
+ * Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called.
+ * The resulting function returns the results of the original function.
+ * The passed fcn is called with the parameters of the original function.
+ * @addon
+ * @param {Function} fcn The function to call before the original
+ * @param {<i>Object</i>} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window)
+ * @return {Function} The new function
+ */
+Function.prototype.createInterceptor = function(fcn, scope){
+    if(typeof fcn != 'function'){
+        return this;
+    }
+    var method = this;
+    return function() {
+        fcn.target = this;
+        fcn.method = method;
+        if(fcn.apply(scope || this || window, arguments) === false) 
+            return;
+        return method.apply(this || window, arguments);;
+    }
+};
+
+/**
+ * @class
+ * @constructor
+ */
+YAHOO.ext.util.Browser = new function(){
+	var ua = navigator.userAgent.toLowerCase();
+	/** @type Boolean */
+	this.isOpera = (ua.indexOf('opera') > -1);
+   	/** @type Boolean */
+	this.isSafari = (ua.indexOf('webkit') > -1);
+   	/** @type Boolean */
+	this.isIE = (window.ActiveXObject);
+   	/** @type Boolean */
+	this.isIE7 = (ua.indexOf('msie 7') > -1);
+   	/** @type Boolean */
+	this.isGecko = !this.isSafari && (ua.indexOf('gecko') > -1);
+}();
+
+/**
+ * Enable custom handler signature and event cancelling. Using fireDirect() instead of fire() calls the subscribed event handlers 
+ * with the exact parameters passed to fireDirect, instead of the usual (eventType, args[], obj). IMO this is more intuitive 
+ * and promotes cleaner code. Also, if an event handler returns false, it is returned by fireDirect and no other handlers will be called.<br>
+ * Example:<br><br><pre><code>
+ * if(beforeUpdateEvent.fireDirect(myArg, myArg2) !== false){
+ *     // do update
+ * }</code></pre>
+ * @addon
+ */
+YAHOO.util.CustomEvent.prototype.fireDirect = function(){
+    var len=this.subscribers.length;
+    for (var i=0; i<len; ++i) {
+        var s = this.subscribers[i];
+        if(s){
+            var scope = (s.override) ? s.obj : this.scope;
+            if(s.fn.apply(scope, arguments) === false){
+                return false;
+            }
+        }
+    }
+    return true;
+};
+
+YAHOO.extendX = function(subclass, superclass, overrides){
+    YAHOO.extend(subclass, superclass);
+    subclass.override = function(o){
+        YAHOO.override(subclass, o);
+    };
+    subclass.prototype.override = function(o){
+        for(var method in o){
+            this[method] = o[method];
+        }  
+    };
+    if(overrides){
+        subclass.override(overrides);
+    }
+};
+
+YAHOO.override = function(origclass, overrides){
+    if(overrides){
+        var p = origclass.prototype;
+        for(var method in overrides){
+            p[method] = overrides[method];
+        }
+    }
+};
+
+/**
+ * @class
+ * Very simple Benchmark class that supports multiple timers
+ * @constructor
+ */
+YAHOO.ext.util.Bench = function(){
+   this.timers = {};
+   this.lastKey = null;
+};
+YAHOO.ext.util.Bench.prototype = {
+   start : function(key){
+       this.lastKey = key;
+       this.timers[key] = {};
+       this.timers[key].startTime = new Date().getTime(); 
+   },
+   
+   stop : function(key){
+       key = key || this.lastKey;
+       this.timers[key].endTime = new Date().getTime(); 
+   },
+   
+   getElapsed : function(key){
+       key = key || this.lastKey;
+       return this.timers[key].endTime - this.timers[key].startTime;
+   },
+   
+   toString : function(html){
+       var results = "Results: \n";
+       for(var key in this.timers){
+           if(typeof this.timers[key] != 'function'){
+               results += key + ":\t" + (this.getElapsed(key) / 1000) + " seconds\n";
+           }
+       }
+       if(html){
+           results = results.replace("\n", '<br>');
+       }
+       return results;
+   },
+   
+   show : function(){
+       alert(this.toString());
+   }
+};
+
+/**
+ * @class
+ * Provides a convenient method of performing setTimeout where a new
+ * timeout cancels the old timeout. An example would be performing validation on a keypress.
+ * You can use this class to buffer
+ * the keypress events for a certain number of milliseconds, and perform only if they stop
+ * for that amount of time.
+ * @constructor The parameters to this constructor serve as defaults and are not required.
+ * @param {<i>Function</i>} fn (optional) The default function to timeout
+ * @param {<i>Object</i>} scope (optional) The default scope of that timeout
+ * @param {<i>Array</i>} args (optional) The default Array of arguments
+ */
+YAHOO.ext.util.DelayedTask = function(fn, scope, args){
+    var timeoutId = null;
+    
+    /**
+     * Cancels any pending timeout and queues a new one
+     * @param {Number} delay The milliseconds to delay
+     * @param {Function} newFn Overrides function passed to constructor
+     * @param {Object} newScope Overrides scope passed to constructor
+     * @param {Array} newArgs Overrides args passed to constructor
+     */
+    this.delay = function(delay, newFn, newScope, newArgs){
+        if(timeoutId){
+            clearTimeout(timeoutId);
+        }
+        fn = newFn || fn;
+        scope = newScope || scope;
+        args = newArgs || args;
+        timeoutId = setTimeout(fn.createDelegate(scope, args), delay);
+    };
+    
+    /**
+     * Cancel the last queued timeout
+     */
+    this.cancel = function(){
+        if(timeoutId){
+            clearTimeout(timeoutId);
+            timeoutId = null;
+        }
+    };
+};
+
+YAHOO.ext.util.Observable = function(){};
+YAHOO.ext.util.Observable.prototype = {
+    fireEvent : function(){
+        var ce = this.events[arguments[0].toLowerCase()];
+        ce.fireDirect.apply(ce, Array.prototype.slice.call(arguments, 1));
+    },
+    addListener : function(eventName, fn, scope, override){
+        eventName = eventName.toLowerCase();
+        if(!this.events[eventName]){
+            // added for a better message when subscribing to wrong event
+            throw 'You are trying to listen for an event that does not exist: "' + eventName + '".';
+        }
+        this.events[eventName].subscribe(fn, scope, override);
+    },
+    delayedListener : function(eventName, fn, scope, delay){
+        var newFn = function(){
+            setTimeout(fn.createDelegate(scope, arguments), delay || 1);
+        }
+        this.addListener(eventName, newFn);
+        return newFn;
+    },
+    removeListener : function(eventName, fn, scope){
+        this.events[eventName.toLowerCase()].unsubscribe(fn, scope);
+    }
+};
+YAHOO.ext.util.Observable.prototype.on = YAHOO.ext.util.Observable.prototype.addListener;
+    
+YAHOO.ext.util.Config = {
+    apply : function(obj, config){
+        if(config){
+            for(var prop in config){
+                if(typeof config[prop] != 'function'){
+                    obj[prop] = config[prop];
+                }
+            }
+        }
+    }
+};
+
+/**
+ * @class
+ */
+YAHOO.ext.util.CSS = new function(){
+	var rules = null;
+   	
+   	var toCamel = function(property) {
+      var convert = function(prop) {
+         var test = /(-[a-z])/i.exec(prop);
+         return prop.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase());
+      };
+      while(property.indexOf('-') > -1) {
+         property = convert(property);
+      }
+      return property;
+   };
+   
+   /**
+    * Gets all css rules for the document
+    */
+   this.getRules = function(refreshCache){
+   		if(rules == null || refreshCache){
+   			rules = {};
+   			var ds = document.styleSheets;
+   			for(var i =0, len = ds.length; i < len; i++){
+   			    try{
+    		        var ss = ds[i];
+    		        var ssRules = ss.cssRules || ss.rules;
+    		        for(var j = ssRules.length-1; j >= 0; --j){
+    		        	rules[ssRules[j].selectorText] = ssRules[j];
+    		        }
+   			    }catch(e){} // try catch for cross domain access issue
+	        }
+   		}
+   		return rules;
+   	};
+   	
+   	/**
+    * Searches for a rule by selector
+    */
+   this.getRule = function(selector, refreshCache){
+   		var rs = this.getRules(refreshCache);
+   		if(!(selector instanceof Array)){
+   		    return rs[selector];
+   		}
+   		for(var i = 0; i < selector.length; i++){
+			if(rs[selector[i]]){
+				return rs[selector[i]];
+			}
+		}
+		return null;
+   	};
+   	
+   	
+   	/**
+    * Updates a rule property
+    * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+    */
+   this.updateRule = function(selector, property, value){
+   		if(!(selector instanceof Array)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   				rule.style[property] = value;
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.updateRule(selector[i], property, value)){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	};
+   	
+   	/**
+    * Applies a rule to an element without adding the class
+    * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+    */
+   this.apply = function(el, selector){
+   		if(!(selector instanceof Array)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   			    var s = rule.style;
+   				for(var key in s){
+   				    if(typeof s[key] != 'function'){
+       					if(s[key] && String(s[key]).indexOf(':') < 0 && s[key] != 'false'){
+       						try{el.style[key] = s[key];}catch(e){}
+       					}
+   				    }
+   				}
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.apply(el, selector[i])){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	};
+   	
+   	this.applyFirst = function(el, id, selector){
+   		var selectors = [
+   			'#' + id + ' ' + selector,
+   			selector
+   		];
+   		return this.apply(el, selectors);
+   	};
+   	
+   	this.revert = function(el, selector){
+   		if(!(selector instanceof Array)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   				for(key in rule.style){
+   					if(rule.style[key] && String(rule.style[key]).indexOf(':') < 0 && rule.style[key] != 'false'){
+   						try{el.style[key] = '';}catch(e){}
+   					}
+   				}
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.revert(el, selector[i])){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	};
+   	
+   	this.revertFirst = function(el, id, selector){
+   		var selectors = [
+   			'#' + id + ' ' + selector,
+   			selector
+   		];
+   		return this.revert(el, selectors);
+   	};
+}();
+
+
+/*
+ * All the Date functions below are the excellent work of Baron Schwartz
+ */
+
+/** @ignore */
+Date.parseFunctions = {count:0};
+/** @ignore */
+Date.parseRegexes = [];
+/** @ignore */
+Date.formatFunctions = {count:0};
+
+/**
+ * Formats a date given to the supplied format - the format syntax is the same as <a href="http://www.php.net/date">PHP's date() function</a>.
+ */
+Date.prototype.dateFormat = function(format) {
+    if (Date.formatFunctions[format] == null) {
+        Date.createNewFormat(format);
+    }
+    var func = Date.formatFunctions[format];
+    return this[func]();
+};
+
+/**
+ * Same as {@link #dateFormat}
+ */
+Date.prototype.format = Date.prototype.dateFormat;
+
+/** @ignore */
+Date.createNewFormat = function(format) {
+    var funcName = "format" + Date.formatFunctions.count++;
+    Date.formatFunctions[format] = funcName;
+    var code = "Date.prototype." + funcName + " = function(){return ";
+    var special = false;
+    var ch = '';
+    for (var i = 0; i < format.length; ++i) {
+        ch = format.charAt(i);
+        if (!special && ch == "\\") {
+            special = true;
+        }
+        else if (special) {
+            special = false;
+            code += "'" + String.escape(ch) + "' + ";
+        }
+        else {
+            code += Date.getFormatCode(ch);
+        }
+    }
+    eval(code.substring(0, code.length - 3) + ";}");
+};
+
+/** @ignore */
+Date.getFormatCode = function(character) {
+    switch (character) {
+    case "d":
+        return "String.leftPad(this.getDate(), 2, '0') + ";
+    case "D":
+        return "Date.dayNames[this.getDay()].substring(0, 3) + ";
+    case "j":
+        return "this.getDate() + ";
+    case "l":
+        return "Date.dayNames[this.getDay()] + ";
+    case "S":
+        return "this.getSuffix() + ";
+    case "w":
+        return "this.getDay() + ";
+    case "z":
+        return "this.getDayOfYear() + ";
+    case "W":
+        return "this.getWeekOfYear() + ";
+    case "F":
+        return "Date.monthNames[this.getMonth()] + ";
+    case "m":
+        return "String.leftPad(this.getMonth() + 1, 2, '0') + ";
+    case "M":
+        return "Date.monthNames[this.getMonth()].substring(0, 3) + ";
+    case "n":
+        return "(this.getMonth() + 1) + ";
+    case "t":
+        return "this.getDaysInMonth() + ";
+    case "L":
+        return "(this.isLeapYear() ? 1 : 0) + ";
+    case "Y":
+        return "this.getFullYear() + ";
+    case "y":
+        return "('' + this.getFullYear()).substring(2, 4) + ";
+    case "a":
+        return "(this.getHours() < 12 ? 'am' : 'pm') + ";
+    case "A":
+        return "(this.getHours() < 12 ? 'AM' : 'PM') + ";
+    case "g":
+        return "((this.getHours() %12) ? this.getHours() % 12 : 12) + ";
+    case "G":
+        return "this.getHours() + ";
+    case "h":
+        return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";
+    case "H":
+        return "String.leftPad(this.getHours(), 2, '0') + ";
+    case "i":
+        return "String.leftPad(this.getMinutes(), 2, '0') + ";
+    case "s":
+        return "String.leftPad(this.getSeconds(), 2, '0') + ";
+    case "O":
+        return "this.getGMTOffset() + ";
+    case "T":
+        return "this.getTimezone() + ";
+    case "Z":
+        return "(this.getTimezoneOffset() * -60) + ";
+    default:
+        return "'" + String.escape(character) + "' + ";
+    };
+};
+
+/**
+ * Parses a date given the supplied format - the format syntax is the same as <a href="http://www.php.net/date">PHP's date() function</a>.
+ */
+Date.parseDate = function(input, format) {
+    if (Date.parseFunctions[format] == null) {
+        Date.createParser(format);
+    }
+    var func = Date.parseFunctions[format];
+    return Date[func](input);
+};
+
+/** @ignore */
+Date.createParser = function(format) {
+    var funcName = "parse" + Date.parseFunctions.count++;
+    var regexNum = Date.parseRegexes.length;
+    var currentGroup = 1;
+    Date.parseFunctions[format] = funcName;
+
+    var code = "Date." + funcName + " = function(input){\n"
+        + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\n"
+        + "var d = new Date();\n"
+        + "y = d.getFullYear();\n"
+        + "m = d.getMonth();\n"
+        + "d = d.getDate();\n"
+        + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n"
+        + "if (results && results.length > 0) {"
+    var regex = "";
+
+    var special = false;
+    var ch = '';
+    for (var i = 0; i < format.length; ++i) {
+        ch = format.charAt(i);
+        if (!special && ch == "\\") {
+            special = true;
+        }
+        else if (special) {
+            special = false;
+            regex += String.escape(ch);
+        }
+        else {
+            obj = Date.formatCodeToRegex(ch, currentGroup);
+            currentGroup += obj.g;
+            regex += obj.s;
+            if (obj.g && obj.c) {
+                code += obj.c;
+            }
+        }
+    }
+
+    code += "if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"
+        + "{return new Date(y, m, d, h, i, s);}\n"
+        + "else if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"
+        + "{return new Date(y, m, d, h, i);}\n"
+        + "else if (y > 0 && m >= 0 && d > 0 && h >= 0)\n"
+        + "{return new Date(y, m, d, h);}\n"
+        + "else if (y > 0 && m >= 0 && d > 0)\n"
+        + "{return new Date(y, m, d);}\n"
+        + "else if (y > 0 && m >= 0)\n"
+        + "{return new Date(y, m);}\n"
+        + "else if (y > 0)\n"
+        + "{return new Date(y);}\n"
+        + "}return null;}";
+
+    Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$");
+    eval(code);
+};
+
+/** @ignore */
+Date.formatCodeToRegex = function(character, currentGroup) {
+    switch (character) {
+    case "D":
+        return {g:0,
+        c:null,
+        s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};
+    case "j":
+    case "d":
+        return {g:1,
+            c:"d = parseInt(results[" + currentGroup + "], 10);\n",
+            s:"(\\d{1,2})"};
+    case "l":
+        return {g:0,
+            c:null,
+            s:"(?:" + Date.dayNames.join("|") + ")"};
+    case "S":
+        return {g:0,
+            c:null,
+            s:"(?:st|nd|rd|th)"};
+    case "w":
+        return {g:0,
+            c:null,
+            s:"\\d"};
+    case "z":
+        return {g:0,
+            c:null,
+            s:"(?:\\d{1,3})"};
+    case "W":
+        return {g:0,
+            c:null,
+            s:"(?:\\d{2})"};
+    case "F":
+        return {g:1,
+            c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "].substring(0, 3)], 10);\n",
+            s:"(" + Date.monthNames.join("|") + ")"};
+    case "M":
+        return {g:1,
+            c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "]], 10);\n",
+            s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};
+    case "n":
+    case "m":
+        return {g:1,
+            c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n",
+            s:"(\\d{1,2})"};
+    case "t":
+        return {g:0,
+            c:null,
+            s:"\\d{1,2}"};
+    case "L":
+        return {g:0,
+            c:null,
+            s:"(?:1|0)"};
+    case "Y":
+        return {g:1,
+            c:"y = parseInt(results[" + currentGroup + "], 10);\n",
+            s:"(\\d{4})"};
+    case "y":
+        return {g:1,
+            c:"var ty = parseInt(results[" + currentGroup + "], 10);\n"
+                + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",
+            s:"(\\d{1,2})"};
+    case "a":
+        return {g:1,
+            c:"if (results[" + currentGroup + "] == 'am') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(am|pm)"};
+    case "A":
+        return {g:1,
+            c:"if (results[" + currentGroup + "] == 'AM') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(AM|PM)"};
+    case "g":
+    case "G":
+    case "h":
+    case "H":
+        return {g:1,
+            c:"h = parseInt(results[" + currentGroup + "], 10);\n",
+            s:"(\\d{1,2})"};
+    case "i":
+        return {g:1,
+            c:"i = parseInt(results[" + currentGroup + "], 10);\n",
+            s:"(\\d{2})"};
+    case "s":
+        return {g:1,
+            c:"s = parseInt(results[" + currentGroup + "], 10);\n",
+            s:"(\\d{2})"};
+    case "O":
+        return {g:0,
+            c:null,
+            s:"[+-]\\d{4}"};
+    case "T":
+        return {g:0,
+            c:null,
+            s:"[A-Z]{3}"};
+    case "Z":
+        return {g:0,
+            c:null,
+            s:"[+-]\\d{1,5}"};
+    default:
+        return {g:0,
+            c:null,
+            s:String.escape(character)};
+    }
+};
+
+Date.prototype.getTimezone = function() {
+    return this.toString().replace(
+        /^.*? ([A-Z]{3}) [0-9]{4}.*$/, "$1").replace(
+        /^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3");
+};
+
+Date.prototype.getGMTOffset = function() {
+    return (this.getTimezoneOffset() > 0 ? "-" : "+")
+        + String.leftPad(Math.floor(this.getTimezoneOffset() / 60), 2, "0")
+        + String.leftPad(this.getTimezoneOffset() % 60, 2, "0");
+};
+
+Date.prototype.getDayOfYear = function() {
+    var num = 0;
+    Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+    for (var i = 0; i < this.getMonth(); ++i) {
+        num += Date.daysInMonth[i];
+    }
+    return num + this.getDate() - 1;
+};
+
+Date.prototype.getWeekOfYear = function() {
+    // Skip to Thursday of this week
+    var now = this.getDayOfYear() + (4 - this.getDay());
+    // Find the first Thursday of the year
+    var jan1 = new Date(this.getFullYear(), 0, 1);
+    var then = (7 - jan1.getDay() + 4);
+    document.write(then);
+    return String.leftPad(((now - then) / 7) + 1, 2, "0");
+};
+
+Date.prototype.isLeapYear = function() {
+    var year = this.getFullYear();
+    return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
+};
+
+Date.prototype.getFirstDayOfMonth = function() {
+    var day = (this.getDay() - (this.getDate() - 1)) % 7;
+    return (day < 0) ? (day + 7) : day;
+};
+
+Date.prototype.getLastDayOfMonth = function() {
+    var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
+    return (day < 0) ? (day + 7) : day;
+};
+
+Date.prototype.getDaysInMonth = function() {
+    Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+    return Date.daysInMonth[this.getMonth()];
+};
+
+/** @ignore */
+Date.prototype.getSuffix = function() {
+    switch (this.getDate()) {
+        case 1:
+        case 21:
+        case 31:
+            return "st";
+        case 2:
+        case 22:
+            return "nd";
+        case 3:
+        case 23:
+            return "rd";
+        default:
+            return "th";
+    }
+};
+
+if(!String.escape){
+    /** @ignore */
+    String.escape = function(string) {
+        return string.replace(/('|\\)/g, "\\$1");
+    };
+};
+
+/**
+ * Left pads a string to size with ch
+ */
+String.leftPad = function (val, size, ch) {
+    var result = new String(val);
+    if (ch == null) {
+        ch = " ";
+    }
+    while (result.length < size) {
+        result = ch + result;
+    }
+    return result;
+};
+
+if(!Object.dump){
+Object.dump = function(o){
+    var s = "\n{";
+    for(var k in o){
+        if(typeof o[k] != 'function'){
+            s += "\n\t" + k + ': ' + o[k] +','; 
+        }
+    }
+    if(s.length > 3){
+      s = s.substring(0, s.length-1);
+    }
+    s += "\n}";
+    return s;
+}
+}
+
+/** @ignore */
+Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31];
+
+/**
+ * Override these values for international dates, for example...
+ * Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...];
+ */
+Date.monthNames =
+   ["January",
+    "February",
+    "March",
+    "April",
+    "May",
+    "June",
+    "July",
+    "August",
+    "September",
+    "October",
+    "November",
+    "December"];
+    
+/**
+ * Override these values for international dates, for example...
+ * Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...];
+ */
+Date.dayNames =
+   ["Sunday",
+    "Monday",
+    "Tuesday",
+    "Wednesday",
+    "Thursday",
+    "Friday",
+    "Saturday"];
+
+/** @ignore */
+Date.y2kYear = 50;
+
+/** @ignore */
+Date.monthNumbers = {
+    Jan:0,
+    Feb:1,
+    Mar:2,
+    Apr:3,
+    May:4,
+    Jun:5,
+    Jul:6,
+    Aug:7,
+    Sep:8,
+    Oct:9,
+    Nov:10,
+    Dec:11};
+
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-summary.html b/www/extras/yui-ext/docs/overview-summary.html new file mode 100644 index 000000000..be5f914c5 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-summary.html @@ -0,0 +1,221 @@ + + + + + Overview + + + + + +
+ +

JSDoc Documentation

+ +
+ + +

Summary

+

+ + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + File Summary + +
AbstractColumnModel.js 
AbstractDataModel.js 
Actor.js 
Animator.js 
CellEditor.js 
CheckboxEditor.js 
DateEditor.js 
DatePicker.js 
DefaultColumnModel.js 
DefaultDataModel.js 
DomHelper.js 
EditorGrid.js 
EditorSelectionModel.js 
Element.js 
EventManager.js 
Grid.js 
GridDD.js 
GridView.js 
JSONDataModel.js 
LoadableDataModel.js 
NumberEditor.js 
PagedGridView.js 
Resizable.js 
SelectEditor.js 
SelectionModel.js 
SplitBar.js 
State.js 
TabPanel.js 
TextEditor.js 
Toolbar.js 
UpdateManager.js 
XMLDataModel.js 
yutil.js 
+
+ + + + + + + + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-tree.html b/www/extras/yui-ext/docs/overview-tree.html new file mode 100644 index 000000000..c4fa54c16 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-tree.html @@ -0,0 +1,352 @@ + + + + + + Class Hierarchy + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+

Class Hierarchy

+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+ + + +
Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006
+ + diff --git a/www/extras/yui-ext/docs/overview-yutil.js.html b/www/extras/yui-ext/docs/overview-yutil.js.html new file mode 100644 index 000000000..1d501ade1 --- /dev/null +++ b/www/extras/yui-ext/docs/overview-yutil.js.html @@ -0,0 +1,38 @@ + + + + + + yutil.js + + + + + + + + + + + diff --git a/www/extras/yui-ext/docs/stylesheet.css b/www/extras/yui-ext/docs/stylesheet.css new file mode 100644 index 000000000..1320827b3 --- /dev/null +++ b/www/extras/yui-ext/docs/stylesheet.css @@ -0,0 +1,141 @@ +/* JSDoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body {background-color: #FFFFFF; font-family:Helvetica, Arial, san-serif; font-size: 9pt;padding:0px;margin:0px;} +#docs{ + width:100%; + height:100%; +} +#dsplit{ + z-index: 10001; +} +#dnav{ + width:240px; + float:left; + background-color:white; +} +#dnav-inner{ + width:100%; + padding-top:4px; +} +#dnav a{ + display:block; + padding:2px; + font-size:8pt; + color:black; + padding-left:6px; +} +#dnav a:hover{ + background:#c3daf9; + text-decoration:none; +} +#dnav .hd{ + background: #e1eeff; + border-bottom: 1px solid #81aae2; + border-top: 1px solid white; + color: #083772; + font: bold 8pt arial; + padding:3px; +} +#dsplit{ + width:4px; + float:left; + height:100%; + background-color:#c3daf9; +} +#dbody{ + float:right; + height:100%; +} + +tr.over{ + background:#e1eeff; + cursor:pointer; +} + +.loading-indicator { + font-size:8pt; + background-image: url('../images/wait.gif'); + background-repeat: no-repeat; + background-position: left; + padding-left:20px; +} + +table { + border:1px solid #c3daf9; +} +hr { + color:#eeeeee; +} +i { + color:#444444; +} +a{ + text-decoration:none; +} +a:hover{ + text-decoration:underline; +} +table td { + font-family:Helvetica, Arial, san-serif; + font-size: 12px; + border:none; + border-right:1px solid #dddddd; + border-bottom:1px solid #dddddd; + border-collapse: collapse; + padding:5px; +} +h2 { + font-size:16px; + font-family:tahoma; +} +h3 { + font-size:14px; + font-family:tahoma; +} +dt { + font-size:14px; + font-family:tahoma; +} +/* Table colors */ +.TableHeadingColor { background: #c3daf9;} /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF;} /* Light mauve */ +.TableRowColor { background: #FFFFFF } /* White */ + +.title-cell { + font-size:10pt;font-weight:bold; + border-top:1px solid white; + border-left:1px solid white; + border-bottom:1px solid #c3daf9; + background:#e1eeff; + color:#083772; +} +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 10pt; } +.FrameHeadingFont { font-size: 10pt; } +.FrameItemFont { font-size: 10pt; } + +/* Example of smaller, sans-serif font in frames */ +/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ +.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} + +.jsdoc_ctime { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; + text-align: right } + +/* Sourcecode view */ +.sourceview { background: #f1f1f1 } +.attrib { color: gray } +.comment { color: #008000 } +.reserved { color: #0000ff } +.literal { color: #a31515 } + diff --git a/www/extras/yui-ext/editor-grid-lib.js b/www/extras/yui-ext/editor-grid-lib.js new file mode 100644 index 000000000..aced27fb5 --- /dev/null +++ b/www/extras/yui-ext/editor-grid-lib.js @@ -0,0 +1,255 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.namespace('ext.grid');YAHOO.ext.grid.Grid=function(container,dataModel,colModel,selectionModel){this.container=YAHOO.ext.Element.get(container);if(this.container.getStyle('position')!='absolute'){this.container.setStyle('position','relative');} +this.id=this.container.id;this.rows=[];this.rowCount=0;this.fieldId=null;this.dataModel=dataModel;this.colModel=colModel;this.selModel=selectionModel;this.activeEditor=null;this.editingCell=null;this.minColumnWidth=25;this.autoSizeColumns=false;this.autoSizeHeaders=false;this.monitorWindowResize=true;this.maxRowsToMeasure=0;this.trackMouseOver=false;this.enableDragDrop=false;this.stripeRows=true;this.allowTextSelectionPattern=/INPUT|TEXTAREA|SELECT/i;this.setValueDelegate=this.setCellValue.createDelegate(this);var CE=YAHOO.util.CustomEvent;this.events={'click':new CE('click'),'dblclick':new CE('dblclick'),'mousedown':new CE('mousedown'),'mouseup':new CE('mouseup'),'mouseover':new CE('mouseover'),'mouseout':new CE('mouseout'),'keypress':new CE('keypress'),'keydown':new CE('keydown'),'cellclick':new CE('cellclick'),'celldblclick':new CE('celldblclick'),'rowclick':new CE('rowclick'),'rowdblclick':new CE('rowdblclick'),'headerclick':new CE('headerclick'),'rowcontextmenu':new CE('rowcontextmenu'),'headercontextmenu':new CE('headercontextmenu'),'beforeedit':new CE('beforeedit'),'afteredit':new CE('afteredit'),'bodyscroll':new CE('bodyscroll'),'columnresize':new CE('columnresize'),'startdrag':new CE('startdrag'),'enddrag':new CE('enddrag'),'dragdrop':new CE('dragdrop'),'dragover':new CE('dragover'),'dragenter':new CE('dragenter'),'dragout':new CE('dragout')};};YAHOO.ext.grid.Grid.prototype={render:function(){if(!this.view){if(this.dataModel.isPaged()){this.view=new YAHOO.ext.grid.PagedGridView();}else{this.view=new YAHOO.ext.grid.GridView();}} +this.view.init(this);this.el=getEl(this.view.render(),true);var c=this.container;c.mon("click",this.onClick,this,true);c.mon("dblclick",this.onDblClick,this,true);c.mon("contextmenu",this.onContextMenu,this,true);c.mon("selectstart",this.cancelTextSelection,this,true);c.mon("mousedown",this.cancelTextSelection,this,true);c.mon("mousedown",this.onMouseDown,this,true);c.mon("mouseup",this.onMouseUp,this,true);if(this.trackMouseOver){this.el.mon("mouseover",this.onMouseOver,this,true);this.el.mon("mouseout",this.onMouseOut,this,true);} +c.mon("keypress",this.onKeyPress,this,true);c.mon("keydown",this.onKeyDown,this,true);this.init();},init:function(){this.rows=this.el.dom.rows;if(!this.disableSelection){if(!this.selModel){this.selModel=new YAHOO.ext.grid.DefaultSelectionModel(this);} +this.selModel.init(this);this.selModel.onSelectionChange.subscribe(this.updateField,this,true);}else{this.selModel=new YAHOO.ext.grid.DisableSelectionModel(this);this.selModel.init(this);} +if(this.enableDragDrop){this.dd=new YAHOO.ext.grid.GridDD(this,this.container.dom);}},onMouseDown:function(e){this.fireEvent('mousedown',e);},onMouseUp:function(e){this.fireEvent('mouseup',e);},onMouseOver:function(e){this.fireEvent('mouseover',e);},onMouseOut:function(e){this.fireEvent('mouseout',e);},onKeyPress:function(e){this.fireEvent('keypress',e);},onKeyDown:function(e){this.fireEvent('keydown',e);},fireEvent:function(){var ce=this.events[arguments[0].toLowerCase()];ce.fireDirect.apply(ce,Array.prototype.slice.call(arguments,1));},addListener:function(eventName,fn,scope,override){this.events[eventName.toLowerCase()].subscribe(fn,scope,override);},on:function(eventName,fn,scope,override){this.events[eventName.toLowerCase()].subscribe(fn,scope,override);},removeListener:function(eventName,fn,scope){this.events[eventName.toLowerCase()].unsubscribe(fn,scope);},onClick:function(e){this.fireEvent('click',e);var target=e.getTarget();var row=this.getRowFromChild(target);var cell=this.getCellFromChild(target);var header=this.getHeaderFromChild(target);if(row){this.fireEvent('rowclick',this,row.rowIndex,e);} +if(cell){this.fireEvent('cellclick',this,row.rowIndex,cell.columnIndex,e);} +if(header){this.fireEvent('headerclick',this,header.columnIndex,e);}},onContextMenu:function(e){var target=e.getTarget();var row=this.getRowFromChild(target);var header=this.getHeaderFromChild(target);if(row){this.fireEvent('rowcontextmenu',this,row.rowIndex,e);} +if(header){this.fireEvent('headercontextmenu',this,header.columnIndex,e);} +e.preventDefault();},onDblClick:function(e){this.fireEvent('dblclick',e);var target=e.getTarget();var row=this.getRowFromChild(target);var cell=this.getCellFromChild(target);if(row){this.fireEvent('rowdblclick',this,row.rowIndex,e);} +if(cell){this.fireEvent('celldblclick',this,row.rowIndex,cell.columnIndex,e);}},startEditing:function(rowIndex,colIndex){var row=this.rows[rowIndex];var cell=row.childNodes[colIndex];this.stopEditing();setTimeout(this.doEdit.createDelegate(this,[row,cell]),10);},stopEditing:function(){if(this.activeEditor){this.activeEditor.stopEditing();}},doEdit:function(row,cell){if(!row||!cell)return;var cm=this.colModel;var dm=this.dataModel;var colIndex=cell.columnIndex;var rowIndex=row.rowIndex;if(cm.isCellEditable(colIndex,rowIndex)){var ed=cm.getCellEditor(colIndex,rowIndex);if(ed){if(this.activeEditor){this.activeEditor.stopEditing();} +this.fireEvent('beforeedit',this,rowIndex,colIndex);this.activeEditor=ed;this.editingCell=cell;this.view.ensureVisible(row,true);try{cell.focus();}catch(e){} +ed.init(this,this.el.dom.parentNode,this.setValueDelegate);var value=dm.getValueAt(rowIndex,cm.getDataIndex(colIndex));setTimeout(ed.startEditing.createDelegate(ed,[value,row,cell]),1);}}},setCellValue:function(value,rowIndex,colIndex){this.dataModel.setValueAt(value,rowIndex,this.colModel.getDataIndex(colIndex));this.fireEvent('afteredit',this,rowIndex,colIndex);},cancelTextSelection:function(e){var target=e.getTarget();if(target&&target!=this.el.dom.parentNode&&!this.allowTextSelectionPattern.test(target.tagName)){e.preventDefault();}},autoSize:function(){this.view.updateWrapHeight();this.view.adjustForScroll();},scrollTo:function(row){if(typeof row=='number'){row=this.rows[row];} +this.view.ensureVisible(row,true);},getEditingCell:function(){return this.editingCell;},bindToField:function(fieldId){this.fieldId=fieldId;this.readField();},updateField:function(){if(this.fieldId){var field=YAHOO.util.Dom.get(this.fieldId);field.value=this.getSelectedRowIds().join(',');}},readField:function(){if(this.fieldId){var field=YAHOO.util.Dom.get(this.fieldId);var values=field.value.split(',');var rows=this.getRowsById(values);this.selModel.selectRows(rows,false);}},getRow:function(index){return this.rows[index];},getRowsById:function(id){var dm=this.dataModel;if(!(id instanceof Array)){for(var i=0;ithis.resizingEl.getX()?YAHOO.ext.SplitBar.LEFT:YAHOO.ext.SplitBar.RIGHT);this.el.setStyle('cursor','e-resize');}else{this.placement=placement||(this.el.getY()>this.resizingEl.getY()?YAHOO.ext.SplitBar.TOP:YAHOO.ext.SplitBar.BOTTOM);this.el.setStyle('cursor','n-resize');} +this.events={'resize':this.onMoved,'moved':this.onMoved}} +YAHOO.ext.SplitBar.prototype={fireEvent:YAHOO.ext.util.Observable.prototype.fireEvent,addListener:YAHOO.ext.util.Observable.prototype.addListener,delayedListener:YAHOO.ext.util.Observable.prototype.delayedListener,removeListener:YAHOO.ext.util.Observable.prototype.removeListener,onStartProxyDrag:function(x,y){if(this.useShim){if(!this.shim){this.shim=YAHOO.ext.SplitBar.createShim();} +this.shim.setVisible(true);} +YAHOO.util.Dom.setStyle(this.proxy,'display','block');var size=this.adapter.getElementSize(this);var c1=size-this.minSize;var c2=Math.max(this.maxSize-size,0);if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==YAHOO.ext.SplitBar.LEFT?c1:c2,this.placement==YAHOO.ext.SplitBar.LEFT?c2:c1);this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==YAHOO.ext.SplitBar.TOP?c1:c2,this.placement==YAHOO.ext.SplitBar.TOP?c2:c1);} +this.dragSpecs.startSize=size;this.dragSpecs.startPoint=[x,y];YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd,x,y);},onEndProxyDrag:function(e){YAHOO.util.Dom.setStyle(this.proxy,'display','none');var endPoint=YAHOO.util.Event.getXY(e);if(this.useShim){this.shim.setVisible(false);} +var newSize;if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.LEFT?endPoint[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-endPoint[0]);}else{newSize=this.dragSpecs.startSize+ +(this.placement==YAHOO.ext.SplitBar.TOP?endPoint[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-endPoint[1]);} +newSize=Math.min(Math.max(newSize,this.minSize),this.maxSize);if(newSize!=this.dragSpecs.startSize){this.adapter.setElementSize(this,newSize);this.onMoved.fireDirect(this,newSize);}},getAdapter:function(){return this.adapter;},setAdapter:function(adapter){this.adapter=adapter;this.adapter.init(this);},getMinimumSize:function(){return this.minSize;},setMinimumSize:function(minSize){this.minSize=minSize;},getMaximumSize:function(){return this.maxSize;},setMaximumSize:function(maxSize){this.maxSize=maxSize;},setCurrentSize:function(size){var oldAnimate=this.animate;this.animate=false;this.adapter.setElementSize(this,size);this.animate=oldAnimate;}};YAHOO.ext.SplitBar.createShim=function(){var shim=document.createElement('div');YAHOO.util.Dom.generateId(shim,'split-shim');YAHOO.util.Dom.setStyle(shim,'width','100%');YAHOO.util.Dom.setStyle(shim,'height','100%');YAHOO.util.Dom.setStyle(shim,'position','absolute');YAHOO.util.Dom.setStyle(shim,'background','white');YAHOO.util.Dom.setStyle(shim,'visibility','hidden');YAHOO.util.Dom.setStyle(shim,'z-index',2);window.document.body.appendChild(shim);var shimEl=YAHOO.ext.Element.get(shim);shimEl.setOpacity(.01);shimEl.setXY([0,0]);return shimEl;} +YAHOO.ext.SplitBar.createProxy=function(orientation){var proxy=document.createElement('div');YAHOO.util.Dom.generateId(proxy,'split-proxy');YAHOO.util.Dom.setStyle(proxy,'position','absolute');YAHOO.util.Dom.setStyle(proxy,'visibility','hidden');YAHOO.util.Dom.setStyle(proxy,'z-index',999);YAHOO.util.Dom.setStyle(proxy,'background-color',"#aaa");if(orientation==YAHOO.ext.SplitBar.HORIZONTAL){YAHOO.util.Dom.setStyle(proxy,'cursor','e-resize');}else{YAHOO.util.Dom.setStyle(proxy,'cursor','n-resize');} +YAHOO.util.Dom.setStyle(proxy,'line-height','0px');YAHOO.util.Dom.setStyle(proxy,'font-size','0px');window.document.body.appendChild(proxy);return proxy;} +YAHOO.ext.SplitBar.BasicLayoutAdapter=function(){} +YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype={init:function(s){},getElementSize:function(s){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){return s.resizingEl.getWidth();}else{return s.resizingEl.getHeight();}},setElementSize:function(s,newSize,onComplete){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setWidth(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setWidth(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}else{if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setHeight(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setHeight(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}}};YAHOO.ext.SplitBar.AbsoluteLayoutAdapter=function(container){this.basic=new YAHOO.ext.SplitBar.BasicLayoutAdapter();this.container=getEl(container);} +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(s){this.basic.init(s);},getElementSize:function(s){return this.basic.getElementSize(s);},setElementSize:function(s,newSize,onComplete){this.basic.setElementSize(s,newSize,this.moveSplitter.createDelegate(this,[s]));},moveSplitter:function(s){var yes=YAHOO.ext.SplitBar;switch(s.placement){case yes.LEFT:s.el.setX(s.resizingEl.getRight());break;case yes.RIGHT:s.el.setStyle('right',(this.container.getWidth()-s.resizingEl.getLeft())+'px');break;case yes.TOP:s.el.setY(s.resizingEl.getBottom());break;case yes.BOTTOM:s.el.setY(s.resizingEl.getTop()-s.el.getHeight());break;}}};YAHOO.ext.SplitBar.VERTICAL=1;YAHOO.ext.SplitBar.HORIZONTAL=2;YAHOO.ext.SplitBar.LEFT=1;YAHOO.ext.SplitBar.RIGHT=2;YAHOO.ext.SplitBar.TOP=3;YAHOO.ext.SplitBar.BOTTOM=4; + +YAHOO.ext.grid.GridView=function(){this.grid=null;this.lastFocusedRow=null;this.onScroll=new YAHOO.util.CustomEvent('onscroll');this.adjustScrollTask=new YAHOO.ext.util.DelayedTask(this._adjustForScroll,this);this.ensureVisibleTask=new YAHOO.ext.util.DelayedTask();};YAHOO.ext.grid.GridView.prototype={init:function(grid){this.grid=grid;},fireScroll:function(scrollLeft,scrollTop){this.onScroll.fireDirect(this.grid,scrollLeft,scrollTop);},getColumnRenderers:function(){var renderers=[];var cm=this.grid.colModel;var colCount=cm.getColumnCount();for(var i=0;i=pos&&x=this.grid.dataModel.getRowCount()){return null;} +return[colIndex,rowIndex];} +return null;},_adjustForScroll:function(){this.forceScrollUpdate();if(this.scrollbarMode==YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP){var adjustment=0;if(this.wrap.clientWidth&&this.wrap.clientWidth!=0){adjustment=this.wrap.offsetWidth-this.wrap.clientWidth;} +this.hwrap.setWidth(this.wrap.offsetWidth-adjustment);}else{this.hwrap.setWidth(this.wrap.offsetWidth);} +this.bwrap.setWidth(Math.max(this.grid.colModel.getTotalWidth(),this.wrap.clientWidth));},focusRow:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;try{row.childNodes.item(0).hideFocus=true;row.childNodes.item(0).focus();}catch(e){} +this.ensureVisible(row);this.wrap.scrollLeft=left;this.handleScroll();this.lastFocusedRow=row;},ensureVisible:function(row,disableDelay){if(!disableDelay){this.ensureVisibleTask.delay(50,this._ensureVisible,this,[row]);}else{this._ensureVisible(row);}},_ensureVisible:function(row){if(typeof row=='number'){row=this.getBodyTable().childNodes[row];} +if(!row)return;var left=this.wrap.scrollLeft;var rowTop=parseInt(row.offsetTop,10);var rowBottom=rowTop+row.offsetHeight;var clientTop=parseInt(this.wrap.scrollTop,10);var clientBottom=clientTop+this.wrap.clientHeight;if(rowTopclientBottom){this.wrap.scrollTop=rowBottom-this.wrap.clientHeight;} +this.wrap.scrollLeft=left;this.handleScroll();},updateColumns:function(){this.grid.stopEditing();var colModel=this.grid.colModel;var hcols=this.headers;var colCount=colModel.getColumnCount();var pos=0;var totalWidth=colModel.getTotalWidth();for(var i=0;i'+'{1}'+''+''}]});htemplate.compile();for(var i=0;i0){this.removeRows(0,count-1);}};YAHOO.ext.grid.DefaultDataModel.prototype.query=function(spec,returnUnmatched){var d=this.data;var r=[];for(var i=0;iv2) +return dsc?+1:-1;return 0;};this.data.sort(fn);if(!suppressEvent){this.fireRowsSorted(columnIndex,direction);}}; + +YAHOO.ext.grid.LoadableDataModel=function(dataType){YAHOO.ext.grid.LoadableDataModel.superclass.constructor.call(this,[]);this.onLoad=new YAHOO.util.CustomEvent('load');this.onLoadException=new YAHOO.util.CustomEvent('loadException');this.events['load']=this.onLoad;this.events['beforeload']=new YAHOO.util.CustomEvent('beforeload');this.events['loadexception']=this.onLoadException;this.dataType=dataType;this.preprocessors=[];this.postprocessors=[];this.loadedPage=1;this.remoteSort=false;this.pageSize=0;this.pageUrl=null;this.baseParams={};this.paramMap={'page':'page','pageSize':'pageSize','sortColumn':'sortColumn','sortDir':'sortDir'};};YAHOO.extendX(YAHOO.ext.grid.LoadableDataModel,YAHOO.ext.grid.DefaultDataModel);YAHOO.ext.grid.LoadableDataModel.prototype.setLoadedPage=function(pageNum,userCallback){this.loadedPage=pageNum;if(typeof userCallback=='function'){userCallback();}};YAHOO.ext.grid.LoadableDataModel.prototype.isPaged=function(){return this.pageSize>0;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalRowCount=function(){return this.totalCount||this.getRowCount();};YAHOO.ext.grid.LoadableDataModel.prototype.getPageSize=function(){return this.pageSize;};YAHOO.ext.grid.LoadableDataModel.prototype.getTotalPages=function(){if(this.getPageSize()==0||this.getTotalRowCount()==0){return 1;} +return Math.ceil(this.getTotalRowCount()/this.getPageSize());};YAHOO.ext.grid.LoadableDataModel.prototype.initPaging=function(url,pageSize,baseParams){this.pageUrl=url;this.pageSize=pageSize;this.remoteSort=true;if(baseParams)this.baseParams=baseParams;};YAHOO.ext.grid.LoadableDataModel.prototype.createParams=function(pageNum,sortColumn,sortDir){var params={},map=this.paramMap;for(var key in this.baseParams){if(typeof this.baseParams[key]!='function'){params[key]=this.baseParams[key];}} +params[map['page']]=pageNum;params[map['pageSize']]=this.getPageSize();params[map['sortColumn']]=(typeof sortColumn=='undefined'?'':sortColumn);params[map['sortDir']]=sortDir||'';return params;};YAHOO.ext.grid.LoadableDataModel.prototype.loadPage=function(pageNum,callback,keepExisting){var sort=this.getSortState();var params=this.createParams(pageNum,sort.column,sort.direction);this.load(this.pageUrl,params,this.setLoadedPage.createDelegate(this,[pageNum,callback]),keepExisting?(pageNum-1)*this.pageSize:null);};YAHOO.ext.grid.LoadableDataModel.prototype.applySort=function(suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.applySort.apply(this,arguments);}else if(!suppressEvent){var sort=this.getSortState();if(sort.column){this.fireRowsSorted(sort.column,sort.direction,true);}}};YAHOO.ext.grid.LoadableDataModel.prototype.resetPaging=function(){this.loadedPage=1;};YAHOO.ext.grid.LoadableDataModel.prototype.sort=function(columnModel,columnIndex,direction,suppressEvent){if(!this.remoteSort){YAHOO.ext.grid.LoadableDataModel.superclass.sort.apply(this,arguments);}else{this.columnModel=columnModel;this.sortColumn=columnIndex;this.sortDir=direction;var params=this.createParams(this.loadedPage,columnIndex,direction);this.load(this.pageUrl,params,this.fireRowsSorted.createDelegate(this,[columnIndex,direction,true]));}} +YAHOO.ext.grid.LoadableDataModel.prototype.load=function(url,params,callback,insertIndex){this.fireEvent('beforeload');if(params&&typeof params!='string'){var buf=[];for(var key in params){if(typeof params[key]!='function'){buf.push(encodeURIComponent(key),'=',encodeURIComponent(params[key]),'&');}} +delete buf[buf.length-1];params=buf.join('');} +var cb={success:this.processResponse,failure:this.processException,scope:this,argument:{callback:callback,insertIndex:insertIndex}};var method=params?'POST':'GET';YAHOO.util.Connect.asyncRequest(method,url,cb,params);};YAHOO.ext.grid.LoadableDataModel.prototype.processResponse=function(response){var cb=response.argument.callback;var keepExisting=(typeof response.argument.insertIndex=='number');var insertIndex=response.argument.insertIndex;switch(this.dataType){case YAHOO.ext.grid.LoadableDataModel.XML:this.loadData(response.responseXML,cb,keepExisting,insertIndex);break;case YAHOO.ext.grid.LoadableDataModel.JSON:var rtext=response.responseText;try{while(rtext.substring(0,1)==" "){rtext=rtext.substring(1,rtext.length);} +if(rtext.indexOf("{")<0){throw"Invalid JSON response";} +if(rtext.indexOf("{}")===0){this.loadData({},response.argument.callback);return;} +var jsonObjRaw=eval("("+rtext+")");if(!jsonObjRaw){throw"Error evaling JSON response";} +this.loadData(jsonObjRaw,cb,keepExisting,insertIndex);}catch(e){this.fireLoadException(e,response);if(typeof callback=='function'){callback(this,false);}} +break;case YAHOO.ext.grid.LoadableDataModel.TEXT:this.loadData(response.responseText,cb,keepExisting,insertIndex);break;};};YAHOO.ext.grid.LoadableDataModel.prototype.processException=function(response){this.fireLoadException(null,response);if(typeof response.argument.callback=='function'){response.argument.callback(this,false);}};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadException=function(e,responseObj){this.onLoadException.fireDirect(this,e,responseObj);};YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadEvent=function(){this.fireEvent('load',this.loadedPage,this.getTotalPages());};YAHOO.ext.grid.LoadableDataModel.prototype.addPreprocessor=function(columnIndex,fn){this.preprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPreprocessor=function(columnIndex){return this.preprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePreprocessor=function(columnIndex){this.preprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.addPostprocessor=function(columnIndex,fn){this.postprocessors[columnIndex]=fn;};YAHOO.ext.grid.LoadableDataModel.prototype.getPostprocessor=function(columnIndex){return this.postprocessors[columnIndex];};YAHOO.ext.grid.LoadableDataModel.prototype.removePostprocessor=function(columnIndex){this.postprocessors[columnIndex]=null;};YAHOO.ext.grid.LoadableDataModel.prototype.loadData=function(data,callback,keepExisting,insertIndex){};YAHOO.ext.grid.LoadableDataModel.XML='xml';YAHOO.ext.grid.LoadableDataModel.JSON='json';YAHOO.ext.grid.LoadableDataModel.TEXT='text'; + +YAHOO.ext.grid.XMLDataModel=function(schema,xml){YAHOO.ext.grid.XMLDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.XML);this.schema=schema;this.xml=xml;if(xml){this.loadData(xml);}};YAHOO.extendX(YAHOO.ext.grid.XMLDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.XMLDataModel.prototype.getDocument=function(){return this.xml;};YAHOO.ext.grid.XMLDataModel.prototype.loadData=function(doc,callback,keepExisting,insertIndex){this.xml=doc;var idField=this.schema.id;var fields=this.schema.fields;if(this.schema.totalTag){this.totalCount=null;var totalNode=doc.getElementsByTagName(this.schema.totalTag);if(totalNode&&totalNode.item(0)&&totalNode.item(0).firstChild){var v=parseInt(totalNode.item(0).firstChild.nodeValue,10);if(!isNaN(v)){this.totalCount=v;}}} +var rowData=[];var nodes=doc.getElementsByTagName(this.schema.tagName);if(nodes&&nodes.length>0){for(var i=0;i0){return this.getNamedValue(node,name.substr(index+1),defaultValue);}}} +return nodeValue;};YAHOO.ext.grid.XMLDataModel.prototype.setNamedValue=function(node,name,value){if(!node||!name){return;} +var attrNode=node.attributes.getNamedItem(name);if(attrNode){attrNode.value=value;return;} +var childNode=node.getElementsByTagName(name);if(childNode&&childNode.item(0)&&childNode.item(0).firstChild){childNode.item(0).firstChild.nodeValue=value;}else{var index=name.indexOf(':');if(index>0){this.setNamedValue(node,name.substr(index+1),value);}}};YAHOO.ext.grid.XMLDataModel.prototype.setValueAt=function(value,rowIndex,colIndex){var node=this.data[rowIndex].node;if(node){var nodeValue=value;if(this.postprocessors[colIndex]){nodeValue=this.postprocessors[colIndex](value);} +this.setNamedValue(node,this.schema.fields[colIndex],nodeValue);} +YAHOO.ext.grid.XMLDataModel.superclass.setValueAt.call(this,value,rowIndex,colIndex);};YAHOO.ext.grid.XMLDataModel.prototype.getRowId=function(rowIndex){return this.data[rowIndex].id;}; + +YAHOO.ext.grid.JSONDataModel=function(schema){YAHOO.ext.grid.JSONDataModel.superclass.constructor.call(this,YAHOO.ext.grid.LoadableDataModel.JSON);this.schema=schema;};YAHOO.extendX(YAHOO.ext.grid.JSONDataModel,YAHOO.ext.grid.LoadableDataModel);YAHOO.ext.grid.JSONDataModel.prototype.loadData=function(data,callback,keepExisting){var idField=this.schema.id;var fields=this.schema.fields;var rowData=[];try{var root=eval('data.'+this.schema.root);for(var i=0;i0){var ids=this.selectedRowIds.concat();this.clearSelections();this.selectRowsById(ids,true);}},selectRowsById:function(id,keepExisting){var rows=this.grid.getRowsById(id);this.selectRows(rows,keepExisting);},getCount:function(){return this.selectedRows.length;},selectFirstRow:function(){for(var j=0;j=0;j--){var row=this.grid.rows[j];if(this.isSelectable(row)){this.focusRow(row);this.setRowState(row,true,keepExisting);return;}}}},getSelectedRows:function(){return this.selectedRows;},getSelectedRowIds:function(){return this.selectedRowIds;},clearSelections:function(){if(this.isLocked())return;var oldSelections=this.selectedRows.concat();for(var j=0;j0;},isSelected:function(row){return row&&(row.selected===true||row.getAttribute('selected')=='true');},isSelectable:function(row){return row&&row.getAttribute('selectable')!='false';},rowClick:function(grid,rowIndex,e){if(this.isLocked())return;var row=grid.getRow(rowIndex);if(this.isSelectable(row)){if(e.shiftKey&&this.lastSelectedRow){var lastIndex=this.lastSelectedRow.rowIndex;this.selectRange(this.lastSelectedRow,row,e.ctrlKey);this.lastSelectedRow=this.grid.el.dom.rows[lastIndex];}else{this.focusRow(row);var rowState=e.ctrlKey?!this.isSelected(row):true;this.setRowState(row,rowState,e.hasModifier());}}},focusRow:function(row){this.grid.view.focusRow(row);},selectRow:function(row,keepExisting){this.setRowState(this.getRow(row),true,keepExisting);},selectRows:function(rows,keepExisting){if(!keepExisting){this.clearSelections();} +for(var i=0;ithis.maxValue.getTime()){dom.title=this.maxText.replace('%0',this.formatDate(this.maxValue));this.element.addClass('ygrid-editor-invalid');return false;} +if(this.disabledDays){var day=value.getDay();for(var i=0;ithis.maxValue){dom.title=this.maxText.replace('%0',this.maxValue);this.element.addClass('ygrid-editor-invalid');return false;} +var msg=this.validator(value);if(msg!==true){dom.title=msg;this.element.addClass('ygrid-editor-invalid');return false;} +dom.title='';this.element.removeClass('ygrid-editor-invalid');return true;};YAHOO.ext.grid.NumberEditor.prototype.show=function(){this.element.dom.title='';YAHOO.ext.grid.NumberEditor.superclass.show.call(this);if(this.selectOnFocus){try{this.element.dom.select();}catch(e){}} +this.validate(this.element.dom.value);};YAHOO.ext.grid.NumberEditor.prototype.getValue=function(){if(!this.validate()){return this.originalValue;}else{var value=this.element.dom.value;if(value.length<1){return value;}else{return this.fixPrecision(this.parseValue(value));}}};YAHOO.ext.grid.NumberEditor.prototype.parseValue=function(value){return parseFloat(new String(value).replace(this.decimalSeparator,'.'));};YAHOO.ext.grid.NumberEditor.prototype.fixPrecision=function(value){if(!this.allowDecimals||this.decimalPrecision==-1||isNaN(value)||value==0||!value){return value;} +var scale=Math.pow(10,this.decimalPrecision+1);var fixed=this.decimalPrecisionFcn(value*scale);fixed=this.decimalPrecisionFcn(fixed/10);return fixed/(scale/10);};YAHOO.ext.grid.NumberEditor.prototype.allowBlank=true;YAHOO.ext.grid.NumberEditor.prototype.allowDecimals=true;YAHOO.ext.grid.NumberEditor.prototype.decimalSeparator='.';YAHOO.ext.grid.NumberEditor.prototype.decimalPrecision=2;YAHOO.ext.grid.NumberEditor.prototype.decimalPrecisionFcn=Math.floor;YAHOO.ext.grid.NumberEditor.prototype.allowNegative=true;YAHOO.ext.grid.NumberEditor.prototype.selectOnFocus=true;YAHOO.ext.grid.NumberEditor.prototype.minValue=Number.NEGATIVE_INFINITY;YAHOO.ext.grid.NumberEditor.prototype.maxValue=Number.MAX_VALUE;YAHOO.ext.grid.NumberEditor.prototype.minText='The minimum value for this field is %0';YAHOO.ext.grid.NumberEditor.prototype.maxText='The maximum value for this field is %0';YAHOO.ext.grid.NumberEditor.prototype.blankText='This field cannot be blank';YAHOO.ext.grid.NumberEditor.prototype.nanText='%0 is not a valid number';YAHOO.ext.grid.NumberEditor.prototype.validationDelay=100;YAHOO.ext.grid.NumberEditor.prototype.validator=function(){return true;}; + +YAHOO.ext.DatePicker=function(id,parentElement){this.id=id;this.selectedDate=new Date();this.visibleDate=new Date();this.element=null;this.shadow=null;this.callback=null;this.buildControl(parentElement||document.body);this.mouseDownHandler=YAHOO.ext.EventManager.wrap(this.handleMouseDown,this,true);this.keyDownHandler=YAHOO.ext.EventManager.wrap(this.handleKeyDown,this,true);this.wheelHandler=YAHOO.ext.EventManager.wrap(this.handleMouseWheel,this,true);};YAHOO.ext.DatePicker.prototype={show:function(x,y,value,callback){this.hide();this.selectedDate=value;this.visibleDate=value;this.callback=callback;this.refresh();this.element.show();this.element.moveTo(x,y);this.shadow.show();this.shadow.setRegion(this.element.getRegion());this.element.dom.tabIndex=1;this.element.focus();YAHOO.util.Event.on(document,"mousedown",this.mouseDownHandler);YAHOO.util.Event.on(document,"keydown",this.keyDownHandler);YAHOO.util.Event.on(document,"mousewheel",this.wheelHandler);YAHOO.util.Event.on(document,"DOMMouseScroll",this.wheelHandler);},hide:function(){this.shadow.hide();this.element.hide();YAHOO.util.Event.removeListener(document,"mousedown",this.mouseDownHandler);YAHOO.util.Event.removeListener(document,"keydown",this.keyDownHandler);YAHOO.util.Event.removeListener(document,"mousewheel",this.wheelHandler);YAHOO.util.Event.removeListener(document,"DOMMouseScroll",this.wheelHandler);},setSelectedDate:function(date){this.selectedDate=date;},getSelectedDate:function(){return this.selectedDate;},showPrevMonth:function(){this.visibleDate=this.getPrevMonth(this.visibleDate);this.refresh();},showNextMonth:function(){this.visibleDate=this.getNextMonth(this.visibleDate);this.refresh();},showPrevYear:function(){var d=this.visibleDate;this.visibleDate=new Date(d.getFullYear()-1,d.getMonth(),d.getDate());this.refresh();},showNextYear:function(){var d=this.visibleDate;this.visibleDate=new Date(d.getFullYear()+1,d.getMonth(),d.getDate());this.refresh();},handleMouseDown:function(e){var target=e.getTarget();if(target!=this.element.dom&&!YAHOO.util.Dom.isAncestor(this.element.dom,target)){this.hide();}},handleKeyDown:function(e){switch(e.browserEvent.keyCode){case e.LEFT:this.showPrevMonth();e.stopEvent();break;case e.RIGHT:this.showNextMonth();e.stopEvent();break;case e.DOWN:this.showPrevYear();e.stopEvent();break;case e.UP:this.showNextYear();e.stopEvent();break;}},handleMouseWheel:function(e){var delta=e.getWheelDelta();if(delta>0){this.showPrevMonth();e.stopEvent();}else if(delta<0){this.showNextMonth();e.stopEvent();}},handleClick:function(e){var d=this.visibleDate;var t=e.getTarget();if(t&&t.className){switch(t.className){case'active':this.handleSelection(new Date(d.getFullYear(),d.getMonth(),parseInt(t.innerHTML)));break;case'prevday':var p=this.getPrevMonth(d);this.handleSelection(new Date(p.getFullYear(),p.getMonth(),parseInt(t.innerHTML)));break;case'nextday':var n=this.getNextMonth(d);this.handleSelection(new Date(n.getFullYear(),n.getMonth(),parseInt(t.innerHTML)));break;case'ypopcal-today':this.handleSelection(new Date());break;case'next-month':this.showNextMonth();break;case'prev-month':this.showPrevMonth();break;}} +e.stopEvent();},selectToday:function(){this.handleSelection(new Date());},handleSelection:function(date){this.selectedDate=date;this.callback(date);this.hide();},getPrevMonth:function(d){var m=d.getMonth();var y=d.getFullYear();return(m==0?new Date(--y,11,1):new Date(y,--m,1));},getNextMonth:function(d){var m=d.getMonth();var y=d.getFullYear();return(m==11?new Date(++y,0,1):new Date(y,++m,1));},getDaysInMonth:function(m,y){return(m==1||m==3||m==5||m==7||m==8||m==10||m==12)?31:(m==4||m==6||m==9||m==11)?30:this.isLeapYear(y)?29:28;},isLeapYear:function(y){return(((y%4)==0)&&((y%100)!=0)||((y%400)==0));},clearTime:function(date){if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);} +return date;},refresh:function(){var d=this.visibleDate;this.buildInnerCal(d);this.calHead.update(this.monthNames[d.getMonth()]+' '+d.getFullYear());if(this.element.isVisible()){this.shadow.setRegion(this.element.getRegion());}}};YAHOO.ext.DatePicker.prototype.buildControl=function(parentElement){var c=document.createElement('div');c.style.position='absolute';c.style.visibility='hidden';document.body.appendChild(c);var html=''+'';c.innerHTML=html;this.shadow=getEl(c.childNodes[0],true);this.shadow.enableDisplayMode();this.element=getEl(c.childNodes[1],true);this.element.enableDisplayMode();document.body.appendChild(this.shadow.dom);document.body.appendChild(this.element.dom);document.body.removeChild(c);this.element.on("selectstart",function(){return false;});var tbody=this.element.dom.getElementsByTagName('tbody')[1];this.cells=tbody.getElementsByTagName('td');this.calHead=this.element.getChildrenByClassName('ypopcal-month','td')[0];this.element.mon('mousedown',this.handleClick,this,true);};YAHOO.ext.DatePicker.prototype.buildInnerCal=function(dateVal){var days=this.getDaysInMonth(dateVal.getMonth()+1,dateVal.getFullYear());var firstOfMonth=new Date(dateVal.getFullYear(),dateVal.getMonth(),1);var startingPos=firstOfMonth.getDay();if(startingPos==0)startingPos=7;var pm=this.getPrevMonth(dateVal);var prevStart=this.getDaysInMonth(pm.getMonth()+1,pm.getFullYear())-startingPos;var cells=this.cells;days+=startingPos;var day=86400000;var date=this.clearTime(new Date(pm.getFullYear(),pm.getMonth(),prevStart));var today=this.clearTime(new Date()).getTime();var sel=this.selectedDate?this.clearTime(this.selectedDate).getTime():today+1;var min=this.minDate?this.clearTime(this.minDate).getTime():Number.NEGATIVE_INFINITY;var max=this.maxDate?this.clearTime(this.maxDate).getTime():Number.POSITIVE_INFINITY;var ddMatch=this.disabledDatesRE;var ddText=this.disabledDatesText;var ddays=this.disabledDays;var ddaysText=this.disabledDaysText;var format=this.format;var setCellClass=function(cal,cell,d){cell.title='';var t=d.getTime();if(t==today){cell.className+=' today';cell.title=cal.todayText;} +if(t==sel){cell.className+=' selected';} +if(tmax){cell.className=' ypopcal-disabled';cell.title=cal.maxText;return;} +if(ddays){var day=d.getDay();for(var i=0;ithis.maxLength){dom.title=this.maxText.replace('%0',this.maxLength);this.element.addClass('ygrid-editor-invalid');return false;} +var msg=this.validator(value);if(msg!==true){dom.title=msg;this.element.addClass('ygrid-editor-invalid');return false;} +if(this.regex&&!this.regex.test(value)){dom.title=this.regexText;this.element.addClass('ygrid-editor-invalid');return false;} +dom.title='';this.element.removeClass('ygrid-editor-invalid');return true;};YAHOO.ext.grid.TextEditor.prototype.initEvents=function(){YAHOO.ext.grid.TextEditor.superclass.initEvents.call(this);var vtask=new YAHOO.ext.util.DelayedTask(this.validate,this);this.element.mon('keyup',vtask.delay.createDelegate(vtask,[this.validationDelay]));};YAHOO.ext.grid.TextEditor.prototype.show=function(){this.element.dom.title='';YAHOO.ext.grid.TextEditor.superclass.show.call(this);this.element.focus();if(this.selectOnFocus){try{this.element.dom.select();}catch(e){}} +this.validate(this.element.dom.value);};YAHOO.ext.grid.TextEditor.prototype.getValue=function(){if(!this.validate()){return this.originalValue;}else{return this.element.dom.value;}};YAHOO.ext.grid.TextEditor.prototype.allowBlank=true;YAHOO.ext.grid.TextEditor.prototype.minLength=0;YAHOO.ext.grid.TextEditor.prototype.maxLength=Number.MAX_VALUE;YAHOO.ext.grid.TextEditor.prototype.minText='The minimum length for this field is %0';YAHOO.ext.grid.TextEditor.prototype.maxText='The maximum length for this field is %0';YAHOO.ext.grid.TextEditor.prototype.selectOnFocus=true;YAHOO.ext.grid.TextEditor.prototype.blankText='This field cannot be blank';YAHOO.ext.grid.TextEditor.prototype.validator=function(){return true;};YAHOO.ext.grid.TextEditor.prototype.validationDelay=200;YAHOO.ext.grid.TextEditor.prototype.regex=null;YAHOO.ext.grid.TextEditor.prototype.regexText=''; diff --git a/www/extras/yui-ext/resizable-lib.js b/www/extras/yui-ext/resizable-lib.js new file mode 100644 index 000000000..fd620dfee --- /dev/null +++ b/www/extras/yui-ext/resizable-lib.js @@ -0,0 +1,17 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.Resizable=function(el,config){var getEl=YAHOO.ext.Element.get;this.el=getEl(el,true);this.el.autoBoxAdjust=true;if(this.el.getStyle('position')!='absolute'){this.el.setStyle('position','relative');} +var dh=YAHOO.ext.DomHelper;var tpl=dh.createTemplate({tag:'div',cls:'yresizable-handle yresizable-handle-{0}',html:' '});this.east=getEl(tpl.append(this.el.dom,['east']),true);this.south=getEl(tpl.append(this.el.dom,['south']),true);if(config&&config.multiDirectional){this.west=getEl(tpl.append(this.el.dom,['west']),true);this.north=getEl(tpl.append(this.el.dom,['north']),true);} +this.corner=getEl(tpl.append(this.el.dom,['southeast']),true);this.proxy=getEl(dh.insertBefore(document.body.firstChild,{tag:'div',cls:'yresizable-proxy',id:this.el.id+'-rzproxy'}),true);this.proxy.autoBoxAdjust=true;this.moveHandler=YAHOO.ext.EventManager.wrap(this.onMouseMove,this,true);this.upHandler=YAHOO.ext.EventManager.wrap(this.onMouseUp,this,true);this.selHandler=YAHOO.ext.EventManager.wrap(this.cancelSelection,this,true);this.events={'beforeresize':new YAHOO.util.CustomEvent(),'resize':new YAHOO.util.CustomEvent()};this.dir=null;this.resizeChild=false;this.adjustments=[0,0];this.minWidth=5;this.minHeight=5;this.maxWidth=10000;this.maxHeight=10000;this.enabled=true;this.animate=false;this.duration=.35;this.dynamic=false;this.multiDirectional=false;this.disableTrackOver=false;this.easing=YAHOO.util.Easing?YAHOO.util.Easing.easeOutStrong:null;YAHOO.ext.util.Config.apply(this,config);var mdown=this.onMouseDown.createDelegate(this);this.east.mon('mousedown',mdown);this.south.mon('mousedown',mdown);if(this.multiDirectional){this.west.mon('mousedown',mdown);this.north.mon('mousedown',mdown);} +this.corner.mon('mousedown',mdown);if(!this.disableTrackOver){var mover=this.onMouseOver.createDelegate(this);var mout=this.onMouseOut.createDelegate(this);this.east.mon('mouseover',mover);this.east.mon('mouseout',mout);this.south.mon('mouseover',mover);this.south.mon('mouseout',mout);if(this.multiDirectional){this.west.mon('mouseover',mover);this.west.mon('mouseout',mout);this.north.mon('mouseover',mover);this.north.mon('mouseout',mout);} +this.corner.mon('mouseover',mover);this.corner.mon('mouseout',mout);} +this.updateChildSize();};YAHOO.extendX(YAHOO.ext.Resizable,YAHOO.ext.util.Observable,{resizeTo:function(width,height){this.el.setSize(width,height);this.fireEvent('resize',this,width,height,null);},cancelSelection:function(e){e.preventDefault();},startSizing:function(e){this.fireEvent('beforeresize',this,e);if(this.enabled){e.preventDefault();this.startBox=this.el.getBox();this.startPoint=e.getXY();this.offsets=[(this.startBox.x+this.startBox.width)-this.startPoint[0],(this.startBox.y+this.startBox.height)-this.startPoint[1]];this.proxy.setBox(this.startBox);if(!this.dynamic){this.proxy.show();} +YAHOO.util.Event.on(document.body,'selectstart',this.selHandler);YAHOO.util.Event.on(document.body,'mousemove',this.moveHandler);YAHOO.util.Event.on(document.body,'mouseup',this.upHandler);}},onMouseDown:function(e){if(this.enabled){var t=e.getTarget();if(t==this.corner.dom){this.dir='both';this.proxy.setStyle('cursor',this.corner.getStyle('cursor'));this.startSizing(e);}else if(t==this.east.dom){this.dir='east';this.proxy.setStyle('cursor',this.east.getStyle('cursor'));this.startSizing(e);}else if(t==this.south.dom){this.dir='south';this.proxy.setStyle('cursor',this.south.getStyle('cursor'));this.startSizing(e);}else if(t==this.west.dom){this.dir='west';this.proxy.setStyle('cursor',this.west.getStyle('cursor'));this.startSizing(e);}else if(t==this.north.dom){this.dir='north';this.proxy.setStyle('cursor',this.north.getStyle('cursor'));this.startSizing(e);}}},onMouseUp:function(e){YAHOO.util.Event.removeListener(document.body,'selectstart',this.selHandler);YAHOO.util.Event.removeListener(document.body,'mousemove',this.moveHandler);YAHOO.util.Event.removeListener(document.body,'mouseup',this.upHandler);var size=this.resizeElement();this.fireEvent('resize',this,size.width,size.height,e);},updateChildSize:function(){if(this.resizeChild&&this.el.dom.firstChild&&this.el.dom.offsetWidth){var el=this.el;var adj=this.adjustments;setTimeout(function(){var c=YAHOO.ext.Element.get(el.dom.firstChild,true);var b=el.getBox(true);c.setSize(b.width+adj[0],b.height+adj[1]);},1);}},resizeElement:function(){var box=this.proxy.getBox();this.el.setBox(box,false,this.animate,this.duration,null,this.easing);this.updateChildSize();this.proxy.hide();return box;},onMouseMove:function(e){if(this.enabled){var xy=e.getXY();if(this.dir=='both'||this.dir=='east'||this.dir=='south'){var w=Math.min(Math.max(this.minWidth,xy[0]-this.startBox.x+this.offsets[0]),this.maxWidth);var h=Math.min(Math.max(this.minHeight,xy[1]-this.startBox.y+this.offsets[1]),this.maxHeight);if(this.dir=='both'){this.proxy.setSize(w,h);}else if(this.dir=='east'){this.proxy.setWidth(w);}else if(this.dir=='south'){this.proxy.setHeight(h);}}else{var x=this.startBox.x+(xy[0]-this.startPoint[0]);var y=this.startBox.y+(xy[1]-this.startPoint[1]);var w=this.startBox.width+(this.startBox.x-x);var h=this.startBox.height+(this.startBox.y-y);if(this.dir=='west'&&w<=this.maxWidth&&w>=this.minWidth){this.proxy.setX(x);this.proxy.setWidth(w);}else if(this.dir=='north'&&h<=this.maxHeight&&h>=this.minHeight){this.proxy.setY(y);this.proxy.setHeight(h);}} +if(this.dynamic){this.resizeElement();}}},onMouseOver:function(){if(this.enabled)this.el.addClass('yresizable-over');},onMouseOut:function(){this.el.removeClass('yresizable-over');}}); diff --git a/www/extras/yui-ext/resources/css/grid.css b/www/extras/yui-ext/resources/css/grid.css new file mode 100644 index 000000000..4b31ea235 --- /dev/null +++ b/www/extras/yui-ext/resources/css/grid.css @@ -0,0 +1,660 @@ +.ygrid-cell-text { + display: block; + font: normal 8pt arial; + overflow: hidden; + padding: 3px 5px; + white-space: nowrap; +} +.ygrid-col{ + cursor: default; + height:21px !important; + box-sizing: border-box; + -moz-box-sizing: border-box; + position:absolute; + display:block; + -moz-outline: none; + -moz-user-focus: normal; + overflow: hidden; + border-left: 1px solid #f1efe2; +} +.yeditgrid .ygrid-col{ + -moz-outline: normal; +} +.ygrid-col, .ygrid-hd { + font: normal 8pt arial; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +} +.ygrid-col-0{ + border-left: 0px; +} +.ygrid-col-last{ + border-right: 1px solid #f1efe2; +} +.ygrid-editor{ + box-sizing: border-box; + -moz-box-sizing: border-box; + position:absolute; + visibility:hidden; + font: normal 8pt arial; + border: 1px solid #afbdc9; + z-index:10; +} +.ygrid-editor input{ + font: normal 8pt arial; + border: 0px; + padding-top:2px; + padding-left:3px; +} +.ygrid-editor-container{ + overflow:hidden; + display:block; + background-color:white; +} +.ygrid-editor .pick-button{ + width:15px; + height:20px; + position:absolute; + display:block; + right:0; + top:0; + z-index:2; + background-image: url(../images/grid/pick-button.gif); + background-repeat: no-repeat; +} +.ygrid-editor-invalid{ + background-image: url(../images/grid/invalid_line.gif); + background-repeat: repeat-x; + background-position: bottom; + border: 1px solid #afbdc9; +} +.ygrid-checkbox-editor{ + text-align: center; + overflow:hidden; + display:block; + background-color:white; +} +.ygrid-checkbox-editor input{ + margin-top:3px; + height:13px; + width:13px; +} +select.ygrid-editor{ + padding: 0px; + -moz-outline: none; + border: 1px solid #afbdc9; +} +.ygrid-num-editor{ + text-align:right; + padding-top:2px; + padding-left:3px; +} +.ygrid-text-editor{ + padding-top:2px; + padding-left:3px; +} +.ygrid-hd{ + background-color: #ebeadb; + border-bottom: 1px solid #cbc7b8; + box-sizing: border-box; + -moz-box-sizing: border-box; + display: block; + position: absolute; + overflow:hidden; +} +.ygrid-column-sizer { + width:1px; + border-right:1px dashed #6593cf; + background:none; + cursor: col-resize; +} +.ygrid-drag-proxy{ + width:150px; + height:24px; + background-color:#3366cc; + border: 1px solid #002266; + position:absolute; + visibility:hidden; + z-index:10000; +} +.ygrid-drag-text{ + font: normal 8pt arial; + color:white; + position:absolute; + top:0px; + left:26px; + padding:3px; + display:block; +} +.ygrid-drop-icon{ + position:absolute; + top:0px; + left:0px; + display:block; + width:24px; + height:100%; + background-position: center; + background-repeat: no-repeat; +} +.ygrid-drop-nodrop{ + background-image: url(../images/grid/drop-no.gif); +} +.ygrid-drop-ok{ + background-image: url(../images/grid/drop-yes.gif); +} +.ygrid-hd .sort-asc { + background-image: url(../images/grid/sort_asc.gif); + background-position: right; + background-repeat: no-repeat; + display: none; + height: 14px; + width: 16px; +} +.ygrid-hd .sort-desc { + background-image: url(../images/grid/sort_desc.gif); + background-position: right; + background-repeat: no-repeat; + display: none; + height: 14px; + width: 16px; +} +.ygrid-hd-body { + border-bottom: 2px solid #d6d2c2; + cursor: default; + display: block; + font: normal 8pt arial; + left: 0; + overflow: hidden; + padding: 3px 5px; + position: relative; + top: 0; + white-space: nowrap; +} +.ygrid-hd-body span { + font: normal 8pt arial; + white-space: nowrap; +} +.ygrid-hd-over{ + border-bottom: 2px solid #fcc247; +} +.ygrid-hd-over .ygrid-hd-body{ + background-color: #faf9f4; + border-bottom: 1px solid #f9a900; +} +.ygrid-hd-split { + background-image: url(../images/grid/grid-split.gif); + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} +.ygrid-hrow{ + background-color: #ebeadb; + display: block; + height: 22px; + left: 0; + position: relative; + top: 0; + width: 10000px; + overflow:hidden; + z-index:2; +} +.ygrid-hrow-frame{ + height: 22px; + left: 0; + display:block; + position: absolute; + top: 0; + width: 10000px; + z-index:1; +} +.ygrid-footer .ytoolbar{ + border:0px; +} +.ygrid-page-number{ + width:24px; + height:14px; +} +.ygrid-page-first{ + background-image: url(../images/grid/page-first.gif); +} +.ygrid-loading{ + background-image: url(../images/grid/done.gif); +} +.ygrid-page-last{ + background-image: url(../images/grid/page-last.gif); +} +.ygrid-page-next{ + background-image: url(../images/grid/page-next.gif); +} +.ygrid-page-prev{ + background-image: url(../images/grid/page-prev.gif); +} +.ytb-button-disabled .ygrid-loading{ + background-image: url(../images/grid/loading.gif); +} +.ytb-button-disabled .ygrid-page-first{ + background-image: url(../images/grid/page-first-disabled.gif); +} +.ytb-button-disabled .ygrid-page-last{ + background-image: url(../images/grid/page-last-disabled.gif); +} +.ytb-button-disabled .ygrid-page-next{ + background-image: url(../images/grid/page-next-disabled.gif); +} +.ytb-button-disabled .ygrid-page-prev{ + background-image: url(../images/grid/page-prev-disabled.gif); +} +.ygrid-mso{ +} +.ygrid-mso .ygrid-hd{ + background: url(../images/grid/mso-hd.gif); + border-bottom:0px; +} +.ygrid-mso .ygrid-footer { + border-top: 1px solid #6593cf; +} + +.ygrid-mso .ygrid-footer .ygrid-fbutton{ + border:0px; +} +.ygrid-mso .ygrid-hd-body { + border-bottom:0px; +} +.ygrid-mso .ygrid-hd-over{ + border-bottom:0px; +} +.ygrid-mso .ygrid-hd-over .ygrid-hd-body{ + background-color: transparent; +} +.ygrid-mso .ygrid-hd-split { + background-image: url(../images/grid/grid-blue-split.gif); +} +.ygrid-mso .ytoolbar .ytb-sep { + background-image: url(../images/grid/grid-blue-split.gif); +} +.ygrid-mso .ygrid-hrow{ + background: url(../images/grid/mso-hd.gif); + border-bottom: 1px solid #6593cf; + height: 21px; +} +.ygrid-mso .ygrid-row{ + color: black; + border-bottom: 1px solid #ddecfe; +} +.ygrid-mso .ygrid-row-alt{ + background-color: #f5f5f5; +} +.ygrid-mso .ygrid-row-selected{ + background-color: #b3c8e8 !important; + color: black; +} +.ygrid-mso .ygrid-row-selected span{ + color: black !important; +} +.ygrid-row{ + border-bottom: 1px solid #f1efe2; + overflow: visible; + white-space: nowrap; + height:21px; + width:10000px; + box-sizing: border-box; + -moz-box-sizing: border-box; + display:block; + position:absolute; +} +.ygrid-row-alt{ + background-color: #fcfaf6; +} +.ygrid-row-over{ + background-color: #f1f1f1; + color: black; +} +.ygrid-row-selected{ + background-color: #316ac5 !important; + color: white; +} +.ygrid-row-selected span{ + color: white !important; +} +.ygrid-vista{ + border:1px solid #535353; +} +.ygrid-vista .ygrid-hd{ + background: url(../images/grid/grid-vista-hd.gif); + border-bottom:0px; +} +.ygrid-vista .ygrid-hd-body { + border-bottom: 1px solid #b3bcc0; +} +.ygrid-vista .ygrid-hd-over{ + border-bottom:0px; +} +.ygrid-vista .ygrid-hd-over .ygrid-hd-body{ + background-color: transparent; + border-bottom:0px; +} +.ygrid-vista .ygrid-hd-split { + background-image: url(../images/grid/grid-split.gif); +} +.ygrid-vista .ygrid-hrow{ + background: url(../images/grid/grid-vista-hd.gif); + height: 21px; +} +.ygrid-vista .ygrid-row-alt{ + background-color: #f5f5f5; +} +.ygrid-vista .ygrid-row-selected{ + background-color: #535353 !important; + color: white; +} +.ygrid-vista .ygrid-row-selected span{ + color: white !important; +} +.ygrid-vista .ygrid-wrap-body { +} +/* + To have the scrollbars overlap the header, change .ygrid-wrap top style to 0 and + and ygrid-wrap-body top to 22px + Then grid.getView().scrollbarMode = YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP; + */ +.ygrid-wrap { + height: 100%; + left: 0; + overflow: auto; + position: relative; + top: 22px; + width: 100%; +} +.ygrid-footer{ + display: block; + padding:0px; + border-top: 1px solid #cbc7b8; +} +.ygrid-wrap-footer { + display: block; + overflow: hidden; + width:100%; + height:25px; + box-sizing: border-box; + -moz-box-sizing: border-box; + background-color: #ebeadb; + position:absolute; + bottom:0px; +} +.ygrid-wrap-body { + left: 0; + overflow: hidden; + position: absolute; + top: 0; + display: block; +} +.ygrid-wrap-headers { + left: 0; + overflow: hidden; + position: absolute; + top: 0; + z-index: 12; +} +/* +The grid first check if a column style is defined as: +#your-grid .ygrid-col-0 +if it doesn't find it, it uses one of the generic empty rules below. +If you have more than one grid on your page - you MUST define you columns +like above - #container-id .ygrid-col-0 and they must each be a separate rule +*/ +.ygrid-col-0{ +} +.ygrid-col-1{ +} +.ygrid-col-10{ +} +.ygrid-col-11{ +} +.ygrid-col-12{ +} +.ygrid-col-13{ +} +.ygrid-col-14{ +} +.ygrid-col-15{ +} +.ygrid-col-16{ +} +.ygrid-col-17{ +} +.ygrid-col-18{ +} +.ygrid-col-19{ +} +.ygrid-col-2{ +} +.ygrid-col-20{ +} +.ygrid-col-3{ +} +.ygrid-col-4{ +} +.ygrid-col-5{ +} +.ygrid-col-6{ +} +.ygrid-col-7{ +} +.ygrid-col-8{ +} +.ygrid-col-9{ +} + +.ygrid-header-0{ +} +.ygrid-header-1{ +} +.ygrid-header-10{ +} +.ygrid-header-11{ +} +.ygrid-header-12{ +} +.ygrid-header-13{ +} +.ygrid-header-14{ +} +.ygrid-header-15{ +} +.ygrid-header-16{ +} +.ygrid-header-17{ +} +.ygrid-header-18{ +} +.ygrid-header-19{ +} +.ygrid-header-2{ +} +.ygrid-header-20{ +} +.ygrid-header-3{ +} +.ygrid-header-4{ +} +.ygrid-header-5{ +} +.ygrid-header-6{ +} +.ygrid-header-7{ +} +.ygrid-header-8{ +} +.ygrid-header-9{ +} +/* The styles below are for the examples and can be removed */ +#grid-example{ + border: 1px solid #cbc7b8; + left: 0; + position: relative; + top: 0; +} +#grid-example .ygrid-col-0 { +} +#grid-example .ygrid-col-1 { + text-align: right; +} +#grid-example .ygrid-col-2{ + text-align: right; +} +#grid-example .ygrid-col-3 { + text-align: right; +} +#grid-example .ygrid-col-4 { + text-align: right; +} +#grid-example.ygrid-mso{ + border: 1px solid #6593cf; +} +#grid-example.ygrid-vista{ + border: 1px solid #b3bcc0; +} +#xml-grid-example{ + border: 1px solid #cbc7b8; + left: 0; + position: relative; + top: 0; +} +#xml-grid-example .ygrid-col-0 { +} +#xml-grid-example .ygrid-col-1 { +} +#xml-grid-example .ygrid-col-2{ +} +#xml-grid-example .ygrid-col-3 { +} +#xml-grid-example.ygrid-mso{ + border: 1px solid #6593cf; +} +#xml-grid-example.ygrid-vista{ + border: 1px solid #b3bcc0; +} +#editor-grid .ygrid-col-2{ + text-align:right; +} +.ypopcal{ + background: white; + padding:2px; + border: 1px solid gray; +} +.ypopcal-shadow { + background: #dddddd; + filter: progid:DXImageTransform.Microsoft.Blur(MakeShadow=true,pixelradius=1) Alpha(opacity=35,style=1,startX=0,finishX=200,FinishOpacity=35); + padding: 0px; + position:absolute; +} +.ypopcal-head{ + width:150px; + background: #93b5e4; +} +.ypopcal-head td{ + padding:1px; +} +.ypopcal-month{ + color: white; + font: bold 7pt verdana; + text-decoration: none; + text-align:center; +} +.ypopcal-head .ypopcal-arrow{ + width:16px; + text-align:center; + cursor:pointer; + -moz-user-select: none; +} + +.ypopcal-head .next-month{ + width:16px; + background-image: url(../images/grid/arrow-right-white.gif); + background-position: center; + background-repeat: no-repeat; + cursor:pointer; +} +.ypopcal-head .prev-month{ + width:16px; + background-image: url(../images/grid/arrow-left-white.gif); + background-position: center; + background-repeat: no-repeat; + cursor:pointer; +} + +.ypopcal-table { + background:white; + border-bottom: 1px solid #cccccc; +} +.ypopcal-table tr{ + +} +.ypopcal-table td{ + box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid white; + text-align:right; + color:#aaaaaa; + cursor:pointer; + font:normal 8pt arial; + background:white; + padding:1px 2px; + width:12px; + height:12px; +} +.ypopcal-table td.today{ + border: 1px solid darkred; +} +.ypopcal-table .ypopcal-daynames td{ + text-align:center !important; + border:0px; + border-bottom: 1px solid #cccccc; + font-size: 8pt; + font-weight: normal; + text-align:right; + color:black; + cursor:default; +} +.ypopcal-table td.active{ + cursor:pointer; + color:black; +} +.ypopcal-table td.ypopcal-disabled{ + cursor:default; + background:#eeeeee; + border: 1px solid #eeeeee; + color:#bbbbbb; +} +.ypopcal-table td.selected{ + background: #ddecfe; + border: 1px solid #c3daf9; +} +.ypopcal-today{ + color: black; + cursor: hand; + display: inline-block; + font: normal 8pt arial; + margin-left: 2px; + text-decoration: none; + margin-top:0px; +} + +.ygrid-simple-view .ygrid-col{ + height:100% !important; + position:static; + display:table-cell; + display:inline-block; +} +.ygrid-simple-view .ygrid-row{ + position:static; + display: table-row; +} \ No newline at end of file diff --git a/www/extras/yui-ext/resources/css/reset-min.css b/www/extras/yui-ext/resources/css/reset-min.css new file mode 100644 index 000000000..e9416e59e --- /dev/null +++ b/www/extras/yui-ext/resources/css/reset-min.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.11.0 +*/ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file diff --git a/www/extras/yui-ext/resources/css/resizable.css b/www/extras/yui-ext/resources/css/resizable.css new file mode 100644 index 000000000..ecde2d0c2 --- /dev/null +++ b/www/extras/yui-ext/resources/css/resizable.css @@ -0,0 +1,82 @@ +.yresizable-handle { + position:absolute; + z-index:100; + /* ie needs these */ + font-size:1px; + line-height:1px; + overflow:hidden; + background:white; + filter:alpha(opacity=0); + opacity:0; +} +.yresizable-handle-east{ + width:5px; + cursor:e-resize; + right:0px; + top:0px; + height:100%; +} +.yresizable-handle-south{ + width:100%; + cursor:s-resize; + left:0px; + bottom:0px; + height:5px; +} +.yresizable-handle-west{ + width:5px; + cursor:w-resize; + left:0px; + top:0px; + height:100%; +} +.yresizable-handle-north{ + width:100%; + cursor:n-resize; + left:0px; + top:0px; + height:5px; +} +.yresizable-handle-southeast{ + width:6px; + cursor:se-resize; + right:0px; + bottom:0px; + height:6px; + z-index:101; +} +.yresizable-over .yresizable-handle, .yresizable-pinned .yresizable-handle{ + filter:alpha(opacity=100); + opacity:1; +} +.yresizable-over .yresizable-handle-east, .yresizable-pinned .yresizable-handle-east{ + background:url(../images/sizer/e-handle.gif); + background-position: left; + border-left:1px solid #98c0f4; +} +.yresizable-over .yresizable-handle-east, .yresizable-pinned .yresizable-handle-west{ + background:url(../images/sizer/e-handle.gif); + background-position: left; + border-right:1px solid #98c0f4; +} +.yresizable-over .yresizable-handle-south, .yresizable-pinned .yresizable-handle-south{ + background:url(../images/sizer/s-handle.gif); + background-position: top; + border-top:1px solid #98c0f4; +} +.yresizable-over .yresizable-handle-south, .yresizable-pinned .yresizable-handle-north{ + background:url(../images/sizer/s-handle.gif); + background-position: top; + border-bottom:1px solid #98c0f4; +} +.yresizable-over .yresizable-handle-southeast, .yresizable-pinned .yresizable-handle-southeast{ + background-position: top left; + background:url(../images/sizer/se-handle.gif); +} +.yresizable-proxy{ + border: 1px dashed #6593cf; + position:absolute; + overflow:hidden; + visibility:hidden; + z-index:1001; +} \ No newline at end of file diff --git a/www/extras/yui-ext/resources/css/tabs.css b/www/extras/yui-ext/resources/css/tabs.css new file mode 100644 index 000000000..32a63f150 --- /dev/null +++ b/www/extras/yui-ext/resources/css/tabs.css @@ -0,0 +1,35 @@ +/* + The CSS for the tabs comes from the Yahoo! design patterns + See http://developer.yahoo.com/ypatterns/examples/tabs.html for more details + */ +.tabset {border-bottom:1px solid #999;} +.tabset h3, .tabset h4 {position:absolute;left:-1000em;margin:0;} +.tabset .hd li em {font-weight:bold;} +.tabset .hd li a {color:#666;} +.tabset .hd li a:hover {text-decoration:none;} +.tabset .hd li.on em, .tabset .hd li.on strong a {color:#3366cc;} /* selected tab */ +.tabset .hd li.on strong {background-color:white;border-bottom:1px solid white;} /* border-color should match selected color */ +.tabset .hd li.orphan, .tabset .hd li.orphan a {color:#999;} + +/* bg images, defaults to #999 border-color on white bg */ +.tabset .hd li a, .tabset .hd li strong {background:#ccc url(http://us.i1.yimg.com/us.yimg.com/i/us/nt/el/tb/tr_999.gif) no-repeat top right;} +.tabset .hd li em {background:transparent url(http://us.i1.yimg.com/us.yimg.com/i/us/nt/el/tb/tl_999.gif) no-repeat;} + +.tabset {width:100%;} /* IE: width */ +.tabset a {text-decoration:none;} +.tabset ul, .tabset li {margin:0;padding:0;list-style:none;} +.tabset li {float:left;display:inline;cursor:pointer;} +.tabset li.on {cursor:default;} +.tabset li.disabled {cursor:default;color:#cccccc;} +.tabset li.disabled em {color:#aaa;} +.tabset li a:hover {text-decoration:underline;} +.tabset ul:after {clear:both;content:'.';display:block;height:0;visibility:hidden;} /* clear non-IE */ +.tabset ul {zoom:1;} /* clear IE */ + +.tabset .hd ul {font:bold 78%/1.2em verdana;margin-bottom:-1px;padding-left:.3em;position:relative;} /* IE quirks mode: relative */ +.tabset .hd li {margin-right:.33em;padding:0;} +.tabset .hd li.on strong a {cursor:default;} +.tabset .hd li a, .tabset .hd li strong, .tabset .hd li em {display:block;} +.tabset .hd li a, .tabset .hd li strong {*display:inline-block;} /* IE: 100% clickable */ +.tabset .hd li em {font-style:normal;padding:.5em .6em;} +.tabset .hd li.orphan, .tabset .hd li.orphan a, .tabset .hd li.orphan em {background:transparent none;border-width:0;margin:0;} \ No newline at end of file diff --git a/www/extras/yui-ext/resources/css/toolbar.css b/www/extras/yui-ext/resources/css/toolbar.css new file mode 100644 index 000000000..de641a4e2 --- /dev/null +++ b/www/extras/yui-ext/resources/css/toolbar.css @@ -0,0 +1,53 @@ +.ytoolbar{ + background-color: #ebeadb; + border: 1px solid #cbc7b8; + display: block; + padding:2px; +} +.mso .ytoolbar, .ygrid-mso .ytoolbar{ + background: url(../images/grid/mso-hd.gif); +} +.ytoolbar td,.ytoolbar span,.ytoolbar input,.ytoolbar div{ + font:normal 8pt arial,helvetica; +} +.ytoolbar .ytb-button-disabled .ytb-button-inner{ + color:gray; + cursor:default; +} +.ytoolbar .ytb-button-inner{ + background-position: center; + background-repeat: no-repeat; + display: block; + height: 16px; + width: 16px; + cursor:pointer; + white-space: nowrap; +} +.ytoolbar .ytb-text{ + padding:2px; +} +.ytoolbar .ytb-button{ + padding:2px; + display:block; +} +.ytoolbar .ytb-button-over{ + background-color:#c3d3ed; + border:1px solid #316ac5; + padding:1px; +} +.ytoolbar .ytb-sep { + background-image: url(../images/grid/grid-split.gif); + background-position: center; + background-repeat: no-repeat; + display: block; + font-size: 1px; + height: 16px; + width:4px; + overflow: hidden; + cursor:default; + margin: 0px 2px 0px; + border:0px; +} +.mso .ytoolbar .ytb-sep, .ygrid-mso .ytoolbar .ytb-sep{ + background-image: url(../images/grid/grid-blue-split.gif); +} \ No newline at end of file diff --git a/www/extras/yui-ext/resources/images/grid/arrow-left-white.gif b/www/extras/yui-ext/resources/images/grid/arrow-left-white.gif new file mode 100644 index 0000000000000000000000000000000000000000..63088f56e1c33fd23437ab00ef3e10570c4a57fa GIT binary patch literal 825 zcmZ?wbhEHbWMSZBXlGz>`0uc0#Y_e;`2YVugfU8vhQJ630mYvz%pkAofCx~YVBipA cVC0bDXlQU?ViVMIiI|XhxRH&WjfKG)0LI-8@c;k- literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/arrow-right-white.gif b/www/extras/yui-ext/resources/images/grid/arrow-right-white.gif new file mode 100644 index 0000000000000000000000000000000000000000..e9e06789044eacb8a695cd1df46449bcb2b9aa07 GIT binary patch literal 825 zcmZ?wbhEHbWMSZBXlGz>`0uc0#Y_e;`2YVugfU8vhQJ630mYvz%pkAofCx~YVBipA cVB}zNNKj~OV&PY_IbpESp@o^1jfKG)0Ls}94FCWD literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/done.gif b/www/extras/yui-ext/resources/images/grid/done.gif new file mode 100644 index 0000000000000000000000000000000000000000..a937cb22c84a2ac6ecfc12ae9681ab72ed83ca78 GIT binary patch literal 133 zcmZ?wbhEHb6krfwXl7towPL}p0*huu%~roJzC1V7qiQ)z(xVq;t8Q*e g@TwP&*%vbDj%DY0^FxMh_Sd^OqF)Bg*^}7&&A#5)LvkG7IyS zOnBJr%r7CL!Q$}XP&==XoWqO@51m;T- zPZpr7|1;=-+z!eU3>@+d`VlJv8V|8>3M$wXTxdAR#L6ikV-V2L(7?dJ#=^p24FK}3 BP__U7 literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/grid-blue-hd.gif b/www/extras/yui-ext/resources/images/grid/grid-blue-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..862094e6803f522712e4d193c7becd8e9b857dd3 GIT binary patch literal 829 zcmZ?wbhEHbWMmL!XlGzJa`*r7`~Ocp_<#1%{|it4Uw-=k+VlT6U;e-I>i_*W{~x~l z|K$Du=O6#S`uzXxm;WEW{r~*q|F@t2fByde=kI?YU>F6XAuyCfK=CIF(E0xvbU>Z} m<=_zzU~q6?um%8<;zWG_ literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/grid-blue-split.gif b/www/extras/yui-ext/resources/images/grid/grid-blue-split.gif new file mode 100644 index 0000000000000000000000000000000000000000..5286f58f6f798184c3eeacba1352cfd39b9ae03e GIT binary patch literal 817 zcmZ?wbhEHbWMbfDXlG!Ub?iS7FpPrH5Ezjmp!kyo=(oA`P8%SHjuGk&%@0ppYOTwO7TCppKD04vtxj( zk)8oFBLf42;y+oZ(#)I^h4Rdj3>8V47nBGRLn+Q9-(eXZMC@T`q-A zfguTok_rhvuF+B}YGk&S-hZ1Y!QP;7UE)!jv*adK6)hob2AOf}GE&w)<#=MknJHoV zY^}*Md|xE}K6*MO&RAU_^MUKk=Djk=g^pDJi6uprK3M%`#IdVL zUEAw4e{ zmg0{~p6|Ie&p`6H%mYO|r)_gjg|As;$iv1hQk=MZgX#CFjEx2xI6HUG&(-w8Y7Wpj zcm93g6udbnGzoX) literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/grid-vista-hd.gif b/www/extras/yui-ext/resources/images/grid/grid-vista-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0972638e8305d32d4a2419b3dd317f3c8fd3fe2 GIT binary patch literal 829 zcmZ?wbhEHbWMmL!XlGzJe){5xGZ#;uy>#l_<(QpFT5;g3%Bd$|0cmlLhGf{|q`H nPk{0S1BVoYrq2Wc#zV~Pyb=r?3JDC2Ol*7#9t#p29T= ~NwO_yO%;SvZ5MdNYf|QNy-I*%yJaj+uTdt+qbZ z4E`Fzb8m}I&!N8OKmWEcCmrLs^Hs&3i)mt@hQVdcqghkaBs*D}tG_lKew4?rTjzIZ z9tSone1TS+TR7tu^CunG)Y7Jg#sw#)sG9C!c0I%LEzP)9;hqRf&)s$D8d5Db{TBs% zgl0~5QQ91luq4Q9tJgt4QLbaxZvAaKeCM9!oy85dg4k>TdBSVqjHub_PG=PO&J-rx z7oYTuF+kH|tG-UK+EkUhDjYx?zW?T|lx>+aOQm zzL$v$zBLo4Cj=G&tw{H}dW?tlTkS)SY4<#NS92z*EY-MMB6Ftp`R=*=*Ev7cS+X%W zMCur^FdlokL}1Y+&aasU2J4#EOuNlnb9CmqgLCGTSY!1BD42pkHY^XidQ5=>YQx%` z*%Pm9D!CkBu&tMWm(%-ejACVWGS2RX5=QOJ$1*tr7F}F+*-OA+Ly&Isg|AEuUYicA z#%IG6kPXkHt{zk2M6zK@Vu^4Q(1zE$?yY6M!^&jQ+2^E?!p7{g*|X6}vuRC3p@jk0 W117c83?+LXEZI4G$p&LV25SKE>nb+@ literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/mso-hd.gif b/www/extras/yui-ext/resources/images/grid/mso-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..669f3cf089a61580a9d1c7632a5b1309f8d0439a GIT binary patch literal 875 zcmZ?wbhEHbWMYtKXlGzpd-4Cei~rYO`oH1Q|BaXbZ@T<{^OgTwuKwS8_5ZeO|94#b zzw`S4UDyBbzVUz0&HsCE{@-`&|NdM558VEL!C+hQ;zA>HJFm1! z#)%1x%x&D_IuR=Z8kt%-g@N({4h;>A%p3w50S6iynb`#tJSI3aHnDO`7-U>H(Adn* Pui(%j;MmmCz+epk$!Kdz literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/nowait.gif b/www/extras/yui-ext/resources/images/grid/nowait.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c5862cd554d78f20683709d0b450b67f81bd24d GIT binary patch literal 884 zcmZ?wbhEHb6k-r!XlGz>`0sG^=;33>fanOrC>RZa5f%c9KUtVTUe*B-pgh6A5y-&E zA>*-O!NDdb7MYkC1`iK4@=0rzWCSQRbnt4Ywd@dF=+rMIANR*%(jvDmG5%#TnwOp& kU}SchrxH17*#QO%<_$5P0_ncfbgjEYUKG8!(7<2~0Pia+WB>pF literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-first-disabled.gif b/www/extras/yui-ext/resources/images/grid/page-first-disabled.gif new file mode 100644 index 0000000000000000000000000000000000000000..1e02c419f5e73fc1ba5770df0448d44adf856288 GIT binary patch literal 925 zcmZ?wbhEHb6krfwXlGzZPfyRu$tfx-s;H=_udjFb@6g=b+}hgO*4EbE-rn8a-P_yS z*VotI-#=;6q{)*fPnj}h=FFM1XV0EDZ{Ga*^A|2$xOnm6B}gPhY%v@z$+dw{PFR zd-v{x2M-uV!Dt8!L;Mq+#E6<8x|aFW_O4e+3))3Q*|Q=94?bWMk!6jGP<+(r$fM>Xwqe7gmNr&4?FkK$jz>EMMFb>zJ~*Z~ zvMU=|C?p6pu`gocw@ENKkig96%Ptk5a9{xwcPOV4M}k2k%Q{v@i4+D0okN>5F7xql HFjxZs_zi%( literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-first.gif b/www/extras/yui-ext/resources/images/grid/page-first.gif new file mode 100644 index 0000000000000000000000000000000000000000..d84f41a91fca3a0ccc1107a78ffbf7b62c527afb GIT binary patch literal 925 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!N5_)V9X)ov0=f%X7nX_llo;Ppa!i5VLFJ8Q4$&%&Em#6pV(z;0OW5pDfG_ z46F<~Am@Pc1OrC}12>0^$A$$5o7t@;-Y_UNJMxKf6&W}lT+k*Y$eyJjc<@21kdg?` z9)m}X2f37ODg+`IICZeGskVGL@ZdlLlaQT?!H)&bz6?zAIR*(A8e5nhSgkHN9C*OQ m>dC5ipkT8?(+Va*AAy7q4&fY(0%9#)p=)k#W@Tbxum%8@3U^Ha literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-last.gif b/www/extras/yui-ext/resources/images/grid/page-last.gif new file mode 100644 index 0000000000000000000000000000000000000000..3df5c2ba50b143fca7d168d5acbcc4404b903ee8 GIT binary patch literal 923 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!N5_$V9X)ov0=f%X7)sh7DeV(M==$yO&0_YC2+|IvM<}Q z@ZbVY8B+}&lf=VK2L;XIwg}8jWa;H%bG(qjsCck}M+|z`(?y z1M&eVPcU$JFtBpScx+g3u$hC^!6V}XBXb*zY)A!1phGj4Fjq*7gQ62lFOR54M?r!E kLmQ{U6cz@-#wJD`MJWvdVWq}d0_-7oPHt8|*uY>70KTb0MF0Q* literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-next.gif b/www/extras/yui-ext/resources/images/grid/page-next.gif new file mode 100644 index 0000000000000000000000000000000000000000..960163530132545abe690cb8e49c5fef0f923344 GIT binary patch literal 875 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!NB3cV9X)ov0=f%W)9;69vKr@Ionu*A5?G{Hgn3DYJ|un wK6d5q<#D`_!KiqUp-ntt3Jb$U#ts%8MWY1*!jGC}2?&SWIk{Q=U;~3S0KQg&YXATM literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-prev-disabled.gif b/www/extras/yui-ext/resources/images/grid/page-prev-disabled.gif new file mode 100644 index 0000000000000000000000000000000000000000..37154d62406ddc064dba311b95f554e49ad38003 GIT binary patch literal 879 zcmZ?wbhEHb6krfwXlGzZPfyRu$tfx-s;H=_udjFb@6g=b+}hgO*4EbD-QC;U+t=4O zY0{+0lPAxdIdk5;dGqJbU$}7L;>C-XELpN*#fp_HSMJ!cW9QDDr%#{0ef##^yLTBz z!Dt8!oe)s`$->OQz{;Qlaxy4SFmU)VaC69bY*=uxnSOV literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/page-prev.gif b/www/extras/yui-ext/resources/images/grid/page-prev.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb70cf8f6a3b7f524bbeb3656d875a823b27fd7c GIT binary patch literal 879 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!NB3eV9X)ov0=f%W)AK)kBA8^Y;DZmPc|?ZI=9Q{X*oQZ zkbJD2lgIqQijPiCj2*mD6%7sx9yN0CvxS^laG;@KrlbJNftid9=jS`{vav8&0{~Hw Bh1385 literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/pick-button.gif b/www/extras/yui-ext/resources/images/grid/pick-button.gif new file mode 100644 index 0000000000000000000000000000000000000000..6957924a8bf01f24f6930aa0213d794a3f56924d GIT binary patch literal 1036 zcmZ?wbhEHbA}e@6f*BUeEG-{mbu9UVeYtn)@A#A9pQ#+`IB&@5(0= zRzH}y`r(9CPbRH>G-dUZ>1!TLU-xM0+NU$tJ)FJ%!HkVh=4^U8ck{CaTb?f6`F!=h zms^g%-go-h&Rf5C-u=Dz!SB6~|L%M6=kVF*ht9t`fBVhRyMGQn`g7pPpQDfe9DDTl z(5wGPUi>@u`u~ZCzfU~=ed^KQvyc9qee&n@+yCcY{k`z?&xIF%F1`GB>D9kWZ~k3* z`RB^(KUZJ||Ns8~&oBx`LjW}d6o0ZXGcYhR=zxSld4hrCB?B{ujK>Cr zPF^XagaZi+ome=9Dmm#SD}7El7CSA;=KXekY^RG>e-{ zuuVYm(pR@|5zQ!{2@Y3s!WlFkEt+xRKzr=&*z_|U*@qgNWbB##KVWn?)_GXn$>4`} z#Rk5^9iqw$CMLJ{owi8Xkg$-crJaR6?!tz^#b0>Dw8Q57c+l9;Af%gcqV6G6E2r=p gYaW5X0}L(q1$Yc3_9+}>;A5Sv9e-|5r2~UC0H_cnr~m)} literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/refresh.gif b/www/extras/yui-ext/resources/images/grid/refresh.gif new file mode 100644 index 0000000000000000000000000000000000000000..254203b52ee25c86ef4a9424cc7d6866665c1a23 GIT binary patch literal 1015 zcmZ?wbhEHb6krfwXlGzB^-R`JI$@Z4*0Si4UD;!Yvd3=KPrPa$$4+2~o5YYjjlto+ zgJ0v5u(qcW?N5{Xp5;t=o;Uq@>eSC!GryM2eo;05W#Qbf^$TB?FZx!y{Kx9+MceNc zOd(?r_V}mu<^lb+3BWvifKDhF=r5{+_n;&#b+F7jHVTc+2_ayKk@F zd13AT+naCnZ@b;U@6Lw#2mWn4cyaULJG)QZU3BRG@yC7FUavoV?*6Gu_b*+4aO2Ly zv(K(wdwJ#Fo2&Pqyt(n{+ns0MZ$1Bi_vw%OFaO_r{r~yr%g?`Fe(?Oq!xujuz54(7 z_5UZYem;5q^ZC2~FW&xo@$Tn~cmH2~`2Xg^uQwllzxnk4{pUaLzx@CF?a$|Le?Ncw z|K(~F^zyJUG^Z(c1|9}4c`|}rw{{I7k z|Ns7j0K+I4njxV0lZBCiftx`GQ(}D!&&C7gE(+~Y%_;4`oEKAO% zDV*%`0uc0#Y~1#Fd70QG6WQVvM_@@t^*=Kd4hpMoPm)=!oz@} Wp_zkK%;&@eg~RP^@=P2Y4AuaU4Gd)f literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/grid/sort_desc.gif b/www/extras/yui-ext/resources/images/grid/sort_desc.gif new file mode 100644 index 0000000000000000000000000000000000000000..e12e0b6f8edf5060cfc1f0929128b686bc5bfd83 GIT binary patch literal 825 zcmZ?wbhEHb`0uc0#Y~1#Fd70QG6WQVvM_@@t^*=Kd4hpMjDeAZMId2; VV>6?WoXd=Whlkn(_}N$(tO1K24DE9#Hd|0*@ZIv{eO*Nb# z12yCIrOhLLJlbn33DTB}t(F_b2bV4~y*j=}%v9m90(t13QX1^b_==P$D+H{5*5Mu? z8gKY>BXXf^7@!+sCzFj+>XgJsqfc(1Ya(r=#J=3 zlZtj9{~(p*xA$9X2mMtN6e0bM#^36uHAhJ9Q&;+@HQ_ThCJ=yPPcaaStzMs1DHP_0 zvw_E92pgO+s83$0SnZp{u*pvQ$A3#Rftg(VD(=52XCTzUftd4T-22$PQrgIR*gHx4 z{43C_yk?5j?(i$Mual4dFf?{<9Wn}qfaB%>iNwkdu&q!m&h2IcZ$2Th!C8}<*_&Pr zyKl`OZw8N)3D^4?RK}UoD=o00gbKYHy=yv32mZ9Dl8aIS8x^Z$2?NwcBLzFmZOtoW zzN62&u*QDIz{Fy}^YAXY&Txmg7ATSAhAr8K5fZbFZ*SFa$_qE2L|VVFHOI{wKE8B_ zGXV2p-56OO`rc4Z7g3zbj)2_3YjK$((`OUqD%*mgvS`YELYsVW1or1)YW%;)D$oE>#r zQ3z|D(W$Eg`c?NY^+fD&+nctrc25@u47U__J8-QW7NqK!$T9C@*SpuaHyFRRpIGae rj_Lao#za}+eaj_<`F9!mRdtBiaY8;H#gW zSa7hJLs%>3#D;~3+Xa-p=6GyebhKN-IP1=djf;=>D>!$_cy3y9a}Xwye0g*kiI*?5Qm)FE0;R>^0YG>#D1(BQ|H< zJ+*c9_4NsdyJWq$t+}~5+bHZ`26bb>Fw+9?{8q{mh;)M z;o;#9VePm%<_-)keXI&13X+SGPcUjpFOm89>EMaUrq*9_1im<)>j_>RcXrp-*Vi{B zpPuKtd)wRFJBnZ5JG*=P`}+r)x#j)#?D+Wj#ANOGb9;7vetu!G_k6#-yS~1@u{rzx TxxKr;zkhJJn^{~^fWaC7A4QuF literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/sizer/e-handle.gif b/www/extras/yui-ext/resources/images/sizer/e-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..8ed9578fbc8fe27e7764c5c9c9884019c515e4f2 GIT binary patch literal 1586 zcmZ?wbhEHb*pKCAv-hK1$|Ns9CqhK@yMn(uI{$v4q z^gn|R$h)9C!NBpKfm=XAL80MbGZUwri^YZqhZs0z^?H5?BpvP&kx!db5t!`W$7S2b zqB-%Q$7EIBJeSUo%H9(-b?1e=ob=3RreXN4Gm*mSr)OK$9{O`qIOF^RkA5xFQ(IO9 zFA8Y)Qk9(g>dN%6%}IB6ZPp537_~c2R9fuK^(DT0C)w`)@-kv`_TxiyyRYTm+?Dlm z+u82#x%YQh|7ByF6IPITsO+X(*qn%W@yBY|oz3n@jiJwDpWpD!D2@#*RM zbouaqd#t{`KC@K){5zTIFYoRwZ~uS)Uu;d~r?Y35yRVo1RrUSt+WvO_e>SyWKknT> zJ%9fHy1zfqK96ts%NTLLo=K|Xej|%gL_(8*oyNju5wi@%W(mC&iq(=uJ08}`wQ)S^ zU@r4m)TA`+$HFenMHNXcqO(ps>K2aMv8dblS;yl(gIhO}`i(wCBu{X-7xARuS!$-r zBtxy6DwFLl{a7+3@KuG%R2RL@rISOsESFA=YWlf!dTg9#+RVgBGoQ{#TXpj3tc*=F z(`J{P%UnLE;@C>{IW_xUs!yq9`t^KTlbF|wh3RZvD`vN;S*=*yYqTq4ZlxC2%O&OS zey&(Dz3kM>#H|1C1|^EO$rfo z+L5H9y>_?Km(^YevrN{w?_G6EYxPtsY27W0lC0Kly;`+PYugID(`&cfoK>}U+r3HF z>vlZM%g)>NbkXg%J74YMez*J0q1$= z#m;Ql!)0Ex;fSE~pMrgVt$aQn{r%5+<5B5$o=+zvs$&XIN=?2~cuJ%G&Zm>wyJd{e zNS=-{KC4z-v-zB5_aCG4I_G(|oV8uOXY+X{<=QP5UH`8sx$J2y`{k0Kx9^uL0l~7R zS7Y+uZoQU}u4{HJB|g{eTv~=t9i%wZo6B0*|z+8;%WZg@Au;S RYq#I47x(+IoRN{i8UQ&+wvzw= literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/sizer/s-handle-dark.gif b/www/extras/yui-ext/resources/images/sizer/s-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..3e50bfdccbfa4bf40d864a548f45c46488c39516 GIT binary patch literal 1060 zcmZ?wbhEHbyui-I(9Qq?p^ZEL|NjqWjuN9GFtS2G@h1x-$j3S$0+c5hIQ}y*a>#gW zSa7hJLs%>3#D;~3+Xa-p=6GyebhKN-IP1=djf;=>D>!$_cy3y9a}Xwye0g*kiI*?5UFU1_q}2ZmnDnS(jHwY|grS zYU}Fj>k|%l$$D>Fb8~aX+fl6@9wVn{Oa!M?d$LFZ(!z@^VzW> zaVFC%HL)EM4v!B{Q1+hZvvbqa(=&{-@15DX`T6+;&fRjpySBW%ydrpY+}T}QUtiyl ze0rYm?rm>x?*pKCAv-hK1$|Ns9CqhK@yMn(uI{$v4q z^gn|R$h)9C!NBpKfty3dW5a@j%^bp7F()=GJlrmz>@~+@*_y+_d!cbc5tmb38XMJ3HH=_|=`0o0p%T&eFss>$PRY#l;?zwPH_g zS$TPRz+$htURzgPT^+GG>+Y$otFNz5INT-cy=~3S%^8SEyn4wsm)R zSA2eT_w@Gl_xCq2bIbYc_;8=GLs&cR%#MwZk55qcp69c3)6>&4jI-~Z*}3`o`3271 za=yE^yu7?3cy-*_U0YvY-;lgLFFS!D_clY;{b^@+Z-0OPKr^?z-<};GAD@`49e-}m zj)vzK7JJY4+q>)Q>l>T1@1NVd`}_L`hr9pF`|sQH^Ye?#tK-k_+xz?bhsUSq`|scP z_xF$2(gq)D>g)e8{g{5gfkiCiK_iFSiU&6UOeu1VAFgu!9^_d z$wUvel}{%5n7w>5IlxWx>6DPL%%@W$(pEm57E|`}>GXs)&1W-Gre!{xnXzo;vspRY zUOt;$a7^?0oRVvq&*xS=Tlsum&9|4&=Qprvy;#s9mi1y`huW$ai+apny;wZKP3z^7 vDPdVJm(ECA^>W#qvR5ycFKE+xwPMM%tXC^nEL-(z)tYUuvZgXJGFSruAz(gO literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/sizer/se-handle-dark.gif b/www/extras/yui-ext/resources/images/sizer/se-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..c4c1087868afab5b5bfd329f52d9907eb1c0061a GIT binary patch literal 838 zcmZ?wbhEHb+YZ5$9Lfxg96SOJ k3mltSSY>Q9925^Vv52er?AV~l(9La}b>~E3vIB!P0N;ZWjQ{`u literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/sizer/se-handle.gif b/www/extras/yui-ext/resources/images/sizer/se-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..972055e7b297a702ab9aa2d799d133b94ac92315 GIT binary patch literal 853 zcmZ?wbhEHbP>N`pGZ~Mnho8hJfNv7NFbz zGw6VP0Ll{#93BkXEDQz{m>9U2`1mY59wan2v+>DUbUa9CYUbk8vpDe}p}Col&(4D5 nVM0r@5TBn##ssI+({++}P2ntFc6OFU=BqtBjh~-wV6X-N4r^0| literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/tabs/tab-inactive-right-bg.gif b/www/extras/yui-ext/resources/images/tabs/tab-inactive-right-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..602555e9808d1b77b6932ac5492962da5de22675 GIT binary patch literal 1602 zcmeH`|5K6&0Eb_VGcNUVt5dI8y0aMqt*$lCm2KR)p^1{0o@;le+pV0U?P@yfZu`Nq zQ-@k^G;C7`X(90X1qBg7K}AJGBo%ovML+~zco8%d^xV#^KVx@&{(|Ru?mj7(iHV(slUr0x#x8nRQ=sXDLEK@B3;BY%WIC{@}@;S7DYoW>96#GUaN}Ua!fxx zz_)9d$+agk!~(}WI}6NHi~A6Wmw)jRK_XmV5|tt=YDvGxI9wSVO&%0&S|(|+cd5() zul;2ki9sF`ZzFnsv2kWd;`f;3wfl!X=kM=&;dwA$BOTiFZ&*}}D>CUndplml*lpxI z*aw0zrV3Peq3J$4j%|7nk^q}3!-yF3!=q$a8yH!@HdjTJ!{+LkD$HulNqXVxFBlek zm5LWmwq}KlVJvm$b%mDtL>t@kD9Hy~9utD%*BU+#FS_w7`D5nVZ|Mn+HCiSy-ufgv zr^x#IwE~Wno?Gs)Hs)Qh4nMs?FS7kn$l}=kED<_vO}8iF?agJnB74id6^Hh~&pwBp zQ4xfNnGeG$@UxmYF5Fs|;Dp;6h=({?Vc8VNi>C!#2dlZ<>1bzGVV&&fbc&P1W^pN8 z@)ss2$eY;5A{_!91?d#oxJcKa&xv#o2jN`2(F-4p^i0NquHNYc#KnI}#H|aoImPRJ z`T}rWxcoh$MVYE_ZqXXO*gXKVK)2W>MBI{%37lteOGoO?I%fqv(!YI(M+O|Mdlv|d zDA^c6pX%U^qRzNBKX%u(sfa;TcP39Zmb_NRGCE#Q;gg$x zP@Praz0xz960bUumR&lNe0uP7nUZk$*4Au9ME%xW`l*hx`OFl9Xa4G!w|*pL z=XY-FVsEOqq5Pjhefpf*4Bui#Q@!sM5mft@E=fZD%L%Fszv1*!y?-SRiB|iK(R-mg frpRFOj`^MU9__4#eB>5QQ9t`|R|cR^z{P(7FnR^( literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/tabs/tab-left-bg.gif b/www/extras/yui-ext/resources/images/tabs/tab-left-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..c8b24947d85ed29d5acdc1bb43c21586e92201ec GIT binary patch literal 877 zcmZ?wbhEHbWM(j8XlGz>`0tQ9`TXQ9_YdFtdF;;5llOj|eemnTqhFVw{J!?=_pKMd z@4ou;;LV@M@Bcje`1jT4zi+?({qX(Y=b!(+|Ni&u@BhF5L4aWtjE2C_3<1TTEX*L6 z>wpMQo?zhcVqoXsFu35Yyx{3RGJd2n4&a}vWwrAyLb^mFMj11NQ<%3;G literal 0 HcmV?d00001 diff --git a/www/extras/yui-ext/resources/images/tabs/tab-right-bg.gif b/www/extras/yui-ext/resources/images/tabs/tab-right-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..92b3319cdd224a0c221f1268a9933d8cedebe926 GIT binary patch literal 1607 zcmeH`{Zo<$0LSShWm9){h3yumJ3U3h>kT>%M#1~K~8i|OsVQLD3p!o1SASlX6}NV@yHjpl=`iwhAs7yciQBg1H4*rTW{Gm+O|z=KG5N_ zZu;!59fxPf<=xrx`F;Kuz+UpQ!2h$rn;v+;i{-fg^zSEN2tO|A-@eZ|d$g4=vNkD-LU5d>)D zyiQdMzT(vgBA@wJdkP)%**Kr2?o7wRqwxLgXPg{fk#@YFGt+%WS`(2b;6CS3)NMCT zw|31BoHvf&O&fTi6<%_HTE#%OPFx-k{2K0A`J%LXFE(#tu-EvcK02-WlcBz4#jV5C z1@0;EvZ^(ib})UIZ&ow2IeE(AerTqrK+&B3gMb7dEP)o3!U3C3QV|@PAsSpWj?uCC zlcJ;&)+=pkEg2)jo6szes+$}Ux@>wW%^#ULD)OvnA({EA(Gjo9Zd9~nibs83w*%6t z#A3gHC$(Qv4iBg3FC$`^`d>m40ewXn0lj!-ADOcF>+5-FWB{rRSgeYwL>sDO8Yza~ z&josy_aaxstqScjtWC5rO|^}2p- z_9^mLT^G}GzO`=7L|+Vb&KA(pozG9-sddhM%27J!iNa8q=0iogOZ(n@t!v?JC`Reh nVZ5PkeROb!dl7Y@&TT+qC*8)d'; + return b; + } + + // build as dom + /** @ignore */ + function createDom(o, parentNode){ + var el = d.createElement(o.tag); + var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute + for(var attr in o){ + if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue; + if(attr=='cls'){ + el.className = o['cls']; + }else{ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + applyStyles(el, o.style); + if(o.children){ + for(var i = 0, len = o.children.length; i < len; i++) { + createDom(o.children[i], el); + } + } + if(o.html){ + el.innerHTML = o.html; + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + } + + /** + * Inserts an HTML fragment into the Dom + * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. + * @param {HTMLElement} el The context element + * @param {String} html The HTML fragmenet + * @return {HTMLElement} The new node + */ + this.insertHtml = function(where, el, html){ + if(el.insertAdjacentHTML){ + if(where == 'beforeBegin'){ + el.insertAdjacentHTML(where, html); + return el.previousSibling; + }else if(where == 'afterBegin'){ + el.insertAdjacentHTML(where, html); + return el.firstChild; + }else if(where == 'beforeEnd'){ + el.insertAdjacentHTML(where, html); + return el.lastChild; + }else if(where == 'afterEnd'){ + el.insertAdjacentHTML(where, html); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + } + var range = el.ownerDocument.createRange(); + var frag; + if(where == 'beforeBegin'){ + range.setStartBefore(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el); + return el.previousSibling; + }else if(where == 'afterBegin'){ + range.selectNodeContents(el); + range.collapse(true); + frag = range.createContextualFragment(html); + el.insertBefore(frag, el.firstChild); + return el.firstChild; + }else if(where == 'beforeEnd'){ + range.selectNodeContents(el); + range.collapse(false); + frag = range.createContextualFragment(html); + el.appendChild(frag); + return el.lastChild; + }else if(where == 'afterEnd'){ + range.setStartAfter(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el.nextSibling); + return el.nextSibling; + }else{ + throw 'Illegal insertion point -> "' + where + '"'; + } + }; + + /** + * Creates new Dom element(s) and inserts them before el + * @param {HTMLElement} el The context element + * @param {Object} o The Dom object spec (and children) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + this.insertBefore = function(el, o, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.parentNode.insertBefore(newNode, el); + }else{ + var html = createHtml(o); + newNode = this.insertHtml('beforeBegin', el, html); + } + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }; + + /** + * Creates new Dom element(s) and inserts them after el + * @param {HTMLElement} el The context element + * @param {Object} o The Dom object spec (and children) + * @return {HTMLElement} The new node + */ + this.insertAfter = function(el, o, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.parentNode.insertBefore(newNode, el.nextSibling); + }else{ + var html = createHtml(o); + newNode = this.insertHtml('afterEnd', el, html); + } + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }; + + /** + * Creates new Dom element(s) and appends them to el + * @param {HTMLElement} el The context element + * @param {Object} o The Dom object spec (and children) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + this.append = function(el, o, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.appendChild(newNode); + }else{ + var html = createHtml(o); + newNode = this.insertHtml('beforeEnd', el, html); + } + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }; + + /** + * Creates new Dom element(s) and overwrites the contents of el with them + * @param {HTMLElement} el The context element + * @param {Object} o The Dom object spec (and children) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + this.overwrite = function(el, o, returnElement){ + el = YAHOO.util.Dom.get(el); + el.innerHTML = createHtml(o); + return returnElement ? YAHOO.ext.Element.get(el.firstChild, true) : el.firstChild; + }; + + /** + * Creates a new YAHOO.ext.DomHelper.Template from the Dom object spec + * @param {Object} o The Dom object spec (and children) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {YAHOO.ext.DomHelper.Template} The new template + */ + this.createTemplate = function(o){ + var html = createHtml(o); + return new YAHOO.ext.DomHelper.Template(html); + }; +}(); + +/** +* @class +* Represents an HTML fragment template +* @constructor +* @param {String} html The HTML fragment +*/ +YAHOO.ext.DomHelper.Template = function(html){ + /**@private*/ + this.html = html; + /**@private*/ + this.re = /\{(\w+)\}/g; +}; +YAHOO.ext.DomHelper.Template.prototype = { + /** + * Returns an HTML fragment of this template with the specified values applied + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @return {String} + */ + applyTemplate : function(values){ + if(this.compiled){ + return this.compiled(values); + } + var empty = ''; + var fn = function(match, index){ + if(typeof values[index] != 'undefined'){ + return values[index]; + }else{ + return empty; + } + } + return this.html.replace(this.re, fn); + }, + + /** + * Compiles the template into an internal function, eliminating the RegEx overhead + */ + compile : function(){ + var html = this.html; + var re = /\{(\w+)\}/g; + var body = []; + body.push("this.compiled = function(values){ return "); + var result; + var lastMatchEnd = 0; + while ((result = re.exec(html)) != null){ + body.push("'", html.substring(lastMatchEnd, result.index), "' + "); + body.push("values[", html.substring(result.index+1,re.lastIndex-1), "] + "); + lastMatchEnd = re.lastIndex; + } + body.push("'", html.substr(lastMatchEnd), "';};"); + eval(body.join('')); + }, + + /** + * Applies the supplied values to the template and inserts the new node(s) before el + * @param {HTMLElement} el The context element + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + insertBefore: function(el, values, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode = YAHOO.ext.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values)); + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }, + + /** + * Applies the supplied values to the template and inserts the new node(s) after el + * @param {HTMLElement} el The context element + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + insertAfter : function(el, values, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode = YAHOO.ext.DomHelper.insertHtml('afterEnd', el, this.applyTemplate(values)); + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }, + + /** + * Applies the supplied values to the template and append the new node(s) to el + * @param {HTMLElement} el The context element + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + append : function(el, values, returnElement){ + el = YAHOO.util.Dom.get(el); + var newNode = YAHOO.ext.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values)); + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + }, + + /** + * Applies the supplied values to the template and overwrites the content of el with the new node(s) + * @param {HTMLElement} el The context element + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a YAHOO.ext.Element + * @return {HTMLElement} The new node + */ + overwrite : function(el, values, returnElement){ + el = YAHOO.util.Dom.get(el); + el.innerHTML = ''; + var newNode = YAHOO.ext.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values)); + return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/Element.js b/www/extras/yui-ext/source/Element.js new file mode 100644 index 000000000..b178ebe98 --- /dev/null +++ b/www/extras/yui-ext/source/Element.js @@ -0,0 +1,1247 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class Wraps around a DOM element and provides convenient access to Yahoo + * UI library functionality.

+ * Usage:
+ *

+ * var el = YAHOO.ext.Element.get('myElementId');
+ * // or the shorter
+ * var el = getEl('myElementId');
+ * 
+ * Using YAHOO.ext.Element.get() instead of calling the constructor directly ensures you get the same object + * each call instead of constructing a new one.
+ * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.Anim (optional) to support animation + * @requires YAHOO.util.Motion (optional) to support animation + * @requires YAHOO.util.Easing (optional) to support animation + * @constructor Create a new Element directly. + * @param {String} elementId + * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class). + */ +YAHOO.ext.Element = function(elementId, forceNew){ + var dom = YAHOO.util.Dom.get(elementId); + if(!dom){ // invalid id/element + return; + } + if(!forceNew && YAHOO.ext.Element.cache[dom.id]){ // element object already exists + return YAHOO.ext.Element.cache[dom.id]; + } + /** + * The DOM element + * @type HTMLElement + */ + this.dom = dom; + /** + * The DOM element ID + * @type String + */ + this.id = this.dom.id; + /** + * @private the current visibility mode + */ + this.visibilityMode = YAHOO.ext.Element.VISIBILITY; + + + /** + * @private the element's default display mode + */ + this.originalDisplay = YAHOO.util.Dom.getStyle(this.dom, 'display'); + if (!this.originalDisplay || this.originalDisplay == 'none') { + this.originalDisplay = ''; + } + + /** + * The default unit to append to CSS values where a unit isn't provided (Defaults to px). + * @type String + */ + this.defaultUnit = 'px'; + + /** + * @private the element's default overflow + */ + this.originalClip = YAHOO.util.Dom.getStyle(this.dom, 'overflow'); + + + /** + * Fires when visibility changes. Uses fireDirect with signature: (oElement, boolean isVisible) + * @type CustomEvent + */ + this.onVisibilityChanged = new YAHOO.util.CustomEvent('visibilityChanged'); + + /** + * Fires when element moves. Uses fireDirect with signature: (oElement, newX, newY) + * @type CustomEvent + */ + this.onMoved = new YAHOO.util.CustomEvent('moved'); + + /** + * Fires when element is resized. Uses fireDirect with signature: (oElement, newWidth, newHeight) + * @type CustomEvent + */ + this.onResized = new YAHOO.util.CustomEvent('resized'); + + // The delegates below handle setting of 'this' when being called from other objects. + + /** + * @private + */ + this.visibilityDelegate = this.fireVisibilityChanged.createDelegate(this); + /** + * @private + */ + this.resizedDelegate = this.fireResized.createDelegate(this); + /** + * @private + */ + this.movedDelegate = this.fireMoved.createDelegate(this); +} + +YAHOO.ext.Element.prototype = { + // Utility methods to make firing events painless. + /** + *@private + */ + fireMoved : function(){ + this.onMoved.fireDirect(this, this.getX(), this.getY()); + }, + + /** + *@private + */ + fireVisibilityChanged : function(){ + this.onVisibilityChanged.fireDirect(this, this.isVisible()); + }, + + /** + *@private + */ + fireResized : function(){ + this.onResized.fireDirect(this, this.getWidth(), this.getHeight()); + }, + + /** + * Sets the elements visibility mode. When setVisible() is called it + * will use this to determine whether to set the visibility or the display property. + * @param visMode Element.VISIBILITY or Element.DISPLAY + */ + setVisibilityMode : function(visMode){ + this.visibilityMode = visMode; + }, + + /** + * Convenience method for setVisibilityMode(Element.DISPLAY) + */ + enableDisplayMode : function(){ + this.setVisibilityMode(YAHOO.ext.Element.DISPLAY) + }, + + /** + * Perform Yahoo UI animation on this element. + * @param {Object} args The YUI animation control args + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + * @param {Function} animType (optional) YAHOO.util.Anim subclass to use. For example: YAHOO.util.Motion + */ + animate : function(args, duration, onComplete, easing, animType){ + this.anim(args, duration, onComplete, easing, animType); + }, + + /** + * @private Internal animation call + */ + anim : function(args, duration, onComplete, easing, animType){ + animType = animType || YAHOO.util.Anim; + var anim = new animType(this.dom, args, duration || .35, + easing || YAHOO.util.Easing.easeBoth); + if(onComplete){ + if(!(onComplete instanceof Array)){ + anim.onComplete.subscribe(onComplete); + }else{ + for(var i = 0; i < onComplete.length; i++){ + var fn = onComplete[i]; + if(fn) anim.onComplete.subscribe(fn); + } + } + } + anim.animate(); + }, + + /** + * Checks whether the element is currently visible using both visibility and display properties. + * @param {Boolean} deep True to walk the dom and see if parent elements are hidden + * @return {Boolean} Whether the element is currently visible + */ + isVisible : function(deep) { + var vis = YAHOO.util.Dom.getStyle(this.dom, 'visibility') != 'hidden' + && YAHOO.util.Dom.getStyle(this.dom, 'display') != 'none'; + if(!deep || !vis){ + return vis; + } + var p = this.dom.parentNode; + while(p && p.tagName.toLowerCase() != 'body'){ + if(YAHOO.util.Dom.getStyle(p, 'visibility') == 'hidden' || YAHOO.util.Dom.getStyle(p, 'display') == 'none'){ + return false; + } + p = p.parentNode; + } + return true; + }, + + /** + * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use + * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property. + * @param {Boolean} visible Whether the element is visible + * @param {Boolean} animate (optional) Fade the element in or out (Default is false) + * @param {Float} duration (optional) How long the fade effect lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing) + */ + setVisible : function(visible, animate, duration, onComplete, easing){ + //if(this.isVisible() == visible) return; // nothing to do + if(!animate || !YAHOO.util.Anim){ + if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){ + this.setDisplayed(visible); + }else{ + YAHOO.util.Dom.setStyle(this.dom, 'visibility', visible ? 'visible' : 'hidden'); + } + this.fireVisibilityChanged(); + }else{ + // make sure they can see the transition + YAHOO.util.Dom.setStyle(this.dom, 'visibility', 'visible'); + if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){ + this.setDisplayed(true); + } + var args = {opacity: { from: (visible?0:1), to: (visible?1:0) }}; + var anim = new YAHOO.util.Anim(this.dom, args, duration || .35, + easing || (visible ? YAHOO.util.Easing.easeIn : YAHOO.util.Easing.easeOut)); + anim.onComplete.subscribe((function(){ + if(this.visibilityMode == YAHOO.ext.Element.DISPLAY){ + this.setDisplayed(visible); + }else{ + YAHOO.util.Dom.setStyle(this.dom, 'visibility', visible ? 'visible' : 'hidden'); + } + this.fireVisibilityChanged(); + }).createDelegate(this)); + if(onComplete){ + anim.onComplete.subscribe(onComplete); + } + anim.animate(); + } + }, + + /** + *@private + */ + isDisplayed : function() { + return YAHOO.util.Dom.getStyle(this.dom, 'display') != 'none'; + }, + + /** + * Toggles the elements visibility or display, depending on visibility mode. + * @param {Boolean} animate (optional) Fade the element in or out (Default is false) + * @param {float} duration (optional) How long the fade effect lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut for hiding or YAHOO.util.Easing.easeIn for showing) + */ + toggle : function(animate, duration, onComplete, easing){ + this.setVisible(!this.isVisible(), animate, duration, onComplete, easing); + }, + + /** + *@private + */ + setDisplayed : function(value) { + YAHOO.util.Dom.setStyle(this.dom, 'display', value ? this.originalDisplay : 'none'); + }, + + /** + * Tries to focus the element. Any exceptions are caught. + */ + focus : function() { + try{ + this.dom.focus(); + }catch(e){} + }, + + /** + * Add a CSS class to the element. + * @param {String} className The CSS class to add + */ + addClass : function(className){ + YAHOO.util.Dom.addClass(this.dom, className); + }, + + /** + * Adds the passed className to this element and removes the class from all siblings + */ + radioClass : function(className){ + var siblings = this.dom.parentNode.childNodes; + for(var i = 0; i < siblings.length; i++) { + var s = siblings[i]; + if(s.nodeType == 1){ + YAHOO.util.Dom.removeClass(s, className); + } + } + YAHOO.util.Dom.addClass(this.dom, className); + }, + /** + * Removes a CSS class from the element. + * @param {String} className The CSS class to remove + */ + removeClass : function(className){ + YAHOO.util.Dom.removeClass(this.dom, className); + }, + + toggleClass : function(className){ + if(YAHOO.util.Dom.hasClass(this.dom, className)){ + YAHOO.util.Dom.removeClass(this.dom, className); + }else{ + YAHOO.util.Dom.addClass(this.dom, className); + } + }, + + /** + * Checks if a CSS class is in use by the element. + * @param {String} className The CSS class to check + * @return {Boolean} true or false + */ + hasClass : function(className){ + return YAHOO.util.Dom.hasClass(this.dom, className); + }, + + /** + * Replaces a CSS class on the element with another. + * @param {String} oldClassName The CSS class to replace + * @param {String} newClassName The replacement CSS class + */ + replaceClass : function(oldClassName, newClassName){ + YAHOO.util.Dom.replaceClass(this.dom, oldClassName, newClassName); + }, + + /** + * Normalizes currentStyle and ComputedStyle. + * @param {String} property The style property whose value is returned. + * @return {String} The current value of the style property for this element. + */ + getStyle : function(name){ + return YAHOO.util.Dom.getStyle(this.dom, name); + }, + + /** + * Wrapper for setting style properties + * @param {String} property The style property to be set. + * @param {String} val The value to apply to the given property. + */ + setStyle : function(name, value){ + YAHOO.util.Dom.setStyle(this.dom, name, value); + }, + + /** + * Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + @ return {String} The X position of the element + */ + getX : function(){ + return YAHOO.util.Dom.getX(this.dom); + }, + + /** + * Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + @ return {String} The Y position of the element + */ + getY : function(){ + return YAHOO.util.Dom.getY(this.dom); + }, + + /** + * Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + @ return {Array} The XY position of the element + */ + getXY : function(){ + return YAHOO.util.Dom.getXY(this.dom); + }, + + /** + * Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + @param {String} The X position of the element + */ + setX : function(x){ + YAHOO.util.Dom.setX(this.dom, x); + this.fireMoved(); + }, + + /** + * Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + @param {String} The Y position of the element + */ + setY : function(y){ + YAHOO.util.Dom.setY(this.dom, y); + this.fireMoved(); + }, + + /** + * Set the element's X position directly using CSS style (instead of setX()) + * @param {String} left The left CSS property value + */ + setLeft : function(left){ + YAHOO.util.Dom.setStyle(this.dom, 'left', this.addUnits(left)); + this.fireMoved(); + }, + + /** + * Set the element's Y position directly using CSS style (instead of setY()) + * @param {String} top The top CSS property value + */ + setTop : function(top){ + YAHOO.util.Dom.setStyle(this.dom, 'top', this.addUnits(top)); + this.fireMoved(); + }, + + /** + * Set the element's css right style + * @param {String} left The right CSS property value + */ + setRight : function(right){ + YAHOO.util.Dom.setStyle(this.dom, 'right', this.addUnits(right)); + this.fireMoved(); + }, + + /** + * Set the element's css bottom style + * @param {String} top The bottom CSS property value + */ + setBottom : function(bottom){ + YAHOO.util.Dom.setStyle(this.dom, 'bottom', this.addUnits(bottom)); + this.fireMoved(); + }, + + /** + * Set the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based) + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setXY : function(pos, animate, duration, onComplete, easing){ + if(!animate || !YAHOO.util.Anim){ + YAHOO.util.Dom.setXY(this.dom, pos); + this.fireMoved(); + }else{ + this.anim({points: {to: pos}}, duration, [onComplete, this.movedDelegate], easing, YAHOO.util.Motion); + } + }, + + /** + * Set the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setLocation : function(x, y, animate, duration, onComplete, easing){ + this.setXY([x, y], animate, duration, onComplete, easing); + }, + + /** + * Set the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + moveTo : function(x, y, animate, duration, onComplete, easing){ + //YAHOO.util.Dom.setStyle(this.dom, 'left', this.addUnits(x)); + //YAHOO.util.Dom.setStyle(this.dom, 'top', this.addUnits(y)); + this.setXY([x, y], animate, duration, onComplete, easing); + }, + + /** + * Returns the region position of the given element. + * The element must be part of the DOM tree to have a region (display:none or elements not appended return false). + * @return {Region} A YAHOO.util.Region containing "top, left, bottom, right" member data. + */ + getRegion : function(){ + return YAHOO.util.Dom.getRegion(this.dom); + }, + + /** + * Returns the offset height of the element + * @return {Number} The element's height + */ + getHeight : function(){ + return this.dom.offsetHeight; + }, + + /** + * Returns the offset width of the element + * @return {Number} The element's width + */ + getWidth : function(){ + return this.dom.offsetWidth; + }, + + /** + * Returns the size of the element + * @return {Object} An object containing the element's size {width: (element width), height: (element height)} + */ + getSize : function(){ + return {width: this.getWidth(), height: this.getHeight()}; + }, + + /** @private */ + adjustWidth : function(width){ + if(this.autoBoxAdjust && typeof width == 'number' && !this.isBorderBox()){ + width -= (this.getBorderWidth('lr') + this.getPadding('lr')); + } + return width; + }, + + /** @private */ + adjustHeight : function(height){ + if(this.autoBoxAdjust && typeof height == 'number' && !this.isBorderBox()){ + height -= (this.getBorderWidth('tb') + this.getPadding('tb')); + } + return height; + }, + + /** + * Set the width of the element + * @param {Number} width The new width + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if width is larger or YAHOO.util.Easing.easeIn if it is smaller) + */ + setWidth : function(width, animate, duration, onComplete, easing){ + width = this.adjustWidth(width); + if(!animate || !YAHOO.util.Anim){ + YAHOO.util.Dom.setStyle(this.dom, 'width', this.addUnits(width)); + this.fireResized(); + }else{ + this.anim({width: {to: width}}, duration, [onComplete, this.resizedDelegate], + easing || (width > this.getWidth() ? YAHOO.util.Easing.easeOut : YAHOO.util.Easing.easeIn)); + } + }, + + /** + * Set the height of the element + * @param {Number} height The new height + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller) + */ + setHeight : function(height, animate, duration, onComplete, easing){ + height = this.adjustHeight(height); + if(!animate || !YAHOO.util.Anim){ + YAHOO.util.Dom.setStyle(this.dom, 'height', this.addUnits(height)); + this.fireResized(); + }else{ + this.anim({height: {to: height}}, duration, [onComplete, this.resizedDelegate], + easing || (height > this.getHeight() ? YAHOO.util.Easing.easeOut : YAHOO.util.Easing.easeIn)); + } + }, + + /** + * Set the size of the element. If animation is true, both width an height will be animated concurrently. + * @param {Number} width The new width + * @param {Number} height The new height + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setSize : function(width, height, animate, duration, onComplete, easing){ + if(!animate || !YAHOO.util.Anim){ + this.setWidth(width); + this.setHeight(height); + this.fireResized(); + }else{ + width = this.adjustWidth(width); height = this.adjustHeight(height); + this.anim({width: {to: width}, height: {to: height}}, duration, [onComplete, this.resizedDelegate], easing); + } + }, + + /** + * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently. + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Number} width The new width + * @param {Number} height The new height + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setBounds : function(x, y, width, height, animate, duration, onComplete, easing){ + if(!animate || !YAHOO.util.Anim){ + this.setWidth(width); + this.setHeight(height); + this.setLocation(x, y); + this.fireResized(); + this.fireMoved(); + }else{ + width = this.adjustWidth(width); height = this.adjustHeight(height); + this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, duration, [onComplete, this.movedDelegate], easing, YAHOO.util.Motion); + } + }, + + /** + * Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently. + * @param {YAHOO.util.Region} region The region to fill + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setRegion : function(region, animate, duration, onComplete, easing){ + this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, animate, duration, onComplete, easing); + }, + + /** + * Appends an event handler to this element + * @param {String} eventName The type of event to listen for + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + addListener : function(eventName, handler, scope, override){ + YAHOO.util.Event.addListener(this.dom, eventName, handler, scope, override); + }, + + /** + * Appends an event handler to this element and automatically prevents the default action, and if set stops propagation (bubbling) as well + * @param {String} eventName The type of event to listen for + * @param {Boolean} stopPropagation Whether to also stopPropagation (bubbling) + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + addHandler : function(eventName, stopPropagation, handler, scope, override){ + var fn = YAHOO.ext.Element.createStopHandler(stopPropagation, handler, scope, override); + YAHOO.util.Event.addListener(this.dom, eventName, fn); + }, + + /** @private */ + + /** + * Appends an event handler to this element (Same as addListener) + * @param {String} eventName The type of event to listen for + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + on : function(eventName, handler, scope, override){ + YAHOO.util.Event.addListener(this.dom, eventName, handler, scope, override); + }, + + /** + * Append a managed listener - See {@link YAHOO.ext.EventObject} for more details. + * @param {String} eventName The type of event to listen for + * @param {Function} fn The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + addManagedListener : function(eventName, fn, scope, override){ + return YAHOO.ext.EventManager.on(this.dom, eventName, fn, scope, override); + }, + + /** + * Append a managed listener (shorthanded for {@link #addManagedListener}) + * @param {String} eventName The type of event to listen for + * @param {Function} fn The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + mon : function(eventName, fn, scope, override){ + return YAHOO.ext.EventManager.on(this.dom, eventName, fn, scope, override); + }, + /** + * Removes an event handler from this element + * @param {String} sType the type of event to remove + * @param {Function} fn the method the event invokes + */ + removeListener : function(eventName, handler){ + YAHOO.util.Event.removeListener(this.dom, eventName, handler); + }, + + /** + * Removes all previous added listeners from this element + */ + removeAllListeners : function(){ + YAHOO.util.Event.purgeElement(this.dom); + }, + + + /** + * Set the opacity of the element + * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc + * @param {Boolean} animate (optional) Animate (fade) the transition (Default is false) + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut if height is larger or YAHOO.util.Easing.easeIn if it is smaller) + */ + setOpacity : function(opacity, animate, duration, onComplete, easing){ + if(!animate || !YAHOO.util.Anim){ + YAHOO.util.Dom.setStyle(this.dom, 'opacity', opacity); + }else{ + this.anim({opacity: {to: opacity}}, duration, onComplete, easing); + } + }, + + /** + * Same as getX() + */ + getLeft : function(){ + return this.getX(); + }, + + /** + * Gets the right X coordinate of the element (element X position + element width) + * @return {String} The left position of the element + */ + getRight : function(){ + return this.getX() + this.getWidth(); + }, + + /** + * Same as getY() + */ + getTop : function() { + return this.getY(); + }, + + /** + * Gets the bottom Y coordinate of the element (element Y position + element height) + * @return {String} The bottom position of the element + */ + getBottom : function(){ + return this.getY() + this.getHeight(); + }, + + /** + * Set the element as absolute positioned with the specified z-index + * @param {Number} zIndex (optional) + */ + setAbsolutePositioned : function(zIndex){ + this.setStyle('position', 'absolute'); + if(zIndex){ + this.setStyle('z-index', zIndex); + } + }, + + /** + * Set the element as relative positioned with the specified z-index + * @param {Number} zIndex (optional) + */ + setRelativePositioned : function(zIndex){ + this.setStyle('position', 'relative'); + if(zIndex){ + this.setStyle('z-index', zIndex); + } + //this.setStyle('left', 0); + //this.setStyle('top', 0); + }, + + /** + * Clear positioning back to the default when the document was loaded + */ + clearPositioning : function(){ + this.setStyle('position', ''); + this.setStyle('left', ''); + this.setStyle('right', ''); + this.setStyle('top', ''); + this.setStyle('bottom', ''); + }, + + /** + * Gets an object with all CSS positioning properties. Useful along with {@link #setPositioning} to get snapshot before performing an update and then restoring the element. + */ + getPositioning : function(){ + return { + 'position' : this.getStyle('position'), + 'left' : this.getStyle('left'), + 'right' : this.getStyle('right'), + 'top' : this.getStyle('top'), + 'bottom' : this.getStyle('bottom') + }; + }, + + /** + * Gets the width of the border(s) for the specified side(s) + * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, + * passing lr would get the border (l)eft width + the border (r)ight width. + * @return {Number} The width of the sides passed added together + */ + getBorderWidth : function(side){ + var width = 0; + var b = YAHOO.ext.Element.borders; + for(var s in b){ + if(typeof b[s] != 'function'){ + if(side.indexOf(s) !== -1){ + var w = parseInt(this.getStyle(b[s]), 10); + if(!isNaN(w)) width += w; + } + } + } + return width; + }, + + /** + * Gets the width of the padding(s) for the specified side(s) + * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, + * passing lr would get the padding (l)eft + the padding (r)ight. + * @return {Number} The padding of the sides passed added together + */ + getPadding : function(side){ + var pad = 0; + var b = YAHOO.ext.Element.paddings; + for(var s in b){ + if(typeof s[b] != 'function'){ + if(side.indexOf(s) !== -1){ + var w = parseInt(this.getStyle(b[s]), 10); + if(!isNaN(w)) pad += w; + } + } + } + return pad; + }, + + /** + * Set positioning with an object returned by {@link #getPositioning}. + */ + setPositioning : function(positionCfg){ + this.setStyle('position', positionCfg.position); + this.setStyle('left', positionCfg.left); + this.setStyle('right', positionCfg.right); + this.setStyle('top', positionCfg.top); + this.setStyle('bottom', positionCfg.bottom); + }, + + /** + * Move this element relative to it's current position. + * @param {String} direction Possible values are: 'left', 'right', 'up', 'down'. + * @param {Number} distance How far to move the element in pixels + * @param {Boolean} animate (optional) Animate the movement (Default is false) + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. + */ + move : function(direction, distance, animate, duration, onComplete, easing){ + var xy = this.getXY(); + direction = direction.toLowerCase(); + switch(direction){ + case 'left': + this.moveTo(xy[0]-distance, xy[1], animate, duration, onComplete, easing); + return; + case 'right': + this.moveTo(xy[0]+distance, xy[1], animate, duration, onComplete, easing); + return; + case 'up': + this.moveTo(xy[0], xy[1]-distance, animate, duration, onComplete, easing); + return; + case 'down': + this.moveTo(xy[0], xy[1]+distance, animate, duration, onComplete, easing); + return; + } + }, + + /** + * Clip overflow on the element - use {@link #unclip} to remove + */ + clip : function(){ + this.setStyle('overflow', 'hidden'); + }, + + /** + * Return clipping (overflow) to original clipping when the document loaded + */ + unclip : function(){ + this.setStyle('overflow', this.originalClip); + }, + + /** + * Align this element with another element. + * @param {String/HTMLElement/YAHOO.ext.Element} element The element to align to. + * @param {String} position The position to align to. Possible values are 'tl' - top left, 'tr' - top right, 'bl' - bottom left, and 'br' - bottom right. + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @param {Boolean} animate (optional) Animate the movement (Default is false) + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. + */ + alignTo : function(element, position, offsets, animate, duration, onComplete, easing){ + var otherEl = getEl(element); + if(!otherEl){ + return; // must not exist + } + offsets = offsets || [0, 0]; + var r = otherEl.getRegion(); + position = position.toLowerCase(); + switch(position){ + case 'bl': + this.moveTo(r.left + offsets[0], r.bottom + offsets[1], + animate, duration, onComplete, easing); + return; + case 'br': + this.moveTo(r.right + offsets[0], r.bottom + offsets[1], + animate, duration, onComplete, easing); + return; + case 'tl': + this.moveTo(r.left + offsets[0], r.top + offsets[1], + animate, duration, onComplete, easing); + return; + case 'tr': + this.moveTo(r.right + offsets[0], r.top + offsets[1], + animate, duration, onComplete, easing); + return; + } + }, + + /** + * Clears any opacity settings from this element. Required in some cases for IE. + */ + clearOpacity : function(){ + if (window.ActiveXObject) { + this.dom.style.filter = ''; + } else { + this.dom.style.opacity = ''; + this.dom.style['-moz-opacity'] = ''; + this.dom.style['-khtml-opacity'] = ''; + } + }, + + /** + * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. + * @param {Boolean} animate (optional) Animate (fade) the transition (Default is false) + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + hide : function(animate, duration, onComplete, easing){ + this.setVisible(false, animate, duration, onComplete, easing); + }, + + /** + * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. + * @param {Boolean} animate (optional) Animate (fade in) the transition (Default is false) + * @param {Float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + show : function(animate, duration, onComplete, easing){ + this.setVisible(true, animate, duration, onComplete, easing); + }, + + /** + * @private Test if size has a unit, otherwise appends the default + */ + addUnits : function(size){ + if(typeof size == 'number' || !YAHOO.ext.Element.unitPattern.test(size)){ + return size + this.defaultUnit; + } + return size; + }, + + beginMeasure : function(){ + var p = this.dom; + if(p.offsetWidth || p.offsetHeight){ + return; // offsets work already + } + var changed = []; + var p = this.dom; // start with this element + while(p && p.tagName.toLowerCase() != 'body'){ + if(YAHOO.util.Dom.getStyle(p, 'display') == 'none'){ + changed.push({el: p, visibility: YAHOO.util.Dom.getStyle(p, 'visibility')}); + p.style.visibility = 'hidden'; + p.style.display = 'block'; + } + p = p.parentNode; + } + this._measureChanged = changed; + }, + + endMeasure : function(){ + var changed = this._measureChanged; + if(changed){ + for(var i = 0, len = changed.length; i < len; i++) { + var r = changed[i]; + r.el.style.visibility = r.visibility; + r.el.style.display = 'none'; + } + this._measureChanged = null; + } + }, + /** + * Update the innerHTML of this element, optionally searching for and processing scripts + * @param {String} html The new HTML + * @param {Boolean} loadScripts (optional) true to look for and process scripts + */ + update : function(html, loadScripts){ + this.dom.innerHTML = html; + if(!loadScripts) return; + + var dom = this.dom; + var _parseScripts = function(){ + var s = this.dom.getElementsByTagName("script"); + var docHead = document.getElementsByTagName("head")[0]; + + // For browsers which discard scripts when inserting innerHTML, extract the scripts using a RegExp + if(s.length == 0){ + var re = /(?:.*<\/script>)|(?:([\S\s]*?)<\/script>)/ig; // assumes HTML well formed and then loop through it. + var match; + while(match = re.exec(html)){ + var s0 = document.createElement("script"); + if (match[1]) + s0.src = match[1]; + else if (match[2]) + s0.text = match[2]; + else + continue; + docHead.appendChild(s0); + } + }else { + for(var i = 0; i < s.length; i++){ + var s0 = document.createElement("script"); + s0.type = s[i].type; + if (s[i].text) { + s0.text = s[i].text; + } else { + s0.src = s[i].src; + } + docHead.appendChild(s0); + } + } + } + // set timeout to give DOM opportunity to catch up + setTimeout(_parseScripts, 10); + }, + + /** + * Gets this elements UpdateManager + * @return The UpdateManager + * @type YAHOO.ext.UpdateManager + */ + getUpdateManager : function(){ + if(!this.updateManager){ + this.updateManager = new YAHOO.ext.UpdateManager(this); + } + return this.updateManager; + }, + + /** + * Calculates the x, y to center this element on the screen + * @return {Array} The x, y values [x, y] + */ + getCenterXY : function(offsetScroll){ + var centerX = Math.round((YAHOO.util.Dom.getViewportWidth()-this.getWidth())/2); + var centerY = Math.round((YAHOO.util.Dom.getViewportHeight()-this.getHeight())/2); + if(!offsetScroll){ + return [centerX, centerY]; + }else{ + var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft || 0; + var scrollY = document.documentElement.scrollTop || document.body.scrollTop || 0; + return[centerX + scrollX, centerY + scrollY]; + } + }, + /** + * Gets an array of child YAHOO.ext.Element objects by tag name + * @param {String} tagName + * @return {Array} The children + */ + getChildrenByTagName : function(tagName){ + var children = this.dom.getElementsByTagName(tagName); + var len = children.length; + var ce = [len]; + for(var i = 0; i < len; ++i){ + ce[i] = YAHOO.ext.Element.get(children[i], true); + } + return ce; + }, + + /** + * Gets an array of child YAHOO.ext.Element objects by class name and optional tagName + * @param {String} className + * @param {String} tagName (optional) + * @return {Array} The children + */ + getChildrenByClassName : function(className, tagName){ + var children = YAHOO.util.Dom.getElementsByClassName(className, tagName, this.dom); + var len = children.length; + var ce = [len]; + for(var i = 0; i < len; ++i){ + ce[i] = YAHOO.ext.Element.get(children[i], true); + } + return ce; + }, + + /** + * Tests various css rules/browsers to determine if this element uses a border box + */ + isBorderBox : function(){ + var el = this.dom; + var b = YAHOO.ext.util.Browser; + var strict = YAHOO.ext.Strict; + return((b.isIE && !b.isIE7) || (b.isIE7 && !strict && el.style.boxSizing != 'content-box') || + (b.isGecko && YAHOO.util.Dom.getStyle(el, "-moz-box-sizing") == 'border-box') || + (!b.isSafari && YAHOO.util.Dom.getStyle(el, "box-sizing") == 'border-box')); + }, + + /** + * Return a box {x, y, width, height} that can be used to set another elements + * size to match this element. If contentBox is true, a box for the content + * of the element is returned. + */ + getBox : function(contentBox){ + var xy = this.getXY(); + var el = this.dom; + var w = el.offsetWidth; + var h = el.offsetHeight; + if(!contentBox){ + return {x: xy[0], y: xy[1], width: w, height: h}; + }else{ + var l = this.getBorderWidth('l')+this.getPadding('l'); + var r = this.getBorderWidth('r')+this.getPadding('r'); + var t = this.getBorderWidth('t')+this.getPadding('t'); + var b = this.getBorderWidth('b')+this.getPadding('b'); + return {x: xy[0]+l, y: xy[1]+t, width: w-(l+r), height: h-(t+b)}; + } + }, + + /** + * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently. + * @param {Object} box The box to fill {x, y, width, height} + * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically + * @param {Boolean} animate (optional) Animate the transition (Default is false) + * @param {float} duration (optional) How long the animation lasts. (Defaults to .35 seconds) + * @param {Function} onComplete (optional) Function to call when animation completes. + * @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeBoth) + */ + setBox : function(box, adjust, animate, duration, onComplete, easing){ + var w = box.width, h = box.height; + if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ + w -= (this.getBorderWidth('lr') + this.getPadding('lr')); + h -= (this.getBorderWidth('tb') + this.getPadding('tb')); + } + this.setBounds(box.x, box.y, w, h, animate, duration, onComplete, easing); + }, + + repaint : function(){ + var dom = this.dom; + YAHOO.util.Dom.addClass(dom, 'yui-ext-repaint'); + setTimeout(function(){ + YAHOO.util.Dom.removeClass(dom, 'yui-ext-repaint'); + }, 1); + } +}; + +/** + * Whether to automatically adjust width and height settings for box-model issues + */ +YAHOO.ext.Element.prototype.autoBoxAdjust = true; + +/** + * @private Used to check if a value has a unit + */ +YAHOO.ext.Element.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; +/** + * Visibility mode constant - Use visibility to hide element + * @type Number + */ +YAHOO.ext.Element.VISIBILITY = 1; +/** + * Visibility mode constant - Use display to hide element + * @type Number + */ +YAHOO.ext.Element.DISPLAY = 2; + +/** @ignore */ +YAHOO.ext.Element.borders = {l: 'border-left-width', r: 'border-right-width', t: 'border-top-width', b: 'border-bottom-width'}; +/** @ignore */ +YAHOO.ext.Element.paddings = {l: 'padding-left', r: 'padding-right', t: 'padding-top', b: 'padding-bottom'}; + +/** + * @private Call out to here so we make minimal closure + */ +YAHOO.ext.Element.createStopHandler = function(stopPropagation, handler, scope, override){ + return function(e){ + if(e){ + if(stopPropagation){ + YAHOO.util.Event.stopEvent(e); + }else { + YAHOO.util.Event.preventDefault(e); + } + } + handler.call(override && scope ? scope : window, e, scope); + }; +}; + +/** + * @private + */ +YAHOO.ext.Element.cache = {}; + +/** + * Static method to retreive Element objects. Uses simple caching to consistently return the same object. + * Automatically fixes if an object was recreated with the same id via AJAX or DOM. + * @param {String/HTMLElement/Element} el The id of the element or the element to wrap (must have an id). If you pass in an element, it is returned + * @param {Boolean} autoGenerateId (optional) Set this flag to true if you are passing an element without an id (like document.body). It will auto generate an id if one isn't present. + * @return {Element} The element object + */ +YAHOO.ext.Element.get = function(el, autoGenerateId){ + if(!el){ return null; } + if(el instanceof YAHOO.ext.Element){ + el.dom = YAHOO.util.Dom.get(el.id); // refresh dom element in case no longer valid + YAHOO.ext.Element.cache[el.id] = el; // in case it was created directly with Element(), let's cache it + return el; + } + var key = el; + if(typeof el != 'string'){ // must be an element + if(!el.id && !autoGenerateId){ return null; } + YAHOO.util.Dom.generateId(el, 'elgen-'); + key = el.id; + } + var element = YAHOO.ext.Element.cache[key]; + if(!element){ + element = new YAHOO.ext.Element(key); + YAHOO.ext.Element.cache[key] = element; + }else{ + element.dom = YAHOO.util.Dom.get(key); + } + return element; +}; + +/** + * Shorthand function for YAHOO.ext.Element.get() + */ +var getEl = YAHOO.ext.Element.get; + +// clean up refs +YAHOO.util.Event.addListener(window, 'unload', function(){ YAHOO.ext.Element.cache = null; }); \ No newline at end of file diff --git a/www/extras/yui-ext/source/EventManager.js b/www/extras/yui-ext/source/EventManager.js new file mode 100644 index 000000000..60c36a1f1 --- /dev/null +++ b/www/extras/yui-ext/source/EventManager.js @@ -0,0 +1,381 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * Registers event handlers that want to receive an EventObject instead of the standard browser event + * See {@link YAHOO.ext.EventObject} for more details on the usage of this object. + */ +YAHOO.ext.EventManager = new function(){ + var docReadyEvent; + var docReadyProcId; + var docReadyState = false; + + this.ieDeferSrc = "javascript:false"; + + var fireDocReady = function(){ + if(!docReadyState){ + docReadyState = true; + if(docReadyProcId){ + clearInterval(docReadyProcId); + } + if(docReadyEvent){ + docReadyEvent.fire(); + } + } + }; + + var initDocReady = function(){ + docReadyEvent = new YAHOO.util.CustomEvent('documentready'); + if(document.addEventListener) { + YAHOO.util.Event.on(document, "DOMContentLoaded", fireDocReady); + }else if(YAHOO.ext.util.Browser.isIE){ + // inspired by http://www.thefutureoftheweb.com/blog/2006/6/adddomloadevent + document.write(''); + YAHOO.util.Event.on('ie-deferred-loader', 'readystatechange', function(){ + if(this.readyState == 'complete'){ + fireDocReady(); + } + }); + }else if(YAHOO.ext.util.Browser.isSafari){ + docReadyProcId = setInterval(function(){ + var rs = document.readyState; + if(rs == 'loaded' || rs == 'complete') { + fireDocReady(); + } + }, 10); + } + // no matter what, make sure it fires on load + YAHOO.util.Event.on(window, 'load', fireDocReady); + }; + /** + * Places a simple wrapper around an event handler to override the browser event + * object with a YAHOO.ext.EventObject + */ + this.wrap = function(fn, scope, override){ + var wrappedFn = function(e){ + YAHOO.ext.EventObject.setEvent(e); + fn.call(override ? scope || window : window, YAHOO.ext.EventObject, scope); + }; + return wrappedFn; + }; + + /** + * Appends an event handler + * + * @param {Object} element The html element to assign the + * event to + * @param {String} eventName The type of event to append + * @param {Function} fn The method the event invokes + * @param {Object} scope An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override If true, the obj passed in becomes + * the execution scope of the listener + * @return {Function} The wrapper function created (to be used to remove the listener if necessary) + */ + this.addListener = function(element, eventName, fn, scope, override){ + var wrappedFn = this.wrap(fn, scope, override); + YAHOO.util.Event.addListener(element, eventName, wrappedFn); + return wrappedFn; + }; + + /** + * Removes an event handler + * + * @param {Object} element The html element to remove the + * event from + * @param {String} eventName The type of event to append + * @param {Function} wrappedFn The wrapper method returned when adding the listener + * @return {Boolean} True if a listener was actually removed + */ + this.removeListener = function(element, eventName, wrappedFn){ + return YAHOO.util.Event.removeListener(element, eventName, wrappedFn); + }; + + /** + * Appends an event handler (shorthand for addListener) + * + * @param {Object} element The html element to assign the + * event to + * @param {String} eventName The type of event to append + * @param {Function} fn The method the event invokes + * @param {Object} scope An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override If true, the obj passed in becomes + * the execution scope of the listener + * @return {Function} The wrapper function created (to be used to remove the listener if necessary) + */ + this.on = function(element, eventName, fn, scope, override){ + var wrappedFn = this.wrap(fn, scope, override); + YAHOO.util.Event.addListener(element, eventName, wrappedFn); + return wrappedFn; + }; + + /** + * Fires when the document is ready (before onload) + */ + this.onDocumentReady = function(fn, scope, override){ + if(!docReadyEvent){ + initDocReady(); + } + docReadyEvent.subscribe(fn, scope, override); + } +}; + +/** + * @class + * EventObject exposes the Yahoo! UI Event functionality directly on the object + * passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code + * (All the YAHOO.util.Event methods throw javascript errors if the passed event is null). + * To get an EventObject instead of the standard browser event, + * your must register your listener thru the {@link YAHOO.ext.EventManager} or directly on an Element + * with {@link YAHOO.ext.Element#addManagedListener} or the shorthanded equivalent {@link YAHOO.ext.Element#mon}.
+ * Example: + *

+ fu<>nction handleClick(e){ // e is not a standard event object, it is a YAHOO.ext.EventObject
+    e.preventDefault();
+    var target = e.getTarget();
+    ...
+ }
+ var myDiv = getEl('myDiv');
+ myDiv.mon('click', handleClick);
+ //or
+ YAHOO.ext.EventManager.on('myDiv', 'click', handleClick);
+ YAHOO.ext.EventManager.addListener('myDiv', 'click', handleClick);
+ 
+ */ +YAHOO.ext.EventObject = new function(){ + /** The normal browser event */ + this.browserEvent = null; + /** The button pressed in a mouse event */ + this.button = -1; + /** True if the shift key was down during the event */ + this.shiftKey = false; + /** True if the control key was down during the event */ + this.ctrlKey = false; + /** True if the alt key was down during the event */ + this.altKey = false; + + /** Key constant @type Number */ + this.BACKSPACE = 8; + /** Key constant @type Number */ + this.TAB = 9; + /** Key constant @type Number */ + this.RETURN = 13; + /** Key constant @type Number */ + this.ESC = 27; + /** Key constant @type Number */ + this.SPACE = 32; + /** Key constant @type Number */ + this.PAGEUP = 33; + /** Key constant @type Number */ + this.PAGEDOWN = 34; + /** Key constant @type Number */ + this.END = 35; + /** Key constant @type Number */ + this.HOME = 36; + /** Key constant @type Number */ + this.LEFT = 37; + /** Key constant @type Number */ + this.UP = 38; + /** Key constant @type Number */ + this.RIGHT = 39; + /** Key constant @type Number */ + this.DOWN = 40; + /** Key constant @type Number */ + this.DELETE = 46; + /** Key constant @type Number */ + this.F5 = 116; + + /** @private */ + this.setEvent = function(e){ + this.browserEvent = e; + if(e){ + this.button = e.button; + this.shiftKey = e.shiftKey; + this.ctrlKey = e.ctrlKey; + this.altKey = e.altKey; + }else{ + this.button = -1; + this.shiftKey = false; + this.ctrlKey = false; + this.altKey = false; + } + }; + + /** + * Stop the event. Calls YAHOO.util.Event.stopEvent() if the event is not null. + */ + this.stopEvent = function(){ + if(this.browserEvent){ + YAHOO.util.Event.stopEvent(this.browserEvent); + } + }; + + /** + * Prevents the browsers default handling of the event. Calls YAHOO.util.Event.preventDefault() if the event is not null. + */ + this.preventDefault = function(){ + if(this.browserEvent){ + YAHOO.util.Event.preventDefault(this.browserEvent); + } + }; + + /** @private */ + this.isNavKeyPress = function(){ + return (this.browserEvent.keyCode && this.browserEvent.keyCode >= 33 && this.browserEvent.keyCode <= 40); + }; + + /** + * Cancels bubbling of the event. Calls YAHOO.util.Event.stopPropagation() if the event is not null. + */ + this.stopPropagation = function(){ + if(this.browserEvent){ + YAHOO.util.Event.stopPropagation(this.browserEvent); + } + }; + + /** + * Gets the key code for the event. Returns value from YAHOO.util.Event.getCharCode() if the event is not null. + * @return {Number} + */ + this.getCharCode = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getCharCode(this.browserEvent); + } + return null; + }; + + /** + * Gets the x coordinate of the event. Returns value from YAHOO.util.Event.getPageX() if the event is not null. + * @return {Number} + */ + this.getPageX = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getPageX(this.browserEvent); + } + return null; + }; + + /** + * Gets the y coordinate of the event. Returns value from YAHOO.util.Event.getPageY() if the event is not null. + * @return {Number} + */ + this.getPageY = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getPageY(this.browserEvent); + } + return null; + }; + + /** + * Gets the time of the event. Returns value from YAHOO.util.Event.getTime() if the event is not null. + * @return {Number} + */ + this.getTime = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getTime(this.browserEvent); + } + return null; + }; + + /** + * Gets the page coordinates of the event. Returns value from YAHOO.util.Event.getXY() if the event is not null. + * @return {Array} The xy values like [x, y] + */ + this.getXY = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getXY(this.browserEvent); + } + return []; + }; + + /** + * Gets the target for the event. Returns value from YAHOO.util.Event.getTarget() if the event is not null. + * @return {HTMLelement} + */ + this.getTarget = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getTarget(this.browserEvent); + } + return null; + }; + + /** + * Walk up the DOM looking for a particular target - if the default target matches, it is returned. + * @return {HTMLelement} + */ + this.findTarget = function(className, tagName){ + if(tagName) tagName = tagName.toLowerCase(); + if(this.browserEvent){ + function isMatch(el){ + if(!el){ + return false; + } + if(className && !YAHOO.util.Dom.hasClass(el, className)){ + return false; + } + if(tagName && el.tagName.toLowerCase() != tagName){ + return false; + } + return true; + }; + + var t = this.getTarget(); + if(!t || isMatch(t)){ + return t; + } + var p = t.parentNode; + while(p && p.tagName.toUpperCase() != 'BODY'){ + if(isMatch(p)){ + return p; + } + p = p.parentNode; + } + } + return null; + }; + /** + * Gets the related target. Returns value from YAHOO.util.Event.getRelatedTarget() if the event is not null. + * @return {HTMLelement} + */ + this.getRelatedTarget = function(){ + if(this.browserEvent){ + return YAHOO.util.Event.getRelatedTarget(this.browserEvent); + } + return null; + }; + + /** + * Normalizes mouse wheel delta across browsers + */ + this.getWheelDelta = function(){ + var e = this.browserEvent; + var delta = 0; + if(e.wheelDelta){ /* IE/Opera. */ + delta = e.wheelDelta/120; + /** In Opera 9, delta differs in sign as compared to IE. */ + if(window.opera) delta = -delta; + }else if(e.detail){ /** Mozilla case. */ + delta = -e.detail/3; + } + return delta; + }; + + /** + * Returns true if the control, shift or alt key was pressed during this event. + * @return {Boolean} + */ + this.hasModifier = function(){ + return this.ctrlKey || this.altKey || this.shiftKey; + }; +}(); + + \ No newline at end of file diff --git a/www/extras/yui-ext/source/State.js b/www/extras/yui-ext/source/State.js new file mode 100644 index 000000000..2ca43feb4 --- /dev/null +++ b/www/extras/yui-ext/source/State.js @@ -0,0 +1,176 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.namespace('ext.state'); + +YAHOO.ext.state.Provider = function(){ + YAHOO.ext.state.Provider.superclass.constructor.call(this); + this.events = { + 'statechange': new YAHOO.util.CustomEvent('statechange') + }; + this.state = {}; +}; +YAHOO.extendX(YAHOO.ext.state.Provider, YAHOO.ext.util.Observable, { + get : function(name){ + return this.state[name]; + }, + + clear : function(name){ + delete this.state[name]; + this.fireEvent('statechange', this, name, null); + }, + + set : function(name, value){ + this.state[name] = value; + this.fireEvent('statechange', this, name, value); + } +}); + +YAHOO.ext.state.Manager = new function(){ + var provider = new YAHOO.ext.state.Provider(); + + return { + setProvider : function(stateProvider){ + provider = stateProvider; + }, + + get : function(key){ + return provider.get(key); + }, + + set : function(key, value){ + provider.set(key, value); + }, + + clear : function(key){ + provider.clear(key); + }, + + getProvider : function(){ + return provider; + } + }; +}(); + +YAHOO.ext.state.CookieProvider = function(config){ + YAHOO.ext.state.CookieProvider.superclass.constructor.call(this); + this.path = '/'; + this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days + this.domain = null; + this.secure = false; + YAHOO.ext.util.Config.apply(this, config); + this.state = this.readCookies(); +}; + +YAHOO.extendX(YAHOO.ext.state.CookieProvider, YAHOO.ext.state.Provider, { + set : function(name, value){ + if(typeof value == 'undefined' || value === null){ + this.clear(name); + return; + } + this.setCookie(name, value); + YAHOO.ext.state.CookieProvider.superclass.set.call(this, name, value); + }, + + clear : function(name){ + this.clearCookie(name); + YAHOO.ext.state.CookieProvider.superclass.clear.call(this, name); + }, + + readCookies : function(){ + var cookies = {}; + var c = document.cookie + ';'; + var re = /\s?(.*?)=(.*?);/g; + var matches; + while((matches = re.exec(c)) != null){ + var name = matches[1]; + var value = matches[2]; + if(name && name.substring(0,3) == 'ys-'){ + cookies[name.substr(3)] = this.decodeValue(value); + } + } + return cookies; + }, + + decodeValue : function(cookie){ + var re = /^(a|n|d|b|s|o)\:(.*)$/; + var matches = re.exec(unescape(cookie)); + if(!matches || !matches[1]) return; // non state cookie + var type = matches[1]; + var v = matches[2]; + switch(type){ + case 'n': + return parseFloat(v); + case 'd': + return new Date(Date.parse(v)); + case 'b': + return (v == '1'); + case 'a': + var all = []; + var values = v.split('^'); + for(var i = 0, len = values.length; i < len; i++){ + all.push(this.decodeValue(values[i])) + } + return all; + case 'o': + var all = {}; + var values = v.split('^'); + for(var i = 0, len = values.length; i < len; i++){ + var kv = values[i].split('='); + all[kv[0]] = this.decodeValue(kv[1]); + } + return all; + default: + return v; + } + }, + + encodeValue : function(v){ + var enc; + if(typeof v == 'number'){ + enc = 'n:' + v; + }else if(typeof v == 'boolean'){ + enc = 'b:' + (v ? '1' : '0'); + }else if(v instanceof Date){ + enc = 'd:' + v.toGMTString(); + }else if(v instanceof Array){ + var flat = ''; + for(var i = 0, len = v.length; i < len; i++){ + flat += this.encodeValue(v[i]); + if(i != len-1) flat += '^'; + } + enc = 'a:' + flat; + }else if(typeof v == 'object'){ + var flat = ''; + for(var key in v){ + if(typeof v[key] != 'function'){ + flat += key + '=' + this.encodeValue(v[key]) + '^'; + } + } + enc = 'o:' + flat.substring(0, flat.length-1); + }else{ + enc = 's:' + v; + } + return escape(enc); + }, + + setCookie : function(name, value){ + document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + + ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + }, + + clearCookie : function(name){ + document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + } +}); diff --git a/www/extras/yui-ext/source/UpdateManager.js b/www/extras/yui-ext/source/UpdateManager.js new file mode 100644 index 000000000..dd04e1360 --- /dev/null +++ b/www/extras/yui-ext/source/UpdateManager.js @@ -0,0 +1,418 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class Provides AJAX-style update for Element object using Yahoo + * UI library YAHOO.util.Connect functionality.

+ * Usage:
+ *

+ * // Get it from a YAHOO.ext.Element object
+ * var mgr = myElement.getUpdateManager();
+ * mgr.update('http://myserver.com/index.php', 'param1=1&param2=2');
+ * ...
+ * mgr.formUpdate('myFormId', 'http://myserver.com/index.php');
+ * 
+ * // or directly (returns the same UpdateManager instance) + * var mgr = new YAHOO.ext.UpdateManager('myElementId'); + * mgr.startAutoRefresh('http://myserver.com/index.php', 60); + * mgr.onUpdate.subscribe(myFcnNeedsToKnow); + *
+ *
+ * @requires YAHOO.ext.Element + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.Connect + * @constructor + * Create new UpdateManager. + * @param {String/HTMLElement/YAHOO.ext.Element} el The element to update + * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already has an UpdateManager and if it does it returns the same instance. This will skip that check (useful for extending this class). + */ +YAHOO.ext.UpdateManager = function(el, forceNew){ + el = YAHOO.ext.Element.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + /** + * The Element object + * @type YAHOO.ext.Element + */ + this.el = el; + /** + * Cached url to use for refreshes. Overwritten every time update() is called unless 'discardUrl' param is set to true. + * @type String + */ + this.defaultUrl = null; + /** + * fired before update is made, return false from your handler and the update is cancelled. + * Uses fireDirect with signature: (oElement, url, params) + * @type YAHOO.util.CustomEvent + */ + this.beforeUpdate = new YAHOO.util.CustomEvent('UpdateManager.beforeUpdate'); + /** + * Fired after successful update is made. Uses fireDirect with signature: (oElement, oResponseObject) + * @type YAHOO.util.CustomEvent + */ + this.onUpdate = new YAHOO.util.CustomEvent('UpdateManager.onUpdate'); + /** + * Fired on update failure. Uses fireDirect with signature: (oElement, oResponseObject) + * @type YAHOO.util.CustomEvent + */ + this.onFailure = new YAHOO.util.CustomEvent('UpdateManager.onFailure'); + + /** + * Blank page URL to use with SSL file uploads (Defaults to YAHOO.ext.UpdateManager.defaults.sslBlankUrl or 'about:blank'). + * @type String + */ + this.sslBlankUrl = YAHOO.ext.UpdateManager.defaults.sslBlankUrl; + /** + * Whether to append unique parameter on get request to disable caching (Defaults to YAHOO.ext.UpdateManager.defaults.disableCaching or false). + * @type Boolean + */ + this.disableCaching = YAHOO.ext.UpdateManager.defaults.disableCaching; + /** + * Text for loading indicator (Defaults to YAHOO.ext.UpdateManager.defaults.indicatorText or '<div class="loading-indicator">Loading...</div>'). + * @type String + */ + this.indicatorText = YAHOO.ext.UpdateManager.defaults.indicatorText; + /** + * Whether to show indicatorText when loading (Defaults to YAHOO.ext.UpdateManager.defaults.showLoadIndicator or true). + * @type String + */ + this.showLoadIndicator = YAHOO.ext.UpdateManager.defaults.showLoadIndicator; + /** + * Timeout for requests or form posts in seconds (Defaults to YAHOO.ext.UpdateManager.defaults.timeout or 30 seconds). + * @type Number + */ + this.timeout = YAHOO.ext.UpdateManager.defaults.timeout; + + /** + * True to process scripts in the output (Defaults to YAHOO.ext.UpdateManager.defaults.loadScripts (false)). + * @type Number + */ + this.loadScripts = YAHOO.ext.UpdateManager.defaults.loadScripts; + + /** + * YAHOO.util.Connect transaction object of current executing transaction + */ + this.transaction = null; + + /** + * @private + */ + this.autoRefreshProcId = null; + /** + * Delegate for refresh() prebound to 'this', use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.refreshDelegate = this.refresh.createDelegate(this); + /** + * Delegate for update() prebound to 'this', use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.updateDelegate = this.update.createDelegate(this); + /** + * Delegate for formUpdate() prebound to 'this', use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.formUpdateDelegate = this.formUpdate.createDelegate(this); + /** + * @private + */ + this.successDelegate = this.processSuccess.createDelegate(this); + /** + * @private + */ + this.failureDelegate = this.processFailure.createDelegate(this); + + /** + * The renderer for this UpdateManager. Defaults to {@link YAHOO.ext.UpdateManager.BasicRenderer}. + */ + this.renderer = new YAHOO.ext.UpdateManager.BasicRenderer(); +}; + +YAHOO.ext.UpdateManager.prototype = { + /** + * Get the Element this UpdateManager is bound to + * @return {YAHOO.ext.Element} The element + */ + getEl : function(){ + return this.el; + }, + + /** + * Performs an async request, updating this element with the response. If params are specified it uses POST, otherwise it uses GET. + * @param {String/Function} url The url for this request or a function to call to get the url + * @param {String/Object} params (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or as an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url. + */ + update : function(url, params, callback, discardUrl){ + if(this.beforeUpdate.fireDirect(this.el, url, params) !== false){ + this.showLoading(); + if(!discardUrl){ + this.defaultUrl = url; + } + if(typeof url == 'function'){ + url = url(); + } + if(params && typeof params != 'string'){ // must be object + var buf = []; + for(var key in params){ + if(typeof params[key] != 'function'){ + buf.push(encodeURIComponent(key), '=', encodeURIComponent(params[key]), '&'); + } + } + delete buf[buf.length-1]; + params = buf.join(''); + } + var callback = { + success: this.successDelegate, + failure: this.failureDelegate, + timeout: (this.timeout*1000), + argument: {'url': url, 'form': null, 'callback': callback, 'params': params} + }; + var method = params ? 'POST' : 'GET'; + if(method == 'GET'){ + url = this.prepareUrl(url); + } + this.transaction = YAHOO.util.Connect.asyncRequest(method, url, callback, params); + } + }, + + /** + * Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload. + * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning. See YUI docs for more info. + * @param {String/HTMLElement} form The form Id or form element + * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used. + * @param {Boolean} reset (optional) Whether to try to reset the form after the update + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + */ + formUpdate : function(form, url, reset, callback){ + if(this.beforeUpdate.fireDirect(this.el, form, url) !== false){ + this.showLoading(); + formEl = YAHOO.util.Dom.get(form); + if(typeof url == 'function'){ + url = url(); + } + url = url || formEl.action; + var callback = { + success: this.successDelegate, + failure: this.failureDelegate, + timeout: (this.timeout*1000), + argument: {'url': url, 'form': form, 'callback': callback, 'reset': reset} + }; + var isUpload = false; + var enctype = formEl.getAttribute('enctype'); + if(enctype && enctype.toLowerCase() == 'multipart/form-data'){ + isUpload = true; + } + YAHOO.util.Connect.setForm(form, isUpload, this.sslBlankUrl); + this.transaction = YAHOO.util.Connect.asyncRequest('POST', url, callback); + } + }, + + /** + * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + */ + refresh : function(callback){ + if(this.defaultUrl == null){ + return; + } + this.update(this.defaultUrl, null, callback, true); + }, + + /** + * Set this element to auto refresh. + * @param {Number} interval How often to update (in seconds). + * @param {String/Function} url (optional) The url for this request or a function to call to get the url (Defaults to the last used url) + * @param {String/Object} params (optional) The parameters to pass as either a url encoded string "¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval + */ + startAutoRefresh : function(interval, url, params, callback, refreshNow){ + if(refreshNow){ + this.update(url || this.defaultUrl, params, callback, true); + } + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + } + this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); + }, + + /** + * Stop auto refresh on this element. + */ + stopAutoRefresh : function(){ + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + } + }, + + /** + * Called to update the element to "Loading" state. Override to perform custom action. + */ + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.update(this.indicatorText); + } + }, + + /** + * Adds unique parameter to query string if disableCaching = true + * @private + */ + prepareUrl : function(url){ + if(this.disableCaching){ + var append = '_dc=' + (new Date().getTime()); + if(url.indexOf('?') !== -1){ + url += '&' + append; + }else{ + url += '?' + append; + } + } + return url; + }, + + /** + * @private + */ + processSuccess : function(response){ + this.transaction = null; + this.renderer.render(this.el, response, this); + if(response.argument.form && response.argument.reset){ + try{ // put in try/catch since some older FF releases had problems with this + response.argument.form.reset(); + }catch(e){} + } + this.onUpdate.fireDirect(this.el, response); + if(typeof response.argument.callback == 'function'){ + response.argument.callback(this.el, true); + } + }, + + /** + * @private + */ + processFailure : function(response){ + this.transaction = null; + this.onFailure.fireDirect(this.el, response); + if(typeof response.argument.callback == 'function'){ + response.argument.callback(this.el, false); + } + }, + + /** + * Set the content renderer for this UpdateManager. See {@link YAHOO.ext.UpdateManager.BasicRenderer#render} for more details. + * @param {Object} renderer The object implementing the render() method + */ + setRenderer : function(renderer){ + this.renderer = renderer; + }, + + getRenderer : function(){ + return this.renderer; + }, + + /** + * Set the defaultUrl used for updates + * @param {String/Function} defaultUrl The url or a function to call to get the url + */ + setDefaultUrl : function(defaultUrl){ + this.defaultUrl = defaultUrl; + }, + + /** + * Aborts the executing transaction + */ + abort : function(){ + if(this.transaction){ + YAHOO.util.Connect.abort(this.transaction); + } + }, + + /** + * Returns true if an update is in progress + */ + isUpdating : function(){ + if(this.transaction){ + return YAHOO.util.Connect.isCallInProgress(this.transaction); + } + return false; + } +}; + +/** + * Static convenience method, Usage: + * YAHOO.ext.UpdateManager.update('my-div', 'stuff.php'); + * @param {String/HTMLElement/YAHOO.ext.Element} el The element to update + * @param {String} url The url + * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs + * @param {Object} options (optional) A config object with any of the UpdateManager properties you want to set - for example: {disableCaching:true, indicatorText: 'Loading data...'} + */ +YAHOO.ext.UpdateManager.update = function(el, url, params, options){ + var um = getEl(el, true).getUpdateManager(); + YAHOO.ext.util.Config.apply(um, options); + um.update(url, params, options.callback); +} + +/** + * @class + * Default Content renderer. Updates the elements innerHTML with the responseText. + */ +YAHOO.ext.UpdateManager.BasicRenderer = function(){}; + +YAHOO.ext.UpdateManager.BasicRenderer.prototype = { + /** + * This is called when the transaction is completed and it's time to update the element - The BasicRenderer + * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing), + * create an object with a "render(el, response)" method and pass it to setRenderer on the UpdateManager. + * @param {YAHOO.ext.Element} el The element being rendered + * @param {Object} response The YUI Connect response object + */ + render : function(el, response, updateManager){ + el.update(response.responseText, updateManager.loadScripts); + } +}; + +/** + * The defaults collection enables customizing the default behavior of UpdateManager + */ +YAHOO.ext.UpdateManager.defaults = {}; +/** + * Timeout for requests or form posts in seconds (Defaults 30 seconds). + * @type Number + */ + YAHOO.ext.UpdateManager.defaults.timeout = 30; + /** + * True to process scripts by default (Defaults to false). + * @type Number + */ + YAHOO.ext.UpdateManager.defaults.loadScripts = false; + +/** +* Blank page URL to use with SSL file uploads (Defaults to 'about:blank'). +* @type String +*/ +YAHOO.ext.UpdateManager.defaults.sslBlankUrl = 'about:blank'; +/** + * Whether to append unique parameter on get request to disable caching (Defaults to false). + * @type Boolean + */ +YAHOO.ext.UpdateManager.defaults.disableCaching = false; +/** + * Whether to show indicatorText when loading (Defaults to true). + * @type String + */ +YAHOO.ext.UpdateManager.defaults.showLoadIndicator = true; +/** + * Text for loading indicator (Defaults to '<div class="loading-indicator">Loading...</div>'). + * @type String + */ +YAHOO.ext.UpdateManager.defaults.indicatorText = '
Loading...
'; \ No newline at end of file diff --git a/www/extras/yui-ext/source/anim/Actor.js b/www/extras/yui-ext/source/anim/Actor.js new file mode 100644 index 000000000..a1e899ee2 --- /dev/null +++ b/www/extras/yui-ext/source/anim/Actor.js @@ -0,0 +1,665 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * Provides support for syncing and chaining of Element Yahoo! UI based animation and some common effects. Actors support "self-play" without an Animator.

+ * Note: Along with the animation methods defined below, this class inherits and captures all of the "set" or animation methods of {@link YAHOO.ext.Element}. "get" methods are not captured and execute immediately. + *

Usage:
+ *

+ * var actor = new YAHOO.ext.Actor('myElementId');
+ * actor.startCapture(true);
+ * actor.moveTo(100, 100, true);
+ * actor.squish();
+ * actor.play();
+ * 
+ * // or to start capturing immediately, with no Animator (the null second param) + *
+ * var actor = new YAHOO.ext.Actor('myElementId', null, true); + * actor.moveTo(100, 100, true); + * actor.squish(); + * actor.play(); + *
+ * @extends YAHOO.ext.Element + * @requires YAHOO.ext.Element + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.Anim + * @requires YAHOO.util.ColorAnim + * @requires YAHOO.util.Motion + * @className YAHOO.ext.Actor + * @constructor + * Create new Actor. + * @param {String/HTMLElement} el The dom element or element id + * @param {YAHOO.ext.Animator} animator (optional) The Animator that will capture this Actor's actions + * @param {Boolean} selfCapture (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false) + */ +YAHOO.ext.Actor = function(element, animator, selfCapture){ + YAHOO.ext.Actor.superclass.constructor.call(this, element, true); + + this.el = YAHOO.ext.Element.get(this.id); // cache el object for playback + + this.onCapture = new YAHOO.util.CustomEvent('Actor.onCapture'); + if(animator){ + /** + * The animator used to sync this actor with other actors + * @member YAHOO.ext.Actor + */ + animator.addActor(this); + } + /** + * Whether this actor is currently capturing + * @member YAHOO.ext.Actor + */ + this.capturing = selfCapture; + this.playlist = selfCapture ? new YAHOO.ext.Animator.AnimSequence() : null; +}; + +YAHOO.extendX(YAHOO.ext.Actor, YAHOO.ext.Element); + +/** + * Captures an action for this actor. Generally called internally but can be called directly. + # @param {YAHOO.ext.Actor.Action} action + */ +YAHOO.ext.Actor.prototype.capture = function(action){ + if(this.playlist != null){ + this.playlist.add(action); + } + this.onCapture.fireDirect(this, action); + return action; +}; + +/** @ignore */ +YAHOO.ext.Actor.overrideAnimation = function(method, animParam, onParam){ + return function(){ + if(!this.capturing){ + return method.apply(this, arguments); + } + var args = Array.prototype.slice.call(arguments, 0); + if(args[animParam] === true){ + return this.capture(new YAHOO.ext.Actor.AsyncAction(this, method, args, onParam)); + }else{ + return this.capture(new YAHOO.ext.Actor.Action(this, method, args)); + } + }; +} + +/** @ignore */ +YAHOO.ext.Actor.overrideBasic = function(method){ + return function(){ + if(!this.capturing){ + return method.apply(this, arguments); + } + var args = Array.prototype.slice.call(arguments, 0); + return this.capture(new YAHOO.ext.Actor.Action(this, method, args)); + }; +} + +// All of these methods below are marked "ignore" because JSDoc treats them as fields, not function. How brilliant. The Element methods are documented anyway though. +/** Capturing override - See {@link YAHOO.ext.Element#setVisibilityMode} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setVisibilityMode = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setVisibilityMode); +/** Capturing override - See {@link YAHOO.ext.Element#enableDisplayMode} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.enableDisplayMode = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.enableDisplayMode); +/** Capturing override - See {@link YAHOO.ext.Element#focus} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.focus = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.focus); +/** Capturing override - See {@link YAHOO.ext.Element#addClass} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.addClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.addClass); +/** Capturing override - See {@link YAHOO.ext.Element#removeClass} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.removeClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.removeClass); +/** Capturing override - See {@link YAHOO.ext.Element#replaceClass} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.replaceClass = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.replaceClass); +/** Capturing override - See {@link YAHOO.ext.Element#setStyle} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setStyle = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setStyle); +/** Capturing override - See {@link YAHOO.ext.Element#setX} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setX = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setX); +/** Capturing override - See {@link YAHOO.ext.Element#setY} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setY = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setY); +/** Capturing override - See {@link YAHOO.ext.Element#setLeft} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setLeft = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setLeft); +/** Capturing override - See {@link YAHOO.ext.Element#setTop} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setTop = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setTop); +/** Capturing override - See {@link YAHOO.ext.Element#setAbsolutePositioned} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setAbsolutePositioned = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setAbsolutePositioned); +/** Capturing override - See {@link YAHOO.ext.Element#setRelativePositioned} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setRelativePositioned = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setRelativePositioned); +/** Capturing override - See {@link YAHOO.ext.Element#clearPositioning} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.clearPositioning = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearPositioning); +/** Capturing override - See {@link YAHOO.ext.Element#setPositioning} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setPositioning = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.setPositioning); +/** Capturing override - See {@link YAHOO.ext.Element#clip} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.clip = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clip); +/** Capturing override - See {@link YAHOO.ext.Element#unclip} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.unclip = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.unclip); +/** Capturing override - See {@link YAHOO.ext.Element#clearOpacity} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.clearOpacity = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.clearOpacity); +/** Capturing override - See {@link YAHOO.ext.Element#clearOpacity} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.update = YAHOO.ext.Actor.overrideBasic(YAHOO.ext.Actor.superclass.update); + +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#animate} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.animate = function(args, duration, onComplete, easing, animType){ + if(!this.capturing){ + return YAHOO.ext.Actor.superclass.animate.apply(this, arguments); + } + return this.capture(new YAHOO.ext.Actor.AsyncAction(this, YAHOO.ext.Actor.superclass.animate, + [args, duration, onComplete, easing, animType], 2)); +}; + +/** Capturing and animation syncing override - See {@link YAHOO.ext.Element#setVisible} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setVisible = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setVisible, 1, 3); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#toggle} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.toggle = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.toggle, 0, 2); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setXY} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setXY = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setXY, 1, 3); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setLocation} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setLocation = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setLocation, 2, 4); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setWidth} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setWidth = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setWidth, 1, 3); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setHeight} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setHeight = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight, 1, 3); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setSize} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setSize = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setSize, 2, 4); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setBounds} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setBounds = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setBounds, 4, 6); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#setHeight} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.setOpacity = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight, 1, 3); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#moveTo} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.moveTo = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.moveTo, 2, 4); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#move} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.move = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.move, 2, 4); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#alignTo} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.alignTo = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.alignTo, 3, 5); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#hide} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.hide = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.hide, 0, 2); +/**Capturing and animation syncing override - See {@link YAHOO.ext.Element#show} for method details. + * @type Function */ +YAHOO.ext.Actor.prototype.show = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.show, 0, 2); + +/** + * Start self capturing calls on this Actor. All subsequent calls are captured and executed when play() is called. + */ +YAHOO.ext.Actor.prototype.startCapture = function(){ + this.capturing = true; + this.playlist = new YAHOO.ext.Animator.AnimSequence(); + }; + + /** + * Stop self capturing calls on this Actor. + */ + YAHOO.ext.Actor.prototype.stopCapture = function(){ + this.capturing = false; + }; + +/** + * Clears any calls that have been self captured. + */ +YAHOO.ext.Actor.prototype.clear = function(){ + this.playlist = new YAHOO.ext.Animator.AnimSequence(); +}; + +/** + * Starts playback of self captured calls. + * @param {Function} oncomplete (optional) Callback to execute when playback has completed + */ +YAHOO.ext.Actor.prototype.play = function(oncomplete){ + this.capturing = false; + if(this.playlist){ + this.playlist.play(oncomplete); + } + }; + +/** + * Capture a function call. + * @param {Function} fcn The function to call + * @param {Array} args (optional) The arguments to call the function with + * @param {Object} scope (optional) The scope of the function + */ +YAHOO.ext.Actor.prototype.addCall = function(fcn, args, scope){ + this.capture(new YAHOO.ext.Actor.Action(scope, fcn, args || [])); +}; + +/** + * Capture an async function call. + * @param {Function} fcn The function to call + * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. + * @param {Array} args The arguments to call the function with + * @param {Object} scope (optional) The scope of the function + */ +YAHOO.ext.Actor.prototype.addAsyncCall = function(fcn, callbackIndex, args, scope){ + this.capture(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex)); + }, + +/** + * Capture a pause (in seconds). + * @param {Number} seconds The seconds to pause + */ +YAHOO.ext.Actor.prototype.pause = function(seconds){ + this.capture(new YAHOO.ext.Actor.PauseAction(seconds)); + }; + +/** +* Shake this element from side to side +*/ +YAHOO.ext.Actor.prototype.shake = function(){ + this.move('left', 20, true, .05); + this.move('right', 40, true, .05); + this.move('left', 40, true, .05); + this.move('right', 20, true, .05); +}; + +/** +* Bounce this element from up and down +*/ +YAHOO.ext.Actor.prototype.bounce = function(){ + this.move('up', 20, true, .05); + this.move('down', 40, true, .05); + this.move('up', 40, true, .05); + this.move('down', 20, true, .05); +}; + +/** +* Show the element using a "blinds" effect +* @param {String} anchor The part of the element that it should appear to exapand from. + The short/long options currently are t/top, l/left +* @param {Number} newSize (optional) The size to animate to. (Default to current size) +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut) +*/ +YAHOO.ext.Actor.prototype.blindShow = function(anchor, newSize, duration, easing){ + var size = newSize || this.getSize(); + this.clip(); + this.setVisible(true); + anchor = anchor.toLowerCase(); + switch(anchor){ + case 't': + case 'top': + this.setHeight(1); + this.setHeight(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut); + break; + case 'l': + case 'left': + this.setWidth(1); + this.setWidth(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut); + break; + } + this.unclip(); + return size; +}; + +/** +* Hide the element using a "blinds" effect +* @param {String} anchor The part of the element that it should appear to collapse to. + The short/long options are t/top, l/left, b/bottom, r/right. +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +*/ +YAHOO.ext.Actor.prototype.blindHide = function(anchor, duration, easing){ + var size = this.getSize(); + this.clip(); + anchor = anchor.toLowerCase(); + switch(anchor){ + case 't': + case 'top': + this.setSize(size.width, 1, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn); + this.setVisible(false); + break; + case 'l': + case 'left': + this.setSize(1, size.height, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn); + this.setVisible(false); + break; + case 'r': + case 'right': + this.animate({width: {to: 1}, points: {by: [this.getWidth(), 0]}}, + duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion); + this.setVisible(false); + break; + case 'b': + case 'bottom': + this.animate({height: {to: 1}, points: {by: [0, this.getHeight()]}}, + duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion); + this.setVisible(false); + break; + } + return size; +}; + +/** +* Show the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindShow effect is rendered. +* @param {String} anchor The part of the element that it should appear to slide from. + The short/long options currently are t/top, l/left +* @param {Number} newSize (optional) The size to animate to. (Default to current size) +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOuth) +*/ +YAHOO.ext.Actor.prototype.slideShow = function(anchor, newSize, duration, easing){ + var size = newSize || this.getSize(); + this.clip(); + var firstChild = this.dom.firstChild; + if(!firstChild || (firstChild.nodeName && "#TEXT" == firstChild.nodeName.toUpperCase())) { // can't do a slide with only a textnode + this.blindShow(anchor, newSize, duration, easing); + return; + } + var child = YAHOO.ext.Element.get(firstChild, true); + var pos = child.getPositioning(); + this.addCall(child.setAbsolutePositioned, null, child); + this.setVisible(true); + anchor = anchor.toLowerCase(); + switch(anchor){ + case 't': + case 'top': + this.addCall(child.setStyle, ['left', '0px'], child); + this.addCall(child.setStyle, ['bottom', '0px'], child); + this.setHeight(1); + this.setHeight(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut); + break; + case 'l': + case 'left': + this.addCall(child.setStyle, ['right', '0px'], child); + this.addCall(child.setStyle, ['top', '0px'], child); + this.setWidth(1); + this.setWidth(newSize, true, duration || .5, null, easing || YAHOO.util.Easing.easeOut); + break; + } + this.addCall(child.setPositioning, [pos], child); + this.unclip(); + return size; +}; + +/** +* Hide the element using a "slide in" effect - In order for this effect to work the element MUST have a child element container that can be "slid" otherwise a blindHide effect is rendered. +* @param {String} anchor The part of the element that it should appear to slide to. + The short/long options are t/top, l/left, b/bottom, r/right. +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +*/ +YAHOO.ext.Actor.prototype.slideHide = function(anchor, duration, easing){ + var size = this.getSize(); + this.clip(); + var firstChild = this.dom.firstChild; + if(!firstChild || (firstChild.nodeName && "#TEXT" == firstChild.nodeName.toUpperCase())) { // can't do a slide with only a textnode + this.blindHide(anchor, duration, easing); + return; + } + var child = YAHOO.ext.Element.get(firstChild, true); + var pos = child.getPositioning(); + this.addCall(child.setAbsolutePositioned, null, child); + anchor = anchor.toLowerCase(); + switch(anchor){ + case 't': + case 'top': + this.addCall(child.setStyle, ['left', '0px'], child); + this.addCall(child.setStyle, ['bottom', '0px'], child); + this.setSize(size.width, 1, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn); + this.setVisible(false); + break; + case 'l': + case 'left': + this.addCall(child.setStyle, ['right', '0px'], child); + this.addCall(child.setStyle, ['top', '0px'], child); + this.setSize(1, size.height, true, duration || .5, null, easing || YAHOO.util.Easing.easeIn); + this.setVisible(false); + break; + case 'r': + case 'right': + this.addCall(child.setStyle, ['left', '0px'], child); + this.addCall(child.setStyle, ['top', '0px'], child); + this.animate({width: {to: 1}, points: {by: [this.getWidth(), 0]}}, + duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion); + this.setVisible(false); + break; + case 'b': + case 'bottom': + this.addCall(child.setStyle, ['left', '0px'], child); + this.addCall(child.setStyle, ['bottom', '0px'], child); + this.animate({height: {to: 1}, points: {by: [0, this.getHeight()]}}, + duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion); + this.setVisible(false); + break; + } + this.addCall(child.setPositioning, [pos], child); + return size; +}; + +/** +* Hide the element by "squishing" it into the corner +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.squish = function(duration){ + var size = this.getSize(); + this.clip(); + this.setSize(1, 1, true, duration || .5); + this.setVisible(false); + return size; +}; + +/** +* Fade an element in +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.appear = function(duration){ + this.setVisible(true, true, duration); +}; + +/** +* Fade an element out +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.fade = function(duration){ + this.setVisible(false, true, duration); +}; + +/** +* Blink the element as if it was clicked and then collapse on it's center +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.switchOff = function(duration){ + this.clip(); + this.setVisible(false, true, .1); + this.clearOpacity(); + this.setVisible(true); + this.animate({height: {to: 1}, points: {by: [0, this.getHeight()/2]}}, + duration || .5, null, YAHOO.util.Easing.easeOut, YAHOO.util.Motion); + this.setVisible(false); +}; + +/** +* Highlight the element using a background color (or passed attribute) animation +* @param {String} color (optional) The color to use for the highlight +* @param {String} fromColor (optional) If the element does not currently have a background color, you will need to pass in a color to animate from +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {String} attribute (optional) Specify a CSS attribute to use other than background color - camelCase +*/ +YAHOO.ext.Actor.prototype.highlight = function(color, fromColor, duration, attribute){ + attribute = attribute || 'backgroundColor'; + var original = this.getStyle(attribute); + fromColor = fromColor || ((original && original != '' && original != 'transparent') ? original : '#FFFFFF'); + var cfg = {}; + cfg[attribute] = {to: color, from: fromColor}; + this.setVisible(true); + this.animate(cfg, duration || .5, null, YAHOO.util.Easing.bounceOut, YAHOO.util.ColorAnim); + this.setStyle(attribute, original); +}; + +/** +* Fade the element in and out the specified amount of times +* @param {Number} count (optional) How many times to pulse (Defaults to 3) +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.pulsate = function(count, duration){ + count = count || 3; + for(var i = 0; i < count; i++){ + this.toggle(true, duration || .25); + this.toggle(true, duration || .25); + } +}; + +/** +* Fade the element as it is falling from it's current position +* @param {Float} duration (optional) How long the effect lasts (in seconds) +*/ +YAHOO.ext.Actor.prototype.dropOut = function(duration){ + this.animate({opacity: {to: 0}, points: {by: [0, this.getHeight()]}}, + duration || .5, null, YAHOO.util.Easing.easeIn, YAHOO.util.Motion); + this.setVisible(false); +}; + +/** +* Hide the element in a way that it appears as if it is flying off the screen +* @param {String} anchor The part of the page that the element should appear to move to. + The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, + tr/top-right, bl/bottom-left or br/bottom-right. +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeIn) +*/ +YAHOO.ext.Actor.prototype.moveOut = function(anchor, duration, easing){ + var Y = YAHOO.util; + var vw = Y.Dom.getViewportWidth(); + var vh = Y.Dom.getViewportHeight(); + var cpoints = this.getCenterXY() + var centerX = cpoints[0]; + var centerY = cpoints[1]; + var anchor = anchor.toLowerCase(); + var p; + switch(anchor){ + case 't': + case 'top': + p = [centerX, -this.getHeight()]; + break; + case 'l': + case 'left': + p = [-this.getWidth(), centerY]; + break; + case 'r': + case 'right': + p = [vw+this.getWidth(), centerY]; + break; + case 'b': + case 'bottom': + p = [centerX, vh+this.getHeight()]; + break; + case 'tl': + case 'top-left': + p = [-this.getWidth(), -this.getHeight()]; + break; + case 'bl': + case 'bottom': + p = [-this.getWidth(), vh+this.getHeight()]; + break; + case 'br': + case 'bottom-right': + p = [vw+this.getWidth(), vh+this.getHeight()]; + break; + case 'tr': + case 'top-right': + p = [vw+this.getWidth(), -this.getHeight()]; + break; + } + this.moveTo(p[0], p[1], true, duration || .35, null, easing || Y.Easing.easeIn); + this.setVisible(false); +}; + +/** +* Show the element in a way that it appears as if it is flying onto the screen +* @param {String} anchor The part of the page that the element should appear to move from. + The short/long options are t/top, l/left, b/bottom, r/right, tl/top-left, + tr/top-right, bl/bottom-left or br/bottom-right. +* @param {Array} to (optional) Array of x and y position to move to like [x, y] (Defaults to center screen) +* @param {Float} duration (optional) How long the effect lasts (in seconds) +* @param {Function} easing (optional) YAHOO.util.Easing method to use. (Defaults to YAHOO.util.Easing.easeOut) +*/ +YAHOO.ext.Actor.prototype.moveIn = function(anchor, to, duration, easing){ + to = to || this.getCenterXY(); + this.moveOut(anchor, .01); + this.setVisible(true); + this.setXY(to, true, duration || .35, null, easing || YAHOO.util.Easing.easeOut); +}; + + + +/** + * @class Used by {@link YAHOO.ext.Actor} to queue standard calls. Generally used internally. Documentation to come.

+ */ +YAHOO.ext.Actor.Action = function(actor, method, args){ + this.actor = actor; + this.method = method; + this.args = args; + //alert('queueing ' + actor.id + ' ' + method.toString()); + } + +YAHOO.ext.Actor.Action.prototype = { + play : function(onComplete){ + this.method.apply(this.actor || window, this.args); + onComplete(); + } +}; + + +/** + * @class Used by {@link YAHOO.ext.Actor} to queue animations. Generally used internally. Documentation to come.

+ */ +YAHOO.ext.Actor.AsyncAction = function(actor, method, args, onIndex){ + YAHOO.ext.Actor.AsyncAction.superclass.constructor.call(this, actor, method, args); + this.onIndex = onIndex; + this.originalCallback = this.args[onIndex]; +} +YAHOO.extendX(YAHOO.ext.Actor.AsyncAction, YAHOO.ext.Actor.Action); + +YAHOO.ext.Actor.AsyncAction.prototype.play = function(onComplete){ + var callbackArg = this.originalCallback ? + this.originalCallback.createSequence(onComplete) : onComplete; + this.args[this.onIndex] = callbackArg; + this.method.apply(this.actor, this.args); +}; + + +/** + * @class Used by {@link YAHOO.ext.Actor} to perform pauses. Generally used internally. Documentation to come.

+ */ +YAHOO.ext.Actor.PauseAction = function(seconds){ + this.seconds = seconds; +}; +YAHOO.ext.Actor.PauseAction.prototype = { + play : function(onComplete){ + setTimeout(onComplete, this.seconds * 1000); + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/anim/Animator.js b/www/extras/yui-ext/source/anim/Animator.js new file mode 100644 index 000000000..c481dee47 --- /dev/null +++ b/www/extras/yui-ext/source/anim/Animator.js @@ -0,0 +1,367 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * Provides support for syncing animations for multiple {@link YAHOO.ext.Actor}s.

+*

This example can be seen in action here by clicking on "Click here and I will point it out".
+ *

+var animator = new YAHOO.ext.Animator();
+var cursor = new YAHOO.ext.Actor('cursor-img', animator);
+var click = new YAHOO.ext.Actor('click-img', animator);
+var resize = new YAHOO.ext.Actor('resize-img', animator);
+
+// start capturing
+animator.startCapture();
+
+// these animations will be run in sequence
+cursor.show();
+cursor.moveTo(500,400);
+cursor.moveTo(20, getEl('navbar').getY()+10, true, .75);
+click.show();
+click.alignTo(cursor, 'tl', [-4, -4]);
+
+// Add an async function call, pass callback to argument 1
+animator.addAsyncCall(Blog.navbar.undockDelegate, 1);
+
+// pause .5 seconds
+animator.pause(.5);
+
+// again, these animations will be run in sequence
+click.hide(true, .7);
+cursor.alignTo('splitter', 'tr', [0, +100], true, 1);
+resize.alignTo('splitter', 'tr', [-12, +100]);
+
+// start sync block: these animations will run at the same time
+animator.beginSync();
+cursor.hide();
+resize.show();
+animator.endSync();
+
+// play the captured animation sequences, call myCallback when done
+animator.play(myCallback);
+ * 
+ * @extends YAHOO.ext.Element + * @requires YAHOO.ext.Element + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.Anim + * @requires YAHOO.util.ColorAnim + * @requires YAHOO.util.Motion + * @constructor + * @param {String/HTMLElement} el The dom element or element id + * @param {YAHOO.ext.Animator} animator (optional) The Animator that will capture this Actor's actions + * @param {Boolean} selfCapture (optional) Whether this actor should capture it's own actions to support self playback without an animator (defaults to false) + */ + YAHOO.ext.Animator = function(/*Actors...*/){ + /** @private */ + this.actors = []; + /** @private */ + this.playlist = new YAHOO.ext.Animator.AnimSequence(); + /** @private */ + this.captureDelegate = this.capture.createDelegate(this); + /** @private */ + this.playDelegate = this.play.createDelegate(this); + /** @private */ + this.syncing = false; + /** @private */ + this.stopping = false; + /** @private */ + this.playing = false; + for(var i = 0; i < arguments.length; i++){ + this.addActor(arguments[i]); + } + }; + + YAHOO.ext.Animator.prototype = { + + /** + * @private + */ + capture : function(actor, action){ + if(this.syncing){ + if(!this.syncMap[actor.id]){ + this.syncMap[actor.id] = new YAHOO.ext.Animator.AnimSequence(); + } + this.syncMap[actor.id].add(action); + }else{ + this.playlist.add(action); + } + }, + + /** + * Add an actor. The actor is also set to capturing = true. + * @param {YAHOO.ext.Actor} actor + */ + addActor : function(actor){ + actor.onCapture.subscribe(this.captureDelegate); + this.actors.push(actor); + }, + + + /** + * Start capturing actions on the added actors. + * @param {Boolean} clearPlaylist Whether to also create a new playlist + */ + startCapture : function(clearPlaylist){ + for(var i = 0; i < this.actors.length; i++){ + var a = this.actors[i]; + if(!this.isCapturing(a)){ + a.onCapture.subscribe(this.captureDelegate); + } + a.capturing = true; + } + if(clearPlaylist){ + this.playlist = new YAHOO.ext.Animator.AnimSequence(); + } + }, + + /** + * Checks whether this animator is listening to a specific actor. + * @param {YAHOO.ext.Actor} actor + */ + isCapturing : function(actor){ + var subscribers = actor.onCapture.subscribers; + if(subscribers){ + for(var i = 0; i < subscribers.length; i++){ + if(subscribers[i] && subscribers[i].contains(this.captureDelegate)){ + return true; + } + } + } + return false; + }, + + /** + * Stop capturing on all added actors. + */ + stopCapture : function(){ + for(var i = 0; i < this.actors.length; i++){ + var a = this.actors[i]; + a.onCapture.unsubscribe(this.captureDelegate); + a.capturing = false; + } + }, + + /** + * Start a multi-actor sync block. By default all animations are run in sequence. While in the sync block + * each actor's own animations will still be sequenced, but all actors will animate at the same time. + */ + beginSync : function(){ + this.syncing = true; + this.syncMap = {}; + }, + + /** + * End the multi-actor sync block + */ + endSync : function(){ + this.syncing = false; + var composite = new YAHOO.ext.Animator.CompositeSequence(); + for(key in this.syncMap){ + if(typeof this.syncMap[key] != 'function'){ + composite.add(this.syncMap[key]); + } + } + this.playlist.add(composite); + this.syncMap = null; + }, + + /** + * Starts playback of the playlist, also stops any capturing. To start capturing again call {@link #startCapture}. + * @param {Function} oncomplete (optional) Callback to execute when playback has completed + */ + play : function(oncomplete){ + if(this.playing) return; // can't play the same animation twice at once + this.stopCapture(); + this.playlist.play(oncomplete); + }, + + /** + * Stop at the next available stopping point + */ + stop : function(){ + this.playlist.stop(); + }, + + /** + * Check if this animator is currently playing + */ + isPlaying : function(){ + return this.playlist.isPlaying(); + }, + /** + * Clear the playlist + */ + clear : function(){ + this.playlist = new YAHOO.ext.Animator.AnimSequence(); + }, + + /** + * Add a function call to the playlist. + * @param {Function} fcn The function to call + * @param {Array} args The arguments to call the function with + * @param {Object} scope (optional) The scope of the function + */ + addCall : function(fcn, args, scope){ + this.playlist.add(new YAHOO.ext.Actor.Action(scope, fcn, args || [])); + }, + + /** + * Add an async function call to the playlist. + * @param {Function} fcn The function to call + * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. + * @param {Array} args The arguments to call the function with + * @param {Object} scope (optional) The scope of the function + */ + addAsyncCall : function(fcn, callbackIndex, args, scope){ + this.playlist.add(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex)); + }, + + /** + * Add a pause to the playlist (in seconds) + * @param {Number} seconds The number of seconds to pause. + */ + pause : function(seconds){ + this.playlist.add(new YAHOO.ext.Actor.PauseAction(seconds)); + } + + }; + + +/** + * @class Used by {@link YAHOO.ext.Animator} to sequence animations. Generally used internally. Documentation to come.

+ */ +YAHOO.ext.Animator.AnimSequence = function(){ + this.actions = []; + this.nextDelegate = this.next.createDelegate(this); + this.playDelegate = this.play.createDelegate(this); + this.oncomplete = null; + this.playing = false; + this.stopping = false; + this.actionIndex = -1; + }; + + YAHOO.ext.Animator.AnimSequence.prototype = { + + add : function(action){ + this.actions.push(action); + }, + + next : function(){ + if(this.stopping){ + this.playing = false; + if(this.oncomplete){ + this.oncomplete(this, false); + } + return; + } + var nextAction = this.actions[++this.actionIndex]; + if(nextAction){ + nextAction.play(this.nextDelegate); + }else{ + this.playing = false; + if(this.oncomplete){ + this.oncomplete(this, true); + } + } + }, + + play : function(oncomplete){ + if(this.playing) return; // can't play the same sequence twice at once + this.oncomplete = oncomplete; + this.stopping = false; + this.playing = true; + this.actionIndex = -1; + this.next(); + }, + + stop : function(){ + this.stopping = true; + }, + + isPlaying : function(){ + return this.playing; + }, + + clear : function(){ + this.actions = []; + }, + + addCall : function(fcn, args, scope){ + this.actions.push(new YAHOO.ext.Actor.Action(scope, fcn, args || [])); + }, + + /** + * Add an async function call to the capture queue. + * @param {Function} fcn The function to call + * @param {Number} callbackIndex The index of the callback parameter on the passed function. A CALLBACK IS REQUIRED. + * @param {Array} args The arguments to call the function with + * @param {Object} scope (optional) The scope of the function + */ + addAsyncCall : function(fcn, callbackIndex, args, scope){ + this.actions.push(new YAHOO.ext.Actor.AsyncAction(scope, fcn, args || [], callbackIndex)); + }, + + pause : function(seconds){ + this.actions.push(new YAHOO.ext.Actor.PauseAction(seconds)); + } + + }; + +/** + * @class Used by {@link YAHOO.ext.Animator} to run multiple animation sequences at once. Generally used internally. Documentation to come.

+ */ +YAHOO.ext.Animator.CompositeSequence = function(){ + this.sequences = []; + this.completed = 0; + this.trackDelegate = this.trackCompletion.createDelegate(this); +} + +YAHOO.ext.Animator.CompositeSequence.prototype = { + add : function(sequence){ + this.sequences.push(sequence); + }, + + play : function(onComplete){ + this.completed = 0; + if(this.sequences.length < 1){ + if(onComplete)onComplete(); + return; + } + this.onComplete = onComplete; + for(var i = 0; i < this.sequences.length; i++){ + this.sequences[i].play(this.trackDelegate); + } + }, + + trackCompletion : function(){ + ++this.completed; + if(this.completed >= this.sequences.length && this.onComplete){ + this.onComplete(); + } + }, + + stop : function(){ + for(var i = 0; i < this.sequences.length; i++){ + this.sequences[i].stop(); + } + }, + + isPlaying : function(){ + for(var i = 0; i < this.sequences.length; i++){ + if(this.sequences[i].isPlaying()){ + return true; + } + } + return false; + } +}; + + diff --git a/www/extras/yui-ext/source/data/AbstractDataModel.js b/www/extras/yui-ext/source/data/AbstractDataModel.js new file mode 100644 index 000000000..8154fa099 --- /dev/null +++ b/www/extras/yui-ext/source/data/AbstractDataModel.js @@ -0,0 +1,167 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * This abstract class provides default implementations of the events required by the Grid. + It takes care of the creating the CustomEvents and provides some convenient methods for firing the events.

+ * @constructor +*/ +YAHOO.ext.grid.AbstractDataModel = function(){ + /** Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onCellUpdated = new YAHOO.util.CustomEvent('onCellUpdated'); + /** Fires when all data needs to be revalidated - fireDirect sig: (thisd) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onTableDataChanged = new YAHOO.util.CustomEvent('onTableDataChanged'); + /** Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onRowsDeleted = new YAHOO.util.CustomEvent('onRowsDeleted'); + /** Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onRowsInserted = new YAHOO.util.CustomEvent('onRowsInserted'); + /** Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onRowsUpdated = new YAHOO.util.CustomEvent('onRowsUpdated'); + /** Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, + * sortDirection = 'ASC' or 'DESC') + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onRowsSorted = new YAHOO.util.CustomEvent('onRowsSorted'); + + this.events = { + 'cellupdated' : this.onCellUpdated, + 'datachanged' : this.onTableDataChanged, + 'rowsdeleted' : this.onRowsDeleted, + 'rowsinserted' : this.onRowsInserted, + 'rowsupdated' : this.onRowsUpdated, + 'rowssorted' : this.onRowsSorted + }; +}; + +YAHOO.ext.grid.AbstractDataModel.prototype = { + + addListener : YAHOO.ext.grid.Grid.prototype.addListener, + removeListener : YAHOO.ext.grid.Grid.prototype.removeListener, + fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent, + + /** + * Notifies listeners that the value of the cell at [row, col] has been updated + */ + fireCellUpdated : function(row, col){ + this.onCellUpdated.fireDirect(this, row, col); + }, + + /** + * Notifies listeners that all data for the grid may have changed - use as a last resort. This + * also wipes out all selections a user might have made. + */ + fireTableDataChanged : function(){ + this.onTableDataChanged.fireDirect(this); + }, + + /** + * Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted + */ + fireRowsDeleted : function(firstRow, lastRow){ + this.onRowsDeleted.fireDirect(this, firstRow, lastRow); + }, + + /** + * Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted + */ + fireRowsInserted : function(firstRow, lastRow){ + this.onRowsInserted.fireDirect(this, firstRow, lastRow); + }, + + /** + * Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated + */ + fireRowsUpdated : function(firstRow, lastRow){ + this.onRowsUpdated.fireDirect(this, firstRow, lastRow); + }, + + /** + * Notifies listeners that rows have been sorted and any indexes may be invalid + */ + fireRowsSorted : function(sortColumnIndex, sortDir, noRefresh){ + this.onRowsSorted.fireDirect(this, sortColumnIndex, sortDir, noRefresh); + }, + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method. + * See {@link YAHOO.ext.DefaultDataModel} for an example implementation. + */ + sort : function(columnModel, columnIndex, direction, suppressEvent){ + + }, + + /** + * Interface method to supply the view with info regarding the Grid's current sort state - if overridden, + * this should return an object like this {column: this.sortColumn, direction: this.sortDir}. + * @return {Object} + */ + getSortState : function(){ + return {column: this.sortColumn, direction: this.sortDir}; + }, + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method. + * See {@link YAHOO.ext.DefaultDataModel} for an example implementation. + */ + getRowCount : function(){ + + }, + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts. + */ + getTotalRowCount : function(){ + return this.getRowCount(); + }, + + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method. + * See {@link YAHOO.ext.DefaultDataModel} for an example implementation. + */ + getRowId : function(rowIndex){ + + }, + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method. + * See {@link YAHOO.ext.DefaultDataModel} for an example implementation. + */ + getValueAt : function(rowIndex, colIndex){ + + }, + + /** + * Empty interface method - Classes which extend AbstractDataModel should implement this method. + * See {@link YAHOO.ext.DefaultDataModel} for an example implementation. + */ + setValueAt : function(value, rowIndex, colIndex){ + + }, + + isPaged : function(){ + return false; + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/data/DefaultDataModel.js b/www/extras/yui-ext/source/data/DefaultDataModel.js new file mode 100644 index 000000000..def0c6edd --- /dev/null +++ b/www/extras/yui-ext/source/data/DefaultDataModel.js @@ -0,0 +1,311 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * This is the default implementation of a DataModel used by the Grid. It works + * with multi-dimensional array based data. Using the event system in the base class + * {@link YAHOO.ext.grid.AbstractDataModel}, all updates to this DataModel are automatically + * reflected in the user interface. + *
Usage:
+ *

+ * var myData = [
+	["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
+	["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"]
+ * ];
+ * var dataModel = new YAHOO.ext.grid.DefaultDataModel(myData);
+ * 
+ * @extends YAHOO.ext.grid.AbstractDataModel + * @constructor +*/ +YAHOO.ext.grid.DefaultDataModel = function(data){ + YAHOO.ext.grid.DefaultDataModel.superclass.constructor.call(this); + /**@private*/ + this.data = data; +}; +YAHOO.extendX(YAHOO.ext.grid.DefaultDataModel, YAHOO.ext.grid.AbstractDataModel); + +/** + * Returns the number of rows in the dataset + * @return {Number} + */ +YAHOO.ext.grid.DefaultDataModel.prototype.getRowCount = function(){ + return this.data.length; +}; + +/** + * Returns the ID of the specified row. By default it return the value of the first column. + * Override to provide more advanced ID handling. + * @return {Number} + */ +YAHOO.ext.grid.DefaultDataModel.prototype.getRowId = function(rowIndex){ + return this.data[rowIndex][0]; +}; + +/** + * Returns the column data for the specified row. + * @return {Array} + */ +YAHOO.ext.grid.DefaultDataModel.prototype.getRow = function(rowIndex){ + return this.data[rowIndex]; +}; + +/** + * Returns the column data for the specified rows as a + * multi-dimensional array: rows[3][0] would give you the value of row 4, column 0. + * @param {Array} indexes The row indexes to fetch + * @return {Array} + */ +YAHOO.ext.grid.DefaultDataModel.prototype.getRows = function(indexes){ + var data = this.data; + var r = []; + for(var i = 0; i < indexes.length; i++){ + r.push(data[indexes[i]]); + } + return r; +}; + +/** + * Returns the value at the specified data position + * @param {Number} rowIndex + * @param {Number} colIndex + * @return {Object} + */ +YAHOO.ext.grid.DefaultDataModel.prototype.getValueAt = function(rowIndex, colIndex){ + return this.data[rowIndex][colIndex]; +}; + +/** + * Sets the specified value at the specified data position + * @param {Object} value The new value + * @param {Number} rowIndex + * @param {Number} colIndex + */ +YAHOO.ext.grid.DefaultDataModel.prototype.setValueAt = function(value, rowIndex, colIndex){ + this.data[rowIndex][colIndex] = value; + this.fireCellUpdated(rowIndex, colIndex); +}; + +/** + * @private + * Removes the specified range of rows. + * @param {Number} startIndex + * @param {Number} endIndex (optional) Defaults to startIndex + */ +YAHOO.ext.grid.DefaultDataModel.prototype.removeRows = function(startIndex, endIndex){ + endIndex = endIndex || startIndex; + this.data.splice(startIndex, endIndex-startIndex+1); + this.fireRowsDeleted(startIndex, endIndex); +}; + +/** + * Remove a row. + * @param {Number} index + */ +YAHOO.ext.grid.DefaultDataModel.prototype.removeRow = function(index){ + this.data.splice(index, 1); + this.fireRowsDeleted(index, index); +}; + +/** + * @private + * Removes all rows. + */ +YAHOO.ext.grid.DefaultDataModel.prototype.removeAll = function(){ + var count = this.getRowCount(); + if(count > 0){ + this.removeRows(0, count-1); + } +}; + +/** + * Query the DataModel rows by the filters defined in spec, for example... + *

+ * // column 1 starts with Jack, column 2 filtered by myFcn, column 3 equals 'Fred'
+ * dataModel.filter({1: /^Jack.+/i}, 2: myFcn, 3: 'Fred'});
+ * 
+ * @param {Object} spec The spec is generally an object literal consisting of + * column index and filter type. The filter type can be a string/number (exact match), + * a regular expression to test using String.search() or a function to call. If it's a function, + * it will be called with the value for the specified column and an array of the all column + * values for that row: yourFcn(value, columnData). If it returns anything other than true, + * the row is not a match. + * @param {Boolean} returnUnmatched True to return rows which don't match the query instead + * of rows that do match + * @return {Array} An array of row indexes that match + */ +YAHOO.ext.grid.DefaultDataModel.prototype.query = function(spec, returnUnmatched){ + var d = this.data; + var r = []; + for(var i = 0; i < d.length; i++){ + var row = d[i]; + var isMatch = true; + for(var col in spec){ + if(typeof spec[col] != 'function'){ + if(!isMatch) continue; + var filter = spec[col]; + switch(typeof filter){ + case 'string': + case 'number': + case 'boolean': + if(row[col] != filter){ + isMatch = false; + } + break; + case 'function': + if(!filter(row[col], row)){ + isMatch = false; + } + break; + case 'object': + if(filter instanceof RegExp){ + if(String(row[col]).search(filter) === -1){ + isMatch = false; + } + } + break; + } + } + } + if(isMatch && !returnUnmatched){ + r.push(i); + }else if(!isMatch && returnUnmatched){ + r.push(i); + } + } + return r; +}; + +/** + * Filter the DataModel rows by the query defined in spec, see {@link #query} for more details + * on the query spec. + * @param {Object} query The query spec {@link #query} + * @return {Number} The number of rows removed + */ +YAHOO.ext.grid.DefaultDataModel.prototype.filter = function(query){ + var matches = this.query(query, true); + var data = this.data; + // go thru the data setting matches to deleted + // while not disturbing row indexes + for(var i = 0; i < matches.length; i++){ + data[matches[i]]._deleted = true; + } + for(var i = 0; i < data.length; i++){ + while(data[i] && data[i]._deleted === true){ + this.removeRow(i); + } + } + return matches.length; +}; + +/** + * Adds a row to the dataset. + * @param {Array} cellValues The array of values for the new row + * @return {Number} The index of the added row + */ +YAHOO.ext.grid.DefaultDataModel.prototype.addRow = function(cellValues){ + this.data.push(cellValues); + var newIndex = this.data.length-1; + this.fireRowsInserted(newIndex, newIndex); + this.applySort(); + return newIndex; +}; + +/** + * @private + * Adds a set of rows. + * @param {Array} rowData This should be an array of arrays like the constructor takes + */ +YAHOO.ext.grid.DefaultDataModel.prototype.addRows = function(rowData){ + this.data = this.data.concat(rowData); + var firstIndex = this.data.length-rowData.length; + this.fireRowsInserted(firstIndex, firstIndex+rowData.length-1); + this.applySort(); +}; + +/** + * Inserts a row a the specified location in the dataset. + * @param {Number} index The index where the row should be inserted + * @param {Array} cellValues The array of values for the new row + * @return {Number} The index the row was inserted in + */ +YAHOO.ext.grid.DefaultDataModel.prototype.insertRow = function(index, cellValues){ + this.data.splice(index, 0, cellValues); + this.fireRowsInserted(index, index); + this.applySort(); + return index; +}; + +/** + * @private + * Inserts a set of rows. + * @param {Number} index The index where the rows should be inserted + * @param {Array} rowData This should be an array of arrays like the constructor takes + */ +YAHOO.ext.grid.DefaultDataModel.prototype.insertRows = function(index, rowData){ + /* + if(index == this.data.length){ // try these two first since they are faster + this.data = this.data.concat(rowData); + }else if(index == 0){ + this.data = rowData.concat(this.data); + }else{ + var newData = this.data.slice(0, index); + newData.concat(rowData); + newData.concat(this.data.slice(index)); + this.data = newData; + }*/ + var args = rowData.concat(); + args.splice(0, 0, index, 0); + this.data.splice.apply(this.data, args); + this.fireRowsInserted(index, index+rowData.length-1); + this.applySort(); +}; + +/** + * Applies the last used sort to the current data. + */ +YAHOO.ext.grid.DefaultDataModel.prototype.applySort = function(suppressEvent){ + if(this.columnModel && typeof this.sortColumn != 'undefined'){ + this.sort(this.columnModel, this.sortColumn, this.sortDir, suppressEvent); + } +}; + +YAHOO.ext.grid.DefaultDataModel.prototype.setDefaultSort = function(columnModel, columnIndex, direction){ + this.columnModel = columnModel; + this.sortColumn = columnIndex; + this.sortDir = direction; +}; +/** + * Sorts the data by the specified column - Uses the sortType specified for the column in the passed columnModel. + * @param {YAHOO.ext.grid.DefaultColumnModel} columnModel The ColumnModel for this dataset + * @param {Number} columnIndex The column index to sort by + * @param {String} direction The direction of the sort ('DESC' or 'ASC') + */ +YAHOO.ext.grid.DefaultDataModel.prototype.sort = function(columnModel, columnIndex, direction, suppressEvent){ + // store these so we can maintain sorting when we load new data + this.columnModel = columnModel; + this.sortColumn = columnIndex; + this.sortDir = direction; + + var dsc = direction == 'DESC'; + var sortType = columnModel.getSortType(columnIndex); + var fn = function(cells, cells2){ + var v1 = sortType(cells[columnIndex], cells); + var v2 = sortType(cells2[columnIndex], cells2); + if(v1 < v2) + return dsc ? -1 : +1; + if(v1 > v2) + return dsc ? +1 : -1; + return 0; + }; + this.data.sort(fn); + if(!suppressEvent){ + this.fireRowsSorted(columnIndex, direction); + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/data/JSONDataModel.js b/www/extras/yui-ext/source/data/JSONDataModel.js new file mode 100644 index 000000000..8196915a5 --- /dev/null +++ b/www/extras/yui-ext/source/data/JSONDataModel.js @@ -0,0 +1,83 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * This is an implementation of a DataModel used by the Grid. It works + * with JSON data. + *
Example schema: + *

+ * var schema = {
+ *     root: 'Results.Result',
+ *     id: 'ASIN',
+ *     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ * };
+ * 
+ * @extends YAHOO.ext.grid.LoadableDataModel + * @constructor +*/ +YAHOO.ext.grid.JSONDataModel = function(schema){ + YAHOO.ext.grid.JSONDataModel.superclass.constructor.call(this, YAHOO.ext.grid.LoadableDataModel.JSON); + /**@private*/ + this.schema = schema; +}; +YAHOO.extendX(YAHOO.ext.grid.JSONDataModel, YAHOO.ext.grid.LoadableDataModel); + +/** + * Overrides loadData in LoadableDataModel to process JSON data + * @param {Object} data The JSON object to load + * @param {Function} callback + */ +YAHOO.ext.grid.JSONDataModel.prototype.loadData = function(data, callback, keepExisting){ + var idField = this.schema.id; + var fields = this.schema.fields; + var rowData = []; + try{ + var root = eval('data.' + this.schema.root); + for(var i = 0; i < root.length; i++){ + var node = root[i]; + var colData = []; + colData.node = node; + colData.id = (typeof node[idField] != 'undefined' && node[idField] !== '' ? node[idField] : String(i)); + for(var j = 0; j < fields.length; j++) { + var val = node[fields[j]]; + if(typeof val == 'undefined'){ + val = ''; + } + if(this.preprocessors[j]){ + val = this.preprocessors[j](val); + } + colData.push(val); + } + rowData.push(colData); + } + if(keepExisting !== true){ + this.removeAll(); + } + this.addRows(rowData); + if(typeof callback == 'function'){ + callback(this, true); + } + this.fireLoadEvent(); + }catch(e){ + this.fireLoadException(e, null); + if(typeof callback == 'function'){ + callback(this, false); + } + } +}; + +/** + * Overrides getRowId in DefaultDataModel to return the ID value of the specified node. + * @param {Number} rowIndex + * @return {Number} + */ +YAHOO.ext.grid.JSONDataModel.prototype.getRowId = function(rowIndex){ + return this.data[rowIndex].id; +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/data/LoadableDataModel.js b/www/extras/yui-ext/source/data/LoadableDataModel.js new file mode 100644 index 000000000..21057a5a4 --- /dev/null +++ b/www/extras/yui-ext/source/data/LoadableDataModel.js @@ -0,0 +1,346 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * This class extends DefaultDataModel and adds the core functionality to load data remotely.

+ * @extends YAHOO.ext.grid.DefaultDataModel + * @constructor + * @param {String} dataType YAHOO.ext.grid.LoadableDataModel.XML, YAHOO.ext.grid.LoadableDataModel.TEXT or YAHOO.ext.grid.JSON +*/ +YAHOO.ext.grid.LoadableDataModel = function(dataType){ + YAHOO.ext.grid.LoadableDataModel.superclass.constructor.call(this, []); + + /** Fires when a successful load is completed - fireDirect sig: (this) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onLoad = new YAHOO.util.CustomEvent('load'); + /** Fires when a load fails - fireDirect sig: (this, errorMsg, responseObj) + * @type YAHOO.util.CustomEvent + * @deprecated Use addListener instead of accessing directly + */ + this.onLoadException = new YAHOO.util.CustomEvent('loadException'); + + this.events['load'] = this.onLoad; + this.events['beforeload'] = new YAHOO.util.CustomEvent('beforeload'); + this.events['loadexception'] = this.onLoadException; + + /**@private*/ + this.dataType = dataType; + /**@private*/ + this.preprocessors = []; + /**@private*/ + this.postprocessors = []; + + // paging info + /** The active page @type Number*/ + this.loadedPage = 1; + /** True to use remote sorting, initPaging automatically sets this to true @type Boolean */ + this.remoteSort = false; + /** The number of records per page @type Number*/ + this.pageSize = 0; + /** The script/page to call to provide paged/sorted data @type String*/ + this.pageUrl = null; + /** An object of key/value pairs to be passed as parameters + * when loading pages/sorting @type Object*/ + this.baseParams = {}; + /** Maps named params to url parameters - Override to specify your own param names */ + this.paramMap = {'page':'page', 'pageSize':'pageSize', 'sortColumn':'sortColumn', 'sortDir':'sortDir'}; + +}; +YAHOO.extendX(YAHOO.ext.grid.LoadableDataModel, YAHOO.ext.grid.DefaultDataModel); + +/** @ignore */ +YAHOO.ext.grid.LoadableDataModel.prototype.setLoadedPage = function(pageNum, userCallback){ + this.loadedPage = pageNum; + if(typeof userCallback == 'function'){ + userCallback(); + } +}; + +/** Returns true if this model uses paging @type Boolean */ +YAHOO.ext.grid.LoadableDataModel.prototype.isPaged = function(){ + return this.pageSize > 0; +}; + +/** Returns the total number of records available, override if needed @type Number */ +YAHOO.ext.grid.LoadableDataModel.prototype.getTotalRowCount = function(){ + return this.totalCount || this.getRowCount(); +}; + +/** Returns the number of records per page @type Number */ +YAHOO.ext.grid.LoadableDataModel.prototype.getPageSize = function(){ + return this.pageSize; +}; + +/** Returns the total number of pages available @type Number */ +YAHOO.ext.grid.LoadableDataModel.prototype.getTotalPages = function(){ + if(this.getPageSize() == 0 || this.getTotalRowCount() == 0){ + return 1; + } + return Math.ceil(this.getTotalRowCount()/this.getPageSize()); +}; + +/** Initializes paging for this model. */ +YAHOO.ext.grid.LoadableDataModel.prototype.initPaging = function(url, pageSize, baseParams){ + this.pageUrl = url; + this.pageSize = pageSize; + this.remoteSort = true; + if(baseParams) this.baseParams = baseParams; +}; + +/** @ignore */ +YAHOO.ext.grid.LoadableDataModel.prototype.createParams = function(pageNum, sortColumn, sortDir){ + var params = {}, map = this.paramMap; + for(var key in this.baseParams){ + if(typeof this.baseParams[key] != 'function'){ + params[key] = this.baseParams[key]; + } + } + params[map['page']] = pageNum; + params[map['pageSize']] = this.getPageSize(); + params[map['sortColumn']] = (typeof sortColumn == 'undefined' ? '' : sortColumn); + params[map['sortDir']] = sortDir || ''; + return params; +}; + +YAHOO.ext.grid.LoadableDataModel.prototype.loadPage = function(pageNum, callback, keepExisting){ + var sort = this.getSortState(); + var params = this.createParams(pageNum, sort.column, sort.direction); + this.load(this.pageUrl, params, this.setLoadedPage.createDelegate(this, [pageNum, callback]), + keepExisting ? (pageNum-1) * this.pageSize : null); +}; + +/** @ignore */ +YAHOO.ext.grid.LoadableDataModel.prototype.applySort = function(suppressEvent){ + if(!this.remoteSort){ + YAHOO.ext.grid.LoadableDataModel.superclass.applySort.apply(this, arguments); + }else if(!suppressEvent){ + var sort = this.getSortState(); + if(sort.column){ + this.fireRowsSorted(sort.column, sort.direction, true); + } + } +}; + +/** @ignore */ +YAHOO.ext.grid.LoadableDataModel.prototype.resetPaging = function(){ + this.loadedPage = 1; +}; + +/** Overridden sort method to use remote sorting if turned on */ +YAHOO.ext.grid.LoadableDataModel.prototype.sort = function(columnModel, columnIndex, direction, suppressEvent){ + if(!this.remoteSort){ + YAHOO.ext.grid.LoadableDataModel.superclass.sort.apply(this, arguments); + }else{ + this.columnModel = columnModel; + this.sortColumn = columnIndex; + this.sortDir = direction; + var params = this.createParams(this.loadedPage, columnIndex, direction); + this.load(this.pageUrl, params, this.fireRowsSorted.createDelegate(this, [columnIndex, direction, true])); + } +} +/** + * Initiates the loading of the data from the specified URL - Failed load attempts will + * fire the {@link #onLoadException} event. + * @param {Object/String} url The url from which the data can be loaded + * @param {String/Object} params (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or as an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when load is complete - called with signature (this, rowCountLoaded) + * @param {Number} insertIndex (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data + */ +YAHOO.ext.grid.LoadableDataModel.prototype.load = function(url, params, callback, insertIndex){ + this.fireEvent('beforeload'); + if(params && typeof params != 'string'){ // must be object + var buf = []; + for(var key in params){ + if(typeof params[key] != 'function'){ + buf.push(encodeURIComponent(key), '=', encodeURIComponent(params[key]), '&'); + } + } + delete buf[buf.length-1]; + params = buf.join(''); + } + var cb = { + success: this.processResponse, + failure: this.processException, + scope: this, + argument: {callback: callback, insertIndex: insertIndex} + }; + var method = params ? 'POST' : 'GET'; + YAHOO.util.Connect.asyncRequest(method, url, cb, params); +}; + +/**@private*/ +YAHOO.ext.grid.LoadableDataModel.prototype.processResponse = function(response){ + var cb = response.argument.callback; + var keepExisting = (typeof response.argument.insertIndex == 'number'); + var insertIndex = response.argument.insertIndex; + switch(this.dataType){ + case YAHOO.ext.grid.LoadableDataModel.XML: + this.loadData(response.responseXML, cb, keepExisting, insertIndex); + break; + case YAHOO.ext.grid.LoadableDataModel.JSON: + var rtext = response.responseText; + try { // this code is a modified version of Yahoo! UI DataSource JSON parsing + // Trim leading spaces + while(rtext.substring(0,1) == " ") { + rtext = rtext.substring(1, rtext.length); + } + // Invalid JSON response + if(rtext.indexOf("{") < 0) { + throw "Invalid JSON response"; + } + + // Empty (but not invalid) JSON response + if(rtext.indexOf("{}") === 0) { + this.loadData({}, response.argument.callback); + return; + } + + // Turn the string into an object literal... + // ...eval is necessary here + var jsonObjRaw = eval("(" + rtext + ")"); + if(!jsonObjRaw) { + throw "Error evaling JSON response"; + } + this.loadData(jsonObjRaw, cb, keepExisting, insertIndex); + } catch(e) { + this.fireLoadException(e, response); + if(typeof callback == 'function'){ + callback(this, false); + } + } + break; + case YAHOO.ext.grid.LoadableDataModel.TEXT: + this.loadData(response.responseText, cb, keepExisting, insertIndex); + break; + }; +}; + +/**@private*/ +YAHOO.ext.grid.LoadableDataModel.prototype.processException = function(response){ + this.fireLoadException(null, response); + if(typeof response.argument.callback == 'function'){ + response.argument.callback(this, false); + } +}; + +YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadException = function(e, responseObj){ + this.onLoadException.fireDirect(this, e, responseObj); +}; + +YAHOO.ext.grid.LoadableDataModel.prototype.fireLoadEvent = function(){ + this.fireEvent('load', this.loadedPage, this.getTotalPages()); +}; + +/** + * Adds a preprocessor function to parse data before it is added to the Model - ie. Date.parse to parse dates. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.addPreprocessor = function(columnIndex, fn){ + this.preprocessors[columnIndex] = fn; +}; + +/** + * Gets the preprocessor function for the specified column. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.getPreprocessor = function(columnIndex){ + return this.preprocessors[columnIndex]; +}; + +/** + * Removes a preprocessor function. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.removePreprocessor = function(columnIndex){ + this.preprocessors[columnIndex] = null; +}; + +/** + * Adds a postprocessor function to format data before updating the underlying data source (ie. convert date to string before updating XML document). + */ +YAHOO.ext.grid.LoadableDataModel.prototype.addPostprocessor = function(columnIndex, fn){ + this.postprocessors[columnIndex] = fn; +}; + +/** + * Gets the postprocessor function for the specified column. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.getPostprocessor = function(columnIndex){ + return this.postprocessors[columnIndex]; +}; + +/** + * Removes a postprocessor function. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.removePostprocessor = function(columnIndex){ + this.postprocessors[columnIndex] = null; +}; +/** + * Empty interface method - Called to process the data returned by the XHR - Classes which extend LoadableDataModel should implement this method. + * See {@link YAHOO.ext.XMLDataModel} for an example implementation. + */ +YAHOO.ext.grid.LoadableDataModel.prototype.loadData = function(data, callback, keepExisting, insertIndex){ + +}; + +YAHOO.ext.grid.LoadableDataModel.XML = 'xml'; +YAHOO.ext.grid.LoadableDataModel.JSON = 'json'; +YAHOO.ext.grid.LoadableDataModel.TEXT = 'text'; + +/* +YAHOO.ext.grid.SparceDataset = function(bufferSize){ + this.stack = []; + this.bufferSize = bufferSize || 1000; + this.maxIndex = 0; + + this.events = { + 'rowsexpired' : new YAHOO.util.CustomEvent('rowsexpired') + }; +}; + +YAHOO.ext.grid.SparceDataset.prototype = { + addListener : YAHOO.ext.grid.Grid.prototype.addListener, + removeListener : YAHOO.ext.grid.Grid.prototype.removeListener, + fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent, + + getRowAt : function(index){ + return this[String(index)]; + }, + + splice : function(index, deleteCount){ + this.insertRowsAt(index, Array.prototype.slice.call(arguments, 2)); + }, + + concat : function(){ + this.insertRowsAt(index, Array.prototype.slice.call(arguments, 2)); + }, + + insertRowsAt: function(index, rowData){ + for(var i = 0; i < rowData.length; i++) { + var d = rowData[i]; + var dataIndex = index + i; + this[dataIndex] = d; + this.stack.push(dataIndex); + } + this.maxIndex = Math.max(this.maxIndex, index+rowData.length); + this.cleanup(); + }, + + cleanup : function(){ + while(stack.length > this.bufferSize){ + var dataIndex = stack.shift(); + delete this[dataIndex]; + this.fireEvent('rowsexpired', dataIndex); + } + } +};*/ + + + + + diff --git a/www/extras/yui-ext/source/data/XMLDataModel.js b/www/extras/yui-ext/source/data/XMLDataModel.js new file mode 100644 index 000000000..9055b9b86 --- /dev/null +++ b/www/extras/yui-ext/source/data/XMLDataModel.js @@ -0,0 +1,239 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * This is an implementation of a DataModel used by the Grid. It works + * with XML data. + *
Example schema from Amazon search: + *

+ * var schema = {
+ *     tagName: 'Item',
+ *     id: 'ASIN',
+ *     fields: ['Author', 'Title', 'Manufacturer', 'ProductGroup']
+ * };
+ * 
+ * @extends YAHOO.ext.grid.LoadableDataModel + * @constructor + * @param {Object} schema The schema to use + * @param {XMLDocument} xml An XML document to load immediately +*/ +YAHOO.ext.grid.XMLDataModel = function(schema, xml){ + YAHOO.ext.grid.XMLDataModel.superclass.constructor.call(this, YAHOO.ext.grid.LoadableDataModel.XML); + /**@private*/ + this.schema = schema; + this.xml = xml; + if(xml){ + this.loadData(xml); + } +}; +YAHOO.extendX(YAHOO.ext.grid.XMLDataModel, YAHOO.ext.grid.LoadableDataModel); + +YAHOO.ext.grid.XMLDataModel.prototype.getDocument = function(){ + return this.xml; +}; + +/** + * Overrides loadData in LoadableDataModel to process XML + * @param {XMLDocument} doc The document to load + * @param {Function} callback (optional) callback to call when loading is complete + * @param {Boolean} keepExisting (optional) true to keep existing data + * @param {Number} insertIndex (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data + */ +YAHOO.ext.grid.XMLDataModel.prototype.loadData = function(doc, callback, keepExisting, insertIndex){ + this.xml = doc; + var idField = this.schema.id; + var fields = this.schema.fields; + if(this.schema.totalTag){ + this.totalCount = null; + var totalNode = doc.getElementsByTagName(this.schema.totalTag); + if(totalNode && totalNode.item(0) && totalNode.item(0).firstChild) { + var v = parseInt(totalNode.item(0).firstChild.nodeValue, 10); + if(!isNaN(v)){ + this.totalCount = v; + } + } + } + var rowData = []; + var nodes = doc.getElementsByTagName(this.schema.tagName); + if(nodes && nodes.length > 0) { + for(var i = 0; i < nodes.length; i++) { + var node = nodes.item(i); + var colData = []; + colData.node = node; + colData.id = this.getNamedValue(node, idField, String(i)); + for(var j = 0; j < fields.length; j++) { + var val = this.getNamedValue(node, fields[j], ""); + if(this.preprocessors[j]){ + val = this.preprocessors[j](val); + } + colData.push(val); + } + rowData.push(colData); + } + } + if(keepExisting !== true){ + YAHOO.ext.grid.XMLDataModel.superclass.removeAll.call(this); + } + if(typeof insertIndex != 'number'){ + insertIndex = this.getRowCount(); + } + YAHOO.ext.grid.XMLDataModel.superclass.insertRows.call(this, insertIndex, rowData); + if(typeof callback == 'function'){ + callback(this, true); + } + this.fireLoadEvent(); +}; + +/** + * Adds a row to this DataModel and syncs the XML document + * @param {String} id The id of the row, if null the next row index is used + * @param {Array} cellValues The cell values for this row + * @return {Number} The index of the new row + */ +YAHOO.ext.grid.XMLDataModel.prototype.addRow = function(id, cellValues){ + var newIndex = this.getRowCount(); + var node = this.createNode(this.xml, id, cellValues); + cellValues.id = id || newIndex; + cellValues.node = node; + YAHOO.ext.grid.XMLDataModel.superclass.addRow.call(this, cellValues); + return newIndex; +}; + +/** + * Inserts a row into this DataModel and syncs the XML document + * @param {Number} index The index to insert the row + * @param {String} id The id of the row, if null the next row index is used + * @param {Array} cellValues The cell values for this row + * @return {Number} The index of the new row + */ +YAHOO.ext.grid.XMLDataModel.prototype.insertRow = function(index, id, cellValues){ + var node = this.createNode(this.xml, id, cellValues); + cellValues.id = id || this.getRowCount(); + cellValues.node = node; + YAHOO.ext.grid.XMLDataModel.superclass.insertRow.call(this, index, cellValues); + return index; +}; + +/** + * Removes the row from DataModel and syncs the XML document + * @param {Number} index The index of the row to remove + */ +YAHOO.ext.grid.XMLDataModel.prototype.removeRow = function(index){ + var node = this.data[index].node; + node.parentNode.removeChild(node); + YAHOO.ext.grid.XMLDataModel.superclass.removeRow.call(this, index, index); +}; + +YAHOO.ext.grid.XMLDataModel.prototype.getNode = function(rowIndex){ + return this.data[rowIndex].node; +}; + +/** + * Override this method to define your own node creation routine for when new rows are added. + * By default this method clones the first node and sets the column values in the newly cloned node. + * @param {XMLDocument} xmlDoc The xml document being used by this model + * @param {Array} colData The column data for the new node + * @return {XMLNode} The created node + */ +YAHOO.ext.grid.XMLDataModel.prototype.createNode = function(xmlDoc, id, colData){ + var template = this.data[0].node; + var newNode = template.cloneNode(true); + var fields = this.schema.fields; + for(var i = 0; i < fields.length; i++){ + var nodeValue = colData[i]; + if(this.postprocessors[i]){ + nodeValue = this.postprocessors[i](nodeValue); + } + this.setNamedValue(newNode, fields[i], nodeValue); + } + if(id){ + this.setNamedValue(newNode, this.schema.idField, id); + } + template.parentNode.appendChild(newNode); + return newNode; +}; + +/** + * Convenience function looks for value in attributes, then in children tags - also + * normalizes namespace matches (ie matches ns:tag, FireFox matches tag and not ns:tag). + */ +YAHOO.ext.grid.XMLDataModel.prototype.getNamedValue = function(node, name, defaultValue){ + if(!node || !name){ + return defaultValue; + } + var nodeValue = defaultValue; + var attrNode = node.attributes.getNamedItem(name); + if(attrNode) { + nodeValue = attrNode.value; + } else { + var childNode = node.getElementsByTagName(name); + if(childNode && childNode.item(0) && childNode.item(0).firstChild) { + nodeValue = childNode.item(0).firstChild.nodeValue; + }else{ + // try to strip namespace for FireFox + var index = name.indexOf(':'); + if(index > 0){ + return this.getNamedValue(node, name.substr(index+1), defaultValue); + } + } + } + return nodeValue; +}; + +/** + * Convenience function set a value in the underlying xml node. + */ +YAHOO.ext.grid.XMLDataModel.prototype.setNamedValue = function(node, name, value){ + if(!node || !name){ + return; + } + var attrNode = node.attributes.getNamedItem(name); + if(attrNode) { + attrNode.value = value; + return; + } + var childNode = node.getElementsByTagName(name); + if(childNode && childNode.item(0) && childNode.item(0).firstChild) { + childNode.item(0).firstChild.nodeValue = value; + }else{ + // try to strip namespace for FireFox + var index = name.indexOf(':'); + if(index > 0){ + this.setNamedValue(node, name.substr(index+1), value); + } + } +}; + +/** + * Overrides DefaultDataModel.setValueAt to update the underlying XML Document + * @param {Object} value The new value + * @param {Number} rowIndex + * @param {Number} colIndex + */ +YAHOO.ext.grid.XMLDataModel.prototype.setValueAt = function(value, rowIndex, colIndex){ + var node = this.data[rowIndex].node; + if(node){ + var nodeValue = value; + if(this.postprocessors[colIndex]){ + nodeValue = this.postprocessors[colIndex](value); + } + this.setNamedValue(node, this.schema.fields[colIndex], nodeValue); + } + YAHOO.ext.grid.XMLDataModel.superclass.setValueAt.call(this, value, rowIndex, colIndex); +}; + +/** + * Overrides getRowId in DefaultDataModel to return the ID value of the specified node. + * @param {Number} rowIndex + * @return {Number} + */ +YAHOO.ext.grid.XMLDataModel.prototype.getRowId = function(rowIndex){ + return this.data[rowIndex].id; +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/AbstractColumnModel.js b/www/extras/yui-ext/source/grid/AbstractColumnModel.js new file mode 100644 index 000000000..7b269e171 --- /dev/null +++ b/www/extras/yui-ext/source/grid/AbstractColumnModel.js @@ -0,0 +1,111 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * This abstract class defines the ColumnModel interface and provides default implementations of the events required by the Grid. + * @constructor +*/ +YAHOO.ext.grid.AbstractColumnModel = function(){ + /** Fires when a column width is changed - fireDirect sig: (this, columnIndex, newWidth) + * @type YAHOO.util.CustomEvent + * */ + this.onWidthChange = new YAHOO.util.CustomEvent('widthChanged'); + /** Fires when a header has changed - fireDirect sig: (this, columnIndex, newHeader) + * @type YAHOO.util.CustomEvent + * */ + this.onHeaderChange = new YAHOO.util.CustomEvent('headerChanged'); + /** Fires when a column is hidden or unhidden - fireDirect sig: (this, columnIndex, hidden) + * @type YAHOO.util.CustomEvent + * */ + this.onHiddenChange = new YAHOO.util.CustomEvent('hiddenChanged'); +}; + +YAHOO.ext.grid.AbstractColumnModel.prototype = { + fireWidthChange : function(colIndex, newWidth){ + this.onWidthChange.fireDirect(this, colIndex, newWidth); + }, + + fireHeaderChange : function(colIndex, newHeader){ + this.onHeaderChange.fireDirect(this, colIndex, newHeader); + }, + + fireHiddenChange : function(colIndex, hidden){ + this.onHiddenChange.fireDirect(this, colIndex, hidden); + }, + + /** + * Interface method - Returns the number of columns. + * @return {Number} + */ + getColumnCount : function(){ + return 0; + }, + + /** + * Interface method - Returns true if the specified column is sortable. + * @param {Number} col The column index + * @return {Boolean} + */ + isSortable : function(col){ + return false; + }, + + /** + * Interface method - Returns true if the specified column is hidden. + * @param {Number} col The column index + * @return {Boolean} + */ + isHidden : function(col){ + return false; + }, + + /** + * Interface method - Returns the sorting comparison function defined for the column (defaults to sortTypes.none). + * @param {Number} col The column index + * @return {Function} + */ + getSortType : function(col){ + return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none; + }, + + /** + * Interface method - Returns the rendering (formatting) function defined for the column. + * @param {Number} col The column index + * @return {Function} + */ + getRenderer : function(col){ + return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer; + }, + + /** + * Interface method - Returns the width for the specified column. + * @param {Number} col The column index + * @return {Number} + */ + getColumnWidth : function(col){ + return 0; + }, + + /** + * Interface method - Returns the total width of all columns. + * @return {Number} + */ + getTotalWidth : function(){ + return 0; + }, + + /** + * Interface method - Returns the header for the specified column. + * @param {Number} col The column index + * @return {String} + */ + getColumnHeader : function(col){ + return ''; + } +}; diff --git a/www/extras/yui-ext/source/grid/DefaultColumnModel.js b/www/extras/yui-ext/source/grid/DefaultColumnModel.js new file mode 100644 index 000000000..7a0ff62f6 --- /dev/null +++ b/www/extras/yui-ext/source/grid/DefaultColumnModel.js @@ -0,0 +1,302 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + * @class + * This is the default implementation of a ColumnModel used by the Grid. It defines + * the columns in the grid. + *
Usage:
+ *

+ * var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;
+ * var myColumns = [
+	{header: "Ticker", width: 60, sortable: true, sortType: sort.asUCString}, 
+	{header: "Company Name", width: 150, sortable: true, sortType: sort.asUCString}, 
+	{header: "Market Cap.", width: 100, sortable: true, sortType: sort.asFloat}, 
+	{header: "$ Sales", width: 100, sortable: true, sortType: sort.asFloat, renderer: money}, 
+	{header: "Employees", width: 100, sortable: true, sortType: sort.asFloat}
+ * ];
+ * var colModel = new YAHOO.ext.grid.DefaultColumnModel(myColumns);
+ * 
+ * @extends YAHOO.ext.grid.AbstractColumnModel + * @constructor +*/ +YAHOO.ext.grid.DefaultColumnModel = function(config){ + YAHOO.ext.grid.DefaultColumnModel.superclass.constructor.call(this); + /** + * The config passed into the constructor + */ + this.config = config; + + /** + * The width of columns which have no width specified (defaults to 100) + * @type Number + */ + this.defaultWidth = 100; + /** + * Default sortable of columns which have no sortable specified (defaults to false) + * @type Boolean + */ + this.defaultSortable = false; +}; +YAHOO.extendX(YAHOO.ext.grid.DefaultColumnModel, YAHOO.ext.grid.AbstractColumnModel); + +/** + * Returns the number of columns. + * @return {Number} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnCount = function(){ + return this.config.length; +}; + +/** + * Returns true if the specified column is sortable. + * @param {Number} col The column index + * @return {Boolean} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.isSortable = function(col){ + if(typeof this.config[col].sortable == 'undefined'){ + return this.defaultSortable; + } + return this.config[col].sortable; +}; + +/** + * Returns the sorting comparison function defined for the column (defaults to sortTypes.none). + * @param {Number} col The column index + * @return {Function} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getSortType = function(col){ + if(!this.dataMap){ + // build a lookup so we don't search every time + var map = []; + for(var i = 0, len = this.config.length; i < len; i++){ + map[this.getDataIndex(i)] = i; + } + this.dataMap = map; + } + col = this.dataMap[col]; + if(!this.config[col].sortType){ + return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none; + } + return this.config[col].sortType; +}; + +/** + * Sets the sorting comparison function for a column. + * @param {Number} col The column index + * @param {Function} fn + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setSortType = function(col, fn){ + this.config[col].sortType = fn; +}; + + +/** + * Returns the rendering (formatting) function defined for the column. + * @param {Number} col The column index + * @return {Function} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getRenderer = function(col){ + if(!this.config[col].renderer){ + return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer; + } + return this.config[col].renderer; +}; + +/** + * Sets the rendering (formatting) function for a column. + * @param {Number} col The column index + * @param {Function} fn + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setRenderer = function(col, fn){ + this.config[col].renderer = fn; +}; + +/** + * Returns the width for the specified column. + * @param {Number} col The column index + * @return {Number} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnWidth = function(col){ + return this.config[col].width || this.defaultWidth; +}; + +/** + * Sets the width for a column. + * @param {Number} col The column index + * @param {Number} width The new width + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setColumnWidth = function(col, width, suppressEvent){ + this.config[col].width = width; + this.totalWidth = null; + if(!suppressEvent){ + this.onWidthChange.fireDirect(this, col, width); + } +}; + +/** + * Returns the total width of all columns. + * @param {Boolean} includeHidden True to include hidden column widths + * @return {Number} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getTotalWidth = function(includeHidden){ + if(!this.totalWidth){ + this.totalWidth = 0; + for(var i = 0; i < this.config.length; i++){ + if(includeHidden || !this.isHidden(i)){ + this.totalWidth += this.getColumnWidth(i); + } + } + } + return this.totalWidth; +}; + +/** + * Returns the header for the specified column. + * @param {Number} col The column index + * @return {String} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getColumnHeader = function(col){ + return this.config[col].header; +}; + +/** + * Sets the header for a column. + * @param {Number} col The column index + * @param {String} header The new header + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setColumnHeader = function(col, header){ + this.config[col].header = header; + this.onHeaderChange.fireDirect(this, col, header); +}; +/** + * Returns the dataIndex for the specified column. + * @param {Number} col The column index + * @return {Number} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getDataIndex = function(col){ + if(typeof this.config[col].dataIndex != 'number'){ + return col; + } + return this.config[col].dataIndex; +}; + +/** + * Sets the dataIndex for a column. + * @param {Number} col The column index + * @param {Number} dataIndex The new dataIndex + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setDataIndex = function(col, dataIndex){ + this.config[col].dataIndex = dataIndex; +}; +/** + * Returns true if the cell is editable. + * @param {Number} colIndex The column index + * @param {Number} rowIndex The row index + * @return {Boolean} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.isCellEditable = function(colIndex, rowIndex){ + return this.config[colIndex].editable || (typeof this.config[colIndex].editable == 'undefined' && this.config[colIndex].editor); +}; + +/** + * Returns the editor defined for the cell/column. + * @param {Number} colIndex The column index + * @param {Number} rowIndex The row index + * @return {Object} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.getCellEditor = function(colIndex, rowIndex){ + return this.config[colIndex].editor; +}; + +/** + * Sets if a column is editable. + * @param {Number} col The column index + * @param {Boolean} editable True if the column is editable + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setEditable = function(col, editable){ + this.config[col].editable = editable; +}; + + +/** + * Returns true if the column is hidden. + * @param {Number} colIndex The column index + * @return {Boolean} + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.isHidden = function(colIndex){ + return this.config[colIndex].hidden; +}; + +/** + * Sets if a column is hidden. + * @param {Number} colIndex The column index + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setHidden = function(colIndex, hidden){ + this.config[colIndex].hidden = hidden; + this.totalWidth = null; + this.fireHiddenChange(colIndex, hidden); +}; + +/** + * Sets the editor for a column. + * @param {Number} col The column index + * @param {Object} editor The editor object + */ +YAHOO.ext.grid.DefaultColumnModel.prototype.setEditor = function(col, editor){ + this.config[col].editor = editor; +}; + + +/** + * Default empty rendering function + */ +YAHOO.ext.grid.DefaultColumnModel.defaultRenderer = function(value){ + if(typeof value == 'string' && value.length < 1){ + return ' '; + } + return value; +} + +/** + * Defines the default sorting (casting?) comparison functions used when sorting data: + *
  sortTypes.none - sorts data as it is without casting or parsing (the default) + *
  sortTypes.asUCString - case insensitive string + *
  sortTypes.asDate - attempts to parse data as a date + *
  sortTypes.asFloat + *
  sortTypes.asInt + */ +YAHOO.ext.grid.DefaultColumnModel.sortTypes = {}; + +YAHOO.ext.grid.DefaultColumnModel.sortTypes.none = function(s) { + return s; +}; + +YAHOO.ext.grid.DefaultColumnModel.sortTypes.asUCString = function(s) { + return String(s).toUpperCase(); +}; + +YAHOO.ext.grid.DefaultColumnModel.sortTypes.asDate = function(s) { + if(s instanceof Date){ + return s; + } + return Date.parse(String(s)); +}; + +YAHOO.ext.grid.DefaultColumnModel.sortTypes.asFloat = function(s) { + var val = parseFloat(String(s).replace(/,/g, '')); + if(isNaN(val)) val = 0; + return val; +}; + +YAHOO.ext.grid.DefaultColumnModel.sortTypes.asInt = function(s) { + var val = parseInt(String(s).replace(/,/g, '')); + if(isNaN(val)) val = 0; + return val; +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/EditorGrid.js b/www/extras/yui-ext/source/grid/EditorGrid.js new file mode 100644 index 000000000..0f76665aa --- /dev/null +++ b/www/extras/yui-ext/source/grid/EditorGrid.js @@ -0,0 +1,15 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.EditorGrid = function(container, dataModel, colModel){ + YAHOO.ext.grid.EditorGrid.superclass.constructor.call(this, container, dataModel, + colModel, new YAHOO.ext.grid.EditorSelectionModel()); + this.container.addClass('yeditgrid'); +}; +YAHOO.extendX(YAHOO.ext.grid.EditorGrid, YAHOO.ext.grid.Grid); \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/EditorSelectionModel.js b/www/extras/yui-ext/source/grid/EditorSelectionModel.js new file mode 100644 index 000000000..a4e0ef567 --- /dev/null +++ b/www/extras/yui-ext/source/grid/EditorSelectionModel.js @@ -0,0 +1,181 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +/** + @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to enable cell navigation.

+ @extends YAHOO.ext.grid.DefaultSelectionModel + @constructor + */ +YAHOO.ext.grid.EditorSelectionModel = function(){ + YAHOO.ext.grid.EditorSelectionModel.superclass.constructor.call(this); + /** Number of clicks to activate a cell (for editing) - valid values are 1 or 2 + * @type Number */ + this.clicksToActivateCell = 1; + this.events['cellactivate'] = new YAHOO.util.CustomEvent('cellactivate'); +}; + +YAHOO.extendX(YAHOO.ext.grid.EditorSelectionModel, YAHOO.ext.grid.DefaultSelectionModel); + +YAHOO.ext.grid.EditorSelectionModel.prototype.disableArrowNavigation = false; +YAHOO.ext.grid.EditorSelectionModel.prototype.controlForArrowNavigation = false; + +/** @ignore */ +YAHOO.ext.grid.EditorSelectionModel.prototype.initEvents = function(){ + this.grid.addListener("cellclick", this.onCellClick, this, true); + this.grid.addListener("celldblclick", this.onCellDblClick, this, true); + this.grid.addListener("keydown", this.keyDown, this, true); +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.onCellClick = function(grid, rowIndex, colIndex){ + if(this.clicksToActivateCell == 1){ + var row = this.grid.getRow(rowIndex); + var cell = row.childNodes[colIndex]; + if(cell){ + this.activate(row, cell); + } + } +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.activate = function(row, cell){ + this.fireEvent('cellactivate', this, row, cell); + this.grid.doEdit(row, cell); +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.onCellDblClick = function(grid, rowIndex, colIndex){ + if(this.clicksToActivateCell == 2){ + var row = this.grid.getRow(rowIndex); + var cell = row.childNodes[colIndex]; + if(cell){ + this.activate(row, cell); + } + } +}; + +/** @ignore */ +YAHOO.ext.grid.EditorSelectionModel.prototype.setRowState = function(row, selected){ + YAHOO.ext.grid.EditorSelectionModel.superclass.setRowState.call(this, row, false, false); +}; +/** @ignore */ +YAHOO.ext.grid.EditorSelectionModel.prototype.focusRow = function(row, selected){ +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.getEditorCellAfter = function(cell, spanRows){ + var g = this.grid; + var next = g.getCellAfter(cell); + while(next && !g.colModel.isCellEditable(next.columnIndex)){ + next = g.getCellAfter(next); + } + if(!next && spanRows){ + var row = g.getRowAfter(g.getRowFromChild(cell)); + next = g.getFirstCell(row); + if(!g.colModel.isCellEditable(next.columnIndex)){ + next = this.getEditorCellAfter(next); + } + } + return next; +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.getEditorCellBefore = function(cell, spanRows){ + var g = this.grid; + var prev = g.getCellBefore(cell); + while(prev && !g.colModel.isCellEditable(prev.columnIndex)){ + prev = g.getCellBefore(prev); + } + if(!prev && spanRows){ + var row = g.getRowBefore(g.getRowFromChild(cell)); + prev = g.getLastCell(row); + if(!g.colModel.isCellEditable(prev.columnIndex)){ + prev = this.getEditorCellBefore(prev); + } + } + return prev; +}; + +YAHOO.ext.grid.EditorSelectionModel.prototype.allowArrowNav = function(e){ + return (!this.disableArrowNavigation && (!this.controlForArrowNavigation || e.ctrlKey)); +} +/** @ignore */ +YAHOO.ext.grid.EditorSelectionModel.prototype.keyDown = function(e){ + var g = this.grid, cm = g.colModel, cell = g.getEditingCell(); + if(!cell) return; + var newCell; + switch(e.browserEvent.keyCode){ + case e.TAB: + if(e.shiftKey){ + newCell = this.getEditorCellBefore(cell, true); + }else{ + newCell = this.getEditorCellAfter(cell, true); + } + break; + case e.DOWN: + if(this.allowArrowNav(e)){ + var next = g.getRowAfter(g.getRowFromChild(cell)); + if(next){ + newCell = next.childNodes[cell.columnIndex]; + } + } + break; + case e.UP: + if(this.allowArrowNav(e)){ + var prev = g.getRowBefore(g.getRowFromChild(cell)); + if(prev){ + newCell = prev.childNodes[cell.columnIndex]; + } + } + break; + case e.RETURN: + if(e.shiftKey){ + var prev = g.getRowBefore(g.getRowFromChild(cell)); + if(prev){ + newCell = prev.childNodes[cell.columnIndex]; + } + }else{ + var next = g.getRowAfter(g.getRowFromChild(cell)); + if(next){ + newCell = next.childNodes[cell.columnIndex]; + } + } + break; + case e.RIGHT: + if(this.allowArrowNav(e)){ + newCell = this.getEditorCellAfter(cell); + } + break; + case e.LEFT: + if(this.allowArrowNav(e)){ + newCell = this.getEditorCellBefore(cell); + } + break; + }; + if(newCell){ + this.activate(g.getRowFromChild(newCell), newCell); + e.stopEvent(); + } +}; + +YAHOO.ext.grid.EditorAndSelectionModel = function(){ + YAHOO.ext.grid.EditorAndSelectionModel.superclass.constructor.call(this); + this.events['cellactivate'] = new YAHOO.util.CustomEvent('cellactivate'); +}; + +YAHOO.extendX(YAHOO.ext.grid.EditorAndSelectionModel, YAHOO.ext.grid.DefaultSelectionModel); + +YAHOO.ext.grid.EditorAndSelectionModel.prototype.initEvents = function(){ + YAHOO.ext.grid.EditorAndSelectionModel.superclass.initEvents.call(this); + this.grid.addListener("celldblclick", this.onCellDblClick, this, true); +}; + +YAHOO.ext.grid.EditorAndSelectionModel.prototype.onCellDblClick = function(grid, rowIndex, colIndex){ + var row = this.grid.getRow(rowIndex); + var cell = row.childNodes[colIndex]; + if(cell){ + this.fireEvent('cellactivate', this, row, cell); + this.grid.doEdit(row, cell); + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/Grid.js b/www/extras/yui-ext/source/grid/Grid.js new file mode 100644 index 000000000..770a44e2b --- /dev/null +++ b/www/extras/yui-ext/source/grid/Grid.js @@ -0,0 +1,736 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.namespace('ext.grid'); + +/** + * @class + * This class represents the primary interface of a component based grid control. + *

Usage:

+ * var grid = new YAHOO.ext.grid.Grid('my-container-id', dataModel, columnModel);
+ * // set any options
+ * grid.render();
+ * 
+ * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.ext.Element + * @requires YAHOO.ext.util.Browser + * @requires YAHOO.ext.util.CSS + * @requires YAHOO.ext.SplitBar + * @requires YAHOO.ext.EventObject + * @constructor + * @param {String/HTMLElement/YAHOO.ext.Element} container The element into which this grid will be rendered - + * The container MUST have some type of size defined for the grid to fill. The container will be + * automatically set to position relative if it isn't already. + * @param {Object} dataModel The data model to bind to + * @param {Object} colModel The column model with info about this grid's columns + * @param {Object} selectionModel (optional) The selection model for this grid (defaults to DefaultSelectionModel) + */ +YAHOO.ext.grid.Grid = function(container, dataModel, colModel, selectionModel){ + /** @private */ + this.container = YAHOO.ext.Element.get(container); + if(this.container.getStyle('position') != 'absolute'){ + this.container.setStyle('position', 'relative'); + } + //this.container.setStyle('overflow', 'hidden'); + /** @private */ + this.id = this.container.id; + + /** @private */ + this.rows = []; + /** @private */ + this.rowCount = 0; + /** @private */ + this.fieldId = null; + /** @private */ + this.dataModel = dataModel; + /** @private */ + this.colModel = colModel; + /** @private */ + this.selModel = selectionModel; + + /** @private */ + this.activeEditor = null; + + /** @private */ + this.editingCell = null; + + /** The minimum width a column can be resized to. (Defaults to 25) + * @type Number */ + this.minColumnWidth = 25; + + /** True to automatically resize the columns to fit their content on initial render + * @type Boolean */ + this.autoSizeColumns = false; + + /** True to measure headers with column data when auto sizing columns + * @type Boolean */ + this.autoSizeHeaders = false; + + /** + * True to autoSize the grid when the window resizes - defaults to true + */ + this.monitorWindowResize = true; + + /** If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of + * rows measured to get a columns size - defaults to 0 (all rows). + * @type Number */ + this.maxRowsToMeasure = 0; + + /** True to highlight rows when the mouse is over (default is false) + * @type Boolean */ + this.trackMouseOver = false; + + /** True to enable drag and drop of rows + * @type Boolean */ + this.enableDragDrop = false; + + /** True to stripe the rows (default is true) + * @type Boolean */ + this.stripeRows = true; + + /** A regular expression defining tagNames + * allowed to have text selection (Defaults to /INPUT|TEXTAREA/i) */ + this.allowTextSelectionPattern = /INPUT|TEXTAREA|SELECT/i; + + /** @private */ + this.setValueDelegate = this.setCellValue.createDelegate(this); + + var CE = YAHOO.util.CustomEvent; + /** @private */ + this.events = { + // raw events + 'click' : new CE('click'), + 'dblclick' : new CE('dblclick'), + 'mousedown' : new CE('mousedown'), + 'mouseup' : new CE('mouseup'), + 'mouseover' : new CE('mouseover'), + 'mouseout' : new CE('mouseout'), + 'keypress' : new CE('keypress'), + 'keydown' : new CE('keydown'), + // custom events + 'cellclick' : new CE('cellclick'), + 'celldblclick' : new CE('celldblclick'), + 'rowclick' : new CE('rowclick'), + 'rowdblclick' : new CE('rowdblclick'), + 'headerclick' : new CE('headerclick'), + 'rowcontextmenu' : new CE('rowcontextmenu'), + 'headercontextmenu' : new CE('headercontextmenu'), + 'beforeedit' : new CE('beforeedit'), + 'afteredit' : new CE('afteredit'), + 'bodyscroll' : new CE('bodyscroll'), + 'columnresize' : new CE('columnresize'), + 'startdrag' : new CE('startdrag'), + 'enddrag' : new CE('enddrag'), + 'dragdrop' : new CE('dragdrop'), + 'dragover' : new CE('dragover'), + 'dragenter' : new CE('dragenter'), + 'dragout' : new CE('dragout') + }; +}; + +YAHOO.ext.grid.Grid.prototype = { + /** + * Called once after all setup has been completed and the grid is ready to be rendered. + */ + render : function(){ + if(!this.view){ + if(this.dataModel.isPaged()){ + this.view = new YAHOO.ext.grid.PagedGridView(); + }else{ + this.view = new YAHOO.ext.grid.GridView(); + } + } + this.view.init(this); + this.el = getEl(this.view.render(), true); + var c = this.container; + c.mon("click", this.onClick, this, true); + c.mon("dblclick", this.onDblClick, this, true); + c.mon("contextmenu", this.onContextMenu, this, true); + c.mon("selectstart", this.cancelTextSelection, this, true); + c.mon("mousedown", this.cancelTextSelection, this, true); + c.mon("mousedown", this.onMouseDown, this, true); + c.mon("mouseup", this.onMouseUp, this, true); + if(this.trackMouseOver){ + this.el.mon("mouseover", this.onMouseOver, this, true); + this.el.mon("mouseout", this.onMouseOut, this, true); + } + c.mon("keypress", this.onKeyPress, this, true); + c.mon("keydown", this.onKeyDown, this, true); + this.init(); + }, + + /** @private */ + init : function(){ + this.rows = this.el.dom.rows; + if(!this.disableSelection){ + if(!this.selModel){ + this.selModel = new YAHOO.ext.grid.DefaultSelectionModel(this); + } + this.selModel.init(this); + this.selModel.onSelectionChange.subscribe(this.updateField, this, true); + }else{ + this.selModel = new YAHOO.ext.grid.DisableSelectionModel(this); + this.selModel.init(this); + } + + if(this.enableDragDrop){ + this.dd = new YAHOO.ext.grid.GridDD(this, this.container.dom); + } + }, + + /** @ignore */ + onMouseDown : function(e){ + this.fireEvent('mousedown', e); + }, + + /** @ignore */ + onMouseUp : function(e){ + this.fireEvent('mouseup', e); + }, + + /** @ignore */ + onMouseOver : function(e){ + this.fireEvent('mouseover', e); + }, + + /** @ignore */ + onMouseOut : function(e){ + this.fireEvent('mouseout', e); + }, + + /** @ignore */ + onKeyPress : function(e){ + this.fireEvent('keypress', e); + }, + + /** @ignore */ + onKeyDown : function(e){ + this.fireEvent('keydown', e); + }, + + /** + * @private internal event firing + * expects arguments[0] is the event name and the rest are the fireDirect arguments + */ + fireEvent : function(){ + var ce = this.events[arguments[0].toLowerCase()]; + ce.fireDirect.apply(ce, Array.prototype.slice.call(arguments, 1)); + }, + /** + * Adds a listener for one of the many defined grid events + * @param {String} eventName The type of event to listen for + * @param {Function} fn The method the event invokes + * @param {Object} scope (optional) An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override (optional) If true, the obj passed in becomes + * the execution scope of the listener + */ + addListener : function(eventName, fn, scope, override){ + this.events[eventName.toLowerCase()].subscribe(fn, scope, override); + }, + + /** + * Shorthand for addListener + */ + on : function(eventName, fn, scope, override){ + this.events[eventName.toLowerCase()].subscribe(fn, scope, override); + }, + + removeListener : function(eventName, fn, scope){ + this.events[eventName.toLowerCase()].unsubscribe(fn, scope); + }, + + /** @ignore */ + onClick : function(e){ + this.fireEvent('click', e); + var target = e.getTarget(); + var row = this.getRowFromChild(target); + var cell = this.getCellFromChild(target); + var header = this.getHeaderFromChild(target); + if(row){ + this.fireEvent('rowclick', this, row.rowIndex, e); + } + if(cell){ + this.fireEvent('cellclick', this, row.rowIndex, cell.columnIndex, e); + } + if(header){ + this.fireEvent('headerclick', this, header.columnIndex, e); + } + }, + + /** @ignore */ + onContextMenu : function(e){ + var target = e.getTarget(); + var row = this.getRowFromChild(target); + var header = this.getHeaderFromChild(target); + if(row){ + this.fireEvent('rowcontextmenu', this, row.rowIndex, e); + } + if(header){ + this.fireEvent('headercontextmenu', this, header.columnIndex, e); + } + e.preventDefault(); + }, + + /** @ignore */ + onDblClick : function(e){ + this.fireEvent('dblclick', e); + var target = e.getTarget(); + var row = this.getRowFromChild(target); + var cell = this.getCellFromChild(target); + if(row){ + this.fireEvent('rowdblclick', this, row.rowIndex, e); + } + if(cell){ + this.fireEvent('celldblclick', this, row.rowIndex, cell.columnIndex, e); + } + }, + + /** + * Starts editing the specified for the specified row/column + */ + startEditing : function(rowIndex, colIndex){ + var row = this.rows[rowIndex]; + var cell = row.childNodes[colIndex]; + this.stopEditing(); + setTimeout(this.doEdit.createDelegate(this, [row, cell]), 10); + }, + + /** + * Stops any active editing + */ + stopEditing : function(){ + if(this.activeEditor){ + this.activeEditor.stopEditing(); + } + }, + + /** @ignore */ + doEdit : function(row, cell){ + if(!row || !cell) return; + var cm = this.colModel; + var dm = this.dataModel; + var colIndex = cell.columnIndex; + var rowIndex = row.rowIndex; + if(cm.isCellEditable(colIndex, rowIndex)){ + var ed = cm.getCellEditor(colIndex, rowIndex); + if(ed){ + if(this.activeEditor){ + this.activeEditor.stopEditing(); + } + this.fireEvent('beforeedit', this, rowIndex, colIndex); + this.activeEditor = ed; + this.editingCell = cell; + this.view.ensureVisible(row, true); + try{ + cell.focus(); + }catch(e){} + ed.init(this, this.el.dom.parentNode, this.setValueDelegate); + var value = dm.getValueAt(rowIndex, cm.getDataIndex(colIndex)); + // set timeout so firefox stops editing before starting a new edit + setTimeout(ed.startEditing.createDelegate(ed, [value, row, cell]), 1); + } + } + }, + + setCellValue : function(value, rowIndex, colIndex){ + this.dataModel.setValueAt(value, rowIndex, this.colModel.getDataIndex(colIndex)); + this.fireEvent('afteredit', this, rowIndex, colIndex); + }, + + /** @ignore Called when text selection starts or mousedown to prevent default */ + cancelTextSelection : function(e){ + var target = e.getTarget(); + if(target && target != this.el.dom.parentNode && !this.allowTextSelectionPattern.test(target.tagName)){ + e.preventDefault(); + } + }, + + /** + * Causes the grid to manually recalculate it's dimensions. Generally this is done automatically, + * but if manual update is required this method will initiate it. + */ + autoSize : function(){ + this.view.updateWrapHeight(); + this.view.adjustForScroll(); + }, + + /** + * Scrolls the grid to the specified row + * @param {Number/HTMLElement} row The row object or index of the row + */ + scrollTo : function(row){ + if(typeof row == 'number'){ + row = this.rows[row]; + } + this.view.ensureVisible(row, true); + }, + + /** @private */ + getEditingCell : function(){ + return this.editingCell; + }, + + /** + * Binds this grid to the field with the specified id. Initially reads and parses the comma + * delimited ids in the field and selects those items. All selections made in the grid + * will be persisted to the field by their ids comma delimited. + * @param {String} The id of the field to bind to + */ + bindToField : function(fieldId){ + this.fieldId = fieldId; + this.readField(); + }, + + /** @private */ + updateField : function(){ + if(this.fieldId){ + var field = YAHOO.util.Dom.get(this.fieldId); + field.value = this.getSelectedRowIds().join(','); + } + }, + + /** + * Causes the grid to read and select the ids from the bound field - See {@link #bindToField}. + */ + readField : function(){ + if(this.fieldId){ + var field = YAHOO.util.Dom.get(this.fieldId); + var values = field.value.split(','); + var rows = this.getRowsById(values); + this.selModel.selectRows(rows, false); + } + }, + + /** + * Returns the table row at the specified index + * @return {HTMLElement} + */ + getRow : function(index){ + return this.rows[index]; + }, + + /** + * Returns the rows that have the specified id(s). The id value for a row is provided + * by the DataModel. See {@link YAHOO.ext.grid.DefaultDataModel#getRowId}. + * @param {String/Array} An id to find or an array of ids + * @return {HtmlElement/Array} If one id was passed in, it returns one result. + * If an array of ids was specified, it returns an Array of HTMLElements + */ + getRowsById : function(id){ + var dm = this.dataModel; + if(!(id instanceof Array)){ + for(var i = 0; i < this.rows.length; i++){ + if(dm.getRowId(i) == id){ + return this.rows[i]; + } + } + return null; + } + var found = []; + var re = "^(?:"; + for(var i = 0; i < id.length; i++){ + re += id[i]; + if(i != id.length-1) re += "|"; + } + var regex = new RegExp(re + ")$"); + for(var i = 0; i < this.rows.length; i++){ + if(regex.test(dm.getRowId(i))){ + found.push(this.rows[i]); + } + } + return found; + }, + + /** + * Returns the row that comes after the specified row - text nodes are skipped. + * @param {HTMLElement} row + * @return {HTMLElement} + */ + getRowAfter : function(row){ + return this.getSibling('next', row); + }, + + /** + * Returns the row that comes before the specified row - text nodes are skipped. + * @param {HTMLElement} row + * @return {HTMLElement} + */ + getRowBefore : function(row){ + return this.getSibling('previous', row); + }, + + /** + * Returns the cell that comes after the specified cell - text nodes are skipped. + * @param {HTMLElement} cell + * @param {Boolean} includeHidden + * @return {HTMLElement} + */ + getCellAfter : function(cell, includeHidden){ + var next = this.getSibling('next', cell); + if(next && !includeHidden && this.colModel.isHidden(next.columnIndex)){ + return this.getCellAfter(next); + } + return next; + }, + + /** + * Returns the cell that comes before the specified cell - text nodes are skipped. + * @param {HTMLElement} cell + * @param {Boolean} includeHidden + * @return {HTMLElement} + */ + getCellBefore : function(cell, includeHidden){ + var prev = this.getSibling('previous', cell); + if(prev && !includeHidden && this.colModel.isHidden(prev.columnIndex)){ + return this.getCellBefore(prev); + } + return prev; + }, + + /** + * Returns the last cell for the row - text nodes and hidden columns are skipped. + * @param {HTMLElement} row + * @param {Boolean} includeHidden + * @return {HTMLElement} + */ + getLastCell : function(row, includeHidden){ + var cell = this.getElement('previous', row.lastChild); + if(cell && !includeHidden && this.colModel.isHidden(cell.columnIndex)){ + return this.getCellBefore(cell); + } + return cell; + }, + + /** + * Returns the first cell for the row - text nodes and hidden columns are skipped. + * @param {HTMLElement} row + * @param {Boolean} includeHidden + * @return {HTMLElement} + */ + getFirstCell : function(row, includeHidden){ + var cell = this.getElement('next', row.firstChild); + if(cell && !includeHidden && this.colModel.isHidden(cell.columnIndex)){ + return this.getCellAfter(cell); + } + return cell; + }, + + /** + * Gets siblings, skipping text nodes + * @param {String} type The direction to walk: 'next' or 'previous' + * @private + */ + getSibling : function(type, node){ + if(!node) return null; + type += 'Sibling'; + var n = node[type]; + while(n && n.nodeType != 1){ + n = n[type]; + } + return n; + }, + + /** + * Returns node if node is an HTMLElement else walks the siblings in direction looking for + * a node that is an element + * @param {String} direction The direction to walk: 'next' or 'previous' + * @private + */ + getElement : function(direction, node){ + if(!node || node.nodeType == 1) return node; + else return this.getSibling(direction, node); + }, + + /** + * @private + */ + getElementFromChild : function(childEl, parentClass){ + if(!childEl || (YAHOO.util.Dom.hasClass(childEl, parentClass))){ + return childEl; + } + var p = childEl.parentNode; + while(p && p.tagName.toUpperCase() != 'BODY'){ + if(YAHOO.util.Dom.hasClass(p, parentClass)){ + return p; + } + p = p.parentNode; + } + return null; + }, + + /** + * Returns the row that contains the specified child element. + * @param {HTMLElement} childEl + * @return {HTMLElement} + */ + getRowFromChild : function(childEl){ + return this.getElementFromChild(childEl, 'ygrid-row'); + }, + + /** + * Returns the cell that contains the specified child element. + * @param {HTMLElement} childEl + * @return {HTMLElement} + */ + getCellFromChild : function(childEl){ + return this.getElementFromChild(childEl, 'ygrid-col'); + }, + + + /** + * Returns the header element that contains the specified child element. + * @param {HTMLElement} childEl + * @return {HTMLElement} + */ + getHeaderFromChild : function(childEl){ + return this.getElementFromChild(childEl, 'ygrid-hd'); + }, + + /** + * Convenience method for getSelectionModel().getSelectedRows() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRows} for more details. + */ + getSelectedRows : function(){ + return this.selModel.getSelectedRows(); + }, + + /** + * Convenience method for getSelectionModel().getSelectedRows()[0] - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRows} for more details. + */ + getSelectedRow : function(){ + if(this.selModel.hasSelection()){ + return this.selModel.getSelectedRows()[0]; + } + return null; + }, + + /** + * Get the selected row indexes + * @return {Array} Array of indexes + */ + getSelectedRowIndexes : function(){ + var a = []; + var rows = this.selModel.getSelectedRows(); + for(var i = 0; i < rows.length; i++) { + a[i] = rows[i].rowIndex; + } + return a; + }, + + /** + * Gets the first selected row or -1 if none are selected + * @return {Number} + */ + getSelectedRowIndex : function(){ + if(this.selModel.hasSelection()){ + return this.selModel.getSelectedRows()[0].rowIndex; + } + return -1; + }, + + /** + * Convenience method for getSelectionModel().getSelectedRowIds()[0] - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRowIds} for more details. + */ + getSelectedRowId : function(){ + if(this.selModel.hasSelection()){ + return this.selModel.getSelectedRowIds()[0]; + } + return null; + }, + + /** + * Convenience method for getSelectionModel().getSelectedRowIds() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#getSelectedRowIds} for more details. + */ + getSelectedRowIds : function(){ + return this.selModel.getSelectedRowIds(); + }, + + /** + * Convenience method for getSelectionModel().clearSelections() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#clearSelections} for more details. + */ + clearSelections : function(){ + this.selModel.clearSelections(); + }, + + + /** + * Convenience method for getSelectionModel().selectAll() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#selectAll} for more details. + */ + selectAll : function(){ + this.selModel.selectAll(); + }, + + + /** + * Convenience method for getSelectionModel().getCount() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#getCount} for more details. + */ + getSelectionCount : function(){ + return this.selModel.getCount(); + }, + + /** + * Convenience method for getSelectionModel().hasSelection() - + * See {@link YAHOO.ext.grid.DefaultSelectionModel#hasSelection} for more details. + */ + hasSelection : function(){ + return this.selModel.hasSelection(); + }, + + /** + * Returns the grid's SelectionModel. + */ + getSelectionModel : function(){ + if(!this.selModel){ + this.selModel = new DefaultSelectionModel(); + } + return this.selModel; + }, + + /** + * Returns the grid's DataModel. + */ + getDataModel : function(){ + return this.dataModel; + }, + + /** + * Returns the grid's ColumnModel. + */ + getColumnModel : function(){ + return this.colModel; + }, + + /** + * Returns the grid's GridView object. + */ + getView : function(){ + return this.view; + }, + /** + * Called to get grid's drag proxy text, by default returns this.ddText. + * @return {String} + */ + getDragDropText : function(){ + return this.ddText.replace('%0', this.selModel.getCount()); + } +}; +/** + * Configures the text is the drag proxy (defaults to "%0 selected row(s)"). + * %0 is replaced with the number of selected rows. + * @type String + */ +YAHOO.ext.grid.Grid.prototype.ddText = "%0 selected row(s)"; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/GridDD.js b/www/extras/yui-ext/source/grid/GridDD.js new file mode 100644 index 000000000..246cdfaf3 --- /dev/null +++ b/www/extras/yui-ext/source/grid/GridDD.js @@ -0,0 +1,109 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +// kill dependency issue +if(YAHOO.util.DDProxy){ +/** + * @class + * Custom implementation of YAHOO.util.DDProxy used internally by the grid + * @extends YAHOO.util.DDProxy + */ +YAHOO.ext.grid.GridDD = function(grid, bwrap){ + this.grid = grid; + var ddproxy = document.createElement('div'); + ddproxy.id = grid.container.id + '-ddproxy'; + ddproxy.className = 'ygrid-drag-proxy'; + document.body.insertBefore(ddproxy, document.body.firstChild); + YAHOO.util.Dom.setStyle(ddproxy, 'opacity', .80); + var ddicon = document.createElement('span'); + ddicon.className = 'ygrid-drop-icon ygrid-drop-nodrop'; + ddproxy.appendChild(ddicon); + var ddtext = document.createElement('span'); + ddtext.className = 'ygrid-drag-text'; + ddtext.innerHTML = " "; + ddproxy.appendChild(ddtext); + + this.ddproxy = ddproxy; + this.ddtext = ddtext; + this.ddicon = ddicon; + YAHOO.util.Event.on(bwrap, 'click', this.handleClick, this, true); + YAHOO.ext.grid.GridDD.superclass.constructor.call(this, bwrap.id, 'GridDD', + {dragElId : ddproxy.id, resizeFrame: false}); + + this.unlockDelegate = grid.selModel.unlock.createDelegate(grid.selModel); +}; +YAHOO.extendX(YAHOO.ext.grid.GridDD, YAHOO.util.DDProxy); + +YAHOO.ext.grid.GridDD.prototype.handleMouseDown = function(e){ + var row = this.grid.getRowFromChild(YAHOO.util.Event.getTarget(e)); + if(!row) return; + if(this.grid.selModel.isSelected(row)){ + YAHOO.ext.grid.GridDD.superclass.handleMouseDown.call(this, e); + }else { + this.grid.selModel.unlock(); + YAHOO.ext.EventObject.setEvent(e); + this.grid.selModel.rowClick(this.grid, row.rowIndex, YAHOO.ext.EventObject); + YAHOO.ext.grid.GridDD.superclass.handleMouseDown.call(this, e); + this.grid.selModel.lock(); + } +}; + +YAHOO.ext.grid.GridDD.prototype.handleClick = function(e){ + if(this.grid.selModel.isLocked()){ + setTimeout(this.unlockDelegate, 1); + YAHOO.util.Event.stopEvent(e); + } +}; + +/** + * Updates the DD visual element to allow/not allow a drop + * @param {Boolean} dropStatus True if drop is allowed on the target + */ +YAHOO.ext.grid.GridDD.prototype.setDropStatus = function(dropStatus){ + if(dropStatus === true){ + YAHOO.util.Dom.replaceClass(this.ddicon, 'ygrid-drop-nodrop', 'ygrid-drop-ok'); + }else{ + YAHOO.util.Dom.replaceClass(this.ddicon, 'ygrid-drop-ok', 'ygrid-drop-nodrop'); + } +}; + +YAHOO.ext.grid.GridDD.prototype.startDrag = function(e){ + this.ddtext.innerHTML = this.grid.getDragDropText(); + this.setDropStatus(false); + this.grid.selModel.lock(); + this.grid.fireEvent('startdrag', this.grid, this, e); +}; + +YAHOO.ext.grid.GridDD.prototype.endDrag = function(e){ + YAHOO.util.Dom.setStyle(this.ddproxy, 'visibility', 'hidden'); + this.grid.fireEvent('enddrag', this.grid, this, e); +}; + +YAHOO.ext.grid.GridDD.prototype.autoOffset = function(iPageX, iPageY) { + this.setDelta(-12, -20); +}; + +YAHOO.ext.grid.GridDD.prototype.onDragEnter = function(e, id) { + this.setDropStatus(true); + this.grid.fireEvent('dragenter', this.grid, this, id, e); +}; + +YAHOO.ext.grid.GridDD.prototype.onDragDrop = function(e, id) { + this.grid.fireEvent('dragdrop', this.grid, this, id, e); +}; + +YAHOO.ext.grid.GridDD.prototype.onDragOver = function(e, id) { + this.grid.fireEvent('dragover', this.grid, this, id, e); +}; + +YAHOO.ext.grid.GridDD.prototype.onDragOut = function(e, id) { + this.setDropStatus(false); + this.grid.fireEvent('dragout', this.grid, this, id, e); +}; +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/GridView.js b/www/extras/yui-ext/source/grid/GridView.js new file mode 100644 index 000000000..869f56b6f --- /dev/null +++ b/www/extras/yui-ext/source/grid/GridView.js @@ -0,0 +1,791 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * Default UI code used internally by the Grid. Documentation to come. + * @constructor + */ +YAHOO.ext.grid.GridView = function(){ + /** @private */ + this.grid = null; + + /** @private */ + this.lastFocusedRow = null; + /** + * Fires when the ViewPort is scrolled - fireDirect sig: (this, scrollLeft, scrollTop) + * @type YAHOO.util.CustomEvent + * @deprecated + */ + this.onScroll = new YAHOO.util.CustomEvent('onscroll'); + + /** + * @private + */ + this.adjustScrollTask = new YAHOO.ext.util.DelayedTask(this._adjustForScroll, this); + /** + * @private + */ + this.ensureVisibleTask = new YAHOO.ext.util.DelayedTask(); +}; + +YAHOO.ext.grid.GridView.prototype = { + init: function(grid){ + this.grid = grid; + }, + + fireScroll: function(scrollLeft, scrollTop){ + this.onScroll.fireDirect(this.grid, scrollLeft, scrollTop); + }, + + /** + * Utility method that gets an array of the cell renderers + */ + getColumnRenderers : function(){ + var renderers = []; + var cm = this.grid.colModel; + var colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + renderers.push(cm.getRenderer(i)); + } + return renderers; + }, + + buildIndexMap : function(){ + var colToData = {}; + var dataToCol = {}; + var cm = this.grid.colModel; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + var di = cm.getDataIndex(i); + colToData[i] = di; + dataToCol[di] = i; + } + return {'colToData': colToData, 'dataToCol': dataToCol}; + }, + + getDataIndexes : function(){ + if(!this.indexMap){ + this.indexMap = this.buildIndexMap(); + } + return this.indexMap.colToData; + }, + + getColumnIndexByDataIndex : function(dataIndex){ + if(!this.indexMap){ + this.indexMap = this.buildIndexMap(); + } + return this.indexMap.dataToCol[dataIndex]; + }, + + updateHeaders : function(){ + var colModel = this.grid.colModel; + var hcells = this.headers; + var colCount = colModel.getColumnCount(); + for(var i = 0; i < colCount; i++){ + hcells[i].textNode.innerHTML = colModel.getColumnHeader(i); + } + }, + + adjustForScroll : function(disableDelay){ + if(!disableDelay){ + this.adjustScrollTask.delay(50); + }else{ + this._adjustForScroll(); + } + }, + + getCellAtPoint : function(x, y){ + var colIndex = null; + var rowIndex = null; + + // translate page coordinates to local coordinates + var xy = YAHOO.util.Dom.getXY(this.wrap); + x = (x - xy[0]) + this.wrap.scrollLeft; + y = (y - xy[1]) + this.wrap.scrollTop; + + var colModel = this.grid.colModel; + var pos = 0; + var colCount = colModel.getColumnCount(); + for(var i = 0; i < colCount; i++){ + if(colModel.isHidden(i)) continue; + var width = colModel.getColumnWidth(i); + if(x >= pos && x < pos+width){ + colIndex = i; + break; + } + pos += width; + } + if(colIndex != null){ + rowIndex = (y == 0 ? 0 : Math.floor(y / this.getRowHeight())); + if(rowIndex >= this.grid.dataModel.getRowCount()){ + return null; + } + return [colIndex, rowIndex]; + } + return null; + }, + + /** @private */ + _adjustForScroll : function(){ + this.forceScrollUpdate(); + if(this.scrollbarMode == YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP){ + var adjustment = 0; + if(this.wrap.clientWidth && this.wrap.clientWidth != 0){ + adjustment = this.wrap.offsetWidth - this.wrap.clientWidth; + } + this.hwrap.setWidth(this.wrap.offsetWidth-adjustment); + }else{ + this.hwrap.setWidth(this.wrap.offsetWidth); + } + this.bwrap.setWidth(Math.max(this.grid.colModel.getTotalWidth(), this.wrap.clientWidth)); + }, + + focusRow : function(row){ + if(typeof row == 'number'){ + row = this.getBodyTable().childNodes[row]; + } + if(!row) return; + var left = this.wrap.scrollLeft; + try{ // try catch for IE occasional focus bug + row.childNodes.item(0).hideFocus = true; + row.childNodes.item(0).focus(); + }catch(e){} + this.ensureVisible(row); + this.wrap.scrollLeft = left; + this.handleScroll(); + this.lastFocusedRow = row; + }, + + ensureVisible : function(row, disableDelay){ + if(!disableDelay){ + this.ensureVisibleTask.delay(50, this._ensureVisible, this, [row]); + }else{ + this._ensureVisible(row); + } + }, + + /** @ignore */ + _ensureVisible : function(row){ + if(typeof row == 'number'){ + row = this.getBodyTable().childNodes[row]; + } + if(!row) return; + var left = this.wrap.scrollLeft; + var rowTop = parseInt(row.offsetTop, 10); // parseInt for safari bug + var rowBottom = rowTop + row.offsetHeight; + var clientTop = parseInt(this.wrap.scrollTop, 10); // parseInt for safari bug + var clientBottom = clientTop + this.wrap.clientHeight; + if(rowTop < clientTop){ + this.wrap.scrollTop = rowTop; + }else if(rowBottom > clientBottom){ + this.wrap.scrollTop = rowBottom-this.wrap.clientHeight; + } + this.wrap.scrollLeft = left; + this.handleScroll(); + }, + + updateColumns : function(){ + this.grid.stopEditing(); + var colModel = this.grid.colModel; + var hcols = this.headers; + var colCount = colModel.getColumnCount(); + var pos = 0; + var totalWidth = colModel.getTotalWidth(); + for(var i = 0; i < colCount; i++){ + if(colModel.isHidden(i)) continue; + var width = colModel.getColumnWidth(i); + hcols[i].style.width = width + 'px'; + hcols[i].style.left = pos + 'px'; + hcols[i].split.style.left = (pos+width-3) + 'px'; + this.setCSSWidth(i, width, pos); + pos += width; + } + this.lastWidth = totalWidth; + this.bwrap.setWidth(Math.max(totalWidth, this.wrap.clientWidth)); + if(!YAHOO.ext.util.Browser.isIE){ // fix scrolling prob in gecko and opera + this.wrap.scrollLeft = this.hwrap.dom.scrollLeft; + } + this.syncScroll(); + this.forceScrollUpdate(); + }, + + setCSSWidth : function(colIndex, width, pos){ + var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex]; + YAHOO.ext.util.CSS.updateRule(selector, 'width', width + 'px'); + if(typeof pos == 'number'){ + YAHOO.ext.util.CSS.updateRule(selector, 'left', pos + 'px'); + } + }, + + handleHiddenChange : function(colModel, colIndex, hidden){ + if(hidden){ + this.hideColumn(colIndex); + }else{ + this.unhideColumn(colIndex); + } + this.updateColumns(); + }, + + hideColumn : function(colIndex){ + var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex]; + YAHOO.ext.util.CSS.updateRule(selector, 'position', 'absolute'); + YAHOO.ext.util.CSS.updateRule(selector, 'visibility', 'hidden'); + + this.headers[colIndex].style.display = 'none'; + this.headers[colIndex].split.style.display = 'none'; + }, + + unhideColumn : function(colIndex){ + var selector = ["#" + this.grid.id + " .ygrid-col-" + colIndex, ".ygrid-col-" + colIndex]; + YAHOO.ext.util.CSS.updateRule(selector, 'position', ''); + YAHOO.ext.util.CSS.updateRule(selector, 'visibility', 'visible'); + + this.headers[colIndex].style.display = ''; + this.headers[colIndex].split.style.display = ''; + }, + + getBodyTable : function(){ + return this.bwrap.dom; + }, + + updateRowIndexes : function(firstRow, lastRow){ + var stripeRows = this.grid.stripeRows; + var bt = this.getBodyTable(); + var nodes = bt.childNodes; + firstRow = firstRow || 0; + lastRow = lastRow || nodes.length-1; + var re = /^(?:ygrid-row ygrid-row-alt|ygrid-row)/; + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + var node = nodes[rowIndex]; + if(stripeRows && (rowIndex+1) % 2 == 0){ + node.className = node.className.replace(re, 'ygrid-row ygrid-row-alt'); + }else{ + node.className = node.className.replace(re, 'ygrid-row'); + } + node.rowIndex = rowIndex; + nodes[rowIndex].style.top = (rowIndex * this.rowHeight) + 'px'; + } + }, + + insertRows : function(dataModel, firstRow, lastRow){ + this.updateBodyHeight(); + this.adjustForScroll(true); + var renderers = this.getColumnRenderers(); + var dindexes = this.getDataIndexes(); + var colCount = this.grid.colModel.getColumnCount(); + var beforeRow = null; + var bt = this.getBodyTable(); + if(firstRow < bt.childNodes.length){ + beforeRow = bt.childNodes[firstRow]; + } + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + var row = document.createElement('span'); + row.className = 'ygrid-row'; + row.style.top = (rowIndex * this.rowHeight) + 'px'; + this.renderRow(dataModel, row, rowIndex, colCount, renderers, dindexes); + if(beforeRow){ + bt.insertBefore(row, beforeRow); + }else{ + bt.appendChild(row); + } + } + this.updateRowIndexes(firstRow); + this.adjustForScroll(); + }, + + renderRow : function(dataModel, row, rowIndex, colCount, renderers, dindexes){ + for(var colIndex = 0; colIndex < colCount; colIndex++){ + var td = document.createElement('span'); + td.className = 'ygrid-col ygrid-col-' + colIndex + (colIndex == colCount-1 ? ' ygrid-col-last' : ''); + td.columnIndex = colIndex; + td.tabIndex = 0; + var span = document.createElement('span'); + span.className = 'ygrid-cell-text'; + td.appendChild(span); + var val = renderers[colIndex](dataModel.getValueAt(rowIndex, dindexes[colIndex]), rowIndex, colIndex); + if(val == '') val = ' '; + span.innerHTML = val; + row.appendChild(td); + } + }, + + deleteRows : function(dataModel, firstRow, lastRow){ + this.updateBodyHeight(); + // first make sure they are deselected + this.grid.selModel.deselectRange(firstRow, lastRow); + var bt = this.getBodyTable(); + var rows = []; // get references because the rowIndex will change + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + rows.push(bt.childNodes[rowIndex]); + } + for(var i = 0; i < rows.length; i++){ + bt.removeChild(rows[i]); + rows[i] = null; + } + rows = null; + this.updateRowIndexes(firstRow); + this.adjustForScroll(); + }, + + updateRows : function(dataModel, firstRow, lastRow){ + var bt = this.getBodyTable(); + var dindexes = this.getDataIndexes(); + var renderers = this.getColumnRenderers(); + var colCount = this.grid.colModel.getColumnCount(); + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + var row = bt.rows[rowIndex]; + var cells = row.childNodes; + for(var colIndex = 0; colIndex < colCount; colIndex++){ + var td = cells[colIndex]; + var val = renderers[colIndex](dataModel.getValueAt(rowIndex, dindexes[colIndex]), rowIndex, colIndex); + if(val == '') val = ' '; + td.firstChild.innerHTML = val; + } + } + }, + + handleSort : function(dataModel, sortColumnIndex, sortDir, noRefresh){ + this.grid.selModel.syncSelectionsToIds(); + if(!noRefresh){ + this.updateRows(dataModel, 0, dataModel.getRowCount()-1); + } + this.updateHeaderSortState(); + if(this.lastFocusedRow){ + this.focusRow(this.lastFocusedRow); + } + }, + + syncScroll : function(){ + this.hwrap.dom.scrollLeft = this.wrap.scrollLeft; + }, + + handleScroll : function(){ + this.syncScroll(); + this.fireScroll(this.wrap.scrollLeft, this.wrap.scrollTop); + this.grid.fireEvent('bodyscroll', this.wrap.scrollLeft, this.wrap.scrollTop); + }, + + getRowHeight : function(){ + if(!this.rowHeight){ + var rule = YAHOO.ext.util.CSS.getRule(["#" + this.grid.id + " .ygrid-row", ".ygrid-row"]); + if(rule && rule.style.height){ + this.rowHeight = parseInt(rule.style.height, 10); + }else{ + this.rowHeight = 21; + } + } + return this.rowHeight; + }, + + renderRows : function(dataModel){ + if(this.grid.selModel){ + this.grid.selModel.clearSelections(); + } + var bt = this.getBodyTable(); + bt.innerHTML = ''; + this.rowHeight = this.getRowHeight(); + this.insertRows(dataModel, 0, dataModel.getRowCount()-1); + }, + + updateCell : function(dataModel, rowIndex, dataIndex){ + var colIndex = this.getColumnIndexByDataIndex(dataIndex); + if(typeof colIndex == 'undefined'){ // not present in grid + return; + } + var bt = this.getBodyTable(); + var row = bt.childNodes[rowIndex]; + var cell = row.childNodes[colIndex]; + var renderer = this.grid.colModel.getRenderer(colIndex); + var val = renderer(dataModel.getValueAt(rowIndex, dataIndex), rowIndex, colIndex); + if(val == '') val = ' '; + cell.firstChild.innerHTML = val; + }, + + calcColumnWidth : function(colIndex, maxRowsToMeasure){ + var maxWidth = 0; + var bt = this.getBodyTable(); + var rows = bt.childNodes; + var stopIndex = Math.min(maxRowsToMeasure || rows.length, rows.length); + if(this.grid.autoSizeHeaders){ + var h = this.headers[colIndex]; + var curWidth = h.style.width; + h.style.width = this.grid.minColumnWidth+'px'; + maxWidth = Math.max(maxWidth, h.scrollWidth); + h.style.width = curWidth; + } + for(var i = 0; i < stopIndex; i++){ + var cell = rows[i].childNodes[colIndex].firstChild; + maxWidth = Math.max(maxWidth, cell.scrollWidth); + } + return maxWidth + /*margin for error in IE*/ 5; + }, + + autoSizeColumn : function(colIndex, forceMinSize){ + if(forceMinSize){ + this.setCSSWidth(colIndex, this.grid.minColumnWidth); + } + var newWidth = this.calcColumnWidth(colIndex); + this.grid.colModel.setColumnWidth(colIndex, + Math.max(this.grid.minColumnWidth, newWidth)); + this.grid.fireEvent('columnresize', colIndex, newWidth); + }, + + autoSizeColumns : function(){ + var colModel = this.grid.colModel; + var colCount = colModel.getColumnCount(); + var wrap = this.wrap; + for(var i = 0; i < colCount; i++){ + this.setCSSWidth(i, this.grid.minColumnWidth); + colModel.setColumnWidth(i, this.calcColumnWidth(i, this.grid.maxRowsToMeasure), true); + } + if(colModel.getTotalWidth() < wrap.clientWidth){ + var diff = Math.floor((wrap.clientWidth - colModel.getTotalWidth()) / colCount); + for(var i = 0; i < colCount; i++){ + colModel.setColumnWidth(i, colModel.getColumnWidth(i) + diff, true); + } + } + this.updateColumns(); + }, + + onWindowResize : function(){ + if(this.grid.monitorWindowResize){ + this.updateWrapHeight(); + this.adjustForScroll(); + } + }, + + updateWrapHeight : function(){ + this.grid.container.beginMeasure(); + var box = this.grid.container.getBox(true); + this.wrapEl.setHeight(box.height-this.footerHeight-parseInt(this.wrap.offsetTop, 10)); + this.grid.container.endMeasure(); + }, + + forceScrollUpdate : function(){ + var wrap = this.wrap; + YAHOO.util.Dom.setStyle(wrap, 'width', (wrap.offsetWidth) +'px'); + setTimeout(function(){ // set timeout so FireFox works + YAHOO.util.Dom.setStyle(wrap, 'width', ''); + }, 1); + }, + + updateHeaderSortState : function(){ + var state = this.grid.dataModel.getSortState(); + var sortColumn = this.getColumnIndexByDataIndex(state.column); + var sortDir = state.direction; + for(var i = 0, len = this.headers.length; i < len; i++){ + var h = this.headers[i]; + if(i != sortColumn){ + h.sortDesc.style.display = 'none'; + h.sortAsc.style.display = 'none'; + }else{ + h.sortDesc.style.display = sortDir == 'DESC' ? 'block' : 'none'; + h.sortAsc.style.display = sortDir == 'ASC' ? 'block' : 'none'; + } + } + }, + + render : function(){ + var grid = this.grid; + var container = grid.container.dom; + var dataModel = grid.dataModel; + dataModel.onCellUpdated.subscribe(this.updateCell, this, true); + dataModel.onTableDataChanged.subscribe(this.renderRows, this, true); + dataModel.onRowsDeleted.subscribe(this.deleteRows, this, true); + dataModel.onRowsInserted.subscribe(this.insertRows, this, true); + dataModel.onRowsUpdated.subscribe(this.updateRows, this, true); + dataModel.onRowsSorted.subscribe(this.handleSort, this, true); + + var colModel = grid.colModel; + colModel.onWidthChange.subscribe(this.updateColumns, this, true); + colModel.onHeaderChange.subscribe(this.updateHeaders, this, true); + colModel.onHiddenChange.subscribe(this.handleHiddenChange, this, true); + + YAHOO.util.Event.on(window, 'resize', this.onWindowResize, this, true); + + var autoSizeDelegate = this.autoSizeColumn.createDelegate(this); + + var colCount = colModel.getColumnCount(); + + var dh = YAHOO.ext.DomHelper; + //create wrapper elements that handle offsets and scrolling + var wrap = dh.append(container, {tag: 'div', cls: 'ygrid-wrap'}); + this.wrap = wrap; + this.wrapEl = getEl(wrap, true); + YAHOO.ext.EventManager.on(wrap, 'scroll', this.handleScroll, this, true); + + var hwrap = dh.append(container, {tag: 'div', cls: 'ygrid-wrap-headers'}); + this.hwrap = getEl(hwrap, true); + + var bwrap = dh.append(wrap, {tag: 'div', cls: 'ygrid-wrap-body', id: container.id + '-body'}); + this.bwrap = getEl(bwrap, true); + this.bwrap.setWidth(colModel.getTotalWidth()); + bwrap.rows = bwrap.childNodes; + + this.footerHeight = 0; + var foot = this.appendFooter(container); + if(foot){ + this.footer = getEl(foot, true); + this.footerHeight = this.footer.getHeight(); + } + this.updateWrapHeight(); + + var hrow = dh.append(hwrap, {tag: 'span', cls: 'ygrid-hrow'}); + this.hrow = hrow; + + // IE doesn't like iframes, we will leave this alone + var iframe = document.createElement('iframe'); + iframe.className = 'ygrid-hrow-frame'; + iframe.frameBorder = 0; + hwrap.appendChild(iframe); + + this.headerCtrl = new YAHOO.ext.grid.HeaderController(this.grid); + this.headers = []; + this.cols = []; + + + + var htemplate = dh.createTemplate({ + tag: 'span', cls: 'ygrid-hd ygrid-header-{0}', children: [{ + tag: 'span', + cls: 'ygrid-hd-body', + html: '' + + '' + + '' + + '
{1}
' + }] + }); + htemplate.compile(); + for(var i = 0; i < colCount; i++){ + var hd = htemplate.append(hrow, [i, colModel.getColumnHeader(i)]); + var spans = hd.getElementsByTagName('span'); + hd.textNode = spans[1]; + hd.sortDesc = spans[2]; + hd.sortAsc = spans[3]; + hd.columnIndex = i; + this.headers.push(hd); + if(colModel.isSortable(i)){ + this.headerCtrl.register(hd); + } + var split = dh.append(hrow, {tag: 'span', cls: 'ygrid-hd-split'}); + hd.split = split; + + YAHOO.util.Event.on(split, 'dblclick', autoSizeDelegate.createCallback(i+0, true)); + + var sb = new YAHOO.ext.SplitBar(split, hd, null, YAHOO.ext.SplitBar.LEFT); + sb.columnIndex = i; + sb.minSize = grid.minColumnWidth; + sb.onMoved.subscribe(this.onColumnSplitterMoved, this, true); + YAHOO.util.Dom.addClass(sb.proxy, 'ygrid-column-sizer'); + YAHOO.util.Dom.setStyle(sb.proxy, 'background-color', ''); + sb.dd._resizeProxy = function(){ + var el = this.getDragEl(); + YAHOO.util.Dom.setStyle(el, 'height', (hwrap.clientHeight+wrap.clientHeight-2) +'px'); + }; + } + if(grid.autoSizeColumns){ + this.renderRows(dataModel); + this.autoSizeColumns(); + }else{ + this.updateColumns(); + this.renderRows(dataModel); + } + + for(var i = 0; i < colCount; i++){ + if(colModel.isHidden(i)){ + this.hideColumn(i); + } + } + return this.bwrap; + + /* + // Old DOM code + //create wrapper elements that handle offsets and scrolling + var wrap = document.createElement('div'); + wrap.className = 'ygrid-wrap'; + grid.container.dom.appendChild(wrap); + this.wrap = wrap; + this.wrapEl = getEl(wrap, true); + YAHOO.ext.EventManager.on(wrap, 'scroll', this.handleScroll, this, true); + + var hwrap = document.createElement('div'); + hwrap.className = 'ygrid-wrap-headers'; + grid.container.dom.appendChild(hwrap); + this.hwrap = getEl(hwrap, true); + //this.hwrap.setWidth(colModel.getTotalWidth()); + + var bwrap = document.createElement('div'); + bwrap.id = grid.container.id + '-body'; + bwrap.className = 'ygrid-wrap-body'; + wrap.appendChild(bwrap); + this.bwrap = getEl(bwrap, true); + this.bwrap.setWidth(colModel.getTotalWidth()); + bwrap.rows = bwrap.childNodes; + + this.footerHeight = 0; + var foot = this.appendFooter(grid.container.dom); + if(foot){ + this.footer = getEl(foot, true); + this.footerHeight = this.footer.getHeight(); + } + this.updateWrapHeight(); + + var hrow = document.createElement('span'); + hrow.className = 'ygrid-hrow'; + hwrap.appendChild(hrow); + var iframe = document.createElement('iframe'); + iframe.className = 'ygrid-hrow-frame'; + iframe.frameBorder = 0; + hwrap.appendChild(iframe); + this.hrow = hrow; + this.headerCtrl = new YAHOO.ext.grid.HeaderController(this.grid); + this.headers = []; + this.cols = []; + for(var i = 0; i < colCount; i++){ + var hd = document.createElement('span'); + hd.className = 'ygrid-hd ygrid-header-' + i; + var span = document.createElement('span'); + span.className = 'ygrid-hd-body'; + hd.appendChild(span); + var tb = document.createElement('table'); + span.appendChild(tb); + tb.border = 0; + tb.cellPadding=0; + tb.cellSpacing = 0; + var tbody = document.createElement('tbody'); + tb.appendChild(tbody); + var tr = document.createElement('tr'); + tbody.appendChild(tr); + var td = document.createElement('td'); + tr.appendChild(td); + var td2 = document.createElement('td'); + tr.appendChild(td2); + var text = document.createElement('span'); + text.innerHTML = colModel.getColumnHeader(i); + td.appendChild(text); + hd.textNode = text; + hd.sortDesc = document.createElement('span'); + hd.sortDesc.className = 'sort-desc'; + hd.sortAsc = document.createElement('span'); + hd.sortAsc.className = 'sort-asc'; + td2.appendChild(hd.sortDesc); + td2.appendChild(hd.sortAsc); + hrow.appendChild(hd) + hd.columnIndex = i; + this.headers.push(hd); + if(colModel.isSortable(i)){ + this.headerCtrl.register(hd); + } + var split = document.createElement('span'); + split.className = 'ygrid-hd-split'; + hrow.appendChild(split); + hd.split = split; + + YAHOO.util.Event.on(split, 'dblclick', autoSizeDelegate.createCallback(i+0, true)); + + var sb = new YAHOO.ext.SplitBar(split, hd, null, YAHOO.ext.SplitBar.LEFT); + sb.columnIndex = i; + sb.minSize = grid.minColumnWidth; + // anonymous function = bad? + sb.onMoved.subscribe(function(splitter, newSize){ + colModel.setColumnWidth(splitter.columnIndex, newSize); + grid.fireEvent('columnresize', splitter.columnIndex, newSize); + }); + YAHOO.util.Dom.addClass(sb.proxy, 'ygrid-column-sizer'); + YAHOO.util.Dom.setStyle(sb.proxy, 'background-color', ''); + sb.dd._resizeProxy = function(){ + var el = this.getDragEl(); + YAHOO.util.Dom.setStyle(el, 'height', (hwrap.clientHeight+wrap.clientHeight-2) +'px'); + }; + } + if(grid.autoSizeColumns){ + this.renderRows(dataModel); + this.autoSizeColumns(); + }else{ + this.updateColumns(); + this.renderRows(dataModel); + } + + for(var i = 0; i < colCount; i++){ + if(colModel.isHidden(i)){ + this.hideColumn(i); + } + } + return this.bwrap;*/ + }, + + onColumnSplitterMoved : function(splitter, newSize){ + this.grid.colModel.setColumnWidth(splitter.columnIndex, newSize); + this.grid.fireEvent('columnresize', splitter.columnIndex, newSize); + }, + + appendFooter : function(parentEl){ + return null; + }, + + updateBodyHeight : function(){ + YAHOO.util.Dom.setStyle(this.getBodyTable(), 'height', + (this.grid.dataModel.getRowCount()*this.rowHeight)+'px'); + } +}; +YAHOO.ext.grid.GridView.SCROLLBARS_UNDER = 0; +YAHOO.ext.grid.GridView.SCROLLBARS_OVERLAP = 1; +YAHOO.ext.grid.GridView.prototype.scrollbarMode = YAHOO.ext.grid.GridView.SCROLLBARS_UNDER; + +/** + * @class + * Used internal by GridView to route header related events. + * @constructor + */ +YAHOO.ext.grid.HeaderController = function(grid){ + /** @private */ + this.grid = grid; + /** @private */ + this.headers = []; +}; + +YAHOO.ext.grid.HeaderController.prototype = { + register : function(header){ + this.headers.push(header); + YAHOO.ext.EventManager.on(header, 'selectstart', this.cancelTextSelection, this, true); + YAHOO.ext.EventManager.on(header, 'mousedown', this.cancelTextSelection, this, true); + YAHOO.ext.EventManager.on(header, 'mouseover', this.headerOver, this, true); + YAHOO.ext.EventManager.on(header, 'mouseout', this.headerOut, this, true); + YAHOO.ext.EventManager.on(header, 'click', this.headerClick, this, true); + }, + + headerClick : function(e){ + var grid = this.grid, cm = grid.colModel, dm = grid.dataModel; + grid.stopEditing(); + var header = grid.getHeaderFromChild(e.getTarget()); + var direction = header.sortDir || 'ASC'; + var state = dm.getSortState(); + if(typeof state.column != 'undefined' && + grid.getView().getColumnIndexByDataIndex(state.column) == header.columnIndex){ + direction = (direction == 'ASC' ? 'DESC' : 'ASC'); + } + header.sortDir = direction; + dm.sort(cm, cm.getDataIndex(header.columnIndex), direction); + }, + + headerOver : function(e){ + var header = this.grid.getHeaderFromChild(e.getTarget()); + YAHOO.util.Dom.addClass(header, 'ygrid-hd-over'); + //YAHOO.ext.util.CSS.applyFirst(header, this.grid.id, '.ygrid-hd-over'); + }, + + headerOut : function(e){ + var header = this.grid.getHeaderFromChild(e.getTarget()); + YAHOO.util.Dom.removeClass(header, 'ygrid-hd-over'); + //YAHOO.ext.util.CSS.revertFirst(header, this.grid.id, '.ygrid-hd-over'); + }, + + cancelTextSelection : function(e){ + e.preventDefault(); + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/PagedGridView.js b/www/extras/yui-ext/source/grid/PagedGridView.js new file mode 100644 index 000000000..8d5c37d1d --- /dev/null +++ b/www/extras/yui-ext/source/grid/PagedGridView.js @@ -0,0 +1,148 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.PagedGridView = function(){ + YAHOO.ext.grid.PagedGridView.superclass.constructor.call(this); + this.cursor = 1; +}; +YAHOO.extendX(YAHOO.ext.grid.PagedGridView, YAHOO.ext.grid.GridView); + +YAHOO.ext.grid.PagedGridView.prototype.appendFooter = function(parentEl){ + var fwrap = document.createElement('div'); + fwrap.className = 'ygrid-wrap-footer'; + var fbody = document.createElement('span'); + fbody.className = 'ygrid-footer'; + fwrap.appendChild(fbody); + parentEl.appendChild(fwrap); + this.createPagingToolbar(fbody); + return fwrap; +}; +YAHOO.ext.grid.PagedGridView.prototype.createPagingToolbar = function(container){ + var tb = new YAHOO.ext.Toolbar(container); + this.pageToolbar = tb; + this.first = tb.addButton({ + tooltip: this.firstText, + className: 'ygrid-page-first', + disabled: true, + click: this.onClick.createDelegate(this, ['first']) + }); + this.prev = tb.addButton({ + tooltip: this.prevText, + className: 'ygrid-page-prev', + disabled: true, + click: this.onClick.createDelegate(this, ['prev']) + }); + tb.addSeparator(); + tb.add(this.beforePageText); + var pageBox = document.createElement('input'); + pageBox.type = 'text'; + pageBox.size = 3; + pageBox.value = '1'; + pageBox.className = 'ygrid-page-number'; + tb.add(pageBox); + this.field = getEl(pageBox, true); + this.field.mon('keydown', this.onEnter, this, true); + this.field.on('focus', function(){pageBox.select();}); + this.afterTextEl = tb.addText(this.afterPageText.replace('%0', '1')); + this.field.setHeight(18); + tb.addSeparator(); + this.next = tb.addButton({ + tooltip: this.nextText, + className: 'ygrid-page-next', + disabled: true, + click: this.onClick.createDelegate(this, ['next']) + }); + this.last = tb.addButton({ + tooltip: this.lastText, + className: 'ygrid-page-last', + disabled: true, + click: this.onClick.createDelegate(this, ['last']) + }); + tb.addSeparator(); + this.loading = tb.addButton({ + tooltip: this.refreshText, + className: 'ygrid-loading', + disabled: true, + click: this.onClick.createDelegate(this, ['refresh']) + }); + this.onPageLoaded(1, this.grid.dataModel.getTotalPages()); +}; +YAHOO.ext.grid.PagedGridView.prototype.getPageToolbar = function(){ + return this.pageToolbar; +}; + +YAHOO.ext.grid.PagedGridView.prototype.onPageLoaded = function(pageNum, totalPages){ + this.cursor = pageNum; + this.lastPage = totalPages; + this.afterTextEl.innerHTML = this.afterPageText.replace('%0', totalPages); + this.field.dom.value = pageNum; + this.first.setDisabled(pageNum == 1); + this.prev.setDisabled(pageNum == 1); + this.next.setDisabled(pageNum == totalPages); + this.last.setDisabled(pageNum == totalPages); + this.loading.enable(); +}; + +YAHOO.ext.grid.PagedGridView.prototype.onEnter = function(e){ + if(e.browserEvent.keyCode == e.RETURN){ + var v = this.field.dom.value; + if(!v){ + this.field.dom.value = this.cursor; + return; + } + var pageNum = parseInt(v, 10); + if(isNaN(v)){ + this.field.dom.value = this.cursor; + return; + } + pageNum = Math.min(Math.max(1, pageNum), this.lastPage); + this.grid.dataModel.loadPage(pageNum); + e.stopEvent(); + } +}; + +YAHOO.ext.grid.PagedGridView.prototype.beforeLoad = function(){ + if(this.loading){ + this.loading.disable(); + } +}; + +YAHOO.ext.grid.PagedGridView.prototype.onClick = function(which){ + switch(which){ + case 'first': + this.grid.dataModel.loadPage(1); + break; + case 'prev': + this.grid.dataModel.loadPage(this.cursor -1); + break; + case 'next': + this.grid.dataModel.loadPage(this.cursor + 1); + break; + case 'last': + this.grid.dataModel.loadPage(this.lastPage); + break; + case 'refresh': + this.grid.dataModel.loadPage(this.cursor); + break; + } +}; + +YAHOO.ext.grid.PagedGridView.prototype.render = function(){ + this.grid.dataModel.addListener('beforeload', this.beforeLoad, this, true); + this.grid.dataModel.addListener('load', this.onPageLoaded, this, true); + return YAHOO.ext.grid.PagedGridView.superclass.render.call(this); +}; + +YAHOO.ext.grid.PagedGridView.prototype.beforePageText = "Page"; +YAHOO.ext.grid.PagedGridView.prototype.afterPageText = "of %0"; +YAHOO.ext.grid.PagedGridView.prototype.firstText = "First Page"; +YAHOO.ext.grid.PagedGridView.prototype.prevText = "Previous Page"; +YAHOO.ext.grid.PagedGridView.prototype.nextText = "Next Page"; +YAHOO.ext.grid.PagedGridView.prototype.lastText = "Last Page"; +YAHOO.ext.grid.PagedGridView.prototype.refreshText = "Refresh"; diff --git a/www/extras/yui-ext/source/grid/SelectionModel.js b/www/extras/yui-ext/source/grid/SelectionModel.js new file mode 100644 index 000000000..51f2de1ef --- /dev/null +++ b/www/extras/yui-ext/source/grid/SelectionModel.js @@ -0,0 +1,431 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + @class The default SelectionModel used by {@link YAHOO.ext.grid.Grid}. + It supports multiple selections and keyboard selection/navigation.

+ @constructor + */ +YAHOO.ext.grid.DefaultSelectionModel = function(){ + /** @private */ + this.selectedRows = []; + /** @private */ + this.selectedRowIds = []; + /** @private */ + this.lastSelectedRow = null; + + /** Fires when a row is selected or deselected - fireDirect sig: (this, row, isSelected) + * @type YAHOO.util.CustomEvent + * @deprecated + */ + this.onRowSelect = new YAHOO.util.CustomEvent('SelectionTable.rowSelected'); + /** Fires when the selection changes on the Grid - fireDirect sig: (this, selectedRows[], selectedRowIds[]) + * @type YAHOO.util.CustomEvent + * @deprecated + */ + this.onSelectionChange = new YAHOO.util.CustomEvent('SelectionTable.selectionChanged'); + + this.events = { + 'selectionchange' : this.onSelectionChange, + 'rowselect' : this.onRowSelect + }; + + this.locked = false; +}; + +YAHOO.ext.grid.DefaultSelectionModel.prototype = { + /** @ignore Called by the grid automatically. Do not call directly. */ + init : function(grid){ + this.grid = grid; + this.initEvents(); + }, + + lock : function(){ + this.locked = true; + }, + + unlock : function(){ + this.locked = false; + }, + + isLocked : function(){ + return this.locked; + }, + + /** @ignore */ + initEvents : function(){ + if(this.grid.trackMouseOver){ + this.grid.addListener("mouseover", this.handleOver, this, true); + this.grid.addListener("mouseout", this.handleOut, this, true); + } + this.grid.addListener("rowclick", this.rowClick, this, true); + this.grid.addListener("keydown", this.keyDown, this, true); + }, + + addListener : YAHOO.ext.grid.Grid.prototype.addListener, + removeListener : YAHOO.ext.grid.Grid.prototype.removeListener, + fireEvent : YAHOO.ext.grid.Grid.prototype.fireEvent, + + /** @ignore Syncs selectedRows with the correct row by looking it up by id. + Used after a sort moves data around. */ + syncSelectionsToIds : function(){ + if(this.getCount() > 0){ + var ids = this.selectedRowIds.concat(); + this.clearSelections(); + this.selectRowsById(ids, true); + } + }, + + /** + * Set the selected rows by their ID(s). IDs must match what is returned by the DataModel getRowId(index). + * @param {String/Array} id The id(s) to select + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRowsById : function(id, keepExisting){ + var rows = this.grid.getRowsById(id); + this.selectRows(rows, keepExisting); + }, + + /** + * Gets the number of selected rows. + * @return {Number} + */ + getCount : function(){ + return this.selectedRows.length; + }, + + /** + * Selects the first row in the grid. + */ + selectFirstRow : function(){ + for(var j = 0; j < this.grid.rows.length; j++){ + if(this.isSelectable(this.grid.rows[j])){ + this.focusRow(this.grid.rows[j]); + this.setRowState(this.grid.rows[j], true); + return; + } + } + }, + + /** + * Selects the row immediately following the last selected row. + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectNext : function(keepExisting){ + if(this.lastSelectedRow){ + for(var j = (this.lastSelectedRow.rowIndex+1); j < this.grid.rows.length; j++){ + var row = this.grid.rows[j]; + if(this.isSelectable(row)){ + this.focusRow(row); + this.setRowState(row, true, keepExisting); + return; + } + } + } + }, + + /** + * Selects the row that precedes the last selected row. + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectPrevious : function(keepExisting){ + if(this.lastSelectedRow){ + for(var j = (this.lastSelectedRow.rowIndex-1); j >= 0; j--){ + var row = this.grid.rows[j]; + if(this.isSelectable(row)){ + this.focusRow(row); + this.setRowState(row, true, keepExisting); + return; + } + } + } + }, + + /** + * Returns the selected rows. + * @return {Array} Array of DOM row elements + */ + getSelectedRows : function(){ + return this.selectedRows; + }, + + /** + * Returns the selected row ids. + * @return {Array} Array of String ids + */ + getSelectedRowIds : function(){ + return this.selectedRowIds; + }, + + /** + * Clears all selections. + */ + clearSelections : function(){ + if(this.isLocked()) return; + var oldSelections = this.selectedRows.concat(); + for(var j = 0; j < oldSelections.length; j++){ + this.setRowState(oldSelections[j], false); + } + this.selectedRows = []; + this.selectedRowIds = []; + }, + + + /** + * Selects all rows. + */ + selectAll : function(){ + if(this.isLocked()) return; + for(var j = 0; j < this.grid.rows.length; j++){ + this.setRowState(this.grid.rows[j], true, true); + } + }, + + /** + * Returns True if there is a selection. + * @return {Boolean} + */ + hasSelection : function(){ + return this.selectedRows.length > 0; + }, + + /** + * Returns True if the specified row is selected. + * @param {HTMLElement} row The row to check + * @return {Boolean} + */ + isSelected : function(row){ + return row && (row.selected === true || row.getAttribute('selected') == 'true'); + }, + + /** + * Returns True if the specified row is selectable. + * @param {HTMLElement} row The row to check + * @return {Boolean} + */ + isSelectable : function(row){ + return row && row.getAttribute('selectable') != 'false'; + }, + + /** @ignore */ + rowClick : function(grid, rowIndex, e){ + if(this.isLocked()) return; + var row = grid.getRow(rowIndex); + if(this.isSelectable(row)){ + if(e.shiftKey && this.lastSelectedRow){ + var lastIndex = this.lastSelectedRow.rowIndex; + this.selectRange(this.lastSelectedRow, row, e.ctrlKey); + this.lastSelectedRow = this.grid.el.dom.rows[lastIndex]; + }else{ + this.focusRow(row); + var rowState = e.ctrlKey ? !this.isSelected(row) : true; + this.setRowState(row, rowState, e.hasModifier()); + } + } + }, + + /** + * Deprecated. Tries to focus the row and scroll it into view - Use grid.scrollTo or grid.getView().focusRow() instead. + * @deprecated + * @param {HTMLElement} row The row to focus + */ + focusRow : function(row){ + this.grid.view.focusRow(row); + }, + + /** + * Selects a row. + * @param {Number/HTMLElement} row The row or index of the row to select + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRow : function(row, keepExisting){ + this.setRowState(this.getRow(row), true, keepExisting); + }, + + /** + * Selects multiple rows. + * @param {Array} rows Array of the rows or indexes of the row to select + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRows : function(rows, keepExisting){ + if(!keepExisting){ + this.clearSelections(); + } + for(var i = 0; i < rows.length; i++){ + this.selectRow(rows[i], true); + } + }, + + /** + * Deselects a row. + * @param {Number/HTMLElement} row The row or index of the row to deselect + */ + deselectRow : function(row){ + this.setRowState(this.getRow(row), false); + }, + + /** @ignore */ + getRow : function(row){ + if(typeof row == 'number'){ + row = this.grid.rows[row]; + } + return row; + }, + + /** + * Selects a range of rows. All rows in between startRow and endRow are also selected. + * @param {Number/HTMLElement} startRow The row or index of the first row in the range + * @param {Number/HTMLElement} endRow The row or index of the last row in the range + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRange : function(startRow, endRow, keepExisting){ + startRow = this.getRow(startRow); + endRow = this.getRow(endRow); + this.setRangeState(startRow, endRow, true, keepExisting); + }, + + /** + * Deselects a range of rows. All rows in between startRow and endRow are also deselected. + * @param {Number/HTMLElement} startRow The row or index of the first row in the range + * @param {Number/HTMLElement} endRow The row or index of the last row in the range + */ + deselectRange : function(startRow, endRow){ + startRow = this.getRow(startRow); + endRow = this.getRow(endRow); + this.setRangeState(startRow, endRow, false, true); + }, + + /** @ignore */ + setRowStateFromChild : function(childEl, selected, keepExisting){ + var row = this.grid.getRowFromChild(childEl); + this.setRowState(row, selected, keepExisting); + }, + + /** @ignore */ + setRangeState : function(startRow, endRow, selected, keepExisting){ + if(this.isLocked()) return; + if(!keepExisting){ + this.clearSelections(); + } + var curRow = startRow; + while(curRow.rowIndex != endRow.rowIndex){ + this.setRowState(curRow, selected, true); + curRow = (startRow.rowIndex < endRow.rowIndex ? + this.grid.getRowAfter(curRow) : this.grid.getRowBefore(curRow)) + } + this.setRowState(endRow, selected, true); + }, + + /** @ignore */ + setRowState : function(row, selected, keepExisting){ + if(this.isLocked()) return; + if(this.isSelectable(row)){ + if(selected){ + if(!keepExisting){ + this.clearSelections(); + } + this.setRowClass(row, 'selected'); + row.selected = true; + this.selectedRows.push(row); + this.selectedRowIds.push(this.grid.dataModel.getRowId(row.rowIndex)); + this.lastSelectedRow = row; + }else{ + this.setRowClass(row, ''); + row.selected = false; + this._removeSelected(row); + } + this.fireEvent('rowselect', this, row, selected); + this.fireEvent('selectionchange', this, this.selectedRows, this.selectedRowIds); + } + }, + + /** @ignore */ + handleOver : function(e){ + var row = this.grid.getRowFromChild(e.getTarget()); + if(this.isSelectable(row) && !this.isSelected(row)){ + this.setRowClass(row, 'over'); + } + }, + + /** @ignore */ + handleOut : function(e){ + var row = this.grid.getRowFromChild(e.getTarget()); + if(this.isSelectable(row) && !this.isSelected(row)){ + this.setRowClass(row, ''); + } + }, + + /** @ignore */ + keyDown : function(e){ + if(e.browserEvent.keyCode == e.DOWN){ + this.selectNext(e.shiftKey); + e.preventDefault(); + }else if(e.browserEvent.keyCode == e.UP){ + this.selectPrevious(e.shiftKey); + e.preventDefault(); + } + }, + + /** @ignore */ + setRowClass : function(row, cssClass){ + if(this.isSelectable(row)){ + if(cssClass == 'selected'){ + YAHOO.util.Dom.removeClass(row, 'ygrid-row-over'); + YAHOO.util.Dom.addClass(row, 'ygrid-row-selected'); + }else if(cssClass == 'over'){ + YAHOO.util.Dom.removeClass(row, 'ygrid-row-selected'); + YAHOO.util.Dom.addClass(row, 'ygrid-row-over'); + }else if(cssClass == ''){ + YAHOO.util.Dom.removeClass(row, 'ygrid-row-selected'); + YAHOO.util.Dom.removeClass(row, 'ygrid-row-over'); + } + } + }, + + /** @ignore */ + _removeSelected : function(row){ + var sr = this.selectedRows; + for (var i = 0; i < sr.length; i++) { + if (sr[i] === row){ + this.selectedRows.splice(i, 1); + this.selectedRowIds.splice(i, 1); + return; + } + } + } +}; + +/** + @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to allow only one row to be selected at a time.

+ @extends YAHOO.ext.grid.DefaultSelectionModel + @constructor + */ +YAHOO.ext.grid.SingleSelectionModel = function(){ + YAHOO.ext.grid.SingleSelectionModel.superclass.constructor.call(this); +}; + +YAHOO.extendX(YAHOO.ext.grid.SingleSelectionModel, YAHOO.ext.grid.DefaultSelectionModel); + +/** @ignore */ +YAHOO.ext.grid.SingleSelectionModel.prototype.setRowState = function(row, selected){ + YAHOO.ext.grid.SingleSelectionModel.superclass.setRowState.call(this, row, selected, false); +}; + +/** + @class Extends {@link YAHOO.ext.grid.DefaultSelectionModel} to disable row selection.

+ @extends YAHOO.ext.grid.DefaultSelectionModel + @constructor + */ +YAHOO.ext.grid.DisableSelectionModel = function(){ + YAHOO.ext.grid.DisableSelectionModel.superclass.constructor.call(this); +}; + +YAHOO.extendX(YAHOO.ext.grid.DisableSelectionModel, YAHOO.ext.grid.DefaultSelectionModel); + +YAHOO.ext.grid.DisableSelectionModel.prototype.initEvents = function(){ +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/CellEditor.js b/www/extras/yui-ext/source/grid/editor/CellEditor.js new file mode 100644 index 000000000..1f633d0a8 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/CellEditor.js @@ -0,0 +1,92 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.grid.CellEditor = function(element){ + this.colIndex = null; + this.rowIndex = null; + this.grid = null; + this.editing = false; + this.originalValue = null; + this.element = getEl(element, true); + this.element.addClass('ygrid-editor'); + this.element.dom.tabIndex = 1; + this.initialized = false; + this.callback = null; +}; + +YAHOO.ext.grid.CellEditor.prototype = { + init : function(grid, bodyElement, callback){ + // there's no way for the grid to know if multiple columns + // share the same editor so it will try to initialize the + // same one over and over + if(this.initialized) return; + this.initialized = true; + this.callback = callback; + this.grid = grid; + bodyElement.appendChild(this.element.dom); + this.initEvents(); + }, + + initEvents : function(){ + var stopOnEnter = function(e){ + if(e.browserEvent.keyCode == e.RETURN){ + this.stopEditing(true); + } + } + this.element.mon('keydown', stopOnEnter, this, true); + this.element.on('blur', this.stopEditing, this, true); + }, + + startEditing : function(value, row, cell){ + this.originalValue = value; + this.rowIndex = row.rowIndex; + this.colIndex = cell.columnIndex; + this.cell = cell; + this.setValue(value); + var cellbox = getEl(cell, true).getBox(); + this.fitToCell(cellbox); + this.editing = true; + this.show(); + }, + + stopEditing : function(focusCell){ + if(this.editing){ + this.editing = false; + var newValue = this.getValue(); + this.hide(); + //if(focusCell){try{this.cell.focus();}catch(e){}}; // try to give the cell focus so keyboard nav still works + if(this.originalValue != newValue){ + this.callback(newValue, this.rowIndex, this.colIndex); + } + } + }, + + setValue : function(value){ + this.element.dom.value = value; + }, + + getValue : function(){ + return this.element.dom.value; + }, + + fitToCell : function(box){ + this.element.setBox(box, true); + }, + + show : function(){ + this.element.show(); + this.element.focus(); + }, + + hide : function(){ + try{ + this.element.dom.blur(); + }catch(e){} + this.element.hide(); + } +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/CheckboxEditor.js b/www/extras/yui-ext/source/grid/editor/CheckboxEditor.js new file mode 100644 index 000000000..70fe72f45 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/CheckboxEditor.js @@ -0,0 +1,58 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + + +YAHOO.ext.grid.CheckboxEditor = function(){ + var div = document.createElement('span'); + div.className = 'ygrid-editor ygrid-checkbox-editor'; + var cb = document.createElement('input'); + cb.type = 'checkbox'; + cb.setAttribute('autocomplete', 'off'); + div.appendChild(cb); + document.body.appendChild(div); + YAHOO.ext.grid.CheckboxEditor.superclass.constructor.call(this, div); + div.tabIndex = ''; + cb.tabIndex = 1; + this.cb = getEl(cb, true); +}; + +YAHOO.extendX(YAHOO.ext.grid.CheckboxEditor, YAHOO.ext.grid.CellEditor); + +YAHOO.ext.grid.CheckboxEditor.prototype.fitToCell = function(box){ + this.element.setBox(box, true); +}; + +YAHOO.ext.grid.CheckboxEditor.prototype.setValue = function(value){ + this.cb.dom.checked = (value === true || value === 'true' || value === 1 || value === '1'); +}; + +YAHOO.ext.grid.CheckboxEditor.prototype.getValue = function(){ + return this.cb.dom.checked; +}; + +YAHOO.ext.grid.CheckboxEditor.prototype.show = function(){ + this.element.show(); + this.cb.focus(); +}; + +YAHOO.ext.grid.CheckboxEditor.prototype.initEvents = function(){ + var stopOnEnter = function(e){ + if(e.browserEvent.keyCode == e.RETURN){ + this.stopEditing(true); + } + } + this.cb.mon('keydown', stopOnEnter, this, true); + this.cb.on('blur', this.stopEditing, this, true); +}; + +YAHOO.ext.grid.CheckboxEditor.prototype.hide = function(){ + try{ + this.cb.dom.blur(); + }catch(e){} + this.element.hide(); +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/DateEditor.js b/www/extras/yui-ext/source/grid/editor/DateEditor.js new file mode 100644 index 000000000..395d97820 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/DateEditor.js @@ -0,0 +1,248 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.grid.DateEditor = function(config){ + var div = document.createElement('span'); + div.className = 'ygrid-editor ygrid-editor-container'; + + var element = document.createElement('input'); + element.type = 'text'; + element.tabIndex = 1; + element.setAttribute('autocomplete', 'off'); + div.appendChild(element); + + var pick = document.createElement('span'); + pick.className = 'pick-button'; + div.appendChild(pick); + + document.body.appendChild(div); + + this.div = getEl(div, true); + this.element = getEl(element, true); + this.pick = getEl(pick, true); + + this.colIndex = null; + this.rowIndex = null; + this.grid = null; + this.editing = false; + this.originalValue = null; + this.initialized = false; + this.callback = null; + + this.cal = null; + this.mouseDownHandler = YAHOO.ext.EventManager.wrap(this.handleMouseDown, this, true); + + YAHOO.ext.util.Config.apply(this, config); + if(typeof this.minValue == 'string') this.minValue = this.parseDate(this.minValue); + if(typeof this.maxValue == 'string') this.maxValue = this.parseDate(this.maxValue); + this.ddMatch = /ddnone/; + if(this.disabledDates){ + var dd = this.disabledDates; + var re = "(?:"; + for(var i = 0; i < dd.length; i++){ + re += dd[i]; + if(i != dd.length-1) re += "|"; + } + this.ddMatch = new RegExp(re + ")"); + } +}; + +YAHOO.ext.grid.DateEditor.prototype = { + init : function(grid, bodyElement, callback){ + if(this.initialized) return; + + this.initialized = true; + this.callback = callback; + this.grid = grid; + bodyElement.appendChild(this.div.dom); + this.initEvents(); + }, + + initEvents : function(){ + var stopOnEnter = function(e){ + if(e.browserEvent.keyCode == e.RETURN){ + this.stopEditing(true); + } + } + this.element.mon('keydown', stopOnEnter, this, true); + var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this); + this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay])); + this.pick.on('click', this.showCalendar, this, true); + }, + + startEditing : function(value, row, cell){ + this.originalValue = value; + this.rowIndex = row.rowIndex; + this.colIndex = cell.columnIndex; + this.cell = cell; + this.setValue(value); + this.validate(); + var cellbox = getEl(cell, true).getBox(); + this.div.setBox(cellbox, true); + this.element.setWidth(cellbox.width-this.pick.getWidth()); + this.editing = true; + YAHOO.util.Event.on(document, "mousedown", this.mouseDownHandler); + this.show(); + }, + + stopEditing : function(focusCell){ + if(this.editing){ + YAHOO.util.Event.removeListener(document, "mousedown", this.mouseDownHandler); + this.editing = false; + var newValue = this.getValue(); + this.hide(); + //if(focusCell){try{this.cell.focus();}catch(e){}}// try to give the cell focus so keyboard nav still works + if(this.originalValue != newValue){ + this.callback(newValue, this.rowIndex, this.colIndex); + } + } + }, + + setValue : function(value){ + this.element.dom.value = this.formatDate(value); + this.validate(); + }, + + getValue : function(){ + if(!this.validate()){ + return this.originalValue; + }else{ + var value = this.element.dom.value; + if(value.length < 1){ + return value; + } else{ + return this.parseDate(value); + } + } + }, + + show : function() { + this.div.show(); + this.element.focus(); + this.validate(); + }, + + hide : function(){ + try{ + this.element.dom.blur(); + }catch(e){} + this.div.hide(); + }, + + validate : function(){ + var dom = this.element.dom; + var value = dom.value; + if(value.length < 1){ // if it's blank + if(this.allowBlank){ + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; + }else{ + dom.title = this.blankText; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + } + value = this.parseDate(value); + if(!value){ + dom.title = this.invalidText.replace('%0', dom.value).replace('%1', this.format); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + var time = value.getTime(); + if(this.minValue && time < this.minValue.getTime()){ + dom.title = this.minText.replace('%0', this.formatDate(this.minValue)); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + if(this.maxValue && time > this.maxValue.getTime()){ + dom.title = this.maxText.replace('%0', this.formatDate(this.maxValue)); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + if(this.disabledDays){ + var day = value.getDay(); + for(var i = 0; i < this.disabledDays.length; i++) { + if(day === this.disabledDays[i]){ + dom.title = this.disabledDaysText; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + } + } + var fvalue = this.formatDate(value); + if(this.ddMatch.test(fvalue)){ + dom.title = this.disabledDatesText.replace('%0', fvalue); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + var msg = this.validator(value); + if(msg !== true){ + dom.title = msg; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; + }, + + handleMouseDown : function(e){ + var t = e.getTarget(); + var dom = this.div.dom; + if(t != dom && !YAHOO.util.Dom.isAncestor(dom, t)){ + this.stopEditing(); + } + }, + + showCalendar : function(value){ + if(this.cal == null){ + this.cal = new YAHOO.ext.DatePicker(this.div.dom.parentNode.parentNode); + } + this.cal.minDate = this.minValue; + this.cal.maxDate = this.maxValue; + this.cal.disabledDatesRE = this.ddMatch; + this.cal.disabledDatesText = this.disabledDatesText; + this.cal.disabledDays = this.disabledDays; + this.cal.disabledDaysText = this.disabledDaysText; + this.cal.format = this.format; + if(this.minValue){ + this.cal.minText = this.minText.replace('%0', this.formatDate(this.minValue)); + } + if(this.maxValue){ + this.cal.maxText = this.maxText.replace('%0', this.formatDate(this.maxValue)); + } + var r = this.div.getRegion(); + this.cal.show(r.left, r.bottom, this.getValue(), this.setValue.createDelegate(this)); + }, + + parseDate : function(value){ + if(!value || value instanceof Date) return value; + return Date.parseDate(value, this.format); + }, + + formatDate : function(date){ + if(!date || !(date instanceof Date)) return date; + return date.format(this.format); + } +}; + +YAHOO.ext.grid.DateEditor.prototype.format = 'm/d/y'; +YAHOO.ext.grid.DateEditor.prototype.disabledDays = null; +YAHOO.ext.grid.DateEditor.prototype.disabledDaysText = ''; +YAHOO.ext.grid.DateEditor.prototype.disabledDates = null; +YAHOO.ext.grid.DateEditor.prototype.disabledDatesText = ''; +YAHOO.ext.grid.DateEditor.prototype.allowBlank = true; +YAHOO.ext.grid.DateEditor.prototype.minValue = null; +YAHOO.ext.grid.DateEditor.prototype.maxValue = null; +YAHOO.ext.grid.DateEditor.prototype.minText = 'The date in this field must be after %0'; +YAHOO.ext.grid.DateEditor.prototype.maxText = 'The date in this field must be before %0'; +YAHOO.ext.grid.DateEditor.prototype.blankText = 'This field cannot be blank'; +YAHOO.ext.grid.DateEditor.prototype.invalidText = '%0 is not a valid date - it must be in the format %1'; +YAHOO.ext.grid.DateEditor.prototype.validationDelay = 200; +YAHOO.ext.grid.DateEditor.prototype.validator = function(){return true;}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/NumberEditor.js b/www/extras/yui-ext/source/grid/editor/NumberEditor.js new file mode 100644 index 000000000..9d1c2e3a0 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/NumberEditor.js @@ -0,0 +1,145 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.grid.NumberEditor = function(config){ + var element = document.createElement('input'); + element.type = 'text'; + element.className = 'ygrid-editor ygrid-num-editor'; + element.setAttribute('autocomplete', 'off'); + document.body.appendChild(element); + YAHOO.ext.grid.NumberEditor.superclass.constructor.call(this, element); + YAHOO.ext.util.Config.apply(this, config); +}; +YAHOO.extendX(YAHOO.ext.grid.NumberEditor, YAHOO.ext.grid.CellEditor); + +YAHOO.ext.grid.NumberEditor.prototype.initEvents = function(){ + var stopOnEnter = function(e){ + if(e.browserEvent.keyCode == e.RETURN){ + this.stopEditing(true); + } + }; + + var allowed = "0123456789"; + if(this.allowDecimals){ + allowed += this.decimalSeparator; + } + if(this.allowNegative){ + allowed += '-'; + } + var keyPress = function(e){ + var c = e.getCharCode(); + if(c != e.BACKSPACE && allowed.indexOf(String.fromCharCode(c)) === -1){ + e.stopEvent(); + } + }; + this.element.mon('keydown', stopOnEnter, this, true); + var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this); + this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay])); + this.element.mon('keypress', keyPress, this, true); + this.element.on('blur', this.stopEditing, this, true); +}; + +YAHOO.ext.grid.NumberEditor.prototype.validate = function(){ + var dom = this.element.dom; + var value = dom.value; + if(value.length < 1){ // if it's blank + if(this.allowBlank){ + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; + }else{ + dom.title = this.blankText; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + } + if(value.search(/\d+/) === -1){ + dom.title = this.nanText.replace('%0', value); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + var num = this.parseValue(value); + if(num < this.minValue){ + dom.title = this.minText.replace('%0', this.minValue); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + if(num > this.maxValue){ + dom.title = this.maxText.replace('%0', this.maxValue); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + var msg = this.validator(value); + if(msg !== true){ + dom.title = msg; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; +}; + +YAHOO.ext.grid.NumberEditor.prototype.show = function(){ + this.element.dom.title = ''; + YAHOO.ext.grid.NumberEditor.superclass.show.call(this); + if(this.selectOnFocus){ + try{ + this.element.dom.select(); + }catch(e){} + } + this.validate(this.element.dom.value); +}; + +YAHOO.ext.grid.NumberEditor.prototype.getValue = function(){ + if(!this.validate()){ + return this.originalValue; + }else{ + var value = this.element.dom.value; + if(value.length < 1){ + return value; + } else{ + return this.fixPrecision(this.parseValue(value)); + } + } +}; +YAHOO.ext.grid.NumberEditor.prototype.parseValue = function(value){ + return parseFloat(new String(value).replace(this.decimalSeparator, '.')); +}; + +YAHOO.ext.grid.NumberEditor.prototype.fixPrecision = function(value){ + if(!this.allowDecimals || this.decimalPrecision == -1 || isNaN(value) || value == 0 || !value){ + return value; + } + // this should work but doesn't due to precision error in JS + // var scale = Math.pow(10, this.decimalPrecision); + // var fixed = this.decimalPrecisionFcn(value * scale); + // return fixed / scale; + // + // so here's our workaround: + var scale = Math.pow(10, this.decimalPrecision+1); + var fixed = this.decimalPrecisionFcn(value * scale); + fixed = this.decimalPrecisionFcn(fixed/10); + return fixed / (scale/10); +}; + +YAHOO.ext.grid.NumberEditor.prototype.allowBlank = true; +YAHOO.ext.grid.NumberEditor.prototype.allowDecimals = true; +YAHOO.ext.grid.NumberEditor.prototype.decimalSeparator = '.'; +YAHOO.ext.grid.NumberEditor.prototype.decimalPrecision = 2; +YAHOO.ext.grid.NumberEditor.prototype.decimalPrecisionFcn = Math.floor; +YAHOO.ext.grid.NumberEditor.prototype.allowNegative = true; +YAHOO.ext.grid.NumberEditor.prototype.selectOnFocus = true; +YAHOO.ext.grid.NumberEditor.prototype.minValue = Number.NEGATIVE_INFINITY; +YAHOO.ext.grid.NumberEditor.prototype.maxValue = Number.MAX_VALUE; +YAHOO.ext.grid.NumberEditor.prototype.minText = 'The minimum value for this field is %0'; +YAHOO.ext.grid.NumberEditor.prototype.maxText = 'The maximum value for this field is %0'; +YAHOO.ext.grid.NumberEditor.prototype.blankText = 'This field cannot be blank'; +YAHOO.ext.grid.NumberEditor.prototype.nanText = '%0 is not a valid number'; +YAHOO.ext.grid.NumberEditor.prototype.validationDelay = 100; +YAHOO.ext.grid.NumberEditor.prototype.validator = function(){return true;}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/SelectEditor.js b/www/extras/yui-ext/source/grid/editor/SelectEditor.js new file mode 100644 index 000000000..a25f122b6 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/SelectEditor.js @@ -0,0 +1,20 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.grid.SelectEditor = function(element){ + element.hideFocus = true; + YAHOO.ext.grid.SelectEditor.superclass.constructor.call(this, element); +}; +YAHOO.extendX(YAHOO.ext.grid.SelectEditor, YAHOO.ext.grid.CellEditor); + +YAHOO.ext.grid.SelectEditor.prototype.fitToCell = function(box){ + if(YAHOO.ext.util.Browser.isGecko){ + box.height -= 3; + } + this.element.setBox(box, true); +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/grid/editor/TextEditor.js b/www/extras/yui-ext/source/grid/editor/TextEditor.js new file mode 100644 index 000000000..efcc863c8 --- /dev/null +++ b/www/extras/yui-ext/source/grid/editor/TextEditor.js @@ -0,0 +1,96 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.grid.TextEditor = function(config){ + var element = document.createElement('input'); + element.type = 'text'; + element.className = 'ygrid-editor ygrid-text-editor'; + element.setAttribute('autocomplete', 'off'); + document.body.appendChild(element); + YAHOO.ext.grid.TextEditor.superclass.constructor.call(this, element); + YAHOO.ext.util.Config.apply(this, config); +}; +YAHOO.extendX(YAHOO.ext.grid.TextEditor, YAHOO.ext.grid.CellEditor); + +YAHOO.ext.grid.TextEditor.prototype.validate = function(){ + var dom = this.element.dom; + var value = dom.value; + if(value.length < 1){ // if it's blank + if(this.allowBlank){ + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; + }else{ + dom.title = this.blankText; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + } + if(value.length < this.minLength){ + dom.title = this.minText.replace('%0', this.minLength); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + if(value.length > this.maxLength){ + dom.title = this.maxText.replace('%0', this.maxLength); + this.element.addClass('ygrid-editor-invalid'); + return false; + } + var msg = this.validator(value); + if(msg !== true){ + dom.title = msg; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + if(this.regex && !this.regex.test(value)){ + dom.title = this.regexText; + this.element.addClass('ygrid-editor-invalid'); + return false; + } + dom.title = ''; + this.element.removeClass('ygrid-editor-invalid'); + return true; +}; + +YAHOO.ext.grid.TextEditor.prototype.initEvents = function(){ + YAHOO.ext.grid.TextEditor.superclass.initEvents.call(this); + var vtask = new YAHOO.ext.util.DelayedTask(this.validate, this); + this.element.mon('keyup', vtask.delay.createDelegate(vtask, [this.validationDelay])); +}; + +YAHOO.ext.grid.TextEditor.prototype.show = function(){ + this.element.dom.title = ''; + YAHOO.ext.grid.TextEditor.superclass.show.call(this); + this.element.focus(); + if(this.selectOnFocus){ + try{ + this.element.dom.select(); + }catch(e){} + } + this.validate(this.element.dom.value); +}; + +YAHOO.ext.grid.TextEditor.prototype.getValue = function(){ + if(!this.validate()){ + return this.originalValue; + }else{ + return this.element.dom.value; + } +}; + +YAHOO.ext.grid.TextEditor.prototype.allowBlank = true; +YAHOO.ext.grid.TextEditor.prototype.minLength = 0; +YAHOO.ext.grid.TextEditor.prototype.maxLength = Number.MAX_VALUE; +YAHOO.ext.grid.TextEditor.prototype.minText = 'The minimum length for this field is %0'; +YAHOO.ext.grid.TextEditor.prototype.maxText = 'The maximum length for this field is %0'; +YAHOO.ext.grid.TextEditor.prototype.selectOnFocus = true; +YAHOO.ext.grid.TextEditor.prototype.blankText = 'This field cannot be blank'; +YAHOO.ext.grid.TextEditor.prototype.validator = function(){return true;}; +YAHOO.ext.grid.TextEditor.prototype.validationDelay = 200; +YAHOO.ext.grid.TextEditor.prototype.regex = null; +YAHOO.ext.grid.TextEditor.prototype.regexText = ''; \ No newline at end of file diff --git a/www/extras/yui-ext/source/widgets/DatePicker.js b/www/extras/yui-ext/source/widgets/DatePicker.js new file mode 100644 index 000000000..bd648af7b --- /dev/null +++ b/www/extras/yui-ext/source/widgets/DatePicker.js @@ -0,0 +1,340 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +YAHOO.ext.DatePicker = function(id, parentElement){ + this.id = id; + this.selectedDate = new Date(); + this.visibleDate = new Date(); + this.element = null; + this.shadow = null; + this.callback = null; + this.buildControl(parentElement || document.body); + this.mouseDownHandler = YAHOO.ext.EventManager.wrap(this.handleMouseDown, this, true); + this.keyDownHandler = YAHOO.ext.EventManager.wrap(this.handleKeyDown, this, true); + this.wheelHandler = YAHOO.ext.EventManager.wrap(this.handleMouseWheel, this, true); +}; + +YAHOO.ext.DatePicker.prototype = { + show : function(x, y, value, callback){ + this.hide(); + this.selectedDate = value; + this.visibleDate = value; + this.callback = callback; + this.refresh(); + this.element.show(); + this.element.moveTo(x, y); + this.shadow.show(); + this.shadow.setRegion(this.element.getRegion()); + this.element.dom.tabIndex = 1; + this.element.focus(); + YAHOO.util.Event.on(document, "mousedown", this.mouseDownHandler); + YAHOO.util.Event.on(document, "keydown", this.keyDownHandler); + YAHOO.util.Event.on(document, "mousewheel", this.wheelHandler); + YAHOO.util.Event.on(document, "DOMMouseScroll", this.wheelHandler); + }, + + hide : function(){ + this.shadow.hide(); + this.element.hide(); + YAHOO.util.Event.removeListener(document, "mousedown", this.mouseDownHandler); + YAHOO.util.Event.removeListener(document, "keydown", this.keyDownHandler); + YAHOO.util.Event.removeListener(document, "mousewheel", this.wheelHandler); + YAHOO.util.Event.removeListener(document, "DOMMouseScroll", this.wheelHandler); + }, + + setSelectedDate : function(date){ + this.selectedDate = date; + }, + + getSelectedDate : function(){ + return this.selectedDate; + }, + + showPrevMonth : function(){ + this.visibleDate = this.getPrevMonth(this.visibleDate); + this.refresh(); + }, + + showNextMonth : function(){ + this.visibleDate = this.getNextMonth(this.visibleDate); + this.refresh(); + }, + + showPrevYear : function(){ + var d = this.visibleDate; + this.visibleDate = new Date(d.getFullYear()-1, d.getMonth(), d.getDate()); + this.refresh(); + }, + + showNextYear : function(){ + var d = this.visibleDate; + this.visibleDate = new Date(d.getFullYear()+1, d.getMonth(), d.getDate()); + this.refresh(); + }, + + handleMouseDown : function(e){ + var target = e.getTarget(); + if(target != this.element.dom && !YAHOO.util.Dom.isAncestor(this.element.dom, target)){ + this.hide(); + } + }, + + handleKeyDown : function(e){ + switch(e.browserEvent.keyCode){ + case e.LEFT: + this.showPrevMonth(); + e.stopEvent(); + break; + case e.RIGHT: + this.showNextMonth(); + e.stopEvent(); + break; + case e.DOWN: + this.showPrevYear(); + e.stopEvent(); + break; + case e.UP: + this.showNextYear(); + e.stopEvent(); + break; + } + }, + + handleMouseWheel : function(e){ + var delta = e.getWheelDelta(); + if(delta > 0){ + this.showPrevMonth(); + e.stopEvent(); + } else if(delta < 0){ + this.showNextMonth(); + e.stopEvent(); + } + }, + + handleClick : function(e){ + var d = this.visibleDate; + var t = e.getTarget(); + if(t && t.className){ + switch(t.className){ + case 'active': + this.handleSelection(new Date(d.getFullYear(), d.getMonth(), parseInt(t.innerHTML))); + break; + case 'prevday': + var p = this.getPrevMonth(d); + this.handleSelection(new Date(p.getFullYear(), p.getMonth(), parseInt(t.innerHTML))); + break; + case 'nextday': + var n = this.getNextMonth(d); + this.handleSelection(new Date(n.getFullYear(), n.getMonth(), parseInt(t.innerHTML))); + break; + case 'ypopcal-today': + this.handleSelection(new Date()); + break; + case 'next-month': + this.showNextMonth(); + break; + case 'prev-month': + this.showPrevMonth(); + break; + } + } + e.stopEvent(); + }, + + selectToday : function(){ + this.handleSelection(new Date()); + }, + + handleSelection: function(date){ + this.selectedDate = date; + this.callback(date); + this.hide(); + }, + + getPrevMonth : function(d){ + var m = d.getMonth();var y = d.getFullYear(); + return (m == 0 ? new Date(--y, 11, 1) : new Date(y, --m, 1)); + }, + + getNextMonth : function(d){ + var m = d.getMonth();var y = d.getFullYear(); + return (m == 11 ? new Date(++y, 0, 1) : new Date(y, ++m, 1)); + }, + + getDaysInMonth : function(m, y){ + return (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) ? 31 : (m == 4 || m == 6 || m == 9 || m == 11) ? 30 : this.isLeapYear(y) ? 29 : 28; + }, + + isLeapYear : function(y){ + return (((y % 4) == 0) && ((y % 100) != 0) || ((y % 400) == 0)); + }, + + clearTime : function(date){ + if(date){ + date.setHours(0); + date.setMinutes(0); + date.setSeconds(0); + date.setMilliseconds(0); + } + return date; + }, + + refresh : function(){ + var d = this.visibleDate; + this.buildInnerCal(d); + this.calHead.update(this.monthNames[d.getMonth()] + ' ' + d.getFullYear()); + if(this.element.isVisible()){ + this.shadow.setRegion(this.element.getRegion()); + } + } +}; + +/** + * This code is not pretty, but it is fast! + * @ignore + */ +YAHOO.ext.DatePicker.prototype.buildControl = function(parentElement){ + var c = document.createElement('div'); + c.style.position = 'absolute'; + c.style.visibility = 'hidden'; + document.body.appendChild(c); + var html = '' + + ''; + c.innerHTML = html; + this.shadow = getEl(c.childNodes[0], true); + this.shadow.enableDisplayMode(); + this.element = getEl(c.childNodes[1], true); + this.element.enableDisplayMode(); + document.body.appendChild(this.shadow.dom); + document.body.appendChild(this.element.dom); + document.body.removeChild(c); + this.element.on("selectstart", function(){return false;}); + var tbody = this.element.dom.getElementsByTagName('tbody')[1]; + this.cells = tbody.getElementsByTagName('td'); + this.calHead = this.element.getChildrenByClassName('ypopcal-month', 'td')[0]; + this.element.mon('mousedown', this.handleClick, this, true); +}; + +YAHOO.ext.DatePicker.prototype.buildInnerCal = function(dateVal){ + var days = this.getDaysInMonth(dateVal.getMonth() + 1, dateVal.getFullYear()); + var firstOfMonth = new Date(dateVal.getFullYear(), dateVal.getMonth(), 1); + var startingPos = firstOfMonth.getDay(); + if(startingPos == 0) startingPos = 7; + var pm = this.getPrevMonth(dateVal); + var prevStart = this.getDaysInMonth(pm.getMonth()+1, pm.getFullYear())-startingPos; + var cells = this.cells; + days += startingPos; + + // convert everything to numbers so it's fast + var day = 86400000; + var date = this.clearTime(new Date(pm.getFullYear(), pm.getMonth(), prevStart)); + var today = this.clearTime(new Date()).getTime(); + var sel = this.selectedDate ? this.clearTime(this.selectedDate).getTime() : today + 1; //today +1 will never match anything + var min = this.minDate ? this.clearTime(this.minDate).getTime() : Number.NEGATIVE_INFINITY; + var max = this.maxDate ? this.clearTime(this.maxDate).getTime() : Number.POSITIVE_INFINITY; + var ddMatch = this.disabledDatesRE; + var ddText = this.disabledDatesText; + var ddays = this.disabledDays; + var ddaysText = this.disabledDaysText; + var format = this.format; + + var setCellClass = function(cal, cell, d){ + cell.title = ''; + var t = d.getTime(); + if(t == today){ + cell.className += ' today'; + cell.title = cal.todayText; + } + if(t == sel){ + cell.className += ' selected'; + } + // disabling + if(t < min) { + cell.className = ' ypopcal-disabled'; + cell.title = cal.minText; + return; + } + if(t > max) { + cell.className = ' ypopcal-disabled'; + cell.title = cal.maxText; + return; + } + if(ddays){ + var day = d.getDay(); + for(var i = 0; i < ddays.length; i++) { + if(day === ddays[i]){ + cell.title = ddaysText; + cell.className = ' ypopcal-disabled'; + return; + } + } + } + if(ddMatch && format){ + var fvalue = d.format(format); + if(ddMatch.test(fvalue)){ + cell.title = ddText.replace('%0', fvalue); + cell.className = ' ypopcal-disabled'; + return; + } + } + }; + + var i = 0; + for(; i < startingPos; i++) { + cells[i].innerHTML = (++prevStart); + date.setDate(date.getDate()+1); + cells[i].className = 'prevday'; + setCellClass(this, cells[i], date); + } + for(; i < days; i++){ + intDay = i - startingPos + 1; + cells[i].innerHTML = (intDay); + date.setDate(date.getDate()+1); + cells[i].className = 'active'; + setCellClass(this, cells[i], date); + } + var extraDays = 0; + for(; i < 42; i++) { + cells[i].innerHTML = (++extraDays); + date.setDate(date.getDate()+1); + cells[i].className = 'nextday'; + setCellClass(this, cells[i], date); + } +}; + +YAHOO.ext.DatePicker.prototype.todayText = "Today"; +YAHOO.ext.DatePicker.prototype.minDate = null; +YAHOO.ext.DatePicker.prototype.maxDate = null; +YAHOO.ext.DatePicker.prototype.minText = "This date is before the minimum date"; +YAHOO.ext.DatePicker.prototype.maxText = "This date is after the maximum date"; +YAHOO.ext.DatePicker.prototype.format = 'm/d/y'; +YAHOO.ext.DatePicker.prototype.disabledDays = null; +YAHOO.ext.DatePicker.prototype.disabledDaysText = ''; +YAHOO.ext.DatePicker.prototype.disabledDatesRE = null; +YAHOO.ext.DatePicker.prototype.disabledDatesText = ''; + + +YAHOO.ext.DatePicker.prototype.monthNames = Date.monthNames; + +YAHOO.ext.DatePicker.prototype.dayNames = Date.dayNames; \ No newline at end of file diff --git a/www/extras/yui-ext/source/widgets/Resizable.js b/www/extras/yui-ext/source/widgets/Resizable.js new file mode 100644 index 000000000..0003017ae --- /dev/null +++ b/www/extras/yui-ext/source/widgets/Resizable.js @@ -0,0 +1,222 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * Makes an element resizable. + */ +YAHOO.ext.Resizable = function(el, config){ + // in case global fcn not defined + var getEl = YAHOO.ext.Element.get; + + this.el = getEl(el, true); + this.el.autoBoxAdjust = true; + // if the element isn't positioned, make it relative + if(this.el.getStyle('position') != 'absolute'){ + this.el.setStyle('position', 'relative'); + } + + // create the handles and proxy + var dh = YAHOO.ext.DomHelper; + var tpl = dh.createTemplate({tag: 'div', cls: 'yresizable-handle yresizable-handle-{0}', html: ' '}); + this.east = getEl(tpl.append(this.el.dom, ['east']), true); + this.south = getEl(tpl.append(this.el.dom, ['south']), true); + if(config && config.multiDirectional){ + this.west = getEl(tpl.append(this.el.dom, ['west']), true); + this.north = getEl(tpl.append(this.el.dom, ['north']), true); + } + this.corner = getEl(tpl.append(this.el.dom, ['southeast']), true); + this.proxy = getEl(dh.insertBefore(document.body.firstChild, {tag: 'div', cls: 'yresizable-proxy', id: this.el.id + '-rzproxy'}), true); + this.proxy.autoBoxAdjust = true; + + // wrapped event handlers to add and remove when sizing + this.moveHandler = YAHOO.ext.EventManager.wrap(this.onMouseMove, this, true); + this.upHandler = YAHOO.ext.EventManager.wrap(this.onMouseUp, this, true); + this.selHandler = YAHOO.ext.EventManager.wrap(this.cancelSelection, this, true); + + // public events + this.events = { + 'beforeresize' : new YAHOO.util.CustomEvent(), + 'resize' : new YAHOO.util.CustomEvent() + }; + + /** @private */ + this.dir = null; + + // properties + this.resizeChild = false; + this.adjustments = [0, 0]; + this.minWidth = 5; + this.minHeight = 5; + this.maxWidth = 10000; + this.maxHeight = 10000; + this.enabled = true; + this.animate = false; + this.duration = .35; + this.dynamic = false; + this.multiDirectional = false; + this.disableTrackOver = false; + this.easing = YAHOO.util.Easing ? YAHOO.util.Easing.easeOutStrong : null; + + YAHOO.ext.util.Config.apply(this, config); + + // listen for mouse down on the handles + var mdown = this.onMouseDown.createDelegate(this); + this.east.mon('mousedown', mdown); + this.south.mon('mousedown', mdown); + if(this.multiDirectional){ + this.west.mon('mousedown', mdown); + this.north.mon('mousedown', mdown); + } + this.corner.mon('mousedown', mdown); + + if(!this.disableTrackOver){ + // track mouse overs + var mover = this.onMouseOver.createDelegate(this); + // track mouse outs + var mout = this.onMouseOut.createDelegate(this); + + this.east.mon('mouseover', mover); + this.east.mon('mouseout', mout); + this.south.mon('mouseover', mover); + this.south.mon('mouseout', mout); + if(this.multiDirectional){ + this.west.mon('mouseover', mover); + this.west.mon('mouseout', mout); + this.north.mon('mouseover', mover); + this.north.mon('mouseout', mout); + } + this.corner.mon('mouseover', mover); + this.corner.mon('mouseout', mout); + } + this.updateChildSize(); +}; + +YAHOO.extendX(YAHOO.ext.Resizable, YAHOO.ext.util.Observable, { + resizeTo : function(width, height){ + this.el.setSize(width, height); + this.fireEvent('resize', this, width, height, null); + }, + + cancelSelection : function(e){ + e.preventDefault(); + }, + + startSizing : function(e){ + this.fireEvent('beforeresize', this, e); + if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler + e.preventDefault(); + this.startBox = this.el.getBox(); + this.startPoint = e.getXY(); + this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], + (this.startBox.y + this.startBox.height) - this.startPoint[1]]; + this.proxy.setBox(this.startBox); + if(!this.dynamic){ + this.proxy.show(); + } + YAHOO.util.Event.on(document.body, 'selectstart', this.selHandler); + YAHOO.util.Event.on(document.body, 'mousemove', this.moveHandler); + YAHOO.util.Event.on(document.body, 'mouseup', this.upHandler); + } + }, + + onMouseDown : function(e){ + if(this.enabled){ + var t = e.getTarget(); + if(t == this.corner.dom){ + this.dir = 'both'; + this.proxy.setStyle('cursor', this.corner.getStyle('cursor')); + this.startSizing(e); + }else if(t == this.east.dom){ + this.dir = 'east'; + this.proxy.setStyle('cursor', this.east.getStyle('cursor')); + this.startSizing(e); + }else if(t == this.south.dom){ + this.dir = 'south'; + this.proxy.setStyle('cursor', this.south.getStyle('cursor')); + this.startSizing(e); + }else if(t == this.west.dom){ + this.dir = 'west'; + this.proxy.setStyle('cursor', this.west.getStyle('cursor')); + this.startSizing(e); + }else if(t == this.north.dom){ + this.dir = 'north'; + this.proxy.setStyle('cursor', this.north.getStyle('cursor')); + this.startSizing(e); + } + } + }, + + onMouseUp : function(e){ + YAHOO.util.Event.removeListener(document.body, 'selectstart', this.selHandler); + YAHOO.util.Event.removeListener(document.body, 'mousemove', this.moveHandler); + YAHOO.util.Event.removeListener(document.body, 'mouseup', this.upHandler); + var size = this.resizeElement(); + this.fireEvent('resize', this, size.width, size.height, e); + }, + + updateChildSize : function(){ + if(this.resizeChild && this.el.dom.firstChild && this.el.dom.offsetWidth){ + var el = this.el; + var adj = this.adjustments; + setTimeout(function(){ + var c = YAHOO.ext.Element.get(el.dom.firstChild, true); + var b = el.getBox(true); + c.setSize(b.width+adj[0], b.height+adj[1]); + }, 1); + } + }, + + resizeElement : function(){ + var box = this.proxy.getBox(); + this.el.setBox(box, false, this.animate, this.duration, null, this.easing); + this.updateChildSize(); + this.proxy.hide(); + return box; + }, + + onMouseMove : function(e){ + if(this.enabled){ + var xy = e.getXY(); + if(this.dir == 'both' || this.dir == 'east' || this.dir == 'south'){ + var w = Math.min(Math.max(this.minWidth, xy[0]-this.startBox.x+this.offsets[0]),this.maxWidth); + var h = Math.min(Math.max(this.minHeight, xy[1]-this.startBox.y+this.offsets[1]), this.maxHeight); + if(this.dir == 'both'){ + this.proxy.setSize(w, h); + }else if(this.dir == 'east'){ + this.proxy.setWidth(w); + }else if(this.dir == 'south'){ + this.proxy.setHeight(h); + } + }else{ + var x = this.startBox.x + (xy[0]-this.startPoint[0]); + var y = this.startBox.y + (xy[1]-this.startPoint[1]); + var w = this.startBox.width+(this.startBox.x-x); + var h = this.startBox.height+(this.startBox.y-y); + if(this.dir == 'west' && w <= this.maxWidth && w >= this.minWidth){ + this.proxy.setX(x); + this.proxy.setWidth(w); + }else if(this.dir == 'north' && h <= this.maxHeight && h >= this.minHeight){ + this.proxy.setY(y); + this.proxy.setHeight(h); + } + } + if(this.dynamic){ + this.resizeElement(); + } + } + }, + + onMouseOver : function(){ + if(this.enabled) this.el.addClass('yresizable-over'); + }, + + onMouseOut : function(){ + this.el.removeClass('yresizable-over'); + } +}); \ No newline at end of file diff --git a/www/extras/yui-ext/source/widgets/SplitBar.js b/www/extras/yui-ext/source/widgets/SplitBar.js new file mode 100644 index 000000000..f99db3963 --- /dev/null +++ b/www/extras/yui-ext/source/widgets/SplitBar.js @@ -0,0 +1,437 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/* + * splitbar.js, version .7 + * Copyright(c) 2006, Jack Slocum. + * Code licensed under the BSD License + */ + +YAHOO.util.DragDropMgr.clickTimeThresh = 350; + +/** + * @class Creates draggable splitter bar functionality from two elements. + *

+ * Usage: + *

+ * var split = new YAHOO.ext.SplitBar('elementToDrag', 'elementToSize', 
+ *                   YAHOO.ext.SplitBar.HORIZONTAL, YAHOO.ext.SplitBar.LEFT);
+ * split.setAdapter(new YAHOO.ext.SplitBar.AbsoluteLayoutAdapter("container"));
+ * split.minSize = 100;
+ * split.maxSize = 600;
+ * split.animate = true;
+ * split.onMoved.subscribe(splitterMoved);
+ * 
+ * @requires YAHOO.ext.Element + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.DDProxy + * @requires YAHOO.util.Anim (optional) to support animation + * @requires YAHOO.util.Easing (optional) to support animation + * @constructor + * @param {String/HTMLElement/Element} dragElement The element to be dragged and act as the SplitBar. + * @param {String/HTMLElement/Element} resizingElement The element to be resized based on where the SplitBar element is dragged + * @param {Number} orientation (optional) Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) + * @param {Number} placement (optional) Either YAHOO.ext.SplitBar.LEFT or YAHOO.ext.SplitBar.RIGHT for horizontal or + YAHOO.ext.SplitBar.TOP or YAHOO.ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the intial position + position of the SplitBar). + */ +YAHOO.ext.SplitBar = function(dragElement, resizingElement, orientation, placement){ + + /** @private */ + this.el = YAHOO.ext.Element.get(dragElement, true); + + /** @private */ + this.resizingEl = YAHOO.ext.Element.get(resizingElement, true); + + /** + * @private + * The orientation of the split. Either YAHOO.ext.SplitBar.HORIZONTAL or YAHOO.ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) + * Note: If this is changed after creating the SplitBar, the placement property must be manually updated + * @type Number + */ + this.orientation = orientation || YAHOO.ext.SplitBar.HORIZONTAL; + + /** + * The minimum size of the resizing element. (Defaults to 0) + * @type Number + */ + this.minSize = 0; + + /** + * The maximum size of the resizing element. (Defaults to 2000) + * @type Number + */ + this.maxSize = 2000; + + /** + * Fires when the SplitBar is moved. Uses fireDirect with signature: (this, newSize) + * @type CustomEvent + */ + this.onMoved = new YAHOO.util.CustomEvent("SplitBarMoved", this); + + /** + * Whether to animate the transition to the new size + * @type Boolean + */ + this.animate = false; + + /** + * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. + * @type Boolean + */ + this.useShim = false; + + /** @private */ + this.shim = null; + + /** @private */ + this.proxy = YAHOO.ext.SplitBar.createProxy(this.orientation); + + /** @private */ + this.dd = new YAHOO.util.DDProxy(this.el.dom.id, "SplitBars", {dragElId : this.proxy.id}); + + /** @private */ + this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this); + + /** @private */ + this.dd.endDrag = this.onEndProxyDrag.createDelegate(this); + + /** @private */ + this.dragSpecs = {}; + + /** + * @private The adapter to use to positon and resize elements + */ + this.adapter = new YAHOO.ext.SplitBar.BasicLayoutAdapter(); + this.adapter.init(this); + + if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + /** @private */ + this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? YAHOO.ext.SplitBar.LEFT : YAHOO.ext.SplitBar.RIGHT); + this.el.setStyle('cursor', 'e-resize'); + }else{ + /** @private */ + this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? YAHOO.ext.SplitBar.TOP : YAHOO.ext.SplitBar.BOTTOM); + this.el.setStyle('cursor', 'n-resize'); + } + + this.events = { + 'resize' : this.onMoved, + 'moved' : this.onMoved + } +} + +YAHOO.ext.SplitBar.prototype = { + fireEvent : YAHOO.ext.util.Observable.prototype.fireEvent, + addListener : YAHOO.ext.util.Observable.prototype.addListener, + delayedListener : YAHOO.ext.util.Observable.prototype.delayedListener, + removeListener : YAHOO.ext.util.Observable.prototype.removeListener, + /** + * @private Called before drag operation begins by the DDProxy + */ + onStartProxyDrag : function(x, y){ + if(this.useShim){ + if(!this.shim){ + this.shim = YAHOO.ext.SplitBar.createShim(); + } + this.shim.setVisible(true); + } + YAHOO.util.Dom.setStyle(this.proxy, 'display', 'block'); + var size = this.adapter.getElementSize(this); + var c1 = size - this.minSize; + var c2 = Math.max(this.maxSize - size, 0); + if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + this.dd.resetConstraints(); + this.dd.setXConstraint( + this.placement == YAHOO.ext.SplitBar.LEFT ? c1 : c2, + this.placement == YAHOO.ext.SplitBar.LEFT ? c2 : c1 + ); + this.dd.setYConstraint(0, 0); + }else{ + this.dd.resetConstraints(); + this.dd.setXConstraint(0, 0); + this.dd.setYConstraint( + this.placement == YAHOO.ext.SplitBar.TOP ? c1 : c2, + this.placement == YAHOO.ext.SplitBar.TOP ? c2 : c1 + ); + } + this.dragSpecs.startSize = size; + this.dragSpecs.startPoint = [x, y]; + + YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd, x, y); + }, + + /** + * @private Called after the drag operation by the DDProxy + */ + onEndProxyDrag : function(e){ + YAHOO.util.Dom.setStyle(this.proxy, 'display', 'none'); + var endPoint = YAHOO.util.Event.getXY(e); + if(this.useShim){ + this.shim.setVisible(false); + } + var newSize; + if(this.orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + newSize = this.dragSpecs.startSize + + (this.placement == YAHOO.ext.SplitBar.LEFT ? + endPoint[0] - this.dragSpecs.startPoint[0] : + this.dragSpecs.startPoint[0] - endPoint[0] + ); + }else{ + newSize = this.dragSpecs.startSize + + (this.placement == YAHOO.ext.SplitBar.TOP ? + endPoint[1] - this.dragSpecs.startPoint[1] : + this.dragSpecs.startPoint[1] - endPoint[1] + ); + } + newSize = Math.min(Math.max(newSize, this.minSize), this.maxSize); + if(newSize != this.dragSpecs.startSize){ + this.adapter.setElementSize(this, newSize); + this.onMoved.fireDirect(this, newSize); + } + }, + + /** + * Get the adapter this SplitBar uses + * @return The adapter object + */ + getAdapter : function(){ + return this.adapter; + }, + + /** + * Set the adapter this SplitBar uses + * @param {Object} adapter A SplitBar adapter object + */ + setAdapter : function(adapter){ + this.adapter = adapter; + this.adapter.init(this); + }, + + /** + * Gets the minimum size for the resizing element + * @return {Number} The minimum size + */ + getMinimumSize : function(){ + return this.minSize; + }, + + /** + * Sets the minimum size for the resizing element + * @param {Number} minSize The minimum size + */ + setMinimumSize : function(minSize){ + this.minSize = minSize; + }, + + /** + * Gets the maximum size for the resizing element + * @return {Number} The maximum size + */ + getMaximumSize : function(){ + return this.maxSize; + }, + + /** + * Sets the maximum size for the resizing element + * @param {Number} maxSize The maximum size + */ + setMaximumSize : function(maxSize){ + this.maxSize = maxSize; + }, + + /** + * Sets the initialize size for the resizing element + * @param {Number} size The initial size + */ + setCurrentSize : function(size){ + var oldAnimate = this.animate; + this.animate = false; + this.adapter.setElementSize(this, size); + this.animate = oldAnimate; + } +}; + +/** + * @private static Create the shim to drag over iframes + */ +YAHOO.ext.SplitBar.createShim = function(){ + var shim = document.createElement('div'); + YAHOO.util.Dom.generateId(shim, 'split-shim'); + YAHOO.util.Dom.setStyle(shim, 'width', '100%'); + YAHOO.util.Dom.setStyle(shim, 'height', '100%'); + YAHOO.util.Dom.setStyle(shim, 'position', 'absolute'); + YAHOO.util.Dom.setStyle(shim, 'background', 'white'); + YAHOO.util.Dom.setStyle(shim, 'visibility', 'hidden'); + YAHOO.util.Dom.setStyle(shim, 'z-index', 2); + window.document.body.appendChild(shim); + var shimEl = YAHOO.ext.Element.get(shim); + shimEl.setOpacity(.01); + shimEl.setXY([0, 0]); + return shimEl; +} + +/** + * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color. + */ +YAHOO.ext.SplitBar.createProxy = function(orientation){ + var proxy = document.createElement('div'); + YAHOO.util.Dom.generateId(proxy, 'split-proxy'); + YAHOO.util.Dom.setStyle(proxy, 'position', 'absolute'); + YAHOO.util.Dom.setStyle(proxy, 'visibility', 'hidden'); + YAHOO.util.Dom.setStyle(proxy, 'z-index', 999); + YAHOO.util.Dom.setStyle(proxy, 'background-color', "#aaa"); + if(orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + YAHOO.util.Dom.setStyle(proxy, 'cursor', 'e-resize'); + }else{ + YAHOO.util.Dom.setStyle(proxy, 'cursor', 'n-resize'); + } + // the next 2 fix IE abs position div height problem + YAHOO.util.Dom.setStyle(proxy, 'line-height', '0px'); + YAHOO.util.Dom.setStyle(proxy, 'font-size', '0px'); + window.document.body.appendChild(proxy); + return proxy; +} + +/** + * @class + * Default Adapter. It assumes the splitter and resizing element are not positioned + * elements and only gets/sets the width of the element. Generally used for table based layouts. + */ +YAHOO.ext.SplitBar.BasicLayoutAdapter = function(){ +} + +YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype = { + // do nothing for now + init : function(s){ + + }, + /** + * Called before drag operations to get the current size of the resizing element. + * @param {YAHOO.ext.SplitBar} s The SplitBar using this adapter + */ + getElementSize : function(s){ + if(s.orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + return s.resizingEl.getWidth(); + }else{ + return s.resizingEl.getHeight(); + } + }, + + /** + * Called after drag operations to set the size of the resizing element. + * @param {YAHOO.ext.SplitBar} s The SplitBar using this adapter + * @param {Number} newSize The new size to set + * @param {Function} onComplete A function to be invoke when resizing is complete + */ + setElementSize : function(s, newSize, onComplete){ + if(s.orientation == YAHOO.ext.SplitBar.HORIZONTAL){ + if(!YAHOO.util.Anim || !s.animate){ + s.resizingEl.setWidth(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setWidth(newSize, true, .1, onComplete, YAHOO.util.Easing.easeOut); + } + }else{ + + if(!YAHOO.util.Anim || !s.animate){ + s.resizingEl.setHeight(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setHeight(newSize, true, .1, onComplete, YAHOO.util.Easing.easeOut); + } + } + } +}; + +/** + *@class + * Adapter that moves the splitter element to align with the resized sizing element. + * Used with an absolute positioned SplitBar. + * @param {String/HTMLElement/Element} container The container that wraps around the absolute positioned content. If it's + * document.body, make sure you assign an id to the body element. + */ +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter = function(container){ + this.basic = new YAHOO.ext.SplitBar.BasicLayoutAdapter(); + this.container = getEl(container); +} + +YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype = { + init : function(s){ + this.basic.init(s); + //YAHOO.util.Event.on(window, 'resize', this.moveSplitter.createDelegate(this, [s])); + }, + + getElementSize : function(s){ + return this.basic.getElementSize(s); + }, + + setElementSize : function(s, newSize, onComplete){ + this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); + }, + + moveSplitter : function(s){ + var yes = YAHOO.ext.SplitBar; + switch(s.placement){ + case yes.LEFT: + s.el.setX(s.resizingEl.getRight()); + break; + case yes.RIGHT: + s.el.setStyle('right', (this.container.getWidth() - s.resizingEl.getLeft()) + 'px'); + break; + case yes.TOP: + s.el.setY(s.resizingEl.getBottom()); + break; + case yes.BOTTOM: + s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); + break; + } + } +}; + +/** + * Orientation constant - Create a vertical SplitBar + * @type Number + */ +YAHOO.ext.SplitBar.VERTICAL = 1; + +/** + * Orientation constant - Create a horizontal SplitBar + * @type Number + */ +YAHOO.ext.SplitBar.HORIZONTAL = 2; + +/** + * Placement constant - The resizing element is to the left of the splitter element + * @type Number + */ +YAHOO.ext.SplitBar.LEFT = 1; + +/** + * Placement constant - The resizing element is to the right of the splitter element + * @type Number + */ +YAHOO.ext.SplitBar.RIGHT = 2; + +/** + * Placement constant - The resizing element is positioned above the splitter element + * @type Number + */ +YAHOO.ext.SplitBar.TOP = 3; + +/** + * Placement constant - The resizing element is positioned under splitter element + * @type Number + */ +YAHOO.ext.SplitBar.BOTTOM = 4; diff --git a/www/extras/yui-ext/source/widgets/TabPanel.js b/www/extras/yui-ext/source/widgets/TabPanel.js new file mode 100644 index 000000000..20134e4ed --- /dev/null +++ b/www/extras/yui-ext/source/widgets/TabPanel.js @@ -0,0 +1,394 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/* + tabpanel.js, version .1 + Copyright(c) 2006, Jack Slocum. + Code licensed under the BSD License +*/ + +/** + * @class Creates a lightweight TabPanel component using Yahoo! UI. + *

+ * Usage: + *

+    // basic tabs 1, built from existing content
+    var tabs = new YAHOO.ext.TabPanel('tabs1');
+    tabs.addTab('script', "View Script");
+    tabs.addTab('markup', "View Markup");
+    tabs.activate('script');
+    
+    // more advanced tabs, built from javascript
+    var jtabs = new YAHOO.ext.TabPanel('jtabs');
+    jtabs.addTab('jtabs-1', "Normal Tab", "My content was added during construction.");
+    
+    // set up the UpdateManager
+    var tab2 = jtabs.addTab('jtabs-2', "Ajax Tab 1");
+    var updater = tab2.getUpdateManager();
+    updater.setDefaultUrl('ajax1.htm');
+    tab2.onActivate.subscribe(updater.refresh, updater, true);
+    
+    // Use setUrl for Ajax loading
+    var tab3 = jtabs.addTab('jtabs-3', "Ajax Tab 2");
+    tab3.setUrl('ajax2.htm', null, true);
+    
+    // Disabled tab
+    var tab4 = jtabs.addTab('tabs1-5', "Disabled Tab", "Can't see me cause I'm disabled");
+    tab4.disable();
+    
+    jtabs.activate('jtabs-1');
+}
+ * 
+ * @requires YAHOO.ext.Element + * @requires YAHOO.ext.UpdateManager + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @requires YAHOO.util.DDProxy + * @requires YAHOO.util.Connect (optional) + * @constructor + * Create new TabPanel. + * @param {String/HTMLElement/Element} container The id, DOM element or YAHOO.ext.Element container where this TabPanel is to be rendered. + */ +YAHOO.ext.TabPanel = function(container, onBottom){ + /** + * The container element for this TabPanel. + * @type YAHOO.ext.Element + */ + this.el = getEl(container); + if(onBottom){ + this.bodyEl = getEl(this.createBody(this.el.dom)); + this.el.addClass('ytabs-bottom'); + } + /** @private */ + this.stripWrap = getEl(this.createStrip(this.el.dom)); + /** @private */ + this.stripEl = getEl(this.createStripList(this.stripWrap.dom)); + /** The body element that contains TabPaneItem bodies. + * @type YAHOO.ext.Element + */ + if(!onBottom){ + this.bodyEl = getEl(this.createBody(this.el.dom)); + } + /** @private */ + this.items = {}; + /** @private */ + this.active = null; + /** + * Fires when the active TabPanelItem changes. Uses fireDirect with signature: (TabPanel this, TabPanelItem activedTab). + * @type CustomEvent + */ + this.onTabChange = new YAHOO.util.CustomEvent('TabItem.onTabChange'); + /** @private */ + this.activateDelegate = this.activate.createDelegate(this); +} + +YAHOO.ext.TabPanel.prototype = { + /** + * Creates a new TabPanelItem by looking for an existing element with the provided id - if it's not found it creates one. + * @param {String} id The id of the div to use or create + * @param {String} text The text for the tab + * @param {String} content (optional) Content to put in the TabPanelItem body + * @return {YAHOO.ext.TabPanelItem} The created TabPanelItem + */ + addTab : function(id, text, content){ + var item = new YAHOO.ext.TabPanelItem(this, id, text); + this.addTabItem(item); + if(content){ + item.setContent(content); + } + return item; + }, + + /** + * Returns the TabPanelItem with the specified id + * @param {String} id The id of the TabPanelItem to fetch. + * @return {YAHOO.ext.TabPanelItem} + */ + getTab : function(id){ + return this.items[id]; + }, + + /** + * Add an existing TabPanelItem. + * @param {YAHOO.ext.TabPanelItem} item The TabPanelItem to add + */ + addTabItem : function(item){ + this.items[item.id] = item; + }, + + /** + * Remove a TabPanelItem. + * @param {String} id The id of the TabPanelItem to remove. + */ + removeTab : function(id){ + var tab = this.items[id]; + if(tab && this.active == tab){// if it's active, activate the first tab + for(var key in this.items){ + if(typeof this.items[key] != 'function' && this.items[key] != tab){ + this.items[key].activate(); + break; + } + } + } + this.stripEl.dom.removeChild(tab.onEl.dom); + this.stripEl.dom.removeChild(tab.offEl.dom); + this.bodyEl.dom.removeChild(tab.bodyEl.dom); + delete this.items[id]; + }, + + /** + * Disable a TabPanelItem. It cannot be the active tab, if it is this call is ignored.. + * @param {String} id The id of the TabPanelItem to disable. + */ + disableTab : function(id){ + var tab = this.items[id]; + if(tab && this.active != tab){ + tab.disable(); + } + }, + + /** + * Enable a TabPanelItem that is disabled. + * @param {String} id The id of the TabPanelItem to enable. + */ + enableTab : function(id){ + var tab = this.items[id]; + tab.enable(); + }, + + /** + * Activate a TabPanelItem. The currently active will be deactivated. + * @param {String} id The id of the TabPanelItem to activate. + */ + activate : function(id){ + var tab = this.items[id]; + if(!tab.disabled){ + if(this.active){ + this.active.hide(); + } + this.active = this.items[id]; + this.active.show(); + this.onTabChange.fireDirect(this, this.active); + } + }, + + /** + * Get the active TabPanelItem + * @return {YAHOO.ext.TabPanelItem} The active TabPanelItem or null if none are active. + */ + getActiveTab : function(){ + return this.active; + } + +}; + +YAHOO.ext.TabPanelItem = function(tabPanel, id, text){ + /** + * The TabPanel this TabPanelItem belongs to + * @type YAHOO.ext.TabPanel + */ + this.tabPanel = tabPanel; + /** + * The id for this TabPanelItem + * @type String + */ + this.id = id; + /** @private */ + this.disabled = false; + /** @private */ + this.text = text; + /** @private */ + this.loaded = false; + + /** + * The body element for this TabPanelItem + * @type YAHOO.ext.Element + */ + this.bodyEl = getEl(tabPanel.createItemBody(tabPanel.bodyEl.dom, id)); + this.bodyEl.originalDisplay = 'block'; + this.bodyEl.setStyle('display', 'none'); + this.bodyEl.enableDisplayMode(); + + var stripElements =tabPanel.createStripElements(tabPanel.stripEl.dom, text); + /** @private */ + this.onEl = getEl(stripElements.on, true); + /** @private */ + this.offEl = getEl(stripElements.off, true); + this.onEl.originalDisplay = 'inline'; + this.onEl.enableDisplayMode(); + this.offEl.originalDisplay = 'inline'; + this.offEl.enableDisplayMode(); + this.offEl.on('click', tabPanel.activateDelegate.createCallback(id)); + /** + * Fires when this TabPanelItem is activated. Uses fireDirect with signature: (TabPanel tabPanel, TabPanelItem this). + * @type CustomEvent + */ + this.onActivate = new YAHOO.util.CustomEvent('TabItem.onActivate'); + /** + * Fires when this TabPanelItem is deactivated. Uses fireDirect with signature: (TabPanel tabPanel, TabPanelItem this). + * @type CustomEvent + */ + this.onDeactivate = new YAHOO.util.CustomEvent('TabItem.onDeactivate'); +}; + +YAHOO.ext.TabPanelItem.prototype = { + /** + * Show this TabPanelItem - this does not deactivate the currently active TabPanelItem. + */ + show : function(){ + this.onEl.show(); + this.offEl.hide(); + this.bodyEl.show(); + this.onActivate.fireDirect(this.tabPanel, this); + }, + + setText : function(text){ + this.onEl.dom.firstChild.firstChild.firstChild.innerHTML = text; + this.offEl.dom.firstChild.firstChild.innerHTML = text; + }, + /** + * Activate this TabPanelItem - this does deactivate the currently active TabPanelItem. + */ + activate : function(){ + this.tabPanel.activate(this.id); + }, + + /** + * Hide this TabPanelItem - if you don't activate another TabPanelItem this could look odd. + */ + hide : function(){ + this.onEl.hide(); + this.offEl.show(); + this.bodyEl.hide(); + this.onDeactivate.fireDirect(this.tabPanel, this); + }, + + /** + * Disable this TabPanelItem - this call is ignore if this is the active TabPanelItem. + */ + disable : function(){ + if(this.tabPanel.active != this){ + this.disabled = true; + this.offEl.addClass('disabled'); + this.offEl.dom.title = 'disabled'; + } + }, + + /** + * Enable this TabPanelItem if it was previously disabled. + */ + enable : function(){ + this.disabled = false; + this.offEl.removeClass('disabled'); + this.offEl.dom.title = ''; + }, + + /** + * Set the content for this TabPanelItem. + * @param {String} content The content + */ + setContent : function(content){ + this.bodyEl.update(content); + }, + + /** + * Get the {@link YAHOO.ext.UpdateManager} for the body of this TabPanelItem. Enables you to perform Ajax updates. + * @return {YAHOO.ext.UpdateManager} The UpdateManager + */ + getUpdateManager : function(){ + return this.bodyEl.getUpdateManager(); + }, + + /** + * Set a URL to be used to load the content for this TabPanelItem. + * @param {String/Function} url The url to load the content from or a function to call to get the url + * @param {String/Object} params (optional) The string params for the update call or an object of the params. See {@link YAHOO.ext.UpdateManager#update} for more details. (Defaults to null) + * @param {Boolean} loadOnce (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this TabPanelItem is activated. (Defaults to false) + * @return {YAHOO.ext.UpdateManager} The UpdateManager + */ + setUrl : function(url, params, loadOnce){ + this.onActivate.subscribe(this._handleRefresh.createDelegate(this, [url, params, loadOnce])); + }, + + /** @private */ + _handleRefresh : function(url, params, loadOnce){ + if(!loadOnce || !this.loaded){ + var updater = this.bodyEl.getUpdateManager(); + updater.update(url, params, this._setLoaded.createDelegate(this)); + } + }, + + /** @private */ + _setLoaded : function(){ + this.loaded = true; + } +}; +/** @private */ +YAHOO.ext.TabPanel.prototype.createStrip = function(container){ + var strip = document.createElement('div'); + YAHOO.util.Dom.addClass(strip, 'tabset'); + container.appendChild(strip); + var stripInner = document.createElement('div'); + YAHOO.util.Dom.generateId(stripInner, 'tab-strip'); + YAHOO.util.Dom.addClass(stripInner, 'hd'); + strip.appendChild(stripInner); + return stripInner; +}; +/** @private */ +YAHOO.ext.TabPanel.prototype.createStripList = function(strip){ + var list = document.createElement('ul'); + YAHOO.util.Dom.generateId(list, 'tab-strip-list'); + strip.appendChild(list); + return list; +}; +/** @private */ +YAHOO.ext.TabPanel.prototype.createBody = function(container){ + var body = document.createElement('div'); + YAHOO.util.Dom.generateId(body, 'tab-body'); + YAHOO.util.Dom.addClass(body, 'yui-ext-tabbody'); + container.appendChild(body); + return body; +}; +/** @private */ +YAHOO.ext.TabPanel.prototype.createItemBody = function(bodyEl, id){ + var body = YAHOO.util.Dom.get(id); + if(!body){ + body = document.createElement('div'); + body.id = id; + } + YAHOO.util.Dom.addClass(body, 'yui-ext-tabitembody'); + bodyEl.appendChild(body); + return body; +}; +/** @private */ +YAHOO.ext.TabPanel.prototype.createStripElements = function(stripEl, text){ + var li = document.createElement('li'); + var a = document.createElement('a'); + var em = document.createElement('em'); + + stripEl.appendChild(li); + li.appendChild(a); + a.appendChild(em); + em.innerHTML = text; + + var li2 = document.createElement('li'); + var a2 = document.createElement('a'); + var em2 = document.createElement('em'); + var strong = document.createElement('strong'); + + stripEl.appendChild(li2); + YAHOO.util.Dom.addClass(li2, 'on'); + YAHOO.util.Dom.setStyle(li2, 'display', 'none'); + li2.appendChild(a2); + a2.appendChild(strong); + strong.appendChild(em2); + em2.innerHTML = text; + + return {on: li2, off: li}; +}; \ No newline at end of file diff --git a/www/extras/yui-ext/source/widgets/Toolbar.js b/www/extras/yui-ext/source/widgets/Toolbar.js new file mode 100644 index 000000000..6253c12a6 --- /dev/null +++ b/www/extras/yui-ext/source/widgets/Toolbar.js @@ -0,0 +1,180 @@ +/* + * YUI Extensions + * Copyright(c) 2006, Jack Slocum. + * + * This code is licensed under BSD license. + * http://www.opensource.org/licenses/bsd-license.php + */ + +/** + * @class + * Basic Toolbar used by the Grid to create the paging toolbar. This class is reusable but functionality + * is limited. Look for more functionality in a future version. + */ + YAHOO.ext.Toolbar = function(container){ + this.el = getEl(container, true); + var div = document.createElement('div'); + div.className = 'ytoolbar'; + var tb = document.createElement('table'); + tb.border = 0; + tb.cellPadding = 0; + tb.cellSpacing = 0; + div.appendChild(tb); + var tbody = document.createElement('tbody'); + tb.appendChild(tbody); + var tr = document.createElement('tr'); + tbody.appendChild(tr); + this.el.dom.appendChild(div); + this.tr = tr; +}; + +YAHOO.ext.Toolbar.prototype = { + /** + * Adds element(s) to the toolbar - this function takes a variable number of + * arguments of mixed type and adds them to the toolbar... + * If an argument is a ToolbarButton, it is added. If the element is a string, it is wrapped + * in a ytb-text element and added unless the text is "separator" in which case a separator + * is added. Otherwise, it is assumed the element is an HTMLElement and it is added directly. + */ + add : function(){ + for(var i = 0; i < arguments.length; i++){ + var el = arguments[i]; + var td = document.createElement('td'); + this.tr.appendChild(td); + if(el instanceof YAHOO.ext.ToolbarButton){ + el.init(td); + }else if(typeof el == 'string'){ + var span = document.createElement('span'); + if(el == 'separator'){ + span.className = 'ytb-sep'; + }else{ + span.innerHTML = el; + span.className = 'ytb-text'; + } + td.appendChild(span); + }else if(typeof el == 'object'){ // must be element? + td.appendChild(el); + } + } + }, + + addSeparator : function(){ + var td = document.createElement('td'); + this.tr.appendChild(td); + var span = document.createElement('span'); + span.className = 'ytb-sep'; + td.appendChild(span); + }, + + /** + * Adds a button, see {@link YAHOO.ext.ToolbarButton} for more info on the config + * @return {YAHOO.ext.ToolbarButton} + */ + addButton : function(config){ + var b = new YAHOO.ext.ToolbarButton(config); + this.add(b); + return b; + }, + + addText : function(text){ + var td = document.createElement('td'); + this.tr.appendChild(td); + var span = document.createElement('span'); + span.className = 'ytb-text'; + span.innerHTML = text; + td.appendChild(span); + return span; + } +}; + +/** + * @class + * A toolbar button. The config has the following options: + *