Subversion Repositories Applications.papyrus

Rev

Rev 1318 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1318 Rev 1422
Line 6... Line 6...
6
	modified BSD license. For more information on Dojo licensing, see:
6
	modified BSD license. For more information on Dojo licensing, see:
Line 7... Line 7...
7
 
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
8
		http://dojotoolkit.org/community/licensing.shtml
Line -... Line 9...
-
 
9
*/
-
 
10
 
9
*/
11
 
10
 
12
 
11
dojo.provide("dojo.io.common");
13
dojo.provide("dojo.io.common");
12
dojo.require("dojo.string");
14
dojo.require("dojo.string");
13
dojo.require("dojo.lang.extras");
15
dojo.require("dojo.lang.extras");
Line 27... Line 29...
27
		if (arguments.length >= 4) {
29
		if (arguments.length >= 4) {
28
			this.changeUrl = changeUrl;
30
			this.changeUrl = changeUrl;
29
		}
31
		}
30
	}
32
	}
31
};
33
};
32
dojo.lang.extend(dojo.io.Request, {url:"", mimetype:"text/plain", method:"GET", content:undefined, transport:undefined, changeUrl:undefined, formNode:undefined, sync:false, bindSuccess:false, useCache:false, preventCache:false, load:function (type, data, transportImplementation, kwArgs) {
34
dojo.lang.extend(dojo.io.Request, {url:"", mimetype:"text/plain", method:"GET", content:undefined, transport:undefined, changeUrl:undefined, formNode:undefined, sync:false, bindSuccess:false, useCache:false, preventCache:false, jsonFilter:function (value) {
-
 
35
	if ((this.mimetype == "text/json-comment-filtered") || (this.mimetype == "application/json-comment-filtered")) {
-
 
36
		var cStartIdx = value.indexOf("/*");
-
 
37
		var cEndIdx = value.lastIndexOf("*/");
-
 
38
		if ((cStartIdx == -1) || (cEndIdx == -1)) {
-
 
39
			dojo.debug("your JSON wasn't comment filtered!");
-
 
40
			return "";
-
 
41
		}
-
 
42
		return value.substring(cStartIdx + 2, cEndIdx);
-
 
43
	}
-
 
44
	dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints");
-
 
45
	return value;
-
 
46
}, load:function (type, data, transportImplementation, kwArgs) {
33
}, error:function (type, error, transportImplementation, kwArgs) {
47
}, error:function (type, error, transportImplementation, kwArgs) {
34
}, timeout:function (type, empty, transportImplementation, kwArgs) {
48
}, timeout:function (type, empty, transportImplementation, kwArgs) {
35
}, handle:function (type, data, transportImplementation, kwArgs) {
49
}, handle:function (type, data, transportImplementation, kwArgs) {
36
}, timeoutSeconds:0, abort:function () {
50
}, timeoutSeconds:0, abort:function () {
37
}, fromKwArgs:function (kwArgs) {
51
}, fromKwArgs:function (kwArgs) {