diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/html.php | 37 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 8 |
2 files changed, 6 insertions, 39 deletions
diff --git a/inc/html.php b/inc/html.php index b08f313e1..b9f2e957b 100644 --- a/inc/html.php +++ b/inc/html.php @@ -216,43 +216,6 @@ function html_btn($name,$id,$akey,$params,$method='get'){ } /** - * Print the table of contents - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function html_toc($toc){ - global $lang; - $ret = ''; - $ret .= '<div class="toc">'; - $ret .= '<div class="tocheader">'; - $ret .= $lang['toc']; - $ret .= ' <script type="text/javascript">'; - $ret .= 'showTocToggle("+","-")'; - $ret .= '</script>'; - $ret .= '</div>'; - $ret .= '<div id="tocinside">'; - $ret .= html_buildlist($toc,'toc','html_list_toc'); - $ret .= '</div>'; - $ret .= '</div>'; - return $ret; -} - -/** - * TOC item formatter - * - * User function for html_buildlist() - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function html_list_toc($item){ - $ret = ''; - $ret .= '<a href="#'.$item['id'].'" class="toc">'; - $ret .= $item['name']; - $ret .= '</a>'; - return $ret; -} - -/** * show a wiki page * * @author Andreas Gohr <andi@splitbrain.org> diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index da5c70459..06f286a20 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -70,9 +70,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $lang; $this->doc .= '<div class="toc">'.DOKU_LF; $this->doc .= '<div class="tocheader">'; +/* $this->doc .= ' <script type="text/javascript">showTocToggle("+","-")';*/ + $this->doc .= '<script type="text/javascript">showTocToggle('; + $this->doc .= '"<img src=\"'.DOKU_BASE.'images/arrow_down.png\">",'; + $this->doc .= '"<img src=\"'.DOKU_BASE.'images/arrow_up.png\">")'; + $this->doc .= '</script>'; $this->doc .= $lang['toc']; - $this->doc .= ' <script type="text/javascript">showTocToggle("+","-")'; - $this->doc .= '</script></div>'.DOKU_LF; + $this->doc .= '</div>'.DOKU_LF; $this->doc .= '<div id="tocinside">'.DOKU_LF; } |