8398c9048d
code was modified slightly, so the code differs from the original downloadable 1.9.5 version
39 lines
1.4 KiB
Text
39 lines
1.4 KiB
Text
;(function(){
|
|
|
|
/*
|
|
dojo, dijit, and dojox must always be the first three, and in that order.
|
|
djConfig.scopeMap = [
|
|
["dojo", "fojo"],
|
|
["dijit", "fijit"],
|
|
["dojox", "fojox"]
|
|
|
|
]
|
|
*/
|
|
|
|
/**Build will replace this comment with a scoped djConfig **/
|
|
|
|
//The null below can be relaced by a build-time value used instead of djConfig.scopeMap.
|
|
var sMap = null;
|
|
|
|
//See if new scopes need to be defined.
|
|
if((sMap || (typeof djConfig != "undefined" && djConfig.scopeMap)) && (typeof window != "undefined")){
|
|
var scopeDef = "", scopePrefix = "", scopeSuffix = "", scopeMap = {}, scopeMapRev = {};
|
|
sMap = sMap || djConfig.scopeMap;
|
|
for(var i = 0; i < sMap.length; i++){
|
|
//Make local variables, then global variables that use the locals.
|
|
var newScope = sMap[i];
|
|
scopeDef += "var " + newScope[0] + " = {}; " + newScope[1] + " = " + newScope[0] + ";" + newScope[1] + "._scopeName = '" + newScope[1] + "';";
|
|
scopePrefix += (i == 0 ? "" : ",") + newScope[0];
|
|
scopeSuffix += (i == 0 ? "" : ",") + newScope[1];
|
|
scopeMap[newScope[0]] = newScope[1];
|
|
scopeMapRev[newScope[1]] = newScope[0];
|
|
}
|
|
|
|
eval(scopeDef + "dojo._scopeArgs = [" + scopeSuffix + "];");
|
|
|
|
dojo._scopePrefixArgs = scopePrefix;
|
|
dojo._scopePrefix = "(function(" + scopePrefix + "){";
|
|
dojo._scopeSuffix = "})(" + scopeSuffix + ")";
|
|
dojo._scopeMap = scopeMap;
|
|
dojo._scopeMapRev = scopeMapRev;
|
|
}
|