","|~|",$sXml); + + $this->aObjArray = explode("|~|",$sXml); + + $this->iPos = 0; + $aArray = $this->parseObjXml($rootTag); + + return $aArray; + } + + // parseObjXml() is a recursive function that generates an array from the + // contents of $this->aObjArray. Returns an array. + // used internally + function parseObjXml($rootTag) + { + $aArray = array(); + + if ($rootTag == "xjxobj") + { + while(!stristr($this->aObjArray[$this->iPos],"|~|",$sXml); + $sXml = str_replace("","|~|
") || stristr($this->aObjArray[$this->iPos],"")) + { + $this->iPos++; + continue; + } + $sQuery .= $this->aObjArray[$this->iPos]; + $this->iPos++; + } + parse_str($sQuery, $aArray); + } + + return $aArray; + } + + // Depricated. Use printJavascript(); + function javascript($sJsURI="") + { + trigger_error("xajax: the javascript() method has been renamed printJavascript().
"; + if (objForm && objForm.tagName == 'FORM') + { + var formElements = objForm.elements; + for( var i=0; i < formElements.length; i++) + { + if ((formElements[i].type == 'radio' || formElements[i].type == 'checkbox') && formElements[i].checked == false) + continue; + var name = formElements[i].name; + if (name) + { + if (sXml != '"; + + return sXml; + } + + // Generates an XML message that xajax can understand from a javascript object + this.objectToXML = function(obj) + { + var sXml = " ') + sXml += '&'; + sXml += name+"="+encodeURIComponent(formElements[i].value); + } + } + } + + sXml +=""; + for (i in obj) + { + try + { + if (i == 'constructor') + continue; + if (obj[i] && typeof(obj[i]) == 'function') + continue; + + var key = i; + var value = obj[i]; + if (value && typeof(value)=="object" && + (value.constructor == Array + ) && this.depth <= 50) + { + this.depth++; + value = this.objectToXML(value); + this.depth--; + } + + sXml += " "; + + return sXml; + } + + // Sends a XMLHttpRequest to call the specified PHP function on the server + this.call = function(sFunction, aArgs, sRequestType) + { + var i,r,postData; + if (document.body) + document.body.style.cursor = 'wait'; + bStatusMessages == true){?>window.status = 'Sending Request...'; + bDebug){ ?>this.DebugMessage("Starting xajax..."); + var xajaxRequestType = sRequestType; + var uri = xajaxRequestUri; + var value; + switch(xajaxRequestType) + { + case :{ + var uriGet = uri.indexOf("?")==-1?"?xajax="+encodeURIComponent(sFunction):"&xajax="+encodeURIComponent(sFunction); + for (i = 0; i"; + + } + catch(e) + { + bDebug){ ?>this.DebugMessage(e); + } + } + sXml += " "+key+" "+value+" :{ + postData = "xajax="+encodeURIComponent(sFunction); + postData += "&xajaxr="+new Date().getTime(); + for (i = 0; i ?"GET":"POST", uri, true); + if (xajaxRequestType == ) + { + try + { + r.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); + r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } + catch(e) + { + alert("Your browser does not appear to support asynchronous requests using POST."); + return false; + } + } + r.onreadystatechange = function() + { + if (r.readyState != 4) + return; + + if (r.status==200) + { + bDebug){ ?>xajax.DebugMessage("Received:\n" + r.responseText); + var data = r.responseXML; + if (data) + xajax.processResponse(data); + } + } + bDebug){ ?>this.DebugMessage("Calling "+sFunction +" uri="+uri+" (post:"+ postData +")"); + r.send(postData); + bStatusMessages == true){?>window.status = 'Waiting for data...'; + bDebug){ ?>this.DebugMessage(sFunction + " waiting.."); + delete r; + return true; + } + + // Tests if the new Data is the same as the extant data + this.willChange = function(element, attribute, newData) + { + var oldData; + if (attribute == "innerHTML") + { + tmpXajax = this.$(this.workId); + if (tmpXajax == null) + { + tmpXajax = document.createElement("div"); + tmpXajax.setAttribute('id',this.workId); + tmpXajax.style.display = "none"; + tmpXajax.style.visibility = "hidden"; + document.body.appendChild(tmpXajax); + } + tmpXajax.innerHTML = newData; + newData = tmpXajax.innerHTML; + } + eval("oldData=document.getElementById('"+element+"')."+attribute); + if (newData != oldData) + return true; + + return false; + } + + //Process XML xajaxResponses returned from the request + this.processResponse = function(xml) + { + bStatusMessages == true){?> window.status = 'Recieving data...'; + var tmpXajax = null; + xml = xml.documentElement; + for (i=0; i -1) + { + x = v.indexOf(search)+search.length+1; + v2 += v.substr(0,x).replace(search,data); + v = v.substr(x,v.length-x); + } + if (this.willChange(element,attribute,v2)) + eval('document.getElementById("'+element+'").'+attribute+'=v2;'); + } + if (action=="clear") + eval("document.getElementById('"+element+"')."+attribute+"='';"); + if (action=="remove") + { + objElement = this.$(element); + if (objElement.parentNode && objElement.parentNode.removeChild) + { + objElement.parentNode.removeChild(objElement); + } + } + if (action=="create") + { + var objParent = this.$(element); + objElement = document.createElement(attribute); + objElement.setAttribute('id',data); + if (type && type != '') + objElement.setAttribute('type',type); + objParent.appendChild(objElement); + if (objParent.tagName == "FORM") + { + + } + } + } + } + document.body.style.cursor = 'default'; + bStatusMessages == true){?> window.status = 'Done'; + } + } + + var xajax = new Xajax(); + aFunctions as $sFunction) + $js .= $this->wrap($sFunction,$this->aFunctionRequestTypes[$sFunction]); + + if ($this->bDebug == false) + $js = $this->compressJavascript($js); + + print $js; + } +}// end class xajax +?> diff --git a/phpgwapi/js/dhtmlxtree/License_Commercial.html b/phpgwapi/js/dhtmlxtree/License_Commercial.html new file mode 100644 index 0000000000..7c95316741 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/License_Commercial.html @@ -0,0 +1,52 @@ + + + + + dhtmlxTree Commercial License + + + +dhtmlxTree Commercial License
+ +1. LIMITED LICENSE GRANT.
+ +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 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.
+ +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.
+ +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.
+ + +a) specific restrictions
+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.
+b) general restrictions
+Software may not be transferred, leased, assigned, or sublicensed, in whole or in part.
+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.
+c) disclaimer of warranty
+The Software is provided "AS IS," without a warranty of any kind.
+ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
+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.
+d) limitation of liability.
+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.
+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.
+ +2. COPYRIGHT
+ +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.
+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.
+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.
+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.
+ +The Software and documentation are copyright © 1996-2005 Scand LLC. All rights reserved.
+ + + + diff --git a/phpgwapi/js/dhtmlxtree/License_Enterprise.html b/phpgwapi/js/dhtmlxtree/License_Enterprise.html new file mode 100644 index 0000000000..94ff2f57e7 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/License_Enterprise.html @@ -0,0 +1,51 @@ + + + + +dhtmlxTree Enterprise License + + + +dhtmlxTree Enterprise License
+ +1. LIMITED LICENSE GRANT.
+ +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.
+ +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.
+ +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.
+ +a) specific restrictions
+ +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.
+b) general restrictions
+Software may not be transferred, leased, assigned, or sublicensed, in whole or in part.
+ +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.
+ +c) disclaimer of warranty
+ +The Software is provided "AS IS," without a warranty of any kind.
+ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
+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.
+d) limitation of liability.
+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.
+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.
+ +2. COPYRIGHT
+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.
+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.
+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.
+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.
+The Software and documentation are copyright © 1996-2005 Scand LLC. All rights reserved.
+ + + diff --git a/phpgwapi/js/dhtmlxtree/License_GPL.txt b/phpgwapi/js/dhtmlxtree/License_GPL.txt new file mode 100644 index 0000000000..947e61d70c --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/License_GPL.txt @@ -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. + diff --git a/phpgwapi/js/dhtmlxtree/css/dhtmlXTree.css b/phpgwapi/js/dhtmlxtree/css/dhtmlXTree.css new file mode 100644 index 0000000000..fda00de246 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/css/dhtmlXTree.css @@ -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; } diff --git a/phpgwapi/js/dhtmlxtree/doc/alpha.html b/phpgwapi/js/dhtmlxtree/doc/alpha.html new file mode 100644 index 0000000000..75698c68ab --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/doc/alpha.html @@ -0,0 +1,124 @@ +changeItemId(itemId,newItemId)
change item idclearCut()
clear cutcloseAllItems(itemId)
collapse target node and all child nodescloseItem(itemId)
collapse nodedeleteChildItems(itemId)
delete all child of nodedeleteItem(itemId,selectParent)
delete nodedoCut()
mark selected item as cutteddoPaste(itemId)
insert previously cutted branchenableAutoSavingSelected(mode) + [Commercial] +
enable/disable autosaving selected node in cookieenableCheckBoxes(mode)
hide checkboxesenableContextMenu(menu) + [Commercial] +
enable context menuenableDragAndDrop(mode)
enable/disable drag-and-dropenableDragAndDropScrolling(mode) + [Commercial] +
enable/disable auto scrolling while drag-and-dropenableMultiLineItems(width) + [Commercial] +
enable multi line itemsenableSmartXMLParsing(mode) + [Commercial] +
enable/disable smart XML parsing modeenableThreeStateCheckboxes(mode)
enable three state checkboxesenableTreeImages(mode)
enable tree imagesenableTreeLines(mode)
enableTreeLines(mode);findItem(searchStr,direction,top)
find tree item by text, select and focus itfindItemIdByLabel(searchStr,direction,top)
find tree item by textfocusItem(itemId) + [Commercial] +
focus item in treegetAllChecked()
return list of identificators of nodes with checked checkboxesgetAllCheckedBranches()
return list of identificators of nodes with checked checkboxes, and parent of that checkboxesgetAllSubItems(itemId)
Returns the list of all children items from all next levels of tree, separated by commas.getChildItemIdByIndex(itemId,index)
retun child node identificator by indexgetItemColor(itemId)
get node colorgetItemIdByIndex(itemId,index)
retun node identificator by indexgetItemText(itemId)
return node textgetLevel(itemId)
return node levelgetParentId(itemId)
return parent node identificatorgetSelectedItemId()
retun selected node identificatorgetSelectedItemText()
retun selected node textgetSubItems(itemId)
Returns the list of all children items from the next level of tree, separated by commas.getUserData(itemId,name)
return user data from target nodehasChildren(itemId)
return count of childrensinsertNewItem(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs)
create new child nodeinsertNewNext(parentItemId,itemId,itemName,itemActionHandler,image1,image2,image3,optionStr,childs)
create new node next to specifiedisItemChecked(itemId)
return state of nodes's checkboxloadOpenStates(name) + [Commercial] +
restore open nodes from cookieloadState(name) + [Commercial] +
load tree from cookieloadXML(file)
load tree from xml fileloadXMLString(xmlString)
load tree from xml stringopenAllItems(itemId)
expand target node and all child nodesopenItem(itemId)
expand noderefreshItem(itemId)
refresh tree branch from xmlrestoreSelectedItem(name) + [Commercial] +
restore selected item from cookiesaveOpenStates(name) + [Commercial] +
save open nodes to cookiesaveSelectedItem(name) + [Commercial] +
save selected item to cookiesaveState(name) + [Commercial] +
save tree to cookieselectItem(itemId,mode)
select node ( and optionaly fire onselect event)serializeTree() + [Commercial] +
return xml description of treesetCheck(itemId,state)
change state of node's checkboxsetDragBehavior(mode) + [Commercial] +
set Drag-And-Drop behaviorsetDragHandler(func)
set function called when drag-and-drop event occuredsetDropHandler(func) + [Commercial] +
set function called after drag-and-drap event occuredsetImageArrays(arrayName,image1,image2,image3,image4,image5)
enableTreeLines(mode);setImagePath( newPath )
set path to image directorysetItemCloseable(itemId,flag)
prevent node from closingsetItemColor(itemId,defaultColor,selectedColor)
set node colorsetItemImage(itemId,image1,image2)
set node imagessetItemImage2(itemId, image1,image2,image3)
set node imagessetItemText(itemId,newLabel)
set new node text (HTML allowed)setOnCheckHandler(func)
set function called before checkbox checked/uncheckedsetOnClickHandler(func)
set function called when tree node selectedsetOnDblClickHandler(func)
set function called when tree node double clickedsetOnOpenHandler(func)
set function called before tree node opened/closedsetStdImages(image1,image2,image3)
set default images for nodessetSubChecked(itemId,state)
change state of node's checkbox and all childnodes checkboxessetUserData(itemId,name,value)
set user data for target nodesetXMLAutoLoading(filePath)\ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/doc/guide.html b/phpgwapi/js/dhtmlxtree/doc/guide.html new file mode 100644 index 0000000000..fdbd1c982e --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/doc/guide.html @@ -0,0 +1,346 @@ + + + + +
enables dinamic loading from XML modeDHTML Tree guide and samples + + + + + + + +dhtmlXTree Guide and Samples
++ + ++ + diff --git a/phpgwapi/js/dhtmlxtree/doc/index.html b/phpgwapi/js/dhtmlxtree/doc/index.html new file mode 100644 index 0000000000..8379240715 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/doc/index.html @@ -0,0 +1,55 @@ + + + + +Main features
++ +Multibrowser/Multiplatform support +Full controll with JavaScript +Dynamic loading +XML support +Dynamic rendering (Smart XML parsing) for big trees +drag-&-drop (within one tree, between trees, between frames) +checkboxes (two/three states) +customizable icons (with javascript or xml) +context menu (integration with dhtmlxMenu) +user data for nodes +multi-line tree items +high stability +Macromedia Cold Fusion support +Supported browsers
++ +IE 5.x and above +Mac OS X Safari +Mozilla 1.4 and above +FireFox 0.9 and above +Opera (Xml loading depends on browser version) +Working with dhtmlXTree
+ ++ + + +Initialize object on page
+ +Set Event Handlers
+ +Adding nodes with Script
+ +Loading data with XML
+ +Setting custom icons to nodes
+ +Building dynamic tree
+ + + +Manipulating nodes
+Cold Fusion Tag for dhtmlXTree
+ + +DHTML Tree SDK + + + + ++
+©Scand LLC, 2004 + + + + + + + + diff --git a/phpgwapi/js/dhtmlxtree/doc/ogroup.html b/phpgwapi/js/dhtmlxtree/doc/ogroup.html new file mode 100644 index 0000000000..147c289f5d --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/doc/ogroup.html @@ -0,0 +1,124 @@ ++ ++ dhtmlXTree v.1.1 SDK + ++ ++ guide and code samples + tree samples + ++ api methods: + grouped by type + grouped by object + alphabeticaly sorted + ++ ++ + +dhtmlXTreeObject object API
\ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/doc/tgroup.html b/phpgwapi/js/dhtmlxtree/doc/tgroup.html new file mode 100644 index 0000000000..413cc3ee93 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/doc/tgroup.html @@ -0,0 +1,55 @@ +changeItemId(itemId,newItemId)
change item idclearCut()
clear cutcloseAllItems(itemId)
collapse target node and all child nodescloseItem(itemId)
collapse nodedeleteChildItems(itemId)
delete all child of nodedeleteItem(itemId,selectParent)
delete nodedoCut()
mark selected item as cutteddoPaste(itemId)
insert previously cutted branchenableAutoSavingSelected(mode) + [Commercial] +
enable/disable autosaving selected node in cookieenableCheckBoxes(mode)
hide checkboxesenableContextMenu(menu) + [Commercial] +
enable context menuenableDragAndDrop(mode)
enable/disable drag-and-dropenableDragAndDropScrolling(mode) + [Commercial] +
enable/disable auto scrolling while drag-and-dropenableMultiLineItems(width) + [Commercial] +
enable multi line itemsenableSmartXMLParsing(mode) + [Commercial] +
enable/disable smart XML parsing modeenableThreeStateCheckboxes(mode)
enable three state checkboxesenableTreeImages(mode)
enable tree imagesenableTreeLines(mode)
enableTreeLines(mode);findItem(searchStr,direction,top)
find tree item by text, select and focus itfindItemIdByLabel(searchStr,direction,top)
find tree item by textfocusItem(itemId) + [Commercial] +
focus item in treegetAllChecked()
return list of identificators of nodes with checked checkboxesgetAllCheckedBranches()
return list of identificators of nodes with checked checkboxes, and parent of that checkboxesgetAllSubItems(itemId)
Returns the list of all children items from all next levels of tree, separated by commas.getChildItemIdByIndex(itemId,index)
retun child node identificator by indexgetItemColor(itemId)
get node colorgetItemIdByIndex(itemId,index)
retun node identificator by indexgetItemText(itemId)
return node textgetLevel(itemId)
return node levelgetParentId(itemId)
return parent node identificatorgetSelectedItemId()
retun selected node identificatorgetSelectedItemText()
retun selected node textgetSubItems(itemId)
Returns the list of all children items from the next level of tree, separated by commas.getUserData(itemId,name)
return user data from target nodehasChildren(itemId)
return count of childrensinsertNewItem(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs)
create new child nodeinsertNewNext(parentItemId,itemId,itemName,itemActionHandler,image1,image2,image3,optionStr,childs)
create new node next to specifiedisItemChecked(itemId)
return state of nodes's checkboxloadOpenStates(name) + [Commercial] +
restore open nodes from cookieloadState(name) + [Commercial] +
load tree from cookieloadXML(file)
load tree from xml fileloadXMLString(xmlString)
load tree from xml stringopenAllItems(itemId)
expand target node and all child nodesopenItem(itemId)
expand noderefreshItem(itemId)
refresh tree branch from xmlrestoreSelectedItem(name) + [Commercial] +
restore selected item from cookiesaveOpenStates(name) + [Commercial] +
save open nodes to cookiesaveSelectedItem(name) + [Commercial] +
save selected item to cookiesaveState(name) + [Commercial] +
save tree to cookieselectItem(itemId,mode)
select node ( and optionaly fire onselect event)serializeTree() + [Commercial] +
return xml description of treesetCheck(itemId,state)
change state of node's checkboxsetDragBehavior(mode) + [Commercial] +
set Drag-And-Drop behaviorsetDragHandler(func)
set function called when drag-and-drop event occuredsetDropHandler(func) + [Commercial] +
set function called after drag-and-drap event occuredsetImageArrays(arrayName,image1,image2,image3,image4,image5)
enableTreeLines(mode);setImagePath( newPath )
set path to image directorysetItemCloseable(itemId,flag)
prevent node from closingsetItemColor(itemId,defaultColor,selectedColor)
set node colorsetItemImage(itemId,image1,image2)
set node imagessetItemImage2(itemId, image1,image2,image3)
set node imagessetItemText(itemId,newLabel)
set new node text (HTML allowed)setOnCheckHandler(func)
set function called before checkbox checked/uncheckedsetOnClickHandler(func)
set function called when tree node selectedsetOnDblClickHandler(func)
set function called when tree node double clickedsetOnOpenHandler(func)
set function called before tree node opened/closedsetStdImages(image1,image2,image3)
set default images for nodessetSubChecked(itemId,state)
change state of node's checkbox and all childnodes checkboxessetUserData(itemId,name,value)
set user data for target nodesetXMLAutoLoading(filePath)
enables dinamic loading from XML modedhtmlXTreeObject object API
\ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/index.html b/phpgwapi/js/dhtmlxtree/index.html new file mode 100644 index 0000000000..14402c680f --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/index.html @@ -0,0 +1,191 @@ + + + +Initialization
Selection control
Add/delete
Node/level control
Checkboxes/user data manipulation
Appearence control
dhtmlxTree v.1.1 Standard Edition + + + + + + + + + + + + +Often there is a need to show a hierarchically structured data.
+ +
+Our dhtmlxTree (DHTML extensions Tree) lets you do this in an easy and most comfortable way - in any browser! This JavaScript Tree Menu component 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.
+Having such feature, as dynamical loading of items from XML stream allows dhtmlxTree to handle large amounts of data. Drag-and-drop makes it possible to drag items not just within one tree, but between different trees. Try by yourself now:+
+ + Drag & drop items within the trees as well as between trees+ ++ ++++ + +++
+ Double-click on folder label or click on [+] plus to expand subitems. + +
+Rich client-side Javascript API 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 Windows, Mac OS X, Linux or Unix so you don't have to care about the browser compatibility.
+ +
+dhtmlxTree has built-in checkboxes providing a handy tool for any kind of navigation system where selection lists are required. ++
++ ++ +What's new in version 1.1 (June 22, 2005):
+possibility to use tree without icons - EnableTreeImages method +autoscrolling while drag-and-drop +fixed bug in drag-and-drop on pages with scrollbars +added another drag-n-drop behavior – drop-as-sibling * +drag-n-drop between frames/iframes * +OnDrop event handler * +fixed some visual glitches +focus item with script - focusItem method * +advanced xml processing for loading big trees - tested with 50000 items * +saving/Restoring tree state in cookie * +possibility to create XML based on updated tree structure * +search functionality * +possibility to change nodes order * +multi-line tree items * +context menu - integration with dhtmlXMenu * +
+ * - professional edition +
++ ++ +Supported Browsers:
+IE 5.x and above +Mac OS X Safari +Mozilla 1.4 and above +FireFox 0.9 and above +Opera (Xml support depends on browser version) + +Features:
+Multibrowser/Multiplatform support +Full controll with JavaScript API +Dynamic loading (can load data on demand) +Dynamic rendering * +XML support (initializes from XML stream) +drag-&-drop (within one tree, between trees, between frames *) +checkboxes (two/three states) +context menu * (integration with dhtmlxMenu) +tooltips +multi-line tree items * +customizable icons (with javascript or xml) +user data for nodes +high stability +.NET custom server control +JSP custom tag for Java - pending +Macromedia Cold Fusion support +
+ * - professional edition +Editions
+Standard - available for free download (for non-commercial use). +Professional - contains additional features (with examples) which are not present at standard edition. Avalable for users of Commercial and Enterprice licenses. +Licensing
+Open Source - GPL (standard edition only) +Commercial License (standard and professional editions): in order to use any edition of dhtmlxTree in a commercial non-OpenSource project, get all features available in professional edition or to have support you can purchase a Commercial License ($99) - please contact us ++ +Download:
+Full package (v.1.1 standard) +Documentation only +Examples:
+Initialize object +Add/Delete items +Attached events +Collapse/Expand branch +Change item text/images +Checkboxes +Change design +Autoloading from xml +Drag and Drop +Documentation:
+API Functions and Documentation +
(including CF custom tag doc)
+ +Code Sample
+ ++ + + + + + + + +++See also our Java tree applet - jTree.
++ + \ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/js/dhtmlXCommon.js b/phpgwapi/js/dhtmlxtree/js/dhtmlXCommon.js new file mode 100644 index 0000000000..97f0f4ff05 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/js/dhtmlXCommon.js @@ -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; +} diff --git a/phpgwapi/js/dhtmlxtree/js/dhtmlXTree.js b/phpgwapi/js/dhtmlxtree/js/dhtmlXTree.js new file mode 100644 index 0000000000..6671ee9f84 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/js/dhtmlXTree.js @@ -0,0 +1,1323 @@ + + + +function dhtmlXTreeObject(htmlObject,width,height,rootId){ + if(typeof(htmlObject)!="object") + this.parentObject=document.getElementById(htmlObject); + else + this.parentObject=htmlObject; + this.mytype="tree"; + this.width=width; + this.height=height; + this.rootId=rootId; + + this.style_pointer="pointer"; + if(navigator.appName == 'Microsoft Internet Explorer')this.style_pointer="hand"; + + this.hfMode=0; + this.nodeCut=0; + this.XMLsource=0; + this.XMLloadingWarning=0; + this._globalIdStorage=new Array(); + this.globalNodeStorage=new Array(); + this._globalIdStorageSize=0; + this.treeLinesOn=true; + this.checkFuncHandler=0; + this.openFuncHandler=0; + this.dblclickFuncHandler=0; + this.tscheck=false; + this.timgen=true; + + this.imPath="treeGfx/"; + this.checkArray=new Array("iconUnCheckAll.gif","iconCheckAll.gif","iconCheckGray.gif"); + this.lineArray=new Array("line2.gif","line3.gif","line4.gif","blank.gif","blank.gif"); + this.minusArray=new Array("minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif"); + this.plusArray=new Array("plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif"); + this.imageArray=new Array("leaf.gif","folderOpen.gif","folderClosed.gif"); + this.cutImg= new Array(0,0,0); + this.cutImage="but_cut.gif"; + + this.dragger= new dhtmlDragAndDropObject(); + this.htmlNode=new dhtmlXTreeItemObject(this.rootId,"",0,this); + this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display="none"; + this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className="hiddenRow"; + this.allTree=this._createSelf(); + this.allTree.appendChild(this.htmlNode.htmlNode); + this.allTree.onselectstart=new Function("return false;"); + this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this); + + this.dragger.addDragLanding(this.allTree,this); + return this; +}; + + +function dhtmlXTreeItemObject(itemId,itemText,parentObject,treeObject,actionHandler,mode){ + this.htmlNode=""; + this.acolor=""; + this.scolor=""; + this.tr=0; + this.childsCount=0; + this.tempDOMM=0; + this.tempDOMU=0; + this.dragSpan=0; + this.dragMove=0; + this.span=0; + this.closeble=1; + this.childNodes=new Array(); + + this.checkstate=0; + this.treeNod=treeObject; + this.label=itemText; + this.parentObject=parentObject; + this.actionHandler=actionHandler; + this.images=new Array(treeObject.imageArray[0],treeObject.imageArray[1],treeObject.imageArray[2]); + + + this.id=treeObject._globalIdStorageAdd(itemId,this); + if(this.treeNod.checkBoxOff)this.htmlNode=this.treeNod._createItem(1,this,mode); + else this.htmlNode=this.treeNod._createItem(0,this,mode); + this.htmlNode.objBelong=this; + return this; +}; + + + + dhtmlXTreeObject.prototype._globalIdStorageAdd=function(itemId,itemObject){ + if(this._globalIdStorageFind(itemId)){d=new Date();itemId=d.valueOf()+"_"+itemId;return this._globalIdStorageAdd(itemId,itemObject);} + this._globalIdStorage[this._globalIdStorageSize]=itemId; + this.globalNodeStorage[this._globalIdStorageSize]=itemObject; + this._globalIdStorageSize++; + return itemId; +}; + + dhtmlXTreeObject.prototype._globalIdStorageSub=function(itemId){ + for(var i=0;i 1)beforeNode=parentObject.htmlNode.childNodes[0].childNodes[1].nodem.previousSibling;break; +} +}; +}; + + if((beforeNode)&&(beforeNode.tr.nextSibling)) + parentObject.htmlNode.childNodes[0].insertBefore(tr,beforeNode.tr.nextSibling); + else + parentObject.htmlNode.childNodes[0].appendChild(tr); + + if(this.XMLsource)if((childs)&&(childs!=0))Nodes[Count].XMLload=0;else Nodes[Count].XMLload=1; + + Nodes[Count].tr=tr; + tr.nodem=Nodes[Count]; + + if(parentObject.itemId==0) + tr.childNodes[0].className="hitemIddenRow"; + + if(optionStr){ + var tempStr=optionStr.split(","); + for(var i=0;i =2) +{ + this._correctPlus(Nodes[parentObject.childsCount-2]); + this._correctLine(Nodes[parentObject.childsCount-2]); +} + if(parentObject.childsCount!=2)this._correctPlus(Nodes[0]); + if(this.tscheck)this._correctCheckStates(parentObject); +} + + return Nodes[Count]; +}; + + + dhtmlXTreeObject.prototype.insertNewItem=function(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs){ + var parentObject=this._globalIdStorageFind(parentId); + if(!parentObject)return(-1); + return this._attachChildNode(parentObject,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs); +}; + + dhtmlXTreeObject.prototype._parseXMLTree=function(dhtmlObject,node,parentId,level){ + dhtmlObject.XMLloadingWarning=1; + var nodeAskingCall=""; + if(!node){ + node=dhtmlObject.XMLLoader.getXMLTopNode("tree"); + parentId=node.getAttribute("id"); + dhtmlObject.setCheckList=""; +} + + for(var i=0;i 1){ + if(((Nodes[1].style.display!="none")||(mode==1))&&(mode!=2))nodestyle="none";else nodestyle=""; + for(var i=1;i 1){oldTree._correctPlus(z.childNodes[c-2]); + oldTree._correctLine(z.childNodes[c-2]);} + this._correctPlus(targetObject); + this._correctLine(targetObject); + oldTree._correctPlus(z); + this._correctLine(itemObject); + this._correctPlus(Nodes[Count]); + if(targetObject.childsCount>=2) +{ + this._correctPlus(Nodes[targetObject.childsCount-2]); + this._correctLine(Nodes[targetObject.childsCount-2]); +} + if(this.tscheck)this._correctCheckStates(targetObject); + if(oldTree.tscheck)oldTree._correctCheckStates(z); + return true; +}; + + +dhtmlXTreeObject.prototype._checkParenNodes=function(itemId,htmlObject,shtmlObject){ + if(shtmlObject){if(shtmlObject.parentObject.id==htmlObject.id)return 1;} + if(htmlObject.id==itemId)return 1; + if(htmlObject.parentObject)return this._checkParenNodes(itemId,htmlObject.parentObject);else return 0; +}; + + + + + dhtmlXTreeObject.prototype._clearStyles=function(itemObject){ + var td1=itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[1]; + var td3=td1.nextSibling.nextSibling; + + if(this.checkBoxOff){td1.childNodes[0].style.display="";td1.childNodes[0].onclick=this.onCheckBoxClick;} + else td1.childNodes[0].style.display="none"; + td1.childNodes[0].treeNod=this; + + this.dragger.removeDraggableItem(td3); + if(this.dragAndDropOff)this.dragger.addDraggableItem(td3,this); + td3.childNodes[0].className="standartTreeRow"; + td3.onclick=this.onRowSelect;td3.ondblclick=this.onRowClick2; + td1.previousSibling.onclick=this.onRowClick; + + + this._correctLine(itemObject); + this._correctPlus(itemObject); + for(var i=0;i 0))){if(list)list+=","+htmlNode.id;else list=htmlNode.id;} + var j=htmlNode.childsCount; + for(var i=0;i 0) +{ + temp=temp.nextSibling; + if((!temp)||(!temp.nodem))return 0; + index--; +} + return temp.nodem.id; +}; + + dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(itemId,index){ + var sNode=this._globalIdStorageFind(itemId); + if(!sNode)return(0); + if(this.hasChildren(itemId) + + + + DHTML Tree. Professional edition features + + + + +dhtmlxTree Professional Edition Features:
+
+Context Menu +OnDrop event handler +Additional Drag-n-drop behavior – drop-as-sibling +Drag-n-drop between frames +Focus item with script method +Dynamic rendering – advanced xml processing for loading big trees when dynamical loading can't be used +Serialization – possibility to create XML based on updated tree structure. +Search +Multi-line tree items +Saving/Restoring tree state in/from cookies + + + + diff --git a/phpgwapi/js/dhtmlxtree/readme.txt b/phpgwapi/js/dhtmlxtree/readme.txt new file mode 100644 index 0000000000..42037fa385 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/readme.txt @@ -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. + diff --git a/phpgwapi/js/dhtmlxtree/samples/dhtmlXTree.cfm b/phpgwapi/js/dhtmlxtree/samples/dhtmlXTree.cfm new file mode 100644 index 0000000000..f2ce9ed492 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/dhtmlXTree.cfm @@ -0,0 +1,82 @@ ++ + + + + + + + + + + + + + + + + + + + + + ++ + ++ + ++ + ++ + + + + + ++ + \ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/samples/example.cfm b/phpgwapi/js/dhtmlxtree/samples/example.cfm new file mode 100644 index 0000000000..6298250b80 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/example.cfm @@ -0,0 +1,122 @@ + + + + +
\ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/samples/tree3.xml b/phpgwapi/js/dhtmlxtree/samples/tree3.xml new file mode 100644 index 0000000000..79f13eed5e --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/tree3.xml @@ -0,0 +1,64 @@ + ++ + + +- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+ <cf_dhtmlXTree im1="book.gif" im2="books_open.gif" im3="books_close.gif" > + + + </cf_dhtmlXTree> + +- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+ + + ++ <cf_dhtmlXTree checkboxes="threeState" xmlFile="tree4.xml" > + </cf_dhtmlXTree> + + + + + +- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+ <cf_dhtmlXTree width="50%" dragndrop="true" checkboxes="twoState" onSelect="onClick" onCheck="onCheck" onDrop="onDrag" > + + + </cf_dhtmlXTree> + +- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+ diff --git a/phpgwapi/js/dhtmlxtree/samples/tree4.xml b/phpgwapi/js/dhtmlxtree/samples/tree4.xml new file mode 100644 index 0000000000..c74ca65901 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/tree4.xml @@ -0,0 +1,61 @@ + +- +
+- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
+- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
+- +
- +
+- +
+- +
- +
- +
- +
- +
- +
- +
- +
- +
+- +
+ diff --git a/phpgwapi/js/dhtmlxtree/samples/tree5.xml b/phpgwapi/js/dhtmlxtree/samples/tree5.xml new file mode 100644 index 0000000000..42f89ef5fc --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/tree5.xml @@ -0,0 +1,64 @@ + +- +
+- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
+- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
+- +
- +
+- +
+- +
- +
- +
- +
- +
- +
- +
- +
+ diff --git a/phpgwapi/js/dhtmlxtree/samples/tree6.xml b/phpgwapi/js/dhtmlxtree/samples/tree6.xml new file mode 100644 index 0000000000..bbc8081eb8 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/tree6.xml @@ -0,0 +1,8 @@ + +- +
+- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
+- +
- +
+- +
- +
- +
- +
- +
- +
- +
- +
+- +
- +
- +
+- +
- +
+- +
+- +
- +
- +
- +
- +
- +
- +
- +
- +
+- +
+ diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx11.html b/phpgwapi/js/dhtmlxtree/samples/treeEx11.html new file mode 100644 index 0000000000..5c16c1c7c4 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx11.html @@ -0,0 +1,57 @@ + + + + +- +
- +
- +
- +
- +
DHTML Tree samples. dhtmlXTree - Initialize object on page + + + +Initialize object on page
+ + + ++
++ ++ + ++ + + ++ ++
++ + + + Parameters passed to the constructor are: +object to attach tree to (should be loaded before calling constructor) +width of the tree +height of the tree +identifier of level parent to tree root level
+ Specify Additional parameters of the tree: +setImagePath(url) - method specifies the path to the folder with tree icons +loadXML("tree.xml") - load tree items from XML + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx12.html b/phpgwapi/js/dhtmlxtree/samples/treeEx12.html new file mode 100644 index 0000000000..56bbeeda2b --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx12.html @@ -0,0 +1,95 @@ + + + + +DHTML Tree samples. dhtmlXTree - Add / Delete items + + + +Add / Delete items
+ + + + ++
++ ++ + + + ++ + + Insert new child item Item label +
+ + Insert new item next Item label
+ + Delete item
+ + + ++ ++
+ ++ + + +0s passed to the function for arguments 4-7 (function to call on select, images) mean use default values for them +Last argument is a comma delimited string of following possible value (upper case only): +SELECT - move selection to this node after inserting +CALL - call function on select +TOP - add node to the top position +CHILD - node has children +CHECKED - checkbox is checked (if exists) + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx13.html b/phpgwapi/js/dhtmlxtree/samples/treeEx13.html new file mode 100644 index 0000000000..9358416b60 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx13.html @@ -0,0 +1,82 @@ + + + + +DHTML Tree samples. dhtmlXTree - Action handlers + + + +Action handlers
+ + + + ++
++ ++ + ++ + ++ ++
++ + + +Selected node ID will be passed to function specified as argument for setDefaultAction(funcObj) +Dropped node ID and new parent node ID will be passed to function specified as argument for setDragFunction(funcObj) +node ID will be passed to the function specified as argument for setOpenAction(aFunc) +node ID will be passed to the function specified as argument for setDblClickAction(aFunc) + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx21.html b/phpgwapi/js/dhtmlxtree/samples/treeEx21.html new file mode 100644 index 0000000000..7df293b711 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx21.html @@ -0,0 +1,80 @@ + + + + +DHTML Tree samples. dhtmlXTree - Collapse/Expand + + + +Collapse/Expand
+ + + + ++
++ ++ + + + ++ + + Expand all +
+ Collapse all
+ Close selected item
+ Open selected item
+ Collapse selected branch
+ Expand selected branch
+ ++ ++
++ + + + + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx22.html b/phpgwapi/js/dhtmlxtree/samples/treeEx22.html new file mode 100644 index 0000000000..b148f4a142 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx22.html @@ -0,0 +1,100 @@ + + + + +DHTML Tree samples. dhtmlXTree - Change text/image + + + +Change text/image
+ + + + ++
++ ++ + ++ + + Set new item label +
+ + To change item's image - click on one of next images: ++
++ + ++ + + + + + ++ + + +
+ To change item's color - click on one of next colors: ++
++ ++ + + + ++ + + + ++ + + + ++
++ + + + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx23.html b/phpgwapi/js/dhtmlxtree/samples/treeEx23.html new file mode 100644 index 0000000000..a78ec07c16 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx23.html @@ -0,0 +1,95 @@ + + + + +DHTML Tree samples. dhtmlXTree - Checkboxes + + + +Checkboxes
+ + + + ++
++ ++ + ++ + Two state checkboxes + Check item +
+ UnCheck item
+ Check branch
+ UnCheck branch
+ + Get list of checked
+ ++ ++ + ++ + Three state checkboxes +
+
+ + Check item
+ UnCheck item
+ + Get list of checked
+ +
++ + + + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx24.html b/phpgwapi/js/dhtmlxtree/samples/treeEx24.html new file mode 100644 index 0000000000..614386600f --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx24.html @@ -0,0 +1,109 @@ + + + + +DHTML Tree samples. dhtmlXTree - Easy skinable design + + + +Easy skinable design
+ + + + ++
++ ++ + + +
+
+ ++ + Set design 1 +
+ Set design 2
+ Set design 3
+ Set design 4
+ + ++ ++
++ + + + + +
+ + + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx31.html b/phpgwapi/js/dhtmlxtree/samples/treeEx31.html new file mode 100644 index 0000000000..79fe889188 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx31.html @@ -0,0 +1,66 @@ + + + + +DHTML Tree samples. dhtmlXTree - Autoloading from XML + + + +Autoloading from XML
+ + + + ++
++ ++ + + + ++ Tree has unlimmited level count. Each new level loaded from asp script. + + + + + + + + ++ ++
++ + + + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/treeEx32.html b/phpgwapi/js/dhtmlxtree/samples/treeEx32.html new file mode 100644 index 0000000000..24ee99d1f5 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/treeEx32.html @@ -0,0 +1,72 @@ + + + + +DHTML Tree samples. dhtmlXTree - Drag and Drop + + + +Drag and Drop
+ + + + ++
+ Drag&Drop works in each tree and between trees too. ++ + ++ + +
+
+ ++ + +
+
+ +
++ + + + + +
+ + + diff --git a/phpgwapi/js/dhtmlxtree/samples/xml.asp b/phpgwapi/js/dhtmlxtree/samples/xml.asp new file mode 100644 index 0000000000..4c5b2c9525 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/xml.asp @@ -0,0 +1,14 @@ + +<% +Response.ContentType="text/xml" + +Dim url_id +Dim intCurrPos +url_var=request.querystring("id") + +Response.Write "" + For intCurrPos = 0 To 4 + Response.Write " " +%> diff --git a/phpgwapi/js/dhtmlxtree/samples/xml.php b/phpgwapi/js/dhtmlxtree/samples/xml.php new file mode 100644 index 0000000000..c9da831420 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/samples/xml.php @@ -0,0 +1,10 @@ +"); +if (isset($_GET["id"])) + $url_var=$_GET["id"]; +else + $url_var=0; +print("- " + Next +Response.Write "
"); + for ($inta=0; $inta<4; $inta++) + print(" "); +?> diff --git a/phpgwapi/js/dhtmlxtree/src/dhtmlXCommon.js b/phpgwapi/js/dhtmlxtree/src/dhtmlXCommon.js new file mode 100644 index 0000000000..61bfc494ab --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/src/dhtmlXCommon.js @@ -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; + } \ No newline at end of file diff --git a/phpgwapi/js/dhtmlxtree/src/dhtmlXTree.js b/phpgwapi/js/dhtmlxtree/src/dhtmlXTree.js new file mode 100644 index 0000000000..83ea889d12 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/src/dhtmlXTree.js @@ -0,0 +1,1878 @@ +/*_TOPICS_ +@0:Initialization +@1:Selection control +@2:Add/delete +@3:Private +@4:Node/level control +@5:Checkboxes/user data manipulation +@6:Appearence control +*/ + +/** +* @desc: tree constructor +* @param: htmlObject - parent html object or id of parent html object +* @param: width - tree width +* @param: height - tree height +* @param: rootId - id of virtual root node +* @type: public +* @topic: 0 +*/ +function dhtmlXTreeObject(htmlObject, width, height, rootId){ + if (typeof(htmlObject)!="object") + this.parentObject=document.getElementById(htmlObject); + else + this.parentObject=htmlObject; + this.mytype="tree"; + this.width=width; + this.height=height; + this.rootId=rootId; + + this.hfMode=0; + this.nodeCut=0; + this.XMLsource=0; + this.XMLloadingWarning=0; + this._globalIdStorage=new Array(); + this.globalNodeStorage=new Array(); + this._globalIdStorageSize=0; + this.treeLinesOn=true; + this.checkFuncHandler=0; + this.openFuncHandler=0; + this.dblclickFuncHandler=0; + this.tscheck=false; + this.timgen=true; + + this.imPath="treeGfx/"; + this.checkArray=new Array("iconUnCheckAll.gif","iconCheckAll.gif","iconCheckGray.gif"); + this.lineArray=new Array("line2.gif","line3.gif","line4.gif","blank.gif","blank.gif"); + this.minusArray=new Array("minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif"); + this.plusArray=new Array("plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif"); + this.imageArray=new Array("leaf.gif","folderOpen.gif","folderClosed.gif"); + this.cutImg= new Array(0,0,0); + this.cutImage="but_cut.gif"; + + this.dragger= new dhtmlDragAndDropObject(); +//create root + this.htmlNode=new dhtmlXTreeItemObject(this.rootId,"",0,this); + this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display="none"; + this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className="hiddenRow"; +//init tree structures + this.allTree=this._createSelf(); + this.allTree.appendChild(this.htmlNode.htmlNode); + this.allTree.onselectstart=new Function("return false;"); + this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this); + + this.dragger.addDragLanding(this.allTree,this); + return this; +}; + +/** +* @desc: tree node constructor +* @param: itemId - node id +* @param: itemText - node label +* @param: parentObject - parent item object +* @param: treeObject - tree object +* @param: actionHandler - onclick event handler(optional) +* @param: mode - do not show images +* @type: private +* @topic: 0 +*/ +function dhtmlXTreeItemObject(itemId,itemText,parentObject,treeObject,actionHandler,mode){ + this.htmlNode=""; + this.acolor=""; + this.scolor=""; + this.tr=0; + this.childsCount=0; + this.tempDOMM=0; + this.tempDOMU=0; + this.dragSpan=0; + this.dragMove=0; + this.span=0; + this.closeble=1; + this.childNodes=new Array(); + + this.checkstate=0; + this.treeNod=treeObject; + this.label=itemText; + this.parentObject=parentObject; + this.actionHandler=actionHandler; + this.images=new Array(treeObject.imageArray[0],treeObject.imageArray[1],treeObject.imageArray[2]); + + + this.id=treeObject._globalIdStorageAdd(itemId,this); + if (this.treeNod.checkBoxOff ) this.htmlNode=this.treeNod._createItem(1,this,mode); + else this.htmlNode=this.treeNod._createItem(0,this,mode); + this.htmlNode.objBelong=this; + return this; + }; + + +/** +* @desc: register node +* @type: private +* @param: itemId - node identificator +* @param: itemObject - node object +* @topic: 3 +*/ + dhtmlXTreeObject.prototype._globalIdStorageAdd=function(itemId,itemObject){ + if (this._globalIdStorageFind(itemId)) { d=new Date(); itemId=d.valueOf()+"_"+itemId; return this._globalIdStorageAdd(itemId,itemObject); } + this._globalIdStorage[this._globalIdStorageSize]=itemId; + this.globalNodeStorage[this._globalIdStorageSize]=itemObject; + this._globalIdStorageSize++; + return itemId; + }; +/** +* @desc: unregister node +* @type: private +* @param: itemId - node identificator +* @topic: 3 +*/ + dhtmlXTreeObject.prototype._globalIdStorageSub=function(itemId){ + for (var i=0; i- "); +print("
1) beforeNode=parentObject.htmlNode.childNodes[0].childNodes[1].nodem.previousSibling; break; + } + }; + }; + + if ((beforeNode)&&(beforeNode.tr.nextSibling)) + parentObject.htmlNode.childNodes[0].insertBefore(tr,beforeNode.tr.nextSibling); + else + parentObject.htmlNode.childNodes[0].appendChild(tr); + + if (this.XMLsource) if ((childs)&&(childs!=0)) Nodes[Count].XMLload=0; else Nodes[Count].XMLload=1; + + Nodes[Count].tr=tr; + tr.nodem=Nodes[Count]; + + if (parentObject.itemId==0) + tr.childNodes[0].className="hitemIddenRow"; + + if (optionStr) { + var tempStr=optionStr.split(","); + for (var i=0; i =2) + { + this._correctPlus(Nodes[parentObject.childsCount-2]); + this._correctLine(Nodes[parentObject.childsCount-2]); + } + if (parentObject.childsCount!=2) this._correctPlus(Nodes[0]); + if (this.tscheck) this._correctCheckStates(parentObject); + } + + return Nodes[Count]; +}; + +/** +* @desc: create new child node +* @type: public +* @param: parentId - parent node id +* @param: itemId - new node id +* @param: itemText - new node text +* @param: itemActionHandler - function fired on node select event (optional) +* @param: image1 - image for node without childrens; (optional) +* @param: image2 - image for closed node; (optional) +* @param: image3 - image for opened node (optional) +* @param: optionStr - options string (optional) +* @param: childs - node childs flag (for dynamical trees) (optional) +* @topic: 2 +*/ + dhtmlXTreeObject.prototype.insertNewItem=function(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs){ + var parentObject=this._globalIdStorageFind(parentId); + if (!parentObject) return (-1); + return this._attachChildNode(parentObject,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs); + }; +/** +* @desc: parse xml +* @type: private +* @param: dhtmlObject - jsTree object +* @param: node - top XML node +* @param: parentId - parent node id +* @param: level - level of tree +* @topic: 2 +*/ + dhtmlXTreeObject.prototype._parseXMLTree=function(dhtmlObject,node,parentId,level){ + dhtmlObject.XMLloadingWarning=1; + var nodeAskingCall=""; + if (!node) { + node=dhtmlObject.XMLLoader.getXMLTopNode("tree"); + parentId=node.getAttribute("id"); + } + + for(var i=0; i 1){ + if ( ( (Nodes[1].style.display!="none") || (mode==1) ) && (mode!=2) ) nodestyle="none"; else nodestyle=""; + for (var i=1; i 1) { oldTree._correctPlus(z.childNodes[c-2]); + oldTree._correctLine(z.childNodes[c-2]); } + this._correctPlus(targetObject); + this._correctLine(targetObject); + oldTree._correctPlus(z); + this._correctLine(itemObject); + this._correctPlus(Nodes[Count]); + if (targetObject.childsCount>=2) + { + this._correctPlus(Nodes[targetObject.childsCount-2]); + this._correctLine(Nodes[targetObject.childsCount-2]); + } + if (this.tscheck) this._correctCheckStates(targetObject); + if (oldTree.tscheck) oldTree._correctCheckStates(z); + return true; + }; + +/** +* @desc: check possibility of drag-and-drop +* @type: private +* @param: itemId - draged node id +* @param: htmlObject - droped node object +* @param: shtmlObject - sourse node object +* @topic: 6 +*/ +dhtmlXTreeObject.prototype._checkParenNodes=function(itemId,htmlObject,shtmlObject){ + if (shtmlObject) { if (shtmlObject.parentObject.id==htmlObject.id) return 1; } + if (htmlObject.id==itemId) return 1; + if (htmlObject.parentObject) return this._checkParenNodes(itemId,htmlObject.parentObject); else return 0; + }; + + + +/** +* @desc: recursive set default styles for node +* @type: private +* @param: itemObject - target node object +* @topic: 6 +*/ + dhtmlXTreeObject.prototype._clearStyles=function(itemObject){ + var td1=itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[1]; + var td3=td1.nextSibling.nextSibling; + + if (this.checkBoxOff) { td1.childNodes[0].style.display=""; td1.childNodes[0].onclick=this.onCheckBoxClick; } + else td1.childNodes[0].style.display="none"; + td1.childNodes[0].treeNod=this; + + this.dragger.removeDraggableItem(td3); + if (this.dragAndDropOff) this.dragger.addDraggableItem(td3,this); + td3.childNodes[0].className="standartTreeRow"; + td3.onclick=this.onRowSelect; td3.ondblclick=this.onRowClick2; + td1.previousSibling.onclick=this.onRowClick; + + + this._correctLine(itemObject); + this._correctPlus(itemObject); + for (var i=0; i 0))) { if (list) list+=","+htmlNode.id; else list=htmlNode.id; } + var j=htmlNode.childsCount; + for (var i=0; i 0) + { + temp=temp.nextSibling; + if ((!temp)||(!temp.nodem)) return 0; + index--; + } + return temp.nodem.id; + }; +/** +* @desc: retun child node identificator by index +* @type: public +* @param: itemId - parent node identificator +* @param: index - index of child node +* @topic: 1 +*/ + dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(itemId,index){ + var sNode=this._globalIdStorageFind(itemId); + if (!sNode) return (0); + if (this.hasChildren(itemId) + + diff --git a/phpgwapi/js/dhtmlxtree/tree2.xml b/phpgwapi/js/dhtmlxtree/tree2.xml new file mode 100644 index 0000000000..6d31941c87 --- /dev/null +++ b/phpgwapi/js/dhtmlxtree/tree2.xml @@ -0,0 +1,31 @@ + +- +
+- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
+- +
- +
- +
+- +
- +
+- +
- +
- +
- +
- +
+- +
+ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/blank.gif b/phpgwapi/templates/default/images/dhtmlxtree/blank.gif new file mode 100644 index 0000000000..d7ae406713 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/blank.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/book.gif b/phpgwapi/templates/default/images/dhtmlxtree/book.gif new file mode 100644 index 0000000000..b0ce63a9d1 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/book.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/book_titel.gif b/phpgwapi/templates/default/images/dhtmlxtree/book_titel.gif new file mode 100644 index 0000000000..31c916d065 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/book_titel.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/books_close.gif b/phpgwapi/templates/default/images/dhtmlxtree/books_close.gif new file mode 100644 index 0000000000..e4bd9d6fe2 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/books_close.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/books_open.gif b/phpgwapi/templates/default/images/dhtmlxtree/books_open.gif new file mode 100644 index 0000000000..020ce728c0 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/books_open.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/btn_up1.gif b/phpgwapi/templates/default/images/dhtmlxtree/btn_up1.gif new file mode 100644 index 0000000000..dd7675fd62 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/btn_up1.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/btn_up2.gif b/phpgwapi/templates/default/images/dhtmlxtree/btn_up2.gif new file mode 100644 index 0000000000..a7837e0f7f Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/btn_up2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/close2.gif b/phpgwapi/templates/default/images/dhtmlxtree/close2.gif new file mode 100644 index 0000000000..94c267d5b9 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/close2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/folderClosed.gif b/phpgwapi/templates/default/images/dhtmlxtree/folderClosed.gif new file mode 100644 index 0000000000..1ebe3c977b Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/folderClosed.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/folderOpen.gif b/phpgwapi/templates/default/images/dhtmlxtree/folderOpen.gif new file mode 100644 index 0000000000..c193e869f1 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/folderOpen.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconCheckAll.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconCheckAll.gif new file mode 100644 index 0000000000..d90899259b Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconCheckAll.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconCheckGray.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconCheckGray.gif new file mode 100644 index 0000000000..cb54c0a8f3 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconCheckGray.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconClient.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconClient.gif new file mode 100644 index 0000000000..95b3b75913 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconClient.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconDeleteSelected.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconDeleteSelected.gif new file mode 100644 index 0000000000..1fd762b44d Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconDeleteSelected.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconJob.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconJob.gif new file mode 100644 index 0000000000..c073898e99 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconJob.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconReport.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconReport.gif new file mode 100644 index 0000000000..bdcc6a54da Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconReport.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconTask.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconTask.gif new file mode 100644 index 0000000000..a43d60d2be Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconTask.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconTimeRecordsEdit.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconTimeRecordsEdit.gif new file mode 100644 index 0000000000..1ca8341d26 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconTimeRecordsEdit.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/iconUnCheckAll.gif b/phpgwapi/templates/default/images/dhtmlxtree/iconUnCheckAll.gif new file mode 100644 index 0000000000..5e54ec5995 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/iconUnCheckAll.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/item.gif b/phpgwapi/templates/default/images/dhtmlxtree/item.gif new file mode 100644 index 0000000000..56c0221a0d Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/item.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/item2.gif b/phpgwapi/templates/default/images/dhtmlxtree/item2.gif new file mode 100644 index 0000000000..47274d09f3 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/item2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/leaf.gif b/phpgwapi/templates/default/images/dhtmlxtree/leaf.gif new file mode 100644 index 0000000000..1cf40f1e0c Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/leaf.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/line1.gif b/phpgwapi/templates/default/images/dhtmlxtree/line1.gif new file mode 100644 index 0000000000..60f2ccb26e Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/line1.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/line2.gif b/phpgwapi/templates/default/images/dhtmlxtree/line2.gif new file mode 100644 index 0000000000..f2d7bdd506 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/line2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/line3.gif b/phpgwapi/templates/default/images/dhtmlxtree/line3.gif new file mode 100644 index 0000000000..d718be218f Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/line3.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/line4.gif b/phpgwapi/templates/default/images/dhtmlxtree/line4.gif new file mode 100644 index 0000000000..29285e5986 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/line4.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/magazines_close.gif b/phpgwapi/templates/default/images/dhtmlxtree/magazines_close.gif new file mode 100644 index 0000000000..513c01a006 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/magazines_close.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/magazines_open.gif b/phpgwapi/templates/default/images/dhtmlxtree/magazines_open.gif new file mode 100644 index 0000000000..fcda411c79 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/magazines_open.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus.gif new file mode 100644 index 0000000000..ef04a54696 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus2.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus2.gif new file mode 100644 index 0000000000..0372294cb9 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus3.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus3.gif new file mode 100644 index 0000000000..d928af6394 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus3.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus4.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus4.gif new file mode 100644 index 0000000000..30bc7deecb Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus4.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus5.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus5.gif new file mode 100644 index 0000000000..e2e30fcb24 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus5.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/minus_ar.gif b/phpgwapi/templates/default/images/dhtmlxtree/minus_ar.gif new file mode 100644 index 0000000000..4428ba1500 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/minus_ar.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/open2.gif b/phpgwapi/templates/default/images/dhtmlxtree/open2.gif new file mode 100644 index 0000000000..7d8f2f8ba0 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/open2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus.gif new file mode 100644 index 0000000000..abb84bdfbf Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus2.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus2.gif new file mode 100644 index 0000000000..ea2816efce Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus2.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus3.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus3.gif new file mode 100644 index 0000000000..cd6967e52b Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus3.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus4.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus4.gif new file mode 100644 index 0000000000..185bd9b704 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus4.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus5.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus5.gif new file mode 100644 index 0000000000..72fe4e577f Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus5.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/plus_ar.gif b/phpgwapi/templates/default/images/dhtmlxtree/plus_ar.gif new file mode 100644 index 0000000000..d2fcaf0120 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/plus_ar.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/tombs.gif b/phpgwapi/templates/default/images/dhtmlxtree/tombs.gif new file mode 100644 index 0000000000..25131eeeb6 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/tombs.gif differ diff --git a/phpgwapi/templates/default/images/dhtmlxtree/tombs_mag.gif b/phpgwapi/templates/default/images/dhtmlxtree/tombs_mag.gif new file mode 100644 index 0000000000..b58e29a1e4 Binary files /dev/null and b/phpgwapi/templates/default/images/dhtmlxtree/tombs_mag.gif differ diff --git a/xajax.php b/xajax.php new file mode 100644 index 0000000000..69e9e0dfd5 --- /dev/null +++ b/xajax.php @@ -0,0 +1,62 @@ + * + * -------------------------------------------- * + * 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(); +?>- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +
- +
+- +
- +
- +
- +
- +