Enhancement of Tab (PDF/XML/Print links to tab menu)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e237bc3edd
commit
b5be1f443d
@ -7,11 +7,75 @@ See the imported tab2menu.xsl for details.
|
|||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
<xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
|
<xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
|
||||||
|
<xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
|
||||||
|
<xsl:variable name="config" select="document($config-file)/skinconfig"/>
|
||||||
|
|
||||||
|
<xsl:param name="notoc"/>
|
||||||
|
<xsl:param name="path"/>
|
||||||
|
<!-- <xsl:include href="split.xsl"/> -->
|
||||||
|
<xsl:include href="../../../common/xslt/html/dotdots.xsl"/>
|
||||||
|
<xsl:include href="../../../common/xslt/html/pathutils.xsl"/>
|
||||||
|
|
||||||
|
<!-- If true, a PDF link for this page will not be generated -->
|
||||||
|
<xsl:variable name="disable-pdf-link" select="$config/disable-pdf-link"/>
|
||||||
|
<!-- If true, a "print" link for this page will not be generated -->
|
||||||
|
<xsl:variable name="disable-print-link" select="$config/disable-print-link"/>
|
||||||
|
<!-- If true, an XML link for this page will not be generated -->
|
||||||
|
<xsl:variable name="disable-xml-link" select="$config/disable-xml-link"/>
|
||||||
|
<!-- Get the section depth to use when generating the minitoc (default is 2) -->
|
||||||
|
<xsl:variable name="config-max-depth" select="$config/toc/@level"/>
|
||||||
|
<!-- Whether to obfuscate email links -->
|
||||||
|
<xsl:variable name="obfuscate-mail-links" select="$config/obfuscate-mail-links"/>
|
||||||
|
|
||||||
|
<!-- Path to site root, eg '../../' -->
|
||||||
|
<xsl:variable name="root">
|
||||||
|
<xsl:call-template name="dotdots">
|
||||||
|
<xsl:with-param name="path" select="$path"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:variable name="filename-noext">
|
||||||
|
<xsl:call-template name="filename-noext">
|
||||||
|
<xsl:with-param name="path" select="$path"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:template name="pre-separator">
|
<xsl:template name="pre-separator">
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="post-separator">
|
<xsl:template name="post-separator">
|
||||||
|
|
||||||
|
<xsl:if test="not($config/disable-print-link) or $disable-print-link = 'false'">
|
||||||
|
<xsl:text> | </xsl:text>
|
||||||
|
<script type="text/javascript" language="Javascript">
|
||||||
|
function printit() {
|
||||||
|
if (window.print) {
|
||||||
|
window.print() ;
|
||||||
|
} else {
|
||||||
|
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
|
||||||
|
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
|
||||||
|
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" language="Javascript">
|
||||||
|
var NS = (navigator.appName == "Netscape");
|
||||||
|
var VERSION = parseInt(navigator.appVersion);
|
||||||
|
if (VERSION > 3) {
|
||||||
|
document.write(' <a href="javascript:printit()" title="PRINT this page OUT">PRINT</a>');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:if test="not($config/disable-xml-link) or $disable-xml-link = 'false'">
|
||||||
|
<xsl:text> | </xsl:text><a href="{$filename-noext}.xml" title="XML file of this page">XML</a>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
|
||||||
|
<xsl:text> | </xsl:text><a href="{$filename-noext}.pdf" title="PDF file of this page">PDF</a>
|
||||||
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="separator">
|
<xsl:template name="separator">
|
||||||
|
Loading…
Reference in New Issue
Block a user