summaryrefslogtreecommitdiff
path: root/frontend/gamma/js
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-23 17:36:57 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-23 17:36:57 (UTC)
commit67455b069c4c9ec493f9cef76017e172a430a7d4 (patch) (side-by-side diff)
tree0b287debfeeb0819b3df9dd02860cd84103e25b3 /frontend/gamma/js
parentb312e037ebba7c94abea9661bcf62c52b7d73fbf (diff)
downloadclipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.zip
clipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.tar.gz
clipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.tar.bz2
Integration of PHP backend with /beta and /gamma front ends
Fixed PHP backend and /beta code to handle request and data format compatible with /gamma. At the moment adding/deleting/editing records seem to work fine.
Diffstat (limited to 'frontend/gamma/js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/Async.js19
-rw-r--r--frontend/gamma/js/Clipperz/PM/Proxy.js2
2 files changed, 14 insertions, 7 deletions
diff --git a/frontend/gamma/js/Clipperz/Async.js b/frontend/gamma/js/Clipperz/Async.js
index 7c9d783..97d8ecf 100644
--- a/frontend/gamma/js/Clipperz/Async.js
+++ b/frontend/gamma/js/Clipperz/Async.js
@@ -59,13 +59,14 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
},
//-----------------------------------------------------------------------------
'callback': function (aValue) {
if (this._shouldTrace) {
- Clipperz.log("CALLBACK " + this._name, aValue);
+ // Clipperz.log("CALLBACK " + this._name, aValue);
+ console.log("CALLBACK " + this._name, aValue);
}
if (this.chained == false) {
var message;
message = "ERROR [" + this._name + "]";
@@ -79,13 +80,14 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
if (this._shouldTrace) {
var resultMessage;
resultMessage = "RESULT " + this._name + " <==";
// this.addCallback(function(aResult) {
Clipperz.Async.Deferred.superclass.addCallback.call(this, function(aResult) {
- Clipperz.log(resultMessage, aResult);
+ // Clipperz.log(resultMessage, aResult);
+ console.log(resultMessage, aResult);
return aResult;
});
}
}
@@ -103,24 +105,28 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, {
if (this._shouldTrace) {
this._count ++;
message = "[" + this._count + "] " + this._name + " ";
// this.addBoth(function(aResult) {Clipperz.log(message + "-->", aResult); return aResult;});
this.addCallbacks(
- function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;},
- function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;}
+ // function(aResult) {Clipperz.log("-OK- " + message + "-->"/*, aResult*/); return aResult;},
+ function(aResult) {console.log("-OK- " + message + "-->"/*, aResult*/); return aResult;},
+ // function(aResult) {Clipperz.log("FAIL " + message + "-->"/*, aResult*/); return aResult;}
+ function(aResult) {console.log("FAIL " + message + "-->"/*, aResult*/); return aResult;}
);
}
Clipperz.Async.Deferred.superclass.addCallback.apply(this, arguments);
if (this._shouldTrace) {
// this.addBoth(function(aResult) {Clipperz.log(message + "<--", aResult); return aResult;});
this.addCallbacks(
- function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;},
- function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;}
+ // function(aResult) {Clipperz.log("-OK- " + message + "<--", aResult); return aResult;},
+ function(aResult) {console.log("-OK- " + message + "<--", aResult); return aResult;},
+ // function(aResult) {Clipperz.log("FAIL " + message + "<--", aResult); return aResult;}
+ function(aResult) {console.log("FAIL " + message + "<--", aResult); return aResult;}
);
}
},
//=============================================================================
@@ -403,12 +409,13 @@ MochiKit.Base.update(Clipperz.Async.DeferredSynchronizer.prototype, {
if (this.numberOfMethodsDone() < this.methods().length) {
// nothing to do here other than possibly log something
} else if (this.numberOfMethodsDone() == this.methods().length) {
this.result().callback();
} else if (this.numberOfMethodsDone() > this.methods().length) {
+ alert("Clipperz.Async.Deferred.handleMethodCallDone -> WTF!");
// WTF!!! :(
}
},
//-----------------------------------------------------------------------------
diff --git a/frontend/gamma/js/Clipperz/PM/Proxy.js b/frontend/gamma/js/Clipperz/PM/Proxy.js
index 190bffd..9817eac 100644
--- a/frontend/gamma/js/Clipperz/PM/Proxy.js
+++ b/frontend/gamma/js/Clipperz/PM/Proxy.js
@@ -139,13 +139,13 @@ Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, {
//=========================================================================
'processMessage': function (aFunctionName, someParameters, aRequestType) {
var deferredResult;
- deferredResult = new Clipperz.Async.Deferred("Proxy.processMessage", {trace:false});
+ deferredResult = new Clipperz.Async.Deferred("Proxy.processMessage", {trace:true});
deferredResult.addMethod(this, 'payToll', aRequestType);
deferredResult.addMethod(this, 'sendMessage', aFunctionName);
deferredResult.addMethod(this, 'setTollCallback');
deferredResult.callback(someParameters);
return deferredResult;