fixed problem "found" on www.autosectools.com

This commit is contained in:
Ralf Becker 2011-08-03 07:29:24 +00:00
parent 8039f64bd1
commit 5889da371f
27 changed files with 0 additions and 1634 deletions

View File

@ -1,82 +0,0 @@
<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

@ -1,122 +0,0 @@
<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

@ -1,64 +0,0 @@
<?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

@ -1,61 +0,0 @@
<?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

@ -1,64 +0,0 @@
<?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

@ -1,8 +0,0 @@
<?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

@ -1,57 +0,0 @@
<!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

@ -1,95 +0,0 @@
<!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

@ -1,82 +0,0 @@
<!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

@ -1,80 +0,0 @@
<!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

@ -1,100 +0,0 @@
<!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

@ -1,95 +0,0 @@
<!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

@ -1,109 +0,0 @@
<!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

@ -1,66 +0,0 @@
<!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

@ -1,72 +0,0 @@
<!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

@ -1,14 +0,0 @@
<?php
/*
To run sample application you need to have:
- PHP
- MySQL
To install application, just make sure that your MySQL running and load index.php
after entering suitable (for you) information below
*/
$mysql_host = "localhost";
$mysql_user = "root";
$mysql_pasw = "";
$mysql_db = "sampleDB";
?>

View File

@ -1,10 +0,0 @@
Create database sampledb;
use sampledb;
CREATE TABLE Tree (
item_id INT UNSIGNED not null AUTO_INCREMENT,
item_nm VARCHAR (200) DEFAULT '0',
item_order INT UNSIGNED DEFAULT '0',
item_desc TEXT ,
item_parent_id INT UNSIGNED DEFAULT '0',
PRIMARY KEY ( item_id )
)

View File

@ -1,30 +0,0 @@
<?php
require_once('config.php');
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
mysql_select_db ($mysql_db);
deleteNode($_POST["item_id"]);
mysql_close($link);
//insert item
function deleteNode($id){
deleteBranch($id);
deleteSingleNode($id);
print("<script>top.doDeleteTreeItem('$id');</script>");
}
function deleteSingleNode($id){
$d_sql = "Delete from tree where item_id=".$id;
$resDel = mysql_query($d_sql);
}
function deleteBranch($pid){
$s_sql = "Select item_id from tree where item_parent_id=$pid";
$res = mysql_query($s_sql);
if($res){
while($row=mysql_fetch_array($res)){
deleteBranch($row['item_id']);
deleteSingleNode($row['item_id']);
}
}
}
?>

View File

@ -1,27 +0,0 @@
<?php
header("Content-type:text/xml");
require_once('config.php');
print("<?xml version=\"1.0\"?>");
$id = $_GET["id"];
$pid = $_GET["parent_id"];
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
mysql_select_db ($mysql_db);
saveNewParent($id,$pid);
mysql_close($link);
//creates xml show item details
function saveNewParent($id,$pid){
global $id_out;
$sql = "Update Tree set item_parent_id=$pid where item_id=$id";
$res = mysql_query($sql);
if($res){
$id_out = $id;
}else{
$id_out = "-1";
}
}
?>
<succeedded id="<?=$id_out?>"/>

View File

@ -1,258 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>dhtmlxTree sample</title>
<style>
#details span{
font-size:10px;
font-family:arial;
display:block;
}
#details input,#details textarea{
border: 1px solid gray;
}
#actions a{
font-size:12px;
font-family:arial;
margin:5px;
text-decoration:none;
}
#actions {
border-bottom:1px solid blue;
padding:2px;
margin-bottom:10px;
margin-top:10px;
}
#showproc{
border:1px solid;
border-color: lightblue blue blue lightblue;
background-color: #87ceeb;
font-family:arial;
font-size: 14px;
padding: 5px;
position: absolute;
top:100px;
left:600px;
}
</style>
<link rel="STYLESHEET" type="text/css" href="../../css/dhtmlXTree.css">
<script src="../../js/dhtmlXCommon.js"></script>
<script src="../../js/dhtmlXTree.js"></script>
<script>
//tree object
var tree;
//xml loader to load details from database
var xmlLoader = new dtmlXMLLoaderObject(doLoadDetails,window);
//default label for new item
var newItemLabel = "New Item";
//id for new (unsaved) item
var newItemId = "-1";
//load tree on page
function loadTree(){
tree = new dhtmlXTreeObject("treebox","100%","100%",0);
tree.setImagePath("../../imgs/");
tree.enableDragAndDrop(true);
tree.setDragHandler(doOnBeforeDrop);
tree.setOnClickHandler(doOnSelect);
tree.loadXML("treefromdb.php");
status();
}
//add new node next to currently selected (or the first in tree)
function addNewPeer(){
if(tree.getLevel(newItemId)!=0){//check if unsaved item already exists
alert("New Item (unsaved) already exists")
return false;
}
var selectedId = tree.getSelectedItemId();
if(selectedId!=""){
tree.insertNewNext(selectedId,newItemId,newItemLabel,"","","","","SELECT,CALL",0)
}else{
tree.insertNewItem(0,newItemId,newItemLabel,"","","","","SELECT,CALL",0)
}
}
//add new child node to selected item (or the first item in tree)
function addNewChild(){
if(tree.getLevel(newItemId)!=0){//check if unsaved item already exists
alert("New Item (unsaved) already exists")
return false;
}
var selectedId = tree.getSelectedItemId();
if(selectedId!=""){
tree.insertNewItem(selectedId,newItemId,newItemLabel,"","","","","SELECT,CALL",0)
}else{
tree.insertNewItem(0,newItemId,newItemLabel,"","","","","SELECT,CALL",0)
}
}
//delete item (from database)
function deleteNode(){
status(true);
var f = document.forms["detailsForm"];
if(tree.getSelectedItemId()!=newItemId){//delete node from db
if(!confirm("Are you sure you want to delete selected node?"))
return false;
f.action = "deletenode.php"
f.submit()
}else{//delete unsaved node
doDeleteTreeItem(newItemId);
}
}
//remove item from tree
function doDeleteTreeItem(id){
document.getElementById("details").style.visibility = "hidden";
var pId = tree.getParentId(id);
tree.deleteItem(id);
if(pId!="0")
tree.selectItem(pId,true);
status();
}
//save item
function saveItem(){
status(true);
var f = document.forms["detailsForm"];
f.action = "savenode.php";
f.submit();
}
//save moved (droped) item to db. Cancel drop if save failed or item is new
function doOnBeforeDrop(id,parentId){
if(id==newItemId)
return false;
else{
status(true);
var dropSaver = new dtmlXMLLoaderObject(null,null,false);//sync mode
dropSaver.loadXML("dropprocessor.php?id="+id+"&parent_id="+parentId);
var root = dropSaver.getXMLTopNode("succeedded");
var id = root.getAttribute("id");
if(id==-1){
alert("Save failed");
status();
return false;
}else{
if(tree.getSelectedItemId()==id){//update details (really need only parent id)
loadDetails(id);
}
}
status();
return true;
}
}
//update item
function doUpdateItem(id, label){
var f = document.forms["detailsForm"];
f.item_id.value = id;
tree.changeItemId(tree.getSelectedItemId(),id);
tree.setItemText(id,label);
tree.setItemColor(id,"black","white");
status();
}
//what to do when item selected
function doOnSelect(itemId){
if(itemId!=newItemId){
if(tree.getLevel(newItemId)!=0){
if(confirm("Do you want to save changes?")){//save changes to new item
tree.selectItem(newItemId,false)
saveItem();
return;
}
tree.deleteItem(newItemId);
}
}else{//set color to new item label
tree.setItemColor(itemId,"red","pink")
}
loadDetails(itemId);//load details for selected item
}
//send request to the server to load details
function loadDetails(id){
status(true);
xmlLoader.loadXML("loaddetails.php?id="+id);
}
//populate form of details
function doLoadDetails(obj){
var f = document.forms["detailsForm"];
var root = xmlLoader.getXMLTopNode("details")
var id = root.getAttribute("id");
document.getElementById("details").style.visibility = "visible";
if(id==newItemId){
f.item_nm.value = tree.getItemText(id);
f.item_desc.value = "";
}else{
f.item_nm.value = root.getElementsByTagName("name")[0].firstChild.nodeValue;
if(root.getElementsByTagName("desc")[0].firstChild!=null)
f.item_desc.value = root.getElementsByTagName("desc")[0].firstChild.nodeValue;
else
f.item_desc.value = "";
}
f.item_id.value = id
f.item_parent_id.value = tree.getParentId(id);
status();
}
//show status of request on page
function status(fl){
var d = document.getElementById("showproc");
if(fl)
d.style.display = "";
else
d.style.display = "none";
}
</script>
</head>
<body onload="loadTree()" style="height:100%">
<!--- block for displaying status of request on page --->
<div id="showproc" style="display:block;">Processing...</div>
<h1>dhtmlxTree<br>Relationships with database sample (PHP/MySQL)</h1>
<a href="../dhtmlxTree_db_sample.zip">Get zipped code</a>
<br><br>
<li>Create/Update/Delete nodes in tree with simultaneous database update</li>
<li>Drag-n-drop with simultaneous database update</li>
<div id="actions">
<a href="javascript:void(0)" onclick="addNewPeer()">New Peer</a>|<a href="javascript:void(0)" onclick="addNewChild()">New Child</a>|<a href="javascript:void(0)" onclick="deleteNode()">Delete Node</a>
</div>
<table width="100%">
<tr>
<!--- tree area --->
<td width="250px">
<div id="treebox"
style=" width:250px;
height:250px;
background-color:#f5f5f5;
border :1px solid Silver;"/>
</td>
<!--- details area. visible if any node selected --->
<td id="details"
style="padding:5px;visibility:hidden;" valign="top">
<form name="detailsForm" action="" target="actionframe" method="post">
<span>Node ID:</span>
<input name="item_id" type="Text" style="background-color:lightgrey;width:50px;text-align:right;" name="label" readonly="true"><br>
<span>Parent ID:</span>
<input name="item_parent_id" type="Text" style="background-color:lightgrey;width:50px;text-align:right;" name="label" readonly="true"><br>
<span>Label:</span>
<input name="item_nm" type="Text" maxlength="50" name="label" style="width:200px;"><br>
<span>Descripton:</span>
<textarea name="item_desc" id="textarea" style="height:100px;width:200px;"></textarea><br>
<button type="button" onclick="saveItem()" style="width:200px;">Save</button>
</form>
</td>
</tr>
</table>
<!--- iframe for submiting details form to --->
<iframe name="actionframe" id="actionframe" frameborder="0" width="100%" height="0"></iframe>
<h4>&copy; Scand LLC 2005</h4>
</body>
</html>

