[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <cfsetting enablecfoutputonly="yes"> 2 <cfparam name="attributes.width" default="100%"> 3 <cfparam name="attributes.height" default="100%"> 4 <cfparam name="attributes.name" default="t#left(replace(CreateUUID(),'-','','All'),15)#"> 5 <cfparam name="attributes.JSPath" default="js/"> 6 <cfparam name="attributes.CSSPath" default="css/"> 7 <cfparam name="attributes.iconspath" default="imgs/"> 8 <cfparam name="attributes.xmldoc" default=""> 9 <cfparam name="attributes.checkboxes" default="none"> <!--- [ Scand: none, twoState, threeState ] ---> 10 <cfparam name="attributes.dragndrop" default="false"> 11 <cfparam name="attributes.style" default="background-color:whitesmoke;border:1px solid blue;"> 12 <cfparam name="attributes.onSelect" default=""> 13 <cfparam name="attributes.onDrop" default=""> 14 <cfparam name="attributes.onCheck" default=""> 15 <cfparam name="attributes.xmlFile" default=""> 16 17 <cfparam name="attributes.im1" default=""> 18 <cfparam name="attributes.im2" default=""> 19 <cfparam name="attributes.im3" default=""> 20 21 <cfif not ThisTag.HasEndTag> 22 <cfabort showerror="You need to supply a closing <CF_dhtmlXTree> tag."> 23 </cfif> 24 25 <cfif ThisTag.ExecutionMode is "End"> 26 <cfsavecontent variable="treeOutput"> 27 <cfoutput> 28 <cfif not isDefined("request.dhtmlXTreeScriptsInserted")> 29 <link rel="STYLESHEET" type="text/css" href="#attributes.CSSPath#dhtmlXTree.css"> 30 <script src="#attributes.JSPath#dhtmlXCommon.js"></script> 31 <script src="#attributes.JSPath#dhtmlXTree.js"></script> 32 <cfset request.dhtmlXTreeScriptsInserted=1> 33 </cfif> 34 <div id="treebox_#attributes.name#" style="width:#attributes.width#; height:#attributes.height#; overflow:auto; #attributes.style#"></div> 35 <script> 36 function drawTree#attributes.name#(){ 37 #attributes.name#=new dhtmlXTreeGridObject('treebox_#attributes.name#',"100%","100%",0); 38 #attributes.name#.tree.setImagePath("#attributes.iconspath#"); 39 <cfswitch expression="#attributes.checkboxes#"> 40 <cfcase value="twoState"> 41 #attributes.name#.tree.enableCheckBoxes(true) 42 #attributes.name#.tree.enableThreeStateCheckboxes(false); 43 </cfcase> 44 <cfcase value="threeState"> 45 #attributes.name#.tree.enableCheckBoxes(true) 46 #attributes.name#.tree.enableThreeStateCheckboxes(true); 47 </cfcase> 48 <cfdefaultcase> 49 #attributes.name#.tree.enableCheckBoxes(false) 50 #attributes.name#.tree.enableThreeStateCheckboxes(false); 51 </cfdefaultcase> 52 </cfswitch> 53 <cfif len(attributes.onSelect)> 54 #attributes.name#.tree.setOnClickHandler("#attributes.onSelect#"); 55 </cfif> 56 <cfif len(attributes.onCheck)> 57 #attributes.name#.tree.setOnCheckHandler("#attributes.onCheck#"); 58 </cfif> 59 <cfif len(attributes.onDrop)> 60 #attributes.name#.tree.setDragHandler("#attributes.onDrop#"); 61 </cfif> 62 #attributes.name#.tree.enableDragAndDrop(#attributes.dragndrop#) 63 <cfif (len(attributes.im1) or len(attributes.im2)) or len(attributes.im3)> 64 #attributes.name#.tree.setStdImages("#attributes.im1#","#attributes.im2#","#attributes.im3#"); 65 </cfif> 66 <cfif len(attributes.xmlFile)> 67 #attributes.name#.setXMLAutoLoading("#attributes.xmlFile#"); 68 #attributes.name#.loadXML("#attributes.xmlFile#") 69 </cfif> 70 <cfif Len(Trim(ThisTag.GeneratedContent))> 71 #attributes.name#.loadXMLString("<?xml version='1.0'?><tree id='0'>#replace(replace(ThisTag.GeneratedContent,'"',"'","ALL"),"#chr(13)##chr(10)#","","ALL")#</tree>") 72 </cfif> 73 }; 74 window.setTimeout("drawTree#attributes.name#()",100); 75 </script> 76 </cfoutput> 77 78 </cfsavecontent> 79 80 <cfset ThisTag.GeneratedContent = treeOutput> 81 </cfif> 82 <cfsetting enablecfoutputonly="no">
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |