Ignore:
Timestamp:
2012-04-12T14:56:46+12:00 (12 years ago)
Author:
sjm84
Message:

Added request information to the list of things that are included in the Javascript gs variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/javascript-global-setup.xsl

    r25281 r25362  
    1717            gs.imageURLs = new Array();
    1818            gs.variables = new Array();
     19            gs.requestInformation = new Array();
    1920        </script>
    2021        <xsl:call-template name="populate-cgi-param-values"/>
     
    2223        <xsl:call-template name="populate-image-url-values"/>
    2324        <xsl:call-template name="populate-metadata-values"/>
     25        <xsl:call-template name="populate-request-information-values"/>
    2426        <xsl:call-template name="include-global-javascript-functions"/>
    2527    </xsl:template>
     
    110112    </xsl:template>
    111113   
     114    <xsl:template name="populate-request-information-values">
     115        <script type="text/javascript">
     116            <xsl:text disable-output-escaping="yes">
     117                gs.requestInformation.fullURL = "</xsl:text><xsl:value-of select="/page/pageRequest/@fullURL"/><xsl:text disable-output-escaping="yes">";
     118            </xsl:text>
     119        </script>
     120    </xsl:template>
     121   
    112122    <xsl:template name="include-global-javascript-functions">
    113123        <script type="text/javascript" src="interfaces/oran/js/javascript-global-functions.js"><xsl:text> </xsl:text></script>
     
    115125    </xsl:template>
    116126</xsl:stylesheet>
    117 
    118     <!--
    119     USEFUL FOR TESTING ASSOCIATIVE ARRAYS
    120     function getKeys(obj)
    121     {
    122         var keys = [];
    123         for(var key in obj)
    124         {
    125             keys.push(key);
    126         }
    127         return keys;
    128     }
    129     -->
    130127
    131128    <!-- CAN WE FIND SOME WAY TO MAKE THIS WORK?
Note: See TracChangeset for help on using the changeset viewer.