Ignore:
Timestamp:
2011-08-24T15:24:27+12:00 (13 years ago)
Author:
sjm84
Message:

Created the gs variable in Javascript as well as gsf:variable that creates a variable in both XSLT and Javascript. Also, can now be accessed in config_format.xsl

Location:
main/trunk/greenstone3/web/interfaces/oran/transform
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/config_format.xsl

    r24359 r24458  
    77    xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
    88    extension-element-prefixes="java">
     9    <xsl:param name="interface_name"/>
     10    <xsl:param name="library_name"/>
    911 
    1012    <xsl:output method="xml"/>
     
    2729            <xsl:apply-templates/>
    2830        </xslt:template>
     31    </xsl:template>
     32   
     33    <xsl:template match="gsf:variable">
     34        <xslt:variable>
     35            <xsl:copy-of select="@*"/>
     36            <xsl:apply-templates/>
     37        </xslt:variable>
     38        <script type="text/javascript">
     39            gs.variables.<xsl:value-of select="@name"/><xslt:text disable-output-escaping="yes"> = "</xslt:text><xsl:apply-templates/><xslt:text disable-output-escaping="yes">";</xslt:text>
     40        </script>
    2941    </xsl:template>
    3042 
     
    119131        <xsl:choose>
    120132            <xsl:when test="@type='classifier'">
    121                 <img style="border:0px"><xsl:attribute name="src"><xsl:text>interfaces/oran/images/bookshelf.png</xsl:text></xsl:attribute></img>
     133                <img style="border:0px"><xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'bookshelf_image')"/></xsl:attribute></img>
    122134            </xsl:when>
    123135            <xsl:when test="@type='document'">
    124                 <img style="border:0px"><xsl:attribute name="src"><xsl:text>interfaces/oran/images/itext.gif</xsl:text></xsl:attribute></img>
     136                <img style="border:0px"><xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_icon_image')"/></xsl:attribute></img>
    125137            </xsl:when>
    126138        </xsl:choose>
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl

    r24420 r24458  
    88       
    99    <xsl:include href="../query-common.xsl"/>
     10    <xsl:include href="../javascript-global-setup.xsl"/>
    1011   
    1112    <!-- If the c parameter is empty then use the p.c parameter for the collection name-->
     
    2627        <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
    2728        <link rel="shortcut icon" href="favicon.ico"/>
     29       
     30        <xsl:call-template name="setup-gs-variable"/>
    2831    </xsl:template>
    2932       
Note: See TracChangeset for help on using the changeset viewer.