mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-18 14:03:19 +01:00
55 lines
32 KiB
HTML
55 lines
32 KiB
HTML
|
<?xml version="1.0" encoding="utf-8"?><div style="position:absolute;right:20"><a href="javascript:void(0)" onclick="expandAll(true)">expand</a><a href="javascript:void(0)" onclick="expandAll(false)">collaps</a></div><script><!--
|
|||
|
|
|||
|
function openFull(el){
|
|||
|
el.nextSibling.style.display=='none'?el.nextSibling.style.display='block':el.nextSibling.style.display='none'
|
|||
|
}
|
|||
|
function expandAll(fl){
|
|||
|
var elAr = document.getElementsByTagName("DIV");
|
|||
|
for(var i=2;i<elAr.length;i++){
|
|||
|
if(elAr[i].style.display=='none' || elAr[i].block_fl){
|
|||
|
elAr[i].block_fl = true;
|
|||
|
if(fl)
|
|||
|
elAr[i].style.display = "";
|
|||
|
else
|
|||
|
elAr[i].style.display = "none";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
--></script><style>
|
|||
|
.{font-family:arial;}
|
|||
|
h2 {cursor:pointer;font-size:16px;margin-left:10px;line-height:10px}
|
|||
|
h3 {cursor:pointer;font-weight:normal;color:gray;text-decoration:underline;line-height:10px}
|
|||
|
div.block {margin-left:30px;}
|
|||
|
</style><h2 onclick="openFull(this)">dhtmlXTreeObject object API</h2><div class="block" style="display:show;"><h3 onclick=" openFull(this)">Initialization</h3><div class="block" style="display:none;"><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableCheckBoxes(mode)<br /><strong style="color:#6c6c6c;font-size:12px">hide checkboxes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableContextMenu(menu)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">enable context menu</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">menu - menu object</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableDragAndDrop(mode)<br /><strong style="color:#6c6c6c;font-size:12px">enable/disable drag-and-drop</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableDragAndDropScrolling(mode)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">enable/disable auto scrolling while drag-and-drop</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableMultiLineItems(width)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">enable multi line items</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">width - text width, if equls zero then use single lines items;</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableSmartXMLParsing(mode)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">enable/disable smart XML parsing mode</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableThreeStateCheckboxes(mode)<br /><strong style="color:#6c6c6c;font-size:12px">enable three state checkboxes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableTreeImages(mode)<br /><strong style="color:#6c6c6c;font-size:12px">enable tree images</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">focusItem(itemId)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">focus item in tree</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - item Id</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">loadXML(file)<br /><strong style="color:#6c6c6c;font-size:12px">load tree from xml file</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">file - link too XML file</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">loadXMLString(xmlString)<br /><strong style="color:#6c6c6c;font-size:12px">load tree from xml string</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">xmlString - XML string</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setDragBehavior(mode)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">set Drag-And-Drop behavior</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - behavior name (child or sibling)</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setDragHandler(func)<br /><strong style="color:#6c6c6c;font-size:12px">set function called when drag-and-drop event occured</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">aFunc - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setDropHandler(func)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">set function called after drag-and-drap event occured</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setImagePath( newPath )<br /><strong style="color:#6c6c6c;font-size:12px">set path to image directory</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">newPath - path to image directory</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setOnCheckHandler(func)<br /><strong style="color:#6c6c6c;font-size:12px">set function called before checkbox checked/unchecked</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setOnClickHandler(func)<br /><strong style="color:#6c6c6c;font-size:12px">set function called when tree node selected</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setOnDblClickHandler(func)<br /><strong style="color:#6c6c6c;font-size:12px">set function called when tree node double clicked</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setOnOpenHandler(func)<br /><strong style="color:#6c6c6c;font-size:12px">set function called before tree node opened/closed</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setXMLAutoLoading(filePath)<br /><strong style="color:#6c6c6c;font-size:12px">enables dinamic loading from XML mode</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">filePath - name of script returning XML;</li> </div></div><h3 onclick=" openFull(this)">Selection control</h3><div class="block" style="display:none;"><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getChildItemIdByIndex(itemId,index)<br /><strong style="color:#6c6c6c;font-size:12px">retun child node identificator by index</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - parent node identificator</li><li type="circle">index - index of child node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getItemIdByIndex(itemId,index)<br /><strong style="color:#6c6c6c;font-size:12px">retun node identificator by index</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><li type="circle">index - index of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getSelectedItemId()<br /><strong style="color:#6c6c6c;font-size:12px">retun selected node identificator</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js </di
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">enable/disable autosaving selected node in cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">mode - true/false</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">findItem(searchStr,direction,top)<br /><strong style="color:#6c6c6c;font-size:12px">find tree item by text, select and focus it</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -> bottom; 1: bottom -> top</li><li type="circle">top - 1: start searching from top</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">findItemIdByLabel(searchStr,direction,top)<br /><strong style="color:#6c6c6c;font-size:12px">find tree item by text</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -> bottom; 1: bottom -> top</li><li type="circle">top - 1: start searching from top</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">insertNewItem(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs)<br /><strong style="color:#6c6c6c;font-size:12px">create new child node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">parentId - parent node id</li><li type="circle">itemId - new node id</li><li type="circle">itemText - new node text</li><li type="circle">itemActionHandler - function fired on node select event (optional)</li><li type="circle">image1 - image for node without childrens; (optional)</li><li type="circle">image2 - image for closed node; (optional)</li><li type="circle">image3 - image for opened node (optional)</li><li type="circle">optionStr - options string (optional)</li><li type="circle">childs - node childs flag (for dynamical trees) (optional)</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">insertNewNext(parentItemId,itemId,itemName,itemActionHandler,image1,image2,image3,optionStr,childs)<br /><strong style="color:#6c6c6c;font-size:12px">create new node next to specified</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">parentItemId - node id</li><li type="circle">itemId - new node id</li><li type="circle">itemName - new node text</li><li type="circle">itemActionHandler - function fired on node select event (optional)</li><li type="circle">image1 - image for node without childrens; (optional)</li><li type="circle">image2 - image for closed node; (optional)</li><li type="circle">image3 - image for opened node (optional)</li><li type="circle">optionStr - options string (optional)</li><li type="circle">childs - node childs flag (for dynamical trees) (optional)</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">loadOpenStates(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">restore open nodes from cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">loadState(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">load tree from cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">restoreSelectedItem(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">restore selected item from cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">saveOpenStates(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">save open nodes to cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">saveSelectedItem(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">save selected item to cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">saveState(name)
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">save tree to cookie</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">serializeTree()
|
|||
|
[<span style="color:red;">Commercial</span>]
|
|||
|
<br /><strong style="color:#6c6c6c;font-size:12px">return xml description of tree</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js </div></div><h3 onclick=" openFull(this)">Node/level control</h3><div class="block" style="display:none;"><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">changeItemId(itemId,newItemId)<br /><strong style="color:#6c6c6c;font-size:12px">change item id</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - old node id</li><li type="circle">newItemId - new node id</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">closeAllItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">collapse target node and all child nodes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node id</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">closeItem(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">collapse node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getLevel(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return node level</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getParentId(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return parent node identificator</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">hasChildren(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return count of childrens</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">openAllItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">expand target node and all child nodes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node id</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">openItem(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">expand node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li> </div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemCloseable(itemId,flag)<br /><strong style="color:#6c6c6c;font-size:12px">prevent node from closing</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">flag - if 0 - node can't be closed, else node can be closed</li> </div></div><h3 onclick=" openFull(this)">Checkboxes/user data manipulation</h3><div class="block" style="display:none;"><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllChecked()<br /><s
|