maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1203983 - in /maven/skins/trunk/maven-fluido-skin/src/main/resources: META-INF/maven/site.vm js/fluido.js
Date Sat, 19 Nov 2011 14:57:41 GMT
Author: simonetripodi
Date: Sat Nov 19 14:57:41 2011
New Revision: 1203983

URL: http://svn.apache.org/viewvc?rev=1203983&view=rev
Log:
code prettyprint performed on server side, no more need to traverse the DOM and apply the
styles dynamically using JQuery
Thanks to Julien Nicoulaud (who contacted me privately)

Modified:
    maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
    maven/skins/trunk/maven-fluido-skin/src/main/resources/js/fluido.js

Modified: maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm?rev=1203983&r1=1203982&r2=1203983&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm Sat Nov
19 14:57:41 2011
@@ -682,7 +682,7 @@
 
       <div id="bodyColumn" class="content">
         <div id="contentBox">
-          $bodyContent
+          $bodyContent.replaceAll("<div class=\"source\"><pre>", "<div class=\"source\"><pre
class=\"prettyprint\">")
         </div>
       </div>
     </div>

Modified: maven/skins/trunk/maven-fluido-skin/src/main/resources/js/fluido.js
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/main/resources/js/fluido.js?rev=1203983&r1=1203982&r2=1203983&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/main/resources/js/fluido.js (original)
+++ maven/skins/trunk/maven-fluido-skin/src/main/resources/js/fluido.js Sat Nov 19 14:57:41
2011
@@ -30,18 +30,6 @@ jQuery( document ).ready( function()
     } );
 
     // add prettyprint class to all 'pre' element child of 'div' whit class="source"
-    var prettify = false;
-
-    jQuery( 'div.source > pre' ).each( function()
-    {
-        jQuery( this ).addClass( 'prettyprint' );
-        prettify = true;
-    } );
-
-    // if code blocks were found, invoke the prettifier ...
-    if ( prettify )
-    {
-        prettyPrint();
-    }
+    prettyPrint();
 
 } );
\ No newline at end of file



Mime
View raw message