]> git.wh0rd.org - tt-rss.git/blob - lib/dojo/rpc/JsonpService.js
add dijit/dojo stuff; initial ui mockup
[tt-rss.git] / lib / dojo / rpc / JsonpService.js
1 /*
2 Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3 Available via Academic Free License >= 2.1 OR the modified BSD license.
4 see: http://dojotoolkit.org/license for details
5 */
6
7
8 if(!dojo._hasResource["dojo.rpc.JsonpService"]){
9 dojo._hasResource["dojo.rpc.JsonpService"]=true;
10 dojo.provide("dojo.rpc.JsonpService");
11 dojo.require("dojo.rpc.RpcService");
12 dojo.require("dojo.io.script");
13 dojo.declare("dojo.rpc.JsonpService",dojo.rpc.RpcService,{constructor:function(_1,_2){
14 if(this.required){
15 if(_2){
16 dojo.mixin(this.required,_2);
17 }
18 dojo.forEach(this.required,function(_3){
19 if(_3==""||_3==undefined){
20 throw new Error("Required Service Argument not found: "+_3);
21 }
22 });
23 }
24 },strictArgChecks:false,bind:function(_4,_5,_6,_7){
25 var _8=dojo.io.script.get({url:_7||this.serviceUrl,callbackParamName:this.callbackParamName||"callback",content:this.createRequest(_5),timeout:this.timeout,handleAs:"json",preventCache:true});
26 _8.addCallbacks(this.resultCallback(_6),this.errorCallback(_6));
27 },createRequest:function(_9){
28 var _a=(dojo.isArrayLike(_9)&&_9.length==1)?_9[0]:{};
29 dojo.mixin(_a,this.required);
30 return _a;
31 }});
32 }