|
From: Jon O. <jon...@us...> - 2008-02-27 21:34:17
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/shared/DynamicTree In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28414 Modified Files: DynamicTree.js Log Message: Updated: Bugfix for releases New feature: Renaming folders and docs Index: DynamicTree.js =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/shared/DynamicTree/DynamicTree.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DynamicTree.js 15 Feb 2007 12:43:42 -0000 1.4 --- DynamicTree.js 27 Feb 2008 21:34:13 -0000 1.5 *************** *** 315,318 **** --- 315,328 ---- this.updateHtml(); }; + this.renameThis = function(text, type) { + var node = findNode(this.active); + var id = node.getRealId(); + id = (id.substr(0, id.lastIndexOf("/")+1) == '' ? "tree-" : id.substr(0, id.lastIndexOf("/")+1)) + (type == "folder" ? text : text + ".html") + node.id = id; + node.text = text; + this.active = id; + node.fixIds(); + this.updateHtml(); + }; this.remove = function() { var node = findNode(this.active); |