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="[EMAIL PROTECTED]:description}-switch" 
onclick="toggle('[EMAIL PROTECTED]:description}')">[show]</span>
  -       <pre id="[EMAIL PROTECTED]:description}" style="display: none">
  -         <xsl:value-of select="translate(.,'&#13;',' ')"/>
  +       <span class="switch" id="[EMAIL PROTECTED]:description}-switch" 
onclick="toggle('[EMAIL PROTECTED]:description}')">[hide]</span>
  +       <pre id="[EMAIL PROTECTED]:description}">
  +         <xsl:value-of select="translate(.,'&#13;','')"/>
          </pre>
         </p>
        </xsl:when>
  
  
  

Reply via email to