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;
* 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();
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
#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
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):
$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,
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) {