Use a span instead of a div in the pretty logs

Fixes #6.
This commit is contained in:
Eelco Dolstra 2012-04-30 21:32:53 +02:00
parent eb51065a16
commit b52018e61a
3 changed files with 17 additions and 13 deletions

View file

@ -61,7 +61,7 @@
/* Implementation of the expand all link. */
$(".logTreeExpandAll").click(function() {
$(".logTreeToggle", $(this).siblings(".toplevel")).map(function() {
$(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
$(this).siblings("ul").show();
$(this).text("-");
});
@ -69,7 +69,7 @@
/* Implementation of the collapse all link. */
$(".logTreeCollapseAll").click(function() {
$(".logTreeToggle", $(this).siblings(".toplevel")).map(function() {
$(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
$(this).siblings("ul").hide();
$(this).text("+");
});

View file

@ -81,6 +81,11 @@ em.storeref:hover span.popup {
font-size: larger;
}
span.code {
white-space: pre-wrap;
font-family: monospace;
}
.errorLine {
color: #ff0000;
font-weight: bold;
@ -94,7 +99,3 @@ em.storeref:hover span.popup {
.prio3 {
font-style: italic;
}
.code {
white-space: pre-wrap;
}

View file

@ -7,8 +7,11 @@
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
<xsl:template match="logfile">
[<a href="javascript:" class="logTreeExpandAll">Expand all</a>]
[<a href="javascript:" class="logTreeCollapseAll">Collapse all</a>]
<p>
<a href="javascript:" class="btn btn-info logTreeExpandAll"><i class="icon-plus icon-white"></i> Expand all</a>
<xsl:text> </xsl:text>
<a href="javascript:" class="btn btn-info logTreeCollapseAll"><i class="icon-minus icon-white"></i> Collapse all</a>
</p>
<ul class='toplevel'>
<xsl:for-each select='line|nest'>
<li>
@ -61,18 +64,18 @@
<xsl:template match="head|line">
<div class="code">
<span class="code">
<xsl:if test="@error">
<xsl:attribute name="class">errorLine</xsl:attribute>
<xsl:attribute name="class">code errorLine</xsl:attribute>
</xsl:if>
<xsl:if test="@warning">
<xsl:attribute name="class">warningLine</xsl:attribute>
<xsl:attribute name="class">code warningLine</xsl:attribute>
</xsl:if>
<xsl:if test="@priority = 3">
<xsl:attribute name="class">prio3</xsl:attribute>
<xsl:attribute name="class">code prio3</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</div>
</span>
</xsl:template>