Ignore:
Timestamp:
2009-06-22T13:51:24+12:00 (14 years ago)
Author:
ak19
Message:

Added in missing template response that's called and was previously missing (and which cased a fatal error message to be printed to the tomcat console).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/gs2/transform/style.xsl

    r18391 r19874  
    1414
    1515  <!-- any global style stuff should go in here -->
     16  <xsl:template name="response">
     17    <xsl:apply-templates select="pageResponse"/>
     18    <xsl:if test="descendant::error">
     19      <script language="Javascript">
     20    <xsl:text disable-output-escaping="yes">
     21      function removeAllChildren(node) {
     22        while (node.hasChildNodes()) {
     23          node.removeChild(node.firstChild);
     24        }
     25      }
     26
     27      function toggleHideError(obj) {
     28        if (obj.style.display == "none") {
     29          obj.style.display = "";
     30          hide_link = document.getElementById("hide");
     31          removeAllChildren(hide_link);
     32          hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">"));
     33        } else {
     34          obj.style.display = "none";
     35          hide_link = document.getElementById("hide");
     36          removeAllChildren(hide_link);
     37          hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">"));
     38        }
     39      }
     40    </xsl:text>
     41      </script>
     42      <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p>
     43      <div id="error" style="display: none;">
     44    <xsl:apply-templates select="descendant::error"/>
     45      </div>
     46    </xsl:if>
     47  </xsl:template>
     48
    1649  <xsl:template name="globalStyle">
    1750    <link rel="stylesheet" href="interfaces/gs2/style/gs2-style.css" type="text/css"/>
Note: See TracChangeset for help on using the changeset viewer.