View File

@ -1,32 +0,0 @@
<?php
header("Content-type:text/xml");
require_once('config.php');
print("<?xml version=\"1.0\"?>");
$id = $_GET["id"];
?>
<details id="<?=$id?>">
<?php
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
mysql_select_db ($mysql_db);
loadDetails($id);
mysql_close($link);
//creates xml show item details
function loadDetails($id){
$sql = "Select item_nm,item_parent_id,item_desc from Tree where item_id=$id";
$res = mysql_query($sql);
if($res){
while($row=mysql_fetch_array($res)){
print("<name>".$row['item_nm']."</name>");
print("<parent_id>".$row['item_parent_id']."</parent_id>");
print("<desc>".$row['item_desc']."</desc>");
}
}else{
echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>";
}
}
?>
</details>

View File

@ -1,9 +0,0 @@
INSTALLATION INSTRUCTIONS ===========================================================
To run sample application you need to have:
- PHP
- MySQL
To install application, just make sure that your MySQL running and load index.php
after entering suitable (for you) information in config.php
=====================================================================================

View File

@ -1,32 +0,0 @@
<?php
require_once('config.php');
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
mysql_select_db ($mysql_db);
if($_POST["item_id"]==-1){
saveInsert($_POST["item_nm"],$_POST["item_parent_id"],$_POST["item_desc"],0);
}else{
saveUpdate($_POST["item_id"],$_POST["item_nm"],$_POST["item_parent_id"],$_POST["item_desc"],0);
}
mysql_close($link);
//insert item
function saveInsert($name,$parent_id,$desc,$order){
$sql = "Insert into tree(item_nm,item_parent_id,item_desc,item_order) ";
$sql.= "Values('".addslashes($name)."',$parent_id,'".addslashes($desc)."',$order)";
print($sql);
$res = mysql_query($sql);
$newId = mysql_insert_id();
print("<script>top.doUpdateItem('$newId','$name');</script>");
}
//insert item
function saveUpdate($id,$name,$parent_id,$desc,$order){
$sql = "Update tree set item_nm = '".addslashes($name)."',item_parent_id = $parent_id,item_desc = '".addslashes($desc)."',item_order = $order where item_id=$id";
print($sql);
$res = mysql_query($sql);
print("<script>top.doUpdateItem('$id','".addslashes($name)."');</script>");
}
?>

View File

@ -1,41 +0,0 @@
<?php
header("Content-type:text/xml");
require_once('config.php');
print("<?xml version=\"1.0\"?>");
?>
<tree id="0">
<?php
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
$db = mysql_select_db ($mysql_db);
//Create database and table if doesn't exists
if(!$db){
//mysql_create_db($mysql_db,$link);
$sql = "Create database ".$mysql_db;
$res = mysql_query ($sql);
$sql = "use ".$mysql_db;
$res = mysql_query ($sql);
$sql = "CREATE TABLE Tree (item_id INT UNSIGNED not null AUTO_INCREMENT,item_nm VARCHAR (200) DEFAULT '0',item_order INT UNSIGNED DEFAULT '0',item_desc TEXT ,item_parent_id INT UNSIGNED DEFAULT '0',PRIMARY KEY ( item_id ))";
$res = mysql_query ($sql);
if(!$res){
echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>";
}
}
getLevelFromDB(0);
mysql_close($link);
//print one level of the tree, based on parent_id
function getLevelFromDB($parent_id){
$sql = "Select item_id, item_nm from Tree where item_parent_id=$parent_id";
$res = mysql_query ($sql);
if($res){
while($row=mysql_fetch_array($res)){
print("<item id='".$row['item_id']."' text=\"". str_replace('"',"&quot;",$row['item_nm'])."\">");
getLevelFromDB($row['item_id']);
print("</item>");
}
}else{
echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>";
}
}
?>
</tree>

View File

@ -1,14 +0,0 @@
<?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

@ -1,10 +0,0 @@
<?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>");
?>