diff --git a/CHANGES.txt b/CHANGES.txt index 1fc67f1..d9ef46d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,15 +2,18 @@ CHANGES ======= -Version 0.5.1dev (unreleased) ------------------------------ +0.6.0 (unreleased) +------------------ - Implemented JSON-RPC 2.0 specification. Use JSON-RPC 2.0 version as default. Optional the version 1.0 and 1.1 can be set. See JSON-RPC 2.0 specification for more information. +- skip alert on errors, pass them to the calling javascript method if callback + method is given -Version 0.5.0 (2008-04-16) -------------------------- + +0.5.0 (2008-04-16) +------------------ - Initial Release diff --git a/setup.py b/setup.py index db82541..32bf1ff 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def read(*rnames): setup ( name='z3c.jsonrpcproxy', - version='0.5.1dev', + version='0.6.0', author = "Roger Ineichen and the Zope Community", author_email = "zope3-dev@zope.org", description = "JSON RPC (javascript) proxy implementation for Zope3", diff --git a/src/z3c/jsonrpcproxy/js/z3c.jsonrpcproxy-0.5.0.js b/src/z3c/jsonrpcproxy/js/z3c.jsonrpcproxy-0.5.0.js index e6033a3..ce65716 100644 --- a/src/z3c/jsonrpcproxy/js/z3c.jsonrpcproxy-0.5.0.js +++ b/src/z3c/jsonrpcproxy/js/z3c.jsonrpcproxy-0.5.0.js @@ -2,7 +2,7 @@ /** * @fileoverview JSON-RPC client implementation * @author Roger Ineichen dev at projekt01 dot ch - * @version 0.6, supports JSON-RPC 1.0, 1.1 and 2.0 + * @version 0.5.0 supports JSON-RPC 1.0, 1.1 and 2.0 */ //---------------------------------------------------------------------------- @@ -157,15 +157,8 @@ JSONRPCMethod.prototype.handleResponse = function(resp){ alert("The server responded with an empty document."); }else{ var res = this.unmarshall(respTxt); - var oldVersion = false; - if (this.version == '1.0' || this.version == '1.1') { - oldVersion = true; - } - if(oldVersion && res.error != null){ - alert(res.error); - } - else if(!oldVersion && res.error != null){ - alert(res.error.message); + if(res.error != null){ + return res.error } else if (res.requestId != self.requestId) { alert("wrong json id returned");