mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
New build scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5282 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
59
source/web/scripts/ajax/dojo/src/bootstrap2.js
vendored
Normal file
59
source/web/scripts/ajax/dojo/src/bootstrap2.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright (c) 2004-2006, The Dojo Foundation
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Academic Free License version 2.1 or above OR the
|
||||
modified BSD license. For more information on Dojo licensing, see:
|
||||
|
||||
http://dojotoolkit.org/community/licensing.shtml
|
||||
*/
|
||||
|
||||
//Semicolon is for when this file is integrated with a custom build on one line
|
||||
//with some other file's contents. Sometimes that makes things not get defined
|
||||
//properly, particularly with the using the closure below to do all the work.
|
||||
;(function(){
|
||||
//Don't do this work if dojo.js has already done it.
|
||||
if(typeof dj_usingBootstrap != "undefined"){
|
||||
return;
|
||||
}
|
||||
|
||||
var isRhino = false;
|
||||
var isSpidermonkey = false;
|
||||
var isDashboard = false;
|
||||
if((typeof this["load"] == "function")&&((typeof this["Packages"] == "function")||(typeof this["Packages"] == "object"))){
|
||||
isRhino = true;
|
||||
}else if(typeof this["load"] == "function"){
|
||||
isSpidermonkey = true;
|
||||
}else if(window.widget){
|
||||
isDashboard = true;
|
||||
}
|
||||
|
||||
var tmps = [];
|
||||
if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
|
||||
tmps.push("debug.js");
|
||||
}
|
||||
|
||||
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!isRhino)&&(!isDashboard)){
|
||||
tmps.push("browser_debug.js");
|
||||
}
|
||||
|
||||
var loaderRoot = djConfig["baseScriptUri"];
|
||||
if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
|
||||
loaderRoot = djConfig["baseLoaderUri"];
|
||||
}
|
||||
|
||||
for(var x=0; x < tmps.length; x++){
|
||||
var spath = loaderRoot+"src/"+tmps[x];
|
||||
if(isRhino||isSpidermonkey){
|
||||
load(spath);
|
||||
} else {
|
||||
try {
|
||||
document.write("<scr"+"ipt type='text/javascript' src='"+spath+"'></scr"+"ipt>");
|
||||
} catch (e) {
|
||||
var script = document.createElement("script");
|
||||
script.src = spath;
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
Reference in New Issue
Block a user