|
From: Jon O. <jon...@us...> - 2006-09-17 14:39:27
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/shared/DynamicTree In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25469/modules/mx_simpledoc/simpledoc/shared/DynamicTree Modified Files: DynamicTree.js Log Message: Ok, several annoying JS bugs and more are solved... Index: DynamicTree.js =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/shared/DynamicTree/DynamicTree.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DynamicTree.js 23 Apr 2006 19:21:28 -0000 1.1 --- DynamicTree.js 17 Sep 2006 14:39:24 -0000 1.2 *************** *** 131,135 **** } }; ! // // Simulate the loadState cookie behaviour --- 131,135 ---- } }; ! // // Simulate the loadState cookie behaviour *************** *** 148,152 **** } }; ! this.saveState = function() { if (this.opened.length) { --- 148,152 ---- } }; ! this.saveState = function() { if (this.opened.length) { *************** *** 245,248 **** --- 245,249 ---- }; this.createNode = function(id, text, type) { + alert(id + ' ' + text); if (!id || findNode(id) || !text || (type != "doc" && type != "folder")) { throw this.id+'.createNode("'+id+'", "'+text+'", "'+type+'") failed, illegal action'; *************** *** 459,463 **** return s; }; ! this.toToc = function(parentNode) { var s = ''; --- 460,464 ---- return s; }; ! this.toToc = function(parentNode) { var s = ''; *************** *** 466,470 **** if (this.isFolder) { s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" '+(this.childNodes.length ? 'ondblclick="tree.nodeClick(\''+this.id+'\'); this.blur();"' : "")+' onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; ! if (this.childNodes.length) { for (var i = 0; i < this.childNodes.length; i++) { --- 467,471 ---- if (this.isFolder) { s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" '+(this.childNodes.length ? 'ondblclick="tree.nodeClick(\''+this.id+'\'); this.blur();"' : "")+' onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; ! if (this.childNodes.length) { for (var i = 0; i < this.childNodes.length; i++) { *************** *** 476,488 **** s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; } ! if (s != '') { } ! s += '</ul>'; return s; ! }; } ! function Listener() { this.funcs = []; --- 477,489 ---- s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; } ! if (s != '') { } ! s += '</ul>'; return s; ! }; } ! function Listener() { this.funcs = []; *************** *** 496,500 **** }; } ! function findNode(id) { for (var i = 0; i < self.allNodes.length; ++i) { --- 497,501 ---- }; } ! function findNode(id) { for (var i = 0; i < self.allNodes.length; ++i) { *************** *** 533,537 **** } }; ! // // Fix for initializing the active entry --- 534,538 ---- } }; ! // // Fix for initializing the active entry *************** *** 546,550 **** this.active = 'tree-' + this.queryPath; this.textClickListener.call(); ! }; var self = this; --- 547,551 ---- this.active = 'tree-' + this.queryPath; this.textClickListener.call(); ! }; var self = this; |