From d76a6d9d3dec6a9fd077c5f13246431b4da45983 Mon Sep 17 00:00:00 2001 From: Kasun Gajasinghe Date: Tue, 13 Jul 2010 22:03:04 +0000 Subject: [PATCH] Added a show/hide TOC button. Put next/prev buttons in the banner header. --- .../template/common/css/positioning.css | 29 ++++-- xsl/webhelp/template/common/main.js | 24 +++++ xsl/webhelp/xsl/webhelp.xsl | 98 ++++++++++++++++--- 3 files changed, 132 insertions(+), 19 deletions(-) diff --git a/xsl/webhelp/template/common/css/positioning.css b/xsl/webhelp/template/common/css/positioning.css index d98946912..a9a6b9140 100755 --- a/xsl/webhelp/template/common/css/positioning.css +++ b/xsl/webhelp/template/common/css/positioning.css @@ -17,7 +17,7 @@ h2 { background: white url(../images/gov-header-bg.gif) repeat-x; position: fixed; width: 100%; - height: 80px; + height: 88px; top: 0; right: 0; bottom: auto; @@ -30,7 +30,7 @@ h2 { overflow: auto; position: fixed; height: auto; - top: 80px; + top: 88px; bottom: 0; left: 0; width: 230px; @@ -40,10 +40,10 @@ h2 { #content { position: relative; - top: 80px; - left: auto; + top: 88px; + /* left: 240px;*/ right: auto; - bottom: 20px; + /* bottom: 20px; */ margin: 0px 0px 0px 240px; width: auto; height: inherit; @@ -59,11 +59,24 @@ h2 { } .navfooter { - bottom: 2%; - content: attr; + bottom: 2%; } .searchFieldSet { font-size: 68.75%; } - \ No newline at end of file + +.pointLeft{ + background:url("../images/showHideTreeIcons.png") 0 0 no-repeat ; + height:28px; + width:15px; + display:block; + font-size:0; +} + +.pointRight{ + background: url("../images/showHideTreeIcons.png") -15px 0 no-repeat; + height:28px; + display:block; + font-size:0; +} \ No newline at end of file diff --git a/xsl/webhelp/template/common/main.js b/xsl/webhelp/template/common/main.js index 8427e3508..e2318f35e 100755 --- a/xsl/webhelp/template/common/main.js +++ b/xsl/webhelp/template/common/main.js @@ -86,4 +86,28 @@ function syncToc(){ a = parentNode; } } +} + +/** + * Code for Show/Hide TOC + * + */ +function showHideToc() { + var showHideButton = $("#showHideButton"); + var leftNavigation = $("#leftnavigation"); + var content = $("#content"); + + if (showHideButton != undefined && showHideButton.hasClass("pointLeft")) { + //Hide TOC + showHideButton.removeClass('pointLeft').addClass('pointRight'); + content.css("margin", "0 0 0 0"); + leftNavigation.css("display","none"); + showHideButton.attr("title", "Hide the TOC tree"); + } else { + //Show the TOC + showHideButton.removeClass('pointRight').addClass('pointLeft'); + content.css("margin", "0 0 0 240px"); + leftNavigation.css("display","block"); + showHideButton.attr("title", "Show the TOC Tree"); + } } \ No newline at end of file diff --git a/xsl/webhelp/xsl/webhelp.xsl b/xsl/webhelp/xsl/webhelp.xsl index da644a09d..6d6a9d2c7 100755 --- a/xsl/webhelp/xsl/webhelp.xsl +++ b/xsl/webhelp/xsl/webhelp.xsl @@ -82,7 +82,7 @@ "; txt_results_for = " - "; + ";