Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- fixing queue for yui 2.x.

- changing the injection routine based on Nicholas Zakas article.
- removing queue for yui 3.x, yui loader will do it.
  • Loading branch information...
commit 47c0c3dfa74e2645b9005d7c2a85a50681bbb686 1 parent 3488de6
@caridy authored
Showing with 301 additions and 3,845 deletions.
  1. +0 −3  api/YAHOO_bootstrap.html
  2. +0 −480 api/bootstrap-debug.js
  3. +0 −481 api/bootstrap-debug.js.highlighted
  4. +0 −608 api/bootstrap-debug.js.html
  5. +0 −1  api/bootstrap-min.js
  6. +0 −2  api/bootstrap-min.js.highlighted
  7. +0 −480 api/bootstrap.js
  8. +0 −481 api/bootstrap.js.highlighted
  9. +0 −16 api/classmap.js.highlighted
  10. +1 −1  api/parsed.json
  11. +1 −1  api/raw.json
  12. +0 −272 api/yahoo_bootstrap-debug.js
  13. +0 −273 api/yahoo_bootstrap-debug.js.highlighted
  14. +0 −1  api/yahoo_bootstrap-min.js
  15. +0 −2  api/yahoo_bootstrap-min.js.highlighted
  16. +21 −25 api/yahoo_bootstrap.js
  17. +21 −25 api/yahoo_bootstrap.js.highlighted
  18. +21 −25 api/yahoo_bootstrap.js.html
  19. +0 −208 api/yui_bootstrap-debug.js
  20. +0 −209 api/yui_bootstrap-debug.js.highlighted
  21. +0 −1  api/yui_bootstrap-min.js
  22. +0 −2  api/yui_bootstrap-min.js.highlighted
  23. +16 −15 api/yui_bootstrap.js
  24. +16 −15 api/yui_bootstrap.js.highlighted
  25. +16 −15 api/yui_bootstrap.js.html
  26. +37 −40 build/bootstrap/bootstrap-debug.js
  27. +1 −1  build/bootstrap/bootstrap-min.js
  28. +37 −40 build/bootstrap/bootstrap.js
  29. +21 −25 build/bootstrap/yahoo_bootstrap-debug.js
  30. +1 −1  build/bootstrap/yahoo_bootstrap-min.js
  31. +21 −25 build/bootstrap/yahoo_bootstrap.js
  32. +16 −15 build/bootstrap/yui_bootstrap-debug.js
  33. +1 −1  build/bootstrap/yui_bootstrap-min.js
  34. +16 −15 build/bootstrap/yui_bootstrap.js
  35. +21 −25 src/bootstrap/js/yahoo_bootstrap.js
  36. +16 −15 src/bootstrap/js/yui_bootstrap.js
