]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dojo/rpc/JsonService.js
lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
[tt-rss.git] / lib / dojo / rpc / JsonService.js
index b88e5f5310d1548c07959dc36b8a959e7f42e10d..6b429b760c00032c227330179174ffa7a8ece92b 100644 (file)
@@ -1,37 +1,8 @@
 /*
-       Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+       Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
        Available via Academic Free License >= 2.1 OR the modified BSD license.
        see: http://dojotoolkit.org/license for details
 */
 
-
-if(!dojo._hasResource["dojo.rpc.JsonService"]){
-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",lastSubmissionId:0,callRemote:function(_1,_2){
-var _3=new dojo.Deferred();
-this.bind(_1,_2,_3);
-return _3;
-},bind:function(_4,_5,_6,_7){
-var _8=dojo.rawXhrPost({url:_7||this.serviceUrl,postData:this.createRequest(_4,_5),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});
-_8.addCallbacks(this.resultCallback(_6),this.errorCallback(_6));
-},createRequest:function(_9,_a){
-var _b={"params":_a,"method":_9,"id":++this.lastSubmissionId};
-var _c=dojo.toJson(_b);
-return _c;
-},parseResults:function(_d){
-if(dojo.isObject(_d)){
-if("result" in _d){
-return _d.result;
-}
-if("Result" in _d){
-return _d.Result;
-}
-if("ResultSet" in _d){
-return _d.ResultSet;
-}
-}
-return _d;
-}});
-}
+//>>built
+define("dojo/rpc/JsonService",["../_base/declare","../_base/Deferred","../_base/json","../_base/lang","../_base/xhr","./RpcService"],function(_1,_2,_3,_4,_5,_6){return _1("dojo.rpc.JsonService",_6,{bustCache:false,contentType:"application/json-rpc",lastSubmissionId:0,callRemote:function(_7,_8){var _9=new _2();this.bind(_7,_8,_9);return _9;},bind:function(_a,_b,_c,_d){var _e=_5.post({url:_d||this.serviceUrl,postData:this.createRequest(_a,_b),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});_e.addCallbacks(this.resultCallback(_c),this.errorCallback(_c));},createRequest:function(_f,_10){var req={"params":_10,"method":_f,"id":++this.lastSubmissionId};return _3.toJson(req);},parseResults:function(obj){if(_4.isObject(obj)){if("result" in obj){return obj.result;}if("Result" in obj){return obj.Result;}if("ResultSet" in obj){return obj.ResultSet;}}return obj;}});});
\ No newline at end of file