commit for Lars:

1) ajax proposal: proof of concept using xajax in felamimail to work without page reloads
2) also implemented IMAP ACL for cyrus and php5 (still needs some work)
This commit is contained in:
Ralf Becker 2005-07-20 08:07:47 +00:00
parent c1dd998363
commit b495b33d0a
81 changed files with 7197 additions and 0 deletions

View File

@ -1338,6 +1338,14 @@
}
}
if ($GLOBALS['egw_info']['flags']['include_xajax'])
{
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/xajax.inc.php');
$xajax = new xajax($GLOBALS['egw']->link('/xajax.php'));
$xajax->registerFunction("doXMLHTTP");
}
$java_script .= $xajax->getJavascript();
/* this flag is for all javascript code that has to be put before other jscode.
Think of conf vars etc... (pim@lingewoud.nl) */
if (isset($GLOBALS['egw_info']['flags']['java_script_thirst']))

1088
phpgwapi/inc/xajax.inc.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dhtmlxTree Commercial License</title>
</head>
<style>
h1{font-family:arial;font-size:28px;border-bottom:1px solid black;}
h2{font-family:arial;font-size:18px;color:gray;}
h3{font-family:arial;font-size:16px;color:gray;margin-left:10px}
p{font-size:14px;margin-bottom:3px;}
p.cr{border-top:1px solid black;font-family:arial;font-size:12px;}
</style>
<body>
<h1>dhtmlxTree Commercial License</h1>
<h2>1. LIMITED LICENSE GRANT. </h2>
<p>Scand LLC grants to you ("Licensee") a nonexclusive, nontransferable, worldwide, royalty-free license to use this version of dhtmlxTree (the "Software").</p>
<p>The Licensee has the right to use the software only in ONE commercial project (for one License). It is possible to use the software on any Website unlimited number of times but within the ONE commercial project (application). "Website" and "site" means the technology, and is not limited by internet sites, it also includes intranet and extranet websites. When referred to a site, a site means a location where all the web pages share a single fully qualified domain name.</p>
<p>The Licensee has the right to apply for free-of-charge support (consultations) on the product within 3 months since purchasing the product and also free-of-charge elimination of any found bugs during the same period.</p>
<p>Modifications to the software are allowed, as long as they do not conflict with the license, but distribution of the modified software is forbidden. A non-exclusive royalty-free right is granted to the initial developer of the Software to use, modify and distribute your modification in future versions of the Software.</p>
<h3>a) specific restrictions</h3>
<p>The licensee is not permitted to distribute the components in any fashion which would promote, encourage or allow reuse or redistribution of the JavaScript component.</p>
<h3>b) general restrictions</h3>
<p>Software may not be transferred, leased, assigned, or sublicensed, in whole or in part.</p>
<p>IF THESE RESTRICTIONS ARE NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE RESTRICTIONS CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h3>c) disclaimer of warranty</h3>
<p>The Software is provided "AS IS," without a warranty of any kind.</p>
<p>ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.</p>
<p>IF THIS DISCLAIMER IS NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE DISCLAIMER CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h3>d) limitation of liability.</h3>
<p>IN NO EVENT WILL SCAND LLC BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THE USE OF, INABILITY TO USE OR DOWNLOADING OF THE SOFTWARE, EVEN IF SCAND LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
<p>IF THIS LIMITATION IS NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE LIMITATION CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h2>2. COPYRIGHT</h2>
<p>SCAND LLC and its licensors retain all ownership rights to the software and related documentation. Use of the software and related documentation is governed by the license agreement accompanying the software and applicable copyright law.</p>
<p>The documentation must always follow the related software. Making unauthorized copies, adaptations, or compilation works is prohibited. SCAND LLC may revise this documentation from time to time without notice.</p>
<p>THIS DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL SCAND LLC BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF USE OR DATA, INTERRUPTION OF BUSINESS, OR FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND, ARISING FROM ANY ERROR IN THIS DOCUMENTATION.</p>
<p>This means that the software and documentation come with no warranty, without any limitation. No liability of any kind can be accepted and this the fullest extent. If your law doesn't allow this, then do not use this software and documentation. </p>
<p class="cr">The Software and documentation are copyright &copy; 1996-2005 Scand LLC. All rights reserved.</p>
</body>
</html>

View File

@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dhtmlxTree Enterprise License</title>
</head>
<style>
h1{font-family:arial;font-size:28px;border-bottom:1px solid black;}
h2{font-family:arial;font-size:18px;color:gray;}
h3{font-family:arial;font-size:16px;color:gray;margin-left:10px}
p{font-size:14px;margin-bottom:3px;}
p.cr{border-top:1px solid black;font-family:arial;font-size:12px;}
</style>
<body>
<h1>dhtmlxTree Enterprise License</h1>
<h2>1. LIMITED LICENSE GRANT.</h2>
<p>Scand LLC grants to you ("Licensee") a nonexclusive, nontransferable, worldwide, royalty-free license to use this version of dhtmlxTree (the "Software").
The Licensee has the right to use the Software in any number of projects, but only by the ONE company.</p>
<p>The Licensee has the right to apply for free-of-charge support (consultations) on the product within 2 years since purchasing the product and also free-of-charge elimination of any found bugs during the same period.</p>
<p>Modifications to the software are allowed, as long as they do not conflict with the license, but distribution of the modified software is forbidden. A non-exclusive royalty-free right is granted to the initial developer of the Software to use, modify and distribute your modification in future versions of the Software.</p>
<h3>a) specific restrictions</h3>
<p>The licensee is not permitted to distribute the components in any fashion which would promote, encourage or allow reuse or redistribution of the JavaScript component.</p>
<h3>b) general restrictions</h3>
<p>Software may not be transferred, leased, assigned, or sublicensed, in whole or in part.</p>
<p>IF THESE RESTRICTIONS ARE NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE RESTRICTIONS CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h3>c) disclaimer of warranty</h3>
<p>The Software is provided "AS IS," without a warranty of any kind.</p>
<p>ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.</p>
<p>IF THIS DISCLAIMER IS NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE DISCLAIMER CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h3>d) limitation of liability.</h3>
<p>IN NO EVENT WILL SCAND LLC BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THE USE OF, INABILITY TO USE OR DOWNLOADING OF THE SOFTWARE, EVEN IF SCAND LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
<p>IF THIS LIMITATION IS NOT ALLOWED BY YOUR RESPECTIVE LAW THEN CONTACT SCAND LLC TO CHECK IF THE LIMITATION CAN BE RELAXED IN YOUR CASE. THE RELAXATION CAN ONLY BE GIVEN BY WRITTEN CONSENT.</p>
<h2>2. COPYRIGHT</h2>
<p>SCAND LLC and its licensors retain all ownership rights to the software and related documentation. Use of the software and related documentation is governed by the license agreement accompanying the software and applicable copyright law.</p>
<p>The documentation must always follow the related software. Making unauthorized copies, adaptations, or compilation works is prohibited. SCAND LLC may revise this documentation from time to time without notice.</p>
<p>THIS DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL SCAND LLC BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF USE OR DATA, INTERRUPTION OF BUSINESS, OR FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND, ARISING FROM ANY ERROR IN THIS DOCUMENTATION.</p>
<p>This means that the software and documentation come with no warranty, without any limitation. No liability of any kind can be accepted and this the fullest extent. If your law doesn't allow this, then do not use this software and documentation. </p>
<p class="cr">The Software and documentation are copyright &copy; 1996-2005 Scand LLC. All rights reserved.</p>
</body>
</html>

View File

@ -0,0 +1,72 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

View File

@ -0,0 +1,11 @@
.defaultTreeTable{
margin : 0;
padding : 0;
border : 0;
}
.containerTableStyle { overflow : auto;}
.standartTreeRow{ font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.selectedTreeRow{ background-color : navy; color:white; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.standartTreeImage{ width:18px; height:18px; overflow:hidden; border:0; padding:0; margin:0; }
.hiddenRow { width:1px; overflow:hidden; }
.dragSpanDiv{ font-size : 12px; border: thin solid 1 1 1 1; }

View File

@ -0,0 +1,124 @@
<?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><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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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)">clearCut()<br /><strong style="color:#6c6c6c;font-size:12px">clear cut</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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)">deleteChildItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">delete all child of node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">deleteItem(itemId,selectParent)<br /><strong style="color:#6c6c6c;font-size:12px">delete node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><li type="circle">selectParent - If true parent of deleted item get selection, else no selected items leaving in tree.</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">doCut()<br /><strong style="color:#6c6c6c;font-size:12px">mark selected item as cutted</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">doPaste(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">insert previously cutted branch</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - id of new parent node</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableAutoSavingSelected(mode)
[<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">enableTreeLines(mode)<br /><strong style="color:#6c6c6c;font-size:12px">enableTreeLines(mode);</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enable/disable tree lines</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -&gt; bottom; 1: bottom -&gt; 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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -&gt; bottom; 1: bottom -&gt; 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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">getAllChecked()<br /><strong style="color:#6c6c6c;font-size:12px">return list of identificators of nodes with checked checkboxes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllCheckedBranches()<br /><strong style="color:#6c6c6c;font-size:12px">return list of identificators of nodes with checked checkboxes, and parent of that checkboxes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllSubItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">Returns the list of all children items from all next levels of tree, separated by commas.</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Selection control;
<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)">getItemColor(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">get node color</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Selection control;
<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)">getItemText(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return node text</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getSelectedItemText()<br /><strong style="color:#6c6c6c;font-size:12px">retun selected node text</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getSubItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">Returns the list of all children items from the next level of tree, separated by commas.</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<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)">getUserData(itemId,name)<br /><strong style="color:#6c6c6c;font-size:12px">return user data from target node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">name - key for user data</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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)">isItemChecked(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return state of nodes's checkbox</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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)">refreshItem(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">refresh tree branch from xml</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node, if not defined tree super root used.</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<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)">selectItem(itemId,mode)<br /><strong style="color:#6c6c6c;font-size:12px">select node ( and optionaly fire onselect event)</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><li type="circle">mode - If true, script function for selected node will be called.</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js</div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setCheck(itemId,state)<br /><strong style="color:#6c6c6c;font-size:12px">change state of node's checkbox</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">state - checkbox state</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">setImageArrays(arrayName,image1,image2,image3,image4,image5)<br /><strong style="color:#6c6c6c;font-size:12px">enableTreeLines(mode);</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">arrayName - name of array: plus, minus</li><li type="circle">image1 - line crossed image</li><li type="circle">image2 - image with top line</li><li type="circle">image3 - image with bottom line</li><li type="circle">image4 - image without line</li><li type="circle">image5 - single root image</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Node/level control;
<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 style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemColor(itemId,defaultColor,selectedColor)<br /><strong style="color:#6c6c6c;font-size:12px">set node color</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">defaultColor - node color</li><li type="circle">selectedColor - selected node color</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemImage(itemId,image1,image2)<br /><strong style="color:#6c6c6c;font-size:12px">set node images</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">image1 - node without childrens image or closed node image (if image2 specified)</li><li type="circle">image2 - open node image (optional)</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemImage2(itemId, image1,image2,image3)<br /><strong style="color:#6c6c6c;font-size:12px">set node images</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">image1 - node without childrens image</li><li type="circle">image2 - closed node image</li><li type="circle">image3 - open node image</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemText(itemId,newLabel)<br /><strong style="color:#6c6c6c;font-size:12px">set new node text (HTML allowed)</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">newLabel - node text</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<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)">setStdImages(image1,image2,image3)<br /><strong style="color:#6c6c6c;font-size:12px">set default images for nodes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">a0 - image for node without childrens;</li><li type="circle">a1 - image for closed node;</li><li type="circle">a2 - image for opened node</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setSubChecked(itemId,state)<br /><strong style="color:#6c6c6c;font-size:12px">change state of node's checkbox and all childnodes checkboxes</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">state - checkbox state</li></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setUserData(itemId,name,value)<br /><strong style="color:#6c6c6c;font-size:12px">set user data for target node</strong><br /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">name - key for user data</li><li type="circle">value - user data</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"><em style="color:blue;">Object: </em>dhtmlXTreeObject<br /><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">filePath - name of script returning XML;</li></div>

View File

@ -0,0 +1,346 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree guide and samples</title>
</head>
<body>
<div style="position:absolute;right:20"><a href="javascript:void(0)" onclick="expandAll(true)">expand</a>&nbsp;<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].className=='block'){
if(fl)
elAr[i].style.display = "";
else
elAr[i].style.display = "none";
}
}
}
</script>
<style>
body {font-size:14px;line-height:18px;}
.{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}
h4 {cursor:pointer;font-weight:normal;color:black;text-decoration:underline;line-height:10px}
.op {cursor:pointer;}
div.block {margin-left:30px;}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
li {margin-top:2px;}
</style>
<h2 onclick="openFull(this)">dhtmlXTree Guide and Samples</h2>
<div class="block">
<!--- --->
<h3 onclick="openFull(this)">Main features</h3
><div style="display:show" class="block">
<li>Multibrowser/Multiplatform support </li>
<li>Full controll with JavaScript</li>
<li>Dynamic loading</li>
<li>XML support</li>
<li>Dynamic rendering (Smart XML parsing) for big trees</li>
<li>drag-&-drop (within one tree, between trees, between frames) </li>
<li>checkboxes (two/three states)</li>
<li>customizable icons (with javascript or xml) </li>
<li>context menu (integration with dhtmlxMenu)</li>
<li>user data for nodes</li>
<li>multi-line tree items</li>
<li>high stability</li>
<li>Macromedia Cold Fusion support</li>
</div>
<h3 onclick="openFull(this)">Supported browsers</h3
><div style="display:show" class="block">
<li>IE 5.x and above</li>
<li>Mac OS X Safari</li>
<li>Mozilla 1.4 and above</li>
<li>FireFox 0.9 and above</li>
<li>Opera (Xml loading depends on browser version)</li>
</div>
<h3 onclick="openFull(this)">Working with dhtmlXTree</h3
><div style="display:show" class="block">
<!--- Initialize object on page --->
<h4 onclick="openFull(this)">Initialize object on page</h4
><div style="display:none" class="block">
<XMP>
<div id="treeBox" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
tree.setImagePath("gfx/");
tree.enableCheckBoxes(false);
</script>
</XMP>
Parameters passed to the constructor are:
<li>object to attach tree to (should be loaded before calling constructor)</li>
<li>width of the tree</li>
<li>height of the tree</li>
<li>identifier of level parent to tree root level</li><br>
Specify Additional parameters of the tree:
<li>setImagePath(url) - method specifies the path to the folder with tree icons</li>
<li>enableCheckBoxes(mode) - enable/disable checkboxes in tree (checkboxes appear by default)</li>
</div>
<!--- Set Additional init parameters --->
<h4 onclick="openFull(this)">Set Event Handlers</h4
><div style="display:none" class="block">
<XMP>
<div id="treeBox" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
...
tree.setOnDragHandler(onDrop);//set function object to call on drop
tree.setOnClickHandler(onNodeSelect);//set function object to call on node select
tree.setOnOpenHandler(onOpen,state);//set function to call on open/close node
tree.setOnDblClickHandler(onDblClick);//set function to call on dbl click
</script>
</XMP>
<li>Selected node ID will be passed to function specified as argument for setDefaultAction(funcObj)</li>
<li>Dropped node ID and new parent node ID will be passed to function specified as argument for setDragFunction(funcObj)</li>
<li>node ID and node state will be passed to the function specified as argument for setOpenAction(funcObj,state)</li>
<li>node ID will be passed to the function specified as argument for setDblClickAction(funcObj)</li>
</div>
<!--- Adding nodes with Script --->
<h4 onclick="openFull(this)">Adding nodes with Script</h4
><div style="display:none" class="block">
<XMP>
<script>
tree=new dhtmlXTreeObject('treeBox',"100%","100%",0);
...
tree.insertNewChild(0,1,"New Node 1",0,0,0,0,"SELECT,CALL,TOP,CHILD,CHECKED");
tree.insertNewNext(1,2,"New Node 2",0,0,0,0,"CHILD,CHECKED");
</script>
</XMP>
<li>0s passed to the function for arguments 4-7 (function to call on select, images) mean use default values for them</li>
<li>Last argument is a comma delimited string of following possible value (upper case only):</li>
<li type="circle">SELECT - move selection to this node after inserting</li>
<li type="circle">CALL - call function on select</li>
<li type="circle">TOP - add node to the top position </li>
<li type="circle">CHILD - node has children</li>
<li type="circle">CHECKED - checkbox is checked (if exists)</li>
</div>
<!--- Using XML --->
<h4 onclick="openFull(this)">Loading data with XML</h4
><div style="display:none" class="block">
<XMP>
<script>
tree=new dhtmlXTreeObject('treeBox',"100%","100%",0);
tree.setXMLAutoLoading("http://127.0.0.1/xml/tree.xml");
tree.loadXML();//load root level from xml
</script>
</XMP>
<li>ID of opened node (as id url parameter) will be added to URL specified in initXMLAutoLoading(url) during the call</li>
<li>No additional ID is added to the url specified in loadXML(url) method during the call</li>
<li>Using loadXML() without parameters you load url specified in initXMLAutoLoading(url) method</li>
<XMP>
XML Syntax:
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="My Computer" id="1" child="1" im0="my_cmp.gif" im1="my_cmp.gif" im2="my_cmp.gif" call="true" select="yes">
<userdata name="system">true</userdata>
<item text="Floppy (A:)" id="11" child="0" im0="flop.gif" im1="flop.gif" im2="flop.gif"/>
<item text="Local Disk (C:)" id="12" child="0" im0="drv.gif" im1="drv.gif" im2="drv.gif"/>
</item>
<item text="Recycle Bin" id="4" child="0" im0="recyc.gif" im1="recyc.gif" im2="recyc.gif"/>
</tree>
</XMP>
<strong>&lt;tree&gt;</strong> node is mandatory. It specifies the parent of loading block of data. According to this its id parameter specifies the ID oth that parent.
To load root level you need to specify the ID you used when created tree object: new myObjTree(boxObject,width,height,<b>0</b>) <br>
<strong>&lt;item&gt;</strong> can contain subitems (in order to load more than one level at once) or not.<br>
Mandatory parameters for this tag are:<br>
<li>text - label of the node</li>
<li>id - id of the node</li>
Optional parameters for this tag are:<br>
<li>im0 - image for node without children (tree will get images from the path specified in setImagePath(url) method)</li>
<li>im1 - image for opened node with children</li>
<li>im2 - image for closed node with children</li>
<!--- <li>top - </li> --->
<li>select - select node on load (0/1)</li>
<li>open - show node opened (0/1)</li>
<li>call - call function on select(0/1)</li>
<li>checked - check checkbox if exists(0/1)</li>
<li>child - spec. if node has children (1) or not (0)</li><br>
To set userdata directly within XML use <strong>&lt;userdata&gt;</strong><br>
It has just one parameter: <br>
<li>name</li><br>
and value to specify userdata value
</div>
<!--- Setting custom icons to nodes --->
<h4 onclick="openFull(this)">Setting custom icons to nodes</h4
><div style="display:none" class="block">
There are two ways to set custom icons for the node. And it depends on the way you add items.<br>
<em>Important:</em> tree will get images for the nodes from the path specified in setImagePath(url) method.<br><br>
Javascript way. Using arguments of insertNewChild(...) or insertNewNext(...) methods:
<XMP>
<script>
var im0 = "doc.gif";//icon to show if node contains no children
var im1 = "opened.gif";//if node contains children and opened
var im2 = "closed.gif";//if node contains children and closed
tree.insertNewItem(0,1,"New Node 1",0,im0,im1,im2);
tree.insertNewNext(1,2,"New Node 2",0,"txt.gif","opened.gif","closed.gif");
</script>
</XMP>
XML way. Using parameters of &lt;item&gt; tag:
<XMP>
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="My Computer" id="1" child="1" im0="doc.gif" im1="my_opened.gif" im2="my_closed.gif">
</tree>
</XMP>
<li>im0 - image for node without children (tree will get images from the path specified in setImagePath(url) method)</li>
<li>im1 - image for opened node with children</li>
<li>im2 - image for closed node with children</li>
</div>
<!--- Dynamical loading --->
<h4 onclick="openFull(this)">Building dynamic tree</h4
><div style="display:none" class="block">
If your tree should contain large amount of nodes (or you simply do not want to waist time loading hidden nodes), it would be better to load them on demand, not at once.
For this purpose we made the tree to load levels dynamically using XML. <br>
See chapter <em>"Loading data with XML"</em>
</div>
<h4 onclick="openFull(this)">Manipulating nodes</h4
><div style="display:none" class="block">
A few examples of manipulating node with tree object methods:
<XMP>
<script>
tree=new dhtmlXTreeObject('treeboxbox_tree',"100%","100%",0);
...
var sID = tree.getSelectedItemId();//get id of selected node
tree.setLabel(sID,"New Label");//change label of selecte node
tree.setItemColor(sID,'blue','red');//set colors for selected node's label (for not selected state and for selected state)
tree.openItem(sID);//expand selected node
tree.closeItem(sID);//close selected node
tree.changeItemId(sID,100);//change id of selected node to 100
alert("This node has children: "+tree.hasChildren(100));//show alert with information if this node has children
</script>
</XMP>
</div>
</div>
<h3 onclick="openFull(this)">Cold Fusion Tag for dhtmlXTree</h3
><div style="display:none" class="block">
<XMP>
<cf_dhtmlXTree
name="tree"
width="250"
height="250"
JSPath="../"
CSSPath="../"
iconspath="gfx/"
xmldoc="tree.xml"
checkboxes="false"
dragndrop="true"
style="background-color:whitesmoke;border:1px solid blue;"
onSelect="onNodeSelect"
onDrop="onDropNode">
...configuration xml...
</cf_dhtmlXTree>
</XMP>
<li>name - [optional] name of the tree js object to use in javascript, if skiped, then name autogenerated</li>
<li>width - [optional] width of the tree (definitely it sets the with of the tree box, leaving the with of the tree itself by 100%)</li>
<li>height - [optional] height of the tree</li>
<li>JSPath - [optional] absolute or relative path to directory which contains tree js files, "js" directory by default</li>
<li>CSSPath - [optional] absolute or relative path to directory which contains tree css files, "css" directory by default</li>
<li>iconspath - [optional] absolute or relative path to directory which contains tree icon files, "img" directory by default</li>
<li>xmldoc - [mandatory for xml loading] url of the xml file used to load levels dynamically</li>
<li>checkboxes - [optional] show checkboxes (none, twoState, threeState)</li>
<li>dragndrop - [optional] activate drag-&-drop (true,false)</li>
<li>style - [optional] style for the tree box</li>
<li>onSelect - [optional] javascript function to call on node selection</li>
<li>oncheck - [optional] javascript function to call on node (un)checking</li>
<li>onDrop - [optional] javascript function to call on node drop</li>
<li>im1 - [optional] default image used for child nodes</li>
<li>im2 - [optional] default image used for opened branches</li>
<li>im3 - [optional] default image used for closed branches</li>
<br>
For description of optional configuration xml - see chapter <em>"Loading data with XML"</em>
<br><br>
Minimal possible tag syntax with on-page xml:
<XMP>
<cf_dhtmlXTree>
<item text="Top node" id="t1" >
<item text="Child node 1" id="c1" ></item>
<item text="Child node 2" id="c2" ></item>
</item>
</cf_dhtmlXTree>
</XMP>
Minimal possible tag syntax with server-side xml:
<XMP>
<cf_dhtmlXTree xmldoc="tree.xml">
</cf_dhtmlXTree>
</XMP>
With images specified:
<XMP>
<cf_dhtmlXTree
im1="book.gif"
im2="books_open.gif"
im3="books_close.gif">
<item text="Mystery " id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</cf_dhtmlXTree>
</XMP>
With Events Handlers,Checkboxes and Drag-n-drop:
<XMP>
<cf_dhtmlXTree
dragndrop="true"
checkboxes="twoState"
onSelect="onClick"
onCheck="onCheck"
onDrop="onDrag">
<item text="Mystery " id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</cf_dhtmlXTree>
</XMP>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree SDK</title>
</head>
<style>
td.menu, td.menu a{
font-family:arial;
font-size:12px;
margin-left:10px;
text-decoration:none;
color:white;
}
.{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;}
#contentdiv {padding:10px;}
</style>
<body scroll="no" bgcolor="#2795d3">
<table width="100%" height="99%" cellspacing="0">
<tr>
<td colspan="2" height="20" style="font-size:20px;font-family:arial;font-weight:bold;color:#9ad8fa;">
dhtmlXTree v.1.1 SDK
</td>
</tr>
<tr>
<td class="menu" xstyle="border-bottom:1px solid black">
<a href="guide.html" target="contentframe">guide and code samples</a>
<a href="http://www.scbr.com/docs/products/dhtmlxTree/" target="contentframe">tree samples</a>
</td>
<td height="20" class="menu" align="right" xstyle="border-bottom:1px solid black">
<em>api methods:</em>
<a href="tgroup.html" target="contentframe">grouped by type</a>
<a href="ogroup.html" target="contentframe">grouped by object</a>
<a href="alpha.html" target="contentframe">alphabeticaly sorted</a>
</td>
</tr>
<tr>
<td colspan="2">
<iframe src="guide.html" name="contentframe" style="background-color:white;border-top:1px solid #6495ed;" height="100%" width="100%" frameborder="0"></iframe>
</td>
</tr>
</table>
<small style="font-size:10px"><a href="http://www.scand.com" style="text-decoration:none;color:white">&copy;Scand LLC, 2004</a></small>
</body>
</html>

