cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/stylesheets/system error2html.xslt
Date Wed, 18 Feb 2004 17:29:00 GMT
joerg       2004/02/18 09:29:00

  Modified:    src/webapp/stylesheets/system error2html.xslt
  Log:
  don't hide the stacktrace by default as the JS might not be available, hiding it onload
  
  Revision  Changes    Path
  1.15      +15 -4     cocoon-2.1/src/webapp/stylesheets/system/error2html.xslt
  
  Index: error2html.xslt
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/stylesheets/system/error2html.xslt,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- error2html.xslt	2 Feb 2004 16:10:41 -0000	1.14
  +++ error2html.xslt	18 Feb 2004 17:29:00 -0000	1.15
  @@ -28,6 +28,7 @@
           <script src="{$contextPath}/scripts/main.js" type="text/javascript"/>
         </head>
         <body>
  +      	<xsl:apply-templates select="." mode="onload"/>
           <h1><xsl:value-of select="$pageTitle"/></h1>
   
           <p class="message">
  @@ -88,14 +89,24 @@
       </html>
     </xsl:template>
   
  +  <xsl:template match="error:notify" mode="onload">
  +  	<xsl:attribute name="onload">
  +  	  <xsl:for-each select="error:extra[contains(@error:description,'stacktrace')]">
  +  	  	<xsl:text>toggle('</xsl:text>
  +  	  	<xsl:value-of select="@error:description"/>
  +  	  	<xsl:text>');</xsl:text>
  +  	  </xsl:for-each>
  +  	</xsl:attribute>
  +  </xsl:template>
  +
     <xsl:template match="error:extra">
       <xsl:choose>
        <xsl:when test="contains(@error:description,'stacktrace')">
         <p class="stacktrace">
          <span class="description"><xsl:value-of select="@error:description"/></span>
  -       <span class="switch" id="{@error:description}-switch" onclick="toggle('{@error:description}')">[show]</span>
  -       <pre id="{@error:description}" style="display: none">
  -         <xsl:value-of select="translate(.,'&#13;',' ')"/>
  +       <span class="switch" id="{@error:description}-switch" onclick="toggle('{@error:description}')">[hide]</span>
  +       <pre id="{@error:description}">
  +         <xsl:value-of select="translate(.,'&#13;','')"/>
          </pre>
         </p>
        </xsl:when>
  
  
  

Mime
View raw message