-rw-r--r-- | frontend/gamma/html/index_template.html | 5 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/Async.js | 19 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/Proxy.js | 2 |
3 files changed, 19 insertions, 7 deletions
diff --git a/frontend/gamma/html/index_template.html b/frontend/gamma/html/index_template.html index 8cf838c..bedb243 100644 --- a/frontend/gamma/html/index_template.html +++ b/frontend/gamma/html/index_template.html @@ -34,16 +34,21 @@ Clipperz_normalizedNewLine = '\x0d\x0a'; <h2>loading ...</h2> </div> @js_INSTALL@ </div> <div id="applicationVersionType" class="@application.version.type@"></div> +<script> + Clipperz.PM.Proxy.defaultProxy = new Clipperz.PM.Proxy.JSON({'url':'@request.path@', 'shouldPayTolls':@should.pay.toll@}); + /*offline_data_placeholder*/ +</script> + <!-- --> <div id="javaScriptAlert"> <div class="mask"></div> <div class="message"> <div class="header"></div> <div class="body"> <div class="alertLogo"></div> <div class="alert"> 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 @@ -57,17 +57,18 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, { 'args': function () { return this._args; }, //----------------------------------------------------------------------------- '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 + "]"; this.addErrback(function(aResult) { if (! (aResult instanceof MochiKit.Async.CancelledError)) { @@ -77,17 +78,18 @@ 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; }); } } if (CLIPPERZ_DEFERRED_CALL_LOGGING_ENABLED === true) { Clipperz.log("callback " + this._name, this); @@ -101,28 +103,32 @@ Clipperz.Base.extend(Clipperz.Async.Deferred, MochiKit.Async.Deferred, { 'addCallback': function () { var message; 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;} ); } }, //============================================================================= 'addCallbackPass': function() { var passFunction; @@ -401,16 +407,17 @@ MochiKit.Base.update(Clipperz.Async.DeferredSynchronizer.prototype, { this.incrementNumberOfMethodsDone(); this.methodResults()[anIndexValue] = aResult; 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!!! :( } }, //----------------------------------------------------------------------------- __syntaxFix__: "syntax fix" 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 @@ -137,17 +137,17 @@ Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, { return this.processMessage('logout', someParameters, 'MESSAGE'); }, //========================================================================= '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; }, |