View File

@ -0,0 +1,124 @@
<?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;"><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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<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><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">clearCut()<br /><strong style="color:#6c6c6c;font-size:12px">clear cut</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node id</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">deleteChildItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">delete all child of node</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">deleteItem(itemId,selectParent)<br /><strong style="color:#6c6c6c;font-size:12px">delete node</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><li type="circle">selectParent - If true parent of deleted item get selection, else no selected items leaving in tree.</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">doCut()<br /><strong style="color:#6c6c6c;font-size:12px">mark selected item as cutted</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">doPaste(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">insert previously cutted branch</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - id of new parent node</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableAutoSavingSelected(mode)
[<span style="color:red;">Commercial</span>]
<br /><strong style="color:#6c6c6c;font-size:12px">enable/disable autosaving selected node in cookie</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">mode - true/false</li><span /></div><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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">menu - menu object</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enabled/disabled</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<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><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - 1 - on, 0 - off;</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">enableTreeLines(mode)<br /><strong style="color:#6c6c6c;font-size:12px">enableTreeLines(mode);</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - enable/disable tree lines</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -&gt; bottom; 1: bottom -&gt; top</li><li type="circle">top - 1: start searching from top</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">searchStr - search text</li><li type="circle">direction - 0: top -&gt; bottom; 1: bottom -&gt; top</li><li type="circle">top - 1: start searching from top</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - item Id</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllChecked()<br /><strong style="color:#6c6c6c;font-size:12px">return list of identificators of nodes with checked checkboxes</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllCheckedBranches()<br /><strong style="color:#6c6c6c;font-size:12px">return list of identificators of nodes with checked checkboxes, and parent of that checkboxes</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getAllSubItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">Returns the list of all children items from all next levels of tree, separated by commas.</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></div><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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Selection control;
<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><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getItemColor(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">get node color</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Selection control;
<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><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getItemText(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return node text</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getSelectedItemText()<br /><strong style="color:#6c6c6c;font-size:12px">retun selected node text</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getSubItems(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">Returns the list of all children items from the next level of tree, separated by commas.</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">getUserData(itemId,name)<br /><strong style="color:#6c6c6c;font-size:12px">return user data from target node</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">name - key for user data</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<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><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<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><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">isItemChecked(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">return state of nodes's checkbox</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">file - link too XML file</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">xmlString - XML string</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node id</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">refreshItem(itemId)<br /><strong style="color:#6c6c6c;font-size:12px">refresh tree branch from xml</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node, if not defined tree super root used.</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional,cookie name</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<li type="circle">name - optional, cookie name</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">selectItem(itemId,mode)<br /><strong style="color:#6c6c6c;font-size:12px">select node ( and optionaly fire onselect event)</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Selection control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - node identificator</li><li type="circle">mode - If true, script function for selected node will be called.</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Add/delete;
<br /><em style="color:blue;">File required:</em>dhtmlXTree_xw.js<span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setCheck(itemId,state)<br /><strong style="color:#6c6c6c;font-size:12px">change state of node's checkbox</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">state - checkbox state</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">mode - behavior name (child or sibling)</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">aFunc - event handling function</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setImageArrays(arrayName,image1,image2,image3,image4,image5)<br /><strong style="color:#6c6c6c;font-size:12px">enableTreeLines(mode);</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">arrayName - name of array: plus, minus</li><li type="circle">image1 - line crossed image</li><li type="circle">image2 - image with top line</li><li type="circle">image3 - image with bottom line</li><li type="circle">image4 - image without line</li><li type="circle">image5 - single root image</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">newPath - path to image directory</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Node/level control;
<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><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemColor(itemId,defaultColor,selectedColor)<br /><strong style="color:#6c6c6c;font-size:12px">set node color</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">defaultColor - node color</li><li type="circle">selectedColor - selected node color</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemImage(itemId,image1,image2)<br /><strong style="color:#6c6c6c;font-size:12px">set node images</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">image1 - node without childrens image or closed node image (if image2 specified)</li><li type="circle">image2 - open node image (optional)</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemImage2(itemId, image1,image2,image3)<br /><strong style="color:#6c6c6c;font-size:12px">set node images</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">image1 - node without childrens image</li><li type="circle">image2 - closed node image</li><li type="circle">image3 - open node image</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setItemText(itemId,newLabel)<br /><strong style="color:#6c6c6c;font-size:12px">set new node text (HTML allowed)</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - identificator of node</li><li type="circle">newLabel - node text</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">func - event handling function</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setStdImages(image1,image2,image3)<br /><strong style="color:#6c6c6c;font-size:12px">set default images for nodes</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Appearence control;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">a0 - image for node without childrens;</li><li type="circle">a1 - image for closed node;</li><li type="circle">a2 - image for opened node</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setSubChecked(itemId,state)<br /><strong style="color:#6c6c6c;font-size:12px">change state of node's checkbox and all childnodes checkboxes</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">state - checkbox state</li><span /></div><div style="margin-top:5px;font-weight:bold;cursor:pointer;" onclick="openFull(this)">setUserData(itemId,name,value)<br /><strong style="color:#6c6c6c;font-size:12px">set user data for target node</strong><br /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Checkboxes/user data manipulation;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">itemId - target node identificator</li><li type="circle">name - key for user data</li><li type="circle">value - user data</li><span /></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 /><span /></div><div style="display:none;margin-left:20px;font-size:12px"><em style="color:blue;">Topic(s): </em>Initialization;
<br /><em style="color:blue;">File required:</em>dhtmlXTree.js<li type="circle">filePath - name of script returning XML;</li><span /></div><span /></div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,191 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dhtmlxTree v.1.1 Standard Edition</title>
<META NAME="KEYWORDS" CONTENT="dhtmlxtree, dhtml tree, javascript tree, java, dynamical loading, xml, API, cross-browser, javascript, dhtml, scand, treeview, navigation, menu, bar, script, javascript navigation, web-site, dynamic, dynamic menu, folder, folder tree, internet explorer, firefox, mozilla, opera, safari, tooltip, item, node, asp, .net, jsp, cold fusion, image, custom tag, loading, control, widget, web site, checkbox, drag, drop, drag and drop, component, html, offshore, software, outsourcing, development, company, advanced, efficient">
<META NAME="DESCRIPTION" CONTENT="Javascript DHTML Tree with XML support, cross-browser compatibility and rich JavaScript API. It allows to create attractive customizable DHTML JavaScript Tree Menu. Has checkboxes and drag-n-drop">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlXTree.css">
<script src="js/dhtmlXCommon.js"></script>
<script src="js/dhtmlXTree.js"></script>
<script>
var tree1,tree2 = null;
function doOnLoad(){
preLoadImages();
//tree #1
tree1=new dhtmlXTreeObject(document.getElementById('treebox1'),"100%","100%",0);
tree1.setImagePath("imgs/");
tree1.setDragHandler();
tree1.enableCheckBoxes(true)
tree1.enableThreeStateCheckboxes(true);
tree1.enableDragAndDrop(true)
tree1.loadXML("tree.xml")
//tree #2
tree2=new dhtmlXTreeObject(document.getElementById('treebox2'),"100%","100%",0);
tree2.setImagePath("imgs/");
tree2.setDragHandler();
tree2.enableTreeLines(false);
tree2.enableDragAndDrop(true)
tree2.loadXML("tree2.xml")
}
function preLoadImages(){
var imSrcAr = new Array("line1.gif","line2.gif","line3.gif","line4.gif","minus2.gif","minus3.gif","minus4.gif","plus2.gif","plus3.gif","plus4.gif","book.gif","books_open.gif","books_close.gif","magazine_open.gif","magazine_close.gif","tombs.gif","tombs_mag.gif","book_titel.gif")
var imAr = new Array(0);
for(var i=0;i<imSrcAr.length;i++){
imAr[imAr.length] = new Image();
imAr[imAr.length-1].src = "imgs/"+imSrcAr[i]
}
}
</script>
<body onload="doOnLoad()">
<select onchange="document.location.href = this.value">
<option>dhtmlX Components
<option value="http://www.scbr.com/docs/products/dhtmlxMenu/index.shtml">Menu - dhtmlXMenu
<option value="http://www.scbr.com/docs/products/dhtmlxToolbar/index.shtml">Toolbar - dhtmlXToolbar
<option value="http://www.scbr.com/docs/products/dhtmlxTree/index.shtml">Tree - dhtmlXTree
</select>
<p>Often there is a need to show a hierarchically structured data.<br>
Our dhtmlxTree (DHTML extensions Tree) lets you do this in an easy and most comfortable way - in any browser! This <b>JavaScript Tree Menu component</b> allows creating user-friendly navigation bar for a commercial application or a web site. Menu items are organized into compact, hierarchical tree structure so users can find information they need easily.<br>
Having such feature, as <b>dynamical loading</b> of items from <b>XML</b> stream allows dhtmlxTree to handle large amounts of data. <b>Drag-and-drop</b> makes it possible to drag items not just within one tree, but between different trees. Try by yourself <b>now</b>:</p>
<table width="600">
<tr>
<td>
<div
id="treebox1"
style="width:275; height:250;background-color:#f5f5f5;border :1px solid Silver;overflow:auto;">
</div>
</td>
<td width="50">&nbsp;</td>
<td>
<div
id="treebox2"
style="width:275; height:250;background-color:#f5f5f5;border :1px solid Silver;overflow:auto;">
</div>
</td>
</tr>
</table>
<font color=gray>
Drag &amp; drop items within the trees as well as between trees<br>
Double-click on folder label or click on [+] plus to expand subitems.
</font>
<br><br>
<p>Rich <b>client-side Javascript API</b> gives an opportunity to change tree styles (folder images, fonts, indents, and colors) and manage any part or activity. Our DHTML tree works perfectly in all main Web-browsers for <b>Windows, Mac OS X, Linux or Unix</b> so you don't have to care about the browser compatibility. <br>
dhtmlxTree has built-in <b>checkboxes</b> providing a handy tool for any kind of navigation system where selection lists are required.
</p>
<table width="600">
<tr>
<td colspan="2">
<h3>What's new in version 1.1 (June 22, 2005):</h3>
<li>possibility to use tree without icons - <em>EnableTreeImages</em> method</li>
<li>autoscrolling while drag-and-drop</li>
<li>fixed bug in drag-and-drop on pages with scrollbars</li>
<li>added another drag-n-drop behavior &ndash; drop-as-sibling *</li>
<li><strong>drag-n-drop between frames/iframes</strong> *</li>
<li>OnDrop event handler *</li>
<li>fixed some visual glitches</li>
<li>focus item with script - <em>focusItem</em> method *</li>
<li>advanced xml processing for loading big trees - <strong>tested with 50000 items</strong> *</li>
<li>saving/Restoring tree <strong>state in cookie</strong> *</li>
<li>possibility to <strong>create XML</strong> based on updated tree structure *</li>
<li><strong>search functionality</strong> *</li>
<li>possibility to change <strong>nodes order</strong> *</li>
<li><strong>multi-line</strong> tree items *</li>
<li><strong>context menu</strong> - integration with dhtmlXMenu *</li>
<br>
<small>* - <a href="#editions">professional edition</a></small>
<br><br>
</td>
</tr>
<tr>
<td valign="top">
<h3>Supported Browsers:</h3>
<li>IE 5.x and above</li>
<li>Mac OS X Safari</li>
<li>Mozilla 1.4 and above</li>
<li>FireFox 0.9 and above</li>
<li>Opera (Xml support depends on browser version)</li>
<h3>Features:</h3>
<li>Multibrowser/Multiplatform support </li>
<li>Full controll with JavaScript API</li>
<li>Dynamic loading <font color=gray>(can load data on demand)</font></li>
<li>Dynamic rendering *</li>
<li>XML support <font color=gray>(initializes from XML stream)</font></li>
<li>drag-&-drop <font color=gray>(within one tree, between trees, between frames *)</font></li>
<li>checkboxes <font color=gray>(two/three states)</font></li>
<li>context menu * <font color=gray>(integration with <a href="http://www.scbr.com/docs/products/dhtmlxMenu/index.shtml" target="_blank">dhtmlxMenu</a>)</font></li>
<li>tooltips</li>
<li>multi-line tree items *</li>
<li>customizable icons <font color=gray>(with javascript or xml)</font></li>
<li>user data for nodes</li>
<li>high stability</li>
<li>.NET custom server control</li>
<li>JSP custom tag for Java - <font color=gray><i>pending</i></font></li>
<li>Macromedia Cold Fusion support</li>
<br>
<small>* - <a href="#editions">professional edition</a></small>
<h3>Editions</h3>
<li>Standard - available for free download (for non-commercial use).</li>
<li><a name="editions">Professional</a> - contains <a href="pro_features.html" target="_blank">additional features</a> (with examples) which are not present at standard edition. Avalable for users of Commercial and Enterprice licenses.</li>
<h3>Licensing</h3>
<li><a target="_blank" href="License_GPL.txt">Open Source - GPL</a> (standard edition only)</li>
<li><a target="_blank" name="license" href="License_Commercial.html">Commercial License</a> (standard and professional editions): in order to use any edition of dhtmlxTree in a commercial non-OpenSource project, get all features available in <a href="#editions">professional edition</a> or to have support you can purchase a Commercial License ($99) - please <a href="mailto:info@scand.com">contact us</a></li>
</td>
<td valign="top" style="padding-left:20px">
<h3>Download:</h3>
<a href="download/dhtmlxTree.zip"><li title="Scripts, Samples, Documentation, ColdFusion Tag">Full package (v.1.1 standard)</li></a>
<a href="download/dhtmlxTreeDoc.zip"><li>Documentation only</li></a>
<h3>Examples:</h3>
<a target="_blank" href="samples/treeEx11.html"><li>Initialize object</li></a>
<a target="_blank" href="samples/treeEx12.html"><li>Add/Delete items</li></a>
<a target="_blank" href="samples/treeEx13.html"><li>Attached events</li></a>
<a target="_blank" href="samples/treeEx21.html"><li>Collapse/Expand branch</li></a>
<a target="_blank" href="samples/treeEx22.html"><li>Change item text/images</li></a>
<a target="_blank" href="samples/treeEx23.html"><li>Checkboxes</li></a>
<a target="_blank" href="samples/treeEx24.html"><li>Change design</li></a>
<a target="_blank" href="samples/treeEx31.html"><li>Autoloading from xml</li></a>
<a target="_blank" href="samples/treeEx32.html"><li>Drag and Drop</li></a>
<h3>Documentation:</h3>
<a target="_blank" href="doc/index.html"><li>API Functions and Documentation<br>(including CF custom tag doc)</li></a>
</td>
</tr>
</table>
<br>
<div align="center" style="width:600"><h3><a href="download/dhtmlxTree.zip">Download latest version source code</a></h3></div>
<h3>Code Sample</h3>
<XMP style="color:green">
<link rel="STYLESHEET" type="text/css" href="jTreeX.css">
<script src="dhtmlXCommon.js"></script>
<script src="dhtmlXTree.js"></script>
<script>
var tree1 = null;
function doOnLoad(){
tree1=new dhtmlXTreeObject('treebox1',"100%","100%",0);
tree1.setImagePath("imgs/");
tree1.enableDragAndDrop(true);
tree1.loadXML("tree.xml")
}
</script>
<body onload="doOnLoad()">
<div
id="treebox1"
style=" width:250;
height:250;
background-color:#f5f5f5;
border :1px solid Silver;
overflow:auto;">
</div>
</XMP>
<p>See also our <a href="../jtree/">Java tree applet - jTree</a>.</p>
<center><a href="http://scbr.com/docs/company.shtml" class=menu><img width=468 height=60 border=0 alt="" src=/img/b2.gif></a></center>
<!--#include virtual="/include/bottom.shtml" -->

View File

@ -0,0 +1,201 @@
function dtmlXMLLoaderObject(funcObject,dhtmlObject){
this.xmlDoc="";
this.onloadAction=funcObject||null;
this.mainObject=dhtmlObject||null;
return this;
};
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){
this.check=function(){
if(!dhtmlObject.xmlDoc.readyState)dhtmlObject.onloadAction(dhtmlObject.mainObject);
else{
if(dhtmlObject.xmlDoc.readyState != 4)return false;
else dhtmlObject.onloadAction(dhtmlObject.mainObject);}
};
return this.check;
};
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName){
if(this.xmlDoc.responseXML){var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName);var z=temp[0];}
else var z=this.xmlDoc.documentElement;
if(z)return z;
alert("Incorrect XML");
return document.createElement("DIV");
};
dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){
try
{
var parser = new DOMParser();
this.xmlDoc = parser.parseFromString(xmlString,"text/xml");
}
catch(e){
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.loadXML(xmlString);
}
this.onloadAction(this.mainObject);
}
dtmlXMLLoaderObject.prototype.loadXML=function(filePath){
try
{
this.xmlDoc = new XMLHttpRequest();
this.xmlDoc.open("GET",filePath,true);
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
this.xmlDoc.send(null);
}
catch(e){
if(document.implementation && document.implementation.createDocument)
{
this.xmlDoc = document.implementation.createDocument("","",null);
this.xmlDoc.onload = new this.waitLoadFunction(this);
}
else
{
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.async="true";
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
}
this.xmlDoc.load(filePath);
}
};
function callerFunction(funcObject,dhtmlObject){
this.handler=function(e){
if(!e)e=event;
funcObject(e,dhtmlObject);
return true;
};
return this.handler;
};
function getAbsoluteLeft(htmlObject){
var xPos = htmlObject.offsetLeft;
var temp = htmlObject.offsetParent;
while(temp != null){
xPos+= temp.offsetLeft;
temp = temp.offsetParent;
}
return xPos;
}
function getAbsoluteTop(htmlObject){
var yPos = htmlObject.offsetTop;
var temp = htmlObject.offsetParent;
while(temp != null){
yPos+= temp.offsetTop;
temp = temp.offsetParent;
}
return yPos;
}
function convertStringToBoolean(inputString){if(typeof(inputString)=="string")inputString=inputString.toLowerCase();
switch(inputString){
case "1":
case "true":
case "yes":
case "y":
case 1:
case true:
return true;
break;
default: return false;
}
}
function getUrlSymbol(str){
if(str.indexOf("?")!=-1)
return "&"
else
return "?"
}
function dhtmlDragAndDropObject(){
this.lastLanding=0;
this.dragNode=0;
this.dragStartNode=0;
this.dragStartObject=0;
this.tempDOMU=null;
this.tempDOMM=null;
this.waitDrag=0;
if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;
window.dhtmlDragAndDrop=this;
return this;
};
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){
htmlNode.onmousedown=null;
htmlNode.dragStarter=null;
htmlNode.dragLanding=null;
}
dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject){
htmlNode.onmousedown=this.preCreateDragCopy;
htmlNode.dragStarter=dhtmlObject;
this.addDragLanding(htmlNode,dhtmlObject);
}
dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject){
htmlNode.dragLanding=dhtmlObject;
}
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{
if(window.dhtmlDragAndDrop.waitDrag){
window.dhtmlDragAndDrop.waitDrag=0;
document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
return;
}
window.dhtmlDragAndDrop.waitDrag=1;
window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;
window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;
window.dhtmlDragAndDrop.dragStartNode=this;
window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;
document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;
document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;
};
dhtmlDragAndDropObject.prototype.callDrag=function(e){
if(!e)e=window.event;
dragger=window.dhtmlDragAndDrop;
if(!dragger.dragNode){
dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode);
document.body.appendChild(dragger.dragNode);
document.body.onmouseup=dragger.stopDrag;
dragger.waitDrag=0;
}
dragger.dragNode.style.left=e.clientX+15+document.body.scrollLeft;dragger.dragNode.style.top=e.clientY+3+document.body.scrollTop;
if(!e.srcElement)var z=e.target;else z=e.srcElement;
dragger.checkLanding(z);
}
dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject){
if(htmlObject.dragLanding){if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);
this.lastLanding=htmlObject;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode);}
else{
if(htmlObject.tagName!="BODY")this.checkLanding(htmlObject.parentNode);
else{if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);this.lastLanding=0;}
}
}
dhtmlDragAndDropObject.prototype.stopDrag=function(e){
dragger=window.dhtmlDragAndDrop;
if(dragger.lastLanding)dragger.lastLanding.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,dragger.lastLanding);
dragger.lastLanding=0;
dragger.dragNode.parentNode.removeChild(dragger.dragNode);
dragger.dragNode=0;
dragger.dragStartNode=0;
dragger.dragStartObject=0;
document.body.onmouseup=dragger.tempDOMU;
document.body.onmousemove=dragger.tempDOMM;
dragger.tempDOMU=null;
dragger.tempDOMM=null;
dragger.waitDrag=0;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree. Professional edition features</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>dhtmlxTree Professional Edition Features:</h1>
<hr>
<li>Context Menu</li>
<li>OnDrop event handler</li>
<li>Additional Drag-n-drop behavior &ndash; drop-as-sibling</li>
<li>Drag-n-drop between frames</li>
<li>Focus item with script method</li>
<li>Dynamic rendering &ndash; advanced xml processing for loading big trees when dynamical loading can't be used</li>
<li>Serialization &ndash; possibility to create XML based on updated tree structure.</li>
<li>Search</li>
<li>Multi-line tree items</li>
<li>Saving/Restoring tree state in/from cookies</li>
</body>
</html>

