From: Norman Walsh Date: Wed, 29 May 2002 18:50:52 +0000 (+0000) Subject: Implement toc.hide.show in a cross-platform manner X-Git-Tag: release/1.79.1~6^2~5635 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d36b2a1c5faafcef82479d9ebb6ed89d4a453030;p=docbook-dsssl Implement toc.hide.show in a cross-platform manner --- diff --git a/slides/browser/slides.js b/slides/browser/slides.js index 89b706fae..b946c56dc 100644 --- a/slides/browser/slides.js +++ b/slides/browser/slides.js @@ -68,3 +68,20 @@ function navigate (evt) { window.location = target; } } + +function toggletoc (img, width, hidegraphic, showgraphic) { + var fsc = xbGetElementsByName('FRAMESET',top); + if (fsc) { + var fs = fsc[0]; + if (fs) { + if (fs.cols == "0,*") { + fs.cols = width + ",*"; + img.src = hidegraphic; + } else { + fs.cols = "0,*"; + img.src = showgraphic; + } + } + } +} + diff --git a/slides/xsl/slides.xsl b/slides/xsl/slides.xsl index d0d39dfb0..9348835af 100644 --- a/slides/xsl/slides.xsl +++ b/slides/xsl/slides.xsl @@ -1263,14 +1263,14 @@ -if (parent.parent.document.all.topframe.cols=="0,*") { - parent.parent.document.all.topframe.cols=",*"; - this.src = ""; -} else { - parent.parent.document.all.topframe.cols="0,*"; - this.src = ""; -}; - + toggletoc(this, + + ,' + + ',' + + '); +