Changeset 31523


Ignore:
Timestamp:
2017-03-20T11:33:00+13:00 (5 years ago)
Author:
kjdon
Message:

we want to keep p.s arg in the expand/contract contents links so that search term highlighting still works if we have got to that document from a search.

Location:
main/trunk/greenstone3/web/interfaces/default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r31520 r31523  
    471471        url += "&a=d&d=&alb=1&rl=1&href=" + gs.cgiParams.href;
    472472    }
     473    // later on we want this arg p.s so we can keep search term highlighting for expand document link
     474    if (gs.cgiParams.p_s && gs.cgiParams.p_s.length > 0) {
     475    url += "&p.s=" + gs.cgiParams.p_s;
     476    }
    473477   
    474478    if (gs.xsltParams.use_client_side_xslt == "true") { // note xsltParams are of type string, so test needs to be in quotes
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r31520 r31523  
    126126                            </xsl:when>
    127127                            <xsl:otherwise>
    128                               <!-- *TODO *********-->
    129                               <xsl:variable name="doc_url"><xsl:value-of select='$library_name'/>/collection/<xsl:value-of select='/page/pageResponse/collection/@name'/>/document/<xsl:value-of select='/page/pageResponse/document/documentNode/@nodeID'/>?<!--<xsl:value-of select='/page/pageRequest/@fullURL'/>--></xsl:variable>
     128                              <xsl:variable name="doc_url"><xsl:value-of select='$library_name'/>/collection/<xsl:value-of select='/page/pageResponse/collection/@name'/>/document/<xsl:value-of select='/page/pageResponse/document/documentNode/@nodeID'/>?<xsl:if test="/page/pageRequest/paramList/param[@name='p.s']">p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>&amp;</xsl:if></xsl:variable>
    130129                                <div id="tableOfContents">
    131130                                    <xsl:attribute name="class">
     
    135134                                        </xsl:choose>
    136135                                    </xsl:attribute>
    137                                     <table style="width:100%; text-align:center;"><tr><td><a href="{$doc_url}ed=1"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc')"/></a></td><td><a href="{$doc_url}ed=0\"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.collapse_doc')"/></a></td></tr></table>
     136                                    <table style="width:100%; text-align:center;"><tr><td><a href="{$doc_url}ed=1"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc')"/></a></td><td><a href="{$doc_url}ed=0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.collapse_doc')"/></a></td></tr></table>
    138137                                    <xsl:for-each select="documentNode">
    139138                                        <xsl:call-template name="documentNodeTOC"/>
Note: See TracChangeset for help on using the changeset viewer.