Index: openacs-4/packages/acs-templating/www/resources/mktree.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/mktree.js,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/mktree.js 6 Jul 2006 20:09:47 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/mktree.js 7 Jun 2008 20:28:59 -0000 1.4 @@ -51,6 +51,10 @@ var mktree_registered = 1; } +if (typeof mktree_remember == 'undefined') { + var mktree_remember = false; +} + // Utility function to add an event listener function addEvent(o,e,f){ if (o.addEventListener){ o.addEventListener(e,f,true); return true; } @@ -137,7 +141,7 @@ // Search the document for UL elements with the correct CLASS name, then process them function convertTrees() { // this is a check in opera to avoid multiple renderings - if (typeof window.treeClass != 'undefined') { + if (typeof window.treeClass != 'undefined') { return; } setDefault("treeClass","mktree"); @@ -221,11 +225,15 @@ //These cookie functions are by AG function rememberCookieP(node) { - if (node.getAttribute("id") && node.getAttribute("remember") && node.getAttribute("remember") == 1) { - return true; + + var treeId = node.getAttribute("id"); + + if ( treeId && mktree_remember ) { + return ( document.getElementById(treeId) != null ); } else { return false; } + }