tr.nodem=Nodes[Count]; if(parentObject.itemId==0) tr.childNodes[0].className="hitemIddenRow"; if(optionStr){ var tempStr=optionStr.split(","); for(var i=0;i<tempStr.length;i++) { switch(tempStr[i]) { case "SELECT": this.selectItem(itemId,false);break; case "CALL": this.selectItem(itemId,true);break; case "CHILD": Nodes[Count].XMLload=0;break; case "CHECKED": if(this.XMLloadingWarning) this.setCheckList+=itemId; else this.setCheck(itemId,1); break; case "OPEN": Nodes[Count].openMe=1;break; } }; }; if(!this.XMLloadingWarning) { if(this._getOpenState(parentObject)<0) this.openItem(parentObject.id); if(beforeNode) { this._correctPlus(beforeNode); this._correctLine(beforeNode); } this._correctPlus(parentObject); this._correctLine(parentObject); this._correctPlus(Nodes[Count]); if(parentObject.childsCount>=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,url){ var parentObject=this._globalIdStorageFind(parentId); if(!parentObject)return(-1); return this._attachChildNode(parentObject,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs,url); }; 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<node.childNodes.length;i++) { if((node.childNodes[i].nodeType==1)&&(node.childNodes[i].tagName == "item")) { var name=node.childNodes[i].getAttribute("text");
上一篇:谈谈JavaScript中的数组、集合及效率
下一篇:谈谈JavaScript中的集合以及效率
|