Changeset 36914


Ignore:
Timestamp:
2022-11-22T14:53:10+13:00 (2 weeks ago)
Author:
kjdon
Message:

dynamically decide on cookie-consent path - use cookie_path if it is set (in servlets.xml) otherwise use servlet_context - set by LibraryServlet in config_params,a nd then passed in to xslt

Location:
main/trunk/greenstone3/web/interfaces/default
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/cookieconsent-init.js

    r36026 r36914  
    1616    autoclear_cookies: false,                  // default: false
    1717    page_scripts: true,                        // default: false
    18     cookie_path: '/greenstone3',               // default: root ( / )
     18    cookie_path: gs.xsltParams.cookie_path,               // default: root ( / )
    1919    gui_options: {
    2020        consent_modal: {
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r36632 r36914  
    2121  <xsl:param name="library_name"/>
    2222  <xsl:param name="servlet_url_prefix"/>
     23  <xsl:param name="servlet_context"/>
    2324  <xsl:param name="site_name"/>
    2425  <xsl:param name="use_client_side_xslt"/>
     
    2829  <xsl:param name="favouritebasket"/>
    2930  <xsl:param name="documentbasket"/>
    30 
     31  <xsl:param name="cookie_path"/>
    3132  <xsl:variable name="unselected_favourite_icon">favourite-star-transparent-unselected32.png</xsl:variable>
    3233  <xsl:variable name="selected_favourite_icon">favourite-star-transparent-selected32.png</xsl:variable>
  • main/trunk/greenstone3/web/interfaces/default/transform/javascript-global-setup.xsl

    r36027 r36914  
    5252            <xsl:text disable-output-escaping="yes">gs.xsltParams.use_client_side_xslt = "</xsl:text><xsl:value-of select="$use_client_side_xslt"/><xsl:text disable-output-escaping="yes">";</xsl:text>
    5353            <xsl:text disable-output-escaping="yes">gs.xsltParams.filepath = "</xsl:text><xsl:value-of select="$filepath"/><xsl:text disable-output-escaping="yes">";</xsl:text>
     54            <xsl:text disable-output-escaping="yes">gs.xsltParams.cookie_path = "</xsl:text><xsl:choose><xsl:when test="$cookie_path"><xsl:value-of select="$cookie_path"/></xsl:when><xsl:otherwise><xsl:value-of select="$servlet_context"/></xsl:otherwise></xsl:choose><xsl:text disable-output-escaping="yes">";</xsl:text>
    5455        </script>
    5556    </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.