* Prerender the tree toggle.
svn path=/nixos/trunk/; revision=25494
This commit is contained in:
parent
0b33ba7e53
commit
5560e422ad
|
@ -52,7 +52,12 @@
|
||||||
<xsl:variable name="style"><xsl:if test="$collapsed">display: none;</xsl:if></xsl:variable>
|
<xsl:variable name="style"><xsl:if test="$collapsed">display: none;</xsl:if></xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="line|nest">
|
<xsl:if test="line|nest">
|
||||||
<a href="javascript:" class="logTreeToggle"></a>
|
<a href="javascript:" class="logTreeToggle">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$collapsed"><xsl:text>+</xsl:text></xsl:when>
|
||||||
|
<xsl:otherwise><xsl:text>-</xsl:text></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</a>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
|
@ -66,7 +71,7 @@
|
||||||
|
|
||||||
<!-- Is this the last line? If so, mark it as such so that it
|
<!-- Is this the last line? If so, mark it as such so that it
|
||||||
can be rendered differently. -->
|
can be rendered differently. -->
|
||||||
<xsl:variable name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:variable>
|
<xsl:variable name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:variable>
|
||||||
|
|
||||||
<li class='{$class}'>
|
<li class='{$class}'>
|
||||||
<span class='lineconn' />
|
<span class='lineconn' />
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
/* Set the appearance of the toggle depending on whether the
|
|
||||||
corresponding subtree is initially shown or hidden. */
|
|
||||||
$(".logTreeToggle").map(function() {
|
|
||||||
if ($(this).siblings("ul:hidden").length == 0) {
|
|
||||||
$(this).text("-");
|
|
||||||
} else {
|
|
||||||
$(this).text("+");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* When a toggle is clicked, show or hide the subtree. */
|
/* When a toggle is clicked, show or hide the subtree. */
|
||||||
$(".logTreeToggle").click(function() {
|
$(".logTreeToggle").click(function() {
|
||||||
if ($(this).siblings("ul:hidden").length != 0) {
|
if ($(this).siblings("ul:hidden").length != 0) {
|
||||||
|
|
Loading…
Reference in New Issue