From: <Sve...@nt...> - 2005-07-03 15:17:24
|
Author: SvenDowideit Date: 2005-07-03 08:16:40 -0700 (Sun, 03 Jul 2005) New Revision: 4508 Modified: twiki/branches/DEVELOP/bin/configure Log: TWikiNonRootInstaller: added a little margin as it looks better, and changed the javascript so you only see one section at a time (rendering the buttons as tabs along the top will probably be the end result?) Modified: twiki/branches/DEVELOP/bin/configure =================================================================== --- twiki/branches/DEVELOP/bin/configure 2005-07-03 14:33:41 UTC (rev 4507) +++ twiki/branches/DEVELOP/bin/configure 2005-07-03 15:16:40 UTC (rev 4508) @@ -1464,7 +1464,7 @@ line-height:1.55em; font-family:Avenir, "Lucida Grande", "Bitstream Vera Sans", lucida, arial, verdana, sans-serif; background-color: white; - margin:0; + margin:1em; padding:0; } h1 { @@ -1514,13 +1514,25 @@ HERE ), CGI::script( { language => 'JavaScript' }, <<'HERE' +var last_id = ''; function foldBlock(id) { - var element = document.getElementById(id); - if( element.style.display == 'block' ) { - element.style.display = 'none'; - } else { - element.style.display = 'block'; + //close the last block viewed + if ((last_id != '' ) && (last_id != id)) { + var element = document.getElementById(last_id); + if( element.style.display == 'block' ) { + element.style.display = 'none'; + } } + + { + var element = document.getElementById(id); + if( element.style.display == 'block' ) { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + last_id = id; } HERE ); |