From: Kasun Gajasinghe Date: Tue, 6 Jul 2010 20:34:54 +0000 (+0000) Subject: removed sync button as AutoSync is in effect. X-Git-Tag: release/1.79.1~6^2~831^2~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60462433325e0d928f7ed2c58812a37a76b9c8f3;p=docbook-dsssl removed sync button as AutoSync is in effect. Made some other minor changes. --- diff --git a/xsl/webhelp/template/common/main.js b/xsl/webhelp/template/common/main.js index 0dc61a0d4..4473749d1 100755 --- a/xsl/webhelp/template/common/main.js +++ b/xsl/webhelp/template/common/main.js @@ -1,3 +1,10 @@ +/** + * main.js + * + * Developed by: Kasun Gajasinghe, David Cramer + * + */ + $(document).ready(function() { $(function() { @@ -41,45 +48,35 @@ $(document).ready(function() { //tabView.selectTab(0); } + syncToc(); - - - $('#sync').click(); + // $('#sync').click(); }); -/* - -function tocTabClick(e) { - $.cookie('search', 'no'); -} - -function searchTabClick(e) { - $.cookie('search', 'yes'); -} -*/ /** - * Synchronize with the tableOfContents - * @param id the node/element id which should be displayed when synching. + * Synchronize with the tableOfContents */ -function syncToc(id){ +function syncToc(){ var a = document.getElementById("webhelp-currentid"); var b = a.getElementsByTagName("a")[0]; //Setting the background for selected node. var style = a.getAttribute("style"); if(style != null && !style.match(/background-color: Background;/)){ - a.setAttribute("style", "background-color: Background; "+style); + a.setAttribute("style", "background-color: #6495ed; "+style); b.setAttribute("style", "color: white;"); } else if(style != null){ - a.setAttribute("style", "background-color: Background; " + style); + a.setAttribute("style", "background-color: #6495ed; " + style); b.setAttribute("style", "color: white;"); } else { - a.setAttribute("style", "background-color: Background; "); + a.setAttribute("style", "background-color: #6495ed; "); b.setAttribute("style", "color: white;"); } - + + //shows the node related to current content. + //goes a recursive call from current node to ancestor nodes, displaying all of them. while (a.parentNode && a.parentNode.nodeName){ var parentNode = a.parentNode; var nodeName = parentNode.nodeName; diff --git a/xsl/webhelp/xsl/webhelp.xsl b/xsl/webhelp/xsl/webhelp.xsl index 8501e8aab..a115c031f 100755 --- a/xsl/webhelp/xsl/webhelp.xsl +++ b/xsl/webhelp/xsl/webhelp.xsl @@ -5,10 +5,10 @@ version="1.0" xmlns="http://www.w3.org/1999/xhtml"> - + href="c:/gsoc2010/docbook-xsl-1.75.2/xhtml/chunk.xsl"/--> + @@ -27,12 +27,12 @@ 0 left right - + no 0 - + 0 @@ -65,8 +65,8 @@ + tree.cookie.id = +++ + - - - | - - - - - - - - - - - - - - - - - -
-
- - -
- @@ -346,7 +259,7 @@ - + @@ -433,8 +346,8 @@ id="tocLoading" style="display:block;"/>