[yelp-xsl] Custom jQuery.syntax layout, fix some bits for jQuery.syntax 3.0



commit 8a8d8068df517b4e988ed1a0bfd4b0f1861399cd
Author: Shaun McCance <shaunm gnome org>
Date:   Mon May 16 19:00:57 2011 -0400

    Custom jQuery.syntax layout, fix some bits for jQuery.syntax 3.0

 js/Makefile.am                  |    6 +-----
 js/jquery.syntax.layout.yelp.js |    4 ++++
 xslt/common/html.xsl            |    6 +-----
 3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/js/Makefile.am b/js/Makefile.am
index 495f0c2..3478d5f 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -33,11 +33,7 @@ js_DATA =					\
 	jquery.syntax.brush.xml.js		\
 	jquery.syntax.brush.yaml.js		\
 	jquery.syntax.core.js			\
-	jquery.syntax.layout.fixed.js		\
-	jquery.syntax.layout.inline.js		\
-	jquery.syntax.layout.list.js		\
-	jquery.syntax.layout.plain.js		\
-	jquery.syntax.layout.table.js		\
+	jquery.syntax.layout.yelp.js		\
 	jquery.syntax.js
 
 EXTRA_DIST = $(js_DATA)
diff --git a/js/jquery.syntax.layout.yelp.js b/js/jquery.syntax.layout.yelp.js
new file mode 100644
index 0000000..1e28d67
--- /dev/null
+++ b/js/jquery.syntax.layout.yelp.js
@@ -0,0 +1,4 @@
+Syntax.layouts.yelp = function(options, code, container) {
+  code.addClass('contents');
+  return code;
+};
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index 18cb2e3..e3e3c69 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -1054,8 +1054,6 @@ All parameters can be automatically computed if not provided.
   </xsl:param>
   <xsl:if test="$html.syntax.highlight">
   <xsl:text>
-pre.syntax {
-}
 pre.syntax span.function, pre.syntax span.keyword, pre.syntax span.tag {
   color: </xsl:text><xsl:value-of select="$color.blue_border"/><xsl:text>;
 }
@@ -1464,9 +1462,7 @@ is included by *{html.js.syntax}.
   <xsl:if test="$html.syntax.highlight">
 <xsl:text><![CDATA[
 $(document).ready( function () { jQuery.syntax({root: ']]></xsl:text>
-<xsl:value-of select="$html.js.root"/><xsl:text><![CDATA[', blockLayout: 'plain'},
-function (options, html, container)
-{ html.attr('class', container.attr('class')); return html; }); });
+<xsl:value-of select="$html.js.root"/><xsl:text><![CDATA[', blockLayout: 'yelp'}); });
 ]]></xsl:text>
   </xsl:if>
 </xsl:template>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]