a:39:{s:9:"#provides";s:4:"dojo";s:9:"#resource";s:23:"_base/_loader/loader.js";s:30:"dojo._global_omit_module_check";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:16:"dojo._loadModule";a:3:{s:7:"aliases";s:12:"dojo.require";s:7:"private";b:1;s:7:"summary";s:0:"";}s:19:"dojo.requireAfterIf";a:1:{s:7:"summary";s:0:"";}s:14:"dojo._loadPath";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:7:"relpath";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:76:"A relative path to a script (no leading '/', and typically ending in '.js').";}s:6:"module";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"String";s:7:"summary";s:117:"A module whose existance to check for after loading a path. Can be used to determine success or failure of the load.";}s:2:"cb";a:3:{s:8:"optional";b:1;s:4:"type";s:8:"Function";s:7:"summary";s:63:"a callback function to pass the result of evaluating the script";}}s:6:"source";s:266:" var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath; try{ return !module ? this._loadUri(uri, cb) : this._loadUriAndCheck(uri, module, cb); // Boolean }catch(e){ console.error(e); return false; // Boolean }";s:7:"summary";s:46:"Load a Javascript module given a relative path";s:11:"description";s:297:"Loads and interprets the script located at relpath, which is relative to the script root directory. If the script is found but its interpretation causes a runtime exception, that exception is not caught by us, so the caller will see it. We return a true value if and only if the script is found.";s:7:"returns";s:7:"Boolean";s:7:"private";b:1;}s:13:"dojo._loadUri";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:3:"uri";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:45:"a uri which points at the script to be loaded";}s:2:"cb";a:3:{s:8:"optional";b:1;s:4:"type";s:8:"Function";s:7:"summary";s:158:"a callback function to process the result of evaluating the script as an expression, typically used by the resource bundle loader to load JSON-style resources";}}s:6:"source";s:615:" if(this._loadedUrls[uri]){ return true; // Boolean } var contents = this._getText(uri, true); if(!contents){ return false; } // Boolean this._loadedUrls[uri] = true; this._loadedUrls.push(uri); if(cb){ contents = '('+contents+')'; }else{ //Only do the scoping if no callback. If a callback is specified, //it is most likely the i18n bundle stuff. contents = this._scopePrefix + contents + this._scopeSuffix; } if(d.isMoz){ contents += "\r\n//@ sourceURL=" + uri; } // debugging assist for Firebug var value = d["eval"](contents); if(cb){ cb(value); } return true; // Boolean";s:7:"summary";s:27:"Loads JavaScript from a URI";s:11:"description";s:222:"Reads the contents of the URI, and evaluates the contents. This is used to load modules as well as resource bundles. Returns true if it succeeded. Returns false if the URI reading failed. Throws if the evaluation throws.";s:7:"returns";s:7:"Boolean";s:7:"private";b:1;}s:21:"dojo._loadUriAndCheck";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:3:"uri";a:1:{s:4:"type";s:6:"String";}s:10:"moduleName";a:1:{s:4:"type";s:6:"String";}s:2:"cb";a:2:{s:8:"optional";b:1;s:4:"type";s:8:"Function";}}s:6:"source";s:201:" var ok = false; try{ ok = this._loadUri(uri, cb); }catch(e){ console.error("failed loading " + uri + " with error: " + e); } return !!(ok && this._loadedModules[moduleName]); // Boolean";s:7:"summary";s:62:"calls loadUri then findModule and returns true if both succeed";s:7:"returns";s:7:"Boolean";s:7:"private";b:1;}s:11:"dojo.loaded";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:556:" this._loadNotifying = true; this._postLoad = true; var mll = d._loaders; //Clear listeners so new ones can be added //For other xdomain package loads after the initial load. this._loaders = []; for(var x = 0; x < mll.length; x++){ mll[x](); } this._loadNotifying = false; //Make sure nothing else got added to the onload queue //after this first run. If something did, and we are not waiting for any //more inflight resources, run again. if(d._postLoad && d._inFlightCount == 0 && mll.length){ d._callLoaded(); }";s:7:"summary";s:341:"signal fired when initial environment and package loading is complete. You should use dojo.addOnLoad() instead of doing a direct dojo.connect() to this method in order to handle initialization tasks that require the environment to be initialized. In a browser host, declarative widgets will be constructed when this function finishes runing.";}s:26:"dojo.loaded._loadNotifying";a:3:{s:8:"instance";s:11:"dojo.loaded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"dojo.loaded._postLoad";a:3:{s:8:"instance";s:11:"dojo.loaded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:20:"dojo.loaded._loaders";a:3:{s:8:"instance";s:11:"dojo.loaded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:13:"dojo.unloaded";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:68:" var mll = d._unloaders; while(mll.length){ (mll.pop())(); }";s:7:"summary";s:221:"signal fired by impending environment destruction. You should use dojo.addOnUnload() instead of doing a direct dojo.connect() to this method to perform page/application cleanup methods. See dojo.addOnUnload for more info.";}s:10:"dojo._onto";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:3:"arr";a:1:{s:4:"type";s:0:"";}s:3:"obj";a:1:{s:4:"type";s:0:"";}s:2:"fn";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:146:" if(!fn){ arr.push(obj); }else if(fn){ var func = (typeof fn == "string") ? obj[fn] : fn; arr.push(function(){ func.call(obj); }); }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:14:"dojo.addOnLoad";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"obj";a:2:{s:8:"optional";b:1;s:4:"type";s:6:"Object";}}s:6:"source";s:380:" d._onto(d._loaders, obj, functionName); //Added for xdomain loading. dojo.addOnLoad is used to //indicate callbacks after doing some dojo.require() statements. //In the xdomain case, if all the requires are loaded (after initial //page load), then immediately call any listeners. if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){ d._callLoaded(); }";s:7:"summary";s:336:"Registers a function to be triggered after the DOM has finished loading and widgets declared in markup have been instantiated. Images and CSS files may or may not have finished downloading when the specified function is called. (Note that widgets' CSS and HTML code is guaranteed to be downloaded before said widgets are instantiated.)";s:8:"examples";a:1:{i:0;s:125:" dojo.addOnLoad(functionPointer); dojo.addOnLoad(object, "functionName"); dojo.addOnLoad(object, function(){ /* ... */});";}}s:19:"dojo._modulesLoaded";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:134:" if(d._postLoad){ return; } if(d._inFlightCount > 0){ console.warn("files still in flight!"); return; } d._callLoaded();";s:7:"private";b:1;s:7:"summary";s:0:"";}s:16:"dojo._callLoaded";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:8043:"/* * loader.js - A bootstrap module. Runs before the hostenv_*.js file. Contains * all of the package loading methods. */ //>>excludeStart("webkitMobile", kwArgs.webkitMobile); (function(){ var d = dojo; //>>excludeEnd("webkitMobile"); d.mixin(d, { _loadedModules: {}, _inFlightCount: 0, _hasResource: {}, _modulePrefixes: { dojo: { name: "dojo", value: "." }, // dojox: { name: "dojox", value: "../dojox" }, // dijit: { name: "dijit", value: "../dijit" }, doh: { name: "doh", value: "../util/doh" }, tests: { name: "tests", value: "tests" } }, _moduleHasPrefix: function(/*String*/module){ // summary: checks to see if module has been established var mp = this._modulePrefixes; return !!(mp[module] && mp[module].value); // Boolean }, _getModulePrefix: function(/*String*/module){ // summary: gets the prefix associated with module var mp = this._modulePrefixes; if(this._moduleHasPrefix(module)){ return mp[module].value; // String } return module; // String }, _loadedUrls: [], //WARNING: // This variable is referenced by packages outside of bootstrap: // FloatingPane.js and undo/browser.js _postLoad: false, //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad. _loaders: [], _unloaders: [], _loadNotifying: false }); //>>excludeStart("xdomainExclude", fileName.indexOf("dojo.xd.js") != -1 && kwArgs.loader == "xdomain"); dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){ // summary: // Load a Javascript module given a relative path // // description: // Loads and interprets the script located at relpath, which is // relative to the script root directory. If the script is found but // its interpretation causes a runtime exception, that exception is // not caught by us, so the caller will see it. We return a true // value if and only if the script is found. // // relpath: // A relative path to a script (no leading '/', and typically ending // in '.js'). // module: // A module whose existance to check for after loading a path. Can be // used to determine success or failure of the load. // cb: // a callback function to pass the result of evaluating the script var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath; try{ return !module ? this._loadUri(uri, cb) : this._loadUriAndCheck(uri, module, cb); // Boolean }catch(e){ console.error(e); return false; // Boolean } } dojo._loadUri = function(/*String*/uri, /*Function?*/cb){ // summary: // Loads JavaScript from a URI // description: // Reads the contents of the URI, and evaluates the contents. This is // used to load modules as well as resource bundles. Returns true if // it succeeded. Returns false if the URI reading failed. Throws if // the evaluation throws. // uri: a uri which points at the script to be loaded // cb: // a callback function to process the result of evaluating the script // as an expression, typically used by the resource bundle loader to // load JSON-style resources if(this._loadedUrls[uri]){ return true; // Boolean } var contents = this._getText(uri, true); if(!contents){ return false; } // Boolean this._loadedUrls[uri] = true; this._loadedUrls.push(uri); if(cb){ contents = '('+contents+')'; }else{ //Only do the scoping if no callback. If a callback is specified, //it is most likely the i18n bundle stuff. contents = this._scopePrefix + contents + this._scopeSuffix; } if(d.isMoz){ contents += "\r\n//@ sourceURL=" + uri; } // debugging assist for Firebug var value = d["eval"](contents); if(cb){ cb(value); } return true; // Boolean } //>>excludeEnd("xdomainExclude"); // FIXME: probably need to add logging to this method dojo._loadUriAndCheck = function(/*String*/uri, /*String*/moduleName, /*Function?*/cb){ // summary: calls loadUri then findModule and returns true if both succeed var ok = false; try{ ok = this._loadUri(uri, cb); }catch(e){ console.error("failed loading " + uri + " with error: " + e); } return !!(ok && this._loadedModules[moduleName]); // Boolean } dojo.loaded = function(){ // summary: // signal fired when initial environment and package loading is // complete. You should use dojo.addOnLoad() instead of doing a // direct dojo.connect() to this method in order to handle // initialization tasks that require the environment to be // initialized. In a browser host, declarative widgets will // be constructed when this function finishes runing. this._loadNotifying = true; this._postLoad = true; var mll = d._loaders; //Clear listeners so new ones can be added //For other xdomain package loads after the initial load. this._loaders = []; for(var x = 0; x < mll.length; x++){ mll[x](); } this._loadNotifying = false; //Make sure nothing else got added to the onload queue //after this first run. If something did, and we are not waiting for any //more inflight resources, run again. if(d._postLoad && d._inFlightCount == 0 && mll.length){ d._callLoaded(); } } dojo.unloaded = function(){ // summary: // signal fired by impending environment destruction. You should use // dojo.addOnUnload() instead of doing a direct dojo.connect() to this // method to perform page/application cleanup methods. See // dojo.addOnUnload for more info. var mll = d._unloaders; while(mll.length){ (mll.pop())(); } } d._onto = function(arr, obj, fn){ if(!fn){ arr.push(obj); }else if(fn){ var func = (typeof fn == "string") ? obj[fn] : fn; arr.push(function(){ func.call(obj); }); } } dojo.addOnLoad = function(/*Object?*/obj, /*String|Function*/functionName){ // summary: // Registers a function to be triggered after the DOM has finished // loading and widgets declared in markup have been instantiated. // Images and CSS files may or may not have finished downloading when // the specified function is called. (Note that widgets' CSS and HTML // code is guaranteed to be downloaded before said widgets are // instantiated.) // example: // | dojo.addOnLoad(functionPointer); // | dojo.addOnLoad(object, "functionName"); // | dojo.addOnLoad(object, function(){ /* ... */}); d._onto(d._loaders, obj, functionName); //Added for xdomain loading. dojo.addOnLoad is used to //indicate callbacks after doing some dojo.require() statements. //In the xdomain case, if all the requires are loaded (after initial //page load), then immediately call any listeners. if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){ d._callLoaded(); } } //Support calling dojo.addOnLoad via djConfig.addOnLoad. Support all the //call permutations of dojo.addOnLoad. Mainly useful when dojo is added //to the page after the page has loaded. var dca = d.config.addOnLoad; if(dca){ d.addOnLoad[(dca instanceof Array ? "apply" : "call")](d, dca); } dojo._modulesLoaded = function(){ if(d._postLoad){ return; } if(d._inFlightCount > 0){ console.warn("files still in flight!"); return; } d._callLoaded(); } dojo._callLoaded = function(){ // The "object" check is for IE, and the other opera check fixes an // issue in Opera where it could not find the body element in some // widget test cases. For 0.9, maybe route all browsers through the // setTimeout (need protection still for non-browser environments // though). This might also help the issue with FF 2.0 and freezing // issues where we try to do sync xhr while background css images are // being loaded (trac #2572)? Consider for 0.9. if(typeof setTimeout == "object" || (dojo.config.useXDomain && d.isOpera)){ if(dojo.isAIR){ setTimeout(function(){dojo.loaded();}, 0); }else{ setTimeout(dojo._scopeName + ".loaded();", 0); } }else{ d.loaded(); }";s:7:"returns";s:14:"Boolean|String";s:7:"private";b:1;s:7:"summary";s:0:"";}s:22:"dojo._getModuleSymbols";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"modulename";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:501:" var syms = modulename.split("."); for(var i = syms.length; i>0; i--){ var parentModule = syms.slice(0, i).join("."); if((i==1) && !this._moduleHasPrefix(parentModule)){ // Support default module directory (sibling of dojo) for top-level modules syms[0] = "../" + syms[0]; }else{ var parentModulePath = this._getModulePrefix(parentModule); if(parentModulePath != parentModule){ syms.splice(0, i, parentModulePath); break; } } } return syms; // Array";s:7:"summary";s:97:"Converts a module name in dotted JS notation to an array representing the path in the source tree";s:7:"returns";s:5:"Array";s:7:"private";b:1;}s:13:"dojo.loadInit";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"init";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:43:"a function reference. Executed immediately.";}}s:6:"source";s:9:" init();";s:7:"summary";s:243:"Executes a function that needs to be executed for the loader's dojo.requireIf resolutions to work. This is needed mostly for the xdomain loader case where a function needs to be executed to set up the possible values for a dojo.requireIf call.";s:11:"description";s:433:"This function is mainly a marker for the xdomain loader to know parts of code that needs be executed outside the function wrappper that is placed around modules. The init function could be executed more than once, and it should make no assumptions on what is loaded, or what modules are available. Only the functionality in Dojo Base is allowed to be used. Avoid using this method. For a valid use case, see the source for dojox.gfx.";}s:12:"dojo.require";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:10:"moduleName";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:279:"module name to load, using periods for separators, e.g. "dojo.date.locale". Module paths are de-referenced by dojo's internal mapping of locations to names and are disambiguated by longest prefix. See `dojo.registerModulePath()` for details on registering new modules.";}s:15:"omitModuleCheck";a:3:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";s:7:"summary";s:370:"if `true`, omitModuleCheck skips the step of ensuring that the loaded file actually defines the symbol it is referenced by. For example if it called as `dojo.require("a.b.c")` and the file located at `a/b/c.js` does not define an object `a.b.c`, and exception will be throws whereas no exception is raised when called as `dojo.require("a.b.c", true)`";}}s:6:"source";s:909:" omitModuleCheck = this._global_omit_module_check || omitModuleCheck; //Check if it is already loaded. var module = this._loadedModules[moduleName]; if(module){ return module; } // convert periods to slashes var relpath = this._getModuleSymbols(moduleName).join("/") + '.js'; var modArg = (!omitModuleCheck) ? moduleName : null; var ok = this._loadPath(relpath, modArg); if(!ok && !omitModuleCheck){ throw new Error("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); } // check that the symbol was defined // Don't bother if we're doing xdomain (asynchronous) loading. if(!omitModuleCheck && !this._isXDomain){ // pass in false so we can give better error module = this._loadedModules[moduleName]; if(!module){ throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } return module;";s:7:"summary";s:50:"loads a Javascript module from the appropriate URI";s:11:"description";s:692:"`dojo.require("A.B")` first checks to see if symbol A.B is defined. If it is, it is simply returned (nothing to do). If it is not defined, it will look for `A/B.js` in the script root directory. `dojo.require` throws an excpetion if it cannot find a file to load, or if the symbol `A.B` is not defined after loading. It returns the object `A.B`. `dojo.require()` does nothing about importing symbols into the current namespace. It is presumed that the caller will take care of that. For example, to import all symbols into a local block, you might write: with (dojo.require("A.B")) { ... } And to import just the leaf symbol to a local variable: var B = dojo.require("A.B"); ...";s:14:"return_summary";s:29:"the required namespace object";}s:12:"dojo.provide";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:12:"resourceName";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:13797:"/* * loader.js - A bootstrap module. Runs before the hostenv_*.js file. Contains * all of the package loading methods. */ //>>excludeStart("webkitMobile", kwArgs.webkitMobile); (function(){ var d = dojo; //>>excludeEnd("webkitMobile"); d.mixin(d, { _loadedModules: {}, _inFlightCount: 0, _hasResource: {}, _modulePrefixes: { dojo: { name: "dojo", value: "." }, // dojox: { name: "dojox", value: "../dojox" }, // dijit: { name: "dijit", value: "../dijit" }, doh: { name: "doh", value: "../util/doh" }, tests: { name: "tests", value: "tests" } }, _moduleHasPrefix: function(/*String*/module){ // summary: checks to see if module has been established var mp = this._modulePrefixes; return !!(mp[module] && mp[module].value); // Boolean }, _getModulePrefix: function(/*String*/module){ // summary: gets the prefix associated with module var mp = this._modulePrefixes; if(this._moduleHasPrefix(module)){ return mp[module].value; // String } return module; // String }, _loadedUrls: [], //WARNING: // This variable is referenced by packages outside of bootstrap: // FloatingPane.js and undo/browser.js _postLoad: false, //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad. _loaders: [], _unloaders: [], _loadNotifying: false }); //>>excludeStart("xdomainExclude", fileName.indexOf("dojo.xd.js") != -1 && kwArgs.loader == "xdomain"); dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){ // summary: // Load a Javascript module given a relative path // // description: // Loads and interprets the script located at relpath, which is // relative to the script root directory. If the script is found but // its interpretation causes a runtime exception, that exception is // not caught by us, so the caller will see it. We return a true // value if and only if the script is found. // // relpath: // A relative path to a script (no leading '/', and typically ending // in '.js'). // module: // A module whose existance to check for after loading a path. Can be // used to determine success or failure of the load. // cb: // a callback function to pass the result of evaluating the script var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath; try{ return !module ? this._loadUri(uri, cb) : this._loadUriAndCheck(uri, module, cb); // Boolean }catch(e){ console.error(e); return false; // Boolean } } dojo._loadUri = function(/*String*/uri, /*Function?*/cb){ // summary: // Loads JavaScript from a URI // description: // Reads the contents of the URI, and evaluates the contents. This is // used to load modules as well as resource bundles. Returns true if // it succeeded. Returns false if the URI reading failed. Throws if // the evaluation throws. // uri: a uri which points at the script to be loaded // cb: // a callback function to process the result of evaluating the script // as an expression, typically used by the resource bundle loader to // load JSON-style resources if(this._loadedUrls[uri]){ return true; // Boolean } var contents = this._getText(uri, true); if(!contents){ return false; } // Boolean this._loadedUrls[uri] = true; this._loadedUrls.push(uri); if(cb){ contents = '('+contents+')'; }else{ //Only do the scoping if no callback. If a callback is specified, //it is most likely the i18n bundle stuff. contents = this._scopePrefix + contents + this._scopeSuffix; } if(d.isMoz){ contents += "\r\n//@ sourceURL=" + uri; } // debugging assist for Firebug var value = d["eval"](contents); if(cb){ cb(value); } return true; // Boolean } //>>excludeEnd("xdomainExclude"); // FIXME: probably need to add logging to this method dojo._loadUriAndCheck = function(/*String*/uri, /*String*/moduleName, /*Function?*/cb){ // summary: calls loadUri then findModule and returns true if both succeed var ok = false; try{ ok = this._loadUri(uri, cb); }catch(e){ console.error("failed loading " + uri + " with error: " + e); } return !!(ok && this._loadedModules[moduleName]); // Boolean } dojo.loaded = function(){ // summary: // signal fired when initial environment and package loading is // complete. You should use dojo.addOnLoad() instead of doing a // direct dojo.connect() to this method in order to handle // initialization tasks that require the environment to be // initialized. In a browser host, declarative widgets will // be constructed when this function finishes runing. this._loadNotifying = true; this._postLoad = true; var mll = d._loaders; //Clear listeners so new ones can be added //For other xdomain package loads after the initial load. this._loaders = []; for(var x = 0; x < mll.length; x++){ mll[x](); } this._loadNotifying = false; //Make sure nothing else got added to the onload queue //after this first run. If something did, and we are not waiting for any //more inflight resources, run again. if(d._postLoad && d._inFlightCount == 0 && mll.length){ d._callLoaded(); } } dojo.unloaded = function(){ // summary: // signal fired by impending environment destruction. You should use // dojo.addOnUnload() instead of doing a direct dojo.connect() to this // method to perform page/application cleanup methods. See // dojo.addOnUnload for more info. var mll = d._unloaders; while(mll.length){ (mll.pop())(); } } d._onto = function(arr, obj, fn){ if(!fn){ arr.push(obj); }else if(fn){ var func = (typeof fn == "string") ? obj[fn] : fn; arr.push(function(){ func.call(obj); }); } } dojo.addOnLoad = function(/*Object?*/obj, /*String|Function*/functionName){ // summary: // Registers a function to be triggered after the DOM has finished // loading and widgets declared in markup have been instantiated. // Images and CSS files may or may not have finished downloading when // the specified function is called. (Note that widgets' CSS and HTML // code is guaranteed to be downloaded before said widgets are // instantiated.) // example: // | dojo.addOnLoad(functionPointer); // | dojo.addOnLoad(object, "functionName"); // | dojo.addOnLoad(object, function(){ /* ... */}); d._onto(d._loaders, obj, functionName); //Added for xdomain loading. dojo.addOnLoad is used to //indicate callbacks after doing some dojo.require() statements. //In the xdomain case, if all the requires are loaded (after initial //page load), then immediately call any listeners. if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){ d._callLoaded(); } } //Support calling dojo.addOnLoad via djConfig.addOnLoad. Support all the //call permutations of dojo.addOnLoad. Mainly useful when dojo is added //to the page after the page has loaded. var dca = d.config.addOnLoad; if(dca){ d.addOnLoad[(dca instanceof Array ? "apply" : "call")](d, dca); } dojo._modulesLoaded = function(){ if(d._postLoad){ return; } if(d._inFlightCount > 0){ console.warn("files still in flight!"); return; } d._callLoaded(); } dojo._callLoaded = function(){ // The "object" check is for IE, and the other opera check fixes an // issue in Opera where it could not find the body element in some // widget test cases. For 0.9, maybe route all browsers through the // setTimeout (need protection still for non-browser environments // though). This might also help the issue with FF 2.0 and freezing // issues where we try to do sync xhr while background css images are // being loaded (trac #2572)? Consider for 0.9. if(typeof setTimeout == "object" || (dojo.config.useXDomain && d.isOpera)){ if(dojo.isAIR){ setTimeout(function(){dojo.loaded();}, 0); }else{ setTimeout(dojo._scopeName + ".loaded();", 0); } }else{ d.loaded(); } } dojo._getModuleSymbols = function(/*String*/modulename){ // summary: // Converts a module name in dotted JS notation to an array // representing the path in the source tree var syms = modulename.split("."); for(var i = syms.length; i>0; i--){ var parentModule = syms.slice(0, i).join("."); if((i==1) && !this._moduleHasPrefix(parentModule)){ // Support default module directory (sibling of dojo) for top-level modules syms[0] = "../" + syms[0]; }else{ var parentModulePath = this._getModulePrefix(parentModule); if(parentModulePath != parentModule){ syms.splice(0, i, parentModulePath); break; } } } return syms; // Array } dojo._global_omit_module_check = false; dojo.loadInit = function(/*Function*/init){ // summary: // Executes a function that needs to be executed for the loader's dojo.requireIf // resolutions to work. This is needed mostly for the xdomain loader case where // a function needs to be executed to set up the possible values for a dojo.requireIf // call. // init: // a function reference. Executed immediately. // description: This function is mainly a marker for the xdomain loader to know parts of // code that needs be executed outside the function wrappper that is placed around modules. // The init function could be executed more than once, and it should make no assumptions // on what is loaded, or what modules are available. Only the functionality in Dojo Base // is allowed to be used. Avoid using this method. For a valid use case, // see the source for dojox.gfx. init(); } dojo._loadModule = dojo.require = function(/*String*/moduleName, /*Boolean?*/omitModuleCheck){ // summary: // loads a Javascript module from the appropriate URI // moduleName: // module name to load, using periods for separators, // e.g. "dojo.date.locale". Module paths are de-referenced by dojo's // internal mapping of locations to names and are disambiguated by // longest prefix. See `dojo.registerModulePath()` for details on // registering new modules. // omitModuleCheck: // if `true`, omitModuleCheck skips the step of ensuring that the // loaded file actually defines the symbol it is referenced by. // For example if it called as `dojo.require("a.b.c")` and the // file located at `a/b/c.js` does not define an object `a.b.c`, // and exception will be throws whereas no exception is raised // when called as `dojo.require("a.b.c", true)` // description: // `dojo.require("A.B")` first checks to see if symbol A.B is // defined. If it is, it is simply returned (nothing to do). // // If it is not defined, it will look for `A/B.js` in the script root // directory. // // `dojo.require` throws an excpetion if it cannot find a file // to load, or if the symbol `A.B` is not defined after loading. // // It returns the object `A.B`. // // `dojo.require()` does nothing about importing symbols into // the current namespace. It is presumed that the caller will // take care of that. For example, to import all symbols into a // local block, you might write: // // | with (dojo.require("A.B")) { // | ... // | } // // And to import just the leaf symbol to a local variable: // // | var B = dojo.require("A.B"); // | ... // returns: the required namespace object omitModuleCheck = this._global_omit_module_check || omitModuleCheck; //Check if it is already loaded. var module = this._loadedModules[moduleName]; if(module){ return module; } // convert periods to slashes var relpath = this._getModuleSymbols(moduleName).join("/") + '.js'; var modArg = (!omitModuleCheck) ? moduleName : null; var ok = this._loadPath(relpath, modArg); if(!ok && !omitModuleCheck){ throw new Error("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); } // check that the symbol was defined // Don't bother if we're doing xdomain (asynchronous) loading. if(!omitModuleCheck && !this._isXDomain){ // pass in false so we can give better error module = this._loadedModules[moduleName]; if(!module){ throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } return module; } dojo.provide = function(/*String*/ resourceName){ // summary: // Each javascript source file must have at least one // `dojo.provide()` call at the top of the file, corresponding to // the file name. For example, `js/dojo/foo.js` must have // `dojo.provide("dojo.foo");` before any calls to // `dojo.require()` are made. // description: // Each javascript source file is called a resource. When a // resource is loaded by the browser, `dojo.provide()` registers // that it has been loaded. // // For backwards compatibility reasons, in addition to registering // the resource, `dojo.provide()` also ensures that the javascript // object for the module exists. For example, // `dojo.provide("dojox.data.FlickrStore")`, in addition to // registering that `FlickrStore.js` is a resource for the // `dojox.data` module, will ensure that the `dojox.data` // javascript object exists, so that calls like // `dojo.data.foo = function(){ ... }` don't fail. // // In the case of a build where multiple javascript source files // are combined into one bigger file (similar to a .lib or .jar // file), that file may contain multiple dojo.provide() calls, to // note that it includes multiple resources. //Make sure we have a string. resourceName = resourceName + ""; return (d._loadedModules[resourceName] = d.getObject(resourceName, true)); // Object";s:7:"summary";s:254:"Each javascript source file must have at least one `dojo.provide()` call at the top of the file, corresponding to the file name. For example, `js/dojo/foo.js` must have `dojo.provide("dojo.foo");` before any calls to `dojo.require()` are made.";s:7:"returns";s:27:"Boolean|String|Array|Object";}s:20:"dojo.platformRequire";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"modMap";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:286:" var common = modMap.common || []; var result = common.concat(modMap[d._name] || modMap["default"] || []); for(var x=0; x ";}}s:24:"dojo.requireLocalization";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:10:"moduleName";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:89:"name of the package containing the "nls" directory in which the bundle is found";}s:10:"bundleName";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:55:"bundle name, i.e. the filename without the '.js' suffix";}s:6:"locale";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"String";s:7:"summary";s:94:"the locale to load (optional) By default, the browser's user locale as defined by dojo.locale";}s:20:"availableFlatLocales";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"String";s:7:"summary";s:130:"A comma-separated list of the available, flattened locales for this bundle. This argument should only be set by the build process.";}}s:6:"source";s:84:" d.require("dojo.i18n"); d.i18n._requireLocalization.apply(d.hostenv, arguments);";s:7:"summary";s:248:"Declares translated resources and loads them if necessary, in the same style as dojo.require. Contents of the resource bundle are typically strings, but may be any name/value pair, represented in JSON format. See also `dojo.i18n.getLocalization`.";s:11:"description";s:925:"Load translated resource bundles provided underneath the "nls" directory within a package. Translated resources may be located in different packages throughout the source tree. Each directory is named for a locale as specified by RFC 3066, (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase. Note that the two bundles in the example do not define all the same variants. For a given locale, bundles will be loaded for that locale and all more general locales above it, including a fallback at the root directory. For example, a declaration for the "de-at" locale will first load `nls/de-at/bundleone.js`, then `nls/de/bundleone.js` and finally `nls/bundleone.js`. The data will be flattened into a single Object so that lookups will follow this cascading pattern. An optional build step can preload the bundles to avoid data redundancy and the multiple network hits normally required to load these resources.";s:8:"examples";a:1:{i:0;s:590:"A particular widget may define one or more resource bundles, structured in a program as follows, where moduleName is mycode.mywidget and bundleNames available include bundleone and bundletwo: ... mycode/ mywidget/ nls/ bundleone.js (the fallback translation, English in this example) bundletwo.js (also a fallback translation) de/ bundleone.js bundletwo.js de-at/ bundleone.js en/ (empty; use the fallback translation) en-us/ bundleone.js en-gb/ bundleone.js es/ bundleone.js bundletwo.js ...etc ...";}}s:9:"dojo._Url";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:2399:" var n = null; var _a = arguments; var uri = [_a[0]]; // resolve uri components relative to each other for(var i = 1; i<_a.length; i++){ if(!_a[i]){ continue; } // Safari doesn't support this.constructor so we have to be explicit // FIXME: Tracked (and fixed) in Webkit bug 3537. // http://bugs.webkit.org/show_bug.cgi?id=3537 var relobj = new d._Url(_a[i]+""); var uriobj = new d._Url(uri[0]+""); if( relobj.path == "" && !relobj.scheme && !relobj.authority && !relobj.query ){ if(relobj.fragment != n){ uriobj.fragment = relobj.fragment; } relobj = uriobj; }else if(!relobj.scheme){ relobj.scheme = uriobj.scheme; if(!relobj.authority){ relobj.authority = uriobj.authority; if(relobj.path.charAt(0) != "/"){ var path = uriobj.path.substring(0, uriobj.path.lastIndexOf("/") + 1) + relobj.path; var segs = path.split("/"); for(var j = 0; j < segs.length; j++){ if(segs[j] == "."){ // flatten "./" references if(j == segs.length - 1){ segs[j] = ""; }else{ segs.splice(j, 1); j--; } }else if(j > 0 && !(j == 1 && segs[0] == "") && segs[j] == ".." && segs[j-1] != ".."){ // flatten "../" references if(j == (segs.length - 1)){ segs.splice(j, 1); segs[j - 1] = ""; }else{ segs.splice(j - 1, 2); j -= 2; } } } relobj.path = segs.join("/"); } } } uri = []; if(relobj.scheme){ uri.push(relobj.scheme, ":"); } if(relobj.authority){ uri.push("//", relobj.authority); } uri.push(relobj.path); if(relobj.query){ uri.push("?", relobj.query); } if(relobj.fragment){ uri.push("#", relobj.fragment); } } this.uri = uri.join(""); // break the uri into its main components var r = this.uri.match(ore); this.scheme = r[2] || (r[1] ? "" : n); this.authority = r[4] || (r[3] ? "" : n); this.path = r[5]; // can never be undefined this.query = r[7] || (r[6] ? "" : n); this.fragment = r[9] || (r[8] ? "" : n); if(this.authority != n){ // server based naming authority r = this.authority.match(ire); this.user = r[3] || n; this.password = r[4] || n; this.host = r[6] || r[7]; // ipv6 || ipv4 this.port = r[9] || n; }";s:7:"summary";s:128:"Constructor to create an object representing a URL. It is marked as private, since we might consider removing or simplifying it.";s:11:"description";s:189:"Each argument is evaluated in order relative to the next until a canonical uri is produced. To get an absolute Uri relative to the current document use: new dojo._Url(document.baseURI, url)";s:9:"classlike";b:1;}s:13:"dojo._Url.uri";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:16:"dojo._Url.scheme";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:19:"dojo._Url.authority";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:14:"dojo._Url.path";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:15:"dojo._Url.query";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:18:"dojo._Url.fragment";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:14:"dojo._Url.user";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:18:"dojo._Url.password";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:14:"dojo._Url.host";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:14:"dojo._Url.port";a:2:{s:8:"instance";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:18:"dojo._Url.toString";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:61:" dojo._Url.prototype.toString = function(){ return this.uri; ";s:9:"prototype";s:9:"dojo._Url";s:7:"summary";s:0:"";}s:14:"dojo.moduleUrl";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"module";a:1:{s:4:"type";s:6:"String";}s:3:"url";a:1:{s:4:"type";s:17:"dojo._Url||String";}}s:6:"source";s:455:" var loc = d._getModuleSymbols(module).join('/'); if(!loc){ return null; } if(loc.lastIndexOf("/") != loc.length-1){ loc += "/"; } //If the path is an absolute path (starts with a / or is on another //domain/xdomain) then don't add the baseUrl. var colonIndex = loc.indexOf(":"); if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > loc.indexOf("/"))){ loc = d.baseUrl + loc; } return new d._Url(loc, url); // String";s:7:"summary";s:50:"Returns a `dojo._Url` object relative to a module.";s:7:"returns";s:6:"String";s:8:"examples";a:2:{i:0;s:374:" var pngPath = dojo.moduleUrl("acme","images/small.png"); console.dir(pngPath); // list the object properties // create an image and set it's source to pngPath's value: var img = document.createElement("img"); // NOTE: we assign the string representation of the url object img.src = pngPath.toString(); // add our image to the document dojo.body().appendChild(img);";i:1;s:745:"you may de-reference as far as you like down the package hierarchy. This is sometimes handy to avoid lenghty relative urls or for building portable sub-packages. In this example, the `acme.widget` and `acme.util` directories may be located under different roots (see `dojo.registerModulePath`) but the the modules which reference them can be unaware of their relative locations on the filesystem: // somewhere in a configuration block dojo.registerModulePath("acme.widget", "../../acme/widget"); dojo.registerModulePath("acme.util", "../../util"); // ... // code in a module using acme resources var tmpltPath = dojo.moduleUrl("acme.widget","templates/template.html"); var dataPath = dojo.moduleUrl("acme.util","resources/data.json");";}}s:4:"dojo";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}