Branch: refs/heads/master
Home: https://github.com/NixOS/hydra
Commit: b52018e61a91d1291622cbd36f4f4dfd0afdda29
https://github.com/NixOS/hydra/commit/b52018e61a91d1291622cbd36f4f4dfd0afdda29
Author: Eelco Dolstra <[email protected]>
Date: 2012-04-30 (Mon, 30 Apr 2012)
Changed paths:
M src/root/layout.tt
M src/root/static/css/logfile.css
M src/xsl/log2html.xsl
Log Message:
-----------
Use a span instead of a div in the pretty logs
Fixes #6.
diff --git a/src/root/layout.tt b/src/root/layout.tt
index c7497d1..673051f 100644
--- a/src/root/layout.tt
+++ b/src/root/layout.tt
@@ -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("+");
});
diff --git a/src/root/static/css/logfile.css b/src/root/static/css/logfile.css
index 2aff8a0..a49e2b0 100644
--- a/src/root/static/css/logfile.css
+++ b/src/root/static/css/logfile.css
@@ -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;
-}
diff --git a/src/xsl/log2html.xsl b/src/xsl/log2html.xsl
index 3616ab9..e495d52 100644
--- a/src/xsl/log2html.xsl
+++ b/src/xsl/log2html.xsl
@@ -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>
================================================================
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits