1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-24 04:51:28 +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
*/
@@ -58,6 +58,9 @@ dojo._isLocalUrl = function(/*String*/ uri) {
// see comments in spidermonkey loadUri
dojo._loadUri = function(uri, cb){
if(dojo._loadedUrls[uri]){
return true; // Boolean
}
try{
var local;
try{
@@ -67,29 +70,32 @@ dojo._loadUri = function(uri, cb){
return false;
}
dojo._loadedUrls[uri] = true;
//FIXME: Use Rhino 1.6 native readFile/readUrl if available?
if(cb){
var contents = (local ? readText : readUri)(uri, "UTF-8");
// patch up the input to eval until https://bugzilla.mozilla.org/show_bug.cgi?id=471005 is fixed.
if(!eval("'\u200f'").length){
contents = String(contents).replace(/[\u200E\u200F\u202A-\u202E]/g, function(match){
return "\\u" + match.charCodeAt(0).toString(16);
contents = String(contents).replace(/[\u200E\u200F\u202A-\u202E]/g, function(match){
return "\\u" + match.charCodeAt(0).toString(16);
})
}
cb(eval('('+contents+')'));
contents = /^define\(/.test(contents) ? contents : '('+contents+')';
cb(eval(contents));
}else{
load(uri);
}
dojo._loadedUrls.push(uri);
return true;
}catch(e){
dojo._loadedUrls[uri] = false;
console.debug("rhino load('" + uri + "') failed. Exception: " + e);
return false;
}
}
dojo.exit = function(exitcode){
dojo.exit = function(exitcode){
quit(exitcode);
}
@@ -157,7 +163,7 @@ dojo._getText = function(/*URI*/ uri, /*Boolean*/ fail_ok){
dojo.doc = typeof document != "undefined" ? document : null;
dojo.body = function(){
return document.body;
return document.body;
}
// Supply setTimeout/clearTimeout implementations if they aren't already there