Ignore:
Timestamp:
2022-12-09T22:49:53+13:00 (17 months ago)
Author:
davidb
Message:

Source might be a format such as TIFF that a browser cannot display, however Image can be controlled by the collectinConfig.xml file to be web friendly, hence the reason for the change

File:
1 edited

Legend:

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

    r36143 r37007  
    727727    var liElems = tableOfContents.find("li").each(function()
    728728    {
    729         var section = $(this);
     729            var section = $(this);
    730730        var add = true;
    731731        for(var j = 0; j < leafSections.length; j++)
     
    949949        var endHREF = href.indexOf("'", startHREF);
    950950        var nodeID = href.substring(startHREF, endHREF);
    951         href = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + nodeID;
     951            href = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + nodeID;
    952952       
    953953        var template = '';
     
    12951295    template += '<xsl:template match="/">';
    12961296    template +=   '<images>[';
    1297     template +=     '<xsl:for-each select="//documentNode">';
    1298     template +=       '<xsl:text disable-output-escaping="yes">{"source":"</xsl:text><gsf:metadata name="Source"/><xsl:text disable-output-escaping="yes">",</xsl:text>';
     1297        template +=     '<xsl:for-each select="//documentNode">';
     1298        // ****
     1299        // Used to be "Source" but now changed to "Image"
     1300        // This is because Source might not be a web friendly image format (e.g. TIFF original)
     1301        // Image givdes us a better chance at success, as least with Image, the collectionConfig.xml file can specify a format that is web friendly
     1302        // **** **** Is it worth changing the "source" and .source JS field to be "image" and .image??? **** ****
     1303    template +=       '<xsl:text disable-output-escaping="yes">{"source":"</xsl:text><gsf:metadata name="Image"/><xsl:text disable-output-escaping="yes">",</xsl:text>';
    12991304    template +=       '<xsl:text disable-output-escaping="yes">"id":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">"}</xsl:text>';
    13001305    template +=       '<xsl:if test="position() != count(//documentNode)">,</xsl:if>';
Note: See TracChangeset for help on using the changeset viewer.