Skip to content
Snippets Groups Projects
Commit 90f3a5b1 authored by andi's avatar andi
Browse files

fixed problem with TOC toggle and W3C validator

darcs-hash:20050624134114-9977f-4d08d9644dbc6836b55ec5c83aa6b10980a545be.gz
parent 90db23d7
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $lang;
$this->doc .= '<div class="toc">'.DOKU_LF;
$this->doc .= '<div class="tocheader">';
/* The (+/-) version will work too but needs some CSS tweaking to look fine */
/* $this->doc .= ' <script type="text/javascript">showTocToggle("+","-")';*/
$this->doc .= '<script type="text/javascript">showTocToggle(';
$this->doc .= '\'<img src="'.DOKU_BASE.'lib/images/arrow_down.gif">\',';
$this->doc .= '\'<img src="'.DOKU_BASE.'lib/images/arrow_up.gif">\')';
$this->doc .= '</script>';
$this->doc .= ' <script type="text/javascript">showTocToggle("+","-")</script>';
$this->doc .= $lang['toc'];
$this->doc .= '</div>'.DOKU_LF;
$this->doc .= '<div id="tocinside">'.DOKU_LF;
......
......@@ -289,8 +289,11 @@ function suggestWikiname(){
/**
* This prints the switch to toggle the Table of Contents
*/
function showTocToggle(show,hide) {
function showTocToggle(showtxt,hidetxt) {
if(document.getElementById) {
show = '<img src="'+DOKU_BASE+'lib/images/arrow_down.gif" alt="'+showtxt+'">';
hide = '<img src="'+DOKU_BASE+'lib/images/arrow_up.gif" alt="'+hidetxt+'">';
document.writeln('<div class=\'toctoggle\'><a href="javascript:toggleToc()" class="toc">' +
'<span id="showlink" style="display:none;">' + show + '</span>' +
'<span id="hidelink">' + hide + '</span>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment