summaryrefslogtreecommitdiff
path: root/lib/dojo/rpc
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
committerAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
commit81bea17aefb26859f825b9293c7c99192874806e (patch)
treefb244408ca271affa2899adb634788802c9a89d8 /lib/dojo/rpc
parent870a70e109ac9e80a88047044530de53d0404ec7 (diff)
upgrade Dojo to 1.6.1
Diffstat (limited to 'lib/dojo/rpc')
-rw-r--r--lib/dojo/rpc/JsonService.js5
-rw-r--r--lib/dojo/rpc/JsonpService.js11
-rw-r--r--lib/dojo/rpc/RpcService.js11
3 files changed, 15 insertions, 12 deletions
diff --git a/lib/dojo/rpc/JsonService.js b/lib/dojo/rpc/JsonService.js
index 757e328be..064fd0fee 100644
--- a/lib/dojo/rpc/JsonService.js
+++ b/lib/dojo/rpc/JsonService.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -10,6 +10,7 @@ dojo._hasResource["dojo.rpc.JsonService"] = true;
dojo.provide("dojo.rpc.JsonService");
dojo.require("dojo.rpc.RpcService");
+
dojo.declare("dojo.rpc.JsonService", dojo.rpc.RpcService, {
bustCache: false,
contentType: "application/json-rpc",
@@ -45,7 +46,7 @@ dojo.declare("dojo.rpc.JsonService", dojo.rpc.RpcService, {
url: url||this.serviceUrl,
postData: this.createRequest(method, parameters),
contentType: this.contentType,
- timeout: this.timeout,
+ timeout: this.timeout,
handleAs: "json-comment-optional"
});
def.addCallbacks(this.resultCallback(deferredRequestHandler), this.errorCallback(deferredRequestHandler));
diff --git a/lib/dojo/rpc/JsonpService.js b/lib/dojo/rpc/JsonpService.js
index 31e95077b..ecdadc7fc 100644
--- a/lib/dojo/rpc/JsonpService.js
+++ b/lib/dojo/rpc/JsonpService.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -11,9 +11,10 @@ dojo.provide("dojo.rpc.JsonpService");
dojo.require("dojo.rpc.RpcService");
dojo.require("dojo.io.script");
+
dojo.declare("dojo.rpc.JsonpService", dojo.rpc.RpcService, {
// summary:
- // Generic JSONP service. Minimally extends RpcService to allow
+ // Generic JSONP service. Minimally extends RpcService to allow
// easy definition of nearly any JSONP style service. Example
// SMD files exist in dojox.data
@@ -25,10 +26,10 @@ dojo.declare("dojo.rpc.JsonpService", dojo.rpc.RpcService, {
dojo.forEach(this.required, function(req){
if(req=="" || req==undefined){
- throw new Error("Required Service Argument not found: "+req);
+ throw new Error("Required Service Argument not found: "+req);
}
});
- }
+ }
},
strictArgChecks: false,
@@ -50,7 +51,7 @@ dojo.declare("dojo.rpc.JsonpService", dojo.rpc.RpcService, {
callbackParamName: this.callbackParamName||"callback",
content: this.createRequest(parameters),
timeout: this.timeout,
- handleAs: "json",
+ handleAs: "json",
preventCache: true
});
def.addCallbacks(this.resultCallback(deferredRequestHandler), this.errorCallback(deferredRequestHandler));
diff --git a/lib/dojo/rpc/RpcService.js b/lib/dojo/rpc/RpcService.js
index 7ff71415e..5ef5dae7f 100644
--- a/lib/dojo/rpc/RpcService.js
+++ b/lib/dojo/rpc/RpcService.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -9,6 +9,7 @@ if(!dojo._hasResource["dojo.rpc.RpcService"]){ //_hasResource checks added by bu
dojo._hasResource["dojo.rpc.RpcService"] = true;
dojo.provide("dojo.rpc.RpcService");
+
dojo.declare("dojo.rpc.RpcService", null, {
constructor: function(args){
//summary:
@@ -25,7 +26,7 @@ dojo.declare("dojo.rpc.RpcService", null, {
// matches those defined in the smd. smdString allows a developer to pass
// a jsonString directly, which will be converted into an object or alternatively
// smdObject is accepts an smdObject directly.
- //
+ //
if(args){
//if the arg is a string, we assume it is a url to retrieve an smd definition from
if( (dojo.isString(args)) || (args instanceof dojo._Url)){
@@ -99,7 +100,7 @@ dojo.declare("dojo.rpc.RpcService", null, {
// deferredRequestHandler: Deferred
// The deferred object handling a request.
- var tf = dojo.hitch(this,
+ var tf = dojo.hitch(this,
function(obj){
if(obj.error!=null){
var err;
@@ -114,7 +115,7 @@ dojo.declare("dojo.rpc.RpcService", null, {
err.errorObject = obj;
deferredRequestHandler.errback(err);
}else{
- deferredRequestHandler.callback(this.parseResults(obj));
+ deferredRequestHandler.callback(this.parseResults(obj));
}
}
);
@@ -160,7 +161,7 @@ dojo.declare("dojo.rpc.RpcService", null, {
dojo.forEach(object.methods, function(m){
if(m && m.name){
this[m.name] = this.generateMethod( m.name,
- m.parameters,
+ m.parameters,
m.url||m.serviceUrl||m.serviceURL);
if(!dojo.isFunction(this[m.name])){
throw new Error("RpcService: Failed to create" + m.name + "()");