View
3  api/YAHOO_bootstrap.html
@@ -93,9 +93,6 @@ <h3 id="constructor">Constructor</h3>
<li>Global:</li>
<li>------------------------------------------------------------------------</li>
<li>debug: Turn debug statements on or off</li>
-<li>injected: set to true if the yui seed file was dynamically loaded in
-order to bootstrap components relying on the window load event and onDOMReady
-(former injecting on YAHOO_config).</li>
<li>locale: default locale</li>
<li>-------------------------------------------------------------------------</li>
<li>For loader:</li>
View
480 api/bootstrap-debug.js
@@ -1,480 +0,0 @@
-/**
- * Provides Bootstrap definition based on YUI 3.x.
- *
- * @module bootstrap
- */
-(function() {
-
- var _config = {modules:{}},
- _loaderQueue = [];
-
- /**
- * YUI_bootstrap function. If YUI_bootstrap is already defined, the
- * existing YUI_bootstrap function will not be overwritten to preserve
- * the state of the bootstrap.
- *
- * @class YUI_bootstrap
- * @static
- * @global
- * @param o Optional configuration object. Options:
- * <ul>
- * <li>------------------------------------------------------------------------</li>
- * <li>Global:</li>
- * <li>------------------------------------------------------------------------</li>
- * <li>debug: Turn debug statements on or off</li>
- * <li>injected: set to true if the yui seed file was dynamically loaded in
- * order to bootstrap components relying on the window load event and onDOMReady
- * (former injecting on YAHOO_config).</li>
- * <li>locale: default locale</li>
- * <li>-------------------------------------------------------------------------</li>
- * <li>For loader:</li>
- * <li>-------------------------------------------------------------------------</li>
- * <li>base: The base dir</li>
- * <li>comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li>
- * <li>root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/</li>
- * <li>filter:
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- * <dl>
- * <dt>DEBUG</dt>
- * <dd>Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget</dd>
- * <dt>RAW</dt>
- * <dd>Selects the non-minified version of the library (e.g., event.js).</dd>
- * </dl>
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
- *
- * </li>
- * <li>filters: per-component filter specification. If specified for a given component, this overrides the filter config</li>
- * <li>combine:
- * Use the YUI combo service to reduce the number of http connections required to load your dependencies</li>
- * <li>ignore:
- * A list of modules that should never be dynamically loaded</li>
- * <li>force:
- * A list of modules that should always be loaded when required, even if already present on the page</li>
- * <li>insertBefore:
- * Node or id for a node that should be used as the insertion point for new nodes</li>
- * <li>charset:
- * charset for dynamic nodes</li>
- * <li>timeout:
- * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout</li>
- * <li>onSuccess:
- * callback for the 'success' event</li>
- * <li>onFailure:
- * callback for the 'failure' event</li>
- * <li>onTimeout:
- * callback for the 'timeout' event</li>
- * <li>onProgress:
- * callback executed each time a script or css file is loaded</li>
- * <li>modules:
- * A list of module definitions. See Loader.addModule for the supported module metadata</li>
- * </ul>
- *
- * Also, we can pass a custom argument thru "o" to customize
- * the file that should be injected to define the YUI Loader Utility. This feature allow us to
- * define a custom COMBO url to load a default set of components including loader in a single entry.
- *
- * @param boolean def if true, "o" will be used as the default configuration object for succesive
- * calls without the "o" argument.
- *
- */
-
- /**
- * Dispatch the first element from the job queue
- * @method _loaderDispatch
- * @private
- * @static
- * @return void
- */
- function _loaderDispatch () {
- var c;
- if ((c = _loaderQueue.shift())) {
- c.call();
- }
- }
-
- /**
- * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs
- * from the queue
- * @method _includeLoader
- * @private
- * @static
- * @return void
- */
- function _includeLoader () {
- /* injecting the YUI Loader in the current page */
- var base = _config.base || 'http://yui.yahooapis.com/3.0.0pr2/build/',
- seed = _config.seed || 'yui/yui-min.js',
- s = document.createElement('script'),
- fn = function(){
- if ((typeof YUI === 'undefined') || !YUI || YUI.Loader) {
- // keep waiting...
- window.setTimeout(fn, 50);
- } else {
- // YUI is ready...
- window.setTimeout(_loaderDispatch, 1);
- }
- };
- s.setAttribute('type', 'text/javascript');
- // analyzing the seed
- seed = (seed.indexOf('http')===0?seed:base+seed);
- s.setAttribute('src', seed);
- document.getElementsByTagName('head')[0].appendChild(s);
- fn();
- }
-
- /**
- * Verify if the current configuration object just defines new modules. If that's the case,
- * we will use "_config" as the computed configuration, and "o" as the list of modules to add.
- * @method _getConf
- * @param o currrent configuration object
- * @private
- * @static
- * @return object computed configuration
- */
- function _getConf(o) {
- o = o||{};
- var m = o.modules || {},
- flag = true, i;
- for (i in o) {
- if (o.hasOwnProperty(i) && (i != 'modules')) {
- flag = false;
- }
- }
- // using _config and injecting more modules
- if (flag) {
- for (i in m) {
- if (m.hasOwnProperty(i)) {
- _config.modules[i] = m[i];
- }
- }
- o = _config;
- }
- return o;
- }
-
- YUI_bootstrap = function (o, def) {
- // analyzing "o"
- o = _getConf(o);
- // if def is true, o will be used as the default config from now on
- _config = (def?o:_config);
- return {
- /**
- * Load a set of modules and notify thru the callback method.
- * @param modules* {string} 1-n modules to bind (uses arguments array)
- * @param *callback {function} callback function executed when
- * the instance has the required functionality. If included, it
- * must be the last parameter.
- *
- * YUI_bootstrap().use('dd', callback)
- *
- * @return void
- */
- use: function () {
- var a=Array.prototype.slice.call(arguments, 0);
- _loaderQueue.push (function () {
- /* hack: cloning configuration */
- var j, c = {};
- for (j in o) {
- if (o.hasOwnProperty(j)) {
- c[j] = o[j];
- }
- }
- /* end hack */
- var Y = YUI(c), i;
- Y.use.apply (Y, a);
- _loaderDispatch(); // dispatching the rest of the waiting jobs
- });
- // verifying if the loader is ready in the page, if not, it will be
- // included automatically and then the process will continue.
- if (_loaderQueue.length===1) {
- ((typeof YUI === 'undefined' || !YUI)?_includeLoader():_loaderDispatch());
- }
- }
- };
- };
-
-})();
-/**
- * Provides Bootstrap definition based on YUI 2.x.
- *
- * @module bootstrap
- */
-(function() {
-
- var _config = {modules:{}},
- _loaderObj = null,
- _loaderQueue = [];
-
- /**
- * YAHOO_bootstrap function. If YAHOO_bootstrap is already defined, the
- * existing YAHOO_bootstrap function will not be overwritten to preserve
- * the state of the bootstrap.
- *
- * @class YAHOO_bootstrap
- * @static
- * @global
- * @param o Optional configuration object. Options:
- * <ul>
- * <li>------------------------------------------------------------------------</li>
- * <li>Global:</li>
- * <li>------------------------------------------------------------------------</li>
- * <li>debug: Turn debug statements on or off</li>
- * <li>injected: set to true if the yui seed file was dynamically loaded in
- * order to bootstrap components relying on the window load event and onDOMReady
- * (former injecting on YAHOO_config).</li>
- * <li>locale: default locale</li>
- * <li>-------------------------------------------------------------------------</li>
- * <li>For loader:</li>
- * <li>-------------------------------------------------------------------------</li>
- * <li>base: The base dir</li>
- * <li>comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li>
- * <li>root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/</li>
- * <li>filter:
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- * <dl>
- * <dt>DEBUG</dt>
- * <dd>Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget</dd>
- * <dt>RAW</dt>
- * <dd>Selects the non-minified version of the library (e.g., event.js).</dd>
- * </dl>
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
- *
- * </li>
- * <li>filters: per-component filter specification. If specified for a given component, this overrides the filter config</li>
- * <li>combine:
- * Use the YUI combo service to reduce the number of http connections required to load your dependencies</li>
- * <li>ignore:
- * A list of modules that should never be dynamically loaded</li>
- * <li>force:
- * A list of modules that should always be loaded when required, even if already present on the page</li>
- * <li>insertBefore:
- * Node or id for a node that should be used as the insertion point for new nodes</li>
- * <li>charset:
- * charset for dynamic nodes</li>
- * <li>timeout:
- * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout</li>
- * <li>onSuccess:
- * callback for the 'success' event</li>
- * <li>onFailure:
- * callback for the 'failure' event</li>
- * <li>onTimeout:
- * callback for the 'timeout' event</li>
- * <li>onProgress:
- * callback executed each time a script or css file is loaded</li>
- * <li>modules:
- * A list of module definitions. See Loader.addModule for the supported module metadata</li>
- * </ul>
- *
- * Also, we can pass a custom argument thru "o" to customize
- * the file that should be injected to define the YUI Loader Utility. This feature allow us to
- * define a custom COMBO url to load a default set of components including loader in a single entry.
- *
- * @param boolean def if true, "o" will be used as the default configuration object for succesive
- * calls without the "o" argument.
- *
- */
-
- /**
- * Dispatch the first element from the job queue
- * @method _loaderDispatch
- * @private
- * @static
- * @return void
- */
- function _loaderDispatch () {
- var c;
- if ((c = _loaderQueue.shift())) {
- c.call();
- }
- }
-
- /**
- * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs
- * from the queue
- * @method _includeLoader
- * @private
- * @static
- * @return void
- */
- function _includeLoader () {
- var base = _config.base || 'http://yui.yahooapis.com/2.7.0/build/',
- seed = _config.seed || 'yuiloader/yuiloader-min.js';
- // analyzing the seed
- seed = (seed.indexOf('http')===0?seed:base+seed);
- // Encapsulation Pattern: Conjuring YUI from thin air (by Chris Heilmann)
- // more info: http://www.wait-till-i.com/2008/08/02/conjuring-yui-from-thin-air/
- YAHOO_config = function() {
- /* injecting the YUI Loader in the current page */
- var s = document.createElement('script');
- s.setAttribute('type', 'text/javascript');
- s.setAttribute('src', seed);
- document.getElementsByTagName('head')[0].appendChild(s);
- return {
- // true if the library should be dynamically loaded after window.onload.
- injecting: !!_config.injected,
- listener: function(o) {
- // waiting for the loader component
- if (o.name === 'get') {
- window.setTimeout(_loaderDispatch, 1);
- }
- }
- };
- }();
- }
-
- /**
- * Add a set of modules to _loaderObj, it also normalize the module information before include it
- * @method _addMods
- * @private
- * @static
- * @param {object} m collection of modules
- * @return void
- */
- function _addMods (m) {
- var i;
- // adding modules to the loader
- if (m && (typeof m === 'object')) {
- for (i in m) {
- if (m.hasOwnProperty(i)) {
- m[i].name = m[i].name || i;
- m[i].type = m[i].type || ((m[i].fullpath||m[i].path).indexOf('.css')>=0?'css':'js');
- //console.log ('Adding a default module: ', m[i].name, m[i]);
- _loaderObj.addModule (m[i]);
- }
- }
- }
- }
-
- /**
- * Initialization process for the YUI Loader obj. In YUI 2.x we should
- * have a single instance to control everything.
- * @method _initLoader
- * @private
- * @static
- * @return void
- */
- function _initLoader (l) {
- var i, m;
-
- if (!_loaderObj) {
- /* creating the loader object for this region */
- l = l || {};
- l.combine = (l.hasOwnProperty('combine')?l.combine:true); /* using the Combo Handle */
- l.filter = l.filter || 'min'; /* you can switch between YUI branch */
-
- // more config here ...
-
- _loaderObj = new YAHOO.util.YUILoader(l);
- _addMods(l.modules);
- }
- // probably more configurations here
- }
-
- /**
- * Verify if the current configuration object just defines new modules. If that's the case,
- * we will use "_config" as the computed configuration, and "o" as the list of modules to add.
- * @method _getConf
- * @param o currrent configuration object
- * @private
- * @static
- * @return object computed configuration
- */
- function _getConf(o) {
- o = o||{};
- var m = o.modules || {},
- flag = true, i;
- for (i in o) {
- if (o.hasOwnProperty(i) && (i != 'modules')) {
- flag = false;
- }
- }
- // using _config and injecting more modules
- if (flag) {
- for (i in m) {
- if (m.hasOwnProperty(i)) {
- _config.modules[i] = m[i];
- }
- }
- if (_loaderObj) {
- _addMods(m);
- }
- o = _config;
- }
- return o;
- }
-
- YAHOO_bootstrap = function (o, def) {
- // analyzing "o"
- o = _getConf(o);
- // if def is true, o will be used as the default config from now on
- _config = (def?o:_config);
- return {
- /**
- * Load a set of modules and notify thru the callback method.
- * @param modules* {string} 1-n modules to bind (uses arguments array)
- * @param *callback {function} callback function executed when
- * the instance has the required functionality. If included, it
- * must be the last parameter.
- *
- * YAHOO_bootstrap().use('tabview', callback)
- *
- * @return void
- */
- use: function () {
- var a=Array.prototype.slice.call(arguments, 0),
- callback = a.pop ();
- _loaderQueue.push (function () {
- var i;
- _initLoader(o);
- _loaderObj.require(a);
- _loaderObj.insert({
- onSuccess: function () {
- _loaderDispatch();
- callback.call();
- (o.onSuccess || function(){}).call();
- },
- onFailure: function(){
- _loaderDispatch();
- (o.onFailure || function(){}).call();
- },
- onTimeout: function () {
- _loaderDispatch();
- (o.onTimeout || function(){}).call();
- }
- }, o.type);
- });
- // verifying if the loader is ready in the page, if not, it will be
- // included automatically and then the process will continue.
- if (_loaderQueue.length===1) {
- ((typeof YAHOO == "undefined" || !YAHOO)?_includeLoader():_loaderDispatch());
- }
- }
- };
- };
-
-})();
View
481 api/bootstrap-debug.js.highlighted
@@ -1,481 +0,0 @@
-<div class="highlight"><pre><span class="c">/** </span>
-<span class="c"> * Provides Bootstrap definition based on YUI 3.x.</span>
-<span class="c"> *</span>
-<span class="c"> * @module bootstrap</span>
-<span class="c"> */</span>
-<span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
-
- <span class="kd">var</span> <span class="nx">_config</span> <span class="o">=</span> <span class="p">{</span><span class="nx">modules</span><span class="o">:</span><span class="p">{}}</span><span class="o">,</span>
- <span class="nx">_loaderQueue</span> <span class="o">=</span> <span class="p">[];</span>
-
- <span class="c">/**</span>
-<span class="c"> * YUI_bootstrap function. If YUI_bootstrap is already defined, the</span>
-<span class="c"> * existing YUI_bootstrap function will not be overwritten to preserve</span>
-<span class="c"> * the state of the bootstrap.</span>
-<span class="c"> *</span>
-<span class="c"> * @class YUI_bootstrap</span>
-<span class="c"> * @static</span>
-<span class="c"> * @global</span>
-<span class="c"> * @param o Optional configuration object. Options:</span>
-<span class="c"> * &lt;ul&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;Global:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;debug: Turn debug statements on or off&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;injected: set to true if the yui seed file was dynamically loaded in</span>
-<span class="c"> * order to bootstrap components relying on the window load event and onDOMReady</span>
-<span class="c"> * (former injecting on YAHOO_config).&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;locale: default locale&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;For loader:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;base: The base dir&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filter:</span>
-<span class="c"> * </span>
-<span class="c"> * A filter to apply to result urls. This filter will modify the default</span>
-<span class="c"> * path for all modules. The default path for the YUI library is the</span>
-<span class="c"> * minified version of the files (e.g., event-min.js). The filter property</span>
-<span class="c"> * can be a predefined filter or a custom filter. The valid predefined </span>
-<span class="c"> * filters are:</span>
-<span class="c"> * &lt;dl&gt;</span>
-<span class="c"> * &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
-<span class="c"> * This option will automatically include the Logger widget&lt;/dd&gt;</span>
-<span class="c"> * &lt;dt&gt;RAW&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
-<span class="c"> * &lt;/dl&gt;</span>
-<span class="c"> * You can also define a custom filter, which must be an object literal </span>
-<span class="c"> * containing a search expression and a replace string:</span>
-<span class="c"> * &lt;pre&gt;</span>
-<span class="c"> * myFilter: &amp;#123; </span>
-<span class="c"> * &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
-<span class="c"> * &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
-<span class="c"> * &amp;#125;</span>
-<span class="c"> * &lt;/pre&gt;</span>
-<span class="c"> *</span>
-<span class="c"> * &lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filters: per-component filter specification. If specified for a given component, this overrides the filter config&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;combine:</span>
-<span class="c"> * Use the YUI combo service to reduce the number of http connections required to load your dependencies&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;ignore:</span>
-<span class="c"> * A list of modules that should never be dynamically loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;force:</span>
-<span class="c"> * A list of modules that should always be loaded when required, even if already present on the page&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;insertBefore:</span>
-<span class="c"> * Node or id for a node that should be used as the insertion point for new nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;charset:</span>
-<span class="c"> * charset for dynamic nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;timeout:</span>
-<span class="c"> * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onSuccess:</span>
-<span class="c"> * callback for the &#39;success&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onFailure:</span>
-<span class="c"> * callback for the &#39;failure&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onTimeout:</span>
-<span class="c"> * callback for the &#39;timeout&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onProgress:</span>
-<span class="c"> * callback executed each time a script or css file is loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;modules:</span>
-<span class="c"> * A list of module definitions. See Loader.addModule for the supported module metadata&lt;/li&gt;</span>
-<span class="c"> * &lt;/ul&gt;</span>
-<span class="c"> * </span>
-<span class="c"> * Also, we can pass a custom argument thru &quot;o&quot; to customize</span>
-<span class="c"> * the file that should be injected to define the YUI Loader Utility. This feature allow us to</span>
-<span class="c"> * define a custom COMBO url to load a default set of components including loader in a single entry.</span>
-<span class="c"> * </span>
-<span class="c"> * @param boolean def if true, &quot;o&quot; will be used as the default configuration object for succesive </span>
-<span class="c"> * calls without the &quot;o&quot; argument.</span>
-<span class="c"> *</span>
-<span class="c"> */</span>
-
- <span class="c">/**</span>
-<span class="c"> * Dispatch the first element from the job queue </span>
-<span class="c"> * @method _loaderDispatch</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_loaderDispatch</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">c</span><span class="o">;</span>
- <span class="k">if</span> <span class="p">((</span><span class="nx">c</span> <span class="o">=</span> <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">shift</span><span class="p">()))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs</span>
-<span class="c"> * from the queue</span>
-<span class="c"> * @method _includeLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_includeLoader</span> <span class="p">()</span> <span class="p">{</span>
- <span class="c">/* injecting the YUI Loader in the current page */</span>
- <span class="kd">var</span> <span class="nx">base</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">base</span> <span class="o">||</span> <span class="s1">&#39;http://yui.yahooapis.com/3.0.0pr2/build/&#39;</span><span class="o">,</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">seed</span> <span class="o">||</span> <span class="s1">&#39;yui/yui-min.js&#39;</span><span class="o">,</span>
- <span class="nx">s</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">&#39;script&#39;</span><span class="p">)</span><span class="o">,</span>
- <span class="nx">fn</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(){</span>
- <span class="k">if</span> <span class="p">((</span><span class="k">typeof</span> <span class="nx">YUI</span> <span class="o">===</span> <span class="s1">&#39;undefined&#39;</span><span class="p">)</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YUI</span> <span class="o">||</span> <span class="nx">YUI</span><span class="p">.</span><span class="nx">Loader</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// keep waiting...</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">fn</span><span class="o">,</span> <span class="mi">50</span><span class="p">);</span>
- <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
- <span class="c">// YUI is ready...</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">_loaderDispatch</span><span class="o">,</span> <span class="mi">1</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;type&#39;</span><span class="o">,</span> <span class="s1">&#39;text/javascript&#39;</span><span class="p">);</span>
- <span class="c">// analyzing the seed</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="p">(</span><span class="nx">seed</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;http&#39;</span><span class="p">)</span><span class="o">===</span><span class="mi">0</span><span class="o">?</span><span class="nx">seed</span><span class="o">:</span><span class="nx">base</span><span class="o">+</span><span class="nx">seed</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;src&#39;</span><span class="o">,</span> <span class="nx">seed</span><span class="p">);</span>
- <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;head&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
- <span class="nx">fn</span><span class="p">();</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Verify if the current configuration object just defines new modules. If that&#39;s the case, </span>
-<span class="c"> * we will use &quot;_config&quot; as the computed configuration, and &quot;o&quot; as the list of modules to add.</span>
-<span class="c"> * @method _getConf</span>
-<span class="c"> * @param o currrent configuration object</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return object computed configuration</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span><span class="o">||</span><span class="p">{};</span>
- <span class="kd">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">o</span><span class="p">.</span><span class="nx">modules</span> <span class="o">||</span> <span class="p">{}</span><span class="o">,</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">true</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">i</span> <span class="o">!=</span> <span class="s1">&#39;modules&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">// using _config and injecting more modules</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">flag</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">_config</span><span class="p">.</span><span class="nx">modules</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_config</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
- <span class="p">}</span>
-
- <span class="nx">YUI_bootstrap</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">def</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// analyzing &quot;o&quot;</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="c">// if def is true, o will be used as the default config from now on </span>
- <span class="nx">_config</span> <span class="o">=</span> <span class="p">(</span><span class="nx">def</span><span class="o">?</span><span class="nx">o</span><span class="o">:</span><span class="nx">_config</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">/**</span>
-<span class="c"> * Load a set of modules and notify thru the callback method.</span>
-<span class="c"> * @param modules* {string} 1-n modules to bind (uses arguments array)</span>
-<span class="c"> * @param *callback {function} callback function executed when </span>
-<span class="c"> * the instance has the required functionality. If included, it</span>
-<span class="c"> * must be the last parameter.</span>
-<span class="c"> *</span>
-<span class="c"> * YUI_bootstrap().use(&#39;dd&#39;, callback)</span>
-<span class="c"> *</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="nx">use</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">a</span><span class="o">=</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">arguments</span><span class="o">,</span> <span class="mi">0</span><span class="p">);</span>
- <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">push</span> <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="c">/* hack: cloning configuration */</span>
- <span class="kd">var</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">c</span> <span class="o">=</span> <span class="p">{};</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">j</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">j</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">[</span><span class="nx">j</span><span class="p">]</span> <span class="o">=</span> <span class="nx">o</span><span class="p">[</span><span class="nx">j</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">/* end hack */</span>
- <span class="kd">var</span> <span class="nx">Y</span> <span class="o">=</span> <span class="nx">YUI</span><span class="p">(</span><span class="nx">c</span><span class="p">)</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">Y</span><span class="p">.</span><span class="nx">use</span><span class="p">.</span><span class="nx">apply</span> <span class="p">(</span><span class="nx">Y</span><span class="o">,</span> <span class="nx">a</span><span class="p">);</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span> <span class="c">// dispatching the rest of the waiting jobs</span>
- <span class="p">});</span>
- <span class="c">// verifying if the loader is ready in the page, if not, it will be </span>
- <span class="c">// included automatically and then the process will continue.</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
- <span class="p">((</span><span class="k">typeof</span> <span class="nx">YUI</span> <span class="o">===</span> <span class="s1">&#39;undefined&#39;</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YUI</span><span class="p">)</span><span class="o">?</span><span class="nx">_includeLoader</span><span class="p">()</span><span class="o">:</span><span class="nx">_loaderDispatch</span><span class="p">());</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">};</span>
-
-<span class="p">})();</span>
-<span class="c">/** </span>
-<span class="c"> * Provides Bootstrap definition based on YUI 2.x.</span>
-<span class="c"> *</span>
-<span class="c"> * @module bootstrap</span>
-<span class="c"> */</span>
-<span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
-
- <span class="kd">var</span> <span class="nx">_config</span> <span class="o">=</span> <span class="p">{</span><span class="nx">modules</span><span class="o">:</span><span class="p">{}}</span><span class="o">,</span>
- <span class="nx">_loaderObj</span> <span class="o">=</span> <span class="kc">null</span><span class="o">,</span>
- <span class="nx">_loaderQueue</span> <span class="o">=</span> <span class="p">[];</span>
-
- <span class="c">/**</span>
-<span class="c"> * YAHOO_bootstrap function. If YAHOO_bootstrap is already defined, the</span>
-<span class="c"> * existing YAHOO_bootstrap function will not be overwritten to preserve</span>
-<span class="c"> * the state of the bootstrap.</span>
-<span class="c"> *</span>
-<span class="c"> * @class YAHOO_bootstrap</span>
-<span class="c"> * @static</span>
-<span class="c"> * @global</span>
-<span class="c"> * @param o Optional configuration object. Options:</span>
-<span class="c"> * &lt;ul&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;Global:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;debug: Turn debug statements on or off&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;injected: set to true if the yui seed file was dynamically loaded in</span>
-<span class="c"> * order to bootstrap components relying on the window load event and onDOMReady</span>
-<span class="c"> * (former injecting on YAHOO_config).&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;locale: default locale&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;For loader:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;base: The base dir&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filter:</span>
-<span class="c"> * </span>
-<span class="c"> * A filter to apply to result urls. This filter will modify the default</span>
-<span class="c"> * path for all modules. The default path for the YUI library is the</span>
-<span class="c"> * minified version of the files (e.g., event-min.js). The filter property</span>
-<span class="c"> * can be a predefined filter or a custom filter. The valid predefined </span>
-<span class="c"> * filters are:</span>
-<span class="c"> * &lt;dl&gt;</span>
-<span class="c"> * &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
-<span class="c"> * This option will automatically include the Logger widget&lt;/dd&gt;</span>
-<span class="c"> * &lt;dt&gt;RAW&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
-<span class="c"> * &lt;/dl&gt;</span>
-<span class="c"> * You can also define a custom filter, which must be an object literal </span>
-<span class="c"> * containing a search expression and a replace string:</span>
-<span class="c"> * &lt;pre&gt;</span>
-<span class="c"> * myFilter: &amp;#123; </span>
-<span class="c"> * &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
-<span class="c"> * &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
-<span class="c"> * &amp;#125;</span>
-<span class="c"> * &lt;/pre&gt;</span>
-<span class="c"> *</span>
-<span class="c"> * &lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filters: per-component filter specification. If specified for a given component, this overrides the filter config&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;combine:</span>
-<span class="c"> * Use the YUI combo service to reduce the number of http connections required to load your dependencies&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;ignore:</span>
-<span class="c"> * A list of modules that should never be dynamically loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;force:</span>
-<span class="c"> * A list of modules that should always be loaded when required, even if already present on the page&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;insertBefore:</span>
-<span class="c"> * Node or id for a node that should be used as the insertion point for new nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;charset:</span>
-<span class="c"> * charset for dynamic nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;timeout:</span>
-<span class="c"> * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onSuccess:</span>
-<span class="c"> * callback for the &#39;success&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onFailure:</span>
-<span class="c"> * callback for the &#39;failure&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onTimeout:</span>
-<span class="c"> * callback for the &#39;timeout&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onProgress:</span>
-<span class="c"> * callback executed each time a script or css file is loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;modules:</span>
-<span class="c"> * A list of module definitions. See Loader.addModule for the supported module metadata&lt;/li&gt;</span>
-<span class="c"> * &lt;/ul&gt;</span>
-<span class="c"> * </span>
-<span class="c"> * Also, we can pass a custom argument thru &quot;o&quot; to customize</span>
-<span class="c"> * the file that should be injected to define the YUI Loader Utility. This feature allow us to</span>
-<span class="c"> * define a custom COMBO url to load a default set of components including loader in a single entry.</span>
-<span class="c"> * </span>
-<span class="c"> * @param boolean def if true, &quot;o&quot; will be used as the default configuration object for succesive </span>
-<span class="c"> * calls without the &quot;o&quot; argument.</span>
-<span class="c"> * </span>
-<span class="c"> */</span>
-
- <span class="c">/**</span>
-<span class="c"> * Dispatch the first element from the job queue </span>
-<span class="c"> * @method _loaderDispatch</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_loaderDispatch</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">c</span><span class="o">;</span>
- <span class="k">if</span> <span class="p">((</span><span class="nx">c</span> <span class="o">=</span> <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">shift</span><span class="p">()))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs</span>
-<span class="c"> * from the queue</span>
-<span class="c"> * @method _includeLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_includeLoader</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">base</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">base</span> <span class="o">||</span> <span class="s1">&#39;http://yui.yahooapis.com/2.7.0/build/&#39;</span><span class="o">,</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">seed</span> <span class="o">||</span> <span class="s1">&#39;yuiloader/yuiloader-min.js&#39;</span><span class="o">;</span>
- <span class="c">// analyzing the seed</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="p">(</span><span class="nx">seed</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;http&#39;</span><span class="p">)</span><span class="o">===</span><span class="mi">0</span><span class="o">?</span><span class="nx">seed</span><span class="o">:</span><span class="nx">base</span><span class="o">+</span><span class="nx">seed</span><span class="p">);</span>
- <span class="c">// Encapsulation Pattern: Conjuring YUI from thin air (by Chris Heilmann)</span>
- <span class="c">// more info: http://www.wait-till-i.com/2008/08/02/conjuring-yui-from-thin-air/</span>
- <span class="nx">YAHOO_config</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
- <span class="c">/* injecting the YUI Loader in the current page */</span>
- <span class="kd">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">&#39;script&#39;</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;type&#39;</span><span class="o">,</span> <span class="s1">&#39;text/javascript&#39;</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;src&#39;</span><span class="o">,</span> <span class="nx">seed</span><span class="p">);</span>
- <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;head&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">// true if the library should be dynamically loaded after window.onload.</span>
- <span class="nx">injecting</span><span class="o">:</span> <span class="o">!!</span><span class="nx">_config</span><span class="p">.</span><span class="nx">injected</span><span class="o">,</span>
- <span class="nx">listener</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// waiting for the loader component</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">name</span> <span class="o">===</span> <span class="s1">&#39;get&#39;</span><span class="p">)</span> <span class="p">{</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">_loaderDispatch</span><span class="o">,</span> <span class="mi">1</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">}();</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Add a set of modules to _loaderObj, it also normalize the module information before include it</span>
-<span class="c"> * @method _addMods</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @param {object} m collection of modules</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_addMods</span> <span class="p">(</span><span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">;</span>
- <span class="c">// adding modules to the loader </span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">m</span> <span class="o">===</span> <span class="s1">&#39;object&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">name</span> <span class="o">||</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">type</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">type</span> <span class="o">||</span> <span class="p">((</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">fullpath</span><span class="o">||</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">path</span><span class="p">).</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;.css&#39;</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">0</span><span class="o">?</span><span class="s1">&#39;css&#39;</span><span class="o">:</span><span class="s1">&#39;js&#39;</span><span class="p">);</span>
- <span class="c">//console.log (&#39;Adding a default module: &#39;, m[i].name, m[i]);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">addModule</span> <span class="p">(</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Initialization process for the YUI Loader obj. In YUI 2.x we should</span>
-<span class="c"> * have a single instance to control everything.</span>
-<span class="c"> * @method _initLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_initLoader</span> <span class="p">(</span><span class="nx">l</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">m</span><span class="o">;</span>
-
- <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_loaderObj</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">/* creating the loader object for this region */</span>
- <span class="nx">l</span> <span class="o">=</span> <span class="nx">l</span> <span class="o">||</span> <span class="p">{};</span>
- <span class="nx">l</span><span class="p">.</span><span class="nx">combine</span> <span class="o">=</span> <span class="p">(</span><span class="nx">l</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s1">&#39;combine&#39;</span><span class="p">)</span><span class="o">?</span><span class="nx">l</span><span class="p">.</span><span class="nx">combine</span><span class="o">:</span><span class="kc">true</span><span class="p">);</span> <span class="c">/* using the Combo Handle */</span>
- <span class="nx">l</span><span class="p">.</span><span class="nx">filter</span> <span class="o">=</span> <span class="nx">l</span><span class="p">.</span><span class="nx">filter</span> <span class="o">||</span> <span class="s1">&#39;min&#39;</span><span class="o">;</span> <span class="c">/* you can switch between YUI branch */</span>
-
- <span class="c">// more config here ...</span>
-
- <span class="nx">_loaderObj</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="p">.</span><span class="nx">util</span><span class="p">.</span><span class="nx">YUILoader</span><span class="p">(</span><span class="nx">l</span><span class="p">);</span>
- <span class="nx">_addMods</span><span class="p">(</span><span class="nx">l</span><span class="p">.</span><span class="nx">modules</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="c">// probably more configurations here</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Verify if the current configuration object just defines new modules. If that&#39;s the case, </span>
-<span class="c"> * we will use &quot;_config&quot; as the computed configuration, and &quot;o&quot; as the list of modules to add.</span>
-<span class="c"> * @method _getConf</span>
-<span class="c"> * @param o currrent configuration object</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return object computed configuration</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span><span class="o">||</span><span class="p">{};</span>
- <span class="kd">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">o</span><span class="p">.</span><span class="nx">modules</span> <span class="o">||</span> <span class="p">{}</span><span class="o">,</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">true</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">i</span> <span class="o">!=</span> <span class="s1">&#39;modules&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">// using _config and injecting more modules</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">flag</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">_config</span><span class="p">.</span><span class="nx">modules</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderObj</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">_addMods</span><span class="p">(</span><span class="nx">m</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_config</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
- <span class="p">}</span>
-
- <span class="nx">YAHOO_bootstrap</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">def</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// analyzing &quot;o&quot;</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="c">// if def is true, o will be used as the default config from now on </span>
- <span class="nx">_config</span> <span class="o">=</span> <span class="p">(</span><span class="nx">def</span><span class="o">?</span><span class="nx">o</span><span class="o">:</span><span class="nx">_config</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">/**</span>
-<span class="c"> * Load a set of modules and notify thru the callback method.</span>
-<span class="c"> * @param modules* {string} 1-n modules to bind (uses arguments array)</span>
-<span class="c"> * @param *callback {function} callback function executed when </span>
-<span class="c"> * the instance has the required functionality. If included, it</span>
-<span class="c"> * must be the last parameter.</span>
-<span class="c"> *</span>
-<span class="c"> * YAHOO_bootstrap().use(&#39;tabview&#39;, callback)</span>
-<span class="c"> *</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="nx">use</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">a</span><span class="o">=</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">arguments</span><span class="o">,</span> <span class="mi">0</span><span class="p">)</span><span class="o">,</span>
- <span class="nx">callback</span> <span class="o">=</span> <span class="nx">a</span><span class="p">.</span><span class="nx">pop</span> <span class="p">();</span>
- <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">push</span> <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">_initLoader</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">require</span><span class="p">(</span><span class="nx">a</span><span class="p">);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">insert</span><span class="p">({</span>
- <span class="nx">onSuccess</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="nx">callback</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onSuccess</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span><span class="o">,</span>
- <span class="nx">onFailure</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onFailure</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span><span class="o">,</span>
- <span class="nx">onTimeout</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onTimeout</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span><span class="o">,</span> <span class="nx">o</span><span class="p">.</span><span class="nx">type</span><span class="p">);</span>
- <span class="p">});</span>
- <span class="c">// verifying if the loader is ready in the page, if not, it will be </span>
- <span class="c">// included automatically and then the process will continue.</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
- <span class="p">((</span><span class="k">typeof</span> <span class="nx">YAHOO</span> <span class="o">==</span> <span class="s2">&quot;undefined&quot;</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YAHOO</span><span class="p">)</span><span class="o">?</span><span class="nx">_includeLoader</span><span class="p">()</span><span class="o">:</span><span class="nx">_loaderDispatch</span><span class="p">());</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">};</span>
-
-<span class="p">})();</span>
-</pre></div>
View
608 api/bootstrap-debug.js.html
@@ -1,608 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>API: bootstrap bootstrap-debug.js (YUI Library)</title>
-
- <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
- <link rel="stylesheet" type="text/css" href="assets/api.css" />
-
- <script type="text/javascript" src="assets/api-js"></script>
- <script type="text/javascript" src="assets/ac-js"></script>
-</head>
-
-<body id="yahoo-com">
-
-<div id="doc3" class="yui-t2">
- <div id="hd">
- <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
- <h3>bootstrap&nbsp; <span class="subtitle">1.0.0</span></h3>
- <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
- &gt; <a href="./module_bootstrap.html" title="bootstrap">bootstrap</a>
-
- &gt; bootstrap-debug.js (source view)
- <form onsubmit="return false">
- <div id="propertysearch">
- Search: <input autocomplete="off" id="searchinput" />
- <div id="searchresults">
- &nbsp;
- </div>
- </div>
- </form>
- </div>
-
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
- <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
- <fieldset>
- <legend>Filters</legend>
- <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
- <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
- <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
- </fieldset>
- </form>
-
- <div id="srcout">
- <style>
- #doc3 .classopts { display:none; }
- </style>
-<div class="highlight"><pre><span class="c">/** </span>
-<span class="c"> * Provides Bootstrap definition based on YUI 3.x.</span>
-<span class="c"> *</span>
-<span class="c"> * @module bootstrap</span>
-<span class="c"> */</span>
-<span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
-
- <span class="kd">var</span> <span class="nx">_config</span> <span class="o">=</span> <span class="p">{</span><span class="nx">modules</span><span class="o">:</span><span class="p">{}}</span><span class="o">,</span>
- <span class="nx">_loaderQueue</span> <span class="o">=</span> <span class="p">[];</span>
-
- <span class="c">/**</span>
-<span class="c"> * YUI_bootstrap function. If YUI_bootstrap is already defined, the</span>
-<span class="c"> * existing YUI_bootstrap function will not be overwritten to preserve</span>
-<span class="c"> * the state of the bootstrap.</span>
-<span class="c"> *</span>
-<span class="c"> * @class YUI_bootstrap</span>
-<span class="c"> * @static</span>
-<span class="c"> * @global</span>
-<span class="c"> * @param o Optional configuration object. Options:</span>
-<span class="c"> * &lt;ul&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;Global:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;debug: Turn debug statements on or off&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;injected: set to true if the yui seed file was dynamically loaded in</span>
-<span class="c"> * order to bootstrap components relying on the window load event and onDOMReady</span>
-<span class="c"> * (former injecting on YAHOO_config).&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;locale: default locale&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;For loader:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;base: The base dir&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filter:</span>
-<span class="c"> * </span>
-<span class="c"> * A filter to apply to result urls. This filter will modify the default</span>
-<span class="c"> * path for all modules. The default path for the YUI library is the</span>
-<span class="c"> * minified version of the files (e.g., event-min.js). The filter property</span>
-<span class="c"> * can be a predefined filter or a custom filter. The valid predefined </span>
-<span class="c"> * filters are:</span>
-<span class="c"> * &lt;dl&gt;</span>
-<span class="c"> * &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
-<span class="c"> * This option will automatically include the Logger widget&lt;/dd&gt;</span>
-<span class="c"> * &lt;dt&gt;RAW&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
-<span class="c"> * &lt;/dl&gt;</span>
-<span class="c"> * You can also define a custom filter, which must be an object literal </span>
-<span class="c"> * containing a search expression and a replace string:</span>
-<span class="c"> * &lt;pre&gt;</span>
-<span class="c"> * myFilter: &amp;#123; </span>
-<span class="c"> * &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
-<span class="c"> * &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
-<span class="c"> * &amp;#125;</span>
-<span class="c"> * &lt;/pre&gt;</span>
-<span class="c"> *</span>
-<span class="c"> * &lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filters: per-component filter specification. If specified for a given component, this overrides the filter config&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;combine:</span>
-<span class="c"> * Use the YUI combo service to reduce the number of http connections required to load your dependencies&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;ignore:</span>
-<span class="c"> * A list of modules that should never be dynamically loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;force:</span>
-<span class="c"> * A list of modules that should always be loaded when required, even if already present on the page&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;insertBefore:</span>
-<span class="c"> * Node or id for a node that should be used as the insertion point for new nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;charset:</span>
-<span class="c"> * charset for dynamic nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;timeout:</span>
-<span class="c"> * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onSuccess:</span>
-<span class="c"> * callback for the &#39;success&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onFailure:</span>
-<span class="c"> * callback for the &#39;failure&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onTimeout:</span>
-<span class="c"> * callback for the &#39;timeout&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onProgress:</span>
-<span class="c"> * callback executed each time a script or css file is loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;modules:</span>
-<span class="c"> * A list of module definitions. See Loader.addModule for the supported module metadata&lt;/li&gt;</span>
-<span class="c"> * &lt;/ul&gt;</span>
-<span class="c"> * </span>
-<span class="c"> * Also, we can pass a custom argument thru &quot;o&quot; to customize</span>
-<span class="c"> * the file that should be injected to define the YUI Loader Utility. This feature allow us to</span>
-<span class="c"> * define a custom COMBO url to load a default set of components including loader in a single entry.</span>
-<span class="c"> * </span>
-<span class="c"> * @param boolean def if true, &quot;o&quot; will be used as the default configuration object for succesive </span>
-<span class="c"> * calls without the &quot;o&quot; argument.</span>
-<span class="c"> *</span>
-<span class="c"> */</span>
-
- <span class="c">/**</span>
-<span class="c"> * Dispatch the first element from the job queue </span>
-<span class="c"> * @method _loaderDispatch</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_loaderDispatch</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">c</span><span class="o">;</span>
- <span class="k">if</span> <span class="p">((</span><span class="nx">c</span> <span class="o">=</span> <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">shift</span><span class="p">()))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs</span>
-<span class="c"> * from the queue</span>
-<span class="c"> * @method _includeLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_includeLoader</span> <span class="p">()</span> <span class="p">{</span>
- <span class="c">/* injecting the YUI Loader in the current page */</span>
- <span class="kd">var</span> <span class="nx">base</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">base</span> <span class="o">||</span> <span class="s1">&#39;http://yui.yahooapis.com/3.0.0pr2/build/&#39;</span><span class="o">,</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">seed</span> <span class="o">||</span> <span class="s1">&#39;yui/yui-min.js&#39;</span><span class="o">,</span>
- <span class="nx">s</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">&#39;script&#39;</span><span class="p">)</span><span class="o">,</span>
- <span class="nx">fn</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(){</span>
- <span class="k">if</span> <span class="p">((</span><span class="k">typeof</span> <span class="nx">YUI</span> <span class="o">===</span> <span class="s1">&#39;undefined&#39;</span><span class="p">)</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YUI</span> <span class="o">||</span> <span class="nx">YUI</span><span class="p">.</span><span class="nx">Loader</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// keep waiting...</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">fn</span><span class="o">,</span> <span class="mi">50</span><span class="p">);</span>
- <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
- <span class="c">// YUI is ready...</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">_loaderDispatch</span><span class="o">,</span> <span class="mi">1</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;type&#39;</span><span class="o">,</span> <span class="s1">&#39;text/javascript&#39;</span><span class="p">);</span>
- <span class="c">// analyzing the seed</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="p">(</span><span class="nx">seed</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;http&#39;</span><span class="p">)</span><span class="o">===</span><span class="mi">0</span><span class="o">?</span><span class="nx">seed</span><span class="o">:</span><span class="nx">base</span><span class="o">+</span><span class="nx">seed</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;src&#39;</span><span class="o">,</span> <span class="nx">seed</span><span class="p">);</span>
- <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;head&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
- <span class="nx">fn</span><span class="p">();</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Verify if the current configuration object just defines new modules. If that&#39;s the case, </span>
-<span class="c"> * we will use &quot;_config&quot; as the computed configuration, and &quot;o&quot; as the list of modules to add.</span>
-<span class="c"> * @method _getConf</span>
-<span class="c"> * @param o currrent configuration object</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return object computed configuration</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span><span class="o">||</span><span class="p">{};</span>
- <span class="kd">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">o</span><span class="p">.</span><span class="nx">modules</span> <span class="o">||</span> <span class="p">{}</span><span class="o">,</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">true</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">i</span> <span class="o">!=</span> <span class="s1">&#39;modules&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">// using _config and injecting more modules</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">flag</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">_config</span><span class="p">.</span><span class="nx">modules</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_config</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
- <span class="p">}</span>
-
- <span class="nx">YUI_bootstrap</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">def</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// analyzing &quot;o&quot;</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="c">// if def is true, o will be used as the default config from now on </span>
- <span class="nx">_config</span> <span class="o">=</span> <span class="p">(</span><span class="nx">def</span><span class="o">?</span><span class="nx">o</span><span class="o">:</span><span class="nx">_config</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">/**</span>
-<span class="c"> * Load a set of modules and notify thru the callback method.</span>
-<span class="c"> * @param modules* {string} 1-n modules to bind (uses arguments array)</span>
-<span class="c"> * @param *callback {function} callback function executed when </span>
-<span class="c"> * the instance has the required functionality. If included, it</span>
-<span class="c"> * must be the last parameter.</span>
-<span class="c"> *</span>
-<span class="c"> * YUI_bootstrap().use(&#39;dd&#39;, callback)</span>
-<span class="c"> *</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="nx">use</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">a</span><span class="o">=</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">arguments</span><span class="o">,</span> <span class="mi">0</span><span class="p">);</span>
- <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">push</span> <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="c">/* hack: cloning configuration */</span>
- <span class="kd">var</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">c</span> <span class="o">=</span> <span class="p">{};</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">j</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">j</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">[</span><span class="nx">j</span><span class="p">]</span> <span class="o">=</span> <span class="nx">o</span><span class="p">[</span><span class="nx">j</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">/* end hack */</span>
- <span class="kd">var</span> <span class="nx">Y</span> <span class="o">=</span> <span class="nx">YUI</span><span class="p">(</span><span class="nx">c</span><span class="p">)</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">Y</span><span class="p">.</span><span class="nx">use</span><span class="p">.</span><span class="nx">apply</span> <span class="p">(</span><span class="nx">Y</span><span class="o">,</span> <span class="nx">a</span><span class="p">);</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span> <span class="c">// dispatching the rest of the waiting jobs</span>
- <span class="p">});</span>
- <span class="c">// verifying if the loader is ready in the page, if not, it will be </span>
- <span class="c">// included automatically and then the process will continue.</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
- <span class="p">((</span><span class="k">typeof</span> <span class="nx">YUI</span> <span class="o">===</span> <span class="s1">&#39;undefined&#39;</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YUI</span><span class="p">)</span><span class="o">?</span><span class="nx">_includeLoader</span><span class="p">()</span><span class="o">:</span><span class="nx">_loaderDispatch</span><span class="p">());</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">};</span>
-
-<span class="p">})();</span>
-<span class="c">/** </span>
-<span class="c"> * Provides Bootstrap definition based on YUI 2.x.</span>
-<span class="c"> *</span>
-<span class="c"> * @module bootstrap</span>
-<span class="c"> */</span>
-<span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
-
- <span class="kd">var</span> <span class="nx">_config</span> <span class="o">=</span> <span class="p">{</span><span class="nx">modules</span><span class="o">:</span><span class="p">{}}</span><span class="o">,</span>
- <span class="nx">_loaderObj</span> <span class="o">=</span> <span class="kc">null</span><span class="o">,</span>
- <span class="nx">_loaderQueue</span> <span class="o">=</span> <span class="p">[];</span>
-
- <span class="c">/**</span>
-<span class="c"> * YAHOO_bootstrap function. If YAHOO_bootstrap is already defined, the</span>
-<span class="c"> * existing YAHOO_bootstrap function will not be overwritten to preserve</span>
-<span class="c"> * the state of the bootstrap.</span>
-<span class="c"> *</span>
-<span class="c"> * @class YAHOO_bootstrap</span>
-<span class="c"> * @static</span>
-<span class="c"> * @global</span>
-<span class="c"> * @param o Optional configuration object. Options:</span>
-<span class="c"> * &lt;ul&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;Global:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;debug: Turn debug statements on or off&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;injected: set to true if the yui seed file was dynamically loaded in</span>
-<span class="c"> * order to bootstrap components relying on the window load event and onDOMReady</span>
-<span class="c"> * (former injecting on YAHOO_config).&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;locale: default locale&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;For loader:&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;-------------------------------------------------------------------------&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;base: The base dir&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;root: The root path to prepend to module names for the combo service. Ex\\: 2\\.5\\.2\\/build\\/&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filter:</span>
-<span class="c"> * </span>
-<span class="c"> * A filter to apply to result urls. This filter will modify the default</span>
-<span class="c"> * path for all modules. The default path for the YUI library is the</span>
-<span class="c"> * minified version of the files (e.g., event-min.js). The filter property</span>
-<span class="c"> * can be a predefined filter or a custom filter. The valid predefined </span>
-<span class="c"> * filters are:</span>
-<span class="c"> * &lt;dl&gt;</span>
-<span class="c"> * &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
-<span class="c"> * This option will automatically include the Logger widget&lt;/dd&gt;</span>
-<span class="c"> * &lt;dt&gt;RAW&lt;/dt&gt;</span>
-<span class="c"> * &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
-<span class="c"> * &lt;/dl&gt;</span>
-<span class="c"> * You can also define a custom filter, which must be an object literal </span>
-<span class="c"> * containing a search expression and a replace string:</span>
-<span class="c"> * &lt;pre&gt;</span>
-<span class="c"> * myFilter: &amp;#123; </span>
-<span class="c"> * &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
-<span class="c"> * &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
-<span class="c"> * &amp;#125;</span>
-<span class="c"> * &lt;/pre&gt;</span>
-<span class="c"> *</span>
-<span class="c"> * &lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;filters: per-component filter specification. If specified for a given component, this overrides the filter config&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;combine:</span>
-<span class="c"> * Use the YUI combo service to reduce the number of http connections required to load your dependencies&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;ignore:</span>
-<span class="c"> * A list of modules that should never be dynamically loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;force:</span>
-<span class="c"> * A list of modules that should always be loaded when required, even if already present on the page&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;insertBefore:</span>
-<span class="c"> * Node or id for a node that should be used as the insertion point for new nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;charset:</span>
-<span class="c"> * charset for dynamic nodes&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;timeout:</span>
-<span class="c"> * number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onSuccess:</span>
-<span class="c"> * callback for the &#39;success&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onFailure:</span>
-<span class="c"> * callback for the &#39;failure&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onTimeout:</span>
-<span class="c"> * callback for the &#39;timeout&#39; event&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;onProgress:</span>
-<span class="c"> * callback executed each time a script or css file is loaded&lt;/li&gt;</span>
-<span class="c"> * &lt;li&gt;modules:</span>
-<span class="c"> * A list of module definitions. See Loader.addModule for the supported module metadata&lt;/li&gt;</span>
-<span class="c"> * &lt;/ul&gt;</span>
-<span class="c"> * </span>
-<span class="c"> * Also, we can pass a custom argument thru &quot;o&quot; to customize</span>
-<span class="c"> * the file that should be injected to define the YUI Loader Utility. This feature allow us to</span>
-<span class="c"> * define a custom COMBO url to load a default set of components including loader in a single entry.</span>
-<span class="c"> * </span>
-<span class="c"> * @param boolean def if true, &quot;o&quot; will be used as the default configuration object for succesive </span>
-<span class="c"> * calls without the &quot;o&quot; argument.</span>
-<span class="c"> * </span>
-<span class="c"> */</span>
-
- <span class="c">/**</span>
-<span class="c"> * Dispatch the first element from the job queue </span>
-<span class="c"> * @method _loaderDispatch</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_loaderDispatch</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">c</span><span class="o">;</span>
- <span class="k">if</span> <span class="p">((</span><span class="nx">c</span> <span class="o">=</span> <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">shift</span><span class="p">()))</span> <span class="p">{</span>
- <span class="nx">c</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Include YUI Loader in the the page, and wait until it get available to start dispatching jobs</span>
-<span class="c"> * from the queue</span>
-<span class="c"> * @method _includeLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_includeLoader</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">base</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">base</span> <span class="o">||</span> <span class="s1">&#39;http://yui.yahooapis.com/2.7.0/build/&#39;</span><span class="o">,</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="nx">_config</span><span class="p">.</span><span class="nx">seed</span> <span class="o">||</span> <span class="s1">&#39;yuiloader/yuiloader-min.js&#39;</span><span class="o">;</span>
- <span class="c">// analyzing the seed</span>
- <span class="nx">seed</span> <span class="o">=</span> <span class="p">(</span><span class="nx">seed</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;http&#39;</span><span class="p">)</span><span class="o">===</span><span class="mi">0</span><span class="o">?</span><span class="nx">seed</span><span class="o">:</span><span class="nx">base</span><span class="o">+</span><span class="nx">seed</span><span class="p">);</span>
- <span class="c">// Encapsulation Pattern: Conjuring YUI from thin air (by Chris Heilmann)</span>
- <span class="c">// more info: http://www.wait-till-i.com/2008/08/02/conjuring-yui-from-thin-air/</span>
- <span class="nx">YAHOO_config</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
- <span class="c">/* injecting the YUI Loader in the current page */</span>
- <span class="kd">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">&#39;script&#39;</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;type&#39;</span><span class="o">,</span> <span class="s1">&#39;text/javascript&#39;</span><span class="p">);</span>
- <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;src&#39;</span><span class="o">,</span> <span class="nx">seed</span><span class="p">);</span>
- <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;head&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">// true if the library should be dynamically loaded after window.onload.</span>
- <span class="nx">injecting</span><span class="o">:</span> <span class="o">!!</span><span class="nx">_config</span><span class="p">.</span><span class="nx">injected</span><span class="o">,</span>
- <span class="nx">listener</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// waiting for the loader component</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">name</span> <span class="o">===</span> <span class="s1">&#39;get&#39;</span><span class="p">)</span> <span class="p">{</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="nx">_loaderDispatch</span><span class="o">,</span> <span class="mi">1</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">}();</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Add a set of modules to _loaderObj, it also normalize the module information before include it</span>
-<span class="c"> * @method _addMods</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @param {object} m collection of modules</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_addMods</span> <span class="p">(</span><span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">;</span>
- <span class="c">// adding modules to the loader </span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">m</span> <span class="o">===</span> <span class="s1">&#39;object&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">name</span> <span class="o">||</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">type</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">type</span> <span class="o">||</span> <span class="p">((</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">fullpath</span><span class="o">||</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">path</span><span class="p">).</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;.css&#39;</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">0</span><span class="o">?</span><span class="s1">&#39;css&#39;</span><span class="o">:</span><span class="s1">&#39;js&#39;</span><span class="p">);</span>
- <span class="c">//console.log (&#39;Adding a default module: &#39;, m[i].name, m[i]);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">addModule</span> <span class="p">(</span><span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Initialization process for the YUI Loader obj. In YUI 2.x we should</span>
-<span class="c"> * have a single instance to control everything.</span>
-<span class="c"> * @method _initLoader</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_initLoader</span> <span class="p">(</span><span class="nx">l</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">m</span><span class="o">;</span>
-
- <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_loaderObj</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">/* creating the loader object for this region */</span>
- <span class="nx">l</span> <span class="o">=</span> <span class="nx">l</span> <span class="o">||</span> <span class="p">{};</span>
- <span class="nx">l</span><span class="p">.</span><span class="nx">combine</span> <span class="o">=</span> <span class="p">(</span><span class="nx">l</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s1">&#39;combine&#39;</span><span class="p">)</span><span class="o">?</span><span class="nx">l</span><span class="p">.</span><span class="nx">combine</span><span class="o">:</span><span class="kc">true</span><span class="p">);</span> <span class="c">/* using the Combo Handle */</span>
- <span class="nx">l</span><span class="p">.</span><span class="nx">filter</span> <span class="o">=</span> <span class="nx">l</span><span class="p">.</span><span class="nx">filter</span> <span class="o">||</span> <span class="s1">&#39;min&#39;</span><span class="o">;</span> <span class="c">/* you can switch between YUI branch */</span>
-
- <span class="c">// more config here ...</span>
-
- <span class="nx">_loaderObj</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="p">.</span><span class="nx">util</span><span class="p">.</span><span class="nx">YUILoader</span><span class="p">(</span><span class="nx">l</span><span class="p">);</span>
- <span class="nx">_addMods</span><span class="p">(</span><span class="nx">l</span><span class="p">.</span><span class="nx">modules</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="c">// probably more configurations here</span>
- <span class="p">}</span>
-
- <span class="c">/**</span>
-<span class="c"> * Verify if the current configuration object just defines new modules. If that&#39;s the case, </span>
-<span class="c"> * we will use &quot;_config&quot; as the computed configuration, and &quot;o&quot; as the list of modules to add.</span>
-<span class="c"> * @method _getConf</span>
-<span class="c"> * @param o currrent configuration object</span>
-<span class="c"> * @private</span>
-<span class="c"> * @static</span>
-<span class="c"> * @return object computed configuration</span>
-<span class="c"> */</span>
- <span class="kd">function</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span><span class="o">||</span><span class="p">{};</span>
- <span class="kd">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">o</span><span class="p">.</span><span class="nx">modules</span> <span class="o">||</span> <span class="p">{}</span><span class="o">,</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">true</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">o</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">i</span> <span class="o">!=</span> <span class="s1">&#39;modules&#39;</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">flag</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="c">// using _config and injecting more modules</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">flag</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">m</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">m</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">))</span> <span class="p">{</span>
- <span class="nx">_config</span><span class="p">.</span><span class="nx">modules</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="nx">m</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderObj</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">_addMods</span><span class="p">(</span><span class="nx">m</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_config</span><span class="o">;</span>
- <span class="p">}</span>
- <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
- <span class="p">}</span>
-
- <span class="nx">YAHOO_bootstrap</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">def</span><span class="p">)</span> <span class="p">{</span>
- <span class="c">// analyzing &quot;o&quot;</span>
- <span class="nx">o</span> <span class="o">=</span> <span class="nx">_getConf</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="c">// if def is true, o will be used as the default config from now on </span>
- <span class="nx">_config</span> <span class="o">=</span> <span class="p">(</span><span class="nx">def</span><span class="o">?</span><span class="nx">o</span><span class="o">:</span><span class="nx">_config</span><span class="p">);</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="c">/**</span>
-<span class="c"> * Load a set of modules and notify thru the callback method.</span>
-<span class="c"> * @param modules* {string} 1-n modules to bind (uses arguments array)</span>
-<span class="c"> * @param *callback {function} callback function executed when </span>
-<span class="c"> * the instance has the required functionality. If included, it</span>
-<span class="c"> * must be the last parameter.</span>
-<span class="c"> *</span>
-<span class="c"> * YAHOO_bootstrap().use(&#39;tabview&#39;, callback)</span>
-<span class="c"> *</span>
-<span class="c"> * @return void</span>
-<span class="c"> */</span>
- <span class="nx">use</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">a</span><span class="o">=</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">arguments</span><span class="o">,</span> <span class="mi">0</span><span class="p">)</span><span class="o">,</span>
- <span class="nx">callback</span> <span class="o">=</span> <span class="nx">a</span><span class="p">.</span><span class="nx">pop</span> <span class="p">();</span>
- <span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">push</span> <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">i</span><span class="o">;</span>
- <span class="nx">_initLoader</span><span class="p">(</span><span class="nx">o</span><span class="p">);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">require</span><span class="p">(</span><span class="nx">a</span><span class="p">);</span>
- <span class="nx">_loaderObj</span><span class="p">.</span><span class="nx">insert</span><span class="p">({</span>
- <span class="nx">onSuccess</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="nx">callback</span><span class="p">.</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onSuccess</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span><span class="o">,</span>
- <span class="nx">onFailure</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onFailure</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span><span class="o">,</span>
- <span class="nx">onTimeout</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
- <span class="nx">_loaderDispatch</span><span class="p">();</span>
- <span class="p">(</span><span class="nx">o</span><span class="p">.</span><span class="nx">onTimeout</span> <span class="o">||</span> <span class="kd">function</span><span class="p">(){}).</span><span class="nx">call</span><span class="p">();</span>
- <span class="p">}</span>
- <span class="p">}</span><span class="o">,</span> <span class="nx">o</span><span class="p">.</span><span class="nx">type</span><span class="p">);</span>
- <span class="p">});</span>
- <span class="c">// verifying if the loader is ready in the page, if not, it will be </span>
- <span class="c">// included automatically and then the process will continue.</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">_loaderQueue</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
- <span class="p">((</span><span class="k">typeof</span> <span class="nx">YAHOO</span> <span class="o">==</span> <span class="s2">&quot;undefined&quot;</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YAHOO</span><span class="p">)</span><span class="o">?</span><span class="nx">_includeLoader</span><span class="p">()</span><span class="o">:</span><span class="nx">_loaderDispatch</span><span class="p">());</span>
- <span class="p">}</span>
- <span class="p">}</span>
- <span class="p">};</span>
- <span class="p">};</span>
-
-<span class="p">})();</span>
-</pre></div>
- </div>
- </div>
- </div>
- <div class="yui-b">
- <div class="nav">
-
- <div id="moduleList" class="module">
- <h4>Modules</h4>
- <ul class="content">
- <li class="selected"><a href="module_bootstrap.html" title="bootstrap">bootstrap</a></li>
- </ul>
- </div>
-
- <div id="classList" class="module">
- <h4>Classes</h4>
- <ul class="content">
- <li class=""><a href="YAHOO_bootstrap.html" title="YAHOO_bootstrap">YAHOO_bootstrap</a></li>
- <li class=""><a href="YAHOO_bootstrap.html" title="YAHOO_bootstrap">YAHOO_bootstrap</a></li>
- <li class=""><a href="YAHOO_bootstrap.html" title="YAHOO_bootstrap">YAHOO_bootstrap</a></li>
- <li class=""><a href="YAHOO_bootstrap.html" title="YAHOO_bootstrap">YAHOO_bootstrap</a></li>
- <li class=""><a href="YAHOO_bootstrap.html" title="YAHOO_bootstrap">YAHOO_bootstrap</a></li>
- <li class=""><a href="YUI_bootstrap.html" title="YUI_bootstrap">YUI_bootstrap</a></li>
- <li class=""><a href="YUI_bootstrap.html" title="YUI_bootstrap">YUI_bootstrap</a></li>
- <li class=""><a href="YUI_bootstrap.html" title="YUI_bootstrap">YUI_bootstrap</a></li>
- <li class=""><a href="YUI_bootstrap.html" title="YUI_bootstrap">YUI_bootstrap</a></li>
- <li class=""><a href="YUI_bootstrap.html" title="YUI_bootstrap">YUI_bootstrap</a></li>
- </ul>
- </div>
-
- <div id="fileList" class="module">
- <h4>Files</h4>
- <ul class="content">
- <li class="selected"><a href="bootstrap-debug.js.html" title="bootstrap-debug.js">bootstrap-debug.js</a></li>
- <li class=""><a href="bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker bootstrap.js.html" title="bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker bootstrap.js">bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker bootstrap.js</a></li>
- <li class=""><a href="yahoo_bootstrap-debug.js.html" title="yahoo_bootstrap-debug.js">yahoo_bootstrap-debug.js</a></li>
- <li class=""><a href="yahoo_bootstrap-min.js
-/(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker yahoo_bootstrap.js.html" title="yahoo_bootstrap-min.js
-/(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker yahoo_bootstrap.js">yahoo_bootstrap-min.js
-/(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
-/** @filemarker yahoo_bootstrap.js</a></li>
- <li class=""><a href="yahoo_bootstrap.js.html" title="yahoo_bootstrap.js">yahoo_bootstrap.js</a></li>
- <li class=""><a href="yui_bootstrap-debug.js.html" title="yui_bootstrap-debug.js">yui_bootstrap-debug.js</a></li>
- <li class=""><a href="yui_bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();
-/** @filemarker yui_bootstrap.js.html" title="yui_bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();
-/** @filemarker yui_bootstrap.js">yui_bootstrap-min.js
-/(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();
-/** @filemarker yui_bootstrap.js</a></li>
- <li class=""><a href="yui_bootstrap.js.html" title="yui_bootstrap.js">yui_bootstrap.js</a></li>
- </ul>
- </div>
-
-
-
-
-
- </div>
- </div>
- </div>
- <div id="ft">
- <hr />
- Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
- </div>
-</div>
-<script type="text/javascript">
- ALL_YUI_PROPS = [{"url": "YUI_bootstrap.html#method_use", "access": "", "host": "YUI_bootstrap", "type": "method", "name": "use"}, {"url": "YAHOO_bootstrap.html#method_use", "access": "", "host": "YAHOO_bootstrap", "type": "method", "name": "use"}, {"url": "YUI_bootstrap.html#method_use", "access": "", "host": "YUI_bootstrap", "type": "method", "name": "use"}, {"url": "YAHOO_bootstrap.html#method_use", "access": "", "host": "YAHOO_bootstrap", "type": "method", "name": "use"}, {"url": "YAHOO_bootstrap.html#method_use", "access": "", "host": "YAHOO_bootstrap", "type": "method", "name": "use"}, {"url": "YAHOO_bootstrap.html#method_use", "access": "", "host": "YAHOO_bootstrap", "type": "method", "name": "use"}, {"url": "YUI_bootstrap.html#method_use", "access": "", "host": "YUI_bootstrap", "type": "method", "name": "use"}, {"url": "YUI_bootstrap.html#method_use", "access": "", "host": "YUI_bootstrap", "type": "method", "name": "use"}, {"url": "YAHOO_bootstrap.html#method_use", "access": "", "host": "YAHOO_bootstrap", "type": "method", "name": "use"}, {"url": "YUI_bootstrap.html#method_use", "access": "", "host": "YUI_bootstrap", "type": "method", "name": "use"}];
-</script>
-</body>
-</html>
View
1  api/bootstrap-min.js
@@ -1 +0,0 @@
-(function(){var E={modules:{}},A=[];function D(){var F;if((F=A.shift())){F.call();}}function B(){var I=E.base||"http://yui.yahooapis.com/3.0.0pr2/build/",F=E.seed||"yui/yui-min.js",H=document.createElement("script"),G=function(){if((typeof YUI==="undefined")||!YUI||YUI.Loader){window.setTimeout(G,50);}else{window.setTimeout(D,1);}};H.setAttribute("type","text/javascript");F=(F.indexOf("http")===0?F:I+F);H.setAttribute("src",F);document.getElementsByTagName("head")[0].appendChild(H);G();}function C(I){I=I||{};var F=I.modules||{},G=true,H;for(H in I){if(I.hasOwnProperty(H)&&(H!="modules")){G=false;}}if(G){for(H in F){if(F.hasOwnProperty(H)){E.modules[H]=F[H];}}I=E;}return I;}YUI_bootstrap=function(G,F){G=C(G);E=(F?G:E);return{use:function(){var H=Array.prototype.slice.call(arguments,0);A.push(function(){var I,L={};for(I in G){if(G.hasOwnProperty(I)){L[I]=G[I];}}var K=YUI(L),J;K.use.apply(K,H);D();});if(A.length===1){((typeof YUI==="undefined"||!YUI)?B():D());}}};};})();(function(){var F={modules:{}},H=null,A=[];function E(){var I;if((I=A.shift())){I.call();}}function B(){var J=F.base||"http://yui.yahooapis.com/2.7.0/build/",I=F.seed||"yuiloader/yuiloader-min.js";I=(I.indexOf("http")===0?I:J+I);YAHOO_config=function(){var K=document.createElement("script");K.setAttribute("type","text/javascript");K.setAttribute("src",I);document.getElementsByTagName("head")[0].appendChild(K);return{injecting:!!F.injected,listener:function(L){if(L.name==="get"){window.setTimeout(E,1);}}};}();}function D(I){var J;if(I&&(typeof I==="object")){for(J in I){if(I.hasOwnProperty(J)){I[J].name=I[J].name||J;I[J].type=I[J].type||((I[J].fullpath||I[J].path).indexOf(".css")>=0?"css":"js");H.addModule(I[J]);}}}}function G(J){var K,I;if(!H){J=J||{};J.combine=(J.hasOwnProperty("combine")?J.combine:true);J.filter=J.filter||"min";H=new YAHOO.util.YUILoader(J);D(J.modules);}}function C(L){L=L||{};var I=L.modules||{},J=true,K;for(K in L){if(L.hasOwnProperty(K)&&(K!="modules")){J=false;}}if(J){for(K in I){if(I.hasOwnProperty(K)){F.modules[K]=I[K];}}if(H){D(I);}L=F;}return L;}YAHOO_bootstrap=function(J,I){J=C(J);F=(I?J:F);return{use:function(){var K=Array.prototype.slice.call(arguments,0),L=K.pop();A.push(function(){var M;G(J);H.require(K);H.insert({onSuccess:function(){E();L.call();(J.onSuccess||function(){}).call();},onFailure:function(){E();(J.onFailure||function(){}).call();},onTimeout:function(){E();(J.onTimeout||function(){}).call();}},J.type);});if(A.length===1){((typeof YAHOO=="undefined"||!YAHOO)?B():E());}}};};})();
View
2  api/bootstrap-min.js.highlighted
@@ -1,2 +0,0 @@
-<div class="highlight"><pre><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="kd">var</span> <span class="nx">E</span><span class="o">=</span><span class="p">{</span><span class="nx">modules</span><span class="o">:</span><span class="p">{}}</span><span class="o">,</span><span class="nx">A</span><span class="o">=</span><span class="p">[];</span><span class="kd">function</span> <span class="nx">D</span><span class="p">(){</span><span class="kd">var</span> <span class="nx">F</span><span class="o">;</span><span class="k">if</span><span class="p">((</span><span class="nx">F</span><span class="o">=</span><span class="nx">A</span><span class="p">.</span><span class="nx">shift</span><span class="p">())){</span><span class="nx">F</span><span class="p">.</span><span class="nx">call</span><span class="p">();}}</span><span class="kd">function</span> <span class="nx">B</span><span class="p">(){</span><span class="kd">var</span> <span class="nx">I</span><span class="o">=</span><span class="nx">E</span><span class="p">.</span><span class="nx">base</span><span class="o">||</span><span class="s2">&quot;http://yui.yahooapis.com/3.0.0pr2/build/&quot;</span><span class="o">,</span><span class="nx">F</span><span class="o">=</span><span class="nx">E</span><span class="p">.</span><span class="nx">seed</span><span class="o">||</span><span class="s2">&quot;yui/yui-min.js&quot;</span><span class="o">,</span><span class="nx">H</span><span class="o">=</span><span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">)</span><span class="o">,</span><span class="nx">G</span><span class="o">=</span><span class="kd">function</span><span class="p">(){</span><span class="k">if</span><span class="p">((</span><span class="k">typeof</span> <span class="nx">YUI</span><span class="o">===</span><span class="s2">&quot;undefined&quot;</span><span class="p">)</span><span class="o">||!</span><span class="nx">YUI</span><span class="o">||</span><span class="nx">YUI</span><span class="p">.</span><span class="nx">Loader</span><span class="p">){</span><span class="nb">window<