Ignore:
Timestamp:
2023-02-20T12:31:14+13:00 (16 months ago)
Author:
kjdon
Message:

now we use (un)selected_favourite_icon_url everywhere, instead of building the path each time. This now comes from interface_default.properties, instead of having hte image name hard coded in gslib. This matches other image definitions, and allows easier customization for a new interface. Note, I needed to define the gsf:variables in a couple places. at the start of gslib, can't use gsf:variable here. gsf:variable neded to make the js variable

File:
1 edited

Legend:

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

    r36967 r37334  
    2020    <!-- the page content -->
    2121    <xsl:template match="/page">
    22       <gsf:variable name="selected_favourite_icon_url">interfaces/<xsl:value-of select="$interface_name"/>/images/<xsl:value-of select="$selected_favourite_icon"/></gsf:variable>
    23       <gsf:variable name="unselected_favourite_icon_url">interfaces/<xsl:value-of select="$interface_name"/>/images/<xsl:value-of select="$unselected_favourite_icon"/></gsf:variable>
    24 
     22          <!-- these two variables defined here, then used by javascript-->
     23          <gsf:variable name="selected_favourite_icon_url"><gsf:interfaceText name="favourite_star_selected_image"/></gsf:variable>
     24          <gsf:variable name="unselected_favourite_icon_url"><gsf:interfaceText name="favourite_star_image"/></gsf:variable>
    2525      <gslib:langfrag name="favourites"/>
    2626        <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
Note: See TracChangeset for help on using the changeset viewer.