adding some tracability into the plugins code
[myslice.git] / plugins / queryupdater / static / js / queryupdater.js
index e87b54f..b00f04f 100644 (file)
@@ -11,6 +11,9 @@
 
 (function( $ ){
 
+    var debug=false;
+    debug=true;
+
     // XXX record selected (multiple selection ?)
     // XXX record disabled ?
     // XXX out of sync plugin ?
@@ -25,8 +28,8 @@
 
     var QueryUpdater = Plugin.extend({
 
-        init: function(options, element)
-        {
+        init: function(options, element) {
+           this.classname="queryupdater";
             this._super(options, element);
 
             var self = this;
@@ -65,8 +68,7 @@
 
         /***************************** GUI EVENTS *****************************/
 
-        do_update: function(e) 
-        {
+        do_update: function(e) {
             var self = e.data;
             // XXX check that the query is not disabled
             manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
 
         on_query_in_progress: function()
         {
+           messages.debug("queryupdater.on_query_in_progress");
             this.spin();
         },
 
 
         on_field_state_changed: function(result)
         {
-            console.log(result)
+            messages.debug(result)
             /* this.set_state(result.request, result.key, result.value, result.status); */
             this.set_state(result);
         },
 
         update_resources: function(resources, change)
         {
-            console.log("update_resources");
+            messages.debug("update_resources");
             var my_oTable = this.table.dataTable();
             var prev_resources = this.current_resources;