Ignore:
Timestamp:
2017-11-16T15:06:55+13:00 (6 years ago)
Author:
kjdon
Message:

as we are now no longer including <gsf:metadata='all' in the xslt, we need to make sure Thumb metadata is loaded for teh document_scripts javascript. It doesn't work putting it into the inline template as this is processed after all the metadata is gotten for the page

File:
1 edited

Legend:

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

    r32066 r32072  
    11/** Javascript file for viewing documents */
     2
     3/** NOTE, this file uses inline templates which look for httpPath, assocfilepath, Source, Thumb, Title metadata. These need to be added into any xsl file that uses this javascript (using <gsf:metadata name="xx" hidden="true"/> if they are not already being collected. */
    24
    35var _imageZoomEnabled = false;
     
    855857   
    856858    var getImage = function(page, attemptNumber)
    857     {
     859    {
    858860        var href = page.getAttribute("href");
    859861        var startHREF = href.indexOf("'") + 1;
     
    864866        var template = '';
    865867        template += '<xsl:template match="/">';
    866         template +=   '<gsf:metadata name=\"Thumb\"/>';
    867868        template +=   '<html>';
    868869        template +=     '<img>';
     
    884885        $.ajax(url)
    885886        .success(function(text)
    886         {
     887             {
    887888            var hrefStart = text.indexOf("src=\"") + 5;
    888889            if(hrefStart == -1)
Note: See TracChangeset for help on using the changeset viewer.