querycode to use syntaxhighlighter again
[unfold.git] / plugins / querycode / querycode.js
index eab1238..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) {
-           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);
-       console.log("turned off SyntaxHighlighter.highlight");
-//     SyntaxHighlighter.highlight()
-
+       if (debug) console.log("SyntaxHighlighter.highlight");
+       SyntaxHighlighter.highlight()
     }
 
 
        });
        ofs = '[' + ofs + ']';
 
-       output += 'pp srv.call("' + mixed_case(query.action) +'", auth, "' + query.method + '", "' + query.timestamp + '", ' + ifs + ', ' + ofs + ')';
+       output += 'pp srv.call("' + mixed_case(query.action) +'", auth, "' + query.subject + '", "' + query.timestamp + '", ' + ifs + ', ' + ofs + ')';
 
        var output = '<pre class="brush: ruby; toolbar: false;">' + output + "</pre>";
        return output;
        });
        ofs = '[' + ofs + ']';
 
-       output += 'srv.' + mixed_case(query.action) + '(auth, "' + query.method + '", ' + ifs + ', {}, ' + ofs + ')';
+       output += 'srv.' + mixed_case(query.action) + '(auth, "' + query.subject + '", ' + ifs + ', {}, ' + ofs + ')';
        var output = '<pre class="brush: python; toolbar: false;">' + output + "</pre>";
        return output;
     }