Changeset 12122
- Timestamp:
- 01/21/08 22:03:07 (6 months ago)
- Location:
- dojo/trunk
- Files:
-
- 18 modified
-
back.js (modified) (3 diffs)
-
i18n.js (modified) (3 diffs)
-
io/iframe.js (modified) (1 diff)
-
parser.js (modified) (1 diff)
-
tests/data.js (modified) (1 diff)
-
tests/_base/_loader/bootstrap.js (modified) (1 diff)
-
tests/_base/_loader/loader.js (modified) (1 diff)
-
_base.js (modified) (1 diff)
-
_base/event.js (modified) (1 diff)
-
_base/window.js (modified) (1 diff)
-
_base/xhr.js (modified) (1 diff)
-
_base/_loader/bootstrap.js (modified) (5 diffs)
-
_base/_loader/hostenv_browser.js (modified) (8 diffs)
-
_base/_loader/hostenv_rhino.js (modified) (4 diffs)
-
_base/_loader/hostenv_spidermonkey.js (modified) (2 diffs)
-
_base/_loader/loader.js (modified) (2 diffs)
-
_base/_loader/loader_xd.js (modified) (6 diffs)
-
_firebug/firebug.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/back.js
r11695 r12122 106 106 function loadIframeHistory(){ 107 107 //summary: private method. Do not call this directly. 108 var url = (d jConfig["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html")) + "?" + (new Date()).getTime();108 var url = (dojo.config["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html")) + "?" + (new Date()).getTime(); 109 109 moveForward = true; 110 110 if(historyIframe){ … … 162 162 // block that lives inside the <body> tag to prevent bugs on IE. 163 163 if(dojo.byId("dj_history")){ return; } // prevent reinit 164 var src = d jConfig["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html");164 var src = dojo.config["dojoIframeHistoryUrl"] || dojo.moduleUrl("dojo", "resources/iframe_history.html"); 165 165 document.write('<iframe style="border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;" name="dj_history" id="dj_history" src="' + src + '"></iframe>'); 166 166 }; … … 262 262 var url = null; 263 263 if(!historyIframe){ 264 if(d jConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){264 if(dojo.config["useXDomain"] && !dojo.config["dojoIframeHistoryUrl"]){ 265 265 console.debug("dojo.back: When using cross-domain Dojo builds," 266 266 + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" -
dojo/trunk/i18n.js
r11695 r12122 118 118 var localizedBundle = null; 119 119 if(bundle){ 120 if(d jConfig.localizationComplete && bundle._built){return;}120 if(dojo.config.localizationComplete && bundle._built){return;} 121 121 var jsLoc = tempLocale.replace(/-/g, '_'); 122 122 var translationPackage = bundlePackage+"."+jsLoc; … … 180 180 // well, unless a particular locale was requested. 181 181 182 var extra = d jConfig.extraLocale;182 var extra = dojo.config.extraLocale; 183 183 if(extra){ 184 184 if(!extra instanceof Array){ … … 239 239 } 240 240 preload(); 241 var extra = d jConfig.extraLocale||[];241 var extra = dojo.config.extraLocale||[]; 242 242 for(var i=0; i<extra.length; i++){ 243 243 preload(extra[i]); -
dojo/trunk/io/iframe.js
r12008 r12122 22 22 var turi = uri; 23 23 if(!turi){ 24 if(d jConfig["useXDomain"] && !djConfig["dojoBlankHtmlUrl"]){24 if(dojo.config["useXDomain"] && !dojo.config["dojoBlankHtmlUrl"]){ 25 25 console.debug("dojo.io.iframe.create: When using cross-domain Dojo builds," 26 26 + " please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl" 27 27 + " to the path on your domain to blank.html"); 28 28 } 29 turi = (d jConfig["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo", "resources/blank.html"));29 turi = (dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo", "resources/blank.html")); 30 30 } 31 31 var ifrstr = dojo.isIE ? '<iframe name="'+fname+'" src="'+turi+'" onload="'+onloadstr+'">' : 'iframe'; -
dojo/trunk/parser.js
r12108 r12122 236 236 (function(){ 237 237 var parseRunner = function(){ 238 if(d jConfig["parseOnLoad"] == true){238 if(dojo.config["parseOnLoad"] == true){ 239 239 dojo.parser.parse(); 240 240 } -
dojo/trunk/tests/data.js
r11055 r12122 1 1 dojo.provide("tests.data"); 2 2 //Squelch any json comment messages for now, since the UT allows for both. 3 d jConfig = djConfig || {}; djConfig.usePlainJson = true;3 dojo.config.usePlainJson = true; 4 4 dojo.require("tests.data.utils"); 5 5 dojo.require("tests.data.ItemFileReadStore"); -
dojo/trunk/tests/_base/_loader/bootstrap.js
r8301 r12122 8 8 t.assertTrue("assert" in console); 9 9 t.assertEqual("function", typeof console.assert); 10 },11 12 function hasDjConfig(t){13 t.assertTrue("djConfig" in dojo.global);14 10 }, 15 11 -
dojo/trunk/tests/_base/_loader/loader.js
r7995 r12122 4 4 [ 5 5 function baseUrl(t){ 6 var originalBaseUrl = d jConfig["baseUrl"] || "./";6 var originalBaseUrl = dojo.config["baseUrl"] || "./"; 7 7 8 8 t.assertEqual(originalBaseUrl, dojo.baseUrl); -
dojo/trunk/_base.js
r10845 r12122 16 16 17 17 (function(){ 18 if(d jConfig.require){19 for(var x=0; x<d jConfig.require.length; x++){20 dojo["require"](d jConfig.require[x]);18 if(dojo.config.require){ 19 for(var x=0; x<dojo.config.require.length; x++){ 20 dojo["require"](dojo.config.require[x]); 21 21 } 22 22 } -
dojo/trunk/_base/event.js
r11695 r12122 202 202 var iel = dojo._listener; 203 203 // dispatcher tracking property 204 if(!d jConfig._allow_leaks){204 if(!dojo.config._allow_leaks){ 205 205 // custom listener that handles leak protection for DOM events 206 206 node_listener = iel = dojo._ie_listener = { -
dojo/trunk/_base/window.js
r11695 r12122 145 145 //script tag's attribute. 146 146 (function(){ 147 var mp = d jConfig["modulePaths"];147 var mp = dojo.config["modulePaths"]; 148 148 if(mp){ 149 149 for(var param in mp){ -
dojo/trunk/_base/xhr.js
r11861 r12122 205 205 "text": function(xhr){ return xhr.responseText; }, 206 206 "json": function(xhr){ 207 if(!d jConfig.usePlainJson){207 if(!dojo.config.usePlainJson){ 208 208 console.warn("Consider using mimetype:text/json-comment-filtered" 209 209 + " to avoid potential security issues with JSON endpoints" -
dojo/trunk/_base/_loader/bootstrap.js
r12008 r12122 20 20 21 21 (function(){ 22 // make sure djConfig is defined23 if(typeof this["djConfig"] == "undefined"){24 this.djConfig = {};25 }26 27 22 // firebug stubs 28 23 if((!this["console"])||(!console["firebug"])){ … … 65 60 } 66 61 67 if(!d ojo._scopeArgs){68 d ojo._scopeArgs = [dojo, dijit, dojox];62 if(!d._scopeArgs){ 63 d._scopeArgs = [dojo, dijit, dojox]; 69 64 } 70 65 … … 79 74 } 80 75 =====*/ 81 d ojo.global = this;82 83 var _config =/*===== djConfig = =====*/{76 d.global = this; 77 78 d.config =/*===== djConfig = =====*/{ 84 79 isDebug: false, 85 80 libraryScriptUri: "", … … 88 83 }; 89 84 90 for(var option in _config){91 if(typeof djConfig[option] == "undefined"){92 d jConfig[option] = _config[option];85 if(typeof djConfig != "undefined"){ 86 for(var opt in djConfig){ 87 d.config[opt] = djConfig[opt]; 93 88 } 94 89 } … … 106 101 }; 107 102 =====*/ 108 dojo.locale = d jConfig.locale;103 dojo.locale = d.config.locale; 109 104 110 105 var rev = "$Rev$".match(/\d+/); -
dojo/trunk/_base/_loader/hostenv_browser.js
r12008 r12122 66 66 if(m){ 67 67 // find out where we came from 68 if(!d jConfig.baseUrl){69 d jConfig.baseUrl = src.substring(0, m.index);68 if(!dojo.config.baseUrl){ 69 dojo.config.baseUrl = src.substring(0, m.index); 70 70 } 71 71 // and find out if we need to modify our behavior … … 74 74 var cfgo = eval("({ "+cfg+" })"); 75 75 for(var x in cfgo){ 76 d jConfig[x] = cfgo[x];76 dojo.config[x] = cfgo[x]; 77 77 } 78 78 } … … 81 81 } 82 82 } 83 d.baseUrl = d jConfig.baseUrl;83 d.baseUrl = dojo.config.baseUrl; 84 84 85 85 // fill in the rendering support information in dojo.render.* … … 106 106 //by forcing to not use native xhr. 107 107 if(dojo.isIE && window.location.protocol === "file:"){ 108 d jConfig.ieForceActiveXXhr=true;108 dojo.config.ieForceActiveXXhr=true; 109 109 } 110 110 … … 113 113 114 114 // TODO: is the HTML LANG attribute relevant? 115 d.locale = d jConfig.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase();115 d.locale = dojo.config.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase(); 116 116 117 117 // These are in order of decreasing likelihood; this will change in time. … … 124 124 var http = null; 125 125 var last_e = null; 126 if(!dojo.isIE || !d jConfig.ieForceActiveXXhr){126 if(!dojo.isIE || !dojo.config.ieForceActiveXXhr){ 127 127 try{ http = new XMLHttpRequest(); }catch(e){} 128 128 } … … 241 241 // DOMContentLoaded on that platform. For more information, see: 242 242 // http://trac.dojotoolkit.org/ticket/1704 243 if(dojo.isOpera || (dojo.isMoz && d jConfig.enableMozDomContentLoaded === true)){243 if(dojo.isOpera || (dojo.isMoz && dojo.config.enableMozDomContentLoaded === true)){ 244 244 document.addEventListener("DOMContentLoaded", dojo._loadInit, null); 245 245 } … … 323 323 324 324 //Load debug code if necessary. 325 // dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); 326 327 //window.widget is for Dashboard detection 328 //The full conditionals are spelled out to avoid issues during builds. 329 //Builds may be looking for require/requireIf statements and processing them. 330 // dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && !djConfig["useXDomain"], "dojo.browser_debug"); 331 // dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && djConfig["useXDomain"], "dojo.browser_debug_xd"); 332 333 if(djConfig.isDebug){ 325 if(dojo.config.isDebug){ 334 326 dojo.require("dojo._firebug.firebug"); 335 327 } 336 328 337 if(d jConfig.debugAtAllCosts){338 d jConfig.useXDomain = true;329 if(dojo.config.debugAtAllCosts){ 330 dojo.config.useXDomain = true; 339 331 dojo.require("dojo._base._loader.loader_xd"); 340 332 dojo.require("dojo._base._loader.loader_debug"); -
dojo/trunk/_base/_loader/hostenv_rhino.js
r10890 r12122 3 3 */ 4 4 5 if(d jConfig["baseUrl"]){6 dojo.baseUrl = d jConfig["baseUrl"];5 if(dojo.config["baseUrl"]){ 6 dojo.baseUrl = dojo.config["baseUrl"]; 7 7 }else{ 8 8 dojo.baseUrl = "./"; … … 166 166 167 167 // call this now because later we may not be on the top of the stack 168 if(!d jConfig.libraryScriptUri.length){168 if(!dojo.config.libraryScriptUri.length){ 169 169 try{ 170 d jConfig.libraryScriptUri = dojo._rhinoCurrentScriptViaJava(1);170 dojo.config.libraryScriptUri = dojo._rhinoCurrentScriptViaJava(1); 171 171 }catch(e){ 172 172 // otherwise just fake it 173 if(d jConfig["isDebug"]){173 if(dojo.config["isDebug"]){ 174 174 print("\n"); 175 175 print("we have no idea where Dojo is located."); … … 181 181 print("Dojo will try to load anyway"); 182 182 } 183 d jConfig.libraryScriptUri = "./";183 dojo.config.libraryScriptUri = "./"; 184 184 } 185 185 } … … 229 229 //in the hostenvs since hostenv_browser can read djConfig from a 230 230 //script tag's attribute. 231 if(d jConfig["modulePaths"]){232 for(var param in d jConfig["modulePaths"]){233 dojo.registerModulePath(param, d jConfig["modulePaths"][param]);234 } 235 } 231 if(dojo.config["modulePaths"]){ 232 for(var param in dojo.config["modulePaths"]){ 233 dojo.registerModulePath(param, dojo.config["modulePaths"][param]); 234 } 235 } -
dojo/trunk/_base/_loader/hostenv_spidermonkey.js
r11695 r12122 3 3 */ 4 4 5 if(d jConfig["baseUrl"]){6 dojo.baseUrl = d jConfig["baseUrl"];5 if(dojo.config["baseUrl"]){ 6 dojo.baseUrl = dojo.config["baseUrl"]; 7 7 }else{ 8 8 dojo.baseUrl = "./"; … … 74 74 //in the hostenvs since hostenv_browser can read djConfig from a 75 75 //script tag's attribute. 76 if(d jConfig["modulePaths"]){77 for(var param in d jConfig["modulePaths"]){78 dojo.registerModulePath(param, d jConfig["modulePaths"][param]);76 if(dojo.config["modulePaths"]){ 77 for(var param in dojo.config["modulePaths"]){ 78 dojo.registerModulePath(param, dojo.config["modulePaths"][param]); 79 79 } 80 80 } -
dojo/trunk/_base/_loader/loader.js
r12008 r12122 70 70 71 71 var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath; 72 if(d jConfig.cacheBust && d.isBrowser){73 uri += "?" + String(d jConfig.cacheBust).replace(/\W+/g,"");72 if(dojo.config.cacheBust && d.isBrowser){ 73 uri += "?" + String(dojo.config.cacheBust).replace(/\W+/g,""); 74 74 } 75 75 try{ … … 226 226 //FF 2.0 and freezing issues where we try to do sync xhr while background css images 227 227 //are being loaded (trac #2572)? Consider for 0.9. 228 if(typeof setTimeout == "object" || (d jConfig.useXDomain && d.isOpera)){228 if(typeof setTimeout == "object" || (dojo.config.useXDomain && d.isOpera)){ 229 229 setTimeout(dojo._scopeName + ".loaded();", 0); 230 230 }else{ -
dojo/trunk/_base/_loader/loader_xd.js
r12008 r12122 10 10 //the xhr resource until the one before it finishes loading. The text of the xhr resource will be converted 11 11 //to match the format for a xd resource and put in the xd load queue. 12 this._isXDomain = d jConfig.useXDomain || false;12 this._isXDomain = dojo.config.useXDomain || false; 13 13 14 14 this._xdTimer = 0; … … 69 69 //get pushed up when the script tags are added to the page 70 70 //in the debugAtAllCosts case. 71 if(!d jConfig["debugAtAllCosts"] || resourceName == "dojo._base._loader.loader_debug"){71 if(!dojo.config["debugAtAllCosts"] || resourceName == "dojo._base._loader.loader_debug"){ 72 72 output.push(contents); 73 73 } … … 123 123 } 124 124 125 if(d jConfig.cacheBust && dojo.isBrowser) { uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,""); }125 if(dojo.config.cacheBust && dojo.isBrowser) { uri += "?" + String(dojo.config.cacheBust).replace(/\W+/g,""); } 126 126 try{ 127 127 return ((!module || this._isXDomain) ? this._loadUri(uri, cb, currentIsXDomain, module) : this._loadUriAndCheck(uri, module, cb)); //Boolean … … 325 325 // Simulate the extra locale work that dojo.requireLocalization does. 326 326 327 var extra = d jConfig.extraLocale;327 var extra = dojo.config.extraLocale; 328 328 if(extra){ 329 329 if(!extra instanceof Array){ … … 558 558 559 559 var noLoads = ""; 560 var waitInterval = (d jConfig.xdWaitSeconds || 15) * 1000;560 var waitInterval = (dojo.config.xdWaitSeconds || 15) * 1000; 561 561 var expired = (this._xdStartTime + waitInterval) < (new Date()).getTime(); 562 562 … … 585 585 for(var i= 0; i < defLength; i++){ 586 586 var content = dojo._xdDefList[i]; 587 if(d jConfig["debugAtAllCosts"] && content["resourceName"]){587 if(dojo.config["debugAtAllCosts"] && content["resourceName"]){ 588 588 if(!this["_xdDebugQueue"]){ 589 589 this._xdDebugQueue = []; -
dojo/trunk/_firebug/firebug.js
r11958 r12122 65 65 )&& 66 66 ( 67 (d jConfig["noFirebugLite"] !== true)67 (dojo.config["noFirebugLite"] !== true) 68 68 ) 69 69 ){ … … 307 307 308 308 var containerHeight = "100%"; 309 if(d jConfig.popup){309 if(dojo.config.popup){ 310 310 _firebugWin = openWin(); 311 311 _firebugDoc = _firebugWin.document; 312 d jConfig.debugContainerId = 'fb';312 dojo.config.debugContainerId = 'fb'; 313 313 314 314 // connecting popup … … 317 317 }else{ 318 318 _firebugDoc = document; 319 containerHeight = (d jConfig.debugHeight || 300) + "px";319 containerHeight = (dojo.config.debugHeight || 300) + "px"; 320 320 } 321 321 … … 337 337 } 338 338 339 if( typeof djConfig != "undefined" && djConfig["debugContainerId"]){340 consoleFrame = _firebugDoc.getElementById(d jConfig.debugContainerId);339 if(dojo.config["debugContainerId"]){ 340 consoleFrame = _firebugDoc.getElementById(dojo.config.debugContainerId); 341 341 } 342 342 if(!consoleFrame){ … … 348 348 consoleFrame.style.display = (frameVisible ? "block" : "none"); 349 349 350 var closeStr = (d jConfig.popup) ? "" : ' <a href="#" onclick="console.close(); return false;">Close</a>';350 var closeStr = (dojo.config.popup) ? "" : ' <a href="#" onclick="console.close(); return false;">Close</a>'; 351 351 consoleFrame.innerHTML = 352 352 '<div id="firebugToolbar">' … … 911 911 912 912 if( (document.documentElement.getAttribute("debug") == "true")|| 913 (d jConfig.isDebug)913 (dojo.config.isDebug) 914 914 ){ 915 915 toggleConsole(true);