summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authormatthiasgrimm <matthiasgrimm@users.sourceforge.net>2005-05-31 20:41:55 +0200
committermatthiasgrimm <matthiasgrimm@users.sourceforge.net>2005-05-31 20:41:55 +0200
commite4a9930b4716be77450a291f7f54a708e75be7f2 (patch)
treea3b8597cb2ad87563b41422399371f0316807518 /inc
parenta3ec5f4af2e46256ac7efebb3a11e7084783080b (diff)
downloadrpg-e4a9930b4716be77450a291f7f54a708e75be7f2.tar.gz
rpg-e4a9930b4716be77450a291f7f54a708e75be7f2.tar.bz2
toc toggle button
The TOC toggle button was very small and inconspicuous. This patch replaces the old one with small arrows placed at the right border of the TOC header. Code cleanup in html.php: html_toc() and html_list_toc() are obsolete and have been removed. darcs-hash:20050531184155-7ef76-249f948b2a8b71d45aab2b8418db2be5eb638f6d.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/html.php37
-rw-r--r--inc/parser/xhtml.php8
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;
}