下面是原碼_PHP

來源:互聯網
上載者:User
function Folder(folderDescription, hreference,parentid,target) {   //constant data;   this.desc = folderDescription;   this.parentid=parentid;   this.hreference = hreference;   this.target=target;   this.id = index;   this.navObj = 0;   this.iconImg = 0;   this.nodeImg = 0;   this.isLastNode = 0;   // dynamic data   this.isRoot = true;   this.isOpen = true;   this.iconSrc=imageURL+"ftv2folderopen.gif";   this.iconRoot =imageURL+"ftv2folderopen.gif";   this.children = new Array;   this.nChildren = 0;   // methods   this.initialize = initializeFolder;   this.setState = setStateFolder;   this.addChild = addChild;   this.createIndex = createEntryIndex;   this.hide = hideFolder;   this.display = display;   this.renderOb = drawFolder;   this.totalHeight = totalHeight;   this.subEntries = folderSubEntries;   this.outputLink = outputFolderLink;}function setStateFolder(isOpen) {   var subEntries;   var totalHeight;   var fIt = 0;   var i = 0;   if(isOpen == this.isOpen)       return;   if(browserVersion == 2) {       totalHeight = 0       for(i = 0; i < this.nChildren; i++)           totalHeight = totalHeight + this.children[i].navObj.clip.height;       subEntries = this.subEntries();       if(this.isOpen)           totalHeight = 0 - totalHeight;       for(fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)           indexOfEntries[fIt].navObj.moveBy(0, totalHeight);   }   this.isOpen = isOpen;   propagateChangesInState(this);}function propagateChangesInState(folder) {   var i = 0;   if(folder.isOpen) {       if(folder.nodeImg) {           if(folder.isLastNode)               folder.nodeImg.src = imageURL+"ftv2mlastnode.gif";           else               folder.nodeImg.src = imageURL+"ftv2mnode.gif";       }       if(this.isRoot)           folder.iconImg.src = imageURL+"ftv2_mail.gif";       else           folder.iconImg.src = imageURL+"ftv2folderopen.gif";       for(i = 0; i < folder.nChildren; i++)           folder.children[i].display();   }   else {       if(folder.nodeImg) {           if(folder.isLastNode)               folder.nodeImg.src = imageURL+"ftv2plastnode.gif";           else               folder.nodeImg.src = imageURL+"ftv2pnode.gif";       }       if(this.isRoot)           folder.iconImg.src = imageURL+"ftv2_mail.gif";       else           folder.iconImg.src = imageURL+"ftv2folderclosed.gif";       for(i = 0; i < folder.nChildren; i++)           folder.children[i].hide();   }}function hideFolder() {    if(browserVersion == 1) {        if(this.navObj.style.display == "none")            return;        this.navObj.style.display = "none";    }    else {        if(this.navObj.visibility == "hiden")            return;        this.navObj.visibility = "hiden";    }    this.setState(0);}function initializeFolder(level, lastNode, leftSide) {    var i = 0;    var j = 0;    var numberOfFolders;    var numberOfDocs;    nc = this.nChildren;    this.createIndex();    var nc;    var auxEv = "";    if(browserVersion > 0)        auxEv = "";    else        auxEv = "";    if(level > 0) {        if(lastNode) { //the last 'brother' in the children array           this.renderOb(leftSide + auxEv + "");           leftSide = leftSide + "";           this.isLastNode = 1;        }        else {            this.renderOb(leftSide + auxEv + "");            leftSide = leftSide + "";            this.isLastNode = 0;        }    }    else {        this.renderOb("");    }    if(nc > 0) {        level = level + 1;        for(i = 0; i < this.nChildren; i++) {            if(i == this.nChildren-1)                this.children[i].initialize(level, 1, leftSide);            else                this.children[i].initialize(level, 0, leftSide);        }    }}function drawFolder(leftSide) {    if(browserVersion == 2) {        if(!doc.yPos)          doc.yPos = 8;        doc.write("");    }    if(browserVersion == 1) {        this.navObj = doc.all["folder"+this.id];        this.iconImg = doc.all["folderIcon"+this.id]        this.nodeImg = doc.all["nodeIcon"+this.id]    }    else if(browserVersion == 2) {        this.navObj = doc.layers["folder"+this.id];        this.iconImg = this.navObj.document.images["folderIcon"+this.id];        this.nodeImg = this.navObj.document.images["nodeIcon"+this.id];        doc.yPos = doc.yPos + this.navObj.clip.height;    }}
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.