From a0c7080d9eb960318465386d23b8da2b9f92d978 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Thu, 21 Mar 2013 08:30:26 +0100
Subject: [PATCH] cosmetic

---
 manifold/js/manifold-query.js | 29 +++++++++++++++--------------
 manifold/js/manifold.js       |  2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/manifold/js/manifold-query.js b/manifold/js/manifold-query.js
index 7578c0ae..7d885ae7 100644
--- a/manifold/js/manifold-query.js
+++ b/manifold/js/manifold-query.js
@@ -29,15 +29,15 @@ DELETE FROM subject WHERE filter
 INSERT INTO subject VALUES(field=value)
 -------------------------------------------------------------*/
     
-    this.__repr = function (q) {
+    this.__repr = function () {
 	res  = "ManyfoldQuery ";
-	res += " id=" + q.query_uuid;
-	res += " a=" + q.action;
-	res += " s=" + q.subject;
-	res += " ts=" + q.timestamp;
-	res += " flts=" + q.filters;
-	res += " flds=" + q.fields;
-	res += " prms=" + q.params;
+	res += " id=" + this.query_uuid;
+	res += " a=" + this.action;
+	res += " s=" + this.subject;
+	res += " ts=" + this.timestamp;
+	res += " flts=" + this.filters;
+	res += " flds=" + this.fields;
+	res += " prms=" + this.params;
 	return res;
     }	
 
@@ -61,7 +61,8 @@ INSERT INTO subject VALUES(field=value)
         }
         this.filters.push(new Array(key, op, value));
     }
-    this.remove_filter = function (key,op,value){
+
+    this.remove_filter = function (key,op,value) {
         // if operator is null then remove all occurences of this key
         if(!op){
             this.filters = jQuery.grep(this.filters, function(val, i) { 
@@ -71,9 +72,9 @@ INSERT INTO subject VALUES(field=value)
             this.filters = jQuery.grep(this.filters, function(val, i) {return (val[0] != key || val[1] != op);});
         }
     }
+
     // FIXME These functions computing diff's between queries are meant to be shared
-    this.diff_fields = function (otherQuery)
-    {
+    this.diff_fields = function (otherQuery) {
         var f1 = this.fields;
         var f2 = otherQuery.fields;
 
@@ -83,10 +84,10 @@ INSERT INTO subject VALUES(field=value)
         var removed = jQuery.grep(f1, function (x) { return jQuery.inArray(x, f2) == -1 }); 
         
         return {'added':added, 'removed':removed};
-    }    
+    }
+
     // FIXME Modify filter to filters
-    this.diff_filter = function (otherQuery)
-    {
+    this.diff_filter = function (otherQuery) {
         var f1 = this.filters;
         var f2 = otherQuery.filters;
         
diff --git a/manifold/js/manifold.js b/manifold/js/manifold.js
index 0ac331b8..5765195a 100644
--- a/manifold/js/manifold.js
+++ b/manifold/js/manifold.js
@@ -5,7 +5,7 @@ function debug_dict_keys (msg, o) {
     console.log ("debug_dict_keys: " + msg + " keys= " + keys);
 }
 function debug_dict (msg, o) {
-    for (var k in o) console.log ("debug_dict_keys: " + msg + " [" + k + "]=" + o[k]);
+    for (var k in o) console.log ("debug_dict: " + msg + " [" + k + "]=" + o[k]);
 }
 function debug_value (msg, value) {
     console.log ("debug_value: " + msg + " " + value);
-- 
2.47.0