From 94c43cbdf9ff2ff9ea1446eb833c971de950eb3b Mon Sep 17 00:00:00 2001 From: pdontthink Date: Mon, 18 Sep 2006 17:13:14 +0000 Subject: [PATCH] Fixed CRLFs. Is somebody seriously developing in Windoze?? git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11716 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/default_advanced/js/dtree.js | 354 +------------------------ 1 file changed, 3 insertions(+), 351 deletions(-) diff --git a/templates/default_advanced/js/dtree.js b/templates/default_advanced/js/dtree.js index 8b0c8f93..37f8f0e0 100644 --- a/templates/default_advanced/js/dtree.js +++ b/templates/default_advanced/js/dtree.js @@ -1,695 +1,347 @@ /*--------------------------------------------------| - | dTree 2.05 | www.destroydrop.com/javascript/tree/ | - |---------------------------------------------------| - | Copyright (c) 2002-2003 Geir Landr? | - | | - | This script can be used freely as long as all | - | copyright messages are intact. | - | | - | Updated: 17.04.2003 | - |--------------------------------------------------*/ - - // Node object - function Node(id, pid, name, url, title, target, icon, iconOpen, open) { - this.id = id; - this.pid = pid; - this.name = name; - this.url = url; - this.title = title; - this.target = target; - this.icon = icon; - this.iconOpen = iconOpen; - this._io = open || false; - this._is = false; - this._ls = false; - this._hc = false; - this._ai = 0; - this._p; - }; - - -// Tree object -// imagePath parameter added by SquirrelMail Team +// Tree object// imagePath parameter added by SquirrelMail Team function dTree(objName, imagePath) { - this.config = { - target : null, - folderLinks : true, - useSelection : true, - useCookies : true, - useLines : true, - useIcons : true, - useStatusText : false, - closeSameLevel : false, - inOrder : false - } - this.icon = { - root : imagePath+'/base.png', - folder : imagePath+'/folder.png', - folderOpen : imagePath+'/folderopen.png', - node : imagePath+'/page.png', - empty : imagePath+'/empty.png', - line : imagePath+'/line.png', - join : imagePath+'/join.png', - joinBottom : imagePath+'/joinbottom.png', - plus : imagePath+'/plus_mid.png', - plusBottom : imagePath+'/plusbottom.png', - minus : imagePath+'/minus_mid.png', - minusBottom : imagePath+'/minusbottom.png', - nlPlus : imagePath+'/nolines_plus.png', - nlMinus : imagePath+'/nolines_minus.png' - }; - this.obj = objName; - this.aNodes = []; - this.aIndent = []; - this.root = new Node(-1); - this.selectedNode = null; - this.selectedFound = false; - - this.completed = false; - - this.imagePath = imagePath; - + this.completed = false; this.imagePath = imagePath; }; - - // Adds a new node to the node array - dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { - this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); - }; - - // Open/close all nodes - dTree.prototype.openAll = function() { - this.oAll(true); - }; - dTree.prototype.closeAll = function() { - this.oAll(false); - }; - - // Outputs the tree to the page - dTree.prototype.toString = function() { - var str = '
\n'; - if (document.getElementById) { - if (this.config.useCookies) this.selectedNode = this.getSelected(); - str += this.addNode(this.root); - } else str += 'Browser not supported.'; - str += '
'; - if (!this.selectedFound) this.selectedNode = null; - this.completed = true; - return str; - }; - - // Creates the tree structure - dTree.prototype.addNode = function(pNode) { - var str = ''; - var n=0; - if (this.config.inOrder) n = pNode._ai; - for (n; n'; - } - if (node.url) { - str += ''; - str += node.name; - if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; - str += ''; - if (node._hc) { - str += '
'; - str += this.addNode(node); - str += '
'; - } - this.aIndent.pop(); - return str; - }; - - // Adds the empty and line icons - dTree.prototype.indent = function(node, nodeId) { - var str = ''; - if (this.root.id != node.pid) { - for (var n=0; n'; - (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); - if (node._hc) { - str += ''; - } else str += ''; - } - return str; - }; - - // Checks if a node has any children and if it is the last sibling - dTree.prototype.setCS = function(node) { - var lastId; - for (var n=0; n