1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 12:25:56 +00:00

upgrade Dojo to 1.6.1

This commit is contained in:
Andrew Dolgov
2011-11-08 20:40:44 +04:00
parent 870a70e109
commit 81bea17aef
680 changed files with 51915 additions and 74107 deletions

View File

@@ -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._base.json"]){ //_hasResource checks added by build.
dojo._hasResource["dojo._base.json"] = true;
dojo.provide("dojo._base.json");
dojo.fromJson = function(/*String*/ json){
// summary:
// Parses a [JSON](http://json.org) string to return a JavaScript object.
@@ -16,12 +17,12 @@ dojo.fromJson = function(/*String*/ json){
// Throws for invalid JSON strings, but it does not use a strict JSON parser. It
// delegates to eval(). The content passed to this method must therefore come
// from a trusted source.
// json:
// json:
// a string literal of a JSON item, for instance:
// `'{ "foo": [ "bar", 1, { "baz": "thud" } ] }'`
return eval("(" + json + ")"); // Object
}
};
dojo._escapeString = function(/*String*/str){
//summary:
@@ -31,7 +32,7 @@ dojo._escapeString = function(/*String*/str){
return ('"' + str.replace(/(["\\])/g, '\\$1') + '"').
replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").
replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r"); // string
}
};
dojo.toJsonIndentStr = "\t";
dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _indentStr){
@@ -75,8 +76,8 @@ dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _ind
if(it === null){
return "null";
}
if(dojo.isString(it)){
return dojo._escapeString(it);
if(dojo.isString(it)){
return dojo._escapeString(it);
}
// recurse
var recurse = arguments.callee;
@@ -149,6 +150,6 @@ dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _ind
output.push(newLine + nextIndent + keyStr + ":" + sep + val);
}
return "{" + output.join("," + sep) + newLine + _indentStr + "}"; // String
}
};
}