View File

@ -0,0 +1,24 @@
Current version: 1.1 from June 22, 2005 build 714
============================================================================================
If you want to use dhtmlXTree in a commercial product, you have to buy a commercial license.
Please contact us at info@scand.com
Some comments on commercial usage:
1.Commercial License allows you to use dhtmlXTree on unlimited number of Websites or sites
but only in one commercial project(application). According to this license we provide you
with support (consultations) and free-of-charge bug fixing during 3 month.
This license costs $99.
2.Enterprise License allows you to use dhtmlXTree in unlimited number of projects on condition
that all of them are projects of one company. Support period is 2 years.
This license costs $399.
One year support additionally to period specified in license will cost $79 plus.
According to both licenses you are allowed to make changes to the code of Software but Scand LLC
still owns the code and you are not allowed to distribute changed code.

View File

@ -0,0 +1,82 @@
<cfsetting enablecfoutputonly="yes">
<cfparam name="attributes.width" default="100%">
<cfparam name="attributes.height" default="100%">
<cfparam name="attributes.name" default="t#left(replace(CreateUUID(),'-','','All'),15)#">
<cfparam name="attributes.JSPath" default="js/">
<cfparam name="attributes.CSSPath" default="css/">
<cfparam name="attributes.iconspath" default="imgs/">
<cfparam name="attributes.xmldoc" default="">
<cfparam name="attributes.checkboxes" default="none"> <!--- [ Scand: none, twoState, threeState ] --->
<cfparam name="attributes.dragndrop" default="false">
<cfparam name="attributes.style" default="background-color:whitesmoke;border:1px solid blue;">
<cfparam name="attributes.onSelect" default="">
<cfparam name="attributes.onDrop" default="">
<cfparam name="attributes.onCheck" default="">
<cfparam name="attributes.xmlFile" default="">
<cfparam name="attributes.im1" default="">
<cfparam name="attributes.im2" default="">
<cfparam name="attributes.im3" default="">
<cfif not ThisTag.HasEndTag>
<cfabort showerror="You need to supply a closing &lt;CF_dhtmlXTree&gt; tag.">
</cfif>
<cfif ThisTag.ExecutionMode is "End">
<cfsavecontent variable="treeOutput">
<cfoutput>
<cfif not isDefined("request.dhtmlXTreeScriptsInserted")>
<link rel="STYLESHEET" type="text/css" href="#attributes.CSSPath#dhtmlXTree.css">
<script src="#attributes.JSPath#dhtmlXCommon.js"></script>
<script src="#attributes.JSPath#dhtmlXTree.js"></script>
<cfset request.dhtmlXTreeScriptsInserted=1>
</cfif>
<div id="treebox_#attributes.name#" style="width:#attributes.width#; height:#attributes.height#; overflow:auto; #attributes.style#"></div>
<script>
function drawTree#attributes.name#(){
#attributes.name#=new dhtmlXTreeObject('treebox_#attributes.name#',"100%","100%",0);
#attributes.name#.setImagePath("#attributes.iconspath#");
<cfswitch expression="#attributes.checkboxes#">
<cfcase value="twoState">
#attributes.name#.enableCheckBoxes(true)
#attributes.name#.enableThreeStateCheckboxes(false);
</cfcase>
<cfcase value="threeState">
#attributes.name#.enableCheckBoxes(true)
#attributes.name#.enableThreeStateCheckboxes(true);
</cfcase>
<cfdefaultcase>
#attributes.name#.enableCheckBoxes(false)
#attributes.name#.enableThreeStateCheckboxes(false);
</cfdefaultcase>
</cfswitch>
<cfif len(attributes.onSelect)>
#attributes.name#.setOnClickHandler("#attributes.onSelect#");
</cfif>
<cfif len(attributes.onCheck)>
#attributes.name#.setOnCheckHandler("#attributes.onCheck#");
</cfif>
<cfif len(attributes.onDrop)>
#attributes.name#.setDragHandler("#attributes.onDrop#");
</cfif>
#attributes.name#.enableDragAndDrop(#attributes.dragndrop#)
<cfif (len(attributes.im1) or len(attributes.im2)) or len(attributes.im3)>
#attributes.name#.setStdImages("#attributes.im1#","#attributes.im2#","#attributes.im3#");
</cfif>
<cfif len(attributes.xmlFile)>
#attributes.name#.setXMLAutoLoading("#attributes.xmlFile#");
#attributes.name#.loadXML("#attributes.xmlFile#")
</cfif>
<cfif Len(Trim(ThisTag.GeneratedContent))>
#attributes.name#.loadXMLString("<?xml version='1.0'?><tree id='0'>#replace(replace(ThisTag.GeneratedContent,'"',"'","ALL"),"#chr(13)##chr(10)#","","ALL")#</tree>")
</cfif>
};
window.setTimeout("drawTree#attributes.name#()",100);
</script>
</cfoutput>
</cfsavecontent>
<cfset ThisTag.GeneratedContent = treeOutput>
</cfif>
<cfsetting enablecfoutputonly="no">

