cosmetic
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 24 Apr 2013 15:08:50 +0000 (17:08 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 24 Apr 2013 15:08:50 +0000 (17:08 +0200)
manifold/js/manifold.js
manifold/manifoldapi.py
manifold/manifoldproxy.py
plugins/googlemap/googlemap.js
unfold/js/unfold-helper.js

index 7105f52..81c61ce 100644 (file)
@@ -111,19 +111,19 @@ var manifold = {
 
   var o = $({});
 
-  $.subscribe = function( types, selector, data, fn) {
+  $.subscribe = function( channel, selector, data, fn) {
     /* borrowed from jQuery */
     if ( data == null && fn == null ) {
-        // ( types, fn )
+        // ( channel, fn )
         fn = selector;
         data = selector = undefined;
     } else if ( fn == null ) {
         if ( typeof selector === "string" ) {
-            // ( types, selector, fn )
+            // ( channel, selector, fn )
             fn = data;
             data = undefined;
         } else {
-            // ( types, data, fn )
+            // ( channel, data, fn )
             fn = data;
             data = selector;
             selector = undefined;
@@ -138,7 +138,7 @@ var manifold = {
      * supported and editable, we might have the same issue with results but
      * the page load time will be severely affected...
      */
-    o.on.apply(o, [types, selector, data, function() { 
+    o.on.apply(o, [channel, selector, data, function() { 
         for(i = 1; i < arguments.length; i++) {
             if ( arguments[i].constructor.name == 'ManifoldQuery' )
                 arguments[i] = arguments[i].clone();
index c9d3b0b..504e182 100644 (file)
@@ -44,7 +44,7 @@ class ManifoldAPI:
                     pass
                 else:
                     if debug:
-                        print '===> backend call', methodName, args, kwds
+                        print '<=== backend call', methodName, args, kwds
                         print '.... ctd', 'Authmethod=',self.auth['AuthMethod'], self.url,'->',
                         if not result:                        print "[no/empty result]"
                         elif isinstance (result,str):         print "result is '%s'"%result
index d88b5f6..80e8066 100644 (file)
@@ -14,7 +14,7 @@ debug_spin=0
 #debug_spin=1
 
 # pretend the server only returns - empty lists to 'get' requests - this is to mimick 
-# misconfigurations or expired credentials or similar cormer case situations
+# misconfigurations or expired credentials or similar corner case situations
 debug_empty=False
 #debug_empty=True
 
@@ -73,7 +73,14 @@ with the query passed using POST"""
         manifold_api= ManifoldAPI(auth=manifold_api_session_auth)
         if debug: print 'manifoldproxy.proxy: sending to backend', manifold_query
         answer=manifold_api.send_manifold_query (manifold_query)
-        if debug: print 'manifoldproxy.proxy: received from backend with code', answer['code']
+        if debug: 
+            print '<=== manifoldproxy.proxy: received from backend with code', answer['code']
+            if answer['code']==0:
+                print ".... ctd ",
+                value=answer['value']
+                if isinstance (value, list): print "result is a list with %d entries"%len(value)
+                elif isinstance (value, dict): print "result is a dict with keys %s"%value.keys()
+                else: print "result is other (type=%s) : %s"%(type(value),value)
         json_answer=json.dumps(answer)
         # if in debug mode we save this so we can use offline mode later
         if (debug):
index 326bf92..62e1d6f 100644 (file)
@@ -29,7 +29,6 @@
             $this.data('markerCluster', null);
             $this.data('markers', []);
 
-            console.log ("lat=" + options.latitude + " long=" + options.longitude + " and zoom=" + options.zoom);
             var myLatlng = new google.maps.LatLng(options.latitude, options.longitude);
             var myOptions = {
               zoom: options.zoom,
index 67db643..c104ea3 100644 (file)
@@ -22,7 +22,6 @@ var unfold = {
 
     errorDisplay : function (error) {
        return '<div class="error"><dl id="system-message"><dt class="error">Notice</dt><dd class="error message"><ul><li>' + error + '</li></ul></dd></dl></div>';
-    return out;
     },
 
     get_value: function (value) {