rem: /* for(var no=0;no<nodes.length;no++){ if(nodes[no])this.showHideNode(false,nodes[no]); } */ 
context: 		initTree : function()		{								JSTreeObj = this;			ThemesEngine.getPathToImageFolder(JSTreeObj.folderPath);			JSTreeObj.createDropIndicator();			document.documentElement.onselectstart = JSTreeObj.cancelSelectionEvent;			document.documentElement.ondragstart = JSTreeObj.cancelEvent;			var nodeId = 0;			var dhtmlgoodies_tree = document.getElementById(this.idOfTree);			var menuItems = dhtmlgoodies_tree.getElementsByTagName('LI');	// Get an array of all menu items			var item = menuItems[0];			for(var no=0;no<menuItems.length;no++){				// No children var set ?								var noChildren = false;				var tmpVar = menuItems[no].getAttribute('noChildren');				if(!tmpVar)tmpVar = menuItems[no].noChildren;				if(tmpVar=='true')noChildren=true;				var sourceTree = false;				var tmpVar = menuItems[no].getAttribute('sourceTree');				if(!tmpVar)					tmpVar = menuItems[no].sourceTree;				if(tmpVar=='true')					sourceTree=true;				// No drag var set ?				var noDrag = false;				var tmpVar = menuItems[no].getAttribute('noDrag');				if(!tmpVar)tmpVar = menuItems[no].noDrag;				if(tmpVar=='true')noDrag=true;								var iconfile = null;		 				var tmpVar = menuItems[no].getAttribute('iconfile');				if(!tmpVar)									tmpVar = menuItems[no].iconfile;				if(tmpVar)					iconfile = tmpVar;				else {					var pageType = menuItems[no].getAttribute('pagetype');					if (pageType)//						iconfile = this.imageFolder + menuItems[no].getAttribute('pagetype') +'.png';						iconfile = JSTreeObj.iconFolder + menuItems[no].getAttribute('pagetype') +'.png';					else						iconfile = JSTreeObj.iconFolder + this.folderImage;				}				var templatefile = null;		 				var tmpVar = menuItems[no].getAttribute('templatefile');				if(!tmpVar)									tmpVar = menuItems[no].templatefile;				if(tmpVar)					templatefile = tmpVar;													nodeId++;				var subItems = menuItems[no].getElementsByTagName('UL');				var img = document.createElement('IMG');				img.src = this.imageFolder + this.plusImage;				img.onclick = JSTreeObj.showHideNode;								if(subItems.length==0)					img.style.visibility='hidden';				else{					subItems[0].id = 'tree_ul_' + treeUlCounter;					treeUlCounter++;				}										var aTag = menuItems[no].getElementsByTagName('A')[0];//risky code								if(aTag.id)					numericId = aTag.id.replace(/[^0-9]/g,'');				else					numericId = (no+1);								aTag.id = menuItems[no].id + 'a';					var input = document.createElement('INPUT');				input.style.width = '40%';				input.style.display='none';								menuItems[no].insertBefore(input,aTag);					input.id = menuItems[no].id + 'input';					input.onblur = hideEdit;								input.onkeypress = withEnter;						//			menuItems[no].insertBefore(img,input);//			menuItems[no].id = 'dhtmlgoodies_treeNode' + numericId;//			aTag.onclick = okToNavigate;								aTag.ondblclick = initEditLabel;					if(!noDrag)aTag.onmousedown = JSTreeObj.initDrag;				if(!noChildren)aTag.onmousemove = JSTreeObj.moveDragableNodes;				if(sourceTree)aTag.onmousedown = JSTreeObj.copyDragableNode;												menuItems[no].insertBefore(img,input);				var folderImg = document.createElement('IMG');								if(!noDrag){					if(sourceTree)						folderImg.onmousedown = JSTreeObj.copyDragableNode;					else						folderImg.onmousedown = JSTreeObj.initDrag;				}				if(!noChildren)folderImg.onmousemove = JSTreeObj.moveDragableNodes;								if(menuItems[no].className){					folderImg.src = this.imageFolder + menuItems[no].className;				}else{					folderImg.src = this.imageFolder + this.folderImage;					//					folderImg.src = this.imageFolder + this.iconFolder;									}				if(iconfile)					folderImg.src = iconfile;				menuItems[no].insertBefore(folderImg,input);							}						initExpandedNodes = this.Get_Cookie('dhtmlgoodies_expandedNodes');			if(initExpandedNodes){				var nodes = initExpandedNodes.split(',');/*				for(var no=0;no<nodes.length;no++){					if(nodes[no])this.showHideNode(false,nodes[no]);					}			*/			}						document.documentElement.onmousemove = JSTreeObj.moveDragableNodes;							document.documentElement.onmouseup = JSTreeObj.dropDragableNodesCopy;						if(sourceTree){			//				JSTreeObj.actionOnMouseUp = 'copy';				this.actionOnMouseUp = 'copy';//				console.log('copy');//				document.documentElement.onmouseup = JSTreeObj.dropDragableNodesCopy;			}			else{				this.actionOnMouseUp = 'move';//				console.log('move');				//				JSTreeObj.actionOnMouseUp = 'move';//				document.documentElement.onmouseup = JSTreeObj.dropDragableNodes;			}		}
meta: 7498	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7498/546a09eea9456b9aa55cd83860b43366b8e5f326/drag-drop-folder-tree.js/buggy/resources/javascript/drag-drop-folder-tree.js