View File

@ -0,0 +1,122 @@
<style>
td.ex{ font-family:Tahoma,Arial; color:green; font-size:12px;}
</style>
<script>
function onCheck(id){
alert("Check id "+id);
}
function onClick(id){
alert("Click id "+id);
}
function onDrag(id,id2){
alert("Drag id "+id+","+id2);
return true;
}
</script>
<table width="100%">
<tr><td height="200px" width="50%">
<cf_dhtmlXTree jsPath="../js/" cssPath="../css/" iconspath="../imgs/" im1="book.gif" im2="books_open.gif" im3="books_close.gif">
<item text="Mystery &amp; Thrillers" id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</cf_dhtmlXTree>
</td><td class="ex">
&lt;cf_dhtmlXTree im1="book.gif" im2="books_open.gif" im3="books_close.gif" &gt;
<xmp>
<item text="Mystery " id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</xmp>
&lt;/cf_dhtmlXTree&gt;
</td></td></tr>
<tr><td height="200px">
<cf_dhtmlXTree checkboxes="threeState" open="yes" xmlFile="tree4.xml" >
</cf_dhtmlXTree>
</td><td class="ex">
&lt;cf_dhtmlXTree checkboxes="threeState" xmlFile="tree4.xml" &gt;
&lt;/cf_dhtmlXTree&gt;
</td></td></tr>
<tr><td height="200px">
<cf_dhtmlXTree width="50%" dragndrop="true" checkboxes="twoState" onSelect="onClick" onCheck="onCheck" onDrop="onDrag">
<item text="Mystery " id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</cf_dhtmlXTree>
</td><td class="ex">
&lt;cf_dhtmlXTree width="50%" dragndrop="true" checkboxes="twoState" onSelect="onClick" onCheck="onCheck" onDrop="onDrag" &gt;
<xmp>
<item text="Mystery " id="mystery" open="yes" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifters Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
</xmp>
&lt;/cf_dhtmlXTree&gt;
</td></td></tr>
</table>

View File

@ -0,0 +1,64 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Books" id="books" open="1" im0="books_close.gif" im1="tombs.gif" im2="tombs.gif" call="1" select="1">
<item text="Mystery &amp; Thrillers" id="mystery" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Lawrence Block" id="lb" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="All the Flowers Are Dying" id="lb_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar on the Prowl" id="lb_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Plot Thickens" id="lb_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Grifter's Game" id="lb_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Robert Crais" id="rc" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="The Forgotten Man" id="rc_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Stalking the Angel" id="rc_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Free Fall" id="rc_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Sunset Express" id="rc_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Hostage" id="rc_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Ian Rankin" id="ir" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="James Patterson" id="jp" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Nancy Atherton" id="na" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="History" id="history" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="John Mack Faragher" id="jmf" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Jim Dwyer" id="jd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Larry Schweikart" id="ls" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="R. Lee Ermey" id="rle" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Horror" id="horror" open="1" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Stephen King" id="sk" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Dan Brown" id="db" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Angels &amp; Demons" id="db_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="db_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Digital Fortress" id="db_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Da Vinci Code" id="db_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="db_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Mary Janice Davidson" id="mjd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Katie Macalister" id="km" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Science Fiction &amp; Fantasy" id="fantasy" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Audrey Niffenegger" id="af" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Philip Roth" id="pr" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Sport" id="sport" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Bill Reynolds" id="br" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Teens" id="teens" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Joss Whedon" id="jw" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Astonishing X-Men" id="jw_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Joss Whedon: The Genius Behind Buffy" id="jw_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Fray" id="jw_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Tales Of The Vampires" id="jw_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Harvest" id="jw_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Meg Cabot" id="mc" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Garth Nix" id="gn" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Ann Brashares" id="ab" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
</item>
<item text="Magazines" id="magazines" im0="tombs_mag.gif" im1="tombs_mag.gif" im2="tombs_mag.gif">
<item text="Sport" id="mag_sp" im0="magazines_open.gif" im1="magazines_open.gif" im2="magazines_close.gif"></item>
</item>
</tree>

View File

@ -0,0 +1,61 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Books" id="books" open="1" call="1" select="1">
<item text="Mystery &amp; Thrillers" id="mystery" >
<item text="Lawrence Block" id="lb" >
<item text="All the Flowers Are Dying" id="lb_1" />
<item text="The Burglar on the Prowl" id="lb_2" />
<item text="The Plot Thickens" id="lb_3" />
<item text="Grifter's Game" id="lb_4" />
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" />
</item>
<item text="Robert Crais" id="rc" >
<item text="The Forgotten Man" id="rc_1" />
<item text="Stalking the Angel" id="rc_2" />
<item text="Free Fall" id="rc_3" />
<item text="Sunset Express" id="rc_4" />
<item text="Hostage" id="rc_5" />
</item>
<item text="Ian Rankin" id="ir" ></item>
<item text="James Patterson" id="jp" ></item>
<item text="Nancy Atherton" id="na" ></item>
</item>
<item text="History" id="history" >
<item text="John Mack Faragher" id="jmf" ></item>
<item text="Jim Dwyer" id="jd" ></item>
<item text="Larry Schweikart" id="ls" ></item>
<item text="R. Lee Ermey" id="rle" ></item>
</item>
<item text="Horror" id="horror" open="1" >
<item text="Stephen King" id="sk" ></item>
<item text="Dan Brown" id="db" >
<item text="Angels &amp; Demons" id="db_1" />
<item text="Deception Point" id="db_2" />
<item text="Digital Fortress" id="db_3" />
<item text="The Da Vinci Code" id="db_4" />
<item text="Deception Point" id="db_5" />
</item>
<item text="Mary Janice Davidson" id="mjd" ></item>
<item text="Katie Macalister" id="km" ></item>
</item>
<item text="Science Fiction &amp; Fantasy" id="fantasy" >
<item text="Audrey Niffenegger" id="af" ></item>
<item text="Philip Roth" id="pr" ></item>
</item>
<item text="Sport" id="sport" >
<item text="Bill Reynolds" id="br" ></item>
</item>
<item text="Teens" id="teens" >
<item text="Joss Whedon" id="jw" >
<item text="Astonishing X-Men" id="jw_1" />
<item text="Joss Whedon: The Genius Behind Buffy" id="jw_2" />
<item text="Fray" id="jw_3" />
<item text="Tales Of The Vampires" id="jw_4" />
<item text="The Harvest" id="jw_5" />
</item>
<item text="Meg Cabot" id="mc" ></item>
<item text="Garth Nix" id="gn" ></item>
<item text="Ann Brashares" id="ab" ></item>
</item>
</item>
</tree>

View File

@ -0,0 +1,64 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Books" id="2_books" open="1" im0="books_close.gif" im1="tombs.gif" im2="tombs.gif" call="1" select="1">
<item text="Mystery &amp; Thrillers" id="2_mystery" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Lawrence Block" id="2_lb" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="All the Flowers Are Dying" id="2_lb_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar on the Prowl" id="2_lb_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Plot Thickens" id="2_lb_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Grifter's Game" id="2_lb_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar Who Thought He Was Bogart" id="2_lb_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Robert Crais" id="2_rc" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="The Forgotten Man" id="2_rc_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Stalking the Angel" id="2_rc_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Free Fall" id="2_rc_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Sunset Express" id="2_rc_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Hostage" id="2_rc_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Ian Rankin" id="2_ir" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="James Patterson" id="2_jp" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Nancy Atherton" id="2_na" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="History" id="2_history" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="John Mack Faragher" id="2_jmf" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Jim Dwyer" id="2_jd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Larry Schweikart" id="2_ls" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="R. Lee Ermey" id="2_rle" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Horror" id="2_horror" open="1" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Stephen King" id="2_sk" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Dan Brown" id="2_db" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Angels &amp; Demons" id="2_db_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="2_db_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Digital Fortress" id="2_db_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Da Vinci Code" id="2_db_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="2_db_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Mary Janice Davidson" id="2_mjd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Katie Macalister" id="2_km" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Science Fiction &amp; Fantasy" id="2_fantasy" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Audrey Niffenegger" id="2_af" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Philip Roth" id="2_pr" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Sport" id="2_sport" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Bill Reynolds" id="2_br" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Teens" id="2_teens" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Joss Whedon" id="2_jw" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Astonishing X-Men" id="2_jw_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Joss Whedon: The Genius Behind Buffy" id="2_jw_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Fray" id="2_jw_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Tales Of The Vampires" id="2_jw_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Harvest" id="2_jw_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Meg Cabot" id="2_mc" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Garth Nix" id="2_gn" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Ann Brashares" id="2_ab" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
</item>
<item text="Magazines" id="2_magazines" im0="tombs_mag.gif" im1="tombs_mag.gif" im2="tombs_mag.gif">
<item text="Sport" id="2_mag_sp" im0="magazines_open.gif" im1="magazines_open.gif" im2="magazines_close.gif"></item>
</item>
</tree>

View File

@ -0,0 +1,8 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item child="1" text="All the Flowers Are Dying" id="2_lb_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item child="1" text="The Burglar on the Prowl" id="2_lb_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item child="1" text="The Plot Thickens" id="2_lb_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item child="1" text="Grifter's Game" id="2_lb_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item child="1" text="The Burglar Who Thought He Was Bogart" id="2_lb_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</tree>

View File

@ -0,0 +1,57 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Initialize object on page</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Initialize object on page</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<table>
<tr>
<td>
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"/>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree.xml")
</script>
</XMP>
Parameters passed to the constructor are:
<li>object to attach tree to (should be loaded before calling constructor)</li>
<li>width of the tree</li>
<li>height of the tree</li>
<li>identifier of level parent to tree root level</li><br>
Specify Additional parameters of the tree:
<li>setImagePath(url) - method specifies the path to the folder with tree icons</li>
<li>loadXML("tree.xml") - load tree items from XML</li>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree3.xml")
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Add / Delete items</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Add / Delete items</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<script>
function fixImage(id){
switch(tree.getLevel(id)){
case 1:
tree.setItemImage2(id,'books_close.gif','tombs.gif','tombs.gif');
break;
case 2:
tree.setItemImage2(id,'book.gif','books_open.gif','books_close.gif');
break;
case 3:
tree.setItemImage2(id,'book.gif','books_open.gif','book.gif');
break;
default:
tree.setItemImage2(id,'book_titel.gif','book_titel.gif','book_titel.gif');
break;
}
}
</script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
<a href="javascript:void(0);" onclick="var d=new Date(); tree.insertNewItem(tree.getSelectedItemId(),d.valueOf(),document.getElementById('ed1').value,0,0,0,0,'SELECT'); fixImage(d.valueOf());">Insert new child item</a> Item label <input type="text" value="New item" id="ed1"><br><br>
<a href="javascript:void(0);" onclick="var d=new Date(); tree.insertNewNext(tree.getSelectedItemId(),d.valueOf(),document.getElementById('ed2').value,0,0,0,0,'SELECT'); fixImage(d.valueOf());">Insert new item next</a> Item label <input type="text" value="New item" id="ed2"><br><br>
<a href="javascript:void(0);" onclick="tree.deleteItem(tree.getSelectedItemId(),true);">Delete item</a><br><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree.xml")
tree.insertNewItem(0,100,"New Node 1",0,0,0,0,"SELECT");
tree.insertNewNext(2,101,"New Node 2",0,0,0,0,"");
tree.deleteItem("2");
</script>
</XMP>
<li>0s passed to the function for arguments 4-7 (function to call on select, images) mean use default values for them</li>
<li>Last argument is a comma delimited string of following possible value (upper case only):</li>
<li type="circle">SELECT - move selection to this node after inserting</li>
<li type="circle">CALL - call function on select</li>
<li type="circle">TOP - add node to the top position </li>
<li type="circle">CHILD - node has children</li>
<li type="circle">CHECKED - checkbox is checked (if exists)</li>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree3.xml");
/*
tree.insertNewItem(1,100,"New Node 1",0,0,0,0,"SELECT");
tree.insertNewNext(2,101,"New Node 2",0,0,0,0,"");
tree.deleteItem("2");*/
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,82 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Action handlers</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Action handlers</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<table>
<tr>
<td>
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"/>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeBox" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
...
tree.setDragHandler(onDrop);//set function object to call on drop
tree.setOnClickHandler(onNodeSelect);//set function object to call on node select
tree.setOnOpenHandler(aFunc);//set function to call on open/close node
tree.setOnCheckHandler(aFunc);//set function to call on open/close node
tree.setOnDblClickHandler(aFunc);//set function to call on dbl click
</script>
</XMP>
<li>Selected node ID will be passed to function specified as argument for setDefaultAction(funcObj)</li>
<li>Dropped node ID and new parent node ID will be passed to function specified as argument for setDragFunction(funcObj)</li>
<li>node ID will be passed to the function specified as argument for setOpenAction(aFunc)</li>
<li>node ID will be passed to the function specified as argument for setDblClickAction(aFunc)</li>
<script>
function tonclick(id){
alert("Item "+tree.getItemText(id)+" was selected");
};
function tondblclick(id){
alert("Item "+tree.getItemText(id)+" was doubleclicked");
};
function tondrag(id,id2){
return confirm("Do you want to move node "+tree.getItemText(id)+" to item "+tree.getItemText(id2)+"?");
};
function tonopen(id,mode){
return confirm("Do you want to "+(mode>0?"close":"open")+" node "+tree.getItemText(id)+"?");
};
function toncheck(id,state){
alert("Item "+tree.getItemText(id)+" was " +((state)?"checked":"unchecked"));
};
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.enableCheckBoxes(1);
tree.enableDragAndDrop(1);
tree.setOnOpenHandler(tonopen);
tree.setOnClickHandler(tonclick);
tree.setOnCheckHandler(toncheck);
tree.setOnDblClickHandler(tondblclick);
tree.setDragHandler(tondrag);
tree.loadXML("tree3.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,80 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Collapse/Expand</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Collapse/Expand</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<script>
function closeAllRoots(){
var rootsAr = tree.getSubItems(0).split(",")
for(var i=0;i<rootsAr.length;i++){
tree.closeAllItems(rootsAr[i])
}
}
</script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
<a href="javascript:void(0);" onclick="tree.openAllItems(0);">Expand all</a><br><br>
<a href="javascript:void(0);" onclick="tree.closeAllItems(0);">Collapse all</a><br><br>
<a href="javascript:void(0);" onclick="tree.closeItem(tree.getSelectedItemId());">Close selected item</a><br><br>
<a href="javascript:void(0);" onclick="tree.openItem(tree.getSelectedItemId());">Open selected item</a><br><br>
<a href="javascript:void(0);" onclick="tree.closeAllItems(tree.getSelectedItemId());">Collapse selected branch</a><br><br>
<a href="javascript:void(0);" onclick="tree.openAllItems(tree.getSelectedItemId());">Expand selected branch</a><br><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree.xml");
....
//expand all
tree.openAllItems(0);
//open item
tree.openItem(id);
//close item
tree.closeItem(id);
//open branch
tree.openAllItems(id);
//close branch
tree.closeAllItems(id);
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree3.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,100 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Change text/image</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Change text/image</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<script>
function setColor(color1,color2)
{
tree.setItemColor(tree.getSelectedItemId(),color1,color2);
}
</script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
<a href="javascript:void(0);" onclick="var d=new Date(); tree.setItemText(tree.getSelectedItemId(),document.getElementById('ed1').value);">Set new item label</a>&nbsp;<input type="text" value="New label" id="ed1"><br><br>
To change item's image - click on one of next images:
<table>
<tr><td>
<a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'tombs.gif','tombs.gif','tombs.gif');"><img src="../imgs/tombs.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'book.gif','book.gif','book.gif');"><img src="../imgs/book.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'book_titel.gif','book_titel.gif','book_titel.gif');"><img src="../imgs/book_titel.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'magazines_close.gif','magazines_close.gif','magazines_close.gif');"><img src="../imgs/magazines_close.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'leaf.gif','leaf.gif','leaf.gif');"><img src="../imgs/leaf.gif" border="0"></a></td>
</td></tr>
<tr><td nowrap>
<a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'iconJob.gif','iconJob.gif','iconJob.gif');"><img src="../imgs/iconJob.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'iconTask.gif','iconTask.gif','iconTask.gif');"><img src="../imgs/iconTask.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'iconReport.gif','iconReport.gif','iconReport.gif');"><img src="../imgs/iconReport.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'iconClient.gif','iconClient.gif','iconClient.gif');"><img src="../imgs/iconClient.gif" border="0"></a></td>
<td><a href="javascript:void(0);" onclick="tree.setItemImage2(tree.getSelectedItemId(),'iconTimeRecordsEdit.gif','iconTimeRecordsEdit.gif','iconTimeRecordsEdit.gif');"><img src="../imgs/iconTimeRecordsEdit.gif" border="0"></a></td>
</td></tr>
</table>
<br>
To change item's color - click on one of next colors:
<table>
<tr>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#ff0000;" onclick="setColor('#ff0000','#ff0000')">&nbsp;</div></td>
<td><div style="cursor:pointer;width:20px; height:20px; background-color:#ffa500;" onclick="setColor('#ffa500','#ffa500')">&nbsp;</div></td>
<td><div style="cursor:pointer;width:20px; height:20px; background-color:#ffff00;" onclick="setColor('#ffff00','#ffff00')">&nbsp;</div></td>
</tr>
<tr>
<td><div style="cursor:pointer;width:20px; height:20px; background-color:#008000;" onclick="setColor('#008000','#adff2f')">&nbsp;</div></td>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#00ff7f;" onclick="setColor('#00ff7f','#adff2f')">&nbsp;</div></td>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#adff2f;" onclick="setColor('#adff2f')">&nbsp;</div></td>
</tr>
<tr>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#0000ff;" onclick="setColor('#0000ff','#87ceeb')">&nbsp;</div></td>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#9932cc;" onclick="setColor('#9932cc','#9932cc')">&nbsp;</div></td>
<td><div style="cursor:pointer; width:20px; height:20px; background-color:#87ceeb;" onclick="setColor('#87ceeb','#87ceeb')">&nbsp;</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree.xml");
....
//set item text
tree.setItemText(id,"New text");
//set item images
tree.setItemImage2(id,"item.gif","closeItem.gif","openItem.gif");
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree3.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Checkboxes</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Checkboxes</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td style="padding-left:25" valign="top">
Two state checkboxes
<a href="javascript:void(0);" onclick="tree.setCheck(tree.getSelectedItemId(),true);">Check item</a><br><br>
<a href="javascript:void(0);" onclick="tree.setCheck(tree.getSelectedItemId(),false);">UnCheck item</a><br><br>
<a href="javascript:void(0);" onclick="tree.setSubChecked(tree.getSelectedItemId(),true);">Check branch</a><br><br>
<a href="javascript:void(0);" onclick="tree.setSubChecked(tree.getSelectedItemId(),false);">UnCheck branch</a><br><br>
<a href="javascript:void(0);" onclick="alert(tree.getAllChecked());">Get list of checked</a><br><br>
</td>
</tr>
<tr>
<td valign="top">
<div id="treeboxbox_tree2" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td style="padding-left:25" valign="top">
Three state checkboxes<br>
<br>
<a href="javascript:void(0);" onclick="tree2.setCheck(tree2.getSelectedItemId(),true);">Check item</a><br><br>
<a href="javascript:void(0);" onclick="tree2.setCheck(tree2.getSelectedItemId(),false);">UnCheck item</a><br><br>
<a href="javascript:void(0);" onclick="alert(tree2.getAllChecked());">Get list of checked</a><br><br>
</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
//enable checkboxes
tree.enableCheckBoxes(1);
tree.loadXML("tree.xml");
....
//check item
tree.setCheck(id,true);
//uncheck item
tree.setCheck(id,false);
//check branch
tree.setSubChecked(id,true);
//uncheck branch
tree.setSubChecked(id,false);
//check item
tree.setCheck(id,true);
//return ids of checked items
var list=tree.getAllChecked();
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.enableCheckBoxes(1);
tree.loadXML("tree3.xml");
tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
tree2.setImagePath("../imgs/");
tree2.enableCheckBoxes(1);
tree2.enableThreeStateCheckboxes(true);
tree2.loadXML("tree3.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Easy skinable design</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Easy skinable design</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<script>
function setDesign(n){
switch(n){
case 4:
tree.enableTreeLines(true);
tree.setImageArrays("plus","plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif");
tree.setImageArrays("minus","minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif");
tree.setStdImages("book.gif","books_open.gif","books_close.gif");
break;
break;
case 3:
tree.enableTreeLines(true);
tree.setImageArrays("plus","plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif");
tree.setImageArrays("minus","minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif");
tree.setStdImages("item2.gif","close2.gif","open2.gif");
break;
case 2:
tree.enableTreeLines(true);
tree.setImageArrays("plus","open2.gif","open2.gif","open2.gif","open2.gif","open2.gif");
tree.setImageArrays("minus","close2.gif","close2.gif","close2.gif","close2.gif","close2.gif");
tree.setStdImages("book.gif","books_open.gif","books_close.gif");
break;
case 1:
tree.enableTreeLines(false);
tree.setImageArrays("plus","","","","plus_ar.gif","plus_ar.gif");
tree.setImageArrays("minus","","","","minus_ar.gif","minus_ar.gif");
tree.setStdImages("book.gif","books_open.gif","books_close.gif");
break;
}
tree.refreshItem(0);
}
</script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div><br>
<br>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
<a href="javascript:void(0)" onclick="setDesign(1);">Set design 1</a><br>
<a href="javascript:void(0)" onclick="setDesign(2);">Set design 2</a><br>
<a href="javascript:void(0)" onclick="setDesign(3);">Set design 3</a><br>
<a href="javascript:void(0)" onclick="setDesign(4);">Set design 4</a><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.loadXML("tree.xml");
// enable/disable tree lines
tree.enableTreeLines(false);
// set plus images
tree.setImageArrays("plus","","","","open2.gif");
//set minus images
tree.setImageArrays("minus","","","","close2.gif");
//set default node images
tree.setStdImages("book.gif","books_open.gif","books_close.gif");
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.enableDragAndDrop(0);
tree.enableTreeLines(false);
tree.setImageArrays("plus","","","","plus_ar.gif");
tree.setImageArrays("minus","","","","minus_ar.gif");
tree.setStdImages("book.gif","books_open.gif","books_close.gif");
tree.setXMLAutoLoading("tree4.xml");
tree.loadXML("tree4.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,66 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Autoloading from XML</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:12px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Autoloading from XML</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<table>
<tr>
<td valign="top">
<!--- [ Scand: <div id="treeboxbox_tree2" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
<br>
<br> ] --->
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
</td>
<td rowspan="2" style="padding-left:25" valign="top">
Tree has unlimmited level count. Each new level loaded from asp script.
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
//link tree to asp script
tree.setXMLAutoLoading("xml.php");
//load first level of tree
tree.loadXML("xml.asp?id=0");
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.setXMLAutoLoading("xml.php");
tree.loadXML("xml.php?id=0");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DHTML Tree samples. dhtmlXTree - Drag and Drop</title>
</head>
<style>
body {font-size:12px}
.{font-family:arial;font-size:14px}
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
</style>
<body>
<h1>Drag and Drop</h1>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
<script src="../js/dhtmlXCommon.js"></script>
<script src="../js/dhtmlXTree.js"></script>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div><br>
<br>
</td>
<td rstyle="padding-left:25" valign="top">
<div id="treeboxbox_tree2" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div><br>
<br>
</td>
</tr>
</table>
Drag&ampDrop works in each tree and between trees too.
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
//enable Drag&Drop
tree.enableDragAndDrop(1);
//set my Drag&Drop handler
tree.setDragHandler(myDragHandler);
tree.loadXML("tree.xml");
function myDragHandler(idFrom,idTo){
//if we return false then drag&drop be aborted
return true;
}
</script>
</XMP>
<script>
tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setImagePath("../imgs/");
tree.enableDragAndDrop(1);
tree.loadXML("tree3.xml");
tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
tree2.setImagePath("../imgs/");
tree2.enableDragAndDrop(1);
tree2.loadXML("tree5.xml");
</script>
<br><br>
</body>
</html>

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<%
Response.ContentType="text/xml"
Dim url_id
Dim intCurrPos
url_var=request.querystring("id")
Response.Write "<tree id='"+url_var+"'>"
For intCurrPos = 0 To 4
Response.Write "<item child='1' id='"+url_var+CStr(intCurrPos)+"' text='Item "+url_var+"-"+CStr(intCurrPos)+"'></item>"
Next
Response.Write "</tree>"
%>

View File

@ -0,0 +1,10 @@
<?php header("Content-type:text/xml"); print("<?xml version=\"1.0\"?>");
if (isset($_GET["id"]))
$url_var=$_GET["id"];
else
$url_var=0;
print("<tree id='".$url_var."'>");
for ($inta=0; $inta<4; $inta++)
print("<item child='1' id='".$url_var."_".$inta."' text='Item ".$url_var."-".$inta."'></item>");
print("</tree>");
?>

View File

@ -0,0 +1,250 @@
/**
* @desc: xmlLoader object
* @type: private
* @param: funcObject - xml parser function
* @param: object - jsControl object
* @topic: 0
*/
function dtmlXMLLoaderObject(funcObject, dhtmlObject){
this.xmlDoc="";
this.onloadAction=funcObject||null;
this.mainObject=dhtmlObject||null;
return this;
};
/**
* @desc: xml loading handler
* @type: private
* @param: dtmlObject - xmlLoader object
* @topic: 0
*/
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){
this.check=function (){
if (!dhtmlObject.xmlDoc.readyState) dhtmlObject.onloadAction(dhtmlObject.mainObject);
else {
if (dhtmlObject.xmlDoc.readyState != 4) return false;
else dhtmlObject.onloadAction(dhtmlObject.mainObject); }
};
return this.check;
};
/**
* @desc: return XML top node
* @param: tagName - top XML node tag name (not used in IE, required for Safari and Mozilla)
* @type: private
* @returns: top XML node
* @topic: 0
*/
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName){
if (this.xmlDoc.responseXML) { var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName); var z=temp[0]; }
else var z=this.xmlDoc.documentElement;
if (z) return z;
alert("Incorrect XML");
return document.createElement("DIV");
};
/**
* @desc: load XML
* @type: private
* @param: filePath - xml file path
* @topic: 0
*/
dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){
try
{
var parser = new DOMParser();
this.xmlDoc = parser.parseFromString(xmlString,"text/xml");
}
catch(e){
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.loadXML(xmlString);
}
this.onloadAction(this.mainObject);
}
dtmlXMLLoaderObject.prototype.loadXML=function(filePath){
try
{
this.xmlDoc = new XMLHttpRequest();
this.xmlDoc.open("GET",filePath,true);
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
this.xmlDoc.send(null);
}
catch(e){
if (document.implementation && document.implementation.createDocument)
{
this.xmlDoc = document.implementation.createDocument("", "", null);
this.xmlDoc.onload = new this.waitLoadFunction(this);
}
else
{
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.async="true";
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
}
this.xmlDoc.load(filePath);
}
};
/**
* @desc: Call wrapper
* @type: private
* @param: funcObject - action handler
* @param: dhtmlObject - user data
* @returns: function handler
* @topic: 0
*/
function callerFunction(funcObject,dhtmlObject){
this.handler=function(e){
if (!e) e=event;
funcObject(e,dhtmlObject);
return true;
};
return this.handler;
};
/**
* @desc: Calculate absolute position of html object
* @type: private
* @param: htmlObject - html object
* @topic: 0
*/
function getAbsoluteLeft(htmlObject){
var xPos = htmlObject.offsetLeft;
var temp = htmlObject.offsetParent;
while (temp != null) {
xPos += temp.offsetLeft;
temp = temp.offsetParent;
}
return xPos;
}
/**
* @desc: Calculate absolute position of html object
* @type: private
* @param: htmlObject - html object
* @topic: 0
*/
function getAbsoluteTop(htmlObject) {
var yPos = htmlObject.offsetTop;
var temp = htmlObject.offsetParent;
while (temp != null) {
yPos += temp.offsetTop;
temp = temp.offsetParent;
}
return yPos;
}
/**
* @desc: Convert string to it boolean representation
* @type: private
* @param: inputString - string for covertion
* @topic: 0
*/
function convertStringToBoolean(inputString){ if (typeof(inputString)=="string") inputString=inputString.toLowerCase();
switch(inputString){
case "1":
case "true":
case "yes":
case "y":
case 1:
case true:
return true;
break;
default: return false;
}
}
/**
* @desc: find out what symbol to use as url param delimiters in further params
* @type: private
* @param: str - current url string
* @topic: 0
*/
function getUrlSymbol(str){
if(str.indexOf("?")!=-1)
return "&"
else
return "?"
}
function dhtmlDragAndDropObject(){
this.lastLanding=0;
this.dragNode=0;
this.dragStartNode=0;
this.dragStartObject=0;
this.tempDOMU=null;
this.tempDOMM=null;
this.waitDrag=0;
if (window.dhtmlDragAndDrop) return window.dhtmlDragAndDrop;
window.dhtmlDragAndDrop=this;
return this;
};
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){
htmlNode.onmousedown=null;
htmlNode.dragStarter=null;
htmlNode.dragLanding=null;
}
dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject){
htmlNode.onmousedown=this.preCreateDragCopy;
htmlNode.dragStarter=dhtmlObject;
this.addDragLanding(htmlNode,dhtmlObject);
}
dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject){
htmlNode.dragLanding=dhtmlObject;
}
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{
if (window.dhtmlDragAndDrop.waitDrag) {
window.dhtmlDragAndDrop.waitDrag=0;
document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
return;
}
window.dhtmlDragAndDrop.waitDrag=1;
window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;
window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;
window.dhtmlDragAndDrop.dragStartNode=this;
window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;
document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;
document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;
};
dhtmlDragAndDropObject.prototype.callDrag=function(e){
if (!e) e=window.event;
dragger=window.dhtmlDragAndDrop;
if (!dragger.dragNode) {
dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode);
document.body.appendChild(dragger.dragNode);
document.body.onmouseup=dragger.stopDrag;
dragger.waitDrag=0;
}
dragger.dragNode.style.left=e.clientX+15+document.body.scrollLeft; dragger.dragNode.style.top=e.clientY+3+document.body.scrollTop;
if (!e.srcElement) var z=e.target; else z=e.srcElement;
dragger.checkLanding(z);
}
dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject){
if (htmlObject.dragLanding) { if (this.lastLanding) this.lastLanding.dragLanding._dragOut(this.lastLanding);
this.lastLanding=htmlObject; this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode); }
else {
if (htmlObject.tagName!="BODY") this.checkLanding(htmlObject.parentNode);
else { if (this.lastLanding) this.lastLanding.dragLanding._dragOut(this.lastLanding); this.lastLanding=0; }
}
}
dhtmlDragAndDropObject.prototype.stopDrag=function(e){
dragger=window.dhtmlDragAndDrop;
if (dragger.lastLanding) dragger.lastLanding.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,dragger.lastLanding);
dragger.lastLanding=0;
dragger.dragNode.parentNode.removeChild(dragger.dragNode);
dragger.dragNode=0;
dragger.dragStartNode=0;
dragger.dragStartObject=0;
document.body.onmouseup=dragger.tempDOMU;
document.body.onmousemove=dragger.tempDOMM;
dragger.tempDOMU=null;
dragger.tempDOMM=null;
dragger.waitDrag=0;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Books" id="books" open="1" im0="books_close.gif" im1="tombs.gif" im2="tombs.gif" call="1" select="1">
<item text="Mystery !!! &amp; Thrillers" id="mystery" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Lawrence Block" id="lb" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Robert Crais" id="rc" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Ian Rankin" id="ir" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="James Patterson" id="jp" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Nancy Atherton" id="na" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="History" id="history" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="John Mack Faragher" id="jmf" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Jim Dwyer" id="jd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Larry Schweikart" id="ls" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="R. Lee Ermey" id="rle" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Horror" id="horror" open="1" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Stephen King" id="sk" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Dan Brown" id="db" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Mary Janice Davidson" id="mjd" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Katie Macalister" id="km" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Science Fiction &amp; Fantasy" id="fantasy" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Audrey Niffenegger" id="af" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Philip Roth" id="pr" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Sport" id="sport" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Bill Reynolds" id="br" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
<item text="Teens" id="teens" im0="book.gif" im1="books_open.gif" im2="books_close.gif">
<item text="Joss Whedon" id="jw" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Meg Cabot" id="mc" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Garth Nix" id="gn" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
<item text="Ann Brashares" id="ab" im0="book.gif" im1="books_open.gif" im2="book.gif"></item>
</item>
</item>
<item text="Magazines" id="magazines" im0="tombs_mag.gif" im1="tombs_mag.gif" im2="tombs_mag.gif">
<item text="Sport" id="mag_sp" im0="magazines_open.gif" im1="magazines_open.gif" im2="magazines_close.gif"></item>
</item>
</tree>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Lawrence Block" id="t2_lb" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="All the Flowers Are Dying" id="lb_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar on the Prowl" id="lb_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Plot Thickens" id="lb_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Grifter's Game" id="lb_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Burglar Who Thought He Was Bogart" id="lb_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Robert Crais" id="t2_rc" open="1" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="The Forgotten Man" id="rc_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Stalking the Angel" id="rc_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Free Fall" id="rc_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Sunset Express" id="rc_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Hostage" id="rc_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Dan Brown" id="t2_db" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Angels &amp; Demons" id="db_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="db_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Digital Fortress" id="db_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Da Vinci Code" id="db_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Deception Point" id="db_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
<item text="Joss Whedon" id="t2_jw" im0="book.gif" im1="books_open.gif" im2="book.gif">
<item text="Astonishing X-Men" id="jw_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Joss Whedon: The Genius Behind Buffy" id="jw_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Fray" id="jw_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="Tales Of The Vampires" id="jw_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
<item text="The Harvest" id="jw_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>
</item>
</tree>

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

62
xajax.php Normal file
View File

@ -0,0 +1,62 @@
<?php
/**************************************************************************\
* eGroupWare xmlhttp server *
* http://www.egroupware.org *
* This file written by Lars Kneschke <lkneschke@egroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License. *
\**************************************************************************/
/* $Id$ */
/* $Source$ */
require_once('./phpgwapi/inc/xajax.inc.php');
function doXMLHTTP()
{
$numargs = func_num_args();
if($numargs < 1)
return false;
$argList = func_get_args();
$arg0 = array_shift($argList);
list($appName, $className, $functionName) = explode('.',$arg0);
if(substr($className,0,4) != 'ajax')
{
// stopped for security reasons
error_log($_SERVER["PHP_SELF"]. ' stopped for security reason. className '.$className.' is not valid. className must start with ajax!!!');
exit;
}
$GLOBALS['egw_info'] = array();
$GLOBALS['egw_info']['flags'] = array(
'currentapp' => $appName,
'noheader' => True,
'disable_Template_class' => True,
);
include('./header.inc.php');
$sessionid = get_var('sessionid',array('COOKIE','GET'));
$kp3 = get_var('kp3',array('COOKIE','GET'));
// the session has been created already
// the browser is sending all needed egroupware cookies
if($GLOBALS['phpgw']->session->verify($sessionid,$kp3))
{
$ajaxClass = CreateObject("$appName.$className");
return call_user_func_array(array(&$ajaxClass, $functionName), $argList );
}
}
$xajax = new xajax($_SERVER["PHP_SELF"]);
$xajax->registerFunction("doXMLHTTP");
$xajax->processRequests();
?>