X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault_advanced%2Fjs%2Fdtree.js;h=415fafebad7460a78c894e12304e7d397b714ddd;hp=2cb369d96166e0397ec4f2461f83db612a0a94ea;hb=bb63dfd1e580a5e8102f87ae26c62d90f91af3ed;hpb=93222bea1b92663c2de1d29052133cd147607851 diff --git a/templates/default_advanced/js/dtree.js b/templates/default_advanced/js/dtree.js index 2cb369d9..415fafeb 100644 --- a/templates/default_advanced/js/dtree.js +++ b/templates/default_advanced/js/dtree.js @@ -1,695 +1,351 @@ /*--------------------------------------------------| - | 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) { - +function Node(id, pid, name, url, title, target, icon, iconOpen, accesskey, 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.accesskey = accesskey; 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.gif', - - folder : imagePath+'/folder.gif', - - folderOpen : imagePath+'/folderopen.gif', - - node : imagePath+'/page.gif', - - empty : imagePath+'/empty.gif', - - line : imagePath+'/line.gif', - - join : imagePath+'/join.gif', - - joinBottom : imagePath+'/joinbottom.gif', - - plus : imagePath+'/plus.gif', - - plusBottom : imagePath+'/plusbottom.gif', - - minus : imagePath+'/minus.gif', - - minusBottom : imagePath+'/minusbottom.gif', - - nlPlus : imagePath+'/nolines_plus.gif', - - nlMinus : imagePath+'/nolines_minus.gif' - + 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); - +dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, accesskey, open) { + this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, accesskey, 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 = '