querycode to use syntaxhighlighter again
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 24 Mar 2013 23:01:34 +0000 (00:01 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 24 Mar 2013 23:01:34 +0000 (00:01 +0100)
plugins/querycode/querycode.js
plugins/querycode/querycode.py

index 65c6d0d..0898e4a 100644 (file)
@@ -7,9 +7,6 @@
  * License: GPLv3
  */
 
-// xxx TODO
-// . turn back on syntax highlighting
-
 (function($) {
   
     var debug=false;
@@ -28,8 +25,8 @@
 
     var methods = {
        init : function (options) {
-           if (debug) console.log("temporarily turned off SyntaxHighlighter ...");
-//          SyntaxHighlighter.all();
+           if (debug) console.log("SyntaxHighlighter.all ...");
+            SyntaxHighlighter.all();
            return this.each(function() {
                var $this=$(this);
                var data=$this.data('QueryCode');
@@ -86,9 +83,8 @@
        }
        html_code=fun(query);
        dom.html(html_code);
-       if (debug) console.log("turned off SyntaxHighlighter.highlight");
-//     SyntaxHighlighter.highlight()
-
+       if (debug) console.log("SyntaxHighlighter.highlight");
+       SyntaxHighlighter.highlight()
     }
 
 
index 6c3cb21..b29917d 100644 (file)
@@ -13,21 +13,16 @@ class QueryCode (Plugin):
 
     def requirements (self):
         return { 
-            'js_files' : [ "js/querycode.js", 
-                           "js/manifold.js", "js/manifold-query.js",
-                           "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", 
-                           
-#        Plugins::add_js('/QueryCode/beautyofcode/scripts/shCore.js');
-#        Plugins::add_js('/QueryCode/beautyofcode/scripts/shBrushPython.js');
-#        Plugins::add_js('/QueryCode/beautyofcode/scripts/shBrushRuby.js');
-#        Plugins::add_js('/QueryCode/beautyofcode/scripts/shAutoloader.js');
-                           ] ,
+            'js_files' : [ 
+                "js/querycode.js", 
+                "js/manifold.js", "js/manifold-query.js",
+                "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", 
+                "js/shAutoloader.js","js/shCore.js","js/shBrushPython.js","js/shBrushRuby.js",
+                ] ,
 # thierry: see this file for details of why we turn this off for now            
-             'css_files': [
-###                "css/querycode.css" ,
-#        Plugins::add_css('/QueryCode/beautyofcode/styles/shCore.css');
-#        Plugins::add_css('/QueryCode/beautyofcode/styles/shCoreDefault.css');
-#        Plugins::add_css('/QueryCode/beautyofcode/styles/shThemeDefault.css');
+            'css_files': [
+                "css/querycode.css" ,
+                "css/shCore.css","css/shCoreDefault.css","css/shThemeDefault.css",
                 ],
             }