no spinner on querycode
[myslice.git] / plugins / static / js / querycode.js
index a48ff37..a8e1e89 100644 (file)
@@ -16,10 +16,15 @@ function debug_object (msg, o) {
     console.log (msg + " Keys : " + keys);
 }
 
+// xxx TODO
+// . turn back on syntax highlighting
+
 (function($) {
   
     var methods = {
        init : function (options) {
+           console.log("temporarily turned off SyntaxHighlighter ...");
+//          SyntaxHighlighter.all();
            return this.each(function() {
                var $this=$(this);
                var data=$this.data('QueryCode');
@@ -32,11 +37,11 @@ function debug_object (msg, o) {
                    $this.data('QueryCode', {options: options});
                    // react to changes to the language selector
                    $this.find(".querycode-lang").change(change_language);
+                   // publish so we refresh ourselves
+                   $.publish(channel,"please_init_yourself");
                }
            });
 
-       console.log("temporarily turned off SyntaxHighlighter ...");
-//      SyntaxHighlighter.all();
 
        }, 
 
@@ -46,11 +51,6 @@ function debug_object (msg, o) {
 //     update : function( content ) { 
 //         if (querycode_debug) console.log("QueryCode.update...");
 //     },
-       trigger : function () {
-           var channel='/results/' + $(this).data.QueryCode.options.query_uuid + '/updated';
-           publish(channel,"trigger");
-       }
-           
        
     } // methods
                          
@@ -78,8 +78,6 @@ function debug_object (msg, o) {
     }
  
     function do_update ($plugindiv) {
-       // just in case
-       $plugindiv.closest('.need-spin').spin(false);
 
        var lang=$plugindiv.find(".querycode-lang").val();
        var dom=$plugindiv.find(".querycode-viz");
@@ -175,11 +173,5 @@ function debug_object (msg, o) {
        return output;
     }
     
-
-
-    // get these plugins to update their contents upon loading
-    // manually publishing on the right channel
-//    $(function () { $(".QueryCode").each(function () { this.trigger(); })})
-
 })(jQuery); // end closure wrapper