Ignore:
Timestamp:
2012-09-20T11:31:03+12:00 (12 years ago)
Author:
sjm84
Message:

Added an option to fix the table of contents to the right side of the page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r26220 r26226  
    3939            <table class="tocTable ui-widget-content">
    4040                <tr>
     41                    <td id="unfloatTOCButton" style="display:none;">
     42                        <a href="javascript:floatMenu(false);">
     43                            <img class="icon" style="padding-top:3px;">
     44                                <xsl:attribute name="src">
     45                                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'left_arrow_image')"/>
     46                                </xsl:attribute>
     47                            </img>
     48                        </a>
     49                    </td>
    4150                    <td style="vertical-align:top; text-align:right;">
    4251                        <a id="sidebarMinimizeButton" href="javascript:minimizeSidebar();" style="float: right; font-size:0.6em;">
     
    288297                </xsl:if><xsl:text> </xsl:text>
    289298               
     299                <!-- Zoom on/off button -->
    290300                <li id="zoomOptions" style="display:none;">
    291301                    <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute>
     
    303313                    </script>
    304314                </li>
     315
     316                <!-- Floating TOC on/off button -->
     317                <xsl:if test="count(//documentNode) > 1 and not(/page/pageResponse/format[@type='display']/gsf:option[@name='TOC']) or /page/pageResponse/format[@type='display']/gsf:option[@name='TOC']/@value='true'">
     318                    <li id="floatingTOCOptions">
     319                        <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute>
     320                        <img>
     321                            <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_toc_image')"/></xsl:attribute>
     322                        </img>
     323                        <input id="floatTOCToggle" type="checkbox"/>
     324                        <script type="text/javascript">
     325                            <xsl:text disable-output-escaping="yes">
     326                                $("#floatTOCToggle").attr("checked", false);
     327                                $("#floatTOCToggle").click(function()
     328                                {
     329                                    floatMenu($("#floatTOCToggle").attr("checked"));
     330                                });
     331                            </xsl:text>
     332                        </script>
     333                    </li>
     334                </xsl:if>
    305335            </ul>
    306336            <div style="clear:both;"><xsl:text> </xsl:text></div>
Note: See TracChangeset for help on using the changeset viewer.