Update of /var/cvs/contributions/didactor2/src/education/templates/education/js In directory james.mmbase.org:/tmp/cvs-serv29686
Modified Files: frontend_tree.jsp Log Message: support for classname of current a setting See also: http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/templates/education/js Index: frontend_tree.jsp =================================================================== RCS file: /var/cvs/contributions/didactor2/src/education/templates/education/js/frontend_tree.jsp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- frontend_tree.jsp 19 Feb 2008 14:57:48 -0000 1.26 +++ frontend_tree.jsp 29 Feb 2008 13:36:10 -0000 1.27 @@ -25,6 +25,7 @@ var currentnumber = -1; +var currentel = -1; var contenttype = new Array(); var contentnumber = new Array(); var openDivs = new Object(); @@ -238,8 +239,13 @@ scrollToTop(); } -function openContent(type, number) { - +function openContent(type, number, el) { + if (currentel != null) { + currentel.className = ""; + } + if (el != null) { + el.className = "active"; + } if (document.getElementById('content-'+currentnumber)) { var el = document.getElementById('content-'+currentnumber); var classNames = el.className.split(" "); @@ -254,6 +260,7 @@ if ( number > 0 ) { currentnumber = number; } + currentel = el; var href; switch ( type ) { _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs