Changeset 37364


Ignore:
Timestamp:
2023-02-28T12:01:31+13:00 (15 months ago)
Author:
kjdon
Message:

removed some javascript from gotoFavourites - don't need it, and it wasn't working properly. use xsl variables instead

File:
1 edited

Legend:

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

    r37334 r37364  
    890890    <span id="favouritesCountDisplay">...</span>
    891891
    892     <div><a id="favouritesFullViewLink" style="display: block;"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.full')"/></a></div>
    893       </div>
    894       <gsf:script>
    895     //set url and show full view link
    896         var fullView = YAHOO.util.Dom.get('favouritesFullViewLink');
    897     //Find the collection in the cgi parameters
    898     var url = window.location.href;
    899     var colstart = url.indexOf("&amp;c=");
    900     var collectionName = "";
    901     if (colstart != -1)
    902     {
    903         var colend = url.indexOf("&amp;", (colstart + 1));
    904         if (colend == -1)
    905         {
    906             colend = url.length - 1;
    907         }
    908         collectionName = url.substring(colstart + 3, colend);
    909     }
    910    
    911     fullView.setAttribute("href",gs.xsltParams.library_name + "?a=g&amp;sa=fav&amp;c=&amp;s=DisplayList&amp;rt=r&amp;p.c=" + collectionName);
    912         fullView.style.display='block';
    913 
    914       </gsf:script>
     892    <div><a id="favouritesFullViewLink" style="display: block;"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=g&amp;sa=fav&amp;c=&amp;s=DisplayList&amp;rt=r&amp;p.c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.full')"/></a></div>
     893    </div>
    915894    </xsl:if>
    916895  </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.