Got context functions back in, added noteworthy stuff, replaced js linebreak replacer with xstl

This commit is contained in:
Jörn Zaefferer 2006-12-12 20:33:10 +00:00
parent fb11b33d68
commit 6ac46e6a5a
4 changed files with 66 additions and 18 deletions

View file

@ -18,11 +18,7 @@ $(document).ready(function(){
}).ToolTipDemo('#fff');
$("a.name").click(function(){
$("div.more,div.short",this.parentNode.parentNode)
.find("div.desc").each(function(){
$(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") );
}).end()
.toggle('slow');
$("div.more,div.short",this.parentNode.parentNode).toggle('slow');
return false;
});

View file

@ -37,7 +37,9 @@
</div>
<div class='more'>
<div class='desc'>
<xsl:value-of select="desc"/>
<xsl:for-each select="desc">
<xsl:call-template name="break" />
</xsl:for-each>
</div>
<xsl:for-each select="examples">
<div class='example'>
@ -66,4 +68,20 @@
</html>
</xsl:template>
<xsl:template name="break">
<xsl:param name="text" select="." />
<xsl:choose>
<xsl:when test="contains($text, '&#xa;&#xa;')">
<xsl:value-of select="substring-before($text, '&#xa;&#xa;')" />
<br /><br />
<xsl:call-template name="break">
<xsl:with-param name="text" select="substring-after($text, '&#xa;&#xa;')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>