From bdc9578767df176902d19e6d94e1aacf6ef921a9 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 24 Apr 2013 17:08:50 +0200 Subject: [PATCH] cosmetic --- manifold/js/manifold.js | 10 +++++----- manifold/manifoldapi.py | 2 +- manifold/manifoldproxy.py | 11 +++++++++-- plugins/googlemap/googlemap.js | 1 - unfold/js/unfold-helper.js | 1 - 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/manifold/js/manifold.js b/manifold/js/manifold.js index 7105f521..81c61ce4 100644 --- a/manifold/js/manifold.js +++ b/manifold/js/manifold.js @@ -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(); diff --git a/manifold/manifoldapi.py b/manifold/manifoldapi.py index c9d3b0b1..504e1829 100644 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@ -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 diff --git a/manifold/manifoldproxy.py b/manifold/manifoldproxy.py index d88b5f6a..80e8066a 100644 --- a/manifold/manifoldproxy.py +++ b/manifold/manifoldproxy.py @@ -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): diff --git a/plugins/googlemap/googlemap.js b/plugins/googlemap/googlemap.js index 326bf92b..62e1d6fb 100644 --- a/plugins/googlemap/googlemap.js +++ b/plugins/googlemap/googlemap.js @@ -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, diff --git a/unfold/js/unfold-helper.js b/unfold/js/unfold-helper.js index 67db643e..c104ea3d 100644 --- a/unfold/js/unfold-helper.js +++ b/unfold/js/unfold-helper.js @@ -22,7 +22,6 @@ var unfold = { errorDisplay : function (error) { return '
Notice
  • ' + error + '
'; - return out; }, get_value: function (value) { -- 2.43.0