From 6846f033a995c183e7451cc15645ac285018decd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20S=CC=8Ckoda?=
For example, attributes added to the host can be configured:
"," *See the addAttr method, for the complete set of configuration"," * options available for attributes.
"," *"," *NOTE: Most implementations will be better off extending the Base class, "," * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration "," * of attributes for derived classes, accounting for values passed into the constructor.
"," *"," * @class Attribute"," * @param attrs {Object} The attributes to add during construction (passed through to addAttrs). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor."," * @param values {Object} The initial attribute values to apply (passed through to addAttrs). These are not merged/cloned. The caller is responsible for isolating user provided values if required."," * @param lazy {boolean} Whether or not to add attributes lazily (passed through to addAttrs)."," * @uses AttributeCore"," * @uses AttributeEvents"," * @uses EventTarget"," * @uses AttributeExtras"," */"," var Attribute = function() {",""," // Fix #2531929 "," // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior."," // Too late in the release cycle to do anything about the core problem."," // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0)."," this._ATTR_E_FACADE = null;"," this._yuievt = null;",""," Y.AttributeCore.apply(this, arguments);"," Y.AttributeEvents.apply(this, arguments);"," Y.AttributeExtras.apply(this, arguments);"," };",""," Y.mix(Attribute, Y.AttributeCore, false, null, 1);"," Y.mix(Attribute, Y.AttributeExtras, false, null, 1);",""," // Needs to be \"true\", to overwrite methods from AttributeCore"," Y.mix(Attribute, Y.AttributeEvents, true, null, 1);",""," /**"," *The value to return from an attribute setter in order to prevent the set from going through.
"," *"," *You can return this value from your setter if you wish to combine validator and setter "," * functionality into a single setter function, which either returns the massaged value to be stored or "," * AttributeCore.INVALID_VALUE to prevent invalid values from being stored.
"," *"," * @property INVALID_VALUE"," * @type Object"," * @static"," * @final"," */"," Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;",""," /**"," * The list of properties which can be configured for "," * each attribute (e.g. setter, getter, writeOnce etc.)."," *"," * This property is used internally as a whitelist for faster"," * Y.mix operations."," *"," * @property _ATTR_CFG"," * @type Array"," * @static"," * @protected"," */"," Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG);",""," Y.Attribute = Attribute;","","}, '3.7.3', {\"requires\": [\"attribute-core\", \"attribute-events\", \"attribute-extras\"]});"]; -_yuitest_coverage["build/attribute-base/attribute-base.js"].lines = {"1":0,"54":0,"60":0,"61":0,"63":0,"64":0,"65":0,"68":0,"69":0,"72":0,"86":0,"100":0,"102":0}; -_yuitest_coverage["build/attribute-base/attribute-base.js"].functions = {"Attribute:54":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/attribute-base/attribute-base.js"].coveredLines = 13; -_yuitest_coverage["build/attribute-base/attribute-base.js"].coveredFunctions = 2; -_yuitest_coverline("build/attribute-base/attribute-base.js", 1); -YUI.add('attribute-base', function (Y, NAME) { - - /** - * The attribute module provides an augmentable Attribute implementation, which - * adds configurable attributes and attribute change events to the class being - * augmented. It also provides a State class, which is used internally by Attribute, - * but can also be used independently to provide a name/property/value data structure to - * store state. - * - * @module attribute - */ - - /** - * The attribute-base submodule provides core attribute handling support, with everything - * aside from complex attribute handling in the provider's constructor. - * - * @module attribute - * @submodule attribute-base - */ - - /** - *- * Attribute provides configurable attribute support along with attribute change events. It is designed to be - * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state, - * along with attribute change events. - *
- *For example, attributes added to the host can be configured:
- *See the addAttr method, for the complete set of configuration - * options available for attributes.
- * - *NOTE: Most implementations will be better off extending the Base class, - * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration - * of attributes for derived classes, accounting for values passed into the constructor.
- * - * @class Attribute - * @param attrs {Object} The attributes to add during construction (passed through to addAttrs). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor. - * @param values {Object} The initial attribute values to apply (passed through to addAttrs). These are not merged/cloned. The caller is responsible for isolating user provided values if required. - * @param lazy {boolean} Whether or not to add attributes lazily (passed through to addAttrs). - * @uses AttributeCore - * @uses AttributeEvents - * @uses EventTarget - * @uses AttributeExtras - */ - _yuitest_coverfunc("build/attribute-base/attribute-base.js", "(anonymous 1)", 1); -_yuitest_coverline("build/attribute-base/attribute-base.js", 54); -var Attribute = function() { - - // Fix #2531929 - // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior. - // Too late in the release cycle to do anything about the core problem. - // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0). - _yuitest_coverfunc("build/attribute-base/attribute-base.js", "Attribute", 54); -_yuitest_coverline("build/attribute-base/attribute-base.js", 60); -this._ATTR_E_FACADE = null; - _yuitest_coverline("build/attribute-base/attribute-base.js", 61); -this._yuievt = null; - - _yuitest_coverline("build/attribute-base/attribute-base.js", 63); -Y.AttributeCore.apply(this, arguments); - _yuitest_coverline("build/attribute-base/attribute-base.js", 64); -Y.AttributeEvents.apply(this, arguments); - _yuitest_coverline("build/attribute-base/attribute-base.js", 65); -Y.AttributeExtras.apply(this, arguments); - }; - - _yuitest_coverline("build/attribute-base/attribute-base.js", 68); -Y.mix(Attribute, Y.AttributeCore, false, null, 1); - _yuitest_coverline("build/attribute-base/attribute-base.js", 69); -Y.mix(Attribute, Y.AttributeExtras, false, null, 1); - - // Needs to be "true", to overwrite methods from AttributeCore - _yuitest_coverline("build/attribute-base/attribute-base.js", 72); -Y.mix(Attribute, Y.AttributeEvents, true, null, 1); - - /** - *The value to return from an attribute setter in order to prevent the set from going through.
- * - *You can return this value from your setter if you wish to combine validator and setter - * functionality into a single setter function, which either returns the massaged value to be stored or - * AttributeCore.INVALID_VALUE to prevent invalid values from being stored.
- * - * @property INVALID_VALUE - * @type Object - * @static - * @final - */ - _yuitest_coverline("build/attribute-base/attribute-base.js", 86); -Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE; - - /** - * The list of properties which can be configured for - * each attribute (e.g. setter, getter, writeOnce etc.). - * - * This property is used internally as a whitelist for faster - * Y.mix operations. - * - * @property _ATTR_CFG - * @type Array - * @static - * @protected - */ - _yuitest_coverline("build/attribute-base/attribute-base.js", 100); -Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG); - - _yuitest_coverline("build/attribute-base/attribute-base.js", 102); -Y.Attribute = Attribute; - -}, '3.7.3', {"requires": ["attribute-core", "attribute-events", "attribute-extras"]}); diff --git a/lib/yuilib/3.7.3/build/attribute-base/attribute-base-min.js b/lib/yuilib/3.7.3/build/attribute-base/attribute-base-min.js deleted file mode 100644 index f02c1755b5e..00000000000 --- a/lib/yuilib/3.7.3/build/attribute-base/attribute-base-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("attribute-base",function(e,t){var n=function(){this._ATTR_E_FACADE=null,this._yuievt=null,e.AttributeCore.apply(this,arguments),e.AttributeEvents.apply(this,arguments),e.AttributeExtras.apply(this,arguments)};e.mix(n,e.AttributeCore,!1,null,1),e.mix(n,e.AttributeExtras,!1,null,1),e.mix(n,e.AttributeEvents,!0,null,1),n.INVALID_VALUE=e.AttributeCore.INVALID_VALUE,n._ATTR_CFG=e.AttributeCore._ATTR_CFG.concat(e.AttributeEvents._ATTR_CFG),e.Attribute=n},"3.7.3",{requires:["attribute-core","attribute-events","attribute-extras"]}); diff --git a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-coverage.js b/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-coverage.js deleted file mode 100644 index ba757495241..00000000000 --- a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-coverage.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -if (typeof _yuitest_coverage == "undefined"){ - _yuitest_coverage = {}; - _yuitest_coverline = function(src, line){ - var coverage = _yuitest_coverage[src]; - if (!coverage.lines[line]){ - coverage.calledLines++; - } - coverage.lines[line]++; - }; - _yuitest_coverfunc = function(src, name, line){ - var coverage = _yuitest_coverage[src], - funcId = name + ":" + line; - if (!coverage.functions[funcId]){ - coverage.calledFunctions++; - } - coverage.functions[funcId]++; - }; -} -_yuitest_coverage["build/attribute-complex/attribute-complex.js"] = { - lines: {}, - functions: {}, - coveredLines: 0, - calledLines: 0, - coveredFunctions: 0, - calledFunctions: 0, - path: "build/attribute-complex/attribute-complex.js", - code: [] -}; -_yuitest_coverage["build/attribute-complex/attribute-complex.js"].code=["YUI.add('attribute-complex', function (Y, NAME) {",""," /**"," * Adds support for attribute providers to handle complex attributes in the constructor"," *"," * @module attribute"," * @submodule attribute-complex"," * @for Attribute"," */",""," var O = Y.Object,"," DOT = \".\";",""," Y.Attribute.Complex = function() {};"," Y.Attribute.Complex.prototype = {",""," /**"," * Utility method to split out simple attribute name/value pairs (\"x\") "," * from complex attribute name/value pairs (\"x.y.z\"), so that complex"," * attributes can be keyed by the top level attribute name."," *"," * @method _normAttrVals"," * @param {Object} valueHash An object with attribute name/value pairs"," *"," * @return {Object} An object literal with 2 properties - \"simple\" and \"complex\","," * containing simple and complex attribute values respectively keyed "," * by the top level attribute name, or null, if valueHash is falsey."," *"," * @private"," */"," _normAttrVals : function(valueHash) {"," var vals = {},"," subvals = {},"," path,"," attr,"," v, k;",""," if (valueHash) {"," for (k in valueHash) {"," if (valueHash.hasOwnProperty(k)) {"," if (k.indexOf(DOT) !== -1) {"," path = k.split(DOT);"," attr = path.shift();"," v = subvals[attr] = subvals[attr] || [];"," v[v.length] = {"," path : path,"," value: valueHash[k]"," };"," } else {"," vals[k] = valueHash[k];"," }"," }"," }"," return { simple:vals, complex:subvals };"," } else {"," return null;"," }"," },",""," /**"," * Returns the initial value of the given attribute from"," * either the default configuration provided, or the "," * over-ridden value if it exists in the set of initValues "," * provided and the attribute is not read-only."," *"," * @param {String} attr The name of the attribute"," * @param {Object} cfg The attribute configuration object"," * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals"," *"," * @return {Any} The initial value of the attribute."," *"," * @method _getAttrInitVal"," * @private"," */"," _getAttrInitVal : function(attr, cfg, initValues) {",""," var val = cfg.value,"," valFn = cfg.valueFn,"," tmpVal,"," initValSet = false,"," simple,"," complex,"," i,"," l,"," path,"," subval,"," subvals;",""," if (!cfg.readOnly && initValues) {"," // Simple Attributes"," simple = initValues.simple;"," if (simple && simple.hasOwnProperty(attr)) {"," val = simple[attr];"," initValSet = true;"," }"," }",""," if (valFn && !initValSet) {"," if (!valFn.call) {"," valFn = this[valFn];"," }"," if (valFn) {"," tmpVal = valFn.call(this, attr);"," val = tmpVal;"," }"," }",""," if (!cfg.readOnly && initValues) {",""," // Complex Attributes (complex values applied, after simple, in case both are set)"," complex = initValues.complex;",""," if (complex && complex.hasOwnProperty(attr) && (val !== undefined) && (val !== null)) {"," subvals = complex[attr];"," for (i = 0, l = subvals.length; i < l; ++i) {"," path = subvals[i].path;"," subval = subvals[i].value;"," O.setValue(val, path, subval);"," }"," }"," }",""," return val;"," }"," };",""," Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1);",""," // Consistency with the rest of the Attribute addons for now. "," Y.AttributeComplex = Y.Attribute.Complex;","","","}, '3.7.3', {\"requires\": [\"attribute-base\"]});"]; -_yuitest_coverage["build/attribute-complex/attribute-complex.js"].lines = {"1":0,"11":0,"14":0,"15":0,"32":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"50":0,"54":0,"56":0,"77":0,"89":0,"91":0,"92":0,"93":0,"94":0,"98":0,"99":0,"100":0,"102":0,"103":0,"104":0,"108":0,"111":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"123":0,"127":0,"130":0}; -_yuitest_coverage["build/attribute-complex/attribute-complex.js"].functions = {"_normAttrVals:31":0,"_getAttrInitVal:75":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredLines = 39; -_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredFunctions = 3; -_yuitest_coverline("build/attribute-complex/attribute-complex.js", 1); -YUI.add('attribute-complex', function (Y, NAME) { - - /** - * Adds support for attribute providers to handle complex attributes in the constructor - * - * @module attribute - * @submodule attribute-complex - * @for Attribute - */ - - _yuitest_coverfunc("build/attribute-complex/attribute-complex.js", "(anonymous 1)", 1); -_yuitest_coverline("build/attribute-complex/attribute-complex.js", 11); -var O = Y.Object, - DOT = "."; - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 14); -Y.Attribute.Complex = function() {}; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 15); -Y.Attribute.Complex.prototype = { - - /** - * Utility method to split out simple attribute name/value pairs ("x") - * from complex attribute name/value pairs ("x.y.z"), so that complex - * attributes can be keyed by the top level attribute name. - * - * @method _normAttrVals - * @param {Object} valueHash An object with attribute name/value pairs - * - * @return {Object} An object literal with 2 properties - "simple" and "complex", - * containing simple and complex attribute values respectively keyed - * by the top level attribute name, or null, if valueHash is falsey. - * - * @private - */ - _normAttrVals : function(valueHash) { - _yuitest_coverfunc("build/attribute-complex/attribute-complex.js", "_normAttrVals", 31); -_yuitest_coverline("build/attribute-complex/attribute-complex.js", 32); -var vals = {}, - subvals = {}, - path, - attr, - v, k; - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 38); -if (valueHash) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 39); -for (k in valueHash) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 40); -if (valueHash.hasOwnProperty(k)) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 41); -if (k.indexOf(DOT) !== -1) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 42); -path = k.split(DOT); - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 43); -attr = path.shift(); - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 44); -v = subvals[attr] = subvals[attr] || []; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 45); -v[v.length] = { - path : path, - value: valueHash[k] - }; - } else { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 50); -vals[k] = valueHash[k]; - } - } - } - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 54); -return { simple:vals, complex:subvals }; - } else { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 56); -return null; - } - }, - - /** - * Returns the initial value of the given attribute from - * either the default configuration provided, or the - * over-ridden value if it exists in the set of initValues - * provided and the attribute is not read-only. - * - * @param {String} attr The name of the attribute - * @param {Object} cfg The attribute configuration object - * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals - * - * @return {Any} The initial value of the attribute. - * - * @method _getAttrInitVal - * @private - */ - _getAttrInitVal : function(attr, cfg, initValues) { - - _yuitest_coverfunc("build/attribute-complex/attribute-complex.js", "_getAttrInitVal", 75); -_yuitest_coverline("build/attribute-complex/attribute-complex.js", 77); -var val = cfg.value, - valFn = cfg.valueFn, - tmpVal, - initValSet = false, - simple, - complex, - i, - l, - path, - subval, - subvals; - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 89); -if (!cfg.readOnly && initValues) { - // Simple Attributes - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 91); -simple = initValues.simple; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 92); -if (simple && simple.hasOwnProperty(attr)) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 93); -val = simple[attr]; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 94); -initValSet = true; - } - } - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 98); -if (valFn && !initValSet) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 99); -if (!valFn.call) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 100); -valFn = this[valFn]; - } - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 102); -if (valFn) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 103); -tmpVal = valFn.call(this, attr); - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 104); -val = tmpVal; - } - } - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 108); -if (!cfg.readOnly && initValues) { - - // Complex Attributes (complex values applied, after simple, in case both are set) - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 111); -complex = initValues.complex; - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 113); -if (complex && complex.hasOwnProperty(attr) && (val !== undefined) && (val !== null)) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 114); -subvals = complex[attr]; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 115); -for (i = 0, l = subvals.length; i < l; ++i) { - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 116); -path = subvals[i].path; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 117); -subval = subvals[i].value; - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 118); -O.setValue(val, path, subval); - } - } - } - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 123); -return val; - } - }; - - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 127); -Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1); - - // Consistency with the rest of the Attribute addons for now. - _yuitest_coverline("build/attribute-complex/attribute-complex.js", 130); -Y.AttributeComplex = Y.Attribute.Complex; - - -}, '3.7.3', {"requires": ["attribute-base"]}); diff --git a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-debug.js b/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-debug.js deleted file mode 100644 index b25be6f42c4..00000000000 --- a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-debug.js +++ /dev/null @@ -1,139 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add('attribute-complex', function (Y, NAME) { - - /** - * Adds support for attribute providers to handle complex attributes in the constructor - * - * @module attribute - * @submodule attribute-complex - * @for Attribute - */ - - var O = Y.Object, - DOT = "."; - - Y.Attribute.Complex = function() {}; - Y.Attribute.Complex.prototype = { - - /** - * Utility method to split out simple attribute name/value pairs ("x") - * from complex attribute name/value pairs ("x.y.z"), so that complex - * attributes can be keyed by the top level attribute name. - * - * @method _normAttrVals - * @param {Object} valueHash An object with attribute name/value pairs - * - * @return {Object} An object literal with 2 properties - "simple" and "complex", - * containing simple and complex attribute values respectively keyed - * by the top level attribute name, or null, if valueHash is falsey. - * - * @private - */ - _normAttrVals : function(valueHash) { - var vals = {}, - subvals = {}, - path, - attr, - v, k; - - if (valueHash) { - for (k in valueHash) { - if (valueHash.hasOwnProperty(k)) { - if (k.indexOf(DOT) !== -1) { - path = k.split(DOT); - attr = path.shift(); - v = subvals[attr] = subvals[attr] || []; - v[v.length] = { - path : path, - value: valueHash[k] - }; - } else { - vals[k] = valueHash[k]; - } - } - } - return { simple:vals, complex:subvals }; - } else { - return null; - } - }, - - /** - * Returns the initial value of the given attribute from - * either the default configuration provided, or the - * over-ridden value if it exists in the set of initValues - * provided and the attribute is not read-only. - * - * @param {String} attr The name of the attribute - * @param {Object} cfg The attribute configuration object - * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals - * - * @return {Any} The initial value of the attribute. - * - * @method _getAttrInitVal - * @private - */ - _getAttrInitVal : function(attr, cfg, initValues) { - - var val = cfg.value, - valFn = cfg.valueFn, - tmpVal, - initValSet = false, - simple, - complex, - i, - l, - path, - subval, - subvals; - - if (!cfg.readOnly && initValues) { - // Simple Attributes - simple = initValues.simple; - if (simple && simple.hasOwnProperty(attr)) { - val = simple[attr]; - initValSet = true; - } - } - - if (valFn && !initValSet) { - if (!valFn.call) { - valFn = this[valFn]; - } - if (valFn) { - tmpVal = valFn.call(this, attr); - val = tmpVal; - } - } - - if (!cfg.readOnly && initValues) { - - // Complex Attributes (complex values applied, after simple, in case both are set) - complex = initValues.complex; - - if (complex && complex.hasOwnProperty(attr) && (val !== undefined) && (val !== null)) { - subvals = complex[attr]; - for (i = 0, l = subvals.length; i < l; ++i) { - path = subvals[i].path; - subval = subvals[i].value; - O.setValue(val, path, subval); - } - } - } - - return val; - } - }; - - Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1); - - // Consistency with the rest of the Attribute addons for now. - Y.AttributeComplex = Y.Attribute.Complex; - - -}, '3.7.3', {"requires": ["attribute-base"]}); diff --git a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-min.js b/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-min.js deleted file mode 100644 index e8b036679e9..00000000000 --- a/lib/yuilib/3.7.3/build/attribute-complex/attribute-complex-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("attribute-complex",function(e,t){var n=e.Object,r=".";e.Attribute.Complex=function(){},e.Attribute.Complex.prototype={_normAttrVals:function(e){var t={},n={},i,s,o,u;if(e){for(u in e)e.hasOwnProperty(u)&&(u.indexOf(r)!==-1?(i=u.split(r),s=i.shift(),o=n[s]=n[s]||[],o[o.length]={path:i,value:e[u]}):t[u]=e[u]);return{simple:t,complex:n}}return null},_getAttrInitVal:function(e,t,r){var i=t.value,s=t.valueFn,o,u=!1,a,f,l,c,h,p,d;!t.readOnly&&r&&(a=r.simple,a&&a.hasOwnProperty(e)&&(i=a[e],u=!0)),s&&!u&&(s.call||(s=this[s]),s&&(o=s.call(this,e),i=o));if(!t.readOnly&&r){f=r.complex;if(f&&f.hasOwnProperty(e)&&i!==undefined&&i!==null){d=f[e];for(l=0,c=d.length;lset("x.y.z", 5)).
- *
- * @param {Any} value The value to set the attribute to.
- *
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event. This
- * can be used as a flexible way to identify the source of a call to set, allowing
- * the developer to distinguish between set called internally by the host, vs.
- * set called externally by the application developer.
- *
- * @return {Object} A reference to the host object.
- */
- set : function(name, val, opts) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "set", 63);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 64);
-return this._setAttr(name, val, opts);
- },
-
- /**
- * Allows setting of readOnly/writeOnce attributes. See set for argument details.
- *
- * @method _set
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @param {Any} val The value to set the attribute to.
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event.
- * @return {Object} A reference to the host object.
- */
- _set : function(name, val, opts) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "_set", 80);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 81);
-return this._setAttr(name, val, opts, true);
- },
-
- /**
- * Sets multiple attribute values.
- *
- * @method setAttrs
- * @param {Object} attrs An object with attributes name/value pairs.
- * @param {Object} opts Properties to mix into the event payload. These are shared and mixed into each set
- * @return {Object} A reference to the host object.
- * @chainable
- */
- setAttrs : function(attrs, opts) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "setAttrs", 93);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 94);
-return this._setAttrs(attrs, opts);
- },
-
- /**
- * Implementation behind the public setAttrs method, to set multiple attribute values.
- *
- * @method _setAttrs
- * @protected
- * @param {Object} attrs An object with attributes name/value pairs.
- * @param {Object} opts Properties to mix into the event payload. These are shared and mixed into each set
- * @return {Object} A reference to the host object.
- * @chainable
- */
- _setAttrs : function(attrs, opts) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "_setAttrs", 107);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 108);
-var attr;
- _yuitest_coverline("build/attribute-events/attribute-events.js", 109);
-for (attr in attrs) {
- _yuitest_coverline("build/attribute-events/attribute-events.js", 110);
-if ( attrs.hasOwnProperty(attr) ) {
- _yuitest_coverline("build/attribute-events/attribute-events.js", 111);
-this.set(attr, attrs[attr], opts);
- }
- }
- _yuitest_coverline("build/attribute-events/attribute-events.js", 114);
-return this;
- },
-
- /**
- * Utility method to help setup the event payload and fire the attribute change event.
- *
- * @method _fireAttrChange
- * @private
- * @param {String} attrName The name of the attribute
- * @param {String} subAttrName The full path of the property being changed,
- * if this is a sub-attribute value being change. Otherwise null.
- * @param {Any} currVal The current value of the attribute
- * @param {Any} newVal The new value of the attribute
- * @param {Object} opts Any additional event data to mix into the attribute change event's event facade.
- */
- _fireAttrChange : function(attrName, subAttrName, currVal, newVal, opts) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "_fireAttrChange", 129);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 130);
-var host = this,
- eventName = attrName + CHANGE,
- state = host._state,
- facade,
- broadcast,
- evtCfg;
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 137);
-if (!state.get(attrName, PUBLISHED)) {
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 139);
-evtCfg = {
- queuable:false,
- defaultTargetOnly: true,
- defaultFn:host._defAttrChangeFn,
- silent:true
- };
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 146);
-broadcast = state.get(attrName, BROADCAST);
- _yuitest_coverline("build/attribute-events/attribute-events.js", 147);
-if (broadcast !== undefined) {
- _yuitest_coverline("build/attribute-events/attribute-events.js", 148);
-evtCfg.broadcast = broadcast;
- }
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 151);
-host.publish(eventName, evtCfg);
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 153);
-state.add(attrName, PUBLISHED, true);
- }
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 156);
-facade = (opts) ? Y.merge(opts) : host._ATTR_E_FACADE;
-
- // Not using the single object signature for fire({type:..., newVal:...}), since
- // we don't want to override type. Changed to the fire(type, {newVal:...}) signature.
-
- // facade.type = eventName;
- _yuitest_coverline("build/attribute-events/attribute-events.js", 162);
-facade.attrName = attrName;
- _yuitest_coverline("build/attribute-events/attribute-events.js", 163);
-facade.subAttrName = subAttrName;
- _yuitest_coverline("build/attribute-events/attribute-events.js", 164);
-facade.prevVal = currVal;
- _yuitest_coverline("build/attribute-events/attribute-events.js", 165);
-facade.newVal = newVal;
-
- // host.fire(facade);
- _yuitest_coverline("build/attribute-events/attribute-events.js", 168);
-host.fire(eventName, facade);
- },
-
- /**
- * Default function for attribute change events.
- *
- * @private
- * @method _defAttrChangeFn
- * @param {EventFacade} e The event object for attribute change events.
- */
- _defAttrChangeFn : function(e) {
- _yuitest_coverfunc("build/attribute-events/attribute-events.js", "_defAttrChangeFn", 178);
-_yuitest_coverline("build/attribute-events/attribute-events.js", 179);
-if (!this._setAttrVal(e.attrName, e.subAttrName, e.prevVal, e.newVal)) {
- // Prevent "after" listeners from being invoked since nothing changed.
- _yuitest_coverline("build/attribute-events/attribute-events.js", 181);
-e.stopImmediatePropagation();
- } else {
- _yuitest_coverline("build/attribute-events/attribute-events.js", 183);
-e.newVal = this.get(e.attrName);
- }
- }
- };
-
- // Basic prototype augment - no lazy constructor invocation.
- _yuitest_coverline("build/attribute-events/attribute-events.js", 189);
-Y.mix(AttributeEvents, EventTarget, false, null, 1);
-
- _yuitest_coverline("build/attribute-events/attribute-events.js", 191);
-Y.AttributeEvents = AttributeEvents;
-
-
-}, '3.7.3', {"requires": ["event-custom"]});
diff --git a/lib/yuilib/3.7.3/build/attribute-events/attribute-events-min.js b/lib/yuilib/3.7.3/build/attribute-events/attribute-events-min.js
deleted file mode 100644
index 916bd7856b7..00000000000
--- a/lib/yuilib/3.7.3/build/attribute-events/attribute-events-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("attribute-events",function(e,t){function o(){this._ATTR_E_FACADE={},n.call(this,{emitFacade:!0})}var n=e.EventTarget,r="Change",i="broadcast",s="published";o._ATTR_CFG=[i],o.prototype={set:function(e,t,n){return this._setAttr(e,t,n)},_set:function(e,t,n){return this._setAttr(e,t,n,!0)},setAttrs:function(e,t){return this._setAttrs(e,t)},_setAttrs:function(e,t){var n;for(n in e)e.hasOwnProperty(n)&&this.set(n,e[n],t);return this},_fireAttrChange:function(t,n,o,u,a){var f=this,l=t+r,c=f._state,h,p,d;c.get(t,s)||(d={queuable:!1,defaultTargetOnly:!0,defaultFn:f._defAttrChangeFn,silent:!0},p=c.get(t,i),p!==undefined&&(d.broadcast=p),f.publish(l,d),c.add(t,s,!0)),h=a?e.merge(a):f._ATTR_E_FACADE,h.attrName=t,h.subAttrName=n,h.prevVal=o,h.newVal=u,f.fire(l,h)},_defAttrChangeFn:function(e){this._setAttrVal(e.attrName,e.subAttrName,e.prevVal,e.newVal)?e.newVal=this.get(e.attrName):e.stopImmediatePropagation()}},e.mix(o,n,!1,null,1),e.AttributeEvents=o},"3.7.3",{requires:["event-custom"]});
diff --git a/lib/yuilib/3.7.3/build/base-base/base-base-coverage.js b/lib/yuilib/3.7.3/build/base-base/base-base-coverage.js
deleted file mode 100644
index a06ecbb5f07..00000000000
--- a/lib/yuilib/3.7.3/build/base-base/base-base-coverage.js
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
-}
-_yuitest_coverage["build/base-base/base-base.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/base-base/base-base.js",
- code: []
-};
-_yuitest_coverage["build/base-base/base-base.js"].code=["YUI.add('base-base', function (Y, NAME) {",""," /**"," * The base module provides the Base class, which objects requiring attribute and custom event support can extend. "," * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides "," * plugin support and also provides the BaseCore.build method which provides a way to build custom classes using extensions."," *"," * @module base"," */",""," /**"," * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, "," * and without the extension support provided by BaseCore.build."," *"," * @module base"," * @submodule base-base"," */",""," /**"," * The base module provides the Base class, which objects requiring attribute and custom event support can extend. "," * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides "," * plugin support and also provides the Base.build method which provides a way to build custom classes using extensions."," *"," * @module base"," */",""," /**"," * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, "," * and without the extension support provided by Base.build."," *"," * @module base"," * @submodule base-base"," */"," var L = Y.Lang,",""," DESTROY = \"destroy\","," INIT = \"init\",",""," BUBBLETARGETS = \"bubbleTargets\","," _BUBBLETARGETS = \"_bubbleTargets\",",""," BaseCore = Y.BaseCore,"," AttributeCore = Y.AttributeCore,"," Attribute = Y.Attribute;",""," /**"," * "," * A base class which objects requiring attributes and custom event support can "," * extend. Base also handles the chaining of initializer and destructor methods across "," * the hierarchy as part of object construction and destruction. Additionally, attributes configured "," * through the static ATTRS property for each class "," * in the hierarchy will be initialized by Base."," *
"," *"," *"," * The static NAME property of each class extending "," * from Base will be used as the identifier for the class, and is used by Base to prefix "," * all events fired by instances of that class."," *
"," *"," * @class Base"," * @constructor"," * @uses BaseCore"," * @uses Attribute"," * @uses AttributeCore"," * @uses AttributeEvents"," * @uses AttributeExtras"," * @uses EventTarget"," *"," * @param {Object} config Object with configuration property name/value pairs. The object can be "," * used to provide default values for the objects published attributes."," *"," *"," * The config object can also contain the following non-attribute properties, providing a convenient "," * way to configure events listeners and plugins for the instance, as part of the constructor call:"," *
"," *"," *"," * The string to be used to identify instances of "," * this class, for example in prefixing events."," *
"," *"," * Classes extending Base, should define their own"," * static NAME property, which should be camelCase by"," * convention (e.g. MyClass.NAME = \"myClass\";)."," *
"," * @property NAME"," * @type String"," * @static"," */"," Base.NAME = \"base\";",""," /**"," * The default set of attributes which will be available for instances of this class, and "," * their configuration. In addition to the configuration properties listed by "," * Attribute's addAttr method, the attribute "," * can also be configured with a \"cloneDefaultValue\" property, which defines how the statically"," * defined value field should be protected (\"shallow\", \"deep\" and false are supported values). "," *"," * By default if the value is an object literal or an array it will be \"shallow\" cloned, to "," * protect the default value."," *"," * @property ATTRS"," * @type Object"," * @static"," */"," Base.ATTRS = AttributeCore.prototype._protectAttrs(BaseCore.ATTRS);",""," Base.prototype = {",""," /**"," * Internal construction logic for Base."," *"," * @method _initBase"," * @param {Object} config The constructor configuration object"," * @private"," */"," _initBase: function(cfg) {",""," this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME;",""," Y.BaseCore.prototype._initBase.call(this, cfg);"," },",""," /**"," * Initializes Attribute "," * "," * @method _initAttribute"," * @private"," */"," _initAttribute: function(cfg) {"," Attribute.call(this);"," this._yuievt.config.prefix = this._eventPrefix;"," },",""," /**"," * Utility method to define the attribute hash used to filter/whitelist property mixes for "," * this class. "," * "," * @method _attrCfgHash"," * @private"," */"," _attrCfgHash: function() {"," return Base._ATTR_CFG_HASH;"," },",""," /**"," * Init lifecycle method, invoked during construction."," * Fires the init event prior to setting up attributes and "," * invoking initializers for the class hierarchy."," *"," * @method init"," * @chainable"," * @param {Object} config Object with configuration property name/value pairs"," * @return {Base} A reference to this object"," */"," init: function(config) {"," /**"," *"," * Lifecycle event for the init phase, fired prior to initialization. "," * Invoking the preventDefault() method on the event object provided "," * to subscribers will prevent initialization from occuring."," *
"," *"," * Subscribers to the \"after\" momemt of this event, will be notified"," * after initialization of the object is complete (and therefore"," * cannot prevent initialization)."," *
"," *"," * @event init"," * @preventable _defInitFn"," * @param {EventFacade} e Event object, with a cfg property which "," * refers to the configuration object passed to the constructor."," */"," this.publish(INIT, {"," queuable:false,"," fireOnce:true,"," defaultTargetOnly:true,"," defaultFn:this._defInitFn"," });",""," this._preInitEventCfg(config);",""," this.fire(INIT, {cfg: config});",""," return this;"," },",""," /**"," * Handles the special on, after and target properties which allow the user to"," * easily configure on and after listeners as well as bubble targets during "," * construction, prior to init."," *"," * @private"," * @method _preInitEventCfg"," * @param {Object} config The user configuration object"," */"," _preInitEventCfg : function(config) {"," if (config) {"," if (config.on) {"," this.on(config.on);"," }"," if (config.after) {"," this.after(config.after);"," }"," }",""," var i, l, target,"," userTargets = (config && BUBBLETARGETS in config);",""," if (userTargets || _BUBBLETARGETS in this) {"," target = userTargets ? (config && config.bubbleTargets) : this._bubbleTargets;"," if (L.isArray(target)) {"," for (i = 0, l = target.length; i < l; i++) { "," this.addTarget(target[i]);"," }"," } else if (target) {"," this.addTarget(target);"," }"," }"," },",""," /**"," *"," * Destroy lifecycle method. Fires the destroy"," * event, prior to invoking destructors for the"," * class hierarchy."," *
"," *"," * Subscribers to the destroy"," * event can invoke preventDefault on the event object, to prevent destruction"," * from proceeding."," *
"," * @method destroy"," * @return {Base} A reference to this object"," * @chainable"," */"," destroy: function() {",""," /**"," *"," * Lifecycle event for the destroy phase, "," * fired prior to destruction. Invoking the preventDefault "," * method on the event object provided to subscribers will "," * prevent destruction from proceeding."," *
"," *"," * Subscribers to the \"after\" moment of this event, will be notified"," * after destruction is complete (and as a result cannot prevent"," * destruction)."," *
"," * @event destroy"," * @preventable _defDestroyFn"," * @param {EventFacade} e Event object"," */"," this.publish(DESTROY, {"," queuable:false,"," fireOnce:true,"," defaultTargetOnly:true,"," defaultFn: this._defDestroyFn"," });"," this.fire(DESTROY);",""," this.detachAll();"," return this;"," },",""," /**"," * Default init event handler"," *"," * @method _defInitFn"," * @param {EventFacade} e Event object, with a cfg property which "," * refers to the configuration object passed to the constructor."," * @protected"," */"," _defInitFn : function(e) {"," this._baseInit(e.cfg);"," },",""," /**"," * Default destroy event handler"," *"," * @method _defDestroyFn"," * @param {EventFacade} e Event object"," * @protected"," */"," _defDestroyFn : function(e) {"," this._baseDestroy(e.cfg);"," }"," };",""," Y.mix(Base, Attribute, false, null, 1);"," Y.mix(Base, BaseCore, false, null, 1);",""," // Fix constructor"," Base.prototype.constructor = Base;",""," Y.Base = Base;","","","}, '3.7.3', {\"requires\": [\"base-core\", \"attribute-base\"]});"]; -_yuitest_coverage["build/base-base/base-base.js"].lines = {"1":0,"34":0,"89":0,"90":0,"102":0,"103":0,"120":0,"136":0,"152":0,"154":0,"165":0,"167":0,"177":0,"178":0,"189":0,"220":0,"227":0,"229":0,"231":0,"244":0,"245":0,"246":0,"248":0,"249":0,"253":0,"256":0,"257":0,"258":0,"259":0,"260":0,"262":0,"263":0,"301":0,"307":0,"309":0,"310":0,"322":0,"333":0,"337":0,"338":0,"341":0,"343":0}; -_yuitest_coverage["build/base-base/base-base.js"].functions = {"Base:89":0,"_initBase:163":0,"_initAttribute:176":0,"_attrCfgHash:188":0,"init:202":0,"_preInitEventCfg:243":0,"destroy:283":0,"_defInitFn:321":0,"_defDestroyFn:332":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/base-base/base-base.js"].coveredLines = 42; -_yuitest_coverage["build/base-base/base-base.js"].coveredFunctions = 10; -_yuitest_coverline("build/base-base/base-base.js", 1); -YUI.add('base-base', function (Y, NAME) { - - /** - * The base module provides the Base class, which objects requiring attribute and custom event support can extend. - * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides - * plugin support and also provides the BaseCore.build method which provides a way to build custom classes using extensions. - * - * @module base - */ - - /** - * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, - * and without the extension support provided by BaseCore.build. - * - * @module base - * @submodule base-base - */ - - /** - * The base module provides the Base class, which objects requiring attribute and custom event support can extend. - * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides - * plugin support and also provides the Base.build method which provides a way to build custom classes using extensions. - * - * @module base - */ - - /** - * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, - * and without the extension support provided by Base.build. - * - * @module base - * @submodule base-base - */ - _yuitest_coverfunc("build/base-base/base-base.js", "(anonymous 1)", 1); -_yuitest_coverline("build/base-base/base-base.js", 34); -var L = Y.Lang, - - DESTROY = "destroy", - INIT = "init", - - BUBBLETARGETS = "bubbleTargets", - _BUBBLETARGETS = "_bubbleTargets", - - BaseCore = Y.BaseCore, - AttributeCore = Y.AttributeCore, - Attribute = Y.Attribute; - - /** - *- * A base class which objects requiring attributes and custom event support can - * extend. Base also handles the chaining of initializer and destructor methods across - * the hierarchy as part of object construction and destruction. Additionally, attributes configured - * through the static ATTRS property for each class - * in the hierarchy will be initialized by Base. - *
- * - *- * The static NAME property of each class extending - * from Base will be used as the identifier for the class, and is used by Base to prefix - * all events fired by instances of that class. - *
- * - * @class Base - * @constructor - * @uses BaseCore - * @uses Attribute - * @uses AttributeCore - * @uses AttributeEvents - * @uses AttributeExtras - * @uses EventTarget - * - * @param {Object} config Object with configuration property name/value pairs. The object can be - * used to provide default values for the objects published attributes. - * - *- * The config object can also contain the following non-attribute properties, providing a convenient - * way to configure events listeners and plugins for the instance, as part of the constructor call: - *
- * - *- * The string to be used to identify instances of - * this class, for example in prefixing events. - *
- *- * Classes extending Base, should define their own - * static NAME property, which should be camelCase by - * convention (e.g. MyClass.NAME = "myClass";). - *
- * @property NAME - * @type String - * @static - */ - _yuitest_coverline("build/base-base/base-base.js", 136); -Base.NAME = "base"; - - /** - * The default set of attributes which will be available for instances of this class, and - * their configuration. In addition to the configuration properties listed by - * Attribute's addAttr method, the attribute - * can also be configured with a "cloneDefaultValue" property, which defines how the statically - * defined value field should be protected ("shallow", "deep" and false are supported values). - * - * By default if the value is an object literal or an array it will be "shallow" cloned, to - * protect the default value. - * - * @property ATTRS - * @type Object - * @static - */ - _yuitest_coverline("build/base-base/base-base.js", 152); -Base.ATTRS = AttributeCore.prototype._protectAttrs(BaseCore.ATTRS); - - _yuitest_coverline("build/base-base/base-base.js", 154); -Base.prototype = { - - /** - * Internal construction logic for Base. - * - * @method _initBase - * @param {Object} config The constructor configuration object - * @private - */ - _initBase: function(cfg) { - - _yuitest_coverfunc("build/base-base/base-base.js", "_initBase", 163); -_yuitest_coverline("build/base-base/base-base.js", 165); -this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME; - - _yuitest_coverline("build/base-base/base-base.js", 167); -Y.BaseCore.prototype._initBase.call(this, cfg); - }, - - /** - * Initializes Attribute - * - * @method _initAttribute - * @private - */ - _initAttribute: function(cfg) { - _yuitest_coverfunc("build/base-base/base-base.js", "_initAttribute", 176); -_yuitest_coverline("build/base-base/base-base.js", 177); -Attribute.call(this); - _yuitest_coverline("build/base-base/base-base.js", 178); -this._yuievt.config.prefix = this._eventPrefix; - }, - - /** - * Utility method to define the attribute hash used to filter/whitelist property mixes for - * this class. - * - * @method _attrCfgHash - * @private - */ - _attrCfgHash: function() { - _yuitest_coverfunc("build/base-base/base-base.js", "_attrCfgHash", 188); -_yuitest_coverline("build/base-base/base-base.js", 189); -return Base._ATTR_CFG_HASH; - }, - - /** - * Init lifecycle method, invoked during construction. - * Fires the init event prior to setting up attributes and - * invoking initializers for the class hierarchy. - * - * @method init - * @chainable - * @param {Object} config Object with configuration property name/value pairs - * @return {Base} A reference to this object - */ - init: function(config) { - /** - *- * Lifecycle event for the init phase, fired prior to initialization. - * Invoking the preventDefault() method on the event object provided - * to subscribers will prevent initialization from occuring. - *
- *- * Subscribers to the "after" momemt of this event, will be notified - * after initialization of the object is complete (and therefore - * cannot prevent initialization). - *
- * - * @event init - * @preventable _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - */ - _yuitest_coverfunc("build/base-base/base-base.js", "init", 202); -_yuitest_coverline("build/base-base/base-base.js", 220); -this.publish(INIT, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn:this._defInitFn - }); - - _yuitest_coverline("build/base-base/base-base.js", 227); -this._preInitEventCfg(config); - - _yuitest_coverline("build/base-base/base-base.js", 229); -this.fire(INIT, {cfg: config}); - - _yuitest_coverline("build/base-base/base-base.js", 231); -return this; - }, - - /** - * Handles the special on, after and target properties which allow the user to - * easily configure on and after listeners as well as bubble targets during - * construction, prior to init. - * - * @private - * @method _preInitEventCfg - * @param {Object} config The user configuration object - */ - _preInitEventCfg : function(config) { - _yuitest_coverfunc("build/base-base/base-base.js", "_preInitEventCfg", 243); -_yuitest_coverline("build/base-base/base-base.js", 244); -if (config) { - _yuitest_coverline("build/base-base/base-base.js", 245); -if (config.on) { - _yuitest_coverline("build/base-base/base-base.js", 246); -this.on(config.on); - } - _yuitest_coverline("build/base-base/base-base.js", 248); -if (config.after) { - _yuitest_coverline("build/base-base/base-base.js", 249); -this.after(config.after); - } - } - - _yuitest_coverline("build/base-base/base-base.js", 253); -var i, l, target, - userTargets = (config && BUBBLETARGETS in config); - - _yuitest_coverline("build/base-base/base-base.js", 256); -if (userTargets || _BUBBLETARGETS in this) { - _yuitest_coverline("build/base-base/base-base.js", 257); -target = userTargets ? (config && config.bubbleTargets) : this._bubbleTargets; - _yuitest_coverline("build/base-base/base-base.js", 258); -if (L.isArray(target)) { - _yuitest_coverline("build/base-base/base-base.js", 259); -for (i = 0, l = target.length; i < l; i++) { - _yuitest_coverline("build/base-base/base-base.js", 260); -this.addTarget(target[i]); - } - } else {_yuitest_coverline("build/base-base/base-base.js", 262); -if (target) { - _yuitest_coverline("build/base-base/base-base.js", 263); -this.addTarget(target); - }} - } - }, - - /** - *- * Destroy lifecycle method. Fires the destroy - * event, prior to invoking destructors for the - * class hierarchy. - *
- *- * Subscribers to the destroy - * event can invoke preventDefault on the event object, to prevent destruction - * from proceeding. - *
- * @method destroy - * @return {Base} A reference to this object - * @chainable - */ - destroy: function() { - - /** - *- * Lifecycle event for the destroy phase, - * fired prior to destruction. Invoking the preventDefault - * method on the event object provided to subscribers will - * prevent destruction from proceeding. - *
- *- * Subscribers to the "after" moment of this event, will be notified - * after destruction is complete (and as a result cannot prevent - * destruction). - *
- * @event destroy - * @preventable _defDestroyFn - * @param {EventFacade} e Event object - */ - _yuitest_coverfunc("build/base-base/base-base.js", "destroy", 283); -_yuitest_coverline("build/base-base/base-base.js", 301); -this.publish(DESTROY, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn: this._defDestroyFn - }); - _yuitest_coverline("build/base-base/base-base.js", 307); -this.fire(DESTROY); - - _yuitest_coverline("build/base-base/base-base.js", 309); -this.detachAll(); - _yuitest_coverline("build/base-base/base-base.js", 310); -return this; - }, - - /** - * Default init event handler - * - * @method _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - * @protected - */ - _defInitFn : function(e) { - _yuitest_coverfunc("build/base-base/base-base.js", "_defInitFn", 321); -_yuitest_coverline("build/base-base/base-base.js", 322); -this._baseInit(e.cfg); - }, - - /** - * Default destroy event handler - * - * @method _defDestroyFn - * @param {EventFacade} e Event object - * @protected - */ - _defDestroyFn : function(e) { - _yuitest_coverfunc("build/base-base/base-base.js", "_defDestroyFn", 332); -_yuitest_coverline("build/base-base/base-base.js", 333); -this._baseDestroy(e.cfg); - } - }; - - _yuitest_coverline("build/base-base/base-base.js", 337); -Y.mix(Base, Attribute, false, null, 1); - _yuitest_coverline("build/base-base/base-base.js", 338); -Y.mix(Base, BaseCore, false, null, 1); - - // Fix constructor - _yuitest_coverline("build/base-base/base-base.js", 341); -Base.prototype.constructor = Base; - - _yuitest_coverline("build/base-base/base-base.js", 343); -Y.Base = Base; - - -}, '3.7.3', {"requires": ["base-core", "attribute-base"]}); diff --git a/lib/yuilib/3.7.3/build/base-base/base-base-debug.js b/lib/yuilib/3.7.3/build/base-base/base-base-debug.js deleted file mode 100644 index a44a22e07c1..00000000000 --- a/lib/yuilib/3.7.3/build/base-base/base-base-debug.js +++ /dev/null @@ -1,354 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add('base-base', function (Y, NAME) { - - /** - * The base module provides the Base class, which objects requiring attribute and custom event support can extend. - * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides - * plugin support and also provides the BaseCore.build method which provides a way to build custom classes using extensions. - * - * @module base - */ - - /** - * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, - * and without the extension support provided by BaseCore.build. - * - * @module base - * @submodule base-base - */ - - /** - * The base module provides the Base class, which objects requiring attribute and custom event support can extend. - * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides - * plugin support and also provides the Base.build method which provides a way to build custom classes using extensions. - * - * @module base - */ - - /** - * The base-base submodule provides the Base class without the Plugin support, provided by Plugin.Host, - * and without the extension support provided by Base.build. - * - * @module base - * @submodule base-base - */ - var L = Y.Lang, - - DESTROY = "destroy", - INIT = "init", - - BUBBLETARGETS = "bubbleTargets", - _BUBBLETARGETS = "_bubbleTargets", - - BaseCore = Y.BaseCore, - AttributeCore = Y.AttributeCore, - Attribute = Y.Attribute; - - /** - *- * A base class which objects requiring attributes and custom event support can - * extend. Base also handles the chaining of initializer and destructor methods across - * the hierarchy as part of object construction and destruction. Additionally, attributes configured - * through the static ATTRS property for each class - * in the hierarchy will be initialized by Base. - *
- * - *- * The static NAME property of each class extending - * from Base will be used as the identifier for the class, and is used by Base to prefix - * all events fired by instances of that class. - *
- * - * @class Base - * @constructor - * @uses BaseCore - * @uses Attribute - * @uses AttributeCore - * @uses AttributeEvents - * @uses AttributeExtras - * @uses EventTarget - * - * @param {Object} config Object with configuration property name/value pairs. The object can be - * used to provide default values for the objects published attributes. - * - *- * The config object can also contain the following non-attribute properties, providing a convenient - * way to configure events listeners and plugins for the instance, as part of the constructor call: - *
- * - *- * The string to be used to identify instances of - * this class, for example in prefixing events. - *
- *- * Classes extending Base, should define their own - * static NAME property, which should be camelCase by - * convention (e.g. MyClass.NAME = "myClass";). - *
- * @property NAME - * @type String - * @static - */ - Base.NAME = "base"; - - /** - * The default set of attributes which will be available for instances of this class, and - * their configuration. In addition to the configuration properties listed by - * Attribute's addAttr method, the attribute - * can also be configured with a "cloneDefaultValue" property, which defines how the statically - * defined value field should be protected ("shallow", "deep" and false are supported values). - * - * By default if the value is an object literal or an array it will be "shallow" cloned, to - * protect the default value. - * - * @property ATTRS - * @type Object - * @static - */ - Base.ATTRS = AttributeCore.prototype._protectAttrs(BaseCore.ATTRS); - - Base.prototype = { - - /** - * Internal construction logic for Base. - * - * @method _initBase - * @param {Object} config The constructor configuration object - * @private - */ - _initBase: function(cfg) { - Y.log('init called', 'life', 'base'); - - this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME; - - Y.BaseCore.prototype._initBase.call(this, cfg); - }, - - /** - * Initializes Attribute - * - * @method _initAttribute - * @private - */ - _initAttribute: function(cfg) { - Attribute.call(this); - this._yuievt.config.prefix = this._eventPrefix; - }, - - /** - * Utility method to define the attribute hash used to filter/whitelist property mixes for - * this class. - * - * @method _attrCfgHash - * @private - */ - _attrCfgHash: function() { - return Base._ATTR_CFG_HASH; - }, - - /** - * Init lifecycle method, invoked during construction. - * Fires the init event prior to setting up attributes and - * invoking initializers for the class hierarchy. - * - * @method init - * @chainable - * @param {Object} config Object with configuration property name/value pairs - * @return {Base} A reference to this object - */ - init: function(config) { - /** - *- * Lifecycle event for the init phase, fired prior to initialization. - * Invoking the preventDefault() method on the event object provided - * to subscribers will prevent initialization from occuring. - *
- *- * Subscribers to the "after" momemt of this event, will be notified - * after initialization of the object is complete (and therefore - * cannot prevent initialization). - *
- * - * @event init - * @preventable _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - */ - this.publish(INIT, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn:this._defInitFn - }); - - this._preInitEventCfg(config); - - this.fire(INIT, {cfg: config}); - - return this; - }, - - /** - * Handles the special on, after and target properties which allow the user to - * easily configure on and after listeners as well as bubble targets during - * construction, prior to init. - * - * @private - * @method _preInitEventCfg - * @param {Object} config The user configuration object - */ - _preInitEventCfg : function(config) { - if (config) { - if (config.on) { - this.on(config.on); - } - if (config.after) { - this.after(config.after); - } - } - - var i, l, target, - userTargets = (config && BUBBLETARGETS in config); - - if (userTargets || _BUBBLETARGETS in this) { - target = userTargets ? (config && config.bubbleTargets) : this._bubbleTargets; - if (L.isArray(target)) { - for (i = 0, l = target.length; i < l; i++) { - this.addTarget(target[i]); - } - } else if (target) { - this.addTarget(target); - } - } - }, - - /** - *- * Destroy lifecycle method. Fires the destroy - * event, prior to invoking destructors for the - * class hierarchy. - *
- *- * Subscribers to the destroy - * event can invoke preventDefault on the event object, to prevent destruction - * from proceeding. - *
- * @method destroy - * @return {Base} A reference to this object - * @chainable - */ - destroy: function() { - Y.log('destroy called', 'life', 'base'); - - /** - *- * Lifecycle event for the destroy phase, - * fired prior to destruction. Invoking the preventDefault - * method on the event object provided to subscribers will - * prevent destruction from proceeding. - *
- *- * Subscribers to the "after" moment of this event, will be notified - * after destruction is complete (and as a result cannot prevent - * destruction). - *
- * @event destroy - * @preventable _defDestroyFn - * @param {EventFacade} e Event object - */ - this.publish(DESTROY, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn: this._defDestroyFn - }); - this.fire(DESTROY); - - this.detachAll(); - return this; - }, - - /** - * Default init event handler - * - * @method _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - * @protected - */ - _defInitFn : function(e) { - this._baseInit(e.cfg); - }, - - /** - * Default destroy event handler - * - * @method _defDestroyFn - * @param {EventFacade} e Event object - * @protected - */ - _defDestroyFn : function(e) { - this._baseDestroy(e.cfg); - } - }; - - Y.mix(Base, Attribute, false, null, 1); - Y.mix(Base, BaseCore, false, null, 1); - - // Fix constructor - Base.prototype.constructor = Base; - - Y.Base = Base; - - -}, '3.7.3', {"requires": ["base-core", "attribute-base"]}); diff --git a/lib/yuilib/3.7.3/build/base-base/base-base-min.js b/lib/yuilib/3.7.3/build/base-base/base-base-min.js deleted file mode 100644 index e49331d4480..00000000000 --- a/lib/yuilib/3.7.3/build/base-base/base-base-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("base-base",function(e,t){function l(){u.apply(this,arguments)}var n=e.Lang,r="destroy",i="init",s="bubbleTargets",o="_bubbleTargets",u=e.BaseCore,a=e.AttributeCore,f=e.Attribute;l._ATTR_CFG=f._ATTR_CFG.concat("cloneDefaultValue"),l._ATTR_CFG_HASH=e.Array.hash(l._ATTR_CFG),l._NON_ATTRS_CFG=u._NON_ATTRS_CFG.concat(["on","after","bubbleTargets"]),l.NAME="base",l.ATTRS=a.prototype._protectAttrs(u.ATTRS),l.prototype={_initBase:function(t){this._eventPrefix=this.constructor.EVENT_PREFIX||this.constructor.NAME,e.BaseCore.prototype._initBase.call(this,t)},_initAttribute:function(e){f.call(this),this._yuievt.config.prefix=this._eventPrefix},_attrCfgHash:function(){return l._ATTR_CFG_HASH},init:function(e){return this.publish(i,{queuable:!1,fireOnce:!0,defaultTargetOnly:!0,defaultFn:this._defInitFn}),this._preInitEventCfg(e),this.fire(i,{cfg:e}),this},_preInitEventCfg:function(e){e&&(e.on&&this.on(e.on),e.after&&this.after(e.after));var t,r,i,u=e&&s in e;if(u||o in this){i=u?e&&e.bubbleTargets:this._bubbleTargets;if(n.isArray(i))for(t=0,r=i.length;t- * The static NAME property of each class extending - * from Base will be used as the identifier for the class, and is used by Base to prefix - * all events fired by instances of that class. - *
- * - * @class Base - * @constructor - * @uses BaseCore - * @uses Attribute - * @uses AttributeCore - * @uses AttributeEvents - * @uses AttributeExtras - * @uses EventTarget - * - * @param {Object} config Object with configuration property name/value pairs. The object can be - * used to provide default values for the objects published attributes. - * - *- * The config object can also contain the following non-attribute properties, providing a convenient - * way to configure events listeners and plugins for the instance, as part of the constructor call: - *
- * - *- * The string to be used to identify instances of - * this class, for example in prefixing events. - *
- *- * Classes extending Base, should define their own - * static NAME property, which should be camelCase by - * convention (e.g. MyClass.NAME = "myClass";). - *
- * @property NAME - * @type String - * @static - */ - Base.NAME = "base"; - - /** - * The default set of attributes which will be available for instances of this class, and - * their configuration. In addition to the configuration properties listed by - * Attribute's addAttr method, the attribute - * can also be configured with a "cloneDefaultValue" property, which defines how the statically - * defined value field should be protected ("shallow", "deep" and false are supported values). - * - * By default if the value is an object literal or an array it will be "shallow" cloned, to - * protect the default value. - * - * @property ATTRS - * @type Object - * @static - */ - Base.ATTRS = AttributeCore.prototype._protectAttrs(BaseCore.ATTRS); - - Base.prototype = { - - /** - * Internal construction logic for Base. - * - * @method _initBase - * @param {Object} config The constructor configuration object - * @private - */ - _initBase: function(cfg) { - - this._eventPrefix = this.constructor.EVENT_PREFIX || this.constructor.NAME; - - Y.BaseCore.prototype._initBase.call(this, cfg); - }, - - /** - * Initializes Attribute - * - * @method _initAttribute - * @private - */ - _initAttribute: function(cfg) { - Attribute.call(this); - this._yuievt.config.prefix = this._eventPrefix; - }, - - /** - * Utility method to define the attribute hash used to filter/whitelist property mixes for - * this class. - * - * @method _attrCfgHash - * @private - */ - _attrCfgHash: function() { - return Base._ATTR_CFG_HASH; - }, - - /** - * Init lifecycle method, invoked during construction. - * Fires the init event prior to setting up attributes and - * invoking initializers for the class hierarchy. - * - * @method init - * @chainable - * @param {Object} config Object with configuration property name/value pairs - * @return {Base} A reference to this object - */ - init: function(config) { - /** - *- * Lifecycle event for the init phase, fired prior to initialization. - * Invoking the preventDefault() method on the event object provided - * to subscribers will prevent initialization from occuring. - *
- *- * Subscribers to the "after" momemt of this event, will be notified - * after initialization of the object is complete (and therefore - * cannot prevent initialization). - *
- * - * @event init - * @preventable _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - */ - this.publish(INIT, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn:this._defInitFn - }); - - this._preInitEventCfg(config); - - this.fire(INIT, {cfg: config}); - - return this; - }, - - /** - * Handles the special on, after and target properties which allow the user to - * easily configure on and after listeners as well as bubble targets during - * construction, prior to init. - * - * @private - * @method _preInitEventCfg - * @param {Object} config The user configuration object - */ - _preInitEventCfg : function(config) { - if (config) { - if (config.on) { - this.on(config.on); - } - if (config.after) { - this.after(config.after); - } - } - - var i, l, target, - userTargets = (config && BUBBLETARGETS in config); - - if (userTargets || _BUBBLETARGETS in this) { - target = userTargets ? (config && config.bubbleTargets) : this._bubbleTargets; - if (L.isArray(target)) { - for (i = 0, l = target.length; i < l; i++) { - this.addTarget(target[i]); - } - } else if (target) { - this.addTarget(target); - } - } - }, - - /** - *- * Destroy lifecycle method. Fires the destroy - * event, prior to invoking destructors for the - * class hierarchy. - *
- *- * Subscribers to the destroy - * event can invoke preventDefault on the event object, to prevent destruction - * from proceeding. - *
- * @method destroy - * @return {Base} A reference to this object - * @chainable - */ - destroy: function() { - - /** - *- * Lifecycle event for the destroy phase, - * fired prior to destruction. Invoking the preventDefault - * method on the event object provided to subscribers will - * prevent destruction from proceeding. - *
- *- * Subscribers to the "after" moment of this event, will be notified - * after destruction is complete (and as a result cannot prevent - * destruction). - *
- * @event destroy - * @preventable _defDestroyFn - * @param {EventFacade} e Event object - */ - this.publish(DESTROY, { - queuable:false, - fireOnce:true, - defaultTargetOnly:true, - defaultFn: this._defDestroyFn - }); - this.fire(DESTROY); - - this.detachAll(); - return this; - }, - - /** - * Default init event handler - * - * @method _defInitFn - * @param {EventFacade} e Event object, with a cfg property which - * refers to the configuration object passed to the constructor. - * @protected - */ - _defInitFn : function(e) { - this._baseInit(e.cfg); - }, - - /** - * Default destroy event handler - * - * @method _defDestroyFn - * @param {EventFacade} e Event object - * @protected - */ - _defDestroyFn : function(e) { - this._baseDestroy(e.cfg); - } - }; - - Y.mix(Base, Attribute, false, null, 1); - Y.mix(Base, BaseCore, false, null, 1); - - // Fix constructor - Base.prototype.constructor = Base; - - Y.Base = Base; - - -}, '3.7.3', {"requires": ["base-core", "attribute-base"]}); diff --git a/lib/yuilib/3.7.3/build/base-build/base-build-coverage.js b/lib/yuilib/3.7.3/build/base-build/base-build-coverage.js deleted file mode 100644 index e30807fa87e..00000000000 --- a/lib/yuilib/3.7.3/build/base-build/base-build-coverage.js +++ /dev/null @@ -1,597 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -if (typeof _yuitest_coverage == "undefined"){ - _yuitest_coverage = {}; - _yuitest_coverline = function(src, line){ - var coverage = _yuitest_coverage[src]; - if (!coverage.lines[line]){ - coverage.calledLines++; - } - coverage.lines[line]++; - }; - _yuitest_coverfunc = function(src, name, line){ - var coverage = _yuitest_coverage[src], - funcId = name + ":" + line; - if (!coverage.functions[funcId]){ - coverage.calledFunctions++; - } - coverage.functions[funcId]++; - }; -} -_yuitest_coverage["build/base-build/base-build.js"] = { - lines: {}, - functions: {}, - coveredLines: 0, - calledLines: 0, - coveredFunctions: 0, - calledFunctions: 0, - path: "build/base-build/base-build.js", - code: [] -}; -_yuitest_coverage["build/base-build/base-build.js"].code=["YUI.add('base-build', function (Y, NAME) {",""," /**"," * The base-build submodule provides Base.build functionality, which"," * can be used to create custom classes, by aggregating extensions onto "," * a main class."," *"," * @module base"," * @submodule base-build"," * @for Base"," */"," var Base = Y.Base,"," L = Y.Lang,"," INITIALIZER = \"initializer\","," DESTRUCTOR = \"destructor\","," build,"," arrayAggregator = function (prop, r, s) {"," if (s[prop]) {"," r[prop] = (r[prop] || []).concat(s[prop]);"," } "," };",""," Base._build = function(name, main, extensions, px, sx, cfg) {",""," var build = Base._build,",""," builtClass = build._ctor(main, cfg),"," buildCfg = build._cfg(main, cfg, extensions),",""," _mixCust = build._mixCust,",""," dynamic = builtClass._yuibuild.dynamic,",""," i, l, extClass, extProto,"," initializer,"," destructor;",""," // Augment/Aggregate"," for (i = 0, l = extensions.length; i < l; i++) {"," extClass = extensions[i];",""," extProto = extClass.prototype;"," "," initializer = extProto[INITIALIZER];"," destructor = extProto[DESTRUCTOR];"," delete extProto[INITIALIZER];"," delete extProto[DESTRUCTOR];",""," // Prototype, old non-displacing augment"," Y.mix(builtClass, extClass, true, null, 1);",""," // Custom Statics"," _mixCust(builtClass, extClass, buildCfg);",""," if (initializer) { "," extProto[INITIALIZER] = initializer;"," }",""," if (destructor) {"," extProto[DESTRUCTOR] = destructor;"," }",""," builtClass._yuibuild.exts.push(extClass);"," }",""," if (px) {"," Y.mix(builtClass.prototype, px, true);"," }",""," if (sx) {"," Y.mix(builtClass, build._clean(sx, buildCfg), true);"," _mixCust(builtClass, sx, buildCfg);"," }",""," builtClass.prototype.hasImpl = build._impl;",""," if (dynamic) {"," builtClass.NAME = name;"," builtClass.prototype.constructor = builtClass;"," }",""," return builtClass;"," };",""," build = Base._build;",""," Y.mix(build, {",""," _mixCust: function(r, s, cfg) {"," "," var aggregates, "," custom, "," statics,"," aggr,"," l,"," i;"," "," if (cfg) {"," aggregates = cfg.aggregates;"," custom = cfg.custom;"," statics = cfg.statics;"," }",""," if (statics) {"," Y.mix(r, s, true, statics);"," }",""," if (aggregates) {"," for (i = 0, l = aggregates.length; i < l; i++) {"," aggr = aggregates[i];"," if (!r.hasOwnProperty(aggr) && s.hasOwnProperty(aggr)) {"," r[aggr] = L.isArray(s[aggr]) ? [] : {};"," }"," Y.aggregate(r, s, true, [aggr]);"," }"," }",""," if (custom) {"," for (i in custom) {"," if (custom.hasOwnProperty(i)) {"," custom[i](i, r, s);"," }"," }"," }"," "," },",""," _tmpl: function(main) {",""," function BuiltClass() {"," BuiltClass.superclass.constructor.apply(this, arguments);"," }"," Y.extend(BuiltClass, main);",""," return BuiltClass;"," },",""," _impl : function(extClass) {"," var classes = this._getClasses(), i, l, cls, exts, ll, j;"," for (i = 0, l = classes.length; i < l; i++) {"," cls = classes[i];"," if (cls._yuibuild) {"," exts = cls._yuibuild.exts;"," ll = exts.length;"," "," for (j = 0; j < ll; j++) {"," if (exts[j] === extClass) {"," return true;"," }"," }"," }"," }"," return false;"," },",""," _ctor : function(main, cfg) {",""," var dynamic = (cfg && false === cfg.dynamic) ? false : true,"," builtClass = (dynamic) ? build._tmpl(main) : main,"," buildCfg = builtClass._yuibuild;",""," if (!buildCfg) {"," buildCfg = builtClass._yuibuild = {};"," }",""," buildCfg.id = buildCfg.id || null;"," buildCfg.exts = buildCfg.exts || [];"," buildCfg.dynamic = dynamic;",""," return builtClass;"," },",""," _cfg : function(main, cfg, exts) {"," var aggr = [], "," cust = {},"," statics = [],"," buildCfg,"," cfgAggr = (cfg && cfg.aggregates),"," cfgCustBuild = (cfg && cfg.custom),"," cfgStatics = (cfg && cfg.statics),"," c = main,"," i, "," l;",""," // Prototype Chain"," while (c && c.prototype) {"," buildCfg = c._buildCfg;"," if (buildCfg) {"," if (buildCfg.aggregates) {"," aggr = aggr.concat(buildCfg.aggregates);"," }"," if (buildCfg.custom) {"," Y.mix(cust, buildCfg.custom, true);"," }"," if (buildCfg.statics) {"," statics = statics.concat(buildCfg.statics);"," }"," }"," c = c.superclass ? c.superclass.constructor : null;"," }",""," // Exts"," if (exts) {"," for (i = 0, l = exts.length; i < l; i++) {"," c = exts[i];"," buildCfg = c._buildCfg;"," if (buildCfg) {"," if (buildCfg.aggregates) {"," aggr = aggr.concat(buildCfg.aggregates);"," }"," if (buildCfg.custom) {"," Y.mix(cust, buildCfg.custom, true);"," }"," if (buildCfg.statics) {"," statics = statics.concat(buildCfg.statics);"," }"," } "," }"," }",""," if (cfgAggr) {"," aggr = aggr.concat(cfgAggr);"," }",""," if (cfgCustBuild) {"," Y.mix(cust, cfg.cfgBuild, true);"," }",""," if (cfgStatics) {"," statics = statics.concat(cfgStatics);"," }",""," return {"," aggregates: aggr,"," custom: cust,"," statics: statics"," };"," },",""," _clean : function(sx, cfg) {"," var prop, i, l, sxclone = Y.merge(sx),"," aggregates = cfg.aggregates,"," custom = cfg.custom;",""," for (prop in custom) {"," if (sxclone.hasOwnProperty(prop)) {"," delete sxclone[prop];"," }"," }",""," for (i = 0, l = aggregates.length; i < l; i++) {"," prop = aggregates[i];"," if (sxclone.hasOwnProperty(prop)) {"," delete sxclone[prop];"," }"," }",""," return sxclone;"," }"," });",""," /**"," *"," * Builds a custom constructor function (class) from the"," * main function, and array of extension functions (classes)"," * provided. The NAME field for the constructor function is "," * defined by the first argument passed in."," *
"," *"," * The cfg object supports the following properties"," *
"," *If true (default), a completely new class"," * is created which extends the main class, and acts as the "," * host on which the extension classes are augmented.
"," *If false, the extensions classes are augmented directly to"," * the main class, modifying the main class' prototype.
"," *Mixes in a list of extensions to an existing class.
"," * @method mix"," * @static"," * @param {Function} main The existing class into which the extensions should be mixed. The class needs to be Base or a class derived from Base (e.g. Widget)"," * @param {Function[]} extensions The set of extension classes which will mixed into the existing main class."," * @return {Function} The modified main class, with extensions mixed in."," */"," Base.mix = function(main, extensions) {"," return build(null, main, extensions, null, null, {dynamic:false});"," };",""," /**"," * The build configuration for the Base class."," *"," * Defines the static fields which need to be aggregated"," * when the Base class is used as the main class passed to"," * the Base.build method."," *"," * @property _buildCfg"," * @type Object"," * @static"," * @final"," * @private"," */"," Base._buildCfg = {"," custom : {"," ATTRS : function(prop, r, s) {",""," r.ATTRS = r.ATTRS || {};",""," if (s.ATTRS) {",""," var sAttrs = s.ATTRS,"," rAttrs = r.ATTRS,"," a;",""," for (a in sAttrs) {"," if (sAttrs.hasOwnProperty(a)) {"," rAttrs[a] = rAttrs[a] || {};"," Y.mix(rAttrs[a], sAttrs[a], true);"," }"," }"," }"," },"," _NON_ATTRS_CFG : arrayAggregator"," },"," aggregates : [\"_PLUG\", \"_UNPLUG\"]"," };","","","}, '3.7.3', {\"requires\": [\"base-base\"]});"]; -_yuitest_coverage["build/base-build/base-build.js"].lines = {"1":0,"12":0,"18":0,"19":0,"23":0,"25":0,"39":0,"40":0,"42":0,"44":0,"45":0,"46":0,"47":0,"50":0,"53":0,"55":0,"56":0,"59":0,"60":0,"63":0,"66":0,"67":0,"70":0,"71":0,"72":0,"75":0,"77":0,"78":0,"79":0,"82":0,"85":0,"87":0,"91":0,"98":0,"99":0,"100":0,"101":0,"104":0,"105":0,"108":0,"109":0,"110":0,"111":0,"112":0,"114":0,"118":0,"119":0,"120":0,"121":0,"130":0,"131":0,"133":0,"135":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"146":0,"147":0,"148":0,"153":0,"158":0,"162":0,"163":0,"166":0,"167":0,"168":0,"170":0,"174":0,"186":0,"187":0,"188":0,"189":0,"190":0,"192":0,"193":0,"195":0,"196":0,"199":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"211":0,"212":0,"214":0,"215":0,"221":0,"222":0,"225":0,"226":0,"229":0,"230":0,"233":0,"241":0,"245":0,"246":0,"247":0,"251":0,"252":0,"253":0,"254":0,"258":0,"299":0,"300":0,"367":0,"368":0,"379":0,"380":0,"396":0,"400":0,"402":0,"404":0,"408":0,"409":0,"410":0,"411":0}; -_yuitest_coverage["build/base-build/base-build.js"].functions = {"arrayAggregator:17":0,"_build:23":0,"_mixCust:89":0,"BuiltClass:130":0,"_tmpl:128":0,"_impl:138":0,"_ctor:156":0,"_cfg:173":0,"_clean:240":0,"build:299":0,"create:367":0,"mix:379":0,"ATTRS:398":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/base-build/base-build.js"].coveredLines = 122; -_yuitest_coverage["build/base-build/base-build.js"].coveredFunctions = 14; -_yuitest_coverline("build/base-build/base-build.js", 1); -YUI.add('base-build', function (Y, NAME) { - - /** - * The base-build submodule provides Base.build functionality, which - * can be used to create custom classes, by aggregating extensions onto - * a main class. - * - * @module base - * @submodule base-build - * @for Base - */ - _yuitest_coverfunc("build/base-build/base-build.js", "(anonymous 1)", 1); -_yuitest_coverline("build/base-build/base-build.js", 12); -var Base = Y.Base, - L = Y.Lang, - INITIALIZER = "initializer", - DESTRUCTOR = "destructor", - build, - arrayAggregator = function (prop, r, s) { - _yuitest_coverfunc("build/base-build/base-build.js", "arrayAggregator", 17); -_yuitest_coverline("build/base-build/base-build.js", 18); -if (s[prop]) { - _yuitest_coverline("build/base-build/base-build.js", 19); -r[prop] = (r[prop] || []).concat(s[prop]); - } - }; - - _yuitest_coverline("build/base-build/base-build.js", 23); -Base._build = function(name, main, extensions, px, sx, cfg) { - - _yuitest_coverfunc("build/base-build/base-build.js", "_build", 23); -_yuitest_coverline("build/base-build/base-build.js", 25); -var build = Base._build, - - builtClass = build._ctor(main, cfg), - buildCfg = build._cfg(main, cfg, extensions), - - _mixCust = build._mixCust, - - dynamic = builtClass._yuibuild.dynamic, - - i, l, extClass, extProto, - initializer, - destructor; - - // Augment/Aggregate - _yuitest_coverline("build/base-build/base-build.js", 39); -for (i = 0, l = extensions.length; i < l; i++) { - _yuitest_coverline("build/base-build/base-build.js", 40); -extClass = extensions[i]; - - _yuitest_coverline("build/base-build/base-build.js", 42); -extProto = extClass.prototype; - - _yuitest_coverline("build/base-build/base-build.js", 44); -initializer = extProto[INITIALIZER]; - _yuitest_coverline("build/base-build/base-build.js", 45); -destructor = extProto[DESTRUCTOR]; - _yuitest_coverline("build/base-build/base-build.js", 46); -delete extProto[INITIALIZER]; - _yuitest_coverline("build/base-build/base-build.js", 47); -delete extProto[DESTRUCTOR]; - - // Prototype, old non-displacing augment - _yuitest_coverline("build/base-build/base-build.js", 50); -Y.mix(builtClass, extClass, true, null, 1); - - // Custom Statics - _yuitest_coverline("build/base-build/base-build.js", 53); -_mixCust(builtClass, extClass, buildCfg); - - _yuitest_coverline("build/base-build/base-build.js", 55); -if (initializer) { - _yuitest_coverline("build/base-build/base-build.js", 56); -extProto[INITIALIZER] = initializer; - } - - _yuitest_coverline("build/base-build/base-build.js", 59); -if (destructor) { - _yuitest_coverline("build/base-build/base-build.js", 60); -extProto[DESTRUCTOR] = destructor; - } - - _yuitest_coverline("build/base-build/base-build.js", 63); -builtClass._yuibuild.exts.push(extClass); - } - - _yuitest_coverline("build/base-build/base-build.js", 66); -if (px) { - _yuitest_coverline("build/base-build/base-build.js", 67); -Y.mix(builtClass.prototype, px, true); - } - - _yuitest_coverline("build/base-build/base-build.js", 70); -if (sx) { - _yuitest_coverline("build/base-build/base-build.js", 71); -Y.mix(builtClass, build._clean(sx, buildCfg), true); - _yuitest_coverline("build/base-build/base-build.js", 72); -_mixCust(builtClass, sx, buildCfg); - } - - _yuitest_coverline("build/base-build/base-build.js", 75); -builtClass.prototype.hasImpl = build._impl; - - _yuitest_coverline("build/base-build/base-build.js", 77); -if (dynamic) { - _yuitest_coverline("build/base-build/base-build.js", 78); -builtClass.NAME = name; - _yuitest_coverline("build/base-build/base-build.js", 79); -builtClass.prototype.constructor = builtClass; - } - - _yuitest_coverline("build/base-build/base-build.js", 82); -return builtClass; - }; - - _yuitest_coverline("build/base-build/base-build.js", 85); -build = Base._build; - - _yuitest_coverline("build/base-build/base-build.js", 87); -Y.mix(build, { - - _mixCust: function(r, s, cfg) { - - _yuitest_coverfunc("build/base-build/base-build.js", "_mixCust", 89); -_yuitest_coverline("build/base-build/base-build.js", 91); -var aggregates, - custom, - statics, - aggr, - l, - i; - - _yuitest_coverline("build/base-build/base-build.js", 98); -if (cfg) { - _yuitest_coverline("build/base-build/base-build.js", 99); -aggregates = cfg.aggregates; - _yuitest_coverline("build/base-build/base-build.js", 100); -custom = cfg.custom; - _yuitest_coverline("build/base-build/base-build.js", 101); -statics = cfg.statics; - } - - _yuitest_coverline("build/base-build/base-build.js", 104); -if (statics) { - _yuitest_coverline("build/base-build/base-build.js", 105); -Y.mix(r, s, true, statics); - } - - _yuitest_coverline("build/base-build/base-build.js", 108); -if (aggregates) { - _yuitest_coverline("build/base-build/base-build.js", 109); -for (i = 0, l = aggregates.length; i < l; i++) { - _yuitest_coverline("build/base-build/base-build.js", 110); -aggr = aggregates[i]; - _yuitest_coverline("build/base-build/base-build.js", 111); -if (!r.hasOwnProperty(aggr) && s.hasOwnProperty(aggr)) { - _yuitest_coverline("build/base-build/base-build.js", 112); -r[aggr] = L.isArray(s[aggr]) ? [] : {}; - } - _yuitest_coverline("build/base-build/base-build.js", 114); -Y.aggregate(r, s, true, [aggr]); - } - } - - _yuitest_coverline("build/base-build/base-build.js", 118); -if (custom) { - _yuitest_coverline("build/base-build/base-build.js", 119); -for (i in custom) { - _yuitest_coverline("build/base-build/base-build.js", 120); -if (custom.hasOwnProperty(i)) { - _yuitest_coverline("build/base-build/base-build.js", 121); -custom[i](i, r, s); - } - } - } - - }, - - _tmpl: function(main) { - - _yuitest_coverfunc("build/base-build/base-build.js", "_tmpl", 128); -_yuitest_coverline("build/base-build/base-build.js", 130); -function BuiltClass() { - _yuitest_coverfunc("build/base-build/base-build.js", "BuiltClass", 130); -_yuitest_coverline("build/base-build/base-build.js", 131); -BuiltClass.superclass.constructor.apply(this, arguments); - } - _yuitest_coverline("build/base-build/base-build.js", 133); -Y.extend(BuiltClass, main); - - _yuitest_coverline("build/base-build/base-build.js", 135); -return BuiltClass; - }, - - _impl : function(extClass) { - _yuitest_coverfunc("build/base-build/base-build.js", "_impl", 138); -_yuitest_coverline("build/base-build/base-build.js", 139); -var classes = this._getClasses(), i, l, cls, exts, ll, j; - _yuitest_coverline("build/base-build/base-build.js", 140); -for (i = 0, l = classes.length; i < l; i++) { - _yuitest_coverline("build/base-build/base-build.js", 141); -cls = classes[i]; - _yuitest_coverline("build/base-build/base-build.js", 142); -if (cls._yuibuild) { - _yuitest_coverline("build/base-build/base-build.js", 143); -exts = cls._yuibuild.exts; - _yuitest_coverline("build/base-build/base-build.js", 144); -ll = exts.length; - - _yuitest_coverline("build/base-build/base-build.js", 146); -for (j = 0; j < ll; j++) { - _yuitest_coverline("build/base-build/base-build.js", 147); -if (exts[j] === extClass) { - _yuitest_coverline("build/base-build/base-build.js", 148); -return true; - } - } - } - } - _yuitest_coverline("build/base-build/base-build.js", 153); -return false; - }, - - _ctor : function(main, cfg) { - - _yuitest_coverfunc("build/base-build/base-build.js", "_ctor", 156); -_yuitest_coverline("build/base-build/base-build.js", 158); -var dynamic = (cfg && false === cfg.dynamic) ? false : true, - builtClass = (dynamic) ? build._tmpl(main) : main, - buildCfg = builtClass._yuibuild; - - _yuitest_coverline("build/base-build/base-build.js", 162); -if (!buildCfg) { - _yuitest_coverline("build/base-build/base-build.js", 163); -buildCfg = builtClass._yuibuild = {}; - } - - _yuitest_coverline("build/base-build/base-build.js", 166); -buildCfg.id = buildCfg.id || null; - _yuitest_coverline("build/base-build/base-build.js", 167); -buildCfg.exts = buildCfg.exts || []; - _yuitest_coverline("build/base-build/base-build.js", 168); -buildCfg.dynamic = dynamic; - - _yuitest_coverline("build/base-build/base-build.js", 170); -return builtClass; - }, - - _cfg : function(main, cfg, exts) { - _yuitest_coverfunc("build/base-build/base-build.js", "_cfg", 173); -_yuitest_coverline("build/base-build/base-build.js", 174); -var aggr = [], - cust = {}, - statics = [], - buildCfg, - cfgAggr = (cfg && cfg.aggregates), - cfgCustBuild = (cfg && cfg.custom), - cfgStatics = (cfg && cfg.statics), - c = main, - i, - l; - - // Prototype Chain - _yuitest_coverline("build/base-build/base-build.js", 186); -while (c && c.prototype) { - _yuitest_coverline("build/base-build/base-build.js", 187); -buildCfg = c._buildCfg; - _yuitest_coverline("build/base-build/base-build.js", 188); -if (buildCfg) { - _yuitest_coverline("build/base-build/base-build.js", 189); -if (buildCfg.aggregates) { - _yuitest_coverline("build/base-build/base-build.js", 190); -aggr = aggr.concat(buildCfg.aggregates); - } - _yuitest_coverline("build/base-build/base-build.js", 192); -if (buildCfg.custom) { - _yuitest_coverline("build/base-build/base-build.js", 193); -Y.mix(cust, buildCfg.custom, true); - } - _yuitest_coverline("build/base-build/base-build.js", 195); -if (buildCfg.statics) { - _yuitest_coverline("build/base-build/base-build.js", 196); -statics = statics.concat(buildCfg.statics); - } - } - _yuitest_coverline("build/base-build/base-build.js", 199); -c = c.superclass ? c.superclass.constructor : null; - } - - // Exts - _yuitest_coverline("build/base-build/base-build.js", 203); -if (exts) { - _yuitest_coverline("build/base-build/base-build.js", 204); -for (i = 0, l = exts.length; i < l; i++) { - _yuitest_coverline("build/base-build/base-build.js", 205); -c = exts[i]; - _yuitest_coverline("build/base-build/base-build.js", 206); -buildCfg = c._buildCfg; - _yuitest_coverline("build/base-build/base-build.js", 207); -if (buildCfg) { - _yuitest_coverline("build/base-build/base-build.js", 208); -if (buildCfg.aggregates) { - _yuitest_coverline("build/base-build/base-build.js", 209); -aggr = aggr.concat(buildCfg.aggregates); - } - _yuitest_coverline("build/base-build/base-build.js", 211); -if (buildCfg.custom) { - _yuitest_coverline("build/base-build/base-build.js", 212); -Y.mix(cust, buildCfg.custom, true); - } - _yuitest_coverline("build/base-build/base-build.js", 214); -if (buildCfg.statics) { - _yuitest_coverline("build/base-build/base-build.js", 215); -statics = statics.concat(buildCfg.statics); - } - } - } - } - - _yuitest_coverline("build/base-build/base-build.js", 221); -if (cfgAggr) { - _yuitest_coverline("build/base-build/base-build.js", 222); -aggr = aggr.concat(cfgAggr); - } - - _yuitest_coverline("build/base-build/base-build.js", 225); -if (cfgCustBuild) { - _yuitest_coverline("build/base-build/base-build.js", 226); -Y.mix(cust, cfg.cfgBuild, true); - } - - _yuitest_coverline("build/base-build/base-build.js", 229); -if (cfgStatics) { - _yuitest_coverline("build/base-build/base-build.js", 230); -statics = statics.concat(cfgStatics); - } - - _yuitest_coverline("build/base-build/base-build.js", 233); -return { - aggregates: aggr, - custom: cust, - statics: statics - }; - }, - - _clean : function(sx, cfg) { - _yuitest_coverfunc("build/base-build/base-build.js", "_clean", 240); -_yuitest_coverline("build/base-build/base-build.js", 241); -var prop, i, l, sxclone = Y.merge(sx), - aggregates = cfg.aggregates, - custom = cfg.custom; - - _yuitest_coverline("build/base-build/base-build.js", 245); -for (prop in custom) { - _yuitest_coverline("build/base-build/base-build.js", 246); -if (sxclone.hasOwnProperty(prop)) { - _yuitest_coverline("build/base-build/base-build.js", 247); -delete sxclone[prop]; - } - } - - _yuitest_coverline("build/base-build/base-build.js", 251); -for (i = 0, l = aggregates.length; i < l; i++) { - _yuitest_coverline("build/base-build/base-build.js", 252); -prop = aggregates[i]; - _yuitest_coverline("build/base-build/base-build.js", 253); -if (sxclone.hasOwnProperty(prop)) { - _yuitest_coverline("build/base-build/base-build.js", 254); -delete sxclone[prop]; - } - } - - _yuitest_coverline("build/base-build/base-build.js", 258); -return sxclone; - } - }); - - /** - *- * Builds a custom constructor function (class) from the - * main function, and array of extension functions (classes) - * provided. The NAME field for the constructor function is - * defined by the first argument passed in. - *
- *- * The cfg object supports the following properties - *
- *If true (default), a completely new class - * is created which extends the main class, and acts as the - * host on which the extension classes are augmented.
- *If false, the extensions classes are augmented directly to - * the main class, modifying the main class' prototype.
- *Mixes in a list of extensions to an existing class.
- * @method mix - * @static - * @param {Function} main The existing class into which the extensions should be mixed. The class needs to be Base or a class derived from Base (e.g. Widget) - * @param {Function[]} extensions The set of extension classes which will mixed into the existing main class. - * @return {Function} The modified main class, with extensions mixed in. - */ - _yuitest_coverline("build/base-build/base-build.js", 379); -Base.mix = function(main, extensions) { - _yuitest_coverfunc("build/base-build/base-build.js", "mix", 379); -_yuitest_coverline("build/base-build/base-build.js", 380); -return build(null, main, extensions, null, null, {dynamic:false}); - }; - - /** - * The build configuration for the Base class. - * - * Defines the static fields which need to be aggregated - * when the Base class is used as the main class passed to - * the Base.build method. - * - * @property _buildCfg - * @type Object - * @static - * @final - * @private - */ - _yuitest_coverline("build/base-build/base-build.js", 396); -Base._buildCfg = { - custom : { - ATTRS : function(prop, r, s) { - - _yuitest_coverfunc("build/base-build/base-build.js", "ATTRS", 398); -_yuitest_coverline("build/base-build/base-build.js", 400); -r.ATTRS = r.ATTRS || {}; - - _yuitest_coverline("build/base-build/base-build.js", 402); -if (s.ATTRS) { - - _yuitest_coverline("build/base-build/base-build.js", 404); -var sAttrs = s.ATTRS, - rAttrs = r.ATTRS, - a; - - _yuitest_coverline("build/base-build/base-build.js", 408); -for (a in sAttrs) { - _yuitest_coverline("build/base-build/base-build.js", 409); -if (sAttrs.hasOwnProperty(a)) { - _yuitest_coverline("build/base-build/base-build.js", 410); -rAttrs[a] = rAttrs[a] || {}; - _yuitest_coverline("build/base-build/base-build.js", 411); -Y.mix(rAttrs[a], sAttrs[a], true); - } - } - } - }, - _NON_ATTRS_CFG : arrayAggregator - }, - aggregates : ["_PLUG", "_UNPLUG"] - }; - - -}, '3.7.3', {"requires": ["base-base"]}); diff --git a/lib/yuilib/3.7.3/build/base-build/base-build-min.js b/lib/yuilib/3.7.3/build/base-build/base-build-min.js deleted file mode 100644 index 1d959d27edf..00000000000 --- a/lib/yuilib/3.7.3/build/base-build/base-build-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("base-build",function(e,t){var n=e.Base,r=e.Lang,i="initializer",s="destructor",o,u=function(e,t,n){n[e]&&(t[e]=(t[e]||[]).concat(n[e]))};n._build=function(t,r,o,u,a,f){var l=n._build,c=l._ctor(r,f),h=l._cfg(r,f,o),p=l._mixCust,d=c._yuibuild.dynamic,v,m,g,y,b,w;for(v=0,m=o.length;vIt mixes in AttributeCore, which is the lightest version of Attribute
"," *"," * @module base"," * @submodule base-core"," */"," var O = Y.Object,"," L = Y.Lang,"," DOT = \".\","," INITIALIZED = \"initialized\","," DESTROYED = \"destroyed\","," INITIALIZER = \"initializer\","," VALUE = \"value\","," OBJECT_CONSTRUCTOR = Object.prototype.constructor,"," DEEP = \"deep\","," SHALLOW = \"shallow\","," DESTRUCTOR = \"destructor\",",""," AttributeCore = Y.AttributeCore,",""," _wlmix = function(r, s, wlhash) {"," var p;"," for (p in s) {"," if(wlhash[p]) { "," r[p] = s[p];"," }"," }"," return r;"," };",""," /**"," * The BaseCore class, is the lightest version of Base, and provides Base's "," * basic lifecycle management and ATTRS construction support, but doesn't "," * fire init/destroy or attribute change events."," *"," * BaseCore also handles the chaining of initializer and destructor methods across "," * the hierarchy as part of object construction and destruction. Additionally, attributes "," * configured through the static ATTRS "," * property for each class in the hierarchy will be initialized by BaseCore."," *"," * Classes which require attribute support, but don't intend to use/expose attribute "," * change events can extend BaseCore instead of Base for optimal kweight and "," * runtime performance."," * "," * @class BaseCore"," * @constructor"," * @uses AttributeCore"," * @param {Object} cfg Object with configuration property name/value pairs. "," * The object can be used to provide initial values for the objects published "," * attributes."," */"," function BaseCore(cfg) {"," if (!this._BaseInvoked) {"," this._BaseInvoked = true;",""," this._initBase(cfg);"," }"," }",""," /**"," * The list of properties which can be configured for each attribute "," * (e.g. setter, getter, writeOnce, readOnly etc.)"," *"," * @property _ATTR_CFG"," * @type Array"," * @static"," * @private"," */"," BaseCore._ATTR_CFG = AttributeCore._ATTR_CFG.concat(\"cloneDefaultValue\");"," BaseCore._ATTR_CFG_HASH = Y.Array.hash(BaseCore._ATTR_CFG);",""," /**"," * The array of non-attribute configuration properties supported by this class. "," * "," * For example `BaseCore` defines a \"plugins\" configuration property which "," * should not be set up as an attribute. This property is primarily required so "," * that when `_allowAdHocAttrs` is enabled by a class, "," * non-attribute configuration properties don't get added as ad-hoc attributes. "," *"," * @property _NON_ATTRS_CFG"," * @type Array"," * @static"," * @private"," */"," BaseCore._NON_ATTRS_CFG = [\"plugins\"];",""," /**"," * This property controls whether or not instances of this class should"," * allow users to add ad-hoc attributes through the constructor configuration "," * hash."," *"," * AdHoc attributes are attributes which are not defined by the class, and are "," * not handled by the MyClass._NON_ATTRS_CFG "," * "," * @property _allowAdHocAttrs"," * @type boolean"," * @default undefined (false)"," * @protected"," */",""," /**"," * The string to be used to identify instances of this class."," * "," * Classes extending BaseCore, should define their own"," * static NAME property, which should be camelCase by"," * convention (e.g. MyClass.NAME = \"myClass\";)."," *"," * @property NAME"," * @type String"," * @static"," */"," BaseCore.NAME = \"baseCore\";",""," /**"," * The default set of attributes which will be available for instances of this class, and "," * their configuration. In addition to the configuration properties listed by "," * AttributeCore's addAttr method, "," * the attribute can also be configured with a \"cloneDefaultValue\" property, which "," * defines how the statically defined value field should be protected "," * (\"shallow\", \"deep\" and false are supported values). "," *"," * By default if the value is an object literal or an array it will be \"shallow\" "," * cloned, to protect the default value."," *"," * @property ATTRS"," * @type Object"," * @static"," */"," BaseCore.ATTRS = {"," /**"," * Flag indicating whether or not this object"," * has been through the init lifecycle phase."," *"," * @attribute initialized"," * @readonly"," * @default false"," * @type boolean"," */"," initialized: {"," readOnly:true,"," value:false"," },",""," /**"," * Flag indicating whether or not this object"," * has been through the destroy lifecycle phase."," *"," * @attribute destroyed"," * @readonly"," * @default false"," * @type boolean"," */"," destroyed: {"," readOnly:true,"," value:false"," }"," };",""," BaseCore.prototype = {",""," /**"," * Internal construction logic for BaseCore."," *"," * @method _initBase"," * @param {Object} config The constructor configuration object"," * @private"," */"," _initBase : function(config) {",""," Y.stamp(this);",""," this._initAttribute(config);",""," // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's"," // initial state, but don't initialize Plugins yet. That's done after initialization."," var PluginHost = Y.Plugin && Y.Plugin.Host;"," if (this._initPlugins && PluginHost) {"," PluginHost.call(this);"," }",""," if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }",""," /**"," * The string used to identify the class of this object."," *"," * @deprecated Use this.constructor.NAME"," * @property name"," * @type String"," */"," this.name = this.constructor.NAME;"," "," this.init.apply(this, arguments);"," },",""," /**"," * Initializes AttributeCore "," * "," * @method _initAttribute"," * @private"," */"," _initAttribute: function() {"," AttributeCore.apply(this);"," },",""," /**"," * Init lifecycle method, invoked during construction. Sets up attributes "," * and invokes initializers for the class hierarchy."," *"," * @method init"," * @chainable"," * @param {Object} cfg Object with configuration property name/value pairs"," * @return {BaseCore} A reference to this object"," */"," init: function(cfg) {",""," this._baseInit(cfg);",""," return this;"," },",""," /**"," * Internal initialization implementation for BaseCore"," *"," * @method _baseInit"," * @private"," */"," _baseInit: function(cfg) {"," this._initHierarchy(cfg);",""," if (this._initPlugins) {"," // Need to initPlugins manually, to handle constructor parsing, static Plug parsing"," this._initPlugins(cfg);"," }"," this._set(INITIALIZED, true);"," },",""," /**"," * Destroy lifecycle method. Invokes destructors for the class hierarchy."," *"," * @method destroy"," * @return {BaseCore} A reference to this object"," * @chainable"," */"," destroy: function() {"," this._baseDestroy();"," return this;"," },",""," /**"," * Internal destroy implementation for BaseCore"," *"," * @method _baseDestroy"," * @private"," */"," _baseDestroy : function() {"," if (this._destroyPlugins) {"," this._destroyPlugins();"," }"," this._destroyHierarchy();"," this._set(DESTROYED, true);"," },",""," /**"," * Returns the class hierarchy for this object, with BaseCore being the last class in the array."," *"," * @method _getClasses"," * @protected"," * @return {Function[]} An array of classes (constructor functions), making up the class hierarchy for this object."," * This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the "," * cached value."," */"," _getClasses : function() {"," if (!this._classes) {"," this._initHierarchyData();"," }"," return this._classes;"," },",""," /**"," * Returns an aggregated set of attribute configurations, by traversing "," * the class hierarchy."," *"," * @method _getAttrCfgs"," * @protected"," * @return {Object} The hash of attribute configurations, aggregated across classes in the hierarchy"," * This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return"," * the cached value."," */"," _getAttrCfgs : function() {"," if (!this._attrs) {"," this._initHierarchyData();"," }"," return this._attrs;"," },",""," /**"," * A helper method used when processing ATTRS across the class hierarchy during "," * initialization. Returns a disposable object with the attributes defined for "," * the provided class, extracted from the set of all attributes passed in."," *"," * @method _filterAttrCfs"," * @private"," *"," * @param {Function} clazz The class for which the desired attributes are required."," * @param {Object} allCfgs The set of all attribute configurations for this instance. "," * Attributes will be removed from this set, if they belong to the filtered class, so"," * that by the time all classes are processed, allCfgs will be empty."," * "," * @return {Object} The set of attributes belonging to the class passed in, in the form"," * of an object with attribute name/configuration pairs."," */"," _filterAttrCfgs : function(clazz, allCfgs) {"," var cfgs = null, attr, attrs = clazz.ATTRS;",""," if (attrs) {"," for (attr in attrs) {"," if (allCfgs[attr]) {"," cfgs = cfgs || {};"," cfgs[attr] = allCfgs[attr];"," allCfgs[attr] = null;"," }"," }"," }",""," return cfgs;"," },",""," /**"," * @method _filterAdHocAttrs"," * @private"," *"," * @param {Object} allAttrs The set of all attribute configurations for this instance. "," * Attributes will be removed from this set, if they belong to the filtered class, so"," * that by the time all classes are processed, allCfgs will be empty."," * @param {Object} userVals The config object passed in by the user, from which adhoc attrs are to be filtered."," * @return {Object} The set of adhoc attributes passed in, in the form"," * of an object with attribute name/configuration pairs."," */"," _filterAdHocAttrs : function(allAttrs, userVals) {"," var adHocs,"," nonAttrs = this._nonAttrs,"," attr;",""," if (userVals) {"," adHocs = {};"," for (attr in userVals) {"," if (!allAttrs[attr] && !nonAttrs[attr] && userVals.hasOwnProperty(attr)) {"," adHocs[attr] = {"," value:userVals[attr]"," };"," }"," }"," }",""," return adHocs;"," },",""," /**"," * A helper method used by _getClasses and _getAttrCfgs, which determines both"," * the array of classes and aggregate set of attribute configurations"," * across the class hierarchy for the instance."," *"," * @method _initHierarchyData"," * @private"," */"," _initHierarchyData : function() {"," var c = this.constructor,"," i,"," l,"," nonAttrsCfg,"," nonAttrs = (this._allowAdHocAttrs) ? {} : null,"," classes = [],"," attrs = [];",""," while (c) {"," // Add to classes"," classes[classes.length] = c;",""," // Add to attributes"," if (c.ATTRS) {"," attrs[attrs.length] = c.ATTRS;"," }",""," if (this._allowAdHocAttrs) {"," nonAttrsCfg = c._NON_ATTRS_CFG; "," if (nonAttrsCfg) {"," for (i = 0, l = nonAttrsCfg.length; i < l; i++) {"," nonAttrs[nonAttrsCfg[i]] = true;"," }"," }"," }",""," c = c.superclass ? c.superclass.constructor : null;"," }",""," this._classes = classes;"," this._nonAttrs = nonAttrs;"," this._attrs = this._aggregateAttrs(attrs);"," },",""," /**"," * Utility method to define the attribute hash used to filter/whitelist property mixes for "," * this class. "," * "," * @method _attrCfgHash"," * @private"," */"," _attrCfgHash: function() {"," return BaseCore._ATTR_CFG_HASH;"," },",""," /**"," * A helper method, used by _initHierarchyData to aggregate "," * attribute configuration across the instances class hierarchy."," *"," * The method will protect the attribute configuration value to protect the statically defined "," * default value in ATTRS if required (if the value is an object literal, array or the "," * attribute configuration has cloneDefaultValue set to shallow or deep)."," *"," * @method _aggregateAttrs"," * @private"," * @param {Array} allAttrs An array of ATTRS definitions across classes in the hierarchy "," * (subclass first, Base last)"," * @return {Object} The aggregate set of ATTRS definitions for the instance"," */"," _aggregateAttrs : function(allAttrs) {"," var attr,"," attrs,"," cfg,"," val,"," path,"," i,"," clone,"," cfgPropsHash = this._attrCfgHash(),"," aggAttr,"," aggAttrs = {};",""," if (allAttrs) {"," for (i = allAttrs.length-1; i >= 0; --i) {"," attrs = allAttrs[i];",""," for (attr in attrs) {"," if (attrs.hasOwnProperty(attr)) {",""," // Protect config passed in"," cfg = _wlmix({}, attrs[attr], cfgPropsHash);",""," val = cfg.value;"," clone = cfg.cloneDefaultValue;",""," if (val) {"," if ( (clone === undefined && (OBJECT_CONSTRUCTOR === val.constructor || L.isArray(val))) || clone === DEEP || clone === true) {"," cfg.value = Y.clone(val);"," } else if (clone === SHALLOW) {"," cfg.value = Y.merge(val);"," }"," // else if (clone === false), don't clone the static default value. "," // It's intended to be used by reference."," }",""," path = null;"," if (attr.indexOf(DOT) !== -1) {"," path = attr.split(DOT);"," attr = path.shift();"," }",""," aggAttr = aggAttrs[attr];"," if (path && aggAttr && aggAttr.value) {"," O.setValue(aggAttr.value, path, val);"," } else if (!path) {"," if (!aggAttr) {"," aggAttrs[attr] = cfg;"," } else {"," if (aggAttr.valueFn && VALUE in cfg) {"," aggAttr.valueFn = null; "," }"," _wlmix(aggAttr, cfg, cfgPropsHash);"," }"," }"," }"," }"," }"," }",""," return aggAttrs;"," },",""," /**"," * Initializes the class hierarchy for the instance, which includes "," * initializing attributes for each class defined in the class's "," * static ATTRS property and "," * invoking the initializer method on the prototype of each class in the hierarchy."," *"," * @method _initHierarchy"," * @param {Object} userVals Object with configuration property name/value pairs"," * @private"," */"," _initHierarchy : function(userVals) {"," var lazy = this._lazyAddAttrs,"," constr,"," constrProto,"," ci,"," ei,"," el,"," extProto,"," exts,"," classes = this._getClasses(),"," attrCfgs = this._getAttrCfgs(),"," cl = classes.length - 1;",""," for (ci = cl; ci >= 0; ci--) {",""," constr = classes[ci];"," constrProto = constr.prototype;"," exts = constr._yuibuild && constr._yuibuild.exts; ",""," if (exts) {"," for (ei = 0, el = exts.length; ei < el; ei++) {"," exts[ei].apply(this, arguments);"," }"," }",""," this.addAttrs(this._filterAttrCfgs(constr, attrCfgs), userVals, lazy);",""," if (this._allowAdHocAttrs && ci === cl) { "," this.addAttrs(this._filterAdHocAttrs(attrCfgs, userVals), userVals, lazy);"," }",""," // Using INITIALIZER in hasOwnProperty check, for performance reasons (helps IE6 avoid GC thresholds when"," // referencing string literals). Not using it in apply, again, for performance \".\" is faster. "," if (constrProto.hasOwnProperty(INITIALIZER)) {"," constrProto.initializer.apply(this, arguments);"," }",""," if (exts) {"," for (ei = 0; ei < el; ei++) {"," extProto = exts[ei].prototype;"," if (extProto.hasOwnProperty(INITIALIZER)) {"," extProto.initializer.apply(this, arguments);"," }"," }"," }"," }"," },",""," /**"," * Destroys the class hierarchy for this instance by invoking"," * the destructor method on the prototype of each class in the hierarchy."," *"," * @method _destroyHierarchy"," * @private"," */"," _destroyHierarchy : function() {"," var constr,"," constrProto,"," ci, cl, ei, el, exts, extProto,"," classes = this._getClasses();",""," for (ci = 0, cl = classes.length; ci < cl; ci++) {"," constr = classes[ci];"," constrProto = constr.prototype;"," exts = constr._yuibuild && constr._yuibuild.exts; ",""," if (exts) {"," for (ei = 0, el = exts.length; ei < el; ei++) {"," extProto = exts[ei].prototype;"," if (extProto.hasOwnProperty(DESTRUCTOR)) {"," extProto.destructor.apply(this, arguments);"," }"," }"," }",""," if (constrProto.hasOwnProperty(DESTRUCTOR)) {"," constrProto.destructor.apply(this, arguments);"," }"," }"," },",""," /**"," * Default toString implementation. Provides the constructor NAME"," * and the instance guid, if set."," *"," * @method toString"," * @return {String} String representation for this object"," */"," toString: function() {"," return this.name + \"[\" + Y.stamp(this, true) + \"]\";"," }"," };",""," // Straightup augment, no wrapper functions"," Y.mix(BaseCore, AttributeCore, false, null, 1);",""," // Fix constructor"," BaseCore.prototype.constructor = BaseCore;",""," Y.BaseCore = BaseCore;","","","}, '3.7.3', {\"requires\": [\"attribute-core\"]});"]; -_yuitest_coverage["build/base-core/base-core.js"].lines = {"1":0,"21":0,"36":0,"37":0,"38":0,"39":0,"42":0,"66":0,"67":0,"68":0,"70":0,"83":0,"84":0,"99":0,"126":0,"143":0,"173":0,"184":0,"186":0,"190":0,"191":0,"192":0,"195":0,"204":0,"206":0,"216":0,"230":0,"232":0,"242":0,"244":0,"246":0,"248":0,"259":0,"260":0,"270":0,"271":0,"273":0,"274":0,"287":0,"288":0,"290":0,"304":0,"305":0,"307":0,"327":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"339":0,"354":0,"358":0,"359":0,"360":0,"361":0,"362":0,"369":0,"381":0,"389":0,"391":0,"394":0,"395":0,"398":0,"399":0,"400":0,"401":0,"402":0,"407":0,"410":0,"411":0,"412":0,"423":0,"441":0,"452":0,"453":0,"454":0,"456":0,"457":0,"460":0,"462":0,"463":0,"465":0,"466":0,"467":0,"468":0,"469":0,"475":0,"476":0,"477":0,"478":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"488":0,"489":0,"491":0,"499":0,"513":0,"525":0,"527":0,"528":0,"529":0,"531":0,"532":0,"533":0,"537":0,"539":0,"540":0,"545":0,"546":0,"549":0,"550":0,"551":0,"552":0,"553":0,"568":0,"573":0,"574":0,"575":0,"576":0,"578":0,"579":0,"580":0,"581":0,"582":0,"587":0,"588":0,"601":0,"606":0,"609":0,"611":0}; -_yuitest_coverage["build/base-core/base-core.js"].functions = {"_wlmix:35":0,"BaseCore:66":0,"_initBase:182":0,"_initAttribute:215":0,"init:228":0,"_baseInit:241":0,"destroy:258":0,"_baseDestroy:269":0,"_getClasses:286":0,"_getAttrCfgs:303":0,"_filterAttrCfgs:326":0,"_filterAdHocAttrs:353":0,"_initHierarchyData:380":0,"_attrCfgHash:422":0,"_aggregateAttrs:440":0,"_initHierarchy:512":0,"_destroyHierarchy:567":0,"toString:600":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/base-core/base-core.js"].coveredLines = 136; -_yuitest_coverage["build/base-core/base-core.js"].coveredFunctions = 19; -_yuitest_coverline("build/base-core/base-core.js", 1); -YUI.add('base-core', function (Y, NAME) { - - /** - * The base module provides the Base class, which objects requiring attribute and custom event support can extend. - * The module also provides two ways to reuse code - It augments Base with the Plugin.Host interface which provides - * plugin support and also provides the BaseCore.build method which provides a way to build custom classes using extensions. - * - * @module base - */ - - /** - *The base-core module provides the BaseCore class, the lightest version of Base, - * which provides Base's basic lifecycle management and ATTRS construction support, - * but doesn't fire init/destroy or attribute change events.
- * - *It mixes in AttributeCore, which is the lightest version of Attribute
- * - * @module base - * @submodule base-core - */ - _yuitest_coverfunc("build/base-core/base-core.js", "(anonymous 1)", 1); -_yuitest_coverline("build/base-core/base-core.js", 21); -var O = Y.Object, - L = Y.Lang, - DOT = ".", - INITIALIZED = "initialized", - DESTROYED = "destroyed", - INITIALIZER = "initializer", - VALUE = "value", - OBJECT_CONSTRUCTOR = Object.prototype.constructor, - DEEP = "deep", - SHALLOW = "shallow", - DESTRUCTOR = "destructor", - - AttributeCore = Y.AttributeCore, - - _wlmix = function(r, s, wlhash) { - _yuitest_coverfunc("build/base-core/base-core.js", "_wlmix", 35); -_yuitest_coverline("build/base-core/base-core.js", 36); -var p; - _yuitest_coverline("build/base-core/base-core.js", 37); -for (p in s) { - _yuitest_coverline("build/base-core/base-core.js", 38); -if(wlhash[p]) { - _yuitest_coverline("build/base-core/base-core.js", 39); -r[p] = s[p]; - } - } - _yuitest_coverline("build/base-core/base-core.js", 42); -return r; - }; - - /** - * The BaseCore class, is the lightest version of Base, and provides Base's - * basic lifecycle management and ATTRS construction support, but doesn't - * fire init/destroy or attribute change events. - * - * BaseCore also handles the chaining of initializer and destructor methods across - * the hierarchy as part of object construction and destruction. Additionally, attributes - * configured through the static ATTRS - * property for each class in the hierarchy will be initialized by BaseCore. - * - * Classes which require attribute support, but don't intend to use/expose attribute - * change events can extend BaseCore instead of Base for optimal kweight and - * runtime performance. - * - * @class BaseCore - * @constructor - * @uses AttributeCore - * @param {Object} cfg Object with configuration property name/value pairs. - * The object can be used to provide initial values for the objects published - * attributes. - */ - _yuitest_coverline("build/base-core/base-core.js", 66); -function BaseCore(cfg) { - _yuitest_coverfunc("build/base-core/base-core.js", "BaseCore", 66); -_yuitest_coverline("build/base-core/base-core.js", 67); -if (!this._BaseInvoked) { - _yuitest_coverline("build/base-core/base-core.js", 68); -this._BaseInvoked = true; - - _yuitest_coverline("build/base-core/base-core.js", 70); -this._initBase(cfg); - } - } - - /** - * The list of properties which can be configured for each attribute - * (e.g. setter, getter, writeOnce, readOnly etc.) - * - * @property _ATTR_CFG - * @type Array - * @static - * @private - */ - _yuitest_coverline("build/base-core/base-core.js", 83); -BaseCore._ATTR_CFG = AttributeCore._ATTR_CFG.concat("cloneDefaultValue"); - _yuitest_coverline("build/base-core/base-core.js", 84); -BaseCore._ATTR_CFG_HASH = Y.Array.hash(BaseCore._ATTR_CFG); - - /** - * The array of non-attribute configuration properties supported by this class. - * - * For example `BaseCore` defines a "plugins" configuration property which - * should not be set up as an attribute. This property is primarily required so - * that when `_allowAdHocAttrs` is enabled by a class, - * non-attribute configuration properties don't get added as ad-hoc attributes. - * - * @property _NON_ATTRS_CFG - * @type Array - * @static - * @private - */ - _yuitest_coverline("build/base-core/base-core.js", 99); -BaseCore._NON_ATTRS_CFG = ["plugins"]; - - /** - * This property controls whether or not instances of this class should - * allow users to add ad-hoc attributes through the constructor configuration - * hash. - * - * AdHoc attributes are attributes which are not defined by the class, and are - * not handled by the MyClass._NON_ATTRS_CFG - * - * @property _allowAdHocAttrs - * @type boolean - * @default undefined (false) - * @protected - */ - - /** - * The string to be used to identify instances of this class. - * - * Classes extending BaseCore, should define their own - * static NAME property, which should be camelCase by - * convention (e.g. MyClass.NAME = "myClass";). - * - * @property NAME - * @type String - * @static - */ - _yuitest_coverline("build/base-core/base-core.js", 126); -BaseCore.NAME = "baseCore"; - - /** - * The default set of attributes which will be available for instances of this class, and - * their configuration. In addition to the configuration properties listed by - * AttributeCore's addAttr method, - * the attribute can also be configured with a "cloneDefaultValue" property, which - * defines how the statically defined value field should be protected - * ("shallow", "deep" and false are supported values). - * - * By default if the value is an object literal or an array it will be "shallow" - * cloned, to protect the default value. - * - * @property ATTRS - * @type Object - * @static - */ - _yuitest_coverline("build/base-core/base-core.js", 143); -BaseCore.ATTRS = { - /** - * Flag indicating whether or not this object - * has been through the init lifecycle phase. - * - * @attribute initialized - * @readonly - * @default false - * @type boolean - */ - initialized: { - readOnly:true, - value:false - }, - - /** - * Flag indicating whether or not this object - * has been through the destroy lifecycle phase. - * - * @attribute destroyed - * @readonly - * @default false - * @type boolean - */ - destroyed: { - readOnly:true, - value:false - } - }; - - _yuitest_coverline("build/base-core/base-core.js", 173); -BaseCore.prototype = { - - /** - * Internal construction logic for BaseCore. - * - * @method _initBase - * @param {Object} config The constructor configuration object - * @private - */ - _initBase : function(config) { - - _yuitest_coverfunc("build/base-core/base-core.js", "_initBase", 182); -_yuitest_coverline("build/base-core/base-core.js", 184); -Y.stamp(this); - - _yuitest_coverline("build/base-core/base-core.js", 186); -this._initAttribute(config); - - // If Plugin.Host has been augmented [ through base-pluginhost ], setup it's - // initial state, but don't initialize Plugins yet. That's done after initialization. - _yuitest_coverline("build/base-core/base-core.js", 190); -var PluginHost = Y.Plugin && Y.Plugin.Host; - _yuitest_coverline("build/base-core/base-core.js", 191); -if (this._initPlugins && PluginHost) { - _yuitest_coverline("build/base-core/base-core.js", 192); -PluginHost.call(this); - } - - _yuitest_coverline("build/base-core/base-core.js", 195); -if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; } - - /** - * The string used to identify the class of this object. - * - * @deprecated Use this.constructor.NAME - * @property name - * @type String - */ - _yuitest_coverline("build/base-core/base-core.js", 204); -this.name = this.constructor.NAME; - - _yuitest_coverline("build/base-core/base-core.js", 206); -this.init.apply(this, arguments); - }, - - /** - * Initializes AttributeCore - * - * @method _initAttribute - * @private - */ - _initAttribute: function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_initAttribute", 215); -_yuitest_coverline("build/base-core/base-core.js", 216); -AttributeCore.apply(this); - }, - - /** - * Init lifecycle method, invoked during construction. Sets up attributes - * and invokes initializers for the class hierarchy. - * - * @method init - * @chainable - * @param {Object} cfg Object with configuration property name/value pairs - * @return {BaseCore} A reference to this object - */ - init: function(cfg) { - - _yuitest_coverfunc("build/base-core/base-core.js", "init", 228); -_yuitest_coverline("build/base-core/base-core.js", 230); -this._baseInit(cfg); - - _yuitest_coverline("build/base-core/base-core.js", 232); -return this; - }, - - /** - * Internal initialization implementation for BaseCore - * - * @method _baseInit - * @private - */ - _baseInit: function(cfg) { - _yuitest_coverfunc("build/base-core/base-core.js", "_baseInit", 241); -_yuitest_coverline("build/base-core/base-core.js", 242); -this._initHierarchy(cfg); - - _yuitest_coverline("build/base-core/base-core.js", 244); -if (this._initPlugins) { - // Need to initPlugins manually, to handle constructor parsing, static Plug parsing - _yuitest_coverline("build/base-core/base-core.js", 246); -this._initPlugins(cfg); - } - _yuitest_coverline("build/base-core/base-core.js", 248); -this._set(INITIALIZED, true); - }, - - /** - * Destroy lifecycle method. Invokes destructors for the class hierarchy. - * - * @method destroy - * @return {BaseCore} A reference to this object - * @chainable - */ - destroy: function() { - _yuitest_coverfunc("build/base-core/base-core.js", "destroy", 258); -_yuitest_coverline("build/base-core/base-core.js", 259); -this._baseDestroy(); - _yuitest_coverline("build/base-core/base-core.js", 260); -return this; - }, - - /** - * Internal destroy implementation for BaseCore - * - * @method _baseDestroy - * @private - */ - _baseDestroy : function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_baseDestroy", 269); -_yuitest_coverline("build/base-core/base-core.js", 270); -if (this._destroyPlugins) { - _yuitest_coverline("build/base-core/base-core.js", 271); -this._destroyPlugins(); - } - _yuitest_coverline("build/base-core/base-core.js", 273); -this._destroyHierarchy(); - _yuitest_coverline("build/base-core/base-core.js", 274); -this._set(DESTROYED, true); - }, - - /** - * Returns the class hierarchy for this object, with BaseCore being the last class in the array. - * - * @method _getClasses - * @protected - * @return {Function[]} An array of classes (constructor functions), making up the class hierarchy for this object. - * This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the - * cached value. - */ - _getClasses : function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_getClasses", 286); -_yuitest_coverline("build/base-core/base-core.js", 287); -if (!this._classes) { - _yuitest_coverline("build/base-core/base-core.js", 288); -this._initHierarchyData(); - } - _yuitest_coverline("build/base-core/base-core.js", 290); -return this._classes; - }, - - /** - * Returns an aggregated set of attribute configurations, by traversing - * the class hierarchy. - * - * @method _getAttrCfgs - * @protected - * @return {Object} The hash of attribute configurations, aggregated across classes in the hierarchy - * This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return - * the cached value. - */ - _getAttrCfgs : function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_getAttrCfgs", 303); -_yuitest_coverline("build/base-core/base-core.js", 304); -if (!this._attrs) { - _yuitest_coverline("build/base-core/base-core.js", 305); -this._initHierarchyData(); - } - _yuitest_coverline("build/base-core/base-core.js", 307); -return this._attrs; - }, - - /** - * A helper method used when processing ATTRS across the class hierarchy during - * initialization. Returns a disposable object with the attributes defined for - * the provided class, extracted from the set of all attributes passed in. - * - * @method _filterAttrCfs - * @private - * - * @param {Function} clazz The class for which the desired attributes are required. - * @param {Object} allCfgs The set of all attribute configurations for this instance. - * Attributes will be removed from this set, if they belong to the filtered class, so - * that by the time all classes are processed, allCfgs will be empty. - * - * @return {Object} The set of attributes belonging to the class passed in, in the form - * of an object with attribute name/configuration pairs. - */ - _filterAttrCfgs : function(clazz, allCfgs) { - _yuitest_coverfunc("build/base-core/base-core.js", "_filterAttrCfgs", 326); -_yuitest_coverline("build/base-core/base-core.js", 327); -var cfgs = null, attr, attrs = clazz.ATTRS; - - _yuitest_coverline("build/base-core/base-core.js", 329); -if (attrs) { - _yuitest_coverline("build/base-core/base-core.js", 330); -for (attr in attrs) { - _yuitest_coverline("build/base-core/base-core.js", 331); -if (allCfgs[attr]) { - _yuitest_coverline("build/base-core/base-core.js", 332); -cfgs = cfgs || {}; - _yuitest_coverline("build/base-core/base-core.js", 333); -cfgs[attr] = allCfgs[attr]; - _yuitest_coverline("build/base-core/base-core.js", 334); -allCfgs[attr] = null; - } - } - } - - _yuitest_coverline("build/base-core/base-core.js", 339); -return cfgs; - }, - - /** - * @method _filterAdHocAttrs - * @private - * - * @param {Object} allAttrs The set of all attribute configurations for this instance. - * Attributes will be removed from this set, if they belong to the filtered class, so - * that by the time all classes are processed, allCfgs will be empty. - * @param {Object} userVals The config object passed in by the user, from which adhoc attrs are to be filtered. - * @return {Object} The set of adhoc attributes passed in, in the form - * of an object with attribute name/configuration pairs. - */ - _filterAdHocAttrs : function(allAttrs, userVals) { - _yuitest_coverfunc("build/base-core/base-core.js", "_filterAdHocAttrs", 353); -_yuitest_coverline("build/base-core/base-core.js", 354); -var adHocs, - nonAttrs = this._nonAttrs, - attr; - - _yuitest_coverline("build/base-core/base-core.js", 358); -if (userVals) { - _yuitest_coverline("build/base-core/base-core.js", 359); -adHocs = {}; - _yuitest_coverline("build/base-core/base-core.js", 360); -for (attr in userVals) { - _yuitest_coverline("build/base-core/base-core.js", 361); -if (!allAttrs[attr] && !nonAttrs[attr] && userVals.hasOwnProperty(attr)) { - _yuitest_coverline("build/base-core/base-core.js", 362); -adHocs[attr] = { - value:userVals[attr] - }; - } - } - } - - _yuitest_coverline("build/base-core/base-core.js", 369); -return adHocs; - }, - - /** - * A helper method used by _getClasses and _getAttrCfgs, which determines both - * the array of classes and aggregate set of attribute configurations - * across the class hierarchy for the instance. - * - * @method _initHierarchyData - * @private - */ - _initHierarchyData : function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_initHierarchyData", 380); -_yuitest_coverline("build/base-core/base-core.js", 381); -var c = this.constructor, - i, - l, - nonAttrsCfg, - nonAttrs = (this._allowAdHocAttrs) ? {} : null, - classes = [], - attrs = []; - - _yuitest_coverline("build/base-core/base-core.js", 389); -while (c) { - // Add to classes - _yuitest_coverline("build/base-core/base-core.js", 391); -classes[classes.length] = c; - - // Add to attributes - _yuitest_coverline("build/base-core/base-core.js", 394); -if (c.ATTRS) { - _yuitest_coverline("build/base-core/base-core.js", 395); -attrs[attrs.length] = c.ATTRS; - } - - _yuitest_coverline("build/base-core/base-core.js", 398); -if (this._allowAdHocAttrs) { - _yuitest_coverline("build/base-core/base-core.js", 399); -nonAttrsCfg = c._NON_ATTRS_CFG; - _yuitest_coverline("build/base-core/base-core.js", 400); -if (nonAttrsCfg) { - _yuitest_coverline("build/base-core/base-core.js", 401); -for (i = 0, l = nonAttrsCfg.length; i < l; i++) { - _yuitest_coverline("build/base-core/base-core.js", 402); -nonAttrs[nonAttrsCfg[i]] = true; - } - } - } - - _yuitest_coverline("build/base-core/base-core.js", 407); -c = c.superclass ? c.superclass.constructor : null; - } - - _yuitest_coverline("build/base-core/base-core.js", 410); -this._classes = classes; - _yuitest_coverline("build/base-core/base-core.js", 411); -this._nonAttrs = nonAttrs; - _yuitest_coverline("build/base-core/base-core.js", 412); -this._attrs = this._aggregateAttrs(attrs); - }, - - /** - * Utility method to define the attribute hash used to filter/whitelist property mixes for - * this class. - * - * @method _attrCfgHash - * @private - */ - _attrCfgHash: function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_attrCfgHash", 422); -_yuitest_coverline("build/base-core/base-core.js", 423); -return BaseCore._ATTR_CFG_HASH; - }, - - /** - * A helper method, used by _initHierarchyData to aggregate - * attribute configuration across the instances class hierarchy. - * - * The method will protect the attribute configuration value to protect the statically defined - * default value in ATTRS if required (if the value is an object literal, array or the - * attribute configuration has cloneDefaultValue set to shallow or deep). - * - * @method _aggregateAttrs - * @private - * @param {Array} allAttrs An array of ATTRS definitions across classes in the hierarchy - * (subclass first, Base last) - * @return {Object} The aggregate set of ATTRS definitions for the instance - */ - _aggregateAttrs : function(allAttrs) { - _yuitest_coverfunc("build/base-core/base-core.js", "_aggregateAttrs", 440); -_yuitest_coverline("build/base-core/base-core.js", 441); -var attr, - attrs, - cfg, - val, - path, - i, - clone, - cfgPropsHash = this._attrCfgHash(), - aggAttr, - aggAttrs = {}; - - _yuitest_coverline("build/base-core/base-core.js", 452); -if (allAttrs) { - _yuitest_coverline("build/base-core/base-core.js", 453); -for (i = allAttrs.length-1; i >= 0; --i) { - _yuitest_coverline("build/base-core/base-core.js", 454); -attrs = allAttrs[i]; - - _yuitest_coverline("build/base-core/base-core.js", 456); -for (attr in attrs) { - _yuitest_coverline("build/base-core/base-core.js", 457); -if (attrs.hasOwnProperty(attr)) { - - // Protect config passed in - _yuitest_coverline("build/base-core/base-core.js", 460); -cfg = _wlmix({}, attrs[attr], cfgPropsHash); - - _yuitest_coverline("build/base-core/base-core.js", 462); -val = cfg.value; - _yuitest_coverline("build/base-core/base-core.js", 463); -clone = cfg.cloneDefaultValue; - - _yuitest_coverline("build/base-core/base-core.js", 465); -if (val) { - _yuitest_coverline("build/base-core/base-core.js", 466); -if ( (clone === undefined && (OBJECT_CONSTRUCTOR === val.constructor || L.isArray(val))) || clone === DEEP || clone === true) { - _yuitest_coverline("build/base-core/base-core.js", 467); -cfg.value = Y.clone(val); - } else {_yuitest_coverline("build/base-core/base-core.js", 468); -if (clone === SHALLOW) { - _yuitest_coverline("build/base-core/base-core.js", 469); -cfg.value = Y.merge(val); - }} - // else if (clone === false), don't clone the static default value. - // It's intended to be used by reference. - } - - _yuitest_coverline("build/base-core/base-core.js", 475); -path = null; - _yuitest_coverline("build/base-core/base-core.js", 476); -if (attr.indexOf(DOT) !== -1) { - _yuitest_coverline("build/base-core/base-core.js", 477); -path = attr.split(DOT); - _yuitest_coverline("build/base-core/base-core.js", 478); -attr = path.shift(); - } - - _yuitest_coverline("build/base-core/base-core.js", 481); -aggAttr = aggAttrs[attr]; - _yuitest_coverline("build/base-core/base-core.js", 482); -if (path && aggAttr && aggAttr.value) { - _yuitest_coverline("build/base-core/base-core.js", 483); -O.setValue(aggAttr.value, path, val); - } else {_yuitest_coverline("build/base-core/base-core.js", 484); -if (!path) { - _yuitest_coverline("build/base-core/base-core.js", 485); -if (!aggAttr) { - _yuitest_coverline("build/base-core/base-core.js", 486); -aggAttrs[attr] = cfg; - } else { - _yuitest_coverline("build/base-core/base-core.js", 488); -if (aggAttr.valueFn && VALUE in cfg) { - _yuitest_coverline("build/base-core/base-core.js", 489); -aggAttr.valueFn = null; - } - _yuitest_coverline("build/base-core/base-core.js", 491); -_wlmix(aggAttr, cfg, cfgPropsHash); - } - }} - } - } - } - } - - _yuitest_coverline("build/base-core/base-core.js", 499); -return aggAttrs; - }, - - /** - * Initializes the class hierarchy for the instance, which includes - * initializing attributes for each class defined in the class's - * static ATTRS property and - * invoking the initializer method on the prototype of each class in the hierarchy. - * - * @method _initHierarchy - * @param {Object} userVals Object with configuration property name/value pairs - * @private - */ - _initHierarchy : function(userVals) { - _yuitest_coverfunc("build/base-core/base-core.js", "_initHierarchy", 512); -_yuitest_coverline("build/base-core/base-core.js", 513); -var lazy = this._lazyAddAttrs, - constr, - constrProto, - ci, - ei, - el, - extProto, - exts, - classes = this._getClasses(), - attrCfgs = this._getAttrCfgs(), - cl = classes.length - 1; - - _yuitest_coverline("build/base-core/base-core.js", 525); -for (ci = cl; ci >= 0; ci--) { - - _yuitest_coverline("build/base-core/base-core.js", 527); -constr = classes[ci]; - _yuitest_coverline("build/base-core/base-core.js", 528); -constrProto = constr.prototype; - _yuitest_coverline("build/base-core/base-core.js", 529); -exts = constr._yuibuild && constr._yuibuild.exts; - - _yuitest_coverline("build/base-core/base-core.js", 531); -if (exts) { - _yuitest_coverline("build/base-core/base-core.js", 532); -for (ei = 0, el = exts.length; ei < el; ei++) { - _yuitest_coverline("build/base-core/base-core.js", 533); -exts[ei].apply(this, arguments); - } - } - - _yuitest_coverline("build/base-core/base-core.js", 537); -this.addAttrs(this._filterAttrCfgs(constr, attrCfgs), userVals, lazy); - - _yuitest_coverline("build/base-core/base-core.js", 539); -if (this._allowAdHocAttrs && ci === cl) { - _yuitest_coverline("build/base-core/base-core.js", 540); -this.addAttrs(this._filterAdHocAttrs(attrCfgs, userVals), userVals, lazy); - } - - // Using INITIALIZER in hasOwnProperty check, for performance reasons (helps IE6 avoid GC thresholds when - // referencing string literals). Not using it in apply, again, for performance "." is faster. - _yuitest_coverline("build/base-core/base-core.js", 545); -if (constrProto.hasOwnProperty(INITIALIZER)) { - _yuitest_coverline("build/base-core/base-core.js", 546); -constrProto.initializer.apply(this, arguments); - } - - _yuitest_coverline("build/base-core/base-core.js", 549); -if (exts) { - _yuitest_coverline("build/base-core/base-core.js", 550); -for (ei = 0; ei < el; ei++) { - _yuitest_coverline("build/base-core/base-core.js", 551); -extProto = exts[ei].prototype; - _yuitest_coverline("build/base-core/base-core.js", 552); -if (extProto.hasOwnProperty(INITIALIZER)) { - _yuitest_coverline("build/base-core/base-core.js", 553); -extProto.initializer.apply(this, arguments); - } - } - } - } - }, - - /** - * Destroys the class hierarchy for this instance by invoking - * the destructor method on the prototype of each class in the hierarchy. - * - * @method _destroyHierarchy - * @private - */ - _destroyHierarchy : function() { - _yuitest_coverfunc("build/base-core/base-core.js", "_destroyHierarchy", 567); -_yuitest_coverline("build/base-core/base-core.js", 568); -var constr, - constrProto, - ci, cl, ei, el, exts, extProto, - classes = this._getClasses(); - - _yuitest_coverline("build/base-core/base-core.js", 573); -for (ci = 0, cl = classes.length; ci < cl; ci++) { - _yuitest_coverline("build/base-core/base-core.js", 574); -constr = classes[ci]; - _yuitest_coverline("build/base-core/base-core.js", 575); -constrProto = constr.prototype; - _yuitest_coverline("build/base-core/base-core.js", 576); -exts = constr._yuibuild && constr._yuibuild.exts; - - _yuitest_coverline("build/base-core/base-core.js", 578); -if (exts) { - _yuitest_coverline("build/base-core/base-core.js", 579); -for (ei = 0, el = exts.length; ei < el; ei++) { - _yuitest_coverline("build/base-core/base-core.js", 580); -extProto = exts[ei].prototype; - _yuitest_coverline("build/base-core/base-core.js", 581); -if (extProto.hasOwnProperty(DESTRUCTOR)) { - _yuitest_coverline("build/base-core/base-core.js", 582); -extProto.destructor.apply(this, arguments); - } - } - } - - _yuitest_coverline("build/base-core/base-core.js", 587); -if (constrProto.hasOwnProperty(DESTRUCTOR)) { - _yuitest_coverline("build/base-core/base-core.js", 588); -constrProto.destructor.apply(this, arguments); - } - } - }, - - /** - * Default toString implementation. Provides the constructor NAME - * and the instance guid, if set. - * - * @method toString - * @return {String} String representation for this object - */ - toString: function() { - _yuitest_coverfunc("build/base-core/base-core.js", "toString", 600); -_yuitest_coverline("build/base-core/base-core.js", 601); -return this.name + "[" + Y.stamp(this, true) + "]"; - } - }; - - // Straightup augment, no wrapper functions - _yuitest_coverline("build/base-core/base-core.js", 606); -Y.mix(BaseCore, AttributeCore, false, null, 1); - - // Fix constructor - _yuitest_coverline("build/base-core/base-core.js", 609); -BaseCore.prototype.constructor = BaseCore; - - _yuitest_coverline("build/base-core/base-core.js", 611); -Y.BaseCore = BaseCore; - - -}, '3.7.3', {"requires": ["attribute-core"]}); diff --git a/lib/yuilib/3.7.3/build/base-core/base-core-min.js b/lib/yuilib/3.7.3/build/base-core/base-core-min.js deleted file mode 100644 index 84f4b8aca26..00000000000 --- a/lib/yuilib/3.7.3/build/base-core/base-core-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("base-core",function(e,t){function v(e){this._BaseInvoked||(this._BaseInvoked=!0,this._initBase(e))}var n=e.Object,r=e.Lang,i=".",s="initialized",o="destroyed",u="initializer",a="value",f=Object.prototype.constructor,l="deep",c="shallow",h="destructor",p=e.AttributeCore,d=function(e,t,n){var r;for(r in t)n[r]&&(e[r]=t[r]);return e};v._ATTR_CFG=p._ATTR_CFG.concat("cloneDefaultValue"),v._ATTR_CFG_HASH=e.Array.hash(v._ATTR_CFG),v._NON_ATTRS_CFG=["plugins"],v.NAME="baseCore",v.ATTRS={initialized:{readOnly:!0,value:!1},destroyed:{readOnly:!0,value:!1}},v.prototype={_initBase:function(t){e.stamp(this),this._initAttribute(t);var n=e.Plugin&&e.Plugin.Host;this._initPlugins&&n&&n.call(this),this._lazyAddAttrs!==!1&&(this._lazyAddAttrs=!0),this.name=this.constructor.NAME,this.init.apply(this,arguments)},_initAttribute:function(){p.apply(this)},init:function(e){return this._baseInit(e),this},_baseInit:function(e){this._initHierarchy(e),this._initPlugins&&this._initPlugins(e),this._set(s,!0)},destroy:function(){return this._baseDestroy(),this},_baseDestroy:function(){this._destroyPlugins&&this._destroyPlugins(),this._destroyHierarchy(),this._set(o,!0)},_getClasses:function(){return this._classes||this._initHierarchyData(),this._classes},_getAttrCfgs:function(){return this._attrs||this._initHierarchyData(),this._attrs},_filterAttrCfgs:function(e,t){var n=null,r,i=e.ATTRS;if(i)for(r in i)t[r]&&(n=n||{},n[r]=t[r],t[r]=null);return n},_filterAdHocAttrs:function(e,t){var n,r=this._nonAttrs,i;if(t){n={};for(i in t)!e[i]&&!r[i]&&t.hasOwnProperty(i)&&(n[i]={value:t[i]})}return n},_initHierarchyData:function(){var e=this.constructor,t,n,r,i=this._allowAdHocAttrs?{}:null,s=[],o=[];while(e){s[s.length]=e,e.ATTRS&&(o[o.length]=e.ATTRS);if(this._allowAdHocAttrs){r=e._NON_ATTRS_CFG;if(r)for(t=0,n=r.length;tY.config.doc to change the document that the cookie"," * utility uses for everyday purposes."," * @param {Object} newDoc The object to use as the document."," * @return {void}"," * @method _setDoc"," * @private"," */ "," _setDoc: function(newDoc){"," doc = newDoc;"," },"," "," //-------------------------------------------------------------------------"," // Public Methods"," //-------------------------------------------------------------------------"," "," /**"," * Determines if the cookie with the given name exists. This is useful for"," * Boolean cookies (those that do not follow the name=value convention)."," * @param {String} name The name of the cookie to check."," * @return {Boolean} True if the cookie exists, false if not."," * @method exists"," * @static"," */"," exists: function(name) {"," "," validateCookieName(name); //throws error"," "," var cookies = this._parseCookieString(doc.cookie, true);"," "," return cookies.hasOwnProperty(name);"," }, "," "," /**"," * Returns the cookie value for the given name."," * @param {String} name The name of the cookie to retrieve."," * @param {Function|Object} options (Optional) An object containing one or more"," * cookie options: raw (true/false) and converter (a function)."," * The converter function is run on the value before returning it. The"," * function is not used if the cookie doesn't exist. The function can be"," * passed instead of the options object for backwards compatibility. When"," * raw is set to true, the cookie value is not URI decoded."," * @return {Variant} If no converter is specified, returns a string or null if"," * the cookie doesn't exist. If the converter is specified, returns the value"," * returned from the converter or null if the cookie doesn't exist."," * @method get"," * @static"," */"," get : function (name, options) {"," "," validateCookieName(name); //throws error "," "," var cookies,"," cookie,"," converter;"," "," //if options is a function, then it's the converter"," if (isFunction(options)) {"," converter = options;"," options = {};"," } else if (isObject(options)) {"," converter = options.converter;"," } else {"," options = {};"," }"," "," cookies = this._parseCookieString(doc.cookie, !options.raw);"," cookie = cookies[name];"," "," //should return null, not undefined if the cookie doesn't exist"," if (isUndefined(cookie)) {"," return NULL;"," }"," "," if (!isFunction(converter)){"," return cookie;"," } else {"," return converter(cookie);"," }"," },"," "," /**"," * Returns the value of a subcookie."," * @param {String} name The name of the cookie to retrieve."," * @param {String} subName The name of the subcookie to retrieve."," * @param {Function} converter (Optional) A function to run on the value before returning"," * it. The function is not used if the cookie doesn't exist."," * @return {Variant} If the cookie doesn't exist, null is returned. If the subcookie"," * doesn't exist, null if also returned. If no converter is specified and the"," * subcookie exists, a string is returned. If a converter is specified and the"," * subcookie exists, the value returned from the converter is returned."," * @method getSub"," * @static"," */"," getSub : function (name /*:String*/, subName /*:String*/, converter /*:Function*/) /*:Variant*/ {"," "," var hash /*:Variant*/ = this.getSubs(name); "," "," if (hash !== NULL) {"," "," validateSubcookieName(subName); //throws error"," "," if (isUndefined(hash[subName])){"," return NULL;"," } "," "," if (!isFunction(converter)){"," return hash[subName];"," } else {"," return converter(hash[subName]);"," }"," } else {"," return NULL;"," }"," "," },"," "," /**"," * Returns an object containing name-value pairs stored in the cookie with the given name."," * @param {String} name The name of the cookie to retrieve."," * @return {Object} An object of name-value pairs if the cookie with the given name"," * exists, null if it does not."," * @method getSubs"," * @static"," */"," getSubs : function (name) {"," "," validateCookieName(name); //throws error"," "," var cookies = this._parseCookieString(doc.cookie, false);"," if (isString(cookies[name])){"," return this._parseCookieHash(cookies[name]);"," }"," return NULL;"," },"," "," /**"," * Removes a cookie from the machine by setting its expiration date to"," * sometime in the past."," * @param {String} name The name of the cookie to remove."," * @param {Object} options (Optional) An object containing one or more"," * cookie options: path (a string), domain (a string), "," * and secure (true/false). The expires option will be overwritten"," * by the method."," * @return {String} The created cookie string."," * @method remove"," * @static"," */"," remove : function (name, options) {"," "," validateCookieName(name); //throws error"," "," //set options"," options = Y.merge(options || {}, {"," expires: new Date(0)"," });"," "," //set cookie"," return this.set(name, \"\", options);"," },"," "," /**"," * Removes a sub cookie with a given name."," * @param {String} name The name of the cookie in which the subcookie exists."," * @param {String} subName The name of the subcookie to remove."," * @param {Object} options (Optional) An object containing one or more"," * cookie options: path (a string), domain (a string), expires (a Date object),"," * removeIfEmpty (true/false), and secure (true/false). This must be the same"," * settings as the original subcookie."," * @return {String} The created cookie string."," * @method removeSub"," * @static"," */"," removeSub : function(name, subName, options) {"," "," validateCookieName(name); //throws error"," "," validateSubcookieName(subName); //throws error"," "," options = options || {};"," "," //get all subcookies for this cookie"," var subs = this.getSubs(name);"," "," //delete the indicated subcookie"," if (isObject(subs) && subs.hasOwnProperty(subName)){"," delete subs[subName];"," "," if (!options.removeIfEmpty) {"," //reset the cookie"," "," return this.setSubs(name, subs, options);"," } else {"," //reset the cookie if there are subcookies left, else remove"," for (var key in subs){"," if (subs.hasOwnProperty(key) && !isFunction(subs[key]) && !isUndefined(subs[key])){"," return this.setSubs(name, subs, options);"," }"," }"," "," return this.remove(name, options);"," } "," } else {"," return \"\";"," }"," "," },"," "," /**"," * Sets a cookie with a given name and value."," * @param {String} name The name of the cookie to set."," * @param {Variant} value The value to set for the cookie."," * @param {Object} options (Optional) An object containing one or more"," * cookie options: path (a string), domain (a string), expires (a Date object),"," * secure (true/false), and raw (true/false). Setting raw to true indicates"," * that the cookie should not be URI encoded before being set."," * @return {String} The created cookie string."," * @method set"," * @static"," */"," set : function (name, value, options) {"," "," validateCookieName(name); //throws error"," "," if (isUndefined(value)){"," error(\"Cookie.set(): Value cannot be undefined.\");"," }"," "," options = options || {};"," "," var text = this._createCookieString(name, value, !options.raw, options);"," doc.cookie = text;"," return text;"," },"," "," /**"," * Sets a sub cookie with a given name to a particular value."," * @param {String} name The name of the cookie to set."," * @param {String} subName The name of the subcookie to set."," * @param {Variant} value The value to set."," * @param {Object} options (Optional) An object containing one or more"," * cookie options: path (a string), domain (a string), expires (a Date object),"," * and secure (true/false)."," * @return {String} The created cookie string."," * @method setSub"," * @static"," */"," setSub : function (name, subName, value, options) {",""," validateCookieName(name); //throws error"," "," validateSubcookieName(subName); //throws error"," "," if (isUndefined(value)){"," error(\"Cookie.setSub(): Subcookie value cannot be undefined.\");"," }"," "," var hash = this.getSubs(name);"," "," if (!isObject(hash)){"," hash = {};"," }"," "," hash[subName] = value; "," "," return this.setSubs(name, hash, options);"," "," },"," "," /**"," * Sets a cookie with a given name to contain a hash of name-value pairs."," * @param {String} name The name of the cookie to set."," * @param {Object} value An object containing name-value pairs."," * @param {Object} options (Optional) An object containing one or more"," * cookie options: path (a string), domain (a string), expires (a Date object),"," * and secure (true/false)."," * @return {String} The created cookie string."," * @method setSubs"," * @static"," */"," setSubs : function (name, value, options) {"," "," validateCookieName(name); //throws error"," "," if (!isObject(value)){"," error(\"Cookie.setSubs(): Cookie value must be an object.\");"," }"," "," var text /*:String*/ = this._createCookieString(name, this._createCookieHashString(value), false, options);"," doc.cookie = text;"," return text; "," } "," "," };","","","}, '3.7.3', {\"requires\": [\"yui-base\"]});"];
-_yuitest_coverage["build/cookie/cookie.js"].lines = {"1":0,"9":0,"27":0,"28":0,"34":0,"35":0,"36":0,"43":0,"44":0,"45":0,"54":0,"73":0,"75":0,"81":0,"83":0,"84":0,"88":0,"89":0,"93":0,"94":0,"98":0,"99":0,"103":0,"115":0,"116":0,"119":0,"121":0,"122":0,"123":0,"127":0,"140":0,"144":0,"145":0,"146":0,"147":0,"151":0,"165":0,"167":0,"169":0,"175":0,"178":0,"179":0,"180":0,"181":0,"182":0,"188":0,"189":0,"191":0,"196":0,"212":0,"229":0,"231":0,"233":0,"253":0,"255":0,"260":0,"261":0,"262":0,"263":0,"264":0,"266":0,"269":0,"270":0,"273":0,"274":0,"277":0,"278":0,"280":0,"299":0,"301":0,"303":0,"305":0,"306":0,"309":0,"310":0,"312":0,"315":0,"330":0,"332":0,"333":0,"334":0,"336":0,"353":0,"356":0,"361":0,"378":0,"380":0,"382":0,"385":0,"388":0,"389":0,"391":0,"394":0,"397":0,"398":0,"399":0,"403":0,"406":0,"425":0,"427":0,"428":0,"431":0,"433":0,"434":0,"435":0,"452":0,"454":0,"456":0,"457":0,"460":0,"462":0,"463":0,"466":0,"468":0,"485":0,"487":0,"488":0,"491":0,"492":0,"493":0};
-_yuitest_coverage["build/cookie/cookie.js"].functions = {"error:27":0,"validateCookieName:34":0,"validateSubcookieName:43":0,"_createCookieString:71":0,"(anonymous 2):121":0,"_createCookieHashString:114":0,"_parseCookieHash:138":0,"(anonymous 3):169":0,"_parseCookieString:163":0,"_setDoc:211":0,"exists:227":0,"get:251":0,"getSub:297":0,"getSubs:328":0,"remove:351":0,"removeSub:376":0,"set:423":0,"setSub:450":0,"setSubs:483":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/cookie/cookie.js"].coveredLines = 120;
-_yuitest_coverage["build/cookie/cookie.js"].coveredFunctions = 20;
-_yuitest_coverline("build/cookie/cookie.js", 1);
-YUI.add('cookie', function (Y, NAME) {
-
-/**
- * Utilities for cookie management
- * @module cookie
- */
-
- //shortcuts
- _yuitest_coverfunc("build/cookie/cookie.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/cookie/cookie.js", 9);
-var L = Y.Lang,
- O = Y.Object,
- NULL = null,
-
- //shortcuts to functions
- isString = L.isString,
- isObject = L.isObject,
- isUndefined = L.isUndefined,
- isFunction = L.isFunction,
- encode = encodeURIComponent,
- decode = decodeURIComponent,
-
- //shortcut to document
- doc = Y.config.doc;
-
- /*
- * Throws an error message.
- */
- _yuitest_coverline("build/cookie/cookie.js", 27);
-function error(message){
- _yuitest_coverfunc("build/cookie/cookie.js", "error", 27);
-_yuitest_coverline("build/cookie/cookie.js", 28);
-throw new TypeError(message);
- }
-
- /*
- * Checks the validity of a cookie name.
- */
- _yuitest_coverline("build/cookie/cookie.js", 34);
-function validateCookieName(name){
- _yuitest_coverfunc("build/cookie/cookie.js", "validateCookieName", 34);
-_yuitest_coverline("build/cookie/cookie.js", 35);
-if (!isString(name) || name === ""){
- _yuitest_coverline("build/cookie/cookie.js", 36);
-error("Cookie name must be a non-empty string.");
- }
- }
-
- /*
- * Checks the validity of a subcookie name.
- */
- _yuitest_coverline("build/cookie/cookie.js", 43);
-function validateSubcookieName(subName){
- _yuitest_coverfunc("build/cookie/cookie.js", "validateSubcookieName", 43);
-_yuitest_coverline("build/cookie/cookie.js", 44);
-if (!isString(subName) || subName === ""){
- _yuitest_coverline("build/cookie/cookie.js", 45);
-error("Subcookie name must be a non-empty string.");
- }
- }
-
- /**
- * Cookie utility.
- * @class Cookie
- * @static
- */
- _yuitest_coverline("build/cookie/cookie.js", 54);
-Y.Cookie = {
-
- //-------------------------------------------------------------------------
- // Private Methods
- //-------------------------------------------------------------------------
-
- /**
- * Creates a cookie string that can be assigned into document.cookie.
- * @param {String} name The name of the cookie.
- * @param {String} value The value of the cookie.
- * @param {Boolean} encodeValue True to encode the value, false to leave as-is.
- * @param {Object} options (Optional) Options for the cookie.
- * @return {String} The formatted cookie string.
- * @method _createCookieString
- * @private
- * @static
- */
- _createCookieString : function (name /*:String*/, value /*:Variant*/, encodeValue /*:Boolean*/, options /*:Object*/) /*:String*/ {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "_createCookieString", 71);
-_yuitest_coverline("build/cookie/cookie.js", 73);
-options = options || {};
-
- _yuitest_coverline("build/cookie/cookie.js", 75);
-var text /*:String*/ = encode(name) + "=" + (encodeValue ? encode(value) : value),
- expires = options.expires,
- path = options.path,
- domain = options.domain;
-
-
- _yuitest_coverline("build/cookie/cookie.js", 81);
-if (isObject(options)){
- //expiration date
- _yuitest_coverline("build/cookie/cookie.js", 83);
-if (expires instanceof Date){
- _yuitest_coverline("build/cookie/cookie.js", 84);
-text += "; expires=" + expires.toUTCString();
- }
-
- //path
- _yuitest_coverline("build/cookie/cookie.js", 88);
-if (isString(path) && path !== ""){
- _yuitest_coverline("build/cookie/cookie.js", 89);
-text += "; path=" + path;
- }
-
- //domain
- _yuitest_coverline("build/cookie/cookie.js", 93);
-if (isString(domain) && domain !== ""){
- _yuitest_coverline("build/cookie/cookie.js", 94);
-text += "; domain=" + domain;
- }
-
- //secure
- _yuitest_coverline("build/cookie/cookie.js", 98);
-if (options.secure === true){
- _yuitest_coverline("build/cookie/cookie.js", 99);
-text += "; secure";
- }
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 103);
-return text;
- },
-
- /**
- * Formats a cookie value for an object containing multiple values.
- * @param {Object} hash An object of key-value pairs to create a string for.
- * @return {String} A string suitable for use as a cookie value.
- * @method _createCookieHashString
- * @private
- * @static
- */
- _createCookieHashString : function (hash /*:Object*/) /*:String*/ {
- _yuitest_coverfunc("build/cookie/cookie.js", "_createCookieHashString", 114);
-_yuitest_coverline("build/cookie/cookie.js", 115);
-if (!isObject(hash)){
- _yuitest_coverline("build/cookie/cookie.js", 116);
-error("Cookie._createCookieHashString(): Argument must be an object.");
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 119);
-var text /*:Array*/ = [];
-
- _yuitest_coverline("build/cookie/cookie.js", 121);
-O.each(hash, function(value, key){
- _yuitest_coverfunc("build/cookie/cookie.js", "(anonymous 2)", 121);
-_yuitest_coverline("build/cookie/cookie.js", 122);
-if (!isFunction(value) && !isUndefined(value)){
- _yuitest_coverline("build/cookie/cookie.js", 123);
-text.push(encode(key) + "=" + encode(String(value)));
- }
- });
-
- _yuitest_coverline("build/cookie/cookie.js", 127);
-return text.join("&");
- },
-
- /**
- * Parses a cookie hash string into an object.
- * @param {String} text The cookie hash string to parse (format: n1=v1&n2=v2).
- * @return {Object} An object containing entries for each cookie value.
- * @method _parseCookieHash
- * @private
- * @static
- */
- _parseCookieHash : function (text) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "_parseCookieHash", 138);
-_yuitest_coverline("build/cookie/cookie.js", 140);
-var hashParts = text.split("&"),
- hashPart = NULL,
- hash = {};
-
- _yuitest_coverline("build/cookie/cookie.js", 144);
-if (text.length){
- _yuitest_coverline("build/cookie/cookie.js", 145);
-for (var i=0, len=hashParts.length; i < len; i++){
- _yuitest_coverline("build/cookie/cookie.js", 146);
-hashPart = hashParts[i].split("=");
- _yuitest_coverline("build/cookie/cookie.js", 147);
-hash[decode(hashPart[0])] = decode(hashPart[1]);
- }
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 151);
-return hash;
- },
-
- /**
- * Parses a cookie string into an object representing all accessible cookies.
- * @param {String} text The cookie string to parse.
- * @param {Boolean} shouldDecode (Optional) Indicates if the cookie values should be decoded or not. Default is true.
- * @return {Object} An object containing entries for each accessible cookie.
- * @method _parseCookieString
- * @private
- * @static
- */
- _parseCookieString : function (text /*:String*/, shouldDecode /*:Boolean*/) /*:Object*/ {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "_parseCookieString", 163);
-_yuitest_coverline("build/cookie/cookie.js", 165);
-var cookies /*:Object*/ = {};
-
- _yuitest_coverline("build/cookie/cookie.js", 167);
-if (isString(text) && text.length > 0) {
-
- _yuitest_coverline("build/cookie/cookie.js", 169);
-var decodeValue = (shouldDecode === false ? function(s){_yuitest_coverfunc("build/cookie/cookie.js", "(anonymous 3)", 169);
-return s;} : decode),
- cookieParts = text.split(/;\s/g),
- cookieName = NULL,
- cookieValue = NULL,
- cookieNameValue = NULL;
-
- _yuitest_coverline("build/cookie/cookie.js", 175);
-for (var i=0, len=cookieParts.length; i < len; i++){
-
- //check for normally-formatted cookie (name-value)
- _yuitest_coverline("build/cookie/cookie.js", 178);
-cookieNameValue = cookieParts[i].match(/([^=]+)=/i);
- _yuitest_coverline("build/cookie/cookie.js", 179);
-if (cookieNameValue instanceof Array){
- _yuitest_coverline("build/cookie/cookie.js", 180);
-try {
- _yuitest_coverline("build/cookie/cookie.js", 181);
-cookieName = decode(cookieNameValue[1]);
- _yuitest_coverline("build/cookie/cookie.js", 182);
-cookieValue = decodeValue(cookieParts[i].substring(cookieNameValue[1].length+1));
- } catch (ex){
- //intentionally ignore the cookie - the encoding is wrong
- }
- } else {
- //means the cookie does not have an "=", so treat it as a boolean flag
- _yuitest_coverline("build/cookie/cookie.js", 188);
-cookieName = decode(cookieParts[i]);
- _yuitest_coverline("build/cookie/cookie.js", 189);
-cookieValue = "";
- }
- _yuitest_coverline("build/cookie/cookie.js", 191);
-cookies[cookieName] = cookieValue;
- }
-
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 196);
-return cookies;
- },
-
- /**
- * Sets the document object that the cookie utility uses for setting
- * cookies. This method is necessary to ensure that the cookie utility
- * unit tests can pass even when run on a domain instead of locally.
- * This method should not be used otherwise; you should use
- * Y.config.doc to change the document that the cookie
- * utility uses for everyday purposes.
- * @param {Object} newDoc The object to use as the document.
- * @return {void}
- * @method _setDoc
- * @private
- */
- _setDoc: function(newDoc){
- _yuitest_coverfunc("build/cookie/cookie.js", "_setDoc", 211);
-_yuitest_coverline("build/cookie/cookie.js", 212);
-doc = newDoc;
- },
-
- //-------------------------------------------------------------------------
- // Public Methods
- //-------------------------------------------------------------------------
-
- /**
- * Determines if the cookie with the given name exists. This is useful for
- * Boolean cookies (those that do not follow the name=value convention).
- * @param {String} name The name of the cookie to check.
- * @return {Boolean} True if the cookie exists, false if not.
- * @method exists
- * @static
- */
- exists: function(name) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "exists", 227);
-_yuitest_coverline("build/cookie/cookie.js", 229);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 231);
-var cookies = this._parseCookieString(doc.cookie, true);
-
- _yuitest_coverline("build/cookie/cookie.js", 233);
-return cookies.hasOwnProperty(name);
- },
-
- /**
- * Returns the cookie value for the given name.
- * @param {String} name The name of the cookie to retrieve.
- * @param {Function|Object} options (Optional) An object containing one or more
- * cookie options: raw (true/false) and converter (a function).
- * The converter function is run on the value before returning it. The
- * function is not used if the cookie doesn't exist. The function can be
- * passed instead of the options object for backwards compatibility. When
- * raw is set to true, the cookie value is not URI decoded.
- * @return {Variant} If no converter is specified, returns a string or null if
- * the cookie doesn't exist. If the converter is specified, returns the value
- * returned from the converter or null if the cookie doesn't exist.
- * @method get
- * @static
- */
- get : function (name, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "get", 251);
-_yuitest_coverline("build/cookie/cookie.js", 253);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 255);
-var cookies,
- cookie,
- converter;
-
- //if options is a function, then it's the converter
- _yuitest_coverline("build/cookie/cookie.js", 260);
-if (isFunction(options)) {
- _yuitest_coverline("build/cookie/cookie.js", 261);
-converter = options;
- _yuitest_coverline("build/cookie/cookie.js", 262);
-options = {};
- } else {_yuitest_coverline("build/cookie/cookie.js", 263);
-if (isObject(options)) {
- _yuitest_coverline("build/cookie/cookie.js", 264);
-converter = options.converter;
- } else {
- _yuitest_coverline("build/cookie/cookie.js", 266);
-options = {};
- }}
-
- _yuitest_coverline("build/cookie/cookie.js", 269);
-cookies = this._parseCookieString(doc.cookie, !options.raw);
- _yuitest_coverline("build/cookie/cookie.js", 270);
-cookie = cookies[name];
-
- //should return null, not undefined if the cookie doesn't exist
- _yuitest_coverline("build/cookie/cookie.js", 273);
-if (isUndefined(cookie)) {
- _yuitest_coverline("build/cookie/cookie.js", 274);
-return NULL;
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 277);
-if (!isFunction(converter)){
- _yuitest_coverline("build/cookie/cookie.js", 278);
-return cookie;
- } else {
- _yuitest_coverline("build/cookie/cookie.js", 280);
-return converter(cookie);
- }
- },
-
- /**
- * Returns the value of a subcookie.
- * @param {String} name The name of the cookie to retrieve.
- * @param {String} subName The name of the subcookie to retrieve.
- * @param {Function} converter (Optional) A function to run on the value before returning
- * it. The function is not used if the cookie doesn't exist.
- * @return {Variant} If the cookie doesn't exist, null is returned. If the subcookie
- * doesn't exist, null if also returned. If no converter is specified and the
- * subcookie exists, a string is returned. If a converter is specified and the
- * subcookie exists, the value returned from the converter is returned.
- * @method getSub
- * @static
- */
- getSub : function (name /*:String*/, subName /*:String*/, converter /*:Function*/) /*:Variant*/ {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "getSub", 297);
-_yuitest_coverline("build/cookie/cookie.js", 299);
-var hash /*:Variant*/ = this.getSubs(name);
-
- _yuitest_coverline("build/cookie/cookie.js", 301);
-if (hash !== NULL) {
-
- _yuitest_coverline("build/cookie/cookie.js", 303);
-validateSubcookieName(subName); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 305);
-if (isUndefined(hash[subName])){
- _yuitest_coverline("build/cookie/cookie.js", 306);
-return NULL;
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 309);
-if (!isFunction(converter)){
- _yuitest_coverline("build/cookie/cookie.js", 310);
-return hash[subName];
- } else {
- _yuitest_coverline("build/cookie/cookie.js", 312);
-return converter(hash[subName]);
- }
- } else {
- _yuitest_coverline("build/cookie/cookie.js", 315);
-return NULL;
- }
-
- },
-
- /**
- * Returns an object containing name-value pairs stored in the cookie with the given name.
- * @param {String} name The name of the cookie to retrieve.
- * @return {Object} An object of name-value pairs if the cookie with the given name
- * exists, null if it does not.
- * @method getSubs
- * @static
- */
- getSubs : function (name) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "getSubs", 328);
-_yuitest_coverline("build/cookie/cookie.js", 330);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 332);
-var cookies = this._parseCookieString(doc.cookie, false);
- _yuitest_coverline("build/cookie/cookie.js", 333);
-if (isString(cookies[name])){
- _yuitest_coverline("build/cookie/cookie.js", 334);
-return this._parseCookieHash(cookies[name]);
- }
- _yuitest_coverline("build/cookie/cookie.js", 336);
-return NULL;
- },
-
- /**
- * Removes a cookie from the machine by setting its expiration date to
- * sometime in the past.
- * @param {String} name The name of the cookie to remove.
- * @param {Object} options (Optional) An object containing one or more
- * cookie options: path (a string), domain (a string),
- * and secure (true/false). The expires option will be overwritten
- * by the method.
- * @return {String} The created cookie string.
- * @method remove
- * @static
- */
- remove : function (name, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "remove", 351);
-_yuitest_coverline("build/cookie/cookie.js", 353);
-validateCookieName(name); //throws error
-
- //set options
- _yuitest_coverline("build/cookie/cookie.js", 356);
-options = Y.merge(options || {}, {
- expires: new Date(0)
- });
-
- //set cookie
- _yuitest_coverline("build/cookie/cookie.js", 361);
-return this.set(name, "", options);
- },
-
- /**
- * Removes a sub cookie with a given name.
- * @param {String} name The name of the cookie in which the subcookie exists.
- * @param {String} subName The name of the subcookie to remove.
- * @param {Object} options (Optional) An object containing one or more
- * cookie options: path (a string), domain (a string), expires (a Date object),
- * removeIfEmpty (true/false), and secure (true/false). This must be the same
- * settings as the original subcookie.
- * @return {String} The created cookie string.
- * @method removeSub
- * @static
- */
- removeSub : function(name, subName, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "removeSub", 376);
-_yuitest_coverline("build/cookie/cookie.js", 378);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 380);
-validateSubcookieName(subName); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 382);
-options = options || {};
-
- //get all subcookies for this cookie
- _yuitest_coverline("build/cookie/cookie.js", 385);
-var subs = this.getSubs(name);
-
- //delete the indicated subcookie
- _yuitest_coverline("build/cookie/cookie.js", 388);
-if (isObject(subs) && subs.hasOwnProperty(subName)){
- _yuitest_coverline("build/cookie/cookie.js", 389);
-delete subs[subName];
-
- _yuitest_coverline("build/cookie/cookie.js", 391);
-if (!options.removeIfEmpty) {
- //reset the cookie
-
- _yuitest_coverline("build/cookie/cookie.js", 394);
-return this.setSubs(name, subs, options);
- } else {
- //reset the cookie if there are subcookies left, else remove
- _yuitest_coverline("build/cookie/cookie.js", 397);
-for (var key in subs){
- _yuitest_coverline("build/cookie/cookie.js", 398);
-if (subs.hasOwnProperty(key) && !isFunction(subs[key]) && !isUndefined(subs[key])){
- _yuitest_coverline("build/cookie/cookie.js", 399);
-return this.setSubs(name, subs, options);
- }
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 403);
-return this.remove(name, options);
- }
- } else {
- _yuitest_coverline("build/cookie/cookie.js", 406);
-return "";
- }
-
- },
-
- /**
- * Sets a cookie with a given name and value.
- * @param {String} name The name of the cookie to set.
- * @param {Variant} value The value to set for the cookie.
- * @param {Object} options (Optional) An object containing one or more
- * cookie options: path (a string), domain (a string), expires (a Date object),
- * secure (true/false), and raw (true/false). Setting raw to true indicates
- * that the cookie should not be URI encoded before being set.
- * @return {String} The created cookie string.
- * @method set
- * @static
- */
- set : function (name, value, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "set", 423);
-_yuitest_coverline("build/cookie/cookie.js", 425);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 427);
-if (isUndefined(value)){
- _yuitest_coverline("build/cookie/cookie.js", 428);
-error("Cookie.set(): Value cannot be undefined.");
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 431);
-options = options || {};
-
- _yuitest_coverline("build/cookie/cookie.js", 433);
-var text = this._createCookieString(name, value, !options.raw, options);
- _yuitest_coverline("build/cookie/cookie.js", 434);
-doc.cookie = text;
- _yuitest_coverline("build/cookie/cookie.js", 435);
-return text;
- },
-
- /**
- * Sets a sub cookie with a given name to a particular value.
- * @param {String} name The name of the cookie to set.
- * @param {String} subName The name of the subcookie to set.
- * @param {Variant} value The value to set.
- * @param {Object} options (Optional) An object containing one or more
- * cookie options: path (a string), domain (a string), expires (a Date object),
- * and secure (true/false).
- * @return {String} The created cookie string.
- * @method setSub
- * @static
- */
- setSub : function (name, subName, value, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "setSub", 450);
-_yuitest_coverline("build/cookie/cookie.js", 452);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 454);
-validateSubcookieName(subName); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 456);
-if (isUndefined(value)){
- _yuitest_coverline("build/cookie/cookie.js", 457);
-error("Cookie.setSub(): Subcookie value cannot be undefined.");
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 460);
-var hash = this.getSubs(name);
-
- _yuitest_coverline("build/cookie/cookie.js", 462);
-if (!isObject(hash)){
- _yuitest_coverline("build/cookie/cookie.js", 463);
-hash = {};
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 466);
-hash[subName] = value;
-
- _yuitest_coverline("build/cookie/cookie.js", 468);
-return this.setSubs(name, hash, options);
-
- },
-
- /**
- * Sets a cookie with a given name to contain a hash of name-value pairs.
- * @param {String} name The name of the cookie to set.
- * @param {Object} value An object containing name-value pairs.
- * @param {Object} options (Optional) An object containing one or more
- * cookie options: path (a string), domain (a string), expires (a Date object),
- * and secure (true/false).
- * @return {String} The created cookie string.
- * @method setSubs
- * @static
- */
- setSubs : function (name, value, options) {
-
- _yuitest_coverfunc("build/cookie/cookie.js", "setSubs", 483);
-_yuitest_coverline("build/cookie/cookie.js", 485);
-validateCookieName(name); //throws error
-
- _yuitest_coverline("build/cookie/cookie.js", 487);
-if (!isObject(value)){
- _yuitest_coverline("build/cookie/cookie.js", 488);
-error("Cookie.setSubs(): Cookie value must be an object.");
- }
-
- _yuitest_coverline("build/cookie/cookie.js", 491);
-var text /*:String*/ = this._createCookieString(name, this._createCookieHashString(value), false, options);
- _yuitest_coverline("build/cookie/cookie.js", 492);
-doc.cookie = text;
- _yuitest_coverline("build/cookie/cookie.js", 493);
-return text;
- }
-
- };
-
-
-}, '3.7.3', {"requires": ["yui-base"]});
diff --git a/lib/yuilib/3.7.3/build/cookie/cookie-min.js b/lib/yuilib/3.7.3/build/cookie/cookie-min.js
deleted file mode 100644
index 8ef3cad124f..00000000000
--- a/lib/yuilib/3.7.3/build/cookie/cookie-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("cookie",function(e,t){function h(e){throw new TypeError(e)}function p(e){(!s(e)||e==="")&&h("Cookie name must be a non-empty string.")}function d(e){(!s(e)||e==="")&&h("Subcookie name must be a non-empty string.")}var n=e.Lang,r=e.Object,i=null,s=n.isString,o=n.isObject,u=n.isUndefined,a=n.isFunction,f=encodeURIComponent,l=decodeURIComponent,c=e.config.doc;e.Cookie={_createCookieString:function(e,t,n,r){r=r||{};var i=f(e)+"="+(n?f(t):t),u=r.expires,a=r.path,l=r.domain;return o(r)&&(u instanceof Date&&(i+="; expires="+u.toUTCString()),s(a)&&a!==""&&(i+="; path="+a),s(l)&&l!==""&&(i+="; domain="+l),r.secure===!0&&(i+="; secure")),i},_createCookieHashString:function(e){o(e)||h("Cookie._createCookieHashString(): Argument must be an object.");var t=[];return r.each(e,function(e,n){!a(e)&&!u(e)&&t.push(f(n)+"="+f(String(e)))}),t.join("&")},_parseCookieHash:function(e){var t=e.split("&"),n=i,r={};if(e.length)for(var s=0,o=t.length;sThe `Graphics` module features a `Graphic` class that allows you to easily create and manage shapes. "," * Currently, a `Graphic` instance can be used to create predifined shapes and free-form polygons with fill "," * and stroke properties.
"," *"," *The `Graphics` module normalizes an API through the use of alias and implementation classes that share"," * interfaces. Each alias class points to an appropriate implementation class dependent on the browser's "," * capabilities. There should rarely, if ever, be a need to interact directly with an implementation class.
"," *"," *Below is a list of available classes. "," *
"," * You can also extend the `Shape` class to create your own custom shape classes."," * @module graphics"," * @main graphics"," */","var SETTER = \"setter\","," PluginHost = Y.Plugin.Host,"," VALUE = \"value\","," VALUEFN = \"valueFn\","," READONLY = \"readOnly\","," Y_LANG = Y.Lang,"," STR = \"string\","," WRITE_ONCE = \"writeOnce\","," GraphicBase,"," AttributeLite;"," "," /**"," * AttributeLite provides Attribute-like getters and setters for shape classes in the Graphics module. It provides a get/set API without the event infastructure."," * This class is temporary and a work in progress."," *"," * @class AttributeLite"," * @constructor"," */"," AttributeLite = function()"," {"," var host = this; // help compression"," "," // Perf tweak - avoid creating event literals if not required."," host._ATTR_E_FACADE = {};"," "," Y.EventTarget.call(this, {emitFacade:true});"," host._state = {};"," host.prototype = Y.mix(AttributeLite.prototype, host.prototype);"," };",""," AttributeLite.prototype = {"," /**"," * Initializes the attributes for a shape. If an attribute config is passed into the constructor of the host, "," * the initial values will be overwritten."," *"," * @method addAttrs"," * @param {Object} cfg Optional object containing attributes key value pairs to be set."," */"," addAttrs: function(cfg)"," {"," var host = this,"," attrConfig = this.constructor.ATTRS, "," attr,"," i,"," fn,"," state = host._state;"," for(i in attrConfig)"," {"," if(attrConfig.hasOwnProperty(i))"," {"," attr = attrConfig[i];"," if(attr.hasOwnProperty(VALUE))"," {"," state[i] = attr.value;"," }"," else if(attr.hasOwnProperty(VALUEFN))"," {"," fn = attr.valueFn;"," if(Y_LANG.isString(fn))"," {"," state[i] = host[fn].apply(host);"," }"," else"," {"," state[i] = fn.apply(host);"," }"," }"," }"," }"," host._state = state;"," for(i in attrConfig)"," {"," if(attrConfig.hasOwnProperty(i))"," {"," attr = attrConfig[i];"," if(attr.hasOwnProperty(READONLY) && attr.readOnly)"," {"," continue;"," }",""," if(attr.hasOwnProperty(WRITE_ONCE) && attr.writeOnce)"," {"," attr.readOnly = true;"," }",""," if(cfg && cfg.hasOwnProperty(i))"," {"," if(attr.hasOwnProperty(SETTER))"," {"," host._state[i] = attr.setter.apply(host, [cfg[i]]);"," }"," else"," {"," host._state[i] = cfg[i];"," }"," }"," }"," }"," },",""," /**"," * For a given item, returns the value of the property requested, or undefined if not found."," *"," * @method get"," * @param name {String} The name of the item"," * @return {Any} The value of the supplied property."," */"," get: function(attr)"," {"," var host = this,"," getter,"," attrConfig = host.constructor.ATTRS;"," if(attrConfig && attrConfig[attr])"," {"," getter = attrConfig[attr].getter;"," if(getter)"," {"," if(typeof getter == STR)"," {"," return host[getter].apply(host);"," }"," return attrConfig[attr].getter.apply(host);"," }",""," return host._state[attr];"," }"," return null;"," },"," "," /**"," * Sets the value of an attribute."," *"," * @method set"," * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can "," * be passed in to set multiple attributes at once."," * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as "," * the name param."," */"," set: function(attr, val)"," {"," var i;"," if(Y_LANG.isObject(attr))"," {"," for(i in attr)"," {"," if(attr.hasOwnProperty(i))"," {"," this._set(i, attr[i]);"," }"," }"," }"," else"," {"," this._set.apply(this, arguments);"," }"," },",""," /**"," * Provides setter logic. Used by `set`."," *"," * @method _set"," * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can "," * be passed in to set multiple attributes at once."," * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as "," * the name param."," * @protected"," */"," _set: function(attr, val)"," {"," var host = this,"," setter,"," args,"," attrConfig = host.constructor.ATTRS;"," if(attrConfig && attrConfig.hasOwnProperty(attr))"," {"," setter = attrConfig[attr].setter;"," if(setter)"," {"," args = [val];"," if(typeof setter == STR)"," {"," val = host[setter].apply(host, args);"," }"," else"," {"," val = attrConfig[attr].setter.apply(host, args);"," }"," }"," host._state[attr] = val;"," }"," }"," };"," Y.mix(AttributeLite, Y.EventTarget, false, null, 1);"," Y.AttributeLite = AttributeLite;",""," /**"," * GraphicBase serves as the base class for the graphic layer. It serves the same purpose as"," * Base but uses a lightweight getter/setter class instead of Attribute."," * This class is temporary and a work in progress."," *"," * @class GraphicBase"," * @constructor"," * @param {Object} cfg Key value pairs for attributes"," */"," GraphicBase = function(cfg)"," {"," var host = this,"," PluginHost = Y.Plugin && Y.Plugin.Host; "," if (host._initPlugins && PluginHost) {"," PluginHost.call(host);"," }"," "," host.name = host.constructor.NAME;"," host._eventPrefix = host.constructor.EVENT_PREFIX || host.constructor.NAME;"," AttributeLite.call(host);"," host.addAttrs(cfg);"," host.init.apply(this, arguments);"," if (host._initPlugins) {"," // Need to initPlugins manually, to handle constructor parsing, static Plug parsing"," host._initPlugins(cfg);"," }"," host.initialized = true;"," };",""," GraphicBase.NAME = \"baseGraphic\";",""," GraphicBase.prototype = {"," /**"," * Init method, invoked during construction."," * Fires an init event after calling `initializer` on implementers."," *"," * @method init"," * @protected "," */"," init: function()"," {"," this.publish(\"init\", {"," fireOnce:true"," });"," this.initializer.apply(this, arguments);"," this.fire(\"init\", {cfg: arguments[0]});"," },",""," /**"," * Camel case concatanates two strings."," *"," * @method _camelCaseConcat"," * @param {String} prefix The first string"," * @param {String} name The second string"," * @return String"," * @private"," */"," _camelCaseConcat: function(prefix, name)"," {"," return prefix + name.charAt(0).toUpperCase() + name.slice(1);"," }"," };","//Straightup augment, no wrapper functions","Y.mix(GraphicBase, Y.AttributeLite, false, null, 1);","Y.mix(GraphicBase, PluginHost, false, null, 1);","GraphicBase.prototype.constructor = GraphicBase;","GraphicBase.plug = PluginHost.plug;","GraphicBase.unplug = PluginHost.unplug;","Y.GraphicBase = GraphicBase;","","","/**"," * `Drawing` provides a set of drawing methods used by `Path` and custom shape classes. "," * `Drawing` has the following implementations based on browser capability."," *Base class for creating shapes.
"," *`Shape` is an abstract class and is not meant to be used directly. The following classes extend"," * `Shape`."," *"," *
"," *"," * `Shape` can also be extended to create custom shape classes."," *"," * `Shape` has the following implementations based on browser capability."," *A string containing, in order, transform operations applied to the shape instance. The `transform` string can contain the following values:"," * "," *
Applying transforms through the transform attribute will reset the transform matrix and apply a new transform. The shape class also contains corresponding methods for each transform"," * that will apply the transform to the current matrix. The below code illustrates how you might use the `transform` attribute to instantiate a recangle with a rotation of 45 degrees.
"," var myRect = new Y.Rect({"," type:\"rect\","," width: 50,"," height: 40,"," transform: \"rotate(45)\""," };"," *The code below would apply `translate` and `rotate` to an existing shape.
"," "," myRect.set(\"transform\", \"translate(40, 50) rotate(45)\");"," * @config transform"," * @type String "," */"," /**"," * Unique id for class instance."," *"," * @config id"," * @type String"," */"," /**"," * Indicates the x position of shape."," *"," * @config x"," * @type Number"," */"," /**"," * Indicates the y position of shape."," *"," * @config y"," * @type Number"," */"," /**"," * Indicates the width of the shape"," *"," * @config width"," * @type Number"," */"," /**"," * Indicates the height of the shape"," * "," * @config height"," * @type Number"," */"," /**"," * Indicates whether the shape is visible."," *"," * @config visible"," * @type Boolean"," */"," /**"," * Contains information about the fill of the shape. "," *If a `linear` or `radial` is specified as the fill type. The following additional property is used:"," *
Linear gradients also have the following property:
"," *Radial gradients have the following additional properties:
"," *The x-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
"," *Note: Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape` classes which are used on Android or IE 6 - 8.
"," *The y-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
"," *Note: Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape` classes which are used on Android or IE 6 - 8.
"," *Creates circle shape with editable attributes.
"," *`Circle` instances can be created using the `addShape` method of the `Graphic` class. "," * The method's `cfg` argument contains a `type` attribute. Assigning \"circle\" or `Y.Circle` to this attribute will create a `Circle` instance. Required attributes"," * for instantiating a `Circle` are `type` and `radius`. Optional attributes include:"," *
"," * "," * The below code creates a circle by defining the `type` attribute as \"circle\":",""," var myCircle = myGraphic.addShape({"," type: \"circle\","," radius: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });",""," * Below, this same circle is created by defining the `type` attribute with a class reference:"," *"," var myCircle = myGraphic.addShape({"," type: Y.Circle,"," radius: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });"," * "," *`Circle` has the following implementations based on browser capability."," *
Creates an ellipse shape with editable attributes.
"," *`Ellipse` instances can be created using the `addShape` method of the `Graphic` class. "," * The method's `cfg` argument contains a `type` attribute. Assigning \"ellipse\" or `Y.Ellipse` to this attribute will create a `Ellipse` instance. Required attributes"," * for instantiating a `Ellipse` are `type`, `width` and `height`. Optional attributes include:"," *
"," * "," * The below code creates an ellipse by defining the `type` attribute as \"ellipse\":",""," var myEllipse = myGraphic.addShape({"," type: \"ellipse\","," width: 20,"," height: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });",""," * Below, the same ellipse is created by defining the `type` attribute with a class reference:"," *"," var myEllipse = myGraphic.addShape({"," type: Y.Ellipse,"," width: 20,"," height: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });"," * "," *`Ellipse` has the following implementations based on browser capability."," *
Creates an rectangle shape with editable attributes.
"," *`Rect` instances can be created using the `addShape` method of the `Graphic` "," * class. The method's `cfg` argument contains a `type` attribute. Assigning \"rect\" or `Y.Rect` to this attribute will create a `Rect` instance. "," * Required attributes for instantiating a `Rect` are `type`, `width` and `height`. Optional attributes include:"," *
"," *"," * The below code creates a rectangle by defining the `type` attribute as \"rect\":",""," var myRect = myGraphic.addShape({"," type: \"rect\","," width: 20,"," height: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });",""," * Below, the same rectangle is created by defining the `type` attribute with a class reference:"," *"," var myRect = myGraphic.addShape({"," type: Y.Rect,"," width: 20,"," height: 10,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });"," *"," *`Rect` has the following implementations based on browser capability."," *
The `Path` class creates a shape through the use of drawing methods. The `Path` class has the following drawing methods available:
"," *Like other shapes, `Path` elements are created using the `addShape` method of the `Graphic` "," * class. The method's `cfg` argument contains a `type` attribute. Assigning \"path\" or `Y.Path` to this attribute will create a `Path` instance."," * After instantiation, a series of drawing operations must be performed in order to render a shape. The below code instantiates a path element by defining the `type` "," * attribute as \"path\":
",""," var myPath = myGraphic.addShape({"," type: \"path\","," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });",""," * Below a `Path` element with the same properties is instantiated by defining the `type` attribute with a class reference:"," *"," var myPath = myGraphic.addShape({"," type: Y.Path,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });",""," * After instantiation, a shape or segment needs to be drawn for an element to render. After all draw operations are performed, the `end`"," * method will render the shape. The code below will draw a triangle:"," "," myPath.moveTo(35, 5);"," myPath.lineTo(65, 65);"," myPath.lineTo(5, 65);"," myPath.lineTo(35, 5);"," myPath.end();"," *"," *`Path` has the following implementations based on browser capability."," *
The code block below creates a `Graphic` instance and appends it to an HTMLElement with the id 'mygraphiccontainer'.
"," "," var myGraphic = new Y.Graphic({render:\"#mygraphiccontainer\"});",""," *Alternatively, you can add a `Graphic` instance to the DOM using the `render` method.
"," var myGraphic = new Y.Graphic();"," myGraphic.render(\"#mygraphiccontainer\");",""," * `Graphic` has the following implementations based on browser capability."," *width and height"," * attributes or are determined by the dimensions of the parent element. The content contained in the Graphic will be sized to fit with in the Graphic instance's "," * dimensions. When using this setting, the preserveAspectRatio attribute will determine how the contents are sized.width and height"," * attributes or are determined by the dimensions of the parent element. The contents of the Graphic instance are not affected by this setting.autoSize is set to sizeContentToGraphic."," *"," * Generates a shape instance by type. The method accepts an object that contain's the shape's"," * type and attributes to be customized. For example, the code below would create a rectangle:
"," *"," var myRect = myGraphic.addShape({"," type: \"rect\","," width: 40,"," height: 30,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });"," *"," *The `Graphics` module includes a few basic shapes. More information on their creation "," * can be found in each shape's documentation:"," *"," *
"," *"," * The `Graphics` module also allows for the creation of custom shapes. If a custom shape"," * has been created, it can be instantiated with the `addShape` method as well. The attributes,"," * required and optional, would need to be defined in the custom shape."," *"," var myCustomShape = myGraphic.addShape({"," type: Y.MyCustomShape,"," width: 50,"," height: 50,"," fill: {"," color: \"#9aa\""," },"," stroke: {"," weight: 1,"," color: \"#000\""," }"," });"," *"," * @method addShape"," * @param {Object} cfg Object containing the shape's type and attributes. "," * @return Shape"," */"," /**"," * Removes a shape instance from from the graphic instance."," *"," * @method removeShape"," * @param {Shape|String} shape The instance or id of the shape to be removed."," */"," /**"," * Removes all shape instances from the dom."," *"," * @method removeAllShapes"," */"," /**"," * Returns a shape based on the id of its dom node."," *"," * @method getShapeById"," * @param {String} id Dom id of the shape's node attribute."," * @return Shape"," */"," /**"," * Allows for creating multiple shapes in order to batch appending and redraw operations."," *"," * @method batch"," * @param {Function} method Method to execute."," */","","","}, '3.7.3', {\"requires\": [\"node\", \"event-custom\", \"pluginhost\", \"matrix\", \"classnamemanager\"]});"]; -_yuitest_coverage["build/graphics/graphics.js"].lines = {"1":0,"32":0,"50":0,"52":0,"55":0,"57":0,"58":0,"59":0,"62":0,"72":0,"78":0,"80":0,"82":0,"83":0,"85":0,"87":0,"89":0,"90":0,"92":0,"96":0,"101":0,"102":0,"104":0,"106":0,"107":0,"109":0,"112":0,"114":0,"117":0,"119":0,"121":0,"125":0,"141":0,"144":0,"146":0,"147":0,"149":0,"151":0,"153":0,"156":0,"158":0,"172":0,"173":0,"175":0,"177":0,"179":0,"185":0,"201":0,"205":0,"207":0,"208":0,"210":0,"211":0,"213":0,"217":0,"220":0,"224":0,"225":0,"236":0,"238":0,"240":0,"241":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"251":0,"253":0,"256":0,"258":0,"268":0,"271":0,"272":0,"286":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0}; -_yuitest_coverage["build/graphics/graphics.js"].functions = {"AttributeLite:50":0,"addAttrs:70":0,"get:139":0,"set:170":0,"_set:199":0,"GraphicBase:236":0,"init:266":0,"_camelCaseConcat:284":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/graphics/graphics.js"].coveredLines = 82; -_yuitest_coverage["build/graphics/graphics.js"].coveredFunctions = 9; -_yuitest_coverline("build/graphics/graphics.js", 1); -YUI.add('graphics', function (Y, NAME) { - -/** - * - *The `Graphics` module provides a JavaScript API for creating shapes in a variety of formats across - * a browser test baseline. - * Based on device and browser capabilities, `Graphics` leverages SVG, - * Canvas and VML - * to render its graphical elements.
- * - *The `Graphics` module features a `Graphic` class that allows you to easily create and manage shapes. - * Currently, a `Graphic` instance can be used to create predifined shapes and free-form polygons with fill - * and stroke properties.
- * - *The `Graphics` module normalizes an API through the use of alias and implementation classes that share - * interfaces. Each alias class points to an appropriate implementation class dependent on the browser's - * capabilities. There should rarely, if ever, be a need to interact directly with an implementation class.
- * - *Below is a list of available classes. - *
- * You can also extend the `Shape` class to create your own custom shape classes. - * @module graphics - * @main graphics - */ -_yuitest_coverfunc("build/graphics/graphics.js", "(anonymous 1)", 1); -_yuitest_coverline("build/graphics/graphics.js", 32); -var SETTER = "setter", - PluginHost = Y.Plugin.Host, - VALUE = "value", - VALUEFN = "valueFn", - READONLY = "readOnly", - Y_LANG = Y.Lang, - STR = "string", - WRITE_ONCE = "writeOnce", - GraphicBase, - AttributeLite; - - /** - * AttributeLite provides Attribute-like getters and setters for shape classes in the Graphics module. It provides a get/set API without the event infastructure. - * This class is temporary and a work in progress. - * - * @class AttributeLite - * @constructor - */ - _yuitest_coverline("build/graphics/graphics.js", 50); -AttributeLite = function() - { - _yuitest_coverfunc("build/graphics/graphics.js", "AttributeLite", 50); -_yuitest_coverline("build/graphics/graphics.js", 52); -var host = this; // help compression - - // Perf tweak - avoid creating event literals if not required. - _yuitest_coverline("build/graphics/graphics.js", 55); -host._ATTR_E_FACADE = {}; - - _yuitest_coverline("build/graphics/graphics.js", 57); -Y.EventTarget.call(this, {emitFacade:true}); - _yuitest_coverline("build/graphics/graphics.js", 58); -host._state = {}; - _yuitest_coverline("build/graphics/graphics.js", 59); -host.prototype = Y.mix(AttributeLite.prototype, host.prototype); - }; - - _yuitest_coverline("build/graphics/graphics.js", 62); -AttributeLite.prototype = { - /** - * Initializes the attributes for a shape. If an attribute config is passed into the constructor of the host, - * the initial values will be overwritten. - * - * @method addAttrs - * @param {Object} cfg Optional object containing attributes key value pairs to be set. - */ - addAttrs: function(cfg) - { - _yuitest_coverfunc("build/graphics/graphics.js", "addAttrs", 70); -_yuitest_coverline("build/graphics/graphics.js", 72); -var host = this, - attrConfig = this.constructor.ATTRS, - attr, - i, - fn, - state = host._state; - _yuitest_coverline("build/graphics/graphics.js", 78); -for(i in attrConfig) - { - _yuitest_coverline("build/graphics/graphics.js", 80); -if(attrConfig.hasOwnProperty(i)) - { - _yuitest_coverline("build/graphics/graphics.js", 82); -attr = attrConfig[i]; - _yuitest_coverline("build/graphics/graphics.js", 83); -if(attr.hasOwnProperty(VALUE)) - { - _yuitest_coverline("build/graphics/graphics.js", 85); -state[i] = attr.value; - } - else {_yuitest_coverline("build/graphics/graphics.js", 87); -if(attr.hasOwnProperty(VALUEFN)) - { - _yuitest_coverline("build/graphics/graphics.js", 89); -fn = attr.valueFn; - _yuitest_coverline("build/graphics/graphics.js", 90); -if(Y_LANG.isString(fn)) - { - _yuitest_coverline("build/graphics/graphics.js", 92); -state[i] = host[fn].apply(host); - } - else - { - _yuitest_coverline("build/graphics/graphics.js", 96); -state[i] = fn.apply(host); - } - }} - } - } - _yuitest_coverline("build/graphics/graphics.js", 101); -host._state = state; - _yuitest_coverline("build/graphics/graphics.js", 102); -for(i in attrConfig) - { - _yuitest_coverline("build/graphics/graphics.js", 104); -if(attrConfig.hasOwnProperty(i)) - { - _yuitest_coverline("build/graphics/graphics.js", 106); -attr = attrConfig[i]; - _yuitest_coverline("build/graphics/graphics.js", 107); -if(attr.hasOwnProperty(READONLY) && attr.readOnly) - { - _yuitest_coverline("build/graphics/graphics.js", 109); -continue; - } - - _yuitest_coverline("build/graphics/graphics.js", 112); -if(attr.hasOwnProperty(WRITE_ONCE) && attr.writeOnce) - { - _yuitest_coverline("build/graphics/graphics.js", 114); -attr.readOnly = true; - } - - _yuitest_coverline("build/graphics/graphics.js", 117); -if(cfg && cfg.hasOwnProperty(i)) - { - _yuitest_coverline("build/graphics/graphics.js", 119); -if(attr.hasOwnProperty(SETTER)) - { - _yuitest_coverline("build/graphics/graphics.js", 121); -host._state[i] = attr.setter.apply(host, [cfg[i]]); - } - else - { - _yuitest_coverline("build/graphics/graphics.js", 125); -host._state[i] = cfg[i]; - } - } - } - } - }, - - /** - * For a given item, returns the value of the property requested, or undefined if not found. - * - * @method get - * @param name {String} The name of the item - * @return {Any} The value of the supplied property. - */ - get: function(attr) - { - _yuitest_coverfunc("build/graphics/graphics.js", "get", 139); -_yuitest_coverline("build/graphics/graphics.js", 141); -var host = this, - getter, - attrConfig = host.constructor.ATTRS; - _yuitest_coverline("build/graphics/graphics.js", 144); -if(attrConfig && attrConfig[attr]) - { - _yuitest_coverline("build/graphics/graphics.js", 146); -getter = attrConfig[attr].getter; - _yuitest_coverline("build/graphics/graphics.js", 147); -if(getter) - { - _yuitest_coverline("build/graphics/graphics.js", 149); -if(typeof getter == STR) - { - _yuitest_coverline("build/graphics/graphics.js", 151); -return host[getter].apply(host); - } - _yuitest_coverline("build/graphics/graphics.js", 153); -return attrConfig[attr].getter.apply(host); - } - - _yuitest_coverline("build/graphics/graphics.js", 156); -return host._state[attr]; - } - _yuitest_coverline("build/graphics/graphics.js", 158); -return null; - }, - - /** - * Sets the value of an attribute. - * - * @method set - * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can - * be passed in to set multiple attributes at once. - * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as - * the name param. - */ - set: function(attr, val) - { - _yuitest_coverfunc("build/graphics/graphics.js", "set", 170); -_yuitest_coverline("build/graphics/graphics.js", 172); -var i; - _yuitest_coverline("build/graphics/graphics.js", 173); -if(Y_LANG.isObject(attr)) - { - _yuitest_coverline("build/graphics/graphics.js", 175); -for(i in attr) - { - _yuitest_coverline("build/graphics/graphics.js", 177); -if(attr.hasOwnProperty(i)) - { - _yuitest_coverline("build/graphics/graphics.js", 179); -this._set(i, attr[i]); - } - } - } - else - { - _yuitest_coverline("build/graphics/graphics.js", 185); -this._set.apply(this, arguments); - } - }, - - /** - * Provides setter logic. Used by `set`. - * - * @method _set - * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can - * be passed in to set multiple attributes at once. - * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as - * the name param. - * @protected - */ - _set: function(attr, val) - { - _yuitest_coverfunc("build/graphics/graphics.js", "_set", 199); -_yuitest_coverline("build/graphics/graphics.js", 201); -var host = this, - setter, - args, - attrConfig = host.constructor.ATTRS; - _yuitest_coverline("build/graphics/graphics.js", 205); -if(attrConfig && attrConfig.hasOwnProperty(attr)) - { - _yuitest_coverline("build/graphics/graphics.js", 207); -setter = attrConfig[attr].setter; - _yuitest_coverline("build/graphics/graphics.js", 208); -if(setter) - { - _yuitest_coverline("build/graphics/graphics.js", 210); -args = [val]; - _yuitest_coverline("build/graphics/graphics.js", 211); -if(typeof setter == STR) - { - _yuitest_coverline("build/graphics/graphics.js", 213); -val = host[setter].apply(host, args); - } - else - { - _yuitest_coverline("build/graphics/graphics.js", 217); -val = attrConfig[attr].setter.apply(host, args); - } - } - _yuitest_coverline("build/graphics/graphics.js", 220); -host._state[attr] = val; - } - } - }; - _yuitest_coverline("build/graphics/graphics.js", 224); -Y.mix(AttributeLite, Y.EventTarget, false, null, 1); - _yuitest_coverline("build/graphics/graphics.js", 225); -Y.AttributeLite = AttributeLite; - - /** - * GraphicBase serves as the base class for the graphic layer. It serves the same purpose as - * Base but uses a lightweight getter/setter class instead of Attribute. - * This class is temporary and a work in progress. - * - * @class GraphicBase - * @constructor - * @param {Object} cfg Key value pairs for attributes - */ - _yuitest_coverline("build/graphics/graphics.js", 236); -GraphicBase = function(cfg) - { - _yuitest_coverfunc("build/graphics/graphics.js", "GraphicBase", 236); -_yuitest_coverline("build/graphics/graphics.js", 238); -var host = this, - PluginHost = Y.Plugin && Y.Plugin.Host; - _yuitest_coverline("build/graphics/graphics.js", 240); -if (host._initPlugins && PluginHost) { - _yuitest_coverline("build/graphics/graphics.js", 241); -PluginHost.call(host); - } - - _yuitest_coverline("build/graphics/graphics.js", 244); -host.name = host.constructor.NAME; - _yuitest_coverline("build/graphics/graphics.js", 245); -host._eventPrefix = host.constructor.EVENT_PREFIX || host.constructor.NAME; - _yuitest_coverline("build/graphics/graphics.js", 246); -AttributeLite.call(host); - _yuitest_coverline("build/graphics/graphics.js", 247); -host.addAttrs(cfg); - _yuitest_coverline("build/graphics/graphics.js", 248); -host.init.apply(this, arguments); - _yuitest_coverline("build/graphics/graphics.js", 249); -if (host._initPlugins) { - // Need to initPlugins manually, to handle constructor parsing, static Plug parsing - _yuitest_coverline("build/graphics/graphics.js", 251); -host._initPlugins(cfg); - } - _yuitest_coverline("build/graphics/graphics.js", 253); -host.initialized = true; - }; - - _yuitest_coverline("build/graphics/graphics.js", 256); -GraphicBase.NAME = "baseGraphic"; - - _yuitest_coverline("build/graphics/graphics.js", 258); -GraphicBase.prototype = { - /** - * Init method, invoked during construction. - * Fires an init event after calling `initializer` on implementers. - * - * @method init - * @protected - */ - init: function() - { - _yuitest_coverfunc("build/graphics/graphics.js", "init", 266); -_yuitest_coverline("build/graphics/graphics.js", 268); -this.publish("init", { - fireOnce:true - }); - _yuitest_coverline("build/graphics/graphics.js", 271); -this.initializer.apply(this, arguments); - _yuitest_coverline("build/graphics/graphics.js", 272); -this.fire("init", {cfg: arguments[0]}); - }, - - /** - * Camel case concatanates two strings. - * - * @method _camelCaseConcat - * @param {String} prefix The first string - * @param {String} name The second string - * @return String - * @private - */ - _camelCaseConcat: function(prefix, name) - { - _yuitest_coverfunc("build/graphics/graphics.js", "_camelCaseConcat", 284); -_yuitest_coverline("build/graphics/graphics.js", 286); -return prefix + name.charAt(0).toUpperCase() + name.slice(1); - } - }; -//Straightup augment, no wrapper functions -_yuitest_coverline("build/graphics/graphics.js", 290); -Y.mix(GraphicBase, Y.AttributeLite, false, null, 1); -_yuitest_coverline("build/graphics/graphics.js", 291); -Y.mix(GraphicBase, PluginHost, false, null, 1); -_yuitest_coverline("build/graphics/graphics.js", 292); -GraphicBase.prototype.constructor = GraphicBase; -_yuitest_coverline("build/graphics/graphics.js", 293); -GraphicBase.plug = PluginHost.plug; -_yuitest_coverline("build/graphics/graphics.js", 294); -GraphicBase.unplug = PluginHost.unplug; -_yuitest_coverline("build/graphics/graphics.js", 295); -Y.GraphicBase = GraphicBase; - - -/** - * `Drawing` provides a set of drawing methods used by `Path` and custom shape classes. - * `Drawing` has the following implementations based on browser capability. - *Base class for creating shapes.
- *`Shape` is an abstract class and is not meant to be used directly. The following classes extend - * `Shape`. - * - *
- * - * `Shape` can also be extended to create custom shape classes. - * - * `Shape` has the following implementations based on browser capability. - *A string containing, in order, transform operations applied to the shape instance. The `transform` string can contain the following values: - * - *
Applying transforms through the transform attribute will reset the transform matrix and apply a new transform. The shape class also contains corresponding methods for each transform - * that will apply the transform to the current matrix. The below code illustrates how you might use the `transform` attribute to instantiate a recangle with a rotation of 45 degrees.
- var myRect = new Y.Rect({ - type:"rect", - width: 50, - height: 40, - transform: "rotate(45)" - }; - *The code below would apply `translate` and `rotate` to an existing shape.
- - myRect.set("transform", "translate(40, 50) rotate(45)"); - * @config transform - * @type String - */ - /** - * Unique id for class instance. - * - * @config id - * @type String - */ - /** - * Indicates the x position of shape. - * - * @config x - * @type Number - */ - /** - * Indicates the y position of shape. - * - * @config y - * @type Number - */ - /** - * Indicates the width of the shape - * - * @config width - * @type Number - */ - /** - * Indicates the height of the shape - * - * @config height - * @type Number - */ - /** - * Indicates whether the shape is visible. - * - * @config visible - * @type Boolean - */ - /** - * Contains information about the fill of the shape. - *If a `linear` or `radial` is specified as the fill type. The following additional property is used: - *
Linear gradients also have the following property:
- *Radial gradients have the following additional properties:
- *The x-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
- *Note: Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape` classes which are used on Android or IE 6 - 8.
- *The y-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
- *Note: Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape` classes which are used on Android or IE 6 - 8.
- *Creates circle shape with editable attributes.
- *`Circle` instances can be created using the `addShape` method of the `Graphic` class. - * The method's `cfg` argument contains a `type` attribute. Assigning "circle" or `Y.Circle` to this attribute will create a `Circle` instance. Required attributes - * for instantiating a `Circle` are `type` and `radius`. Optional attributes include: - *
- * - * The below code creates a circle by defining the `type` attribute as "circle": - - var myCircle = myGraphic.addShape({ - type: "circle", - radius: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - - * Below, this same circle is created by defining the `type` attribute with a class reference: - * - var myCircle = myGraphic.addShape({ - type: Y.Circle, - radius: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - * - *`Circle` has the following implementations based on browser capability. - *
Creates an ellipse shape with editable attributes.
- *`Ellipse` instances can be created using the `addShape` method of the `Graphic` class. - * The method's `cfg` argument contains a `type` attribute. Assigning "ellipse" or `Y.Ellipse` to this attribute will create a `Ellipse` instance. Required attributes - * for instantiating a `Ellipse` are `type`, `width` and `height`. Optional attributes include: - *
- * - * The below code creates an ellipse by defining the `type` attribute as "ellipse": - - var myEllipse = myGraphic.addShape({ - type: "ellipse", - width: 20, - height: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - - * Below, the same ellipse is created by defining the `type` attribute with a class reference: - * - var myEllipse = myGraphic.addShape({ - type: Y.Ellipse, - width: 20, - height: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - * - *`Ellipse` has the following implementations based on browser capability. - *
Creates an rectangle shape with editable attributes.
- *`Rect` instances can be created using the `addShape` method of the `Graphic` - * class. The method's `cfg` argument contains a `type` attribute. Assigning "rect" or `Y.Rect` to this attribute will create a `Rect` instance. - * Required attributes for instantiating a `Rect` are `type`, `width` and `height`. Optional attributes include: - *
- * - * The below code creates a rectangle by defining the `type` attribute as "rect": - - var myRect = myGraphic.addShape({ - type: "rect", - width: 20, - height: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - - * Below, the same rectangle is created by defining the `type` attribute with a class reference: - * - var myRect = myGraphic.addShape({ - type: Y.Rect, - width: 20, - height: 10, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - * - *`Rect` has the following implementations based on browser capability. - *
The `Path` class creates a shape through the use of drawing methods. The `Path` class has the following drawing methods available:
- *Like other shapes, `Path` elements are created using the `addShape` method of the `Graphic` - * class. The method's `cfg` argument contains a `type` attribute. Assigning "path" or `Y.Path` to this attribute will create a `Path` instance. - * After instantiation, a series of drawing operations must be performed in order to render a shape. The below code instantiates a path element by defining the `type` - * attribute as "path":
- - var myPath = myGraphic.addShape({ - type: "path", - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - - * Below a `Path` element with the same properties is instantiated by defining the `type` attribute with a class reference: - * - var myPath = myGraphic.addShape({ - type: Y.Path, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - - * After instantiation, a shape or segment needs to be drawn for an element to render. After all draw operations are performed, the `end` - * method will render the shape. The code below will draw a triangle: - - myPath.moveTo(35, 5); - myPath.lineTo(65, 65); - myPath.lineTo(5, 65); - myPath.lineTo(35, 5); - myPath.end(); - * - *`Path` has the following implementations based on browser capability. - *
The code block below creates a `Graphic` instance and appends it to an HTMLElement with the id 'mygraphiccontainer'.
- - var myGraphic = new Y.Graphic({render:"#mygraphiccontainer"}); - - *Alternatively, you can add a `Graphic` instance to the DOM using the `render` method.
- var myGraphic = new Y.Graphic(); - myGraphic.render("#mygraphiccontainer"); - - * `Graphic` has the following implementations based on browser capability. - *width and height
- * attributes or are determined by the dimensions of the parent element. The content contained in the Graphic will be sized to fit with in the Graphic instance's
- * dimensions. When using this setting, the preserveAspectRatio attribute will determine how the contents are sized.width and height
- * attributes or are determined by the dimensions of the parent element. The contents of the Graphic instance are not affected by this setting.autoSize is set to sizeContentToGraphic.
- *
- * Generates a shape instance by type. The method accepts an object that contain's the shape's - * type and attributes to be customized. For example, the code below would create a rectangle:
- * - var myRect = myGraphic.addShape({ - type: "rect", - width: 40, - height: 30, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - * - *The `Graphics` module includes a few basic shapes. More information on their creation - * can be found in each shape's documentation: - * - *
- * - * The `Graphics` module also allows for the creation of custom shapes. If a custom shape - * has been created, it can be instantiated with the `addShape` method as well. The attributes, - * required and optional, would need to be defined in the custom shape. - * - var myCustomShape = myGraphic.addShape({ - type: Y.MyCustomShape, - width: 50, - height: 50, - fill: { - color: "#9aa" - }, - stroke: { - weight: 1, - color: "#000" - } - }); - * - * @method addShape - * @param {Object} cfg Object containing the shape's type and attributes. - * @return Shape - */ - /** - * Removes a shape instance from from the graphic instance. - * - * @method removeShape - * @param {Shape|String} shape The instance or id of the shape to be removed. - */ - /** - * Removes all shape instances from the dom. - * - * @method removeAllShapes - */ - /** - * Returns a shape based on the id of its dom node. - * - * @method getShapeById - * @param {String} id Dom id of the shape's node attribute. - * @return Shape - */ - /** - * Allows for creating multiple shapes in order to batch appending and redraw operations. - * - * @method batch - * @param {Function} method Method to execute. - */ - - -}, '3.7.3', {"requires": ["node", "event-custom", "pluginhost", "matrix", "classnamemanager"]}); diff --git a/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-coverage.js b/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-coverage.js deleted file mode 100644 index 02dbb42c409..00000000000 --- a/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-coverage.js +++ /dev/null @@ -1,2602 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -if (typeof _yuitest_coverage == "undefined"){ - _yuitest_coverage = {}; - _yuitest_coverline = function(src, line){ - var coverage = _yuitest_coverage[src]; - if (!coverage.lines[line]){ - coverage.calledLines++; - } - coverage.lines[line]++; - }; - _yuitest_coverfunc = function(src, name, line){ - var coverage = _yuitest_coverage[src], - funcId = name + ":" + line; - if (!coverage.functions[funcId]){ - coverage.calledFunctions++; - } - coverage.functions[funcId]++; - }; -} -_yuitest_coverage["build/loader-yui3/loader-yui3.js"] = { - lines: {}, - functions: {}, - coveredLines: 0, - calledLines: 0, - coveredFunctions: 0, - calledFunctions: 0, - path: "build/loader-yui3/loader-yui3.js", - code: [] -}; -_yuitest_coverage["build/loader-yui3/loader-yui3.js"].code=["YUI.add('loader-yui3', function (Y, NAME) {","","/* This file is auto-generated by src/loader/scripts/meta_join.js */","","/**"," * YUI 3 module metadata"," * @module loader"," * @submodule yui3"," */","YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {"," \"align-plugin\": {"," \"requires\": ["," \"node-screen\","," \"node-pluginhost\""," ]"," },"," \"anim\": {"," \"use\": ["," \"anim-base\","," \"anim-color\","," \"anim-curve\","," \"anim-easing\","," \"anim-node-plugin\","," \"anim-scroll\","," \"anim-xy\""," ]"," },"," \"anim-base\": {"," \"requires\": ["," \"base-base\","," \"node-style\""," ]"," },"," \"anim-color\": {"," \"requires\": ["," \"anim-base\""," ]"," },"," \"anim-curve\": {"," \"requires\": ["," \"anim-xy\""," ]"," },"," \"anim-easing\": {"," \"requires\": ["," \"anim-base\""," ]"," },"," \"anim-node-plugin\": {"," \"requires\": ["," \"node-pluginhost\","," \"anim-base\""," ]"," },"," \"anim-scroll\": {"," \"requires\": ["," \"anim-base\""," ]"," },"," \"anim-shape\": {"," \"requires\": ["," \"anim-base\","," \"anim-easing\","," \"anim-color\","," \"matrix\""," ]"," },"," \"anim-shape-transform\": {"," \"use\": ["," \"anim-shape\""," ]"," },"," \"anim-xy\": {"," \"requires\": ["," \"anim-base\","," \"node-screen\""," ]"," },"," \"app\": {"," \"use\": ["," \"app-base\","," \"app-content\","," \"app-transitions\","," \"lazy-model-list\","," \"model\","," \"model-list\","," \"model-sync-rest\","," \"router\","," \"view\","," \"view-node-map\""," ]"," },"," \"app-base\": {"," \"requires\": ["," \"classnamemanager\","," \"pjax-base\","," \"router\","," \"view\""," ]"," },"," \"app-content\": {"," \"requires\": ["," \"app-base\","," \"pjax-content\""," ]"," },"," \"app-transitions\": {"," \"requires\": ["," \"app-base\""," ]"," },"," \"app-transitions-css\": {"," \"type\": \"css\""," },"," \"app-transitions-native\": {"," \"condition\": {"," \"name\": \"app-transitions-native\","," \"test\": function (Y) {"," var doc = Y.config.doc,"," node = doc ? doc.documentElement : null;",""," if (node && node.style) {"," return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);"," }",""," return false;","},"," \"trigger\": \"app-transitions\""," },"," \"requires\": ["," \"app-transitions\","," \"app-transitions-css\","," \"parallel\","," \"transition\""," ]"," },"," \"array-extras\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"array-invoke\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"arraylist\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"arraylist-add\": {"," \"requires\": ["," \"arraylist\""," ]"," },"," \"arraylist-filter\": {"," \"requires\": ["," \"arraylist\""," ]"," },"," \"arraysort\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"async-queue\": {"," \"requires\": ["," \"event-custom\""," ]"," },"," \"attribute\": {"," \"use\": ["," \"attribute-base\","," \"attribute-complex\""," ]"," },"," \"attribute-base\": {"," \"requires\": ["," \"attribute-core\","," \"attribute-events\","," \"attribute-extras\""," ]"," },"," \"attribute-complex\": {"," \"requires\": ["," \"attribute-base\""," ]"," },"," \"attribute-core\": {"," \"requires\": ["," \"oop\""," ]"," },"," \"attribute-events\": {"," \"requires\": ["," \"event-custom\""," ]"," },"," \"attribute-extras\": {"," \"requires\": ["," \"oop\""," ]"," },"," \"autocomplete\": {"," \"use\": ["," \"autocomplete-base\","," \"autocomplete-sources\","," \"autocomplete-list\","," \"autocomplete-plugin\""," ]"," },"," \"autocomplete-base\": {"," \"optional\": ["," \"autocomplete-sources\""," ],"," \"requires\": ["," \"array-extras\","," \"base-build\","," \"escape\","," \"event-valuechange\","," \"node-base\""," ]"," },"," \"autocomplete-filters\": {"," \"requires\": ["," \"array-extras\","," \"text-wordbreak\""," ]"," },"," \"autocomplete-filters-accentfold\": {"," \"requires\": ["," \"array-extras\","," \"text-accentfold\","," \"text-wordbreak\""," ]"," },"," \"autocomplete-highlighters\": {"," \"requires\": ["," \"array-extras\","," \"highlight-base\""," ]"," },"," \"autocomplete-highlighters-accentfold\": {"," \"requires\": ["," \"array-extras\","," \"highlight-accentfold\""," ]"," },"," \"autocomplete-list\": {"," \"after\": ["," \"autocomplete-sources\""," ],"," \"lang\": ["," \"en\""," ],"," \"requires\": ["," \"autocomplete-base\","," \"event-resize\","," \"node-screen\","," \"selector-css3\","," \"shim-plugin\","," \"widget\","," \"widget-position\","," \"widget-position-align\""," ],"," \"skinnable\": true"," },"," \"autocomplete-list-keys\": {"," \"condition\": {"," \"name\": \"autocomplete-list-keys\","," \"test\": function (Y) {"," // Only add keyboard support to autocomplete-list if this doesn't appear to"," // be an iOS or Android-based mobile device."," //"," // There's currently no feasible way to actually detect whether a device has"," // a hardware keyboard, so this sniff will have to do. It can easily be"," // overridden by manually loading the autocomplete-list-keys module."," //"," // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari"," // doesn't fire the keyboard events used by AutoCompleteList, so there's"," // no point loading the -keys module even when a bluetooth keyboard may be"," // available."," return !(Y.UA.ios || Y.UA.android);","},"," \"trigger\": \"autocomplete-list\""," },"," \"requires\": ["," \"autocomplete-list\","," \"base-build\""," ]"," },"," \"autocomplete-plugin\": {"," \"requires\": ["," \"autocomplete-list\","," \"node-pluginhost\""," ]"," },"," \"autocomplete-sources\": {"," \"optional\": ["," \"io-base\","," \"json-parse\","," \"jsonp\","," \"yql\""," ],"," \"requires\": ["," \"autocomplete-base\""," ]"," },"," \"base\": {"," \"use\": ["," \"base-base\","," \"base-pluginhost\","," \"base-build\""," ]"," },"," \"base-base\": {"," \"after\": ["," \"attribute-complex\""," ],"," \"requires\": ["," \"base-core\","," \"attribute-base\""," ]"," },"," \"base-build\": {"," \"requires\": ["," \"base-base\""," ]"," },"," \"base-core\": {"," \"requires\": ["," \"attribute-core\""," ]"," },"," \"base-pluginhost\": {"," \"requires\": ["," \"base-base\","," \"pluginhost\""," ]"," },"," \"button\": {"," \"requires\": ["," \"button-core\","," \"cssbutton\","," \"widget\""," ]"," },"," \"button-core\": {"," \"requires\": ["," \"attribute-core\","," \"classnamemanager\","," \"node-base\""," ]"," },"," \"button-group\": {"," \"requires\": ["," \"button-plugin\","," \"cssbutton\","," \"widget\""," ]"," },"," \"button-plugin\": {"," \"requires\": ["," \"button-core\","," \"cssbutton\","," \"node-pluginhost\""," ]"," },"," \"cache\": {"," \"use\": ["," \"cache-base\","," \"cache-offline\","," \"cache-plugin\""," ]"," },"," \"cache-base\": {"," \"requires\": ["," \"base\""," ]"," },"," \"cache-offline\": {"," \"requires\": ["," \"cache-base\","," \"json\""," ]"," },"," \"cache-plugin\": {"," \"requires\": ["," \"plugin\","," \"cache-base\""," ]"," },"," \"calendar\": {"," \"lang\": ["," \"de\","," \"en\","," \"fr\","," \"ja\","," \"nb-NO\","," \"pt-BR\","," \"ru\","," \"zh-HANT-TW\""," ],"," \"requires\": ["," \"calendar-base\","," \"calendarnavigator\""," ],"," \"skinnable\": true"," },"," \"calendar-base\": {"," \"lang\": ["," \"de\","," \"en\","," \"fr\","," \"ja\","," \"nb-NO\","," \"pt-BR\","," \"ru\","," \"zh-HANT-TW\""," ],"," \"requires\": ["," \"widget\","," \"substitute\","," \"datatype-date\","," \"datatype-date-math\","," \"cssgrids\""," ],"," \"skinnable\": true"," },"," \"calendarnavigator\": {"," \"requires\": ["," \"plugin\","," \"classnamemanager\","," \"datatype-date\","," \"node\","," \"substitute\""," ],"," \"skinnable\": true"," },"," \"charts\": {"," \"requires\": ["," \"charts-base\""," ]"," },"," \"charts-base\": {"," \"requires\": ["," \"dom\","," \"datatype-number\","," \"datatype-date\","," \"event-custom\","," \"event-mouseenter\","," \"event-touch\","," \"widget\","," \"widget-position\","," \"widget-stack\","," \"graphics\""," ]"," },"," \"charts-legend\": {"," \"requires\": ["," \"charts-base\""," ]"," },"," \"classnamemanager\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"clickable-rail\": {"," \"requires\": ["," \"slider-base\""," ]"," },"," \"collection\": {"," \"use\": ["," \"array-extras\","," \"arraylist\","," \"arraylist-add\","," \"arraylist-filter\","," \"array-invoke\""," ]"," },"," \"console\": {"," \"lang\": ["," \"en\","," \"es\","," \"ja\""," ],"," \"requires\": ["," \"yui-log\","," \"widget\""," ],"," \"skinnable\": true"," },"," \"console-filters\": {"," \"requires\": ["," \"plugin\","," \"console\""," ],"," \"skinnable\": true"," },"," \"controller\": {"," \"use\": ["," \"router\""," ]"," },"," \"cookie\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"createlink-base\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"cssbase\": {"," \"after\": ["," \"cssreset\","," \"cssfonts\","," \"cssgrids\","," \"cssreset-context\","," \"cssfonts-context\","," \"cssgrids-context\""," ],"," \"type\": \"css\""," },"," \"cssbase-context\": {"," \"after\": ["," \"cssreset\","," \"cssfonts\","," \"cssgrids\","," \"cssreset-context\","," \"cssfonts-context\","," \"cssgrids-context\""," ],"," \"type\": \"css\""," },"," \"cssbutton\": {"," \"type\": \"css\""," },"," \"cssfonts\": {"," \"type\": \"css\""," },"," \"cssfonts-context\": {"," \"type\": \"css\""," },"," \"cssgrids\": {"," \"optional\": ["," \"cssreset\","," \"cssfonts\""," ],"," \"type\": \"css\""," },"," \"cssgrids-base\": {"," \"optional\": ["," \"cssreset\","," \"cssfonts\""," ],"," \"type\": \"css\""," },"," \"cssgrids-units\": {"," \"optional\": ["," \"cssreset\","," \"cssfonts\""," ],"," \"requires\": ["," \"cssgrids-base\""," ],"," \"type\": \"css\""," },"," \"cssreset\": {"," \"type\": \"css\""," },"," \"cssreset-context\": {"," \"type\": \"css\""," },"," \"dataschema\": {"," \"use\": ["," \"dataschema-base\","," \"dataschema-json\","," \"dataschema-xml\","," \"dataschema-array\","," \"dataschema-text\""," ]"," },"," \"dataschema-array\": {"," \"requires\": ["," \"dataschema-base\""," ]"," },"," \"dataschema-base\": {"," \"requires\": ["," \"base\""," ]"," },"," \"dataschema-json\": {"," \"requires\": ["," \"dataschema-base\","," \"json\""," ]"," },"," \"dataschema-text\": {"," \"requires\": ["," \"dataschema-base\""," ]"," },"," \"dataschema-xml\": {"," \"requires\": ["," \"dataschema-base\""," ]"," },"," \"datasource\": {"," \"use\": ["," \"datasource-local\","," \"datasource-io\","," \"datasource-get\","," \"datasource-function\","," \"datasource-cache\","," \"datasource-jsonschema\","," \"datasource-xmlschema\","," \"datasource-arrayschema\","," \"datasource-textschema\","," \"datasource-polling\""," ]"," },"," \"datasource-arrayschema\": {"," \"requires\": ["," \"datasource-local\","," \"plugin\","," \"dataschema-array\""," ]"," },"," \"datasource-cache\": {"," \"requires\": ["," \"datasource-local\","," \"plugin\","," \"cache-base\""," ]"," },"," \"datasource-function\": {"," \"requires\": ["," \"datasource-local\""," ]"," },"," \"datasource-get\": {"," \"requires\": ["," \"datasource-local\","," \"get\""," ]"," },"," \"datasource-io\": {"," \"requires\": ["," \"datasource-local\","," \"io-base\""," ]"," },"," \"datasource-jsonschema\": {"," \"requires\": ["," \"datasource-local\","," \"plugin\","," \"dataschema-json\""," ]"," },"," \"datasource-local\": {"," \"requires\": ["," \"base\""," ]"," },"," \"datasource-polling\": {"," \"requires\": ["," \"datasource-local\""," ]"," },"," \"datasource-textschema\": {"," \"requires\": ["," \"datasource-local\","," \"plugin\","," \"dataschema-text\""," ]"," },"," \"datasource-xmlschema\": {"," \"requires\": ["," \"datasource-local\","," \"plugin\","," \"datatype-xml\","," \"dataschema-xml\""," ]"," },"," \"datatable\": {"," \"use\": ["," \"datatable-core\","," \"datatable-table\","," \"datatable-head\","," \"datatable-body\","," \"datatable-base\","," \"datatable-column-widths\","," \"datatable-message\","," \"datatable-mutable\","," \"datatable-sort\","," \"datatable-datasource\""," ]"," },"," \"datatable-base\": {"," \"requires\": ["," \"datatable-core\","," \"datatable-table\","," \"datatable-head\","," \"datatable-body\","," \"base-build\","," \"widget\""," ],"," \"skinnable\": true"," },"," \"datatable-base-deprecated\": {"," \"requires\": ["," \"recordset-base\","," \"widget\","," \"substitute\","," \"event-mouseenter\""," ],"," \"skinnable\": true"," },"," \"datatable-body\": {"," \"requires\": ["," \"datatable-core\","," \"view\","," \"classnamemanager\""," ]"," },"," \"datatable-column-widths\": {"," \"requires\": ["," \"datatable-base\""," ]"," },"," \"datatable-core\": {"," \"requires\": ["," \"escape\","," \"model-list\","," \"node-event-delegate\""," ]"," },"," \"datatable-datasource\": {"," \"requires\": ["," \"datatable-base\","," \"plugin\","," \"datasource-local\""," ]"," },"," \"datatable-datasource-deprecated\": {"," \"requires\": ["," \"datatable-base-deprecated\","," \"plugin\","," \"datasource-local\""," ]"," },"," \"datatable-deprecated\": {"," \"use\": ["," \"datatable-base-deprecated\","," \"datatable-datasource-deprecated\","," \"datatable-sort-deprecated\","," \"datatable-scroll-deprecated\""," ]"," },"," \"datatable-head\": {"," \"requires\": ["," \"datatable-core\","," \"view\","," \"classnamemanager\""," ]"," },"," \"datatable-message\": {"," \"lang\": ["," \"en\""," ],"," \"requires\": ["," \"datatable-base\""," ],"," \"skinnable\": true"," },"," \"datatable-mutable\": {"," \"requires\": ["," \"datatable-base\""," ]"," },"," \"datatable-scroll\": {"," \"requires\": ["," \"datatable-base\","," \"datatable-column-widths\","," \"dom-screen\""," ],"," \"skinnable\": true"," },"," \"datatable-scroll-deprecated\": {"," \"requires\": ["," \"datatable-base-deprecated\","," \"plugin\""," ]"," },"," \"datatable-sort\": {"," \"lang\": ["," \"en\""," ],"," \"requires\": ["," \"datatable-base\""," ],"," \"skinnable\": true"," },"," \"datatable-sort-deprecated\": {"," \"lang\": ["," \"en\""," ],"," \"requires\": ["," \"datatable-base-deprecated\","," \"plugin\","," \"recordset-sort\""," ]"," },"," \"datatable-table\": {"," \"requires\": ["," \"datatable-core\","," \"datatable-head\","," \"datatable-body\","," \"view\","," \"classnamemanager\""," ]"," },"," \"datatype\": {"," \"use\": ["," \"datatype-date\","," \"datatype-number\","," \"datatype-xml\""," ]"," },"," \"datatype-date\": {"," \"use\": ["," \"datatype-date-parse\","," \"datatype-date-format\","," \"datatype-date-math\""," ]"," },"," \"datatype-date-format\": {"," \"lang\": ["," \"ar\","," \"ar-JO\","," \"ca\","," \"ca-ES\","," \"da\","," \"da-DK\","," \"de\","," \"de-AT\","," \"de-DE\","," \"el\","," \"el-GR\","," \"en\","," \"en-AU\","," \"en-CA\","," \"en-GB\","," \"en-IE\","," \"en-IN\","," \"en-JO\","," \"en-MY\","," \"en-NZ\","," \"en-PH\","," \"en-SG\","," \"en-US\","," \"es\","," \"es-AR\","," \"es-BO\","," \"es-CL\","," \"es-CO\","," \"es-EC\","," \"es-ES\","," \"es-MX\","," \"es-PE\","," \"es-PY\","," \"es-US\","," \"es-UY\","," \"es-VE\","," \"fi\","," \"fi-FI\","," \"fr\","," \"fr-BE\","," \"fr-CA\","," \"fr-FR\","," \"hi\","," \"hi-IN\","," \"id\","," \"id-ID\","," \"it\","," \"it-IT\","," \"ja\","," \"ja-JP\","," \"ko\","," \"ko-KR\","," \"ms\","," \"ms-MY\","," \"nb\","," \"nb-NO\","," \"nl\","," \"nl-BE\","," \"nl-NL\","," \"pl\","," \"pl-PL\","," \"pt\","," \"pt-BR\","," \"ro\","," \"ro-RO\","," \"ru\","," \"ru-RU\","," \"sv\","," \"sv-SE\","," \"th\","," \"th-TH\","," \"tr\","," \"tr-TR\","," \"vi\","," \"vi-VN\","," \"zh-Hans\","," \"zh-Hans-CN\","," \"zh-Hant\","," \"zh-Hant-HK\","," \"zh-Hant-TW\""," ]"," },"," \"datatype-date-math\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"datatype-date-parse\": {},"," \"datatype-number\": {"," \"use\": ["," \"datatype-number-parse\","," \"datatype-number-format\""," ]"," },"," \"datatype-number-format\": {},"," \"datatype-number-parse\": {},"," \"datatype-xml\": {"," \"use\": ["," \"datatype-xml-parse\","," \"datatype-xml-format\""," ]"," },"," \"datatype-xml-format\": {},"," \"datatype-xml-parse\": {},"," \"dd\": {"," \"use\": ["," \"dd-ddm-base\","," \"dd-ddm\","," \"dd-ddm-drop\","," \"dd-drag\","," \"dd-proxy\","," \"dd-constrain\","," \"dd-drop\","," \"dd-scroll\","," \"dd-delegate\""," ]"," },"," \"dd-constrain\": {"," \"requires\": ["," \"dd-drag\""," ]"," },"," \"dd-ddm\": {"," \"requires\": ["," \"dd-ddm-base\","," \"event-resize\""," ]"," },"," \"dd-ddm-base\": {"," \"requires\": ["," \"node\","," \"base\","," \"yui-throttle\","," \"classnamemanager\""," ]"," },"," \"dd-ddm-drop\": {"," \"requires\": ["," \"dd-ddm\""," ]"," },"," \"dd-delegate\": {"," \"requires\": ["," \"dd-drag\","," \"dd-drop-plugin\","," \"event-mouseenter\""," ]"," },"," \"dd-drag\": {"," \"requires\": ["," \"dd-ddm-base\""," ]"," },"," \"dd-drop\": {"," \"requires\": ["," \"dd-drag\","," \"dd-ddm-drop\""," ]"," },"," \"dd-drop-plugin\": {"," \"requires\": ["," \"dd-drop\""," ]"," },"," \"dd-gestures\": {"," \"condition\": {"," \"name\": \"dd-gestures\","," \"trigger\": \"dd-drag\","," \"ua\": \"touchEnabled\""," },"," \"requires\": ["," \"dd-drag\","," \"event-synthetic\","," \"event-gestures\""," ]"," },"," \"dd-plugin\": {"," \"optional\": ["," \"dd-constrain\","," \"dd-proxy\""," ],"," \"requires\": ["," \"dd-drag\""," ]"," },"," \"dd-proxy\": {"," \"requires\": ["," \"dd-drag\""," ]"," },"," \"dd-scroll\": {"," \"requires\": ["," \"dd-drag\""," ]"," },"," \"dial\": {"," \"lang\": ["," \"en\","," \"es\""," ],"," \"requires\": ["," \"widget\","," \"dd-drag\","," \"event-mouseenter\","," \"event-move\","," \"event-key\","," \"transition\","," \"intl\""," ],"," \"skinnable\": true"," },"," \"dom\": {"," \"use\": ["," \"dom-base\","," \"dom-screen\","," \"dom-style\","," \"selector-native\","," \"selector\""," ]"," },"," \"dom-base\": {"," \"requires\": ["," \"dom-core\""," ]"," },"," \"dom-core\": {"," \"requires\": ["," \"oop\","," \"features\""," ]"," },"," \"dom-deprecated\": {"," \"requires\": ["," \"dom-base\""," ]"," },"," \"dom-screen\": {"," \"requires\": ["," \"dom-base\","," \"dom-style\""," ]"," },"," \"dom-style\": {"," \"requires\": ["," \"dom-base\""," ]"," },"," \"dom-style-ie\": {"," \"condition\": {"," \"name\": \"dom-style-ie\","," \"test\": function (Y) {",""," var testFeature = Y.Features.test,"," addFeature = Y.Features.add,"," WINDOW = Y.config.win,"," DOCUMENT = Y.config.doc,"," DOCUMENT_ELEMENT = 'documentElement',"," ret = false;",""," addFeature('style', 'computedStyle', {"," test: function() {"," return WINDOW && 'getComputedStyle' in WINDOW;"," }"," });",""," addFeature('style', 'opacity', {"," test: function() {"," return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;"," }"," });",""," ret = (!testFeature('style', 'opacity') &&"," !testFeature('style', 'computedStyle'));",""," return ret;","},"," \"trigger\": \"dom-style\""," },"," \"requires\": ["," \"dom-style\""," ]"," },"," \"dump\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"editor\": {"," \"use\": ["," \"frame\","," \"editor-selection\","," \"exec-command\","," \"editor-base\","," \"editor-para\","," \"editor-br\","," \"editor-bidi\","," \"editor-tab\","," \"createlink-base\""," ]"," },"," \"editor-base\": {"," \"requires\": ["," \"base\","," \"frame\","," \"node\","," \"exec-command\","," \"editor-selection\""," ]"," },"," \"editor-bidi\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"editor-br\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"editor-lists\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"editor-para\": {"," \"requires\": ["," \"editor-para-base\""," ]"," },"," \"editor-para-base\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"editor-para-ie\": {"," \"condition\": {"," \"name\": \"editor-para-ie\","," \"trigger\": \"editor-para\","," \"ua\": \"ie\","," \"when\": \"instead\""," },"," \"requires\": ["," \"editor-para-base\""," ]"," },"," \"editor-selection\": {"," \"requires\": ["," \"node\""," ]"," },"," \"editor-tab\": {"," \"requires\": ["," \"editor-base\""," ]"," },"," \"escape\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"event\": {"," \"after\": ["," \"node-base\""," ],"," \"use\": ["," \"event-base\","," \"event-delegate\","," \"event-synthetic\","," \"event-mousewheel\","," \"event-mouseenter\","," \"event-key\","," \"event-focus\","," \"event-resize\","," \"event-hover\","," \"event-outside\","," \"event-touch\","," \"event-move\","," \"event-flick\","," \"event-valuechange\","," \"event-tap\""," ]"," },"," \"event-base\": {"," \"after\": ["," \"node-base\""," ],"," \"requires\": ["," \"event-custom-base\""," ]"," },"," \"event-base-ie\": {"," \"after\": ["," \"event-base\""," ],"," \"condition\": {"," \"name\": \"event-base-ie\","," \"test\": function(Y) {"," var imp = Y.config.doc && Y.config.doc.implementation;"," return (imp && (!imp.hasFeature('Events', '2.0')));","},"," \"trigger\": \"node-base\""," },"," \"requires\": ["," \"node-base\""," ]"," },"," \"event-contextmenu\": {"," \"requires\": ["," \"event-synthetic\","," \"dom-screen\""," ]"," },"," \"event-custom\": {"," \"use\": ["," \"event-custom-base\","," \"event-custom-complex\""," ]"," },"," \"event-custom-base\": {"," \"requires\": ["," \"oop\""," ]"," },"," \"event-custom-complex\": {"," \"requires\": ["," \"event-custom-base\""," ]"," },"," \"event-delegate\": {"," \"requires\": ["," \"node-base\""," ]"," },"," \"event-flick\": {"," \"requires\": ["," \"node-base\","," \"event-touch\","," \"event-synthetic\""," ]"," },"," \"event-focus\": {"," \"requires\": ["," \"event-synthetic\""," ]"," },"," \"event-gestures\": {"," \"use\": ["," \"event-flick\","," \"event-move\""," ]"," },"," \"event-hover\": {"," \"requires\": ["," \"event-mouseenter\""," ]"," },"," \"event-key\": {"," \"requires\": ["," \"event-synthetic\""," ]"," },"," \"event-mouseenter\": {"," \"requires\": ["," \"event-synthetic\""," ]"," },"," \"event-mousewheel\": {"," \"requires\": ["," \"node-base\""," ]"," },"," \"event-move\": {"," \"requires\": ["," \"node-base\","," \"event-touch\","," \"event-synthetic\""," ]"," },"," \"event-outside\": {"," \"requires\": ["," \"event-synthetic\""," ]"," },"," \"event-resize\": {"," \"requires\": ["," \"node-base\","," \"event-synthetic\""," ]"," },"," \"event-simulate\": {"," \"requires\": ["," \"event-base\""," ]"," },"," \"event-synthetic\": {"," \"requires\": ["," \"node-base\","," \"event-custom-complex\""," ]"," },"," \"event-tap\": {"," \"requires\": ["," \"node-base\","," \"event-base\","," \"event-touch\","," \"event-synthetic\""," ]"," },"," \"event-touch\": {"," \"requires\": ["," \"node-base\""," ]"," },"," \"event-valuechange\": {"," \"requires\": ["," \"event-focus\","," \"event-synthetic\""," ]"," },"," \"exec-command\": {"," \"requires\": ["," \"frame\""," ]"," },"," \"features\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"file\": {"," \"requires\": ["," \"file-flash\","," \"file-html5\""," ]"," },"," \"file-flash\": {"," \"requires\": ["," \"base\""," ]"," },"," \"file-html5\": {"," \"requires\": ["," \"base\""," ]"," },"," \"frame\": {"," \"requires\": ["," \"base\","," \"node\","," \"selector-css3\","," \"yui-throttle\""," ]"," },"," \"gesture-simulate\": {"," \"requires\": ["," \"async-queue\","," \"event-simulate\","," \"node-screen\""," ]"," },"," \"get\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"graphics\": {"," \"requires\": ["," \"node\","," \"event-custom\","," \"pluginhost\","," \"matrix\","," \"classnamemanager\""," ]"," },"," \"graphics-canvas\": {"," \"condition\": {"," \"name\": \"graphics-canvas\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == \"canvas\","," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\"),"," svg = (DOCUMENT && DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\"));"," return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext(\"2d\"));","},"," \"trigger\": \"graphics\""," },"," \"requires\": ["," \"graphics\""," ]"," },"," \"graphics-canvas-default\": {"," \"condition\": {"," \"name\": \"graphics-canvas-default\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == \"canvas\","," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\"),"," svg = (DOCUMENT && DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\"));"," return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext(\"2d\"));","},"," \"trigger\": \"graphics\""," }"," },"," \"graphics-svg\": {"," \"condition\": {"," \"name\": \"graphics-svg\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != \"canvas\","," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\"),"," svg = (DOCUMENT && DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\"));"," "," return svg && (useSVG || !canvas);","},"," \"trigger\": \"graphics\""," },"," \"requires\": ["," \"graphics\""," ]"," },"," \"graphics-svg-default\": {"," \"condition\": {"," \"name\": \"graphics-svg-default\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != \"canvas\","," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\"),"," svg = (DOCUMENT && DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\"));"," "," return svg && (useSVG || !canvas);","},"," \"trigger\": \"graphics\""," }"," },"," \"graphics-vml\": {"," \"condition\": {"," \"name\": \"graphics-vml\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\");"," return (DOCUMENT && !DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\") && (!canvas || !canvas.getContext || !canvas.getContext(\"2d\")));","},"," \"trigger\": \"graphics\""," },"," \"requires\": ["," \"graphics\""," ]"," },"," \"graphics-vml-default\": {"," \"condition\": {"," \"name\": \"graphics-vml-default\","," \"test\": function(Y) {"," var DOCUMENT = Y.config.doc,"," canvas = DOCUMENT && DOCUMENT.createElement(\"canvas\");"," return (DOCUMENT && !DOCUMENT.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\") && (!canvas || !canvas.getContext || !canvas.getContext(\"2d\")));","},"," \"trigger\": \"graphics\""," }"," },"," \"handlebars\": {"," \"use\": ["," \"handlebars-compiler\""," ]"," },"," \"handlebars-base\": {"," \"requires\": ["," \"escape\""," ]"," },"," \"handlebars-compiler\": {"," \"requires\": ["," \"handlebars-base\""," ]"," },"," \"highlight\": {"," \"use\": ["," \"highlight-base\","," \"highlight-accentfold\""," ]"," },"," \"highlight-accentfold\": {"," \"requires\": ["," \"highlight-base\","," \"text-accentfold\""," ]"," },"," \"highlight-base\": {"," \"requires\": ["," \"array-extras\","," \"classnamemanager\","," \"escape\","," \"text-wordbreak\""," ]"," },"," \"history\": {"," \"use\": ["," \"history-base\","," \"history-hash\","," \"history-hash-ie\","," \"history-html5\""," ]"," },"," \"history-base\": {"," \"requires\": ["," \"event-custom-complex\""," ]"," },"," \"history-hash\": {"," \"after\": ["," \"history-html5\""," ],"," \"requires\": ["," \"event-synthetic\","," \"history-base\","," \"yui-later\""," ]"," },"," \"history-hash-ie\": {"," \"condition\": {"," \"name\": \"history-hash-ie\","," \"test\": function (Y) {"," var docMode = Y.config.doc && Y.config.doc.documentMode;",""," return Y.UA.ie && (!('onhashchange' in Y.config.win) ||"," !docMode || docMode < 8);","},"," \"trigger\": \"history-hash\""," },"," \"requires\": ["," \"history-hash\","," \"node-base\""," ]"," },"," \"history-html5\": {"," \"optional\": ["," \"json\""," ],"," \"requires\": ["," \"event-base\","," \"history-base\","," \"node-base\""," ]"," },"," \"imageloader\": {"," \"requires\": ["," \"base-base\","," \"node-style\","," \"node-screen\""," ]"," },"," \"intl\": {"," \"requires\": ["," \"intl-base\","," \"event-custom\""," ]"," },"," \"intl-base\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"io\": {"," \"use\": ["," \"io-base\","," \"io-xdr\","," \"io-form\","," \"io-upload-iframe\","," \"io-queue\""," ]"," },"," \"io-base\": {"," \"requires\": ["," \"event-custom-base\","," \"querystring-stringify-simple\""," ]"," },"," \"io-form\": {"," \"requires\": ["," \"io-base\","," \"node-base\""," ]"," },"," \"io-nodejs\": {"," \"condition\": {"," \"name\": \"io-nodejs\","," \"trigger\": \"io-base\","," \"ua\": \"nodejs\""," },"," \"requires\": ["," \"io-base\""," ]"," },"," \"io-queue\": {"," \"requires\": ["," \"io-base\","," \"queue-promote\""," ]"," },"," \"io-upload-iframe\": {"," \"requires\": ["," \"io-base\","," \"node-base\""," ]"," },"," \"io-xdr\": {"," \"requires\": ["," \"io-base\","," \"datatype-xml-parse\""," ]"," },"," \"json\": {"," \"use\": ["," \"json-parse\","," \"json-stringify\""," ]"," },"," \"json-parse\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"json-stringify\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"jsonp\": {"," \"requires\": ["," \"get\","," \"oop\""," ]"," },"," \"jsonp-url\": {"," \"requires\": ["," \"jsonp\""," ]"," },"," \"lazy-model-list\": {"," \"requires\": ["," \"model-list\""," ]"," },"," \"loader\": {"," \"use\": ["," \"loader-base\","," \"loader-rollup\","," \"loader-yui3\""," ]"," },"," \"loader-base\": {"," \"requires\": ["," \"get\","," \"features\""," ]"," },"," \"loader-rollup\": {"," \"requires\": ["," \"loader-base\""," ]"," },"," \"loader-yui3\": {"," \"requires\": ["," \"loader-base\""," ]"," },"," \"matrix\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"model\": {"," \"requires\": ["," \"base-build\","," \"escape\","," \"json-parse\""," ]"," },"," \"model-list\": {"," \"requires\": ["," \"array-extras\","," \"array-invoke\","," \"arraylist\","," \"base-build\","," \"escape\","," \"json-parse\","," \"model\""," ]"," },"," \"model-sync-rest\": {"," \"requires\": ["," \"model\","," \"io-base\","," \"json-stringify\""," ]"," },"," \"node\": {"," \"use\": ["," \"node-base\","," \"node-event-delegate\","," \"node-pluginhost\","," \"node-screen\","," \"node-style\""," ]"," },"," \"node-base\": {"," \"requires\": ["," \"event-base\","," \"node-core\","," \"dom-base\""," ]"," },"," \"node-core\": {"," \"requires\": ["," \"dom-core\","," \"selector\""," ]"," },"," \"node-deprecated\": {"," \"requires\": ["," \"node-base\""," ]"," },"," \"node-event-delegate\": {"," \"requires\": ["," \"node-base\","," \"event-delegate\""," ]"," },"," \"node-event-html5\": {"," \"requires\": ["," \"node-base\""," ]"," },"," \"node-event-simulate\": {"," \"requires\": ["," \"node-base\","," \"event-simulate\","," \"gesture-simulate\""," ]"," },"," \"node-flick\": {"," \"requires\": ["," \"classnamemanager\","," \"transition\","," \"event-flick\","," \"plugin\""," ],"," \"skinnable\": true"," },"," \"node-focusmanager\": {"," \"requires\": ["," \"attribute\","," \"node\","," \"plugin\","," \"node-event-simulate\","," \"event-key\","," \"event-focus\""," ]"," },"," \"node-load\": {"," \"requires\": ["," \"node-base\","," \"io-base\""," ]"," },"," \"node-menunav\": {"," \"requires\": ["," \"node\","," \"classnamemanager\","," \"plugin\","," \"node-focusmanager\""," ],"," \"skinnable\": true"," },"," \"node-pluginhost\": {"," \"requires\": ["," \"node-base\","," \"pluginhost\""," ]"," },"," \"node-screen\": {"," \"requires\": ["," \"dom-screen\","," \"node-base\""," ]"," },"," \"node-scroll-info\": {"," \"requires\": ["," \"base-build\","," \"dom-screen\","," \"event-resize\","," \"node-pluginhost\","," \"plugin\""," ]"," },"," \"node-style\": {"," \"requires\": ["," \"dom-style\","," \"node-base\""," ]"," },"," \"oop\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"overlay\": {"," \"requires\": ["," \"widget\","," \"widget-stdmod\","," \"widget-position\","," \"widget-position-align\","," \"widget-stack\","," \"widget-position-constrain\""," ],"," \"skinnable\": true"," },"," \"panel\": {"," \"requires\": ["," \"widget\","," \"widget-autohide\","," \"widget-buttons\","," \"widget-modality\","," \"widget-position\","," \"widget-position-align\","," \"widget-position-constrain\","," \"widget-stack\","," \"widget-stdmod\""," ],"," \"skinnable\": true"," },"," \"parallel\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"pjax\": {"," \"requires\": ["," \"pjax-base\","," \"pjax-content\""," ]"," },"," \"pjax-base\": {"," \"requires\": ["," \"classnamemanager\","," \"node-event-delegate\","," \"router\""," ]"," },"," \"pjax-content\": {"," \"requires\": ["," \"io-base\","," \"node-base\","," \"router\""," ]"," },"," \"pjax-plugin\": {"," \"requires\": ["," \"node-pluginhost\","," \"pjax\","," \"plugin\""," ]"," },"," \"plugin\": {"," \"requires\": ["," \"base-base\""," ]"," },"," \"pluginhost\": {"," \"use\": ["," \"pluginhost-base\","," \"pluginhost-config\""," ]"," },"," \"pluginhost-base\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"pluginhost-config\": {"," \"requires\": ["," \"pluginhost-base\""," ]"," },"," \"profiler\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"querystring\": {"," \"use\": ["," \"querystring-parse\","," \"querystring-stringify\""," ]"," },"," \"querystring-parse\": {"," \"requires\": ["," \"yui-base\","," \"array-extras\""," ]"," },"," \"querystring-parse-simple\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"querystring-stringify\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"querystring-stringify-simple\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"queue-promote\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"range-slider\": {"," \"requires\": ["," \"slider-base\","," \"slider-value-range\","," \"clickable-rail\""," ]"," },"," \"recordset\": {"," \"use\": ["," \"recordset-base\","," \"recordset-sort\","," \"recordset-filter\","," \"recordset-indexer\""," ]"," },"," \"recordset-base\": {"," \"requires\": ["," \"base\","," \"arraylist\""," ]"," },"," \"recordset-filter\": {"," \"requires\": ["," \"recordset-base\","," \"array-extras\","," \"plugin\""," ]"," },"," \"recordset-indexer\": {"," \"requires\": ["," \"recordset-base\","," \"plugin\""," ]"," },"," \"recordset-sort\": {"," \"requires\": ["," \"arraysort\","," \"recordset-base\","," \"plugin\""," ]"," },"," \"resize\": {"," \"use\": ["," \"resize-base\","," \"resize-proxy\","," \"resize-constrain\""," ]"," },"," \"resize-base\": {"," \"requires\": ["," \"base\","," \"widget\","," \"event\","," \"oop\","," \"dd-drag\","," \"dd-delegate\","," \"dd-drop\""," ],"," \"skinnable\": true"," },"," \"resize-constrain\": {"," \"requires\": ["," \"plugin\","," \"resize-base\""," ]"," },"," \"resize-plugin\": {"," \"optional\": ["," \"resize-constrain\""," ],"," \"requires\": ["," \"resize-base\","," \"plugin\""," ]"," },"," \"resize-proxy\": {"," \"requires\": ["," \"plugin\","," \"resize-base\""," ]"," },"," \"router\": {"," \"optional\": ["," \"querystring-parse\""," ],"," \"requires\": ["," \"array-extras\","," \"base-build\","," \"history\""," ]"," },"," \"scrollview\": {"," \"requires\": ["," \"scrollview-base\","," \"scrollview-scrollbars\""," ]"," },"," \"scrollview-base\": {"," \"requires\": ["," \"widget\","," \"event-gestures\","," \"event-mousewheel\","," \"transition\""," ],"," \"skinnable\": true"," },"," \"scrollview-base-ie\": {"," \"condition\": {"," \"name\": \"scrollview-base-ie\","," \"trigger\": \"scrollview-base\","," \"ua\": \"ie\""," },"," \"requires\": ["," \"scrollview-base\""," ]"," },"," \"scrollview-list\": {"," \"requires\": ["," \"plugin\","," \"classnamemanager\""," ],"," \"skinnable\": true"," },"," \"scrollview-paginator\": {"," \"requires\": ["," \"plugin\","," \"classnamemanager\""," ]"," },"," \"scrollview-scrollbars\": {"," \"requires\": ["," \"classnamemanager\","," \"transition\","," \"plugin\""," ],"," \"skinnable\": true"," },"," \"selector\": {"," \"requires\": ["," \"selector-native\""," ]"," },"," \"selector-css2\": {"," \"condition\": {"," \"name\": \"selector-css2\","," \"test\": function (Y) {"," var DOCUMENT = Y.config.doc,"," ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);",""," return ret;","},"," \"trigger\": \"selector\""," },"," \"requires\": ["," \"selector-native\""," ]"," },"," \"selector-css3\": {"," \"requires\": ["," \"selector-native\","," \"selector-css2\""," ]"," },"," \"selector-native\": {"," \"requires\": ["," \"dom-base\""," ]"," },"," \"shim-plugin\": {"," \"requires\": ["," \"node-style\","," \"node-pluginhost\""," ]"," },"," \"slider\": {"," \"use\": ["," \"slider-base\","," \"slider-value-range\","," \"clickable-rail\","," \"range-slider\""," ]"," },"," \"slider-base\": {"," \"requires\": ["," \"widget\","," \"dd-constrain\","," \"event-key\""," ],"," \"skinnable\": true"," },"," \"slider-value-range\": {"," \"requires\": ["," \"slider-base\""," ]"," },"," \"sortable\": {"," \"requires\": ["," \"dd-delegate\","," \"dd-drop-plugin\","," \"dd-proxy\""," ]"," },"," \"sortable-scroll\": {"," \"requires\": ["," \"dd-scroll\","," \"sortable\""," ]"," },"," \"stylesheet\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"substitute\": {"," \"optional\": ["," \"dump\""," ],"," \"requires\": ["," \"yui-base\""," ]"," },"," \"swf\": {"," \"requires\": ["," \"event-custom\","," \"node\","," \"swfdetect\","," \"escape\""," ]"," },"," \"swfdetect\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"tabview\": {"," \"requires\": ["," \"widget\","," \"widget-parent\","," \"widget-child\","," \"tabview-base\","," \"node-pluginhost\","," \"node-focusmanager\""," ],"," \"skinnable\": true"," },"," \"tabview-base\": {"," \"requires\": ["," \"node-event-delegate\","," \"classnamemanager\","," \"skin-sam-tabview\""," ]"," },"," \"tabview-plugin\": {"," \"requires\": ["," \"tabview-base\""," ]"," },"," \"test\": {"," \"requires\": ["," \"event-simulate\","," \"event-custom\","," \"json-stringify\""," ]"," },"," \"test-console\": {"," \"requires\": ["," \"console-filters\","," \"test\","," \"array-extras\""," ],"," \"skinnable\": true"," },"," \"text\": {"," \"use\": ["," \"text-accentfold\","," \"text-wordbreak\""," ]"," },"," \"text-accentfold\": {"," \"requires\": ["," \"array-extras\","," \"text-data-accentfold\""," ]"," },"," \"text-data-accentfold\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"text-data-wordbreak\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"text-wordbreak\": {"," \"requires\": ["," \"array-extras\","," \"text-data-wordbreak\""," ]"," },"," \"transition\": {"," \"requires\": ["," \"node-style\""," ]"," },"," \"transition-timer\": {"," \"condition\": {"," \"name\": \"transition-timer\","," \"test\": function (Y) {"," var DOCUMENT = Y.config.doc,"," node = (DOCUMENT) ? DOCUMENT.documentElement: null,"," ret = true;",""," if (node && node.style) {"," ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);"," }",""," return ret;","},"," \"trigger\": \"transition\""," },"," \"requires\": ["," \"transition\""," ]"," },"," \"uploader\": {"," \"requires\": ["," \"uploader-html5\","," \"uploader-flash\""," ]"," },"," \"uploader-deprecated\": {"," \"requires\": ["," \"event-custom\","," \"node\","," \"base\","," \"swf\""," ]"," },"," \"uploader-flash\": {"," \"requires\": ["," \"swf\","," \"widget\","," \"substitute\","," \"base\","," \"cssbutton\","," \"node\","," \"event-custom\","," \"file-flash\","," \"uploader-queue\""," ]"," },"," \"uploader-html5\": {"," \"requires\": ["," \"widget\","," \"node-event-simulate\","," \"substitute\","," \"file-html5\","," \"uploader-queue\""," ]"," },"," \"uploader-queue\": {"," \"requires\": ["," \"base\""," ]"," },"," \"view\": {"," \"requires\": ["," \"base-build\","," \"node-event-delegate\""," ]"," },"," \"view-node-map\": {"," \"requires\": ["," \"view\""," ]"," },"," \"widget\": {"," \"use\": ["," \"widget-base\","," \"widget-htmlparser\","," \"widget-skin\","," \"widget-uievents\""," ]"," },"," \"widget-anim\": {"," \"requires\": ["," \"anim-base\","," \"plugin\","," \"widget\""," ]"," },"," \"widget-autohide\": {"," \"requires\": ["," \"base-build\","," \"event-key\","," \"event-outside\","," \"widget\""," ]"," },"," \"widget-base\": {"," \"requires\": ["," \"attribute\","," \"base-base\","," \"base-pluginhost\","," \"classnamemanager\","," \"event-focus\","," \"node-base\","," \"node-style\""," ],"," \"skinnable\": true"," },"," \"widget-base-ie\": {"," \"condition\": {"," \"name\": \"widget-base-ie\","," \"trigger\": \"widget-base\","," \"ua\": \"ie\""," },"," \"requires\": ["," \"widget-base\""," ]"," },"," \"widget-buttons\": {"," \"requires\": ["," \"button-plugin\","," \"cssbutton\","," \"widget-stdmod\""," ]"," },"," \"widget-child\": {"," \"requires\": ["," \"base-build\","," \"widget\""," ]"," },"," \"widget-htmlparser\": {"," \"requires\": ["," \"widget-base\""," ]"," },"," \"widget-locale\": {"," \"requires\": ["," \"widget-base\""," ]"," },"," \"widget-modality\": {"," \"requires\": ["," \"base-build\","," \"event-outside\","," \"widget\""," ],"," \"skinnable\": true"," },"," \"widget-parent\": {"," \"requires\": ["," \"arraylist\","," \"base-build\","," \"widget\""," ]"," },"," \"widget-position\": {"," \"requires\": ["," \"base-build\","," \"node-screen\","," \"widget\""," ]"," },"," \"widget-position-align\": {"," \"requires\": ["," \"widget-position\""," ]"," },"," \"widget-position-constrain\": {"," \"requires\": ["," \"widget-position\""," ]"," },"," \"widget-skin\": {"," \"requires\": ["," \"widget-base\""," ]"," },"," \"widget-stack\": {"," \"requires\": ["," \"base-build\","," \"widget\""," ],"," \"skinnable\": true"," },"," \"widget-stdmod\": {"," \"requires\": ["," \"base-build\","," \"widget\""," ]"," },"," \"widget-uievents\": {"," \"requires\": ["," \"node-event-delegate\","," \"widget-base\""," ]"," },"," \"yql\": {"," \"requires\": ["," \"jsonp\","," \"jsonp-url\""," ]"," },"," \"yql-nodejs\": {"," \"condition\": {"," \"name\": \"yql-nodejs\","," \"trigger\": \"yql\","," \"ua\": \"nodejs\","," \"when\": \"after\""," }"," },"," \"yql-winjs\": {"," \"condition\": {"," \"name\": \"yql-winjs\","," \"trigger\": \"yql\","," \"ua\": \"winjs\","," \"when\": \"after\""," }"," },"," \"yui\": {},"," \"yui-base\": {},"," \"yui-later\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"yui-log\": {"," \"requires\": ["," \"yui-base\""," ]"," },"," \"yui-throttle\": {"," \"requires\": ["," \"yui-base\""," ]"," }","};","YUI.Env[Y.version].md5 = 'a28e022ad022130f7a4fb4ac77a2f1df';","","","}, '3.7.3', {\"requires\": [\"loader-base\"]});"]; -_yuitest_coverage["build/loader-yui3/loader-yui3.js"].lines = {"1":0,"10":0,"119":0,"122":0,"123":0,"126":0,"284":0,"1097":0,"1104":0,"1106":0,"1110":0,"1112":0,"1116":0,"1119":0,"1242":0,"1243":0,"1423":0,"1427":0,"1439":0,"1443":0,"1452":0,"1457":0,"1469":0,"1474":0,"1483":0,"1485":0,"1497":0,"1499":0,"1566":0,"1568":0,"2112":0,"2115":0,"2275":0,"2279":0,"2280":0,"2283":0,"2507":0}; -_yuitest_coverage["build/loader-yui3/loader-yui3.js"].functions = {"\"test\":118":0,"\"test\":272":0,"test:1105":0,"test:1111":0,"\"test\":1095":0,"\"test\":1241":0,"\"test\":1422":0,"\"test\":1438":0,"\"test\":1451":0,"\"test\":1468":0,"\"test\":1482":0,"\"test\":1496":0,"\"test\":1565":0,"\"test\":2111":0,"\"test\":2274":0,"(anonymous 1):1":0}; -_yuitest_coverage["build/loader-yui3/loader-yui3.js"].coveredLines = 37; -_yuitest_coverage["build/loader-yui3/loader-yui3.js"].coveredFunctions = 16; -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1); -YUI.add('loader-yui3', function (Y, NAME) { - -/* This file is auto-generated by src/loader/scripts/meta_join.js */ - -/** - * YUI 3 module metadata - * @module loader - * @submodule yui3 - */ -_yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "(anonymous 1)", 1); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 10); -YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || { - "align-plugin": { - "requires": [ - "node-screen", - "node-pluginhost" - ] - }, - "anim": { - "use": [ - "anim-base", - "anim-color", - "anim-curve", - "anim-easing", - "anim-node-plugin", - "anim-scroll", - "anim-xy" - ] - }, - "anim-base": { - "requires": [ - "base-base", - "node-style" - ] - }, - "anim-color": { - "requires": [ - "anim-base" - ] - }, - "anim-curve": { - "requires": [ - "anim-xy" - ] - }, - "anim-easing": { - "requires": [ - "anim-base" - ] - }, - "anim-node-plugin": { - "requires": [ - "node-pluginhost", - "anim-base" - ] - }, - "anim-scroll": { - "requires": [ - "anim-base" - ] - }, - "anim-shape": { - "requires": [ - "anim-base", - "anim-easing", - "anim-color", - "matrix" - ] - }, - "anim-shape-transform": { - "use": [ - "anim-shape" - ] - }, - "anim-xy": { - "requires": [ - "anim-base", - "node-screen" - ] - }, - "app": { - "use": [ - "app-base", - "app-content", - "app-transitions", - "lazy-model-list", - "model", - "model-list", - "model-sync-rest", - "router", - "view", - "view-node-map" - ] - }, - "app-base": { - "requires": [ - "classnamemanager", - "pjax-base", - "router", - "view" - ] - }, - "app-content": { - "requires": [ - "app-base", - "pjax-content" - ] - }, - "app-transitions": { - "requires": [ - "app-base" - ] - }, - "app-transitions-css": { - "type": "css" - }, - "app-transitions-native": { - "condition": { - "name": "app-transitions-native", - "test": function (Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 118); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 119); -var doc = Y.config.doc, - node = doc ? doc.documentElement : null; - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 122); -if (node && node.style) { - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 123); -return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style); - } - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 126); -return false; -}, - "trigger": "app-transitions" - }, - "requires": [ - "app-transitions", - "app-transitions-css", - "parallel", - "transition" - ] - }, - "array-extras": { - "requires": [ - "yui-base" - ] - }, - "array-invoke": { - "requires": [ - "yui-base" - ] - }, - "arraylist": { - "requires": [ - "yui-base" - ] - }, - "arraylist-add": { - "requires": [ - "arraylist" - ] - }, - "arraylist-filter": { - "requires": [ - "arraylist" - ] - }, - "arraysort": { - "requires": [ - "yui-base" - ] - }, - "async-queue": { - "requires": [ - "event-custom" - ] - }, - "attribute": { - "use": [ - "attribute-base", - "attribute-complex" - ] - }, - "attribute-base": { - "requires": [ - "attribute-core", - "attribute-events", - "attribute-extras" - ] - }, - "attribute-complex": { - "requires": [ - "attribute-base" - ] - }, - "attribute-core": { - "requires": [ - "oop" - ] - }, - "attribute-events": { - "requires": [ - "event-custom" - ] - }, - "attribute-extras": { - "requires": [ - "oop" - ] - }, - "autocomplete": { - "use": [ - "autocomplete-base", - "autocomplete-sources", - "autocomplete-list", - "autocomplete-plugin" - ] - }, - "autocomplete-base": { - "optional": [ - "autocomplete-sources" - ], - "requires": [ - "array-extras", - "base-build", - "escape", - "event-valuechange", - "node-base" - ] - }, - "autocomplete-filters": { - "requires": [ - "array-extras", - "text-wordbreak" - ] - }, - "autocomplete-filters-accentfold": { - "requires": [ - "array-extras", - "text-accentfold", - "text-wordbreak" - ] - }, - "autocomplete-highlighters": { - "requires": [ - "array-extras", - "highlight-base" - ] - }, - "autocomplete-highlighters-accentfold": { - "requires": [ - "array-extras", - "highlight-accentfold" - ] - }, - "autocomplete-list": { - "after": [ - "autocomplete-sources" - ], - "lang": [ - "en" - ], - "requires": [ - "autocomplete-base", - "event-resize", - "node-screen", - "selector-css3", - "shim-plugin", - "widget", - "widget-position", - "widget-position-align" - ], - "skinnable": true - }, - "autocomplete-list-keys": { - "condition": { - "name": "autocomplete-list-keys", - "test": function (Y) { - // Only add keyboard support to autocomplete-list if this doesn't appear to - // be an iOS or Android-based mobile device. - // - // There's currently no feasible way to actually detect whether a device has - // a hardware keyboard, so this sniff will have to do. It can easily be - // overridden by manually loading the autocomplete-list-keys module. - // - // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari - // doesn't fire the keyboard events used by AutoCompleteList, so there's - // no point loading the -keys module even when a bluetooth keyboard may be - // available. - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 272); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 284); -return !(Y.UA.ios || Y.UA.android); -}, - "trigger": "autocomplete-list" - }, - "requires": [ - "autocomplete-list", - "base-build" - ] - }, - "autocomplete-plugin": { - "requires": [ - "autocomplete-list", - "node-pluginhost" - ] - }, - "autocomplete-sources": { - "optional": [ - "io-base", - "json-parse", - "jsonp", - "yql" - ], - "requires": [ - "autocomplete-base" - ] - }, - "base": { - "use": [ - "base-base", - "base-pluginhost", - "base-build" - ] - }, - "base-base": { - "after": [ - "attribute-complex" - ], - "requires": [ - "base-core", - "attribute-base" - ] - }, - "base-build": { - "requires": [ - "base-base" - ] - }, - "base-core": { - "requires": [ - "attribute-core" - ] - }, - "base-pluginhost": { - "requires": [ - "base-base", - "pluginhost" - ] - }, - "button": { - "requires": [ - "button-core", - "cssbutton", - "widget" - ] - }, - "button-core": { - "requires": [ - "attribute-core", - "classnamemanager", - "node-base" - ] - }, - "button-group": { - "requires": [ - "button-plugin", - "cssbutton", - "widget" - ] - }, - "button-plugin": { - "requires": [ - "button-core", - "cssbutton", - "node-pluginhost" - ] - }, - "cache": { - "use": [ - "cache-base", - "cache-offline", - "cache-plugin" - ] - }, - "cache-base": { - "requires": [ - "base" - ] - }, - "cache-offline": { - "requires": [ - "cache-base", - "json" - ] - }, - "cache-plugin": { - "requires": [ - "plugin", - "cache-base" - ] - }, - "calendar": { - "lang": [ - "de", - "en", - "fr", - "ja", - "nb-NO", - "pt-BR", - "ru", - "zh-HANT-TW" - ], - "requires": [ - "calendar-base", - "calendarnavigator" - ], - "skinnable": true - }, - "calendar-base": { - "lang": [ - "de", - "en", - "fr", - "ja", - "nb-NO", - "pt-BR", - "ru", - "zh-HANT-TW" - ], - "requires": [ - "widget", - "substitute", - "datatype-date", - "datatype-date-math", - "cssgrids" - ], - "skinnable": true - }, - "calendarnavigator": { - "requires": [ - "plugin", - "classnamemanager", - "datatype-date", - "node", - "substitute" - ], - "skinnable": true - }, - "charts": { - "requires": [ - "charts-base" - ] - }, - "charts-base": { - "requires": [ - "dom", - "datatype-number", - "datatype-date", - "event-custom", - "event-mouseenter", - "event-touch", - "widget", - "widget-position", - "widget-stack", - "graphics" - ] - }, - "charts-legend": { - "requires": [ - "charts-base" - ] - }, - "classnamemanager": { - "requires": [ - "yui-base" - ] - }, - "clickable-rail": { - "requires": [ - "slider-base" - ] - }, - "collection": { - "use": [ - "array-extras", - "arraylist", - "arraylist-add", - "arraylist-filter", - "array-invoke" - ] - }, - "console": { - "lang": [ - "en", - "es", - "ja" - ], - "requires": [ - "yui-log", - "widget" - ], - "skinnable": true - }, - "console-filters": { - "requires": [ - "plugin", - "console" - ], - "skinnable": true - }, - "controller": { - "use": [ - "router" - ] - }, - "cookie": { - "requires": [ - "yui-base" - ] - }, - "createlink-base": { - "requires": [ - "editor-base" - ] - }, - "cssbase": { - "after": [ - "cssreset", - "cssfonts", - "cssgrids", - "cssreset-context", - "cssfonts-context", - "cssgrids-context" - ], - "type": "css" - }, - "cssbase-context": { - "after": [ - "cssreset", - "cssfonts", - "cssgrids", - "cssreset-context", - "cssfonts-context", - "cssgrids-context" - ], - "type": "css" - }, - "cssbutton": { - "type": "css" - }, - "cssfonts": { - "type": "css" - }, - "cssfonts-context": { - "type": "css" - }, - "cssgrids": { - "optional": [ - "cssreset", - "cssfonts" - ], - "type": "css" - }, - "cssgrids-base": { - "optional": [ - "cssreset", - "cssfonts" - ], - "type": "css" - }, - "cssgrids-units": { - "optional": [ - "cssreset", - "cssfonts" - ], - "requires": [ - "cssgrids-base" - ], - "type": "css" - }, - "cssreset": { - "type": "css" - }, - "cssreset-context": { - "type": "css" - }, - "dataschema": { - "use": [ - "dataschema-base", - "dataschema-json", - "dataschema-xml", - "dataschema-array", - "dataschema-text" - ] - }, - "dataschema-array": { - "requires": [ - "dataschema-base" - ] - }, - "dataschema-base": { - "requires": [ - "base" - ] - }, - "dataschema-json": { - "requires": [ - "dataschema-base", - "json" - ] - }, - "dataschema-text": { - "requires": [ - "dataschema-base" - ] - }, - "dataschema-xml": { - "requires": [ - "dataschema-base" - ] - }, - "datasource": { - "use": [ - "datasource-local", - "datasource-io", - "datasource-get", - "datasource-function", - "datasource-cache", - "datasource-jsonschema", - "datasource-xmlschema", - "datasource-arrayschema", - "datasource-textschema", - "datasource-polling" - ] - }, - "datasource-arrayschema": { - "requires": [ - "datasource-local", - "plugin", - "dataschema-array" - ] - }, - "datasource-cache": { - "requires": [ - "datasource-local", - "plugin", - "cache-base" - ] - }, - "datasource-function": { - "requires": [ - "datasource-local" - ] - }, - "datasource-get": { - "requires": [ - "datasource-local", - "get" - ] - }, - "datasource-io": { - "requires": [ - "datasource-local", - "io-base" - ] - }, - "datasource-jsonschema": { - "requires": [ - "datasource-local", - "plugin", - "dataschema-json" - ] - }, - "datasource-local": { - "requires": [ - "base" - ] - }, - "datasource-polling": { - "requires": [ - "datasource-local" - ] - }, - "datasource-textschema": { - "requires": [ - "datasource-local", - "plugin", - "dataschema-text" - ] - }, - "datasource-xmlschema": { - "requires": [ - "datasource-local", - "plugin", - "datatype-xml", - "dataschema-xml" - ] - }, - "datatable": { - "use": [ - "datatable-core", - "datatable-table", - "datatable-head", - "datatable-body", - "datatable-base", - "datatable-column-widths", - "datatable-message", - "datatable-mutable", - "datatable-sort", - "datatable-datasource" - ] - }, - "datatable-base": { - "requires": [ - "datatable-core", - "datatable-table", - "datatable-head", - "datatable-body", - "base-build", - "widget" - ], - "skinnable": true - }, - "datatable-base-deprecated": { - "requires": [ - "recordset-base", - "widget", - "substitute", - "event-mouseenter" - ], - "skinnable": true - }, - "datatable-body": { - "requires": [ - "datatable-core", - "view", - "classnamemanager" - ] - }, - "datatable-column-widths": { - "requires": [ - "datatable-base" - ] - }, - "datatable-core": { - "requires": [ - "escape", - "model-list", - "node-event-delegate" - ] - }, - "datatable-datasource": { - "requires": [ - "datatable-base", - "plugin", - "datasource-local" - ] - }, - "datatable-datasource-deprecated": { - "requires": [ - "datatable-base-deprecated", - "plugin", - "datasource-local" - ] - }, - "datatable-deprecated": { - "use": [ - "datatable-base-deprecated", - "datatable-datasource-deprecated", - "datatable-sort-deprecated", - "datatable-scroll-deprecated" - ] - }, - "datatable-head": { - "requires": [ - "datatable-core", - "view", - "classnamemanager" - ] - }, - "datatable-message": { - "lang": [ - "en" - ], - "requires": [ - "datatable-base" - ], - "skinnable": true - }, - "datatable-mutable": { - "requires": [ - "datatable-base" - ] - }, - "datatable-scroll": { - "requires": [ - "datatable-base", - "datatable-column-widths", - "dom-screen" - ], - "skinnable": true - }, - "datatable-scroll-deprecated": { - "requires": [ - "datatable-base-deprecated", - "plugin" - ] - }, - "datatable-sort": { - "lang": [ - "en" - ], - "requires": [ - "datatable-base" - ], - "skinnable": true - }, - "datatable-sort-deprecated": { - "lang": [ - "en" - ], - "requires": [ - "datatable-base-deprecated", - "plugin", - "recordset-sort" - ] - }, - "datatable-table": { - "requires": [ - "datatable-core", - "datatable-head", - "datatable-body", - "view", - "classnamemanager" - ] - }, - "datatype": { - "use": [ - "datatype-date", - "datatype-number", - "datatype-xml" - ] - }, - "datatype-date": { - "use": [ - "datatype-date-parse", - "datatype-date-format", - "datatype-date-math" - ] - }, - "datatype-date-format": { - "lang": [ - "ar", - "ar-JO", - "ca", - "ca-ES", - "da", - "da-DK", - "de", - "de-AT", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-JO", - "en-MY", - "en-NZ", - "en-PH", - "en-SG", - "en-US", - "es", - "es-AR", - "es-BO", - "es-CL", - "es-CO", - "es-EC", - "es-ES", - "es-MX", - "es-PE", - "es-PY", - "es-US", - "es-UY", - "es-VE", - "fi", - "fi-FI", - "fr", - "fr-BE", - "fr-CA", - "fr-FR", - "hi", - "hi-IN", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "ms", - "ms-MY", - "nb", - "nb-NO", - "nl", - "nl-BE", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh-Hans", - "zh-Hans-CN", - "zh-Hant", - "zh-Hant-HK", - "zh-Hant-TW" - ] - }, - "datatype-date-math": { - "requires": [ - "yui-base" - ] - }, - "datatype-date-parse": {}, - "datatype-number": { - "use": [ - "datatype-number-parse", - "datatype-number-format" - ] - }, - "datatype-number-format": {}, - "datatype-number-parse": {}, - "datatype-xml": { - "use": [ - "datatype-xml-parse", - "datatype-xml-format" - ] - }, - "datatype-xml-format": {}, - "datatype-xml-parse": {}, - "dd": { - "use": [ - "dd-ddm-base", - "dd-ddm", - "dd-ddm-drop", - "dd-drag", - "dd-proxy", - "dd-constrain", - "dd-drop", - "dd-scroll", - "dd-delegate" - ] - }, - "dd-constrain": { - "requires": [ - "dd-drag" - ] - }, - "dd-ddm": { - "requires": [ - "dd-ddm-base", - "event-resize" - ] - }, - "dd-ddm-base": { - "requires": [ - "node", - "base", - "yui-throttle", - "classnamemanager" - ] - }, - "dd-ddm-drop": { - "requires": [ - "dd-ddm" - ] - }, - "dd-delegate": { - "requires": [ - "dd-drag", - "dd-drop-plugin", - "event-mouseenter" - ] - }, - "dd-drag": { - "requires": [ - "dd-ddm-base" - ] - }, - "dd-drop": { - "requires": [ - "dd-drag", - "dd-ddm-drop" - ] - }, - "dd-drop-plugin": { - "requires": [ - "dd-drop" - ] - }, - "dd-gestures": { - "condition": { - "name": "dd-gestures", - "trigger": "dd-drag", - "ua": "touchEnabled" - }, - "requires": [ - "dd-drag", - "event-synthetic", - "event-gestures" - ] - }, - "dd-plugin": { - "optional": [ - "dd-constrain", - "dd-proxy" - ], - "requires": [ - "dd-drag" - ] - }, - "dd-proxy": { - "requires": [ - "dd-drag" - ] - }, - "dd-scroll": { - "requires": [ - "dd-drag" - ] - }, - "dial": { - "lang": [ - "en", - "es" - ], - "requires": [ - "widget", - "dd-drag", - "event-mouseenter", - "event-move", - "event-key", - "transition", - "intl" - ], - "skinnable": true - }, - "dom": { - "use": [ - "dom-base", - "dom-screen", - "dom-style", - "selector-native", - "selector" - ] - }, - "dom-base": { - "requires": [ - "dom-core" - ] - }, - "dom-core": { - "requires": [ - "oop", - "features" - ] - }, - "dom-deprecated": { - "requires": [ - "dom-base" - ] - }, - "dom-screen": { - "requires": [ - "dom-base", - "dom-style" - ] - }, - "dom-style": { - "requires": [ - "dom-base" - ] - }, - "dom-style-ie": { - "condition": { - "name": "dom-style-ie", - "test": function (Y) { - - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1095); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1097); -var testFeature = Y.Features.test, - addFeature = Y.Features.add, - WINDOW = Y.config.win, - DOCUMENT = Y.config.doc, - DOCUMENT_ELEMENT = 'documentElement', - ret = false; - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1104); -addFeature('style', 'computedStyle', { - test: function() { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "test", 1105); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1106); -return WINDOW && 'getComputedStyle' in WINDOW; - } - }); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1110); -addFeature('style', 'opacity', { - test: function() { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "test", 1111); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1112); -return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; - } - }); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1116); -ret = (!testFeature('style', 'opacity') && - !testFeature('style', 'computedStyle')); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1119); -return ret; -}, - "trigger": "dom-style" - }, - "requires": [ - "dom-style" - ] - }, - "dump": { - "requires": [ - "yui-base" - ] - }, - "editor": { - "use": [ - "frame", - "editor-selection", - "exec-command", - "editor-base", - "editor-para", - "editor-br", - "editor-bidi", - "editor-tab", - "createlink-base" - ] - }, - "editor-base": { - "requires": [ - "base", - "frame", - "node", - "exec-command", - "editor-selection" - ] - }, - "editor-bidi": { - "requires": [ - "editor-base" - ] - }, - "editor-br": { - "requires": [ - "editor-base" - ] - }, - "editor-lists": { - "requires": [ - "editor-base" - ] - }, - "editor-para": { - "requires": [ - "editor-para-base" - ] - }, - "editor-para-base": { - "requires": [ - "editor-base" - ] - }, - "editor-para-ie": { - "condition": { - "name": "editor-para-ie", - "trigger": "editor-para", - "ua": "ie", - "when": "instead" - }, - "requires": [ - "editor-para-base" - ] - }, - "editor-selection": { - "requires": [ - "node" - ] - }, - "editor-tab": { - "requires": [ - "editor-base" - ] - }, - "escape": { - "requires": [ - "yui-base" - ] - }, - "event": { - "after": [ - "node-base" - ], - "use": [ - "event-base", - "event-delegate", - "event-synthetic", - "event-mousewheel", - "event-mouseenter", - "event-key", - "event-focus", - "event-resize", - "event-hover", - "event-outside", - "event-touch", - "event-move", - "event-flick", - "event-valuechange", - "event-tap" - ] - }, - "event-base": { - "after": [ - "node-base" - ], - "requires": [ - "event-custom-base" - ] - }, - "event-base-ie": { - "after": [ - "event-base" - ], - "condition": { - "name": "event-base-ie", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1241); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1242); -var imp = Y.config.doc && Y.config.doc.implementation; - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1243); -return (imp && (!imp.hasFeature('Events', '2.0'))); -}, - "trigger": "node-base" - }, - "requires": [ - "node-base" - ] - }, - "event-contextmenu": { - "requires": [ - "event-synthetic", - "dom-screen" - ] - }, - "event-custom": { - "use": [ - "event-custom-base", - "event-custom-complex" - ] - }, - "event-custom-base": { - "requires": [ - "oop" - ] - }, - "event-custom-complex": { - "requires": [ - "event-custom-base" - ] - }, - "event-delegate": { - "requires": [ - "node-base" - ] - }, - "event-flick": { - "requires": [ - "node-base", - "event-touch", - "event-synthetic" - ] - }, - "event-focus": { - "requires": [ - "event-synthetic" - ] - }, - "event-gestures": { - "use": [ - "event-flick", - "event-move" - ] - }, - "event-hover": { - "requires": [ - "event-mouseenter" - ] - }, - "event-key": { - "requires": [ - "event-synthetic" - ] - }, - "event-mouseenter": { - "requires": [ - "event-synthetic" - ] - }, - "event-mousewheel": { - "requires": [ - "node-base" - ] - }, - "event-move": { - "requires": [ - "node-base", - "event-touch", - "event-synthetic" - ] - }, - "event-outside": { - "requires": [ - "event-synthetic" - ] - }, - "event-resize": { - "requires": [ - "node-base", - "event-synthetic" - ] - }, - "event-simulate": { - "requires": [ - "event-base" - ] - }, - "event-synthetic": { - "requires": [ - "node-base", - "event-custom-complex" - ] - }, - "event-tap": { - "requires": [ - "node-base", - "event-base", - "event-touch", - "event-synthetic" - ] - }, - "event-touch": { - "requires": [ - "node-base" - ] - }, - "event-valuechange": { - "requires": [ - "event-focus", - "event-synthetic" - ] - }, - "exec-command": { - "requires": [ - "frame" - ] - }, - "features": { - "requires": [ - "yui-base" - ] - }, - "file": { - "requires": [ - "file-flash", - "file-html5" - ] - }, - "file-flash": { - "requires": [ - "base" - ] - }, - "file-html5": { - "requires": [ - "base" - ] - }, - "frame": { - "requires": [ - "base", - "node", - "selector-css3", - "yui-throttle" - ] - }, - "gesture-simulate": { - "requires": [ - "async-queue", - "event-simulate", - "node-screen" - ] - }, - "get": { - "requires": [ - "yui-base" - ] - }, - "graphics": { - "requires": [ - "node", - "event-custom", - "pluginhost", - "matrix", - "classnamemanager" - ] - }, - "graphics-canvas": { - "condition": { - "name": "graphics-canvas", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1422); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1423); -var DOCUMENT = Y.config.doc, - useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", - canvas = DOCUMENT && DOCUMENT.createElement("canvas"), - svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1427); -return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); -}, - "trigger": "graphics" - }, - "requires": [ - "graphics" - ] - }, - "graphics-canvas-default": { - "condition": { - "name": "graphics-canvas-default", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1438); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1439); -var DOCUMENT = Y.config.doc, - useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", - canvas = DOCUMENT && DOCUMENT.createElement("canvas"), - svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1443); -return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); -}, - "trigger": "graphics" - } - }, - "graphics-svg": { - "condition": { - "name": "graphics-svg", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1451); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1452); -var DOCUMENT = Y.config.doc, - useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", - canvas = DOCUMENT && DOCUMENT.createElement("canvas"), - svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1457); -return svg && (useSVG || !canvas); -}, - "trigger": "graphics" - }, - "requires": [ - "graphics" - ] - }, - "graphics-svg-default": { - "condition": { - "name": "graphics-svg-default", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1468); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1469); -var DOCUMENT = Y.config.doc, - useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", - canvas = DOCUMENT && DOCUMENT.createElement("canvas"), - svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1474); -return svg && (useSVG || !canvas); -}, - "trigger": "graphics" - } - }, - "graphics-vml": { - "condition": { - "name": "graphics-vml", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1482); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1483); -var DOCUMENT = Y.config.doc, - canvas = DOCUMENT && DOCUMENT.createElement("canvas"); - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1485); -return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); -}, - "trigger": "graphics" - }, - "requires": [ - "graphics" - ] - }, - "graphics-vml-default": { - "condition": { - "name": "graphics-vml-default", - "test": function(Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1496); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1497); -var DOCUMENT = Y.config.doc, - canvas = DOCUMENT && DOCUMENT.createElement("canvas"); - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1499); -return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); -}, - "trigger": "graphics" - } - }, - "handlebars": { - "use": [ - "handlebars-compiler" - ] - }, - "handlebars-base": { - "requires": [ - "escape" - ] - }, - "handlebars-compiler": { - "requires": [ - "handlebars-base" - ] - }, - "highlight": { - "use": [ - "highlight-base", - "highlight-accentfold" - ] - }, - "highlight-accentfold": { - "requires": [ - "highlight-base", - "text-accentfold" - ] - }, - "highlight-base": { - "requires": [ - "array-extras", - "classnamemanager", - "escape", - "text-wordbreak" - ] - }, - "history": { - "use": [ - "history-base", - "history-hash", - "history-hash-ie", - "history-html5" - ] - }, - "history-base": { - "requires": [ - "event-custom-complex" - ] - }, - "history-hash": { - "after": [ - "history-html5" - ], - "requires": [ - "event-synthetic", - "history-base", - "yui-later" - ] - }, - "history-hash-ie": { - "condition": { - "name": "history-hash-ie", - "test": function (Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 1565); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 1566); -var docMode = Y.config.doc && Y.config.doc.documentMode; - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 1568); -return Y.UA.ie && (!('onhashchange' in Y.config.win) || - !docMode || docMode < 8); -}, - "trigger": "history-hash" - }, - "requires": [ - "history-hash", - "node-base" - ] - }, - "history-html5": { - "optional": [ - "json" - ], - "requires": [ - "event-base", - "history-base", - "node-base" - ] - }, - "imageloader": { - "requires": [ - "base-base", - "node-style", - "node-screen" - ] - }, - "intl": { - "requires": [ - "intl-base", - "event-custom" - ] - }, - "intl-base": { - "requires": [ - "yui-base" - ] - }, - "io": { - "use": [ - "io-base", - "io-xdr", - "io-form", - "io-upload-iframe", - "io-queue" - ] - }, - "io-base": { - "requires": [ - "event-custom-base", - "querystring-stringify-simple" - ] - }, - "io-form": { - "requires": [ - "io-base", - "node-base" - ] - }, - "io-nodejs": { - "condition": { - "name": "io-nodejs", - "trigger": "io-base", - "ua": "nodejs" - }, - "requires": [ - "io-base" - ] - }, - "io-queue": { - "requires": [ - "io-base", - "queue-promote" - ] - }, - "io-upload-iframe": { - "requires": [ - "io-base", - "node-base" - ] - }, - "io-xdr": { - "requires": [ - "io-base", - "datatype-xml-parse" - ] - }, - "json": { - "use": [ - "json-parse", - "json-stringify" - ] - }, - "json-parse": { - "requires": [ - "yui-base" - ] - }, - "json-stringify": { - "requires": [ - "yui-base" - ] - }, - "jsonp": { - "requires": [ - "get", - "oop" - ] - }, - "jsonp-url": { - "requires": [ - "jsonp" - ] - }, - "lazy-model-list": { - "requires": [ - "model-list" - ] - }, - "loader": { - "use": [ - "loader-base", - "loader-rollup", - "loader-yui3" - ] - }, - "loader-base": { - "requires": [ - "get", - "features" - ] - }, - "loader-rollup": { - "requires": [ - "loader-base" - ] - }, - "loader-yui3": { - "requires": [ - "loader-base" - ] - }, - "matrix": { - "requires": [ - "yui-base" - ] - }, - "model": { - "requires": [ - "base-build", - "escape", - "json-parse" - ] - }, - "model-list": { - "requires": [ - "array-extras", - "array-invoke", - "arraylist", - "base-build", - "escape", - "json-parse", - "model" - ] - }, - "model-sync-rest": { - "requires": [ - "model", - "io-base", - "json-stringify" - ] - }, - "node": { - "use": [ - "node-base", - "node-event-delegate", - "node-pluginhost", - "node-screen", - "node-style" - ] - }, - "node-base": { - "requires": [ - "event-base", - "node-core", - "dom-base" - ] - }, - "node-core": { - "requires": [ - "dom-core", - "selector" - ] - }, - "node-deprecated": { - "requires": [ - "node-base" - ] - }, - "node-event-delegate": { - "requires": [ - "node-base", - "event-delegate" - ] - }, - "node-event-html5": { - "requires": [ - "node-base" - ] - }, - "node-event-simulate": { - "requires": [ - "node-base", - "event-simulate", - "gesture-simulate" - ] - }, - "node-flick": { - "requires": [ - "classnamemanager", - "transition", - "event-flick", - "plugin" - ], - "skinnable": true - }, - "node-focusmanager": { - "requires": [ - "attribute", - "node", - "plugin", - "node-event-simulate", - "event-key", - "event-focus" - ] - }, - "node-load": { - "requires": [ - "node-base", - "io-base" - ] - }, - "node-menunav": { - "requires": [ - "node", - "classnamemanager", - "plugin", - "node-focusmanager" - ], - "skinnable": true - }, - "node-pluginhost": { - "requires": [ - "node-base", - "pluginhost" - ] - }, - "node-screen": { - "requires": [ - "dom-screen", - "node-base" - ] - }, - "node-scroll-info": { - "requires": [ - "base-build", - "dom-screen", - "event-resize", - "node-pluginhost", - "plugin" - ] - }, - "node-style": { - "requires": [ - "dom-style", - "node-base" - ] - }, - "oop": { - "requires": [ - "yui-base" - ] - }, - "overlay": { - "requires": [ - "widget", - "widget-stdmod", - "widget-position", - "widget-position-align", - "widget-stack", - "widget-position-constrain" - ], - "skinnable": true - }, - "panel": { - "requires": [ - "widget", - "widget-autohide", - "widget-buttons", - "widget-modality", - "widget-position", - "widget-position-align", - "widget-position-constrain", - "widget-stack", - "widget-stdmod" - ], - "skinnable": true - }, - "parallel": { - "requires": [ - "yui-base" - ] - }, - "pjax": { - "requires": [ - "pjax-base", - "pjax-content" - ] - }, - "pjax-base": { - "requires": [ - "classnamemanager", - "node-event-delegate", - "router" - ] - }, - "pjax-content": { - "requires": [ - "io-base", - "node-base", - "router" - ] - }, - "pjax-plugin": { - "requires": [ - "node-pluginhost", - "pjax", - "plugin" - ] - }, - "plugin": { - "requires": [ - "base-base" - ] - }, - "pluginhost": { - "use": [ - "pluginhost-base", - "pluginhost-config" - ] - }, - "pluginhost-base": { - "requires": [ - "yui-base" - ] - }, - "pluginhost-config": { - "requires": [ - "pluginhost-base" - ] - }, - "profiler": { - "requires": [ - "yui-base" - ] - }, - "querystring": { - "use": [ - "querystring-parse", - "querystring-stringify" - ] - }, - "querystring-parse": { - "requires": [ - "yui-base", - "array-extras" - ] - }, - "querystring-parse-simple": { - "requires": [ - "yui-base" - ] - }, - "querystring-stringify": { - "requires": [ - "yui-base" - ] - }, - "querystring-stringify-simple": { - "requires": [ - "yui-base" - ] - }, - "queue-promote": { - "requires": [ - "yui-base" - ] - }, - "range-slider": { - "requires": [ - "slider-base", - "slider-value-range", - "clickable-rail" - ] - }, - "recordset": { - "use": [ - "recordset-base", - "recordset-sort", - "recordset-filter", - "recordset-indexer" - ] - }, - "recordset-base": { - "requires": [ - "base", - "arraylist" - ] - }, - "recordset-filter": { - "requires": [ - "recordset-base", - "array-extras", - "plugin" - ] - }, - "recordset-indexer": { - "requires": [ - "recordset-base", - "plugin" - ] - }, - "recordset-sort": { - "requires": [ - "arraysort", - "recordset-base", - "plugin" - ] - }, - "resize": { - "use": [ - "resize-base", - "resize-proxy", - "resize-constrain" - ] - }, - "resize-base": { - "requires": [ - "base", - "widget", - "event", - "oop", - "dd-drag", - "dd-delegate", - "dd-drop" - ], - "skinnable": true - }, - "resize-constrain": { - "requires": [ - "plugin", - "resize-base" - ] - }, - "resize-plugin": { - "optional": [ - "resize-constrain" - ], - "requires": [ - "resize-base", - "plugin" - ] - }, - "resize-proxy": { - "requires": [ - "plugin", - "resize-base" - ] - }, - "router": { - "optional": [ - "querystring-parse" - ], - "requires": [ - "array-extras", - "base-build", - "history" - ] - }, - "scrollview": { - "requires": [ - "scrollview-base", - "scrollview-scrollbars" - ] - }, - "scrollview-base": { - "requires": [ - "widget", - "event-gestures", - "event-mousewheel", - "transition" - ], - "skinnable": true - }, - "scrollview-base-ie": { - "condition": { - "name": "scrollview-base-ie", - "trigger": "scrollview-base", - "ua": "ie" - }, - "requires": [ - "scrollview-base" - ] - }, - "scrollview-list": { - "requires": [ - "plugin", - "classnamemanager" - ], - "skinnable": true - }, - "scrollview-paginator": { - "requires": [ - "plugin", - "classnamemanager" - ] - }, - "scrollview-scrollbars": { - "requires": [ - "classnamemanager", - "transition", - "plugin" - ], - "skinnable": true - }, - "selector": { - "requires": [ - "selector-native" - ] - }, - "selector-css2": { - "condition": { - "name": "selector-css2", - "test": function (Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 2111); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 2112); -var DOCUMENT = Y.config.doc, - ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 2115); -return ret; -}, - "trigger": "selector" - }, - "requires": [ - "selector-native" - ] - }, - "selector-css3": { - "requires": [ - "selector-native", - "selector-css2" - ] - }, - "selector-native": { - "requires": [ - "dom-base" - ] - }, - "shim-plugin": { - "requires": [ - "node-style", - "node-pluginhost" - ] - }, - "slider": { - "use": [ - "slider-base", - "slider-value-range", - "clickable-rail", - "range-slider" - ] - }, - "slider-base": { - "requires": [ - "widget", - "dd-constrain", - "event-key" - ], - "skinnable": true - }, - "slider-value-range": { - "requires": [ - "slider-base" - ] - }, - "sortable": { - "requires": [ - "dd-delegate", - "dd-drop-plugin", - "dd-proxy" - ] - }, - "sortable-scroll": { - "requires": [ - "dd-scroll", - "sortable" - ] - }, - "stylesheet": { - "requires": [ - "yui-base" - ] - }, - "substitute": { - "optional": [ - "dump" - ], - "requires": [ - "yui-base" - ] - }, - "swf": { - "requires": [ - "event-custom", - "node", - "swfdetect", - "escape" - ] - }, - "swfdetect": { - "requires": [ - "yui-base" - ] - }, - "tabview": { - "requires": [ - "widget", - "widget-parent", - "widget-child", - "tabview-base", - "node-pluginhost", - "node-focusmanager" - ], - "skinnable": true - }, - "tabview-base": { - "requires": [ - "node-event-delegate", - "classnamemanager", - "skin-sam-tabview" - ] - }, - "tabview-plugin": { - "requires": [ - "tabview-base" - ] - }, - "test": { - "requires": [ - "event-simulate", - "event-custom", - "json-stringify" - ] - }, - "test-console": { - "requires": [ - "console-filters", - "test", - "array-extras" - ], - "skinnable": true - }, - "text": { - "use": [ - "text-accentfold", - "text-wordbreak" - ] - }, - "text-accentfold": { - "requires": [ - "array-extras", - "text-data-accentfold" - ] - }, - "text-data-accentfold": { - "requires": [ - "yui-base" - ] - }, - "text-data-wordbreak": { - "requires": [ - "yui-base" - ] - }, - "text-wordbreak": { - "requires": [ - "array-extras", - "text-data-wordbreak" - ] - }, - "transition": { - "requires": [ - "node-style" - ] - }, - "transition-timer": { - "condition": { - "name": "transition-timer", - "test": function (Y) { - _yuitest_coverfunc("build/loader-yui3/loader-yui3.js", "\"test\"", 2274); -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 2275); -var DOCUMENT = Y.config.doc, - node = (DOCUMENT) ? DOCUMENT.documentElement: null, - ret = true; - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 2279); -if (node && node.style) { - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 2280); -ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style); - } - - _yuitest_coverline("build/loader-yui3/loader-yui3.js", 2283); -return ret; -}, - "trigger": "transition" - }, - "requires": [ - "transition" - ] - }, - "uploader": { - "requires": [ - "uploader-html5", - "uploader-flash" - ] - }, - "uploader-deprecated": { - "requires": [ - "event-custom", - "node", - "base", - "swf" - ] - }, - "uploader-flash": { - "requires": [ - "swf", - "widget", - "substitute", - "base", - "cssbutton", - "node", - "event-custom", - "file-flash", - "uploader-queue" - ] - }, - "uploader-html5": { - "requires": [ - "widget", - "node-event-simulate", - "substitute", - "file-html5", - "uploader-queue" - ] - }, - "uploader-queue": { - "requires": [ - "base" - ] - }, - "view": { - "requires": [ - "base-build", - "node-event-delegate" - ] - }, - "view-node-map": { - "requires": [ - "view" - ] - }, - "widget": { - "use": [ - "widget-base", - "widget-htmlparser", - "widget-skin", - "widget-uievents" - ] - }, - "widget-anim": { - "requires": [ - "anim-base", - "plugin", - "widget" - ] - }, - "widget-autohide": { - "requires": [ - "base-build", - "event-key", - "event-outside", - "widget" - ] - }, - "widget-base": { - "requires": [ - "attribute", - "base-base", - "base-pluginhost", - "classnamemanager", - "event-focus", - "node-base", - "node-style" - ], - "skinnable": true - }, - "widget-base-ie": { - "condition": { - "name": "widget-base-ie", - "trigger": "widget-base", - "ua": "ie" - }, - "requires": [ - "widget-base" - ] - }, - "widget-buttons": { - "requires": [ - "button-plugin", - "cssbutton", - "widget-stdmod" - ] - }, - "widget-child": { - "requires": [ - "base-build", - "widget" - ] - }, - "widget-htmlparser": { - "requires": [ - "widget-base" - ] - }, - "widget-locale": { - "requires": [ - "widget-base" - ] - }, - "widget-modality": { - "requires": [ - "base-build", - "event-outside", - "widget" - ], - "skinnable": true - }, - "widget-parent": { - "requires": [ - "arraylist", - "base-build", - "widget" - ] - }, - "widget-position": { - "requires": [ - "base-build", - "node-screen", - "widget" - ] - }, - "widget-position-align": { - "requires": [ - "widget-position" - ] - }, - "widget-position-constrain": { - "requires": [ - "widget-position" - ] - }, - "widget-skin": { - "requires": [ - "widget-base" - ] - }, - "widget-stack": { - "requires": [ - "base-build", - "widget" - ], - "skinnable": true - }, - "widget-stdmod": { - "requires": [ - "base-build", - "widget" - ] - }, - "widget-uievents": { - "requires": [ - "node-event-delegate", - "widget-base" - ] - }, - "yql": { - "requires": [ - "jsonp", - "jsonp-url" - ] - }, - "yql-nodejs": { - "condition": { - "name": "yql-nodejs", - "trigger": "yql", - "ua": "nodejs", - "when": "after" - } - }, - "yql-winjs": { - "condition": { - "name": "yql-winjs", - "trigger": "yql", - "ua": "winjs", - "when": "after" - } - }, - "yui": {}, - "yui-base": {}, - "yui-later": { - "requires": [ - "yui-base" - ] - }, - "yui-log": { - "requires": [ - "yui-base" - ] - }, - "yui-throttle": { - "requires": [ - "yui-base" - ] - } -}; -_yuitest_coverline("build/loader-yui3/loader-yui3.js", 2507); -YUI.Env[Y.version].md5 = 'a28e022ad022130f7a4fb4ac77a2f1df'; - - -}, '3.7.3', {"requires": ["loader-base"]}); diff --git a/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-min.js b/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-min.js deleted file mode 100644 index 4c0abf0d74c..00000000000 --- a/lib/yuilib/3.7.3/build/loader-yui3/loader-yui3-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("loader-yui3",function(e,t){YUI.Env[e.version].modules=YUI.Env[e.version].modules||{"align-plugin":{requires:["node-screen","node-pluginhost"]},anim:{use:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{requires:["base-base","node-style"]},"anim-color":{requires:["anim-base"]},"anim-curve":{requires:["anim-xy"]},"anim-easing":{requires:["anim-base"]},"anim-node-plugin":{requires:["node-pluginhost","anim-base"]},"anim-scroll":{requires:["anim-base"]},"anim-shape":{requires:["anim-base","anim-easing","anim-color","matrix"]},"anim-shape-transform":{use:["anim-shape"]},"anim-xy":{requires:["anim-base","node-screen"]},app:{use:["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"]},"app-base":{requires:["classnamemanager","pjax-base","router","view"]},"app-content":{requires:["app-base","pjax-content"]},"app-transitions":{requires:["app-base"]},"app-transitions-css":{type:"css"},"app-transitions-native":{condition:{name:"app-transitions-native",test:function(e){var t=e.config.doc,n=t?t.documentElement:null;return n&&n.style?"MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style:!1},trigger:"app-transitions"},requires:["app-transitions","app-transitions-css","parallel","transition"]},"array-extras":{requires:["yui-base"]},"array-invoke":{requires:["yui-base"]},arraylist:{requires:["yui-base"]},"arraylist-add":{requires:["arraylist"]},"arraylist-filter":{requires:["arraylist"]},arraysort:{requires:["yui-base"]},"async-queue":{requires:["event-custom"]},attribute:{use:["attribute-base","attribute-complex"]},"attribute-base":{requires:["attribute-core","attribute-events","attribute-extras"]},"attribute-complex":{requires:["attribute-base"]},"attribute-core":{requires:["oop"]},"attribute-events":{requires:["event-custom"]},"attribute-extras":{requires:["oop"]},autocomplete:{use:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{requires:["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{requires:["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{requires:["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{requires:["array-extras","highlight-accentfold"]},"autocomplete-list":{after:["autocomplete-sources"],lang:["en"],requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:!0},"autocomplete-list-keys":{condition:{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"},requires:["autocomplete-list","base-build"]},"autocomplete-plugin":{requires:["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]},base:{use:["base-base","base-pluginhost","base-build"]},"base-base":{after:["attribute-complex"],requires:["base-core","attribute-base"]},"base-build":{requires:["base-base"]},"base-core":{requires:["attribute-core"]},"base-pluginhost":{requires:["base-base","pluginhost"]},button:{requires:["button-core","cssbutton","widget"]},"button-core":{requires:["attribute-core","classnamemanager","node-base"]},"button-group":{requires:["button-plugin","cssbutton","widget"]},"button-plugin":{requires:["button-core","cssbutton","node-pluginhost"]},cache:{use:["cache-base","cache-offline","cache-plugin"]},"cache-base":{requires:["base"]},"cache-offline":{requires:["cache-base","json"]},"cache-plugin":{requires:["plugin","cache-base"]},calendar:{lang:["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],requires:["calendar-base","calendarnavigator"],skinnable:!0},"calendar-base":{lang:["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],requires:["widget","substitute","datatype-date","datatype-date-math","cssgrids"],skinnable:!0},calendarnavigator:{requires:["plugin","classnamemanager","datatype-date","node","substitute"],skinnable:!0},charts:{requires:["charts-base"]},"charts-base":{requires:["dom","datatype-number","datatype-date","event-custom","event-mouseenter","event-touch","widget","widget-position","widget-stack","graphics"]},"charts-legend":{requires:["charts-base"]},classnamemanager:{requires:["yui-base"]},"clickable-rail":{requires:["slider-base"]},collection:{use:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},console:{lang:["en","es","ja"],requires:["yui-log","widget"],skinnable:!0},"console-filters":{requires:["plugin","console"],skinnable:!0},controller:{use:["router"]},cookie:{requires:["yui-base"]},"createlink-base":{requires:["editor-base"]},cssbase:{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},"cssbase-context":{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},cssbutton:{type:"css"},cssfonts:{type:"css"},"cssfonts-context":{type:"css"},cssgrids:{optional:["cssreset","cssfonts"],type:"css"},"cssgrids-base":{optional:["cssreset","cssfonts"],type:"css"},"cssgrids-units":{optional:["cssreset","cssfonts"],requires:["cssgrids-base"],type:"css"},cssreset:{type:"css"},"cssreset-context":{type:"css"},dataschema:{use:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{requires:["dataschema-base"]},"dataschema-base":{requires:["base"]},"dataschema-json":{requires:["dataschema-base","json"]},"dataschema-text":{requires:["dataschema-base"]},"dataschema-xml":{requires:["dataschema-base"]},datasource:{use:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{requires:["datasource-local","plugin","dataschema-array"]},"datasource-cache":{requires:["datasource-local","plugin","cache-base"]},"datasource-function":{requires:["datasource-local"]},"datasource-get":{requires:["datasource-local","get"]},"datasource-io":{requires:["datasource-local","io-base"]},"datasource-jsonschema":{requires:["datasource-local","plugin","dataschema-json"]},"datasource-local":{requires:["base"]},"datasource-polling":{requires:["datasource-local"]},"datasource-textschema":{requires:["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{requires:["datasource-local","plugin","datatype-xml","dataschema-xml"]},datatable:{use:["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"]},"datatable-base":{requires:["datatable-core","datatable-table","datatable-head","datatable-body","base-build","widget"],skinnable:!0},"datatable-base-deprecated":{requires:["recordset-base","widget","substitute","event-mouseenter"],skinnable:!0},"datatable-body":{requires:["datatable-core","view","classnamemanager"]},"datatable-column-widths":{requires:["datatable-base"]},"datatable-core":{requires:["escape","model-list","node-event-delegate"]},"datatable-datasource":{requires:["datatable-base","plugin","datasource-local"]},"datatable-datasource-deprecated":{requires:["datatable-base-deprecated","plugin","datasource-local"]},"datatable-deprecated":{use:["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"]},"datatable-head":{requires:["datatable-core","view","classnamemanager"]},"datatable-message":{lang:["en"],requires:["datatable-base"],skinnable:!0},"datatable-mutable":{requires:["datatable-base"]},"datatable-scroll":{requires:["datatable-base","datatable-column-widths","dom-screen"],skinnable:!0},"datatable-scroll-deprecated":{requires:["datatable-base-deprecated","plugin"]},"datatable-sort":{lang:["en"],requires:["datatable-base"],skinnable:!0},"datatable-sort-deprecated":{lang:["en"],requires:["datatable-base-deprecated","plugin","recordset-sort"]},"datatable-table":{requires:["datatable-core","datatable-head","datatable-body","view","classnamemanager"]},datatype:{use:["datatype-date","datatype-number","datatype-xml"]},"datatype-date":{use:["datatype-date-parse","datatype-date-format","datatype-date-math"]},"datatype-date-format":{lang:["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{requires:["yui-base"]},"datatype-date-parse":{},"datatype-number":{use:["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{use:["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},dd:{use:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{requires:["dd-drag"]},"dd-ddm":{requires:["dd-ddm-base","event-resize"]},"dd-ddm-base":{requires:["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-delegate":{requires:["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{requires:["dd-drop"]},"dd-gestures":{condition:{name:"dd-gestures",trigger:"dd-drag",ua:"touchEnabled"},requires:["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"]},"dd-proxy":{requires:["dd-drag"]},"dd-scroll":{requires:["dd-drag"]},dial:{lang:["en","es"],requires:["widget","dd-drag","event-mouseenter","event-move","event-key","transition","intl"],skinnable:!0},dom:{use:["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{requires:["dom-core"]},"dom-core":{requires:["oop","features"]},"dom-deprecated":{requires:["dom-base"]},"dom-screen":{requires:["dom-base","dom-style"]},"dom-style":{requires:["dom-base"]},"dom-style-ie":{condition:{name:"dom-style-ie",test:function(e){var t=e.Features.test,n=e.Features.add,r=e.config.win,i=e.config.doc,s="documentElement",o=!1;return n("style","computedStyle",{test:function(){return r&&"getComputedStyle"in r}}),n("style","opacity",{test:function(){return i&&"opacity"in i[s].style}}),o=!t("style","opacity")&&!t("style","computedStyle"),o},trigger:"dom-style"},requires:["dom-style"]},dump:{requires:["yui-base"]},editor:{use:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{requires:["base","frame","node","exec-command","editor-selection"]},"editor-bidi":{requires:["editor-base"]},"editor-br":{requires:["editor-base"]},"editor-lists":{requires:["editor-base"]},"editor-para":{requires:["editor-para-base"]},"editor-para-base":{requires:["editor-base"]},"editor-para-ie":{condition:{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"},requires:["editor-para-base"]},"editor-selection":{requires:["node"]},"editor-tab":{requires:["editor-base"]},escape:{requires:["yui-base"]},event:{after:["node-base"],use:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"]},"event-base":{after:["node-base"],requires:["event-custom-base"]},"event-base-ie":{after:["event-base"],condition:{name:"event-base-ie",test:function(e){var t=e.config.doc&&e.config.doc.implementation;return t&&!t.hasFeature("Events","2.0")},trigger:"node-base"},requires:["node-base"]},"event-contextmenu":{requires:["event-synthetic","dom-screen"]},"event-custom":{use:["event-custom-base","event-custom-complex"]},"event-custom-base":{requires:["oop"]},"event-custom-complex":{requires:["event-custom-base"]},"event-delegate":{requires:["node-base"]},"event-flick":{requires:["node-base","event-touch","event-synthetic"]},"event-focus":{requires:["event-synthetic"]},"event-gestures":{use:["event-flick","event-move"]},"event-hover":{requires:["event-mouseenter"]},"event-key":{requires:["event-synthetic"]},"event-mouseenter":{requires:["event-synthetic"]},"event-mousewheel":{requires:["node-base"]},"event-move":{requires:["node-base","event-touch","event-synthetic"]},"event-outside":{requires:["event-synthetic"]},"event-resize":{requires:["node-base","event-synthetic"]},"event-simulate":{requires:["event-base"]},"event-synthetic":{requires:["node-base","event-custom-complex"]},"event-tap":{requires:["node-base","event-base","event-touch","event-synthetic"]},"event-touch":{requires:["node-base"]},"event-valuechange":{requires:["event-focus","event-synthetic"]},"exec-command":{requires:["frame"]},features:{requires:["yui-base"]},file:{requires:["file-flash","file-html5"]},"file-flash":{requires:["base"]},"file-html5":{requires:["base"]},frame:{requires:["base","node","selector-css3","yui-throttle"]},"gesture-simulate":{requires:["async-queue","event-simulate","node-screen"]},get:{requires:["yui-base"]},graphics:{requires:["node","event-custom","pluginhost","matrix","classnamemanager"]},"graphics-canvas":{condition:{name:"graphics-canvas",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"},requires:["graphics"]},"graphics-canvas-default":{condition:{name:"graphics-canvas-default",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}},"graphics-svg":{condition:{name:"graphics-svg",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"},requires:["graphics"]},"graphics-svg-default":{condition:{name:"graphics-svg-default",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}},"graphics-vml":{condition:{name:"graphics-vml",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"},requires:["graphics"]},"graphics-vml-default":{condition:{name:"graphics-vml-default",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}},handlebars:{use:["handlebars-compiler"]},"handlebars-base":{requires:["escape"]},"handlebars-compiler":{requires:["handlebars-base"]},highlight:{use:["highlight-base","highlight-accentfold"]},"highlight-accentfold":{requires:["highlight-base","text-accentfold"]},"highlight-base":{requires:["array-extras","classnamemanager","escape","text-wordbreak"]},history:{use:["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{requires:["event-custom-complex"]},"history-hash":{after:["history-html5"],requires:["event-synthetic","history-base","yui-later"]},"history-hash-ie":{condition:{name:"history-hash-ie",test:function(e){var t=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!t||t<8)},trigger:"history-hash"},requires:["history-hash","node-base"]},"history-html5":{optional:["json"],requires:["event-base","history-base","node-base"]},imageloader:{requires:["base-base","node-style","node-screen"]},intl:{requires:["intl-base","event-custom"]},"intl-base":{requires:["yui-base"]},io:{use:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{requires:["event-custom-base","querystring-stringify-simple"]},"io-form":{requires:["io-base","node-base"]},"io-nodejs":{condition:{name:"io-nodejs",trigger:"io-base",ua:"nodejs"},requires:["io-base"]},"io-queue":{requires:["io-base","queue-promote"]},"io-upload-iframe":{requires:["io-base","node-base"]},"io-xdr":{requires:["io-base","datatype-xml-parse"]},json:{use:["json-parse","json-stringify"]},"json-parse":{requires:["yui-base"]},"json-stringify":{requires:["yui-base"]},jsonp:{requires:["get","oop"]},"jsonp-url":{requires:["jsonp"]},"lazy-model-list":{requires:["model-list"]},loader:{use:["loader-base","loader-rollup","loader-yui3"]},"loader-base":{requires:["get","features"]},"loader-rollup":{requires:["loader-base"]},"loader-yui3":{requires:["loader-base"]},matrix:{requires:["yui-base"]},model:{requires:["base-build","escape","json-parse"]},"model-list":{requires:["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"model-sync-rest":{requires:["model","io-base","json-stringify"]},node:{use:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{requires:["event-base","node-core","dom-base"]},"node-core":{requires:["dom-core","selector"]},"node-deprecated":{requires:["node-base"]},"node-event-delegate":{requires:["node-base","event-delegate"]},"node-event-html5":{requires:["node-base"]},"node-event-simulate":{requires:["node-base","event-simulate","gesture-simulate"]},"node-flick":{requires:["classnamemanager","transition","event-flick","plugin"],skinnable:!0},"node-focusmanager":{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{requires:["node-base","io-base"]},"node-menunav":{requires:["node","classnamemanager","plugin","node-focusmanager"],skinnable:!0},"node-pluginhost":{requires:["node-base","pluginhost"]},"node-screen":{requires:["dom-screen","node-base"]},"node-scroll-info":{requires:["base-build","dom-screen","event-resize","node-pluginhost","plugin"]},"node-style":{requires:["dom-style","node-base"]},oop:{requires:["yui-base"]},overlay:{requires:["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],skinnable:!0},panel:{requires:["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod"],skinnable:!0},parallel:{requires:["yui-base"]},pjax:{requires:["pjax-base","pjax-content"]},"pjax-base":{requires:["classnamemanager","node-event-delegate","router"]},"pjax-content":{requires:["io-base","node-base","router"]},"pjax-plugin":{requires:["node-pluginhost","pjax","plugin"]},plugin:{requires:["base-base"]},pluginhost:{use:["pluginhost-base","pluginhost-config"]},"pluginhost-base":{requires:["yui-base"]},"pluginhost-config":{requires:["pluginhost-base"]},profiler:{requires:["yui-base"]},querystring:{use:["querystring-parse","querystring-stringify"]},"querystring-parse":{requires:["yui-base","array-extras"]},"querystring-parse-simple":{requires:["yui-base"]},"querystring-stringify":{requires:["yui-base"]},"querystring-stringify-simple":{requires:["yui-base"]},"queue-promote":{requires:["yui-base"]},"range-slider":{requires:["slider-base","slider-value-range","clickable-rail"]},recordset:{use:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{requires:["base","arraylist"]},"recordset-filter":{requires:["recordset-base","array-extras","plugin"]},"recordset-indexer":{requires:["recordset-base","plugin"]},"recordset-sort":{requires:["arraysort","recordset-base","plugin"]},resize:{use:["resize-base","resize-proxy","resize-constrain"]},"resize-base":{requires:["base","widget","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:!0},"resize-constrain":{requires:["plugin","resize-base"]},"resize-plugin":{optional:["resize-constrain"],requires:["resize-base","plugin"]},"resize-proxy":{requires:["plugin","resize-base"]},router:{optional:["querystring-parse"],requires:["array-extras","base-build","history"]},scrollview:{requires:["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{requires:["widget","event-gestures","event-mousewheel","transition"],skinnable:!0},"scrollview-base-ie":{condition:{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"},requires:["scrollview-base"]},"scrollview-list":{requires:["plugin","classnamemanager"],skinnable:!0},"scrollview-paginator":{requires:["plugin","classnamemanager"]},"scrollview-scrollbars":{requires:["classnamemanager","transition","plugin"],skinnable:!0},selector:{requires:["selector-native"]},"selector-css2":{condition:{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"},requires:["selector-native"]},"selector-css3":{requires:["selector-native","selector-css2"]},"selector-native":{requires:["dom-base"]},"shim-plugin":{requires:["node-style","node-pluginhost"]},slider:{use:["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{requires:["widget","dd-constrain","event-key"],skinnable:!0},"slider-value-range":{requires:["slider-base"]},sortable:{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{requires:["dd-scroll","sortable"]},stylesheet:{requires:["yui-base"]},substitute:{optional:["dump"],requires:["yui-base"]},swf:{requires:["event-custom","node","swfdetect","escape"]},swfdetect:{requires:["yui-base"]},tabview:{requires:["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],skinnable:!0},"tabview-base":{requires:["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{requires:["tabview-base"]},test:{requires:["event-simulate","event-custom","json-stringify"]},"test-console":{requires:["console-filters","test","array-extras"],skinnable:!0},text:{use:["text-accentfold","text-wordbreak"]},"text-accentfold":{requires:["array-extras","text-data-accentfold"]},"text-data-accentfold":{requires:["yui-base"]},"text-data-wordbreak":{requires:["yui-base"]},"text-wordbreak":{requires:["array-extras","text-data-wordbreak"]},transition:{requires:["node-style"]},"transition-timer":{condition:{name:"transition-timer",test:function(e){var t=e.config.doc,n=t?t.documentElement:null,r=!0;return n&&n.style&&(r=!("MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style)),r},trigger:"transition"},requires:["transition"]},uploader:{requires:["uploader-html5","uploader-flash"]},"uploader-deprecated":{requires:["event-custom","node","base","swf"]},"uploader-flash":{requires:["swf","widget","substitute","base","cssbutton","node","event-custom","file-flash","uploader-queue"]},"uploader-html5":{requires:["widget","node-event-simulate","substitute","file-html5","uploader-queue"]},"uploader-queue":{requires:["base"]},view:{requires:["base-build","node-event-delegate"]},"view-node-map":{requires:["view"]},widget:{use:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]},"widget-anim":{requires:["anim-base","plugin","widget"]},"widget-autohide":{requires:["base-build","event-key","event-outside","widget"]},"widget-base":{requires:["attribute","base-base","base-pluginhost","classnamemanager","event-focus","node-base","node-style"],skinnable:!0},"widget-base-ie":{condition:{name:"widget-base-ie",trigger:"widget-base",ua:"ie"},requires:["widget-base"]},"widget-buttons":{requires:["button-plugin","cssbutton","widget-stdmod"]},"widget-child":{requires:["base-build","widget"]},"widget-htmlparser":{requires:["widget-base"]},"widget-locale":{requires:["widget-base"]},"widget-modality":{requires:["base-build","event-outside","widget"],skinnable:!0},"widget-parent":{requires:["arraylist","base-build","widget"]},"widget-position":{requires:["base-build","node-screen","widget"]},"widget-position-align":{requires:["widget-position"]},"widget-position-constrain":{requires:["widget-position"]},"widget-skin":{requires:["widget-base"]},"widget-stack":{requires:["base-build","widget"],skinnable:!0},"widget-stdmod":{requires:["base-build","widget"]},"widget-uievents":{requires:["node-event-delegate","widget-base"]},yql:{requires:["jsonp","jsonp-url"]},"yql-nodejs":{condition:{name:"yql-nodejs",trigger:"yql",ua:"nodejs",when:"after"}},"yql-winjs":{condition:{name:"yql-winjs",trigger:"yql",ua:"winjs",when:"after"}},yui:{},"yui-base":{},"yui-later":{requires:["yui-base"]},"yui-log":{requires:["yui-base"]},"yui-throttle":{requires:["yui-base"]}},YUI.Env[e.version].md5="a28e022ad022130f7a4fb4ac77a2f1df"},"3.7.3",{requires:["loader-base"]}); diff --git a/lib/yuilib/3.7.3/build/loader/loader-min.js b/lib/yuilib/3.7.3/build/loader/loader-min.js deleted file mode 100644 index 0c129c0ae5f..00000000000 --- a/lib/yuilib/3.7.3/build/loader/loader-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -YUI 3.7.3 (build 5687) -Copyright 2012 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -http://yuilibrary.com/license/ -*/ -YUI.add("loader-base",function(e,t){YUI.Env[e.version]||function(){var t=e.version,n="/build/",r=t+n,i=e.Env.base,s="gallery-2012.10.10-19-59",o="2in3",u="4",a="2.9.0",f=i+"combo?",l={version:t,root:r,base:e.Env.base,comboBase:f,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},c=l.groups,h=function(e,t,r){var s=o+"."+(e||u)+"/"+(t||a)+n,l=r&&r.base?r.base:i,h=r&&r.comboBase?r.comboBase:f;c.yui2.base=l+s,c.yui2.root=s,c.yui2.comboBase=h},p=function(e,t){var r=(e||s)+n,o=t&&t.base?t.base:i,u=t&&t.comboBase?t.comboBase:f;c.gallery.base=o+r,c.gallery.root=r,c.gallery.comboBase=u};c[t]={},c.gallery={ext:!1,combine:!0,comboBase:f,update:p,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}},c.yui2={combine:!0,ext:!1,comboBase:f,update:h,patterns:{"yui2-":{configFn:function(e){/-skin|reset|fonts|grids|base/.test(e.name)&&(e.type="css",e.path=e.path.replace(/\.js/,".css"),e.path=e.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin"))}}}},p(),h(),YUI.Env[t]=l}();var n={},r=[],i=1024,s=YUI.Env,o=s._loaded,u="css",a="js",f="intl",l="sam",c=e.version,h="",p=e.Object,d=p.each,v=e.Array,m=s._loaderQueue,g=s[c],y="skin-",b=e.Lang,w=s.mods,E,S=function(e,t,n,r){var i=e+"/"+t;return r||(i+="-min"),i+="."+(n||u),i};YUI.Env._cssLoaded||(YUI.Env._cssLoaded={}),e.Env.meta=g,e.Loader=function(t){var n=this;t=t||{},E=g.md5,n.context=e,n.base=e.Env.meta.base+e.Env.meta.root,n.comboBase=e.Env.meta.comboBase,n.combine=t.base&&t.base.indexOf(n.comboBase.substr(0,20))>-1,n.comboSep="&",n.maxURLLength=i,n.ignoreRegistered=t.ignoreRegistered,n.root=e.Env.meta.root,n.timeout=0,n.forceMap={},n.allowRollup=!1,n.filters={},n.required={},n.patterns={},n.moduleInfo={},n.groups=e.merge(e.Env.meta.groups),n.skin=e.merge(e.Env.meta.skin),n.conditions={},n.config=t,n._internal=!0,n._populateCache(),n.loaded=o[c],n.async=!0,n._inspectPage(),n._internal=!1,n._config(t),n.forceMap=n.force?e.Array.hash(n.force):{},n.testresults=null,e.config.tests&&(n.testresults=e.config.tests),n.sorted=[],n.dirty=!0,n.inserted={},n.skipped={},n.tested={},n.ignoreRegistered&&n._resetModules()},e.Loader.prototype={_populateCache:function(){var t=this,n=g.modules,r=s._renderedMods,i;if(r&&!t.ignoreRegistered){for(i in r)r.hasOwnProperty(i)&&(t.moduleInfo[i]=e.merge(r[i]));r=s._conditions;for(i in r)r.hasOwnProperty(i)&&(t.conditions[i]=e.merge(r[i]))}else for(i in n)n.hasOwnProperty(i)&&t.addModule(n[i],i)},_resetModules:function(){var e=this,t,n,r,i,s;for(t in e.moduleInfo)if(e.moduleInfo.hasOwnProperty(t)){r=e.moduleInfo[t],i=r.name,s=YUI.Env.mods[i]?YUI.Env.mods[i].details:null,s&&(e.moduleInfo[i]._reset=!0,e.moduleInfo[i].requires=s.requires||[],e.moduleInfo[i].optional=s.optional||[],e.moduleInfo[i].supersedes=s.supercedes||[]);if(r.defaults)for(n in r.defaults)r.defaults.hasOwnProperty(n)&&r[n]&&(r[n]=r.defaults[n]);delete r.langCache,delete r.skinCache,r.skinnable&&e._addSkin(e.skin.defaultSkin,r.name)}},REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"},COVERAGE:{searchExp:"-min\\.js",replaceStr:"-coverage.js"}},_inspectPage:function(){var e=this,t,n,r,i,s;for(s in e.moduleInfo)e.moduleInfo.hasOwnProperty(s)&&(t=e.moduleInfo[s],t.type&&t.type===u&&e.isCSSLoaded(t.name)&&(e.loaded[s]=!0));for(s in w)w.hasOwnProperty(s)&&(t=w[s],t.details&&(n=e.moduleInfo[t.name],r=t.details.requires,i=n&&n.requires,n?!n._inspected&&r&&i.length!==r.length&&delete n.expanded:n=e.addModule(t.details,s),n._inspected=!0))},_requires:function(e,t){var n,r,i,s,o=this.moduleInfo,a=o[e],f=o[t];if(!a||!f)return!1;r=a.expanded_map,i=a.after_map;if(i&&t in i)return!0;i=f.after_map;if(i&&e in i)return!1;s=o[t]&&o[t].supersedes;if(s)for(n=0;n=0&&l[h]===t)return!0}else for(var h=l.length-a,p=l.length;h>=0;h-=s)if(h
-1},checked:function(e){return e.checked===!0||e.selected===!0},enabled:function(e){return e.disabled!==undefined&&!e.disabled},disabled:function(e){return e.disabled}}),e.mix(e.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"}),e.Selector.combinators["~"]={axis:"previousSibling"}},"3.7.3",{requires:["selector-native","selector-css2"]}),YUI.add("yui-log",function(e,t){var n=e,r="yui:log",i="undefined",s={debug:1,info:1,warn:1,error:1};n.log=function(e,t,o,u){var a,f,l,c,h,p=n,d=p.config,v=p.fire?p:YUI.Env.globalEvents;return d.debug&&(o=o||"",typeof o!="undefined"&&(f=d.logExclude,l=d.logInclude,!l||o in l?l&&o in l?a=!l[o]:f&&o in f&&(a=f[o]):a=1),a||(d.useBrowserConsole&&(c=o?o+": "+e:e,p.Lang.isFunction(d.logFn)?d.logFn.call(p,e,t,o):typeof console!=i&&console.log?(h=t&&console[t]&&t in s?t:"log",console[h](c)):typeof opera!=i&&opera.postError(c)),v&&!u&&(v==p&&!v.getEvent(r)&&v.publish(r,{broadcast:2}),v.fire(r,{msg:e,cat:t,src:o})))),p},n.message=function(){return n.log.apply(n,arguments)}},"3.7.3",{requires:["yui-base"]}),YUI.add("dump",function(e,t){var n=e.Lang,r="{...}",i="f(){...}",s=", ",o=" => ",u=function(e,t){var u,a,f=[],l=n.type(e);if(!n.isObject(e))return e+"";if(l=="date")return e;if(e.nodeType&&e.tagName)return e.tagName+"#"+e.id;if(e.document&&e.navigator)return"window";if(e.location&&e.body)return"document";if(l=="function")return i;t=n.isNumber(t)?t:3;if(l=="array"){f.push("[");for(u=0,a=e.length;u0?n.dump(e[u],t-1):r):f.push(e[u]),f.push(s);f.length>1&&f.pop(),f.push("]")}else if(l=="regexp")f.push(e.toString());else{f.push("{");for(u in e)if(e.hasOwnProperty(u))try{f.push(u+o),n.isObject(e[u])?f.push(t>0?n.dump(e[u],t-1):r):f.push(e[u]),f.push(s)}catch(c){f.push("Error: "+c.message)}f.length>1&&f.pop(),f.push("}")}return f.join("")};e.dump=u,n.dump=u},"3.7.3",{requires:["yui-base"]}),YUI.add("transition-timer",function(e,t){var n=e.Transition;e.mix(n.prototype,{_start:function(){n.useNative?this._runNative():this._runTimer()},_runTimer:function(){var t=this;t._initAttrs(),n._running[e.stamp(t)]=t,t._startTime=new Date,n._startTimer()},_endTimer:function(){var t=this;delete n._running[e.stamp(t)],t._startTime=null},_runFrame:function(){var e=new Date-this._startTime;this._runAttrs(e)},_runAttrs:function(t){var r=this,i=r._node,s=r._config,o=e.stamp(i),u=n._nodeAttrs[o],a=n.behaviors,f=!1,l=!1,c,h,p,d,v,m,g,y,b;for(h in u)if((p=u[h])&&p.transition===r){g=p.duration,m=p.delay,v=(t-m)/1e3,y=t,c={type:"propertyEnd",propertyName:h,config:s,elapsedTime:v},d=b in a&&"set"in a[b]?a[b].set:n.DEFAULT_SETTER,f=y>=g,y>g&&(y=g);if(!m||t>=m)d(r,h,p.from,p.to,y-m,g-m,p.easing,p.unit),f&&(delete u[h],r._count--,s[h]&&s[h].on&&s[h].on.end&&s[h].on.end.call(e.one(i),c),!l&&r._count<=0&&(l=!0,r._end(v),r._endTimer()))}},_initAttrs:function(){var t=this,r=n.behaviors,i=e.stamp(t._node),s=n._nodeAttrs[i],o,u,a,f,l,c,h,p,d,v,m;for(c in s)(o=s[c])&&o.transition===t&&(u=o.duration*1e3,a=o.delay*1e3,f=o.easing,l=o.value,c in t._node.style||c in e.DOM.CUSTOM_STYLES?(v=c in r&&"get"in r[c]?r[c].get(t,c):n.DEFAULT_GETTER(t,c),p=n.RE_UNITS.exec(v),h=n.RE_UNITS.exec(l),v=p?p[1]:v,m=h?h[1]:l,d=h?h[2]:p?p[2]:"",!d&&n.RE_DEFAULT_UNIT.test(c)&&(d=n.DEFAULT_UNIT),typeof f=="string"&&(f.indexOf("cubic-bezier")>-1?f=f.substring(13,f.length-1).split(","):n.easings[f]&&(f=n.easings[f])),o.from=Number(v),o.to=Number(m),o.unit=d,o.easing=f,o.duration=u+a,o.delay=a):(delete s[c],t._count--))},destroy:function(){this.detachAll(),this._node=null}},!0),e.mix(e.Transition,{_runtimeAttrs:{},RE_DEFAULT_UNIT:/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,DEFAULT_UNIT:"px",intervalTime:20,behaviors:{left:{get:function(t,n){return e.DOM._getAttrOffset(t._node,n)}}},DEFAULT_SETTER:function(t,r,i,s,o,u,a,f){i=Number(i),s=Number(s);var l=t._node,c=n.cubicBezier(a,o/u);c=i+c[0]*(s-i);if(l){if(r in l.style||r in e.DOM.CUSTOM_STYLES)f=f||"",e.DOM.setStyle(l,r,c+f)}else t._end()},DEFAULT_GETTER:function(t,n){var r=t._node,i="";if(n in r.style||n in e.DOM.CUSTOM_STYLES)i=e.DOM.getComputedStyle(r,n);return i},_startTimer:function(){n._timer||(n._timer=setInterval(n._runFrame,n.intervalTime))},_stopTimer:function(){clearInterval(n._timer),n._timer=null},_runFrame:function(){var e=!0,t;for(t in n._running)n._running[t]._runFrame&&(e=!1,n._running[t]._runFrame());e&&n._stopTimer()},cubicBezier:function(e,t){var n=0,r=0,i=e[0],s=e[1],o=e[2],u=e[3],a=1,f=0,l=a-3*o+3*i-n,c=3*o-6*i+3*n,h=3*i-3*n,p=n,d=f-3*u+3*s-r,v=3*u-6*s+3*r,m=3*s-3*r,g=r,y=((l*t+c)*t+h)*t+p,b=((d*t+v)*t+m)*t+g;return[y,b]},easings:{ease:[.25,0,1,.25],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},_running:{},_timer:null,RE_UNITS:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/},!0),n.behaviors.top=n.behaviors.bottom=n.behaviors.right=n.behaviors.left,e.Transition=n},"3.7.3",{requires:["transition"]}),YUI.add("yui",function(e,t){},"3.7.3",{use:["yui","oop","dom","event-custom-base","event-base","pluginhost","node","event-delegate","io-base","json-parse","transition","selector-css3","dom-style-ie","querystring-stringify-simple"]});var Y=YUI().use("*");
diff --git a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-coverage.js b/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-coverage.js
deleted file mode 100644
index 523a227f053..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-coverage.js
+++ /dev/null
@@ -1,1302 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
-}
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/uploader-flash/uploader-flash.js",
- code: []
-};
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"].code=["YUI.add('uploader-flash', function (Y, NAME) {","",""," /**"," * This module provides a UI for file selection and multiple file upload capability using"," * Flash as a transport engine."," * The supported features include: automatic upload queue management, upload progress"," * tracking, file filtering, server response retrieval and error reporting."," *"," * @module uploader-flash"," */ ","","// Shorthands for external modules","var substitute = Y.substitute,"," UploaderQueue = Y.Uploader.Queue,"," getCN = Y.ClassNameManager.getClassName,"," UPLOADER = 'uploader',"," SELECT_FILES = getCN(UPLOADER, 'selectfiles-button');","",""," /**"," * This module provides a UI for file selection and multiple file upload capability"," * using Flash as a transport engine."," * @class UploaderFlash"," * @extends Widget"," * @constructor"," * @param {Object} config Configuration object."," */","","function UploaderFlash(config) {"," UploaderFlash.superclass.constructor.apply ( this, arguments );","}","","","","Y.UploaderFlash = Y.extend(UploaderFlash, Y.Widget, {",""," /**"," * Stored value of the current button state (based on "," * mouse events dispatched by the Flash player)"," * @property _buttonState"," * @type {String}"," * @protected"," */"," _buttonState: \"up\",",""," /**"," * Stored value of the current button focus state (based "," * on keyboard and mouse events)."," * @property _buttonFocus"," * @type {Boolean}"," * @protected"," */"," _buttonFocus: false,",""," /**"," * Stored value of the unique id for the container that holds the "," * Flash uploader."," *"," * @property _swfContainerId"," * @type {String}"," * @protected"," */"," _swfContainerId: null,",""," /**"," * Stored reference to the instance of SWF used to host the"," * Flash uploader."," *"," * @property _swfReference"," * @type {SWF}"," * @protected"," */"," _swfReference: null,",""," /**"," * Stored reference to the instance of Uploader.Queue used to manage"," * the upload process. This is a read-only property that only exists"," * during an active upload process. Only one queue can be active at"," * a time; if an upload start is attempted while a queue is active,"," * it will be ignored."," *"," * @property queue"," * @type {Y.Uploader.Queue}"," */"," queue: null,",""," /**"," * Stored event bindings for keyboard navigation to and from the uploader."," *"," * @property _tabElementBindings"," * @type {Object}"," * @protected"," */"," _tabElementBindings: null,","","","/**"," * Construction logic executed during UploaderFlash instantiation."," *"," * @method initializer"," * @protected"," */"," initializer : function () {",""," // Assign protected variable values"," this._swfContainerId = Y.guid(\"uploader\");"," this._swfReference = null;"," this.queue = null;"," this._buttonState = \"up\";"," this._buttonFocus = null;"," this._tabElementBindings = null;"," this._fileList = [];",""," // Publish available events",""," /**"," * Signals that files have been selected. "," *"," * @event fileselect"," * @param event {Event} The event object for the `fileselect` with the"," * following payload:"," * "," * Determines whether or not the provided item is a function."," * Note: Internet Explorer thinks certain functions are objects:"," * "," * You will have to implement additional tests if these functions"," * matter to you."," * "," *
"," */"," this.publish(\"fileselect\");",""," /**"," * Signals that an upload of multiple files has been started. "," *"," * @event uploadstart"," * @param event {Event} The event object for the `uploadstart`."," */"," this.publish(\"uploadstart\");",""," /**"," * Signals that an upload of a specific file has started. "," *"," * @event fileuploadstart"," * @param event {Event} The event object for the `fileuploadstart` with the"," * following payload:"," * "," *
"," */"," this.publish(\"fileuploadstart\");",""," /**"," * Reports on upload progress of a specific file. "," *"," * @event uploadprogress"," * @param event {Event} The event object for the `uploadprogress` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploadprogress\");",""," /**"," * Reports on the total upload progress of the file list. "," *"," * @event totaluploadprogress"," * @param event {Event} The event object for the `totaluploadprogress` with the"," * following payload:"," * "," *
"," */"," this.publish(\"totaluploadprogress\");",""," /**"," * Signals that a single file upload has been completed. "," *"," * @event uploadcomplete"," * @param event {Event} The event object for the `uploadcomplete` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploadcomplete\");",""," /**"," * Signals that the upload process of the entire file list has been completed. "," *"," * @event alluploadscomplete"," * @param event {Event} The event object for the `alluploadscomplete`."," */"," this.publish(\"alluploadscomplete\");",""," /**"," * Signals that a error has occurred in a specific file's upload process. "," *"," * @event uploaderror"," * @param event {Event} The event object for the `uploaderror` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploaderror\");",""," /**"," * Signals that a mouse has begun hovering over the `Select Files` button. "," *"," * @event mouseenter"," * @param event {Event} The event object for the `mouseenter` event."," */"," this.publish(\"mouseenter\");",""," /**"," * Signals that a mouse has stopped hovering over the `Select Files` button. "," *"," * @event mouseleave"," * @param event {Event} The event object for the `mouseleave` event."," */"," this.publish(\"mouseleave\");",""," /**"," * Signals that a mouse button has been pressed over the `Select Files` button. "," *"," * @event mousedown"," * @param event {Event} The event object for the `mousedown` event."," */"," this.publish(\"mousedown\");",""," /**"," * Signals that a mouse button has been released over the `Select Files` button. "," *"," * @event mouseup"," * @param event {Event} The event object for the `mouseup` event."," */"," this.publish(\"mouseup\");",""," /**"," * Signals that a mouse has been clicked over the `Select Files` button. "," *"," * @event click"," * @param event {Event} The event object for the `click` event."," */"," this.publish(\"click\");"," },",""," /**"," * Creates the DOM structure for the UploaderFlash."," * UploaderFlash's DOM structure consists of two layers: the base \"Select Files\""," * button that can be replaced by the developer's widget of choice; and a transparent"," * Flash overlay positoned above the button that captures all input events."," * The `position` style attribute of the `boundingBox` of the `Uploader` widget"," * is forced to be `relative`, in order to accommodate the Flash player overlay"," * (which is `position`ed `absolute`ly)."," *"," * @method renderUI"," * @protected"," */"," renderUI : function () {"," var boundingBox = this.get(\"boundingBox\"),"," contentBox = this.get('contentBox'),"," selFilesButton = this.get(\"selectFilesButton\");"," "," boundingBox.setStyle(\"position\", \"relative\");"," selFilesButton.setStyles({width: \"100%\", height: \"100%\"});"," contentBox.append(selFilesButton);"," contentBox.append(Y.Node.create(substitute(UploaderFlash.FLASH_CONTAINER, "," {swfContainerId: this._swfContainerId})));"," var flashContainer = Y.one(\"#\" + this._swfContainerId);"," var params = {version: \"10.0.45\","," fixedAttributes: {wmode: \"transparent\", "," allowScriptAccess:\"always\", "," allowNetworking:\"all\", "," scale: \"noscale\""," }"," };"," this._swfReference = new Y.SWF(flashContainer, this.get(\"swfURL\"), params);"," },",""," /**"," * Binds handlers to the UploaderFlash UI events and propagates attribute"," * values to the Flash player."," * The propagation of initial values is set to occur once the Flash player "," * instance is ready (as indicated by the `swfReady` event.)"," *"," * @method bindUI"," * @protected"," */"," bindUI : function () {",""," this._swfReference.on(\"swfReady\", function () {"," this._setMultipleFiles();"," this._setFileFilters();"," this._triggerEnabled();"," this._attachTabElements();"," this.after(\"multipleFilesChange\", this._setMultipleFiles, this);"," this.after(\"fileFiltersChange\", this._setFileFilters, this);"," this.after(\"enabledChange\", this._triggerEnabled, this);"," this.after(\"tabElementsChange\", this._attachTabElements);"," }, this);"," "," this._swfReference.on(\"fileselect\", this._updateFileList, this);","","",""," // this._swfReference.on(\"trace\", function (ev) {console.log(ev.message);});",""," this._swfReference.on(\"mouseenter\", function () {"," this.fire(\"mouseenter\");"," this._setButtonClass(\"hover\", true);"," if (this._buttonState == \"down\") {"," this._setButtonClass(\"active\", true);"," }"," }, this);"," this._swfReference.on(\"mouseleave\", function () {"," this.fire(\"mouseleave\");"," this._setButtonClass(\"hover\", false);"," this._setButtonClass(\"active\", false);"," "," }, this);"," this._swfReference.on(\"mousedown\", function () {"," this.fire(\"mousedown\");"," this._buttonState = \"down\";"," this._setButtonClass(\"active\", true);"," }, this);"," this._swfReference.on(\"mouseup\", function () {"," this.fire(\"mouseup\");"," this._buttonState = \"up\";"," this._setButtonClass(\"active\", false);"," }, this);"," this._swfReference.on(\"click\", function () {"," this.fire(\"click\");"," this._buttonFocus = true;"," this._setButtonClass(\"focus\", true);"," Y.one(\"body\").focus();"," this._swfReference._swf.focus();"," }, this);"," },",""," /**"," * Attaches keyboard bindings to enabling tabbing to and from the instance of the Flash"," * player in the Uploader widget. If the previous and next elements are specified, the"," * keyboard bindings enable the user to tab from the `tabElements[\"from\"]` node to the "," * Flash-powered \"Select Files\" button, and to the `tabElements[\"to\"]` node. "," *"," * @method _attachTabElements"," * @protected"," * @param ev {Event} Optional event payload if called as a `tabElementsChange` handler."," */"," _attachTabElements : function (ev) {"," if (this.get(\"tabElements\") !== null && this.get(\"tabElements\").from !== null && this.get(\"tabElements\").to !== null) {",""," if (this._tabElementBindings !== null) {"," this._tabElementBindings.from.detach();"," this._tabElementBindings.to.detach();"," this._tabElementBindings.tabback.detach();"," this._tabElementBindings.tabforward.detach();"," this._tabElementBindings.focus.detach();"," this._tabElementBindings.blur.detach();"," }"," else {"," this._tabElementBindings = {};"," }",""," var fromElement = Y.one(this.get(\"tabElements\").from);"," var toElement = Y.one(this.get(\"tabElements\").to);","",""," this._tabElementBindings.from = fromElement.on(\"keydown\", function (ev) { "," if (ev.keyCode == 9 && !ev.shiftKey) {"," ev.preventDefault();"," this._swfReference._swf.setAttribute(\"tabindex\", 0); "," this._swfReference._swf.setAttribute(\"role\", \"button\");"," this._swfReference._swf.setAttribute(\"aria-label\", this.get(\"selectButtonLabel\"));"," this._swfReference._swf.focus();"," }"," }, this);"," this._tabElementBindings.to = toElement.on(\"keydown\", function (ev) { "," if (ev.keyCode == 9 && ev.shiftKey) {"," ev.preventDefault();"," this._swfReference._swf.setAttribute(\"tabindex\", 0); "," this._swfReference._swf.setAttribute(\"role\", \"button\");"," this._swfReference._swf.setAttribute(\"aria-label\", this.get(\"selectButtonLabel\"));"," this._swfReference._swf.focus();"," }"," }, this);"," this._tabElementBindings.tabback = this._swfReference.on(\"tabback\", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {fromElement.focus();}, 30);}, this);"," this._tabElementBindings.tabforward = this._swfReference.on(\"tabforward\", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {toElement.focus();}, 30);}, this);",""," this._tabElementBindings.focus = this._swfReference._swf.on(\"focus\", function (ev) {this._buttonFocus = true; this._setButtonClass(\"focus\", true);}, this);"," this._tabElementBindings.blur = this._swfReference._swf.on(\"blur\", function (ev) {this._buttonFocus = false; this._setButtonClass(\"focus\", false);}, this);"," }"," else if (this._tabElementBindings !== null) {"," this._tabElementBindings.from.detach();"," this._tabElementBindings.to.detach();"," this._tabElementBindings.tabback.detach();"," this._tabElementBindings.tabforward.detach();"," this._tabElementBindings.focus.detach();"," this._tabElementBindings.blur.detach();"," }"," },","",""," /**"," * Adds or removes a specified state CSS class to the underlying uploader button. "," *"," * @method _setButtonClass"," * @protected"," * @param state {String} The name of the state enumerated in `buttonClassNames` attribute"," * from which to derive the needed class name."," * @param add {Boolean} A Boolean indicating whether to add or remove the class."," */"," _setButtonClass : function (state, add) {"," if (add) {"," this.get(\"selectFilesButton\").addClass(this.get(\"buttonClassNames\")[state]);"," }"," else {"," this.get(\"selectFilesButton\").removeClass(this.get(\"buttonClassNames\")[state]);"," }"," },","",""," /**"," * Syncs the state of the `fileFilters` attribute between the instance of UploaderFlash"," * and the Flash player."," * "," * @method _setFileFilters"," * @private"," */"," _setFileFilters : function () {"," if (this._swfReference && this.get(\"fileFilters\").length > 0) {"," this._swfReference.callSWF(\"setFileFilters\", [this.get(\"fileFilters\")]);"," } ",""," },","","",""," /**"," * Syncs the state of the `multipleFiles` attribute between this class"," * and the Flash uploader."," * "," * @method _setMultipleFiles"," * @private"," */"," _setMultipleFiles : function () {"," if (this._swfReference) {"," this._swfReference.callSWF(\"setAllowMultipleFiles\", [this.get(\"multipleFiles\")]);"," }"," },",""," /**"," * Syncs the state of the `enabled` attribute between this class"," * and the Flash uploader."," * "," * @method _triggerEnabled"," * @private"," */"," _triggerEnabled : function () {"," if (this.get(\"enabled\")) {"," this._swfReference.callSWF(\"enable\");"," this._swfReference._swf.setAttribute(\"aria-disabled\", \"false\");"," this._setButtonClass(\"disabled\", false);"," }"," else {"," this._swfReference.callSWF(\"disable\");"," this._swfReference._swf.setAttribute(\"aria-disabled\", \"true\");"," this._setButtonClass(\"disabled\", true);"," }"," },",""," /**"," * Getter for the `fileList` attribute"," * "," * @method _getFileList"," * @private"," */"," _getFileList : function (arr) {"," return this._fileList.concat();"," },",""," /**"," * Setter for the `fileList` attribute"," * "," * @method _setFileList"," * @private"," */"," _setFileList : function (val) {"," this._fileList = val.concat();"," return this._fileList.concat();"," },",""," /**"," * Adjusts the content of the `fileList` based on the results of file selection"," * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,"," * then selected files are appended to the existing list; otherwise, the list is"," * cleared and populated with the newly selected files."," * "," * @method _updateFileList"," * @param ev {Event} The file selection event received from the uploader."," * @private"," */"," _updateFileList : function (ev) {"," "," Y.one(\"body\").focus();"," this._swfReference._swf.focus();","",""," var newfiles = ev.fileList,"," fileConfObjects = [],"," parsedFiles = [],"," swfRef = this._swfReference,"," filterFunc = this.get(\"fileFilterFunction\");"," "," Y.each(newfiles, function (value) {"," var newFileConf = {};"," newFileConf.id = value.fileId;"," newFileConf.name = value.fileReference.name;"," newFileConf.size = value.fileReference.size;"," newFileConf.type = value.fileReference.type;"," newFileConf.dateCreated = value.fileReference.creationDate;"," newFileConf.dateModified = value.fileReference.modificationDate;"," newFileConf.uploader = swfRef;",""," fileConfObjects.push(newFileConf);"," });",""," if (filterFunc) {"," Y.each(fileConfObjects, function (value) {"," var newfile = new Y.FileFlash(value);"," if (filterFunc(newfile)) {"," parsedFiles.push(newfile);"," }"," });"," }"," else {"," Y.each(fileConfObjects, function (value) {"," parsedFiles.push(new Y.FileFlash(value));"," });"," }",""," if (parsedFiles.length > 0) {"," var oldfiles = this.get(\"fileList\");",""," this.set(\"fileList\", "," this.get(\"appendNewFiles\") ? oldfiles.concat(parsedFiles) : parsedFiles );",""," this.fire(\"fileselect\", {fileList: parsedFiles});"," }",""," },","","",""," /**"," * Handles and retransmits events fired by `Y.FileFlash` and `Y.Uploader.Queue`."," * "," * @method _uploadEventHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadEventHandler : function (event) {"," "," switch (event.type) {"," case \"file:uploadstart\":"," this.fire(\"fileuploadstart\", event);"," break;"," case \"file:uploadprogress\":"," this.fire(\"uploadprogress\", event);"," break;"," case \"uploaderqueue:totaluploadprogress\":"," this.fire(\"totaluploadprogress\", event);"," break;"," case \"file:uploadcomplete\":"," this.fire(\"uploadcomplete\", event);"," break;"," case \"uploaderqueue:alluploadscomplete\":"," this.queue = null;"," this.fire(\"alluploadscomplete\", event);"," break;"," case \"file:uploaderror\":"," case \"uploaderqueue:uploaderror\":"," this.fire(\"uploaderror\", event);"," break;"," case \"file:uploadcancel\":"," case \"uploaderqueue:uploadcancel\":"," this.fire(\"uploadcancel\", event);"," break;"," } ",""," },","","",""," /**"," * Starts the upload of a specific file."," *"," * @method upload"," * @param file {Y.FileFlash} Reference to the instance of the file to be uploaded."," * @param url {String} The URL to upload the file to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */",""," upload : function (file, url, postvars) {"," "," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\"),"," fileId = file.get(\"id\");",""," postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;",""," if (file instanceof Y.FileFlash) {"," "," file.on(\"uploadstart\", this._uploadEventHandler, this);"," file.on(\"uploadprogress\", this._uploadEventHandler, this);"," file.on(\"uploadcomplete\", this._uploadEventHandler, this);"," file.on(\"uploaderror\", this._uploadEventHandler, this);"," file.on(\"uploadcancel\", this._uploadEventHandler, this);",""," file.startUpload(uploadURL, postVars, this.get(\"fileFieldName\"));"," }"," },",""," /**"," * Starts the upload of all files on the file list, using an automated queue."," *"," * @method uploadAll"," * @param url {String} The URL to upload the files to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */"," uploadAll : function (url, postvars) {"," this.uploadThese(this.get(\"fileList\"), url, postvars);"," },",""," /**"," * Starts the upload of the files specified in the first argument, using an automated queue."," *"," * @method uploadThese"," * @param files {Array} The list of files to upload."," * @param url {String} The URL to upload the files to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */"," uploadThese : function (files, url, postvars) {"," if (!this.queue) {"," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\");",""," this.queue = new UploaderQueue({simUploads: this.get(\"simLimit\"), "," errorAction: this.get(\"errorAction\"),"," fileFieldName: this.get(\"fileFieldName\"),"," fileList: files,"," uploadURL: uploadURL,"," perFileParameters: postVars,"," retryCount: this.get(\"retryCount\")"," });"," this.queue.on(\"uploadstart\", this._uploadEventHandler, this);"," this.queue.on(\"uploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"totaluploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"uploadcomplete\", this._uploadEventHandler, this);"," this.queue.on(\"alluploadscomplete\", this._uploadEventHandler, this);"," this.queue.on(\"alluploadscancelled\", function (ev) {this.queue = null;}, this);"," this.queue.on(\"uploaderror\", this._uploadEventHandler, this);"," this.queue.startUpload(); "," "," this.fire(\"uploadstart\"); "," }"," }","},","","{"," /**"," * The template for the Flash player container. Since the Flash player container needs"," * to completely overlay the &lquot;Select Files&rqot; control, it's positioned absolutely,"," * with width and height set to 100% of the parent."," *"," * @property FLASH_CONTAINER"," * @type {String}"," * @static"," * @default \"\""," */"," FLASH_CONTAINER: \"\",",""," /**"," * The template for the \"Select Files\" button."," *"," * @property SELECT_FILES_BUTTON"," * @type {String}"," * @static"," * @default \"\""," */"," SELECT_FILES_BUTTON: \"\",",""," /**"," * The static property reflecting the type of uploader that `Y.Uploader`"," * aliases. The UploaderFlash value is `\"flash\"`."," * "," * @property TYPE"," * @type {String}"," * @static"," */"," TYPE: \"flash\",",""," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'uploader'"," * @readOnly"," * @protected"," * @static"," */"," NAME: \"uploader\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {",""," /**"," * A Boolean indicating whether newly selected files should be appended "," * to the existing file list, or whether they should replace it."," *"," * @attribute appendNewFiles"," * @type {Boolean}"," * @default true"," */"," appendNewFiles : {"," value: true"," },",""," /**"," * The names of CSS classes that correspond to different button states"," * of the \"Select Files\" control. These classes are assigned to the "," * \"Select Files\" control based on the mouse states reported by the"," * Flash player. The keys for the class names are:"," * "," *
"," * @attribute buttonClassNames"," * @type {Object}"," * @default { hover: \"yui3-button-hover\","," * active: \"yui3-button-active\","," * disabled: \"yui3-button-disabled\","," * focus: \"yui3-button-selected\""," * }"," */"," buttonClassNames: {"," value: {"," \"hover\": \"yui3-button-hover\","," \"active\": \"yui3-button-active\","," \"disabled\": \"yui3-button-disabled\","," \"focus\": \"yui3-button-selected\""," }"," },",""," /**"," * A Boolean indicating whether the uploader is enabled or disabled for user input."," *"," * @attribute enabled"," * @type {Boolean}"," * @default true"," */"," enabled : {"," value: true"," },",""," /**"," * The action performed when an upload error occurs for a specific file being uploaded."," * The possible values are: "," * "," *
"," * @attribute errorAction"," * @type {String}"," * @default UploaderQueue.CONTINUE"," */"," errorAction: {"," value: \"continue\","," validator: function (val, name) {"," return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER); "," }"," },",""," /**"," * An array indicating what fileFilters should be applied to the file"," * selection dialog. Each element in the array should be an object with"," * the following key-value pairs:"," * {"," * description : String "," extensions: String of the form &lquot;*.ext1;*.ext2;*.ext3;...&rquot;"," * }"," * @attribute fileFilters"," * @type {Array}"," * @default []"," */"," fileFilters: {"," value: []"," },",""," /**"," * A filtering function that is applied to every file selected by the user."," * The function receives the `Y.File` object and must return a Boolean value."," * If a `false` value is returned, the file in question is not added to the"," * list of files to be uploaded."," * Use this function to put limits on file sizes or check the file names for"," * correct extension, but make sure that a server-side check is also performed,"," * since any client-side restrictions are only advisory and can be circumvented."," *"," * @attribute fileFilterFunction"," * @type {Function}"," * @default null"," */"," fileFilterFunction: {"," value: null"," },"," "," /**"," * A String specifying what should be the POST field name for the file"," * content in the upload request."," *"," * @attribute fileFieldName"," * @type {String}"," * @default Filedata"," */"," fileFieldName: {"," value: \"Filedata\""," },",""," /**"," * The array of files to be uploaded. All elements in the array"," * must be instances of `Y.FileFlash` and be instantiated with a `fileId`"," * retrieved from an instance of the uploader."," *"," * @attribute fileList"," * @type {Array}"," * @default []"," */"," fileList: {"," value: [],"," getter: \"_getFileList\","," setter: \"_setFileList\""," },",""," /**"," * A Boolean indicating whether multiple file selection is enabled."," *"," * @attribute multipleFiles"," * @type {Boolean}"," * @default false"," */"," multipleFiles: {"," value: false"," },",""," /**"," * An object, keyed by `fileId`, containing sets of key-value pairs"," * that should be passed as POST variables along with each corresponding"," * file. This attribute is only used if no POST variables are specifed"," * in the upload method call."," *"," * @attribute postVarsPerFile"," * @type {Object}"," * @default {}"," */"," postVarsPerFile: {"," value: {}"," },",""," /**"," * The label for the \"Select Files\" widget. This is the value that replaces the"," * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template."," * "," * @attribute selectButtonLabel"," * @type {String}"," * @default \"Select Files\""," */"," selectButtonLabel: {"," value: \"Select Files\""," },",""," /**"," * The widget that serves as the \"Select Files\" control for the file uploader"," * "," *"," * @attribute selectFilesButton"," * @type {Node | Widget}"," * @default A standard HTML button with YUI CSS Button skin."," */"," selectFilesButton : {"," valueFn: function () {"," return Y.Node.create(substitute(Y.UploaderFlash.SELECT_FILES_BUTTON, {selectButtonLabel: this.get(\"selectButtonLabel\")}));"," }"," },"," "," /**"," * The number of files that can be uploaded"," * simultaneously if the automatic queue management"," * is used. This value can be in the range between 2"," * and 5."," *"," * @attribute simLimit"," * @type {Number}"," * @default 2"," */"," simLimit: {"," value: 2,"," validator: function (val, name) {"," return (val >= 2 && val <= 5);"," }"," },",""," /**"," * The URL to the SWF file of the flash uploader. A copy local to"," * the server that hosts the page on which the uploader appears is"," * recommended."," *"," * @attribute swfURL"," * @type {String}"," * @default \"CDN Prefix + uploader/assets/flashuploader.swf\" with a "," * random GET parameter for IE (to prevent buggy behavior when the SWF "," * is cached)."," */"," swfURL: {"," valueFn: function () {"," var prefix = Y.Env.cdn + \"uploader/assets/flashuploader.swf\";",""," if (Y.UA.ie > 0) {"," return (prefix + \"?t=\" + Y.guid(\"uploader\"));"," }"," return prefix;"," }"," },",""," /**"," * The id's or `Node` references of the DOM elements that precede"," * and follow the `Select Files` button in the tab order. Specifying"," * these allows keyboard navigation to and from the Flash player"," * layer of the uploader."," * The two keys corresponding to the DOM elements are:"," "," *
"," * @attribute tabElements"," * @type {Object}"," * @default null"," */"," tabElements: {"," value: null"," },",""," /**"," * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call."," *"," * @attribute uploadURL"," * @type {String}"," * @default \"\""," */"," uploadURL: {"," value: \"\""," },",""," /**"," * The number of times to try re-uploading a file that failed to upload before"," * cancelling its upload."," *"," * @attribute retryCount"," * @type {Number}"," * @default 3"," */ "," retryCount: {"," value: 3"," }"," }","});","","Y.UploaderFlash.Queue = UploaderQueue;","","","","","}, '3.7.3', {\"requires\": [\"swf\", \"widget\", \"substitute\", \"base\", \"cssbutton\", \"node\", \"event-custom\", \"file-flash\", \"uploader-queue\"]});"];
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"].lines = {"1":0,"14":0,"30":0,"31":0,"36":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"129":0,"137":0,"152":0,"171":0,"188":0,"205":0,"213":0,"234":0,"242":0,"250":0,"258":0,"266":0,"274":0,"290":0,"294":0,"295":0,"296":0,"297":0,"299":0,"300":0,"307":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"332":0,"338":0,"339":0,"340":0,"341":0,"342":0,"345":0,"346":0,"347":0,"348":0,"351":0,"352":0,"353":0,"354":0,"356":0,"357":0,"358":0,"359":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"381":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"392":0,"395":0,"396":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"417":0,"418":0,"420":0,"421":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"444":0,"445":0,"448":0,"461":0,"462":0,"477":0,"478":0,"490":0,"491":0,"492":0,"493":0,"496":0,"497":0,"498":0,"509":0,"519":0,"520":0,"535":0,"536":0,"539":0,"545":0,"546":0,"547":0,"548":0,"549":0,"550":0,"551":0,"552":0,"553":0,"555":0,"558":0,"559":0,"560":0,"561":0,"562":0,"567":0,"568":0,"572":0,"573":0,"575":0,"578":0,"594":0,"596":0,"597":0,"599":0,"600":0,"602":0,"603":0,"605":0,"606":0,"608":0,"609":0,"610":0,"613":0,"614":0,"617":0,"618":0,"637":0,"641":0,"643":0,"645":0,"646":0,"647":0,"648":0,"649":0,"651":0,"664":0,"677":0,"678":0,"681":0,"689":0,"690":0,"691":0,"692":0,"693":0,"694":0,"695":0,"696":0,"698":0,"831":0,"942":0,"959":0,"976":0,"978":0,"979":0,"981":0,"1030":0};
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"].functions = {"UploaderFlash:30":0,"initializer:104":0,"renderUI:289":0,"(anonymous 2):321":0,"(anonymous 3):338":0,"(anonymous 4):345":0,"(anonymous 5):351":0,"(anonymous 6):356":0,"(anonymous 7):361":0,"bindUI:319":0,"(anonymous 8):399":0,"(anonymous 9):408":0,"(anonymous 11):417":0,"(anonymous 10):417":0,"(anonymous 13):418":0,"(anonymous 12):418":0,"(anonymous 14):420":0,"(anonymous 15):421":0,"_attachTabElements:380":0,"_setButtonClass:443":0,"_setFileFilters:460":0,"_setMultipleFiles:476":0,"_triggerEnabled:489":0,"_getFileList:508":0,"_setFileList:518":0,"(anonymous 16):545":0,"(anonymous 17):559":0,"(anonymous 18):567":0,"_updateFileList:533":0,"_uploadEventHandler:592":0,"upload:635":0,"uploadAll:663":0,"(anonymous 19):694":0,"uploadThese:676":0,"validator:830":0,"valueFn:941":0,"validator:958":0,"valueFn:975":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"].coveredLines = 189;
-_yuitest_coverage["build/uploader-flash/uploader-flash.js"].coveredFunctions = 39;
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 1);
-YUI.add('uploader-flash', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * Flash as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, file filtering, server response retrieval and error reporting.
- *
- * @module uploader-flash
- */
-
-// Shorthands for external modules
-_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 14);
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue,
- getCN = Y.ClassNameManager.getClassName,
- UPLOADER = 'uploader',
- SELECT_FILES = getCN(UPLOADER, 'selectfiles-button');
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability
- * using Flash as a transport engine.
- * @class UploaderFlash
- * @extends Widget
- * @constructor
- * @param {Object} config Configuration object.
- */
-
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 30);
-function UploaderFlash(config) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "UploaderFlash", 30);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 31);
-UploaderFlash.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 36);
-Y.UploaderFlash = Y.extend(UploaderFlash, Y.Widget, {
-
- /**
- * Stored value of the current button state (based on
- * mouse events dispatched by the Flash player)
- * @property _buttonState
- * @type {String}
- * @protected
- */
- _buttonState: "up",
-
- /**
- * Stored value of the current button focus state (based
- * on keyboard and mouse events).
- * @property _buttonFocus
- * @type {Boolean}
- * @protected
- */
- _buttonFocus: false,
-
- /**
- * Stored value of the unique id for the container that holds the
- * Flash uploader.
- *
- * @property _swfContainerId
- * @type {String}
- * @protected
- */
- _swfContainerId: null,
-
- /**
- * Stored reference to the instance of SWF used to host the
- * Flash uploader.
- *
- * @property _swfReference
- * @type {SWF}
- * @protected
- */
- _swfReference: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- /**
- * Stored event bindings for keyboard navigation to and from the uploader.
- *
- * @property _tabElementBindings
- * @type {Object}
- * @protected
- */
- _tabElementBindings: null,
-
-
-/**
- * Construction logic executed during UploaderFlash instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- // Assign protected variable values
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "initializer", 104);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 107);
-this._swfContainerId = Y.guid("uploader");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 108);
-this._swfReference = null;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 109);
-this.queue = null;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 110);
-this._buttonState = "up";
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 111);
-this._buttonFocus = null;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 112);
-this._tabElementBindings = null;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 113);
-this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 129);
-this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 137);
-this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 152);
-this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 171);
-this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 188);
-this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 205);
-this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 213);
-this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 234);
-this.publish("uploaderror");
-
- /**
- * Signals that a mouse has begun hovering over the `Select Files` button.
- *
- * @event mouseenter
- * @param event {Event} The event object for the `mouseenter` event.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 242);
-this.publish("mouseenter");
-
- /**
- * Signals that a mouse has stopped hovering over the `Select Files` button.
- *
- * @event mouseleave
- * @param event {Event} The event object for the `mouseleave` event.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 250);
-this.publish("mouseleave");
-
- /**
- * Signals that a mouse button has been pressed over the `Select Files` button.
- *
- * @event mousedown
- * @param event {Event} The event object for the `mousedown` event.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 258);
-this.publish("mousedown");
-
- /**
- * Signals that a mouse button has been released over the `Select Files` button.
- *
- * @event mouseup
- * @param event {Event} The event object for the `mouseup` event.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 266);
-this.publish("mouseup");
-
- /**
- * Signals that a mouse has been clicked over the `Select Files` button.
- *
- * @event click
- * @param event {Event} The event object for the `click` event.
- */
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 274);
-this.publish("click");
- },
-
- /**
- * Creates the DOM structure for the UploaderFlash.
- * UploaderFlash's DOM structure consists of two layers: the base "Select Files"
- * button that can be replaced by the developer's widget of choice; and a transparent
- * Flash overlay positoned above the button that captures all input events.
- * The `position` style attribute of the `boundingBox` of the `Uploader` widget
- * is forced to be `relative`, in order to accommodate the Flash player overlay
- * (which is `position`ed `absolute`ly).
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "renderUI", 289);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 290);
-var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selFilesButton = this.get("selectFilesButton");
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 294);
-boundingBox.setStyle("position", "relative");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 295);
-selFilesButton.setStyles({width: "100%", height: "100%"});
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 296);
-contentBox.append(selFilesButton);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 297);
-contentBox.append(Y.Node.create(substitute(UploaderFlash.FLASH_CONTAINER,
- {swfContainerId: this._swfContainerId})));
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 299);
-var flashContainer = Y.one("#" + this._swfContainerId);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 300);
-var params = {version: "10.0.45",
- fixedAttributes: {wmode: "transparent",
- allowScriptAccess:"always",
- allowNetworking:"all",
- scale: "noscale"
- }
- };
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 307);
-this._swfReference = new Y.SWF(flashContainer, this.get("swfURL"), params);
- },
-
- /**
- * Binds handlers to the UploaderFlash UI events and propagates attribute
- * values to the Flash player.
- * The propagation of initial values is set to occur once the Flash player
- * instance is ready (as indicated by the `swfReady` event.)
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "bindUI", 319);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 321);
-this._swfReference.on("swfReady", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 2)", 321);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 322);
-this._setMultipleFiles();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 323);
-this._setFileFilters();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 324);
-this._triggerEnabled();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 325);
-this._attachTabElements();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 326);
-this.after("multipleFilesChange", this._setMultipleFiles, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 327);
-this.after("fileFiltersChange", this._setFileFilters, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 328);
-this.after("enabledChange", this._triggerEnabled, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 329);
-this.after("tabElementsChange", this._attachTabElements);
- }, this);
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 332);
-this._swfReference.on("fileselect", this._updateFileList, this);
-
-
-
- // this._swfReference.on("trace", function (ev) {console.log(ev.message);});
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 338);
-this._swfReference.on("mouseenter", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 3)", 338);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 339);
-this.fire("mouseenter");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 340);
-this._setButtonClass("hover", true);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 341);
-if (this._buttonState == "down") {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 342);
-this._setButtonClass("active", true);
- }
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 345);
-this._swfReference.on("mouseleave", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 4)", 345);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 346);
-this.fire("mouseleave");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 347);
-this._setButtonClass("hover", false);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 348);
-this._setButtonClass("active", false);
-
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 351);
-this._swfReference.on("mousedown", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 5)", 351);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 352);
-this.fire("mousedown");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 353);
-this._buttonState = "down";
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 354);
-this._setButtonClass("active", true);
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 356);
-this._swfReference.on("mouseup", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 6)", 356);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 357);
-this.fire("mouseup");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 358);
-this._buttonState = "up";
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 359);
-this._setButtonClass("active", false);
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 361);
-this._swfReference.on("click", function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 7)", 361);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 362);
-this.fire("click");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 363);
-this._buttonFocus = true;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 364);
-this._setButtonClass("focus", true);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 365);
-Y.one("body").focus();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 366);
-this._swfReference._swf.focus();
- }, this);
- },
-
- /**
- * Attaches keyboard bindings to enabling tabbing to and from the instance of the Flash
- * player in the Uploader widget. If the previous and next elements are specified, the
- * keyboard bindings enable the user to tab from the `tabElements["from"]` node to the
- * Flash-powered "Select Files" button, and to the `tabElements["to"]` node.
- *
- * @method _attachTabElements
- * @protected
- * @param ev {Event} Optional event payload if called as a `tabElementsChange` handler.
- */
- _attachTabElements : function (ev) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_attachTabElements", 380);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 381);
-if (this.get("tabElements") !== null && this.get("tabElements").from !== null && this.get("tabElements").to !== null) {
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 383);
-if (this._tabElementBindings !== null) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 384);
-this._tabElementBindings.from.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 385);
-this._tabElementBindings.to.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 386);
-this._tabElementBindings.tabback.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 387);
-this._tabElementBindings.tabforward.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 388);
-this._tabElementBindings.focus.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 389);
-this._tabElementBindings.blur.detach();
- }
- else {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 392);
-this._tabElementBindings = {};
- }
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 395);
-var fromElement = Y.one(this.get("tabElements").from);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 396);
-var toElement = Y.one(this.get("tabElements").to);
-
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 399);
-this._tabElementBindings.from = fromElement.on("keydown", function (ev) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 8)", 399);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 400);
-if (ev.keyCode == 9 && !ev.shiftKey) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 401);
-ev.preventDefault();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 402);
-this._swfReference._swf.setAttribute("tabindex", 0);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 403);
-this._swfReference._swf.setAttribute("role", "button");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 404);
-this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 405);
-this._swfReference._swf.focus();
- }
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 408);
-this._tabElementBindings.to = toElement.on("keydown", function (ev) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 9)", 408);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 409);
-if (ev.keyCode == 9 && ev.shiftKey) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 410);
-ev.preventDefault();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 411);
-this._swfReference._swf.setAttribute("tabindex", 0);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 412);
-this._swfReference._swf.setAttribute("role", "button");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 413);
-this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 414);
-this._swfReference._swf.focus();
- }
- }, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 417);
-this._tabElementBindings.tabback = this._swfReference.on("tabback", function (ev) {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 10)", 417);
-this._swfReference._swf.blur(); setTimeout(function () {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 11)", 417);
-fromElement.focus();}, 30);}, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 418);
-this._tabElementBindings.tabforward = this._swfReference.on("tabforward", function (ev) {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 12)", 418);
-this._swfReference._swf.blur(); setTimeout(function () {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 13)", 418);
-toElement.focus();}, 30);}, this);
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 420);
-this._tabElementBindings.focus = this._swfReference._swf.on("focus", function (ev) {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 14)", 420);
-this._buttonFocus = true; this._setButtonClass("focus", true);}, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 421);
-this._tabElementBindings.blur = this._swfReference._swf.on("blur", function (ev) {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 15)", 421);
-this._buttonFocus = false; this._setButtonClass("focus", false);}, this);
- }
- else {_yuitest_coverline("build/uploader-flash/uploader-flash.js", 423);
-if (this._tabElementBindings !== null) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 424);
-this._tabElementBindings.from.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 425);
-this._tabElementBindings.to.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 426);
-this._tabElementBindings.tabback.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 427);
-this._tabElementBindings.tabforward.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 428);
-this._tabElementBindings.focus.detach();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 429);
-this._tabElementBindings.blur.detach();
- }}
- },
-
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_setButtonClass", 443);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 444);
-if (add) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 445);
-this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 448);
-this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
-
- /**
- * Syncs the state of the `fileFilters` attribute between the instance of UploaderFlash
- * and the Flash player.
- *
- * @method _setFileFilters
- * @private
- */
- _setFileFilters : function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_setFileFilters", 460);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 461);
-if (this._swfReference && this.get("fileFilters").length > 0) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 462);
-this._swfReference.callSWF("setFileFilters", [this.get("fileFilters")]);
- }
-
- },
-
-
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the Flash uploader.
- *
- * @method _setMultipleFiles
- * @private
- */
- _setMultipleFiles : function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_setMultipleFiles", 476);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 477);
-if (this._swfReference) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 478);
-this._swfReference.callSWF("setAllowMultipleFiles", [this.get("multipleFiles")]);
- }
- },
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the Flash uploader.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_triggerEnabled", 489);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 490);
-if (this.get("enabled")) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 491);
-this._swfReference.callSWF("enable");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 492);
-this._swfReference._swf.setAttribute("aria-disabled", "false");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 493);
-this._setButtonClass("disabled", false);
- }
- else {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 496);
-this._swfReference.callSWF("disable");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 497);
-this._swfReference._swf.setAttribute("aria-disabled", "true");
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 498);
-this._setButtonClass("disabled", true);
- }
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_getFileList", 508);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 509);
-return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_setFileList", 518);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 519);
-this._fileList = val.concat();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 520);
-return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @private
- */
- _updateFileList : function (ev) {
-
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_updateFileList", 533);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 535);
-Y.one("body").focus();
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 536);
-this._swfReference._swf.focus();
-
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 539);
-var newfiles = ev.fileList,
- fileConfObjects = [],
- parsedFiles = [],
- swfRef = this._swfReference,
- filterFunc = this.get("fileFilterFunction");
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 545);
-Y.each(newfiles, function (value) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 16)", 545);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 546);
-var newFileConf = {};
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 547);
-newFileConf.id = value.fileId;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 548);
-newFileConf.name = value.fileReference.name;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 549);
-newFileConf.size = value.fileReference.size;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 550);
-newFileConf.type = value.fileReference.type;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 551);
-newFileConf.dateCreated = value.fileReference.creationDate;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 552);
-newFileConf.dateModified = value.fileReference.modificationDate;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 553);
-newFileConf.uploader = swfRef;
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 555);
-fileConfObjects.push(newFileConf);
- });
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 558);
-if (filterFunc) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 559);
-Y.each(fileConfObjects, function (value) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 17)", 559);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 560);
-var newfile = new Y.FileFlash(value);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 561);
-if (filterFunc(newfile)) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 562);
-parsedFiles.push(newfile);
- }
- });
- }
- else {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 567);
-Y.each(fileConfObjects, function (value) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 18)", 567);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 568);
-parsedFiles.push(new Y.FileFlash(value));
- });
- }
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 572);
-if (parsedFiles.length > 0) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 573);
-var oldfiles = this.get("fileList");
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 575);
-this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 578);
-this.fire("fileselect", {fileList: parsedFiles});
- }
-
- },
-
-
-
- /**
- * Handles and retransmits events fired by `Y.FileFlash` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadEventHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "_uploadEventHandler", 592);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 594);
-switch (event.type) {
- case "file:uploadstart":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 596);
-this.fire("fileuploadstart", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 597);
-break;
- case "file:uploadprogress":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 599);
-this.fire("uploadprogress", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 600);
-break;
- case "uploaderqueue:totaluploadprogress":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 602);
-this.fire("totaluploadprogress", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 603);
-break;
- case "file:uploadcomplete":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 605);
-this.fire("uploadcomplete", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 606);
-break;
- case "uploaderqueue:alluploadscomplete":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 608);
-this.queue = null;
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 609);
-this.fire("alluploadscomplete", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 610);
-break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 613);
-this.fire("uploaderror", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 614);
-break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 617);
-this.fire("uploadcancel", event);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 618);
-break;
- }
-
- },
-
-
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.FileFlash} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
-
- upload : function (file, url, postvars) {
-
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "upload", 635);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 637);
-var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 641);
-postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 643);
-if (file instanceof Y.FileFlash) {
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 645);
-file.on("uploadstart", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 646);
-file.on("uploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 647);
-file.on("uploadcomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 648);
-file.on("uploaderror", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 649);
-file.on("uploadcancel", this._uploadEventHandler, this);
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 651);
-file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "uploadAll", 663);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 664);
-this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "uploadThese", 676);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 677);
-if (!this.queue) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 678);
-var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 681);
-this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount")
- });
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 689);
-this.queue.on("uploadstart", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 690);
-this.queue.on("uploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 691);
-this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 692);
-this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 693);
-this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 694);
-this.queue.on("alluploadscancelled", function (ev) {_yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "(anonymous 19)", 694);
-this.queue = null;}, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 695);
-this.queue.on("uploaderror", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 696);
-this.queue.startUpload();
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 698);
-this.fire("uploadstart");
- }
- }
-},
-
-{
- /**
- * The template for the Flash player container. Since the Flash player container needs
- * to completely overlay the &lquot;Select Files&rqot; control, it's positioned absolutely,
- * with width and height set to 100% of the parent.
- *
- * @property FLASH_CONTAINER
- * @type {String}
- * @static
- * @default ""
- */
- FLASH_CONTAINER: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderFlash value is `"flash"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "flash",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the mouse states reported by the
- * Flash player. The keys for the class names are:
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default { hover: "yui3-button-hover",
- * active: "yui3-button-active",
- * disabled: "yui3-button-disabled",
- * focus: "yui3-button-selected"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "validator", 830);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 831);
-return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);
- }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be an object with
- * the following key-value pairs:
- * {
- * description : String
- extensions: String of the form &lquot;*.ext1;*.ext2;*.ext3;...&rquot;
- * }
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.FileFlash` and be instantiated with a `fileId`
- * retrieved from an instance of the uploader.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files" control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "valueFn", 941);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 942);
-return Y.Node.create(substitute(Y.UploaderFlash.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "validator", 958);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 959);
-return (val >= 2 && val <= 5);
- }
- },
-
- /**
- * The URL to the SWF file of the flash uploader. A copy local to
- * the server that hosts the page on which the uploader appears is
- * recommended.
- *
- * @attribute swfURL
- * @type {String}
- * @default "CDN Prefix + uploader/assets/flashuploader.swf" with a
- * random GET parameter for IE (to prevent buggy behavior when the SWF
- * is cached).
- */
- swfURL: {
- valueFn: function () {
- _yuitest_coverfunc("build/uploader-flash/uploader-flash.js", "valueFn", 975);
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 976);
-var prefix = Y.Env.cdn + "uploader/assets/flashuploader.swf";
-
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 978);
-if (Y.UA.ie > 0) {
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 979);
-return (prefix + "?t=" + Y.guid("uploader"));
- }
- _yuitest_coverline("build/uploader-flash/uploader-flash.js", 981);
-return prefix;
- }
- },
-
- /**
- * The id's or `Node` references of the DOM elements that precede
- * and follow the `Select Files` button in the tab order. Specifying
- * these allows keyboard navigation to and from the Flash player
- * layer of the uploader.
- * The two keys corresponding to the DOM elements are:
-
- *
- * @attribute tabElements
- * @type {Object}
- * @default null
- */
- tabElements: {
- value: null
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-_yuitest_coverline("build/uploader-flash/uploader-flash.js", 1030);
-Y.UploaderFlash.Queue = UploaderQueue;
-
-
-
-
-}, '3.7.3', {"requires": ["swf", "widget", "substitute", "base", "cssbutton", "node", "event-custom", "file-flash", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-debug.js b/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-debug.js
deleted file mode 100644
index 694c950152e..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-debug.js
+++ /dev/null
@@ -1,1041 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader-flash', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * Flash as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, file filtering, server response retrieval and error reporting.
- *
- * @module uploader-flash
- */
-
-// Shorthands for external modules
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue,
- getCN = Y.ClassNameManager.getClassName,
- UPLOADER = 'uploader',
- SELECT_FILES = getCN(UPLOADER, 'selectfiles-button');
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability
- * using Flash as a transport engine.
- * @class UploaderFlash
- * @extends Widget
- * @constructor
- * @param {Object} config Configuration object.
- */
-
-function UploaderFlash(config) {
- UploaderFlash.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-Y.UploaderFlash = Y.extend(UploaderFlash, Y.Widget, {
-
- /**
- * Stored value of the current button state (based on
- * mouse events dispatched by the Flash player)
- * @property _buttonState
- * @type {String}
- * @protected
- */
- _buttonState: "up",
-
- /**
- * Stored value of the current button focus state (based
- * on keyboard and mouse events).
- * @property _buttonFocus
- * @type {Boolean}
- * @protected
- */
- _buttonFocus: false,
-
- /**
- * Stored value of the unique id for the container that holds the
- * Flash uploader.
- *
- * @property _swfContainerId
- * @type {String}
- * @protected
- */
- _swfContainerId: null,
-
- /**
- * Stored reference to the instance of SWF used to host the
- * Flash uploader.
- *
- * @property _swfReference
- * @type {SWF}
- * @protected
- */
- _swfReference: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- /**
- * Stored event bindings for keyboard navigation to and from the uploader.
- *
- * @property _tabElementBindings
- * @type {Object}
- * @protected
- */
- _tabElementBindings: null,
-
-
-/**
- * Construction logic executed during UploaderFlash instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- // Assign protected variable values
- this._swfContainerId = Y.guid("uploader");
- this._swfReference = null;
- this.queue = null;
- this._buttonState = "up";
- this._buttonFocus = null;
- this._tabElementBindings = null;
- this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- this.publish("uploaderror");
-
- /**
- * Signals that a mouse has begun hovering over the `Select Files` button.
- *
- * @event mouseenter
- * @param event {Event} The event object for the `mouseenter` event.
- */
- this.publish("mouseenter");
-
- /**
- * Signals that a mouse has stopped hovering over the `Select Files` button.
- *
- * @event mouseleave
- * @param event {Event} The event object for the `mouseleave` event.
- */
- this.publish("mouseleave");
-
- /**
- * Signals that a mouse button has been pressed over the `Select Files` button.
- *
- * @event mousedown
- * @param event {Event} The event object for the `mousedown` event.
- */
- this.publish("mousedown");
-
- /**
- * Signals that a mouse button has been released over the `Select Files` button.
- *
- * @event mouseup
- * @param event {Event} The event object for the `mouseup` event.
- */
- this.publish("mouseup");
-
- /**
- * Signals that a mouse has been clicked over the `Select Files` button.
- *
- * @event click
- * @param event {Event} The event object for the `click` event.
- */
- this.publish("click");
- },
-
- /**
- * Creates the DOM structure for the UploaderFlash.
- * UploaderFlash's DOM structure consists of two layers: the base "Select Files"
- * button that can be replaced by the developer's widget of choice; and a transparent
- * Flash overlay positoned above the button that captures all input events.
- * The `position` style attribute of the `boundingBox` of the `Uploader` widget
- * is forced to be `relative`, in order to accommodate the Flash player overlay
- * (which is `position`ed `absolute`ly).
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selFilesButton = this.get("selectFilesButton");
-
- boundingBox.setStyle("position", "relative");
- selFilesButton.setStyles({width: "100%", height: "100%"});
- contentBox.append(selFilesButton);
- contentBox.append(Y.Node.create(substitute(UploaderFlash.FLASH_CONTAINER,
- {swfContainerId: this._swfContainerId})));
- var flashContainer = Y.one("#" + this._swfContainerId);
- var params = {version: "10.0.45",
- fixedAttributes: {wmode: "transparent",
- allowScriptAccess:"always",
- allowNetworking:"all",
- scale: "noscale"
- }
- };
- this._swfReference = new Y.SWF(flashContainer, this.get("swfURL"), params);
- },
-
- /**
- * Binds handlers to the UploaderFlash UI events and propagates attribute
- * values to the Flash player.
- * The propagation of initial values is set to occur once the Flash player
- * instance is ready (as indicated by the `swfReady` event.)
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- this._swfReference.on("swfReady", function () {
- this._setMultipleFiles();
- this._setFileFilters();
- this._triggerEnabled();
- this._attachTabElements();
- this.after("multipleFilesChange", this._setMultipleFiles, this);
- this.after("fileFiltersChange", this._setFileFilters, this);
- this.after("enabledChange", this._triggerEnabled, this);
- this.after("tabElementsChange", this._attachTabElements);
- }, this);
-
- this._swfReference.on("fileselect", this._updateFileList, this);
-
-
-
- // this._swfReference.on("trace", function (ev) {console.log(ev.message);});
-
- this._swfReference.on("mouseenter", function () {
- this.fire("mouseenter");
- this._setButtonClass("hover", true);
- if (this._buttonState == "down") {
- this._setButtonClass("active", true);
- }
- }, this);
- this._swfReference.on("mouseleave", function () {
- this.fire("mouseleave");
- this._setButtonClass("hover", false);
- this._setButtonClass("active", false);
-
- }, this);
- this._swfReference.on("mousedown", function () {
- this.fire("mousedown");
- this._buttonState = "down";
- this._setButtonClass("active", true);
- }, this);
- this._swfReference.on("mouseup", function () {
- this.fire("mouseup");
- this._buttonState = "up";
- this._setButtonClass("active", false);
- }, this);
- this._swfReference.on("click", function () {
- this.fire("click");
- this._buttonFocus = true;
- this._setButtonClass("focus", true);
- Y.one("body").focus();
- this._swfReference._swf.focus();
- }, this);
- },
-
- /**
- * Attaches keyboard bindings to enabling tabbing to and from the instance of the Flash
- * player in the Uploader widget. If the previous and next elements are specified, the
- * keyboard bindings enable the user to tab from the `tabElements["from"]` node to the
- * Flash-powered "Select Files" button, and to the `tabElements["to"]` node.
- *
- * @method _attachTabElements
- * @protected
- * @param ev {Event} Optional event payload if called as a `tabElementsChange` handler.
- */
- _attachTabElements : function (ev) {
- if (this.get("tabElements") !== null && this.get("tabElements").from !== null && this.get("tabElements").to !== null) {
-
- if (this._tabElementBindings !== null) {
- this._tabElementBindings.from.detach();
- this._tabElementBindings.to.detach();
- this._tabElementBindings.tabback.detach();
- this._tabElementBindings.tabforward.detach();
- this._tabElementBindings.focus.detach();
- this._tabElementBindings.blur.detach();
- }
- else {
- this._tabElementBindings = {};
- }
-
- var fromElement = Y.one(this.get("tabElements").from);
- var toElement = Y.one(this.get("tabElements").to);
-
-
- this._tabElementBindings.from = fromElement.on("keydown", function (ev) {
- if (ev.keyCode == 9 && !ev.shiftKey) {
- ev.preventDefault();
- this._swfReference._swf.setAttribute("tabindex", 0);
- this._swfReference._swf.setAttribute("role", "button");
- this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- this._swfReference._swf.focus();
- }
- }, this);
- this._tabElementBindings.to = toElement.on("keydown", function (ev) {
- if (ev.keyCode == 9 && ev.shiftKey) {
- ev.preventDefault();
- this._swfReference._swf.setAttribute("tabindex", 0);
- this._swfReference._swf.setAttribute("role", "button");
- this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- this._swfReference._swf.focus();
- }
- }, this);
- this._tabElementBindings.tabback = this._swfReference.on("tabback", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {fromElement.focus();}, 30);}, this);
- this._tabElementBindings.tabforward = this._swfReference.on("tabforward", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {toElement.focus();}, 30);}, this);
-
- this._tabElementBindings.focus = this._swfReference._swf.on("focus", function (ev) {this._buttonFocus = true; this._setButtonClass("focus", true);}, this);
- this._tabElementBindings.blur = this._swfReference._swf.on("blur", function (ev) {this._buttonFocus = false; this._setButtonClass("focus", false);}, this);
- }
- else if (this._tabElementBindings !== null) {
- this._tabElementBindings.from.detach();
- this._tabElementBindings.to.detach();
- this._tabElementBindings.tabback.detach();
- this._tabElementBindings.tabforward.detach();
- this._tabElementBindings.focus.detach();
- this._tabElementBindings.blur.detach();
- }
- },
-
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- if (add) {
- this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
-
- /**
- * Syncs the state of the `fileFilters` attribute between the instance of UploaderFlash
- * and the Flash player.
- *
- * @method _setFileFilters
- * @private
- */
- _setFileFilters : function () {
- if (this._swfReference && this.get("fileFilters").length > 0) {
- this._swfReference.callSWF("setFileFilters", [this.get("fileFilters")]);
- }
-
- },
-
-
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the Flash uploader.
- *
- * @method _setMultipleFiles
- * @private
- */
- _setMultipleFiles : function () {
- if (this._swfReference) {
- this._swfReference.callSWF("setAllowMultipleFiles", [this.get("multipleFiles")]);
- }
- },
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the Flash uploader.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- if (this.get("enabled")) {
- this._swfReference.callSWF("enable");
- this._swfReference._swf.setAttribute("aria-disabled", "false");
- this._setButtonClass("disabled", false);
- }
- else {
- this._swfReference.callSWF("disable");
- this._swfReference._swf.setAttribute("aria-disabled", "true");
- this._setButtonClass("disabled", true);
- }
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- this._fileList = val.concat();
- return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @private
- */
- _updateFileList : function (ev) {
-
- Y.one("body").focus();
- this._swfReference._swf.focus();
-
-
- var newfiles = ev.fileList,
- fileConfObjects = [],
- parsedFiles = [],
- swfRef = this._swfReference,
- filterFunc = this.get("fileFilterFunction");
-
- Y.each(newfiles, function (value) {
- var newFileConf = {};
- newFileConf.id = value.fileId;
- newFileConf.name = value.fileReference.name;
- newFileConf.size = value.fileReference.size;
- newFileConf.type = value.fileReference.type;
- newFileConf.dateCreated = value.fileReference.creationDate;
- newFileConf.dateModified = value.fileReference.modificationDate;
- newFileConf.uploader = swfRef;
-
- fileConfObjects.push(newFileConf);
- });
-
- if (filterFunc) {
- Y.each(fileConfObjects, function (value) {
- var newfile = new Y.FileFlash(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(fileConfObjects, function (value) {
- parsedFiles.push(new Y.FileFlash(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
-
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- },
-
-
-
- /**
- * Handles and retransmits events fired by `Y.FileFlash` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadEventHandler : function (event) {
-
- switch (event.type) {
- case "file:uploadstart":
- this.fire("fileuploadstart", event);
- break;
- case "file:uploadprogress":
- this.fire("uploadprogress", event);
- break;
- case "uploaderqueue:totaluploadprogress":
- this.fire("totaluploadprogress", event);
- break;
- case "file:uploadcomplete":
- this.fire("uploadcomplete", event);
- break;
- case "uploaderqueue:alluploadscomplete":
- this.queue = null;
- this.fire("alluploadscomplete", event);
- break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- this.fire("uploaderror", event);
- break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- this.fire("uploadcancel", event);
- break;
- }
-
- },
-
-
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.FileFlash} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
-
- upload : function (file, url, postvars) {
-
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- if (file instanceof Y.FileFlash) {
-
- file.on("uploadstart", this._uploadEventHandler, this);
- file.on("uploadprogress", this._uploadEventHandler, this);
- file.on("uploadcomplete", this._uploadEventHandler, this);
- file.on("uploaderror", this._uploadEventHandler, this);
- file.on("uploadcancel", this._uploadEventHandler, this);
-
- file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- if (!this.queue) {
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount")
- });
- this.queue.on("uploadstart", this._uploadEventHandler, this);
- this.queue.on("uploadprogress", this._uploadEventHandler, this);
- this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscancelled", function (ev) {this.queue = null;}, this);
- this.queue.on("uploaderror", this._uploadEventHandler, this);
- this.queue.startUpload();
-
- this.fire("uploadstart");
- }
- }
-},
-
-{
- /**
- * The template for the Flash player container. Since the Flash player container needs
- * to completely overlay the &lquot;Select Files&rqot; control, it's positioned absolutely,
- * with width and height set to 100% of the parent.
- *
- * @property FLASH_CONTAINER
- * @type {String}
- * @static
- * @default ""
- */
- FLASH_CONTAINER: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderFlash value is `"flash"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "flash",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the mouse states reported by the
- * Flash player. The keys for the class names are:
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default { hover: "yui3-button-hover",
- * active: "yui3-button-active",
- * disabled: "yui3-button-disabled",
- * focus: "yui3-button-selected"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);
- }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be an object with
- * the following key-value pairs:
- * {
- * description : String
- extensions: String of the form &lquot;*.ext1;*.ext2;*.ext3;...&rquot;
- * }
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.FileFlash` and be instantiated with a `fileId`
- * retrieved from an instance of the uploader.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files" control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- return Y.Node.create(substitute(Y.UploaderFlash.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- return (val >= 2 && val <= 5);
- }
- },
-
- /**
- * The URL to the SWF file of the flash uploader. A copy local to
- * the server that hosts the page on which the uploader appears is
- * recommended.
- *
- * @attribute swfURL
- * @type {String}
- * @default "CDN Prefix + uploader/assets/flashuploader.swf" with a
- * random GET parameter for IE (to prevent buggy behavior when the SWF
- * is cached).
- */
- swfURL: {
- valueFn: function () {
- var prefix = Y.Env.cdn + "uploader/assets/flashuploader.swf";
-
- if (Y.UA.ie > 0) {
- return (prefix + "?t=" + Y.guid("uploader"));
- }
- return prefix;
- }
- },
-
- /**
- * The id's or `Node` references of the DOM elements that precede
- * and follow the `Select Files` button in the tab order. Specifying
- * these allows keyboard navigation to and from the Flash player
- * layer of the uploader.
- * The two keys corresponding to the DOM elements are:
-
- *
- * @attribute tabElements
- * @type {Object}
- * @default null
- */
- tabElements: {
- value: null
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-Y.UploaderFlash.Queue = UploaderQueue;
-
-
-
-
-}, '3.7.3', {"requires": ["swf", "widget", "substitute", "base", "cssbutton", "node", "event-custom", "file-flash", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-min.js b/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-min.js
deleted file mode 100644
index 66c161b2649..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("uploader-flash",function(e,t){function u(e){u.superclass.constructor.apply(this,arguments)}var n=e.substitute,r=e.Uploader.Queue,i=e.ClassNameManager.getClassName,s="uploader",o=i(s,"selectfiles-button");e.UploaderFlash=e.extend(u,e.Widget,{_buttonState:"up",_buttonFocus:!1,_swfContainerId:null,_swfReference:null,queue:null,_tabElementBindings:null,initializer:function(){this._swfContainerId=e.guid("uploader"),this._swfReference=null,this.queue=null,this._buttonState="up",this._buttonFocus=null,this._tabElementBindings=null,this._fileList=[],this.publish("fileselect"),this.publish("uploadstart"),this.publish("fileuploadstart"),this.publish("uploadprogress"),this.publish("totaluploadprogress"),this.publish("uploadcomplete"),this.publish("alluploadscomplete"),this.publish("uploaderror"),this.publish("mouseenter"),this.publish("mouseleave"),this.publish("mousedown"),this.publish("mouseup"),this.publish("click")},renderUI:function(){var t=this.get("boundingBox"),r=this.get("contentBox"),i=this.get("selectFilesButton");t.setStyle("position","relative"),i.setStyles({width:"100%",height:"100%"}),r.append(i),r.append(e.Node.create(n(u.FLASH_CONTAINER,{swfContainerId:this._swfContainerId})));var s=e.one("#"+this._swfContainerId),o={version:"10.0.45",fixedAttributes:{wmode:"transparent",allowScriptAccess:"always",allowNetworking:"all",scale:"noscale"}};this._swfReference=new e.SWF(s,this.get("swfURL"),o)},bindUI:function(){this._swfReference.on("swfReady",function(){this._setMultipleFiles(),this._setFileFilters(),this._triggerEnabled(),this._attachTabElements(),this.after("multipleFilesChange",this._setMultipleFiles,this),this.after("fileFiltersChange",this._setFileFilters,this),this.after("enabledChange",this._triggerEnabled,this),this.after("tabElementsChange",this._attachTabElements)},this),this._swfReference.on("fileselect",this._updateFileList,this),this._swfReference.on("mouseenter",function(){this.fire("mouseenter"),this._setButtonClass("hover",!0),this._buttonState=="down"&&this._setButtonClass("active",!0)},this),this._swfReference.on("mouseleave",function(){this.fire("mouseleave"),this._setButtonClass("hover",!1),this._setButtonClass("active",!1)},this),this._swfReference.on("mousedown",function(){this.fire("mousedown"),this._buttonState="down",this._setButtonClass("active",!0)},this),this._swfReference.on("mouseup",function(){this.fire("mouseup"),this._buttonState="up",this._setButtonClass("active",!1)},this),this._swfReference.on("click",function(){this.fire("click"),this._buttonFocus=!0,this._setButtonClass("focus",!0),e.one("body").focus(),this._swfReference._swf.focus()},this)},_attachTabElements:function(t){if(this.get("tabElements")!==null&&this.get("tabElements").from!==null&&this.get("tabElements").to!==null){this._tabElementBindings!==null?(this._tabElementBindings.from.detach(),this._tabElementBindings.to.detach(),this._tabElementBindings.tabback.detach(),this._tabElementBindings.tabforward.detach(),this._tabElementBindings.focus.detach(),this._tabElementBindings.blur.detach()):this._tabElementBindings={};var n=e.one(this.get("tabElements").from),r=e.one(this.get("tabElements").to);this._tabElementBindings.from=n.on("keydown",function(e){e.keyCode==9&&!e.shiftKey&&(e.preventDefault(),this._swfReference._swf.setAttribute("tabindex",0),this._swfReference._swf.setAttribute("role","button"),this._swfReference._swf.setAttribute("aria-label",this.get("selectButtonLabel")),this._swfReference._swf.focus())},this),this._tabElementBindings.to=r.on("keydown",function(e){e.keyCode==9&&e.shiftKey&&(e.preventDefault(),this._swfReference._swf.setAttribute("tabindex",0),this._swfReference._swf.setAttribute("role","button"),this._swfReference._swf.setAttribute("aria-label",this.get("selectButtonLabel")),this._swfReference._swf.focus())},this),this._tabElementBindings.tabback=this._swfReference.on("tabback",function(e){this._swfReference._swf.blur(),setTimeout(function(){n.focus()},30)},this),this._tabElementBindings.tabforward=this._swfReference.on("tabforward",function(e){this._swfReference._swf.blur(),setTimeout(function(){r.focus()},30)},this),this._tabElementBindings.focus=this._swfReference._swf.on("focus",function(e){this._buttonFocus=!0,this._setButtonClass("focus",!0)},this),this._tabElementBindings.blur=this._swfReference._swf.on("blur",function(e){this._buttonFocus=!1,this._setButtonClass("focus",!1)},this)}else this._tabElementBindings!==null&&(this._tabElementBindings.from.detach(),this._tabElementBindings.to.detach(),this._tabElementBindings.tabback.detach(),this._tabElementBindings.tabforward.detach(),this._tabElementBindings.focus.detach(),this._tabElementBindings.blur.detach())},_setButtonClass:function(e,t){t?this.get("selectFilesButton").addClass(this.get("buttonClassNames")[e]):this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[e])},_setFileFilters:function(){this._swfReference&&this.get("fileFilters").length>0&&this._swfReference.callSWF("setFileFilters",[this.get("fileFilters")])},_setMultipleFiles:function(){this._swfReference&&this._swfReference.callSWF("setAllowMultipleFiles",[this.get("multipleFiles")])},_triggerEnabled:function(){this.get("enabled")?(this._swfReference.callSWF("enable"),this._swfReference._swf.setAttribute("aria-disabled","false"),this._setButtonClass("disabled",!1)):(this._swfReference.callSWF("disable"),this._swfReference._swf.setAttribute("aria-disabled","true"),this._setButtonClass("disabled",!0))},_getFileList:function(e){return this._fileList.concat()},_setFileList:function(e){return this._fileList=e.concat(),this._fileList.concat()},_updateFileList:function(t){e.one("body").focus(),this._swfReference._swf.focus();var n=t.fileList,r=[],i=[],s=this._swfReference,o=this.get("fileFilterFunction");e.each(n,function(e){var t={};t.id=e.fileId,t.name=e.fileReference.name,t.size=e.fileReference.size,t.type=e.fileReference.type,t.dateCreated=e.fileReference.creationDate,t.dateModified=e.fileReference.modificationDate,t.uploader=s,r.push(t)}),o?e.each(r,function(t){var n=new e.FileFlash(t);o(n)&&i.push(n)}):e.each(r,function(t){i.push(new e.FileFlash(t))});if(i.length>0){var u=this.get("fileList");this.set("fileList",this.get("appendNewFiles")?u.concat(i):i),this.fire("fileselect",{fileList:i})}},_uploadEventHandler:function(e){switch(e.type){case"file:uploadstart":this.fire("fileuploadstart",e);break;case"file:uploadprogress":this.fire("uploadprogress",e);break;case"uploaderqueue:totaluploadprogress":this.fire("totaluploadprogress",e);break;case"file:uploadcomplete":this.fire("uploadcomplete",e);break;case"uploaderqueue:alluploadscomplete":this.queue=null,this.fire("alluploadscomplete",e);break;case"file:uploaderror":case"uploaderqueue:uploaderror":this.fire("uploaderror",e);break;case"file:uploadcancel":case"uploaderqueue:uploadcancel":this.fire("uploadcancel",e)}},upload:function(t,n,r){var i=n||this.get("uploadURL"),s=r||this.get("postVarsPerFile"),o=t.get("id");s=s.hasOwnProperty(o)?s[o]:s,t instanceof e.FileFlash&&(t.on("uploadstart",this._uploadEventHandler,this),t.on("uploadprogress",this._uploadEventHandler,this),t.on("uploadcomplete",this._uploadEventHandler,this),t.on("uploaderror",this._uploadEventHandler,this),t.on("uploadcancel",this._uploadEventHandler,this),t.startUpload(i,s,this.get("fileFieldName")))},uploadAll:function(e,t){this.uploadThese(this.get("fileList"),e,t)},uploadThese:function(e,t,n){if(!this.queue){var i=t||this.get("uploadURL"),s=n||this.get("postVarsPerFile");this.queue=new r({simUploads:this.get("simLimit"),errorAction:this.get("errorAction"),fileFieldName:this.get("fileFieldName"),fileList:e,uploadURL:i,perFileParameters:s,retryCount:this.get("retryCount")}),this.queue.on("uploadstart",this._uploadEventHandler,this),this.queue.on("uploadprogress",this._uploadEventHandler,this),this.queue.on("totaluploadprogress",this._uploadEventHandler,this),this.queue.on("uploadcomplete",this._uploadEventHandler,this),this.queue.on("alluploadscomplete",this._uploadEventHandler,this),this.queue.on("alluploadscancelled",function(e){this.queue=null},this),this.queue.on("uploaderror",this._uploadEventHandler,this),this.queue.startUpload(),this.fire("uploadstart")}}},{FLASH_CONTAINER:"",SELECT_FILES_BUTTON:"",TYPE:"flash",NAME:"uploader",ATTRS:{appendNewFiles:{value:!0},buttonClassNames:{value:{hover:"yui3-button-hover",active:"yui3-button-active",disabled:"yui3-button-disabled",focus:"yui3-button-selected"}},enabled:{value:!0},errorAction:{value:"continue",validator:function(e,t){return e===r.CONTINUE||e===r.STOP||e===r.RESTART_ASAP||e===r.RESTART_AFTER}},fileFilters:{value:[]},fileFilterFunction:{value:null},fileFieldName:{value:"Filedata"},fileList:{value:[],getter:"_getFileList",setter:"_setFileList"},multipleFiles:{value:!1},postVarsPerFile:{value:{}},selectButtonLabel:{value:"Select Files"},selectFilesButton:{valueFn:function(){return e.Node.create(n(e.UploaderFlash.SELECT_FILES_BUTTON,{selectButtonLabel:this.get("selectButtonLabel")}))}},simLimit:{value:2,validator:function(e,t){return e>=2&&e<=5}},swfURL:{valueFn:function(){var t=e.Env.cdn+"uploader/assets/flashuploader.swf";return e.UA.ie>0?t+"?t="+e.guid("uploader"):t}},tabElements:{value:null},uploadURL:{value:""},retryCount:{value:3}}}),e.UploaderFlash.Queue=r},"3.7.3",{requires:["swf","widget","substitute","base","cssbutton","node","event-custom","file-flash","uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash.js b/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash.js
deleted file mode 100644
index 694c950152e..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-flash/uploader-flash.js
+++ /dev/null
@@ -1,1041 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader-flash', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * Flash as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, file filtering, server response retrieval and error reporting.
- *
- * @module uploader-flash
- */
-
-// Shorthands for external modules
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue,
- getCN = Y.ClassNameManager.getClassName,
- UPLOADER = 'uploader',
- SELECT_FILES = getCN(UPLOADER, 'selectfiles-button');
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability
- * using Flash as a transport engine.
- * @class UploaderFlash
- * @extends Widget
- * @constructor
- * @param {Object} config Configuration object.
- */
-
-function UploaderFlash(config) {
- UploaderFlash.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-Y.UploaderFlash = Y.extend(UploaderFlash, Y.Widget, {
-
- /**
- * Stored value of the current button state (based on
- * mouse events dispatched by the Flash player)
- * @property _buttonState
- * @type {String}
- * @protected
- */
- _buttonState: "up",
-
- /**
- * Stored value of the current button focus state (based
- * on keyboard and mouse events).
- * @property _buttonFocus
- * @type {Boolean}
- * @protected
- */
- _buttonFocus: false,
-
- /**
- * Stored value of the unique id for the container that holds the
- * Flash uploader.
- *
- * @property _swfContainerId
- * @type {String}
- * @protected
- */
- _swfContainerId: null,
-
- /**
- * Stored reference to the instance of SWF used to host the
- * Flash uploader.
- *
- * @property _swfReference
- * @type {SWF}
- * @protected
- */
- _swfReference: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- /**
- * Stored event bindings for keyboard navigation to and from the uploader.
- *
- * @property _tabElementBindings
- * @type {Object}
- * @protected
- */
- _tabElementBindings: null,
-
-
-/**
- * Construction logic executed during UploaderFlash instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- // Assign protected variable values
- this._swfContainerId = Y.guid("uploader");
- this._swfReference = null;
- this.queue = null;
- this._buttonState = "up";
- this._buttonFocus = null;
- this._tabElementBindings = null;
- this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- this.publish("uploaderror");
-
- /**
- * Signals that a mouse has begun hovering over the `Select Files` button.
- *
- * @event mouseenter
- * @param event {Event} The event object for the `mouseenter` event.
- */
- this.publish("mouseenter");
-
- /**
- * Signals that a mouse has stopped hovering over the `Select Files` button.
- *
- * @event mouseleave
- * @param event {Event} The event object for the `mouseleave` event.
- */
- this.publish("mouseleave");
-
- /**
- * Signals that a mouse button has been pressed over the `Select Files` button.
- *
- * @event mousedown
- * @param event {Event} The event object for the `mousedown` event.
- */
- this.publish("mousedown");
-
- /**
- * Signals that a mouse button has been released over the `Select Files` button.
- *
- * @event mouseup
- * @param event {Event} The event object for the `mouseup` event.
- */
- this.publish("mouseup");
-
- /**
- * Signals that a mouse has been clicked over the `Select Files` button.
- *
- * @event click
- * @param event {Event} The event object for the `click` event.
- */
- this.publish("click");
- },
-
- /**
- * Creates the DOM structure for the UploaderFlash.
- * UploaderFlash's DOM structure consists of two layers: the base "Select Files"
- * button that can be replaced by the developer's widget of choice; and a transparent
- * Flash overlay positoned above the button that captures all input events.
- * The `position` style attribute of the `boundingBox` of the `Uploader` widget
- * is forced to be `relative`, in order to accommodate the Flash player overlay
- * (which is `position`ed `absolute`ly).
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selFilesButton = this.get("selectFilesButton");
-
- boundingBox.setStyle("position", "relative");
- selFilesButton.setStyles({width: "100%", height: "100%"});
- contentBox.append(selFilesButton);
- contentBox.append(Y.Node.create(substitute(UploaderFlash.FLASH_CONTAINER,
- {swfContainerId: this._swfContainerId})));
- var flashContainer = Y.one("#" + this._swfContainerId);
- var params = {version: "10.0.45",
- fixedAttributes: {wmode: "transparent",
- allowScriptAccess:"always",
- allowNetworking:"all",
- scale: "noscale"
- }
- };
- this._swfReference = new Y.SWF(flashContainer, this.get("swfURL"), params);
- },
-
- /**
- * Binds handlers to the UploaderFlash UI events and propagates attribute
- * values to the Flash player.
- * The propagation of initial values is set to occur once the Flash player
- * instance is ready (as indicated by the `swfReady` event.)
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- this._swfReference.on("swfReady", function () {
- this._setMultipleFiles();
- this._setFileFilters();
- this._triggerEnabled();
- this._attachTabElements();
- this.after("multipleFilesChange", this._setMultipleFiles, this);
- this.after("fileFiltersChange", this._setFileFilters, this);
- this.after("enabledChange", this._triggerEnabled, this);
- this.after("tabElementsChange", this._attachTabElements);
- }, this);
-
- this._swfReference.on("fileselect", this._updateFileList, this);
-
-
-
- // this._swfReference.on("trace", function (ev) {console.log(ev.message);});
-
- this._swfReference.on("mouseenter", function () {
- this.fire("mouseenter");
- this._setButtonClass("hover", true);
- if (this._buttonState == "down") {
- this._setButtonClass("active", true);
- }
- }, this);
- this._swfReference.on("mouseleave", function () {
- this.fire("mouseleave");
- this._setButtonClass("hover", false);
- this._setButtonClass("active", false);
-
- }, this);
- this._swfReference.on("mousedown", function () {
- this.fire("mousedown");
- this._buttonState = "down";
- this._setButtonClass("active", true);
- }, this);
- this._swfReference.on("mouseup", function () {
- this.fire("mouseup");
- this._buttonState = "up";
- this._setButtonClass("active", false);
- }, this);
- this._swfReference.on("click", function () {
- this.fire("click");
- this._buttonFocus = true;
- this._setButtonClass("focus", true);
- Y.one("body").focus();
- this._swfReference._swf.focus();
- }, this);
- },
-
- /**
- * Attaches keyboard bindings to enabling tabbing to and from the instance of the Flash
- * player in the Uploader widget. If the previous and next elements are specified, the
- * keyboard bindings enable the user to tab from the `tabElements["from"]` node to the
- * Flash-powered "Select Files" button, and to the `tabElements["to"]` node.
- *
- * @method _attachTabElements
- * @protected
- * @param ev {Event} Optional event payload if called as a `tabElementsChange` handler.
- */
- _attachTabElements : function (ev) {
- if (this.get("tabElements") !== null && this.get("tabElements").from !== null && this.get("tabElements").to !== null) {
-
- if (this._tabElementBindings !== null) {
- this._tabElementBindings.from.detach();
- this._tabElementBindings.to.detach();
- this._tabElementBindings.tabback.detach();
- this._tabElementBindings.tabforward.detach();
- this._tabElementBindings.focus.detach();
- this._tabElementBindings.blur.detach();
- }
- else {
- this._tabElementBindings = {};
- }
-
- var fromElement = Y.one(this.get("tabElements").from);
- var toElement = Y.one(this.get("tabElements").to);
-
-
- this._tabElementBindings.from = fromElement.on("keydown", function (ev) {
- if (ev.keyCode == 9 && !ev.shiftKey) {
- ev.preventDefault();
- this._swfReference._swf.setAttribute("tabindex", 0);
- this._swfReference._swf.setAttribute("role", "button");
- this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- this._swfReference._swf.focus();
- }
- }, this);
- this._tabElementBindings.to = toElement.on("keydown", function (ev) {
- if (ev.keyCode == 9 && ev.shiftKey) {
- ev.preventDefault();
- this._swfReference._swf.setAttribute("tabindex", 0);
- this._swfReference._swf.setAttribute("role", "button");
- this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
- this._swfReference._swf.focus();
- }
- }, this);
- this._tabElementBindings.tabback = this._swfReference.on("tabback", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {fromElement.focus();}, 30);}, this);
- this._tabElementBindings.tabforward = this._swfReference.on("tabforward", function (ev) {this._swfReference._swf.blur(); setTimeout(function () {toElement.focus();}, 30);}, this);
-
- this._tabElementBindings.focus = this._swfReference._swf.on("focus", function (ev) {this._buttonFocus = true; this._setButtonClass("focus", true);}, this);
- this._tabElementBindings.blur = this._swfReference._swf.on("blur", function (ev) {this._buttonFocus = false; this._setButtonClass("focus", false);}, this);
- }
- else if (this._tabElementBindings !== null) {
- this._tabElementBindings.from.detach();
- this._tabElementBindings.to.detach();
- this._tabElementBindings.tabback.detach();
- this._tabElementBindings.tabforward.detach();
- this._tabElementBindings.focus.detach();
- this._tabElementBindings.blur.detach();
- }
- },
-
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- if (add) {
- this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
-
- /**
- * Syncs the state of the `fileFilters` attribute between the instance of UploaderFlash
- * and the Flash player.
- *
- * @method _setFileFilters
- * @private
- */
- _setFileFilters : function () {
- if (this._swfReference && this.get("fileFilters").length > 0) {
- this._swfReference.callSWF("setFileFilters", [this.get("fileFilters")]);
- }
-
- },
-
-
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the Flash uploader.
- *
- * @method _setMultipleFiles
- * @private
- */
- _setMultipleFiles : function () {
- if (this._swfReference) {
- this._swfReference.callSWF("setAllowMultipleFiles", [this.get("multipleFiles")]);
- }
- },
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the Flash uploader.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- if (this.get("enabled")) {
- this._swfReference.callSWF("enable");
- this._swfReference._swf.setAttribute("aria-disabled", "false");
- this._setButtonClass("disabled", false);
- }
- else {
- this._swfReference.callSWF("disable");
- this._swfReference._swf.setAttribute("aria-disabled", "true");
- this._setButtonClass("disabled", true);
- }
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- this._fileList = val.concat();
- return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @private
- */
- _updateFileList : function (ev) {
-
- Y.one("body").focus();
- this._swfReference._swf.focus();
-
-
- var newfiles = ev.fileList,
- fileConfObjects = [],
- parsedFiles = [],
- swfRef = this._swfReference,
- filterFunc = this.get("fileFilterFunction");
-
- Y.each(newfiles, function (value) {
- var newFileConf = {};
- newFileConf.id = value.fileId;
- newFileConf.name = value.fileReference.name;
- newFileConf.size = value.fileReference.size;
- newFileConf.type = value.fileReference.type;
- newFileConf.dateCreated = value.fileReference.creationDate;
- newFileConf.dateModified = value.fileReference.modificationDate;
- newFileConf.uploader = swfRef;
-
- fileConfObjects.push(newFileConf);
- });
-
- if (filterFunc) {
- Y.each(fileConfObjects, function (value) {
- var newfile = new Y.FileFlash(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(fileConfObjects, function (value) {
- parsedFiles.push(new Y.FileFlash(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
-
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- },
-
-
-
- /**
- * Handles and retransmits events fired by `Y.FileFlash` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadEventHandler : function (event) {
-
- switch (event.type) {
- case "file:uploadstart":
- this.fire("fileuploadstart", event);
- break;
- case "file:uploadprogress":
- this.fire("uploadprogress", event);
- break;
- case "uploaderqueue:totaluploadprogress":
- this.fire("totaluploadprogress", event);
- break;
- case "file:uploadcomplete":
- this.fire("uploadcomplete", event);
- break;
- case "uploaderqueue:alluploadscomplete":
- this.queue = null;
- this.fire("alluploadscomplete", event);
- break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- this.fire("uploaderror", event);
- break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- this.fire("uploadcancel", event);
- break;
- }
-
- },
-
-
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.FileFlash} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
-
- upload : function (file, url, postvars) {
-
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- if (file instanceof Y.FileFlash) {
-
- file.on("uploadstart", this._uploadEventHandler, this);
- file.on("uploadprogress", this._uploadEventHandler, this);
- file.on("uploadcomplete", this._uploadEventHandler, this);
- file.on("uploaderror", this._uploadEventHandler, this);
- file.on("uploadcancel", this._uploadEventHandler, this);
-
- file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- if (!this.queue) {
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount")
- });
- this.queue.on("uploadstart", this._uploadEventHandler, this);
- this.queue.on("uploadprogress", this._uploadEventHandler, this);
- this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscancelled", function (ev) {this.queue = null;}, this);
- this.queue.on("uploaderror", this._uploadEventHandler, this);
- this.queue.startUpload();
-
- this.fire("uploadstart");
- }
- }
-},
-
-{
- /**
- * The template for the Flash player container. Since the Flash player container needs
- * to completely overlay the &lquot;Select Files&rqot; control, it's positioned absolutely,
- * with width and height set to 100% of the parent.
- *
- * @property FLASH_CONTAINER
- * @type {String}
- * @static
- * @default ""
- */
- FLASH_CONTAINER: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderFlash value is `"flash"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "flash",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the mouse states reported by the
- * Flash player. The keys for the class names are:
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default { hover: "yui3-button-hover",
- * active: "yui3-button-active",
- * disabled: "yui3-button-disabled",
- * focus: "yui3-button-selected"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);
- }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be an object with
- * the following key-value pairs:
- * {
- * description : String
- extensions: String of the form &lquot;*.ext1;*.ext2;*.ext3;...&rquot;
- * }
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.FileFlash` and be instantiated with a `fileId`
- * retrieved from an instance of the uploader.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files" control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- return Y.Node.create(substitute(Y.UploaderFlash.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- return (val >= 2 && val <= 5);
- }
- },
-
- /**
- * The URL to the SWF file of the flash uploader. A copy local to
- * the server that hosts the page on which the uploader appears is
- * recommended.
- *
- * @attribute swfURL
- * @type {String}
- * @default "CDN Prefix + uploader/assets/flashuploader.swf" with a
- * random GET parameter for IE (to prevent buggy behavior when the SWF
- * is cached).
- */
- swfURL: {
- valueFn: function () {
- var prefix = Y.Env.cdn + "uploader/assets/flashuploader.swf";
-
- if (Y.UA.ie > 0) {
- return (prefix + "?t=" + Y.guid("uploader"));
- }
- return prefix;
- }
- },
-
- /**
- * The id's or `Node` references of the DOM elements that precede
- * and follow the `Select Files` button in the tab order. Specifying
- * these allows keyboard navigation to and from the Flash player
- * layer of the uploader.
- * The two keys corresponding to the DOM elements are:
-
- *
- * @attribute tabElements
- * @type {Object}
- * @default null
- */
- tabElements: {
- value: null
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-Y.UploaderFlash.Queue = UploaderQueue;
-
-
-
-
-}, '3.7.3', {"requires": ["swf", "widget", "substitute", "base", "cssbutton", "node", "event-custom", "file-flash", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-coverage.js b/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-coverage.js
deleted file mode 100644
index a70ccefe1c2..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-coverage.js
+++ /dev/null
@@ -1,1218 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
-}
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/uploader-html5/uploader-html5.js",
- code: []
-};
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"].code=["YUI.add('uploader-html5', function (Y, NAME) {","",""," /**"," * This module provides a UI for file selection and multiple file upload capability using"," * HTML5 XMLHTTPRequest Level 2 as a transport engine."," * The supported features include: automatic upload queue management, upload progress"," * tracking, drag-and-drop support, server response retrieval and error reporting."," *"," * @module uploader-html5"," */ ","","// Shorthands for the external modules","var substitute = Y.substitute,"," UploaderQueue = Y.Uploader.Queue;",""," /**"," * This module provides a UI for file selection and multiple file upload capability using"," * HTML5 XMLHTTPRequest Level 2 as a transport engine."," * @class UploaderHTML5"," * @extends Widget"," * @constructor"," */","","function UploaderHTML5(config) {"," UploaderHTML5.superclass.constructor.apply ( this, arguments );","}","","","","Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {",""," /**"," * Stored reference to the instance of the file input field used to "," * initiate the file selection dialog."," *"," * @property _fileInputField"," * @type {Node}"," * @protected"," */"," _fileInputField: null,",""," /**"," * Stored reference to the click event binding of the `Select Files`"," * button."," *"," * @property _buttonBinding"," * @type {EventHandle}"," * @protected"," */"," _buttonBinding: null,",""," /**"," * Stored reference to the instance of Uploader.Queue used to manage"," * the upload process. This is a read-only property that only exists"," * during an active upload process. Only one queue can be active at"," * a time; if an upload start is attempted while a queue is active,"," * it will be ignored."," *"," * @property queue"," * @type {Y.Uploader.Queue}"," */"," queue: null,",""," // Y.UploaderHTML5 prototype",""," /**"," * Construction logic executed during UploaderHTML5 instantiation."," *"," * @method initializer"," * @protected"," */"," initializer : function () {",""," this._fileInputField = null;"," this.queue = null;"," this._buttonBinding = null;"," this._fileList = [];",""," // Publish available events",""," /**"," * Signals that files have been selected. "," *"," * @event fileselect"," * @param event {Event} The event object for the `fileselect` with the"," * following payload:"," * "," *
"," */"," this.publish(\"fileselect\");",""," /**"," * Signals that an upload of multiple files has been started. "," *"," * @event uploadstart"," * @param event {Event} The event object for the `uploadstart`."," */"," this.publish(\"uploadstart\");",""," /**"," * Signals that an upload of a specific file has started. "," *"," * @event fileuploadstart"," * @param event {Event} The event object for the `fileuploadstart` with the"," * following payload:"," * "," *
"," */"," this.publish(\"fileuploadstart\");",""," /**"," * Reports on upload progress of a specific file. "," *"," * @event uploadprogress"," * @param event {Event} The event object for the `uploadprogress` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploadprogress\");",""," /**"," * Reports on the total upload progress of the file list. "," *"," * @event totaluploadprogress"," * @param event {Event} The event object for the `totaluploadprogress` with the"," * following payload:"," * "," *
"," */"," this.publish(\"totaluploadprogress\");",""," /**"," * Signals that a single file upload has been completed. "," *"," * @event uploadcomplete"," * @param event {Event} The event object for the `uploadcomplete` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploadcomplete\");",""," /**"," * Signals that the upload process of the entire file list has been completed. "," *"," * @event alluploadscomplete"," * @param event {Event} The event object for the `alluploadscomplete`."," */"," this.publish(\"alluploadscomplete\");",""," /**"," * Signals that a error has occurred in a specific file's upload process. "," *"," * @event uploaderror"," * @param event {Event} The event object for the `uploaderror` with the"," * following payload:"," * "," *
"," */"," this.publish(\"uploaderror\");",""," /**"," * Signals that a dragged object has entered into the uploader's associated drag-and-drop area. "," *"," * @event dragenter"," * @param event {Event} The event object for the `dragenter`."," */"," this.publish(\"dragenter\");",""," /**"," * Signals that an object has been dragged over the uploader's associated drag-and-drop area. "," *"," * @event dragover"," * @param event {Event} The event object for the `dragover`."," */"," this.publish(\"dragover\");",""," /**"," * Signals that an object has been dragged off of the uploader's associated drag-and-drop area. "," *"," * @event dragleave"," * @param event {Event} The event object for the `dragleave`."," */"," this.publish(\"dragleave\");",""," /**"," * Signals that an object has been dropped over the uploader's associated drag-and-drop area. "," *"," * @event drop"," * @param event {Event} The event object for the `drop`."," */"," this.publish(\"drop\");"," "," },",""," /**"," * Create the DOM structure for the UploaderHTML5."," * UploaderHTML5's DOM structure consists of a \"Select Files\" button that can "," * be replaced by the developer's widget of choice; and a hidden file input field"," * that is used to instantiate the File Select dialog."," *"," * @method renderUI"," * @protected"," */"," renderUI : function () {"," var boundingBox = this.get(\"boundingBox\"),"," contentBox = this.get('contentBox'),"," selButton = this.get(\"selectFilesButton\");",""," selButton.setStyles({width:\"100%\", height:\"100%\"});"," contentBox.append(selButton);"," this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);"," contentBox.append(this._fileInputField);"," },",""," /**"," * Binds to the UploaderHTML5 UI and subscribes to the necessary events."," *"," * @method bindUI"," * @protected"," */"," bindUI : function () {",""," this._bindSelectButton();"," this._setMultipleFiles();"," this._setFileFilters();"," this._bindDropArea();"," this._triggerEnabled();",""," this.after(\"multipleFilesChange\", this._setMultipleFiles, this);"," this.after(\"fileFiltersChange\", this._setFileFilters, this);"," this.after(\"enabledChange\", this._triggerEnabled, this);"," this.after(\"selectFilesButtonChange\", this._bindSelectButton, this);"," this.after(\"dragAndDropAreaChange\", this._bindDropArea, this);"," this.after(\"tabIndexChange\", function (ev) {this.get(\"selectFilesButton\").set(\"tabIndex\", this.get(\"tabIndex\"));}, this);"," this._fileInputField.on(\"change\", this._updateFileList, this);",""," this.get(\"selectFilesButton\").set(\"tabIndex\", this.get(\"tabIndex\"));"," },","",""," /**"," * Recreates the file field to null out the previous list of files and"," * thus allow for an identical file list selection."," * "," * @method _rebindFileField"," * @protected"," */"," _rebindFileField : function () {"," this._fileInputField.remove(true);"," this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);"," this.get(\"contentBox\").append(this._fileInputField);"," this._fileInputField.on(\"change\", this._updateFileList, this);"," this._setMultipleFiles();"," this._setFileFilters();"," },","",""," /**"," * Binds the specified drop area's drag and drop events to the"," * uploader's custom handler."," * "," * @method _bindDropArea"," * @protected"," */"," _bindDropArea : function (event) {"," var ev = event || {prevVal: null};",""," if (ev.prevVal !== null) {"," ev.prevVal.detach('drop', this._ddEventHandler);"," ev.prevVal.detach('dragenter', this._ddEventHandler);"," ev.prevVal.detach('dragover', this._ddEventHandler);"," ev.prevVal.detach('dragleave', this._ddEventHandler);"," }",""," var ddArea = this.get(\"dragAndDropArea\");",""," if (ddArea !== null) {"," ddArea.on('drop', this._ddEventHandler, this);"," ddArea.on('dragenter', this._ddEventHandler, this);"," ddArea.on('dragover', this._ddEventHandler, this);"," ddArea.on('dragleave', this._ddEventHandler, this);"," }"," },",""," /**"," * Binds the instantiation of the file select dialog to the current file select"," * control."," * "," * @method _bindSelectButton"," * @protected"," */"," _bindSelectButton : function () {"," this._buttonBinding = this.get(\"selectFilesButton\").on(\"click\", this.openFileSelectDialog, this);"," },",""," /**"," * Handles the drag and drop events from the uploader's specified drop"," * area."," * "," * @method _ddEventHandler"," * @protected"," */"," _ddEventHandler : function (event) {",""," event.stopPropagation();"," event.preventDefault(); "," "," switch (event.type) {"," case \"dragenter\":"," this.fire(\"dragenter\"); "," break;"," case \"dragover\":"," this.fire(\"dragover\");"," break;"," case \"dragleave\": "," this.fire(\"dragleave\");"," break;"," case \"drop\":",""," var newfiles = event._event.dataTransfer.files,"," parsedFiles = [],"," filterFunc = this.get(\"fileFilterFunction\");"," "," if (filterFunc) {"," Y.each(newfiles, function (value) {"," var newfile = new Y.FileHTML5(value);"," if (filterFunc(newfile)) {"," parsedFiles.push(newfile);"," }"," });"," }"," else {"," Y.each(newfiles, function (value) {"," parsedFiles.push(new Y.FileHTML5(value));"," });"," }",""," if (parsedFiles.length > 0) {"," var oldfiles = this.get(\"fileList\");"," this.set(\"fileList\", "," this.get(\"appendNewFiles\") ? oldfiles.concat(parsedFiles) : parsedFiles);"," this.fire(\"fileselect\", {fileList: parsedFiles});"," }",""," this.fire(\"drop\");"," break;"," }"," },",""," /**"," * Adds or removes a specified state CSS class to the underlying uploader button. "," *"," * @method _setButtonClass"," * @protected"," * @param state {String} The name of the state enumerated in `buttonClassNames` attribute"," * from which to derive the needed class name."," * @param add {Boolean} A Boolean indicating whether to add or remove the class."," */"," _setButtonClass : function (state, add) {"," if (add) {"," this.get(\"selectFilesButton\").addClass(this.get(\"buttonClassNames\")[state]);"," }"," else {"," this.get(\"selectFilesButton\").removeClass(this.get(\"buttonClassNames\")[state]);"," }"," },",""," /**"," * Syncs the state of the `multipleFiles` attribute between this class"," * and the file input field."," * "," * @method _setMultipleFiles"," * @protected"," */"," _setMultipleFiles : function () {"," if (this.get(\"multipleFiles\") === true) {"," this._fileInputField.set(\"multiple\", \"multiple\");"," }"," else {"," this._fileInputField.set(\"multiple\", \"\");"," }"," },",""," /**"," * Syncs the state of the `fileFilters` attribute between this class"," * and the file input field."," * "," * @method _setFileFilters"," * @protected"," */"," _setFileFilters : function () {"," if (this.get(\"fileFilters\").length > 0) {"," this._fileInputField.set(\"accept\", this.get(\"fileFilters\").join(\",\"));"," }"," else {"," this._fileInputField.set(\"accept\", \"\");"," }"," },","",""," /**"," * Syncs the state of the `enabled` attribute between this class"," * and the underlying button."," * "," * @method _triggerEnabled"," * @private"," */"," _triggerEnabled : function () {"," if (this.get(\"enabled\") && this._buttonBinding === null) {"," this._bindSelectButton();"," this._setButtonClass(\"disabled\", false);"," this.get(\"selectFilesButton\").setAttribute(\"aria-disabled\", \"false\");"," }"," else if (!this.get(\"enabled\") && this._buttonBinding) {"," this._buttonBinding.detach();"," this._buttonBinding = null;"," this._setButtonClass(\"disabled\", true);"," this.get(\"selectFilesButton\").setAttribute(\"aria-disabled\", \"true\");"," }"," },",""," /**"," * Getter for the `fileList` attribute"," * "," * @method _getFileList"," * @private"," */"," _getFileList : function (arr) {"," return this._fileList.concat();"," },",""," /**"," * Setter for the `fileList` attribute"," * "," * @method _setFileList"," * @private"," */"," _setFileList : function (val) {"," this._fileList = val.concat();"," return this._fileList.concat();"," },",""," /**"," * Adjusts the content of the `fileList` based on the results of file selection"," * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,"," * then selected files are appended to the existing list; otherwise, the list is"," * cleared and populated with the newly selected files."," * "," * @method _updateFileList"," * @param ev {Event} The file selection event received from the uploader."," * @protected"," */"," _updateFileList : function (ev) {"," var newfiles = ev.target.getDOMNode().files,"," parsedFiles = [],"," filterFunc = this.get(\"fileFilterFunction\");",""," if (filterFunc) {"," Y.each(newfiles, function (value) {"," var newfile = new Y.FileHTML5(value);"," if (filterFunc(newfile)) {"," parsedFiles.push(newfile);"," }"," });"," }"," else {"," Y.each(newfiles, function (value) {"," parsedFiles.push(new Y.FileHTML5(value));"," });"," }",""," if (parsedFiles.length > 0) {"," var oldfiles = this.get(\"fileList\");",""," this.set(\"fileList\", "," this.get(\"appendNewFiles\") ? oldfiles.concat(parsedFiles) : parsedFiles );",""," this.fire(\"fileselect\", {fileList: parsedFiles});"," }",""," this._rebindFileField();"," },","",""," /**"," * Handles and retransmits events fired by `Y.File` and `Y.Uploader.Queue`."," * "," * @method _uploadEventHandler"," * @param event The event dispatched during the upload process."," * @protected"," */"," _uploadEventHandler : function (event) {"," "," switch (event.type) {"," case \"file:uploadstart\":"," this.fire(\"fileuploadstart\", event);"," break;"," case \"file:uploadprogress\":"," this.fire(\"uploadprogress\", event);"," break;"," case \"uploaderqueue:totaluploadprogress\":"," this.fire(\"totaluploadprogress\", event);"," break;"," case \"file:uploadcomplete\":"," this.fire(\"uploadcomplete\", event);"," break;"," case \"uploaderqueue:alluploadscomplete\":"," this.queue = null;"," this.fire(\"alluploadscomplete\", event);"," break;"," case \"file:uploaderror\":"," case \"uploaderqueue:uploaderror\":"," this.fire(\"uploaderror\", event);"," break;"," case \"file:uploadcancel\":"," case \"uploaderqueue:uploadcancel\":"," this.fire(\"uploadcancel\", event);"," break;"," } ",""," },",""," /**"," * Opens the File Selection dialog by simulating a click on the file input field."," * "," * @method openFileSelectDialog"," */"," openFileSelectDialog : function () {"," var fileDomNode = this._fileInputField.getDOMNode();"," if (fileDomNode.click) {"," fileDomNode.click();"," } "," },",""," /**"," * Starts the upload of a specific file."," *"," * @method upload"," * @param file {Y.File} Reference to the instance of the file to be uploaded."," * @param url {String} The URL to upload the file to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */"," upload : function (file, url, postvars) {"," "," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\"),"," fileId = file.get(\"id\");",""," postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;",""," if (file instanceof Y.FileHTML5) {"," "," file.on(\"uploadstart\", this._uploadEventHandler, this);"," file.on(\"uploadprogress\", this._uploadEventHandler, this);"," file.on(\"uploadcomplete\", this._uploadEventHandler, this);"," file.on(\"uploaderror\", this._uploadEventHandler, this);"," file.on(\"uploadcancel\", this._uploadEventHandler, this);",""," file.startUpload(uploadURL, postVars, this.get(\"fileFieldName\"));"," }"," },",""," /**"," * Starts the upload of all files on the file list, using an automated queue."," *"," * @method uploadAll"," * @param url {String} The URL to upload the files to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */"," uploadAll : function (url, postvars) {"," this.uploadThese(this.get(\"fileList\"), url, postvars);"," },",""," /**"," * Starts the upload of the files specified in the first argument, using an automated queue."," *"," * @method uploadThese"," * @param files {Array} The list of files to upload."," * @param url {String} The URL to upload the files to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead. "," */"," uploadThese : function (files, url, postvars) {"," if (!this.queue) {"," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\");",""," this.queue = new UploaderQueue({simUploads: this.get(\"simLimit\"), "," errorAction: this.get(\"errorAction\"),"," fileFieldName: this.get(\"fileFieldName\"),"," fileList: files,"," uploadURL: uploadURL,"," perFileParameters: postVars,"," retryCount: this.get(\"retryCount\"),"," uploadHeaders: this.get(\"uploadHeaders\"),"," withCredentials: this.get(\"withCredentials\")"," });"," this.queue.on(\"uploadstart\", this._uploadEventHandler, this);"," this.queue.on(\"uploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"totaluploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"uploadcomplete\", this._uploadEventHandler, this);"," this.queue.on(\"alluploadscomplete\", this._uploadEventHandler, this);"," this.queue.on(\"uploadcancel\", this._uploadEventHandler, this);"," this.queue.on(\"uploaderror\", this._uploadEventHandler, this);"," this.queue.startUpload(); "," "," this.fire(\"uploadstart\"); "," }"," else if (this.queue._currentState === UploaderQueue.UPLOADING) {"," this.queue.set(\"perFileParameters\", this.get(\"postVarsPerFile\"));"," Y.each(files, function (file) {"," this.queue.addToQueueBottom(file);"," }, this);"," }"," }","},","","{"," /**"," * The template for the hidden file input field container. The file input field will only"," * accept clicks if its visibility is set to hidden (and will not if it's `display` value"," * is set to `none`)"," *"," * @property HTML5FILEFIELD_TEMPLATE"," * @type {String}"," * @static"," */"," HTML5FILEFIELD_TEMPLATE: \"\","," "," /**"," * The template for the \"Select Files\" button."," *"," * @property SELECT_FILES_BUTTON"," * @type {String}"," * @static"," * @default \"\""," */ "," SELECT_FILES_BUTTON: \"\",",""," /**"," * The static property reflecting the type of uploader that `Y.Uploader`"," * aliases. The UploaderHTML5 value is `\"html5\"`."," * "," * @property TYPE"," * @type {String}"," * @static"," */"," TYPE: \"html5\",",""," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'uploader'"," * @readOnly"," * @protected"," * @static"," */"," NAME: \"uploader\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {",""," /**"," * A Boolean indicating whether newly selected files should be appended "," * to the existing file list, or whether they should replace it."," *"," * @attribute appendNewFiles"," * @type {Boolean}"," * @default true"," */"," appendNewFiles : {"," value: true"," },",""," /**"," * The names of CSS classes that correspond to different button states"," * of the \"Select Files\" control. These classes are assigned to the "," * \"Select Files\" control based on the configuration of the uploader."," * Currently, the only class name used is that corresponding to the "," * `disabled` state of the uploader. Other button states should be managed"," * directly via CSS selectors."," * "," *
"," * @attribute buttonClassNames"," * @type {Object}"," * @default {"," * disabled: \"yui3-button-disabled\""," * }"," */"," buttonClassNames: {"," value: {"," \"hover\": \"yui3-button-hover\","," \"active\": \"yui3-button-active\","," \"disabled\": \"yui3-button-disabled\","," \"focus\": \"yui3-button-selected\""," }"," },",""," /**"," * The node that serves as the drop target for files."," *"," * @attribute dragAndDropArea"," * @type {Node}"," * @default null"," */"," dragAndDropArea: {"," value: null,"," setter: function (val) {"," return Y.one(val);"," }"," },",""," /**"," * A Boolean indicating whether the uploader is enabled or disabled for user input."," *"," * @attribute enabled"," * @type {Boolean}"," * @default true"," */"," enabled : {"," value: true"," },",""," /**"," * The action performed when an upload error occurs for a specific file being uploaded."," * The possible values are: "," * "," *
"," * @attribute errorAction"," * @type {String}"," * @default UploaderQueue.CONTINUE"," */"," errorAction: {"," value: \"continue\","," validator: function (val, name) {"," return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER); }"," },",""," /**"," * An array indicating what fileFilters should be applied to the file"," * selection dialog. Each element in the array should be a string"," * indicating the Media (MIME) type for the files that should be supported"," * for selection. The Media type strings should be properly formatted"," * or this parameter will be ignored. Examples of valid strings include: "," * \"audio/*\", \"video/*\", \"application/pdf\", etc. More information"," * on valid Media type strings is available here: "," * http://www.iana.org/assignments/media-types/index.html"," * @attribute fileFilters"," * @type {Array}"," * @default []"," */"," fileFilters: {"," value: []"," },",""," /**"," * A filtering function that is applied to every file selected by the user."," * The function receives the `Y.File` object and must return a Boolean value."," * If a `false` value is returned, the file in question is not added to the"," * list of files to be uploaded."," * Use this function to put limits on file sizes or check the file names for"," * correct extension, but make sure that a server-side check is also performed,"," * since any client-side restrictions are only advisory and can be circumvented."," *"," * @attribute fileFilterFunction"," * @type {Function}"," * @default null"," */"," fileFilterFunction: {"," value: null"," },",""," /**"," * A String specifying what should be the POST field name for the file"," * content in the upload request."," *"," * @attribute fileFieldName"," * @type {String}"," * @default Filedata"," */"," fileFieldName: {"," value: \"Filedata\" "," },",""," /**"," * The array of files to be uploaded. All elements in the array"," * must be instances of `Y.File` and be instantiated with an instance"," * of native JavaScript File() class."," *"," * @attribute fileList"," * @type {Array}"," * @default []"," */"," fileList: {"," value: [],"," getter: \"_getFileList\","," setter: \"_setFileList\""," },",""," /**"," * A Boolean indicating whether multiple file selection is enabled."," *"," * @attribute multipleFiles"," * @type {Boolean}"," * @default false"," */"," multipleFiles: {"," value: false"," },",""," /**"," * An object, keyed by `fileId`, containing sets of key-value pairs"," * that should be passed as POST variables along with each corresponding"," * file. This attribute is only used if no POST variables are specifed"," * in the upload method call."," *"," * @attribute postVarsPerFile"," * @type {Object}"," * @default {}"," */"," postVarsPerFile: {"," value: {}"," },",""," /**"," * The label for the \"Select Files\" widget. This is the value that replaces the"," * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template."," * "," * @attribute selectButtonLabel"," * @type {String}"," * @default \"Select Files\""," */"," selectButtonLabel: {"," value: \"Select Files\""," },",""," /**"," * The widget that serves as the \"Select Files control for the file uploader"," * "," *"," * @attribute selectFilesButton"," * @type {Node | Widget}"," * @default A standard HTML button with YUI CSS Button skin."," */"," selectFilesButton : {"," valueFn: function () {"," return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON, {selectButtonLabel: this.get(\"selectButtonLabel\"),"," tabIndex: this.get(\"tabIndex\")}));"," }"," },",""," /**"," * The number of files that can be uploaded"," * simultaneously if the automatic queue management"," * is used. This value can be in the range between 2"," * and 5."," *"," * @attribute simLimit"," * @type {Number}"," * @default 2"," */"," simLimit: {"," value: 2,"," validator: function (val, name) {"," return (val >= 1 && val <= 5);"," }"," },",""," /**"," * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call."," *"," * @attribute uploadURL"," * @type {String}"," * @default \"\""," */"," uploadURL: {"," value: \"\""," },",""," /**"," * Additional HTTP headers that should be included"," * in the upload request."," *"," *"," * @attribute uploadHeaders"," * @type {Object}"," * @default {}"," */ "," uploadHeaders: {"," value: {}"," },",""," /**"," * A Boolean that specifies whether the file should be"," * uploaded with the appropriate user credentials for the"," * domain. "," *"," * @attribute withCredentials"," * @type {Boolean}"," * @default true"," */ "," withCredentials: {"," value: true"," },",""," /**"," * The number of times to try re-uploading a file that failed to upload before"," * cancelling its upload."," *"," * @attribute retryCount"," * @type {Number}"," * @default 3"," */ "," retryCount: {"," value: 3"," }"," }","});","","Y.UploaderHTML5.Queue = UploaderQueue;","","","","}, '3.7.3', {\"requires\": [\"widget\", \"node-event-simulate\", \"substitute\", \"file-html5\", \"uploader-queue\"]});"];
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"].lines = {"1":0,"14":0,"25":0,"26":0,"31":0,"75":0,"76":0,"77":0,"78":0,"94":0,"102":0,"117":0,"138":0,"155":0,"172":0,"180":0,"199":0,"207":0,"215":0,"223":0,"231":0,"245":0,"249":0,"250":0,"251":0,"252":0,"263":0,"264":0,"265":0,"266":0,"267":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"277":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"306":0,"308":0,"309":0,"310":0,"311":0,"312":0,"315":0,"317":0,"318":0,"319":0,"320":0,"321":0,"333":0,"345":0,"346":0,"348":0,"350":0,"351":0,"353":0,"354":0,"356":0,"357":0,"360":0,"364":0,"365":0,"366":0,"367":0,"368":0,"373":0,"374":0,"378":0,"379":0,"380":0,"382":0,"385":0,"386":0,"400":0,"401":0,"404":0,"416":0,"417":0,"420":0,"432":0,"433":0,"436":0,"449":0,"450":0,"451":0,"452":0,"454":0,"455":0,"456":0,"457":0,"458":0,"469":0,"479":0,"480":0,"494":0,"498":0,"499":0,"500":0,"501":0,"502":0,"507":0,"508":0,"512":0,"513":0,"515":0,"518":0,"521":0,"534":0,"536":0,"537":0,"539":0,"540":0,"542":0,"543":0,"545":0,"546":0,"548":0,"549":0,"550":0,"553":0,"554":0,"557":0,"558":0,"569":0,"570":0,"571":0,"586":0,"590":0,"592":0,"594":0,"595":0,"596":0,"597":0,"598":0,"600":0,"613":0,"626":0,"627":0,"630":0,"640":0,"641":0,"642":0,"643":0,"644":0,"645":0,"646":0,"647":0,"649":0,"651":0,"652":0,"653":0,"654":0,"763":0,"795":0,"906":0,"924":0,"979":0};
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"].functions = {"UploaderHTML5:25":0,"initializer:73":0,"renderUI:244":0,"(anonymous 2):274":0,"bindUI:261":0,"_rebindFileField:288":0,"_bindDropArea:305":0,"_bindSelectButton:332":0,"(anonymous 3):365":0,"(anonymous 4):373":0,"_ddEventHandler:343":0,"_setButtonClass:399":0,"_setMultipleFiles:415":0,"_setFileFilters:431":0,"_triggerEnabled:448":0,"_getFileList:468":0,"_setFileList:478":0,"(anonymous 5):499":0,"(anonymous 6):507":0,"_updateFileList:493":0,"_uploadEventHandler:532":0,"openFileSelectDialog:568":0,"upload:584":0,"uploadAll:612":0,"(anonymous 7):653":0,"uploadThese:625":0,"setter:762":0,"validator:794":0,"valueFn:905":0,"validator:923":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"].coveredLines = 165;
-_yuitest_coverage["build/uploader-html5/uploader-html5.js"].coveredFunctions = 31;
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 1);
-YUI.add('uploader-html5', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, drag-and-drop support, server response retrieval and error reporting.
- *
- * @module uploader-html5
- */
-
-// Shorthands for the external modules
-_yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 14);
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue;
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * @class UploaderHTML5
- * @extends Widget
- * @constructor
- */
-
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 25);
-function UploaderHTML5(config) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "UploaderHTML5", 25);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 26);
-UploaderHTML5.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 31);
-Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {
-
- /**
- * Stored reference to the instance of the file input field used to
- * initiate the file selection dialog.
- *
- * @property _fileInputField
- * @type {Node}
- * @protected
- */
- _fileInputField: null,
-
- /**
- * Stored reference to the click event binding of the `Select Files`
- * button.
- *
- * @property _buttonBinding
- * @type {EventHandle}
- * @protected
- */
- _buttonBinding: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- // Y.UploaderHTML5 prototype
-
- /**
- * Construction logic executed during UploaderHTML5 instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "initializer", 73);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 75);
-this._fileInputField = null;
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 76);
-this.queue = null;
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 77);
-this._buttonBinding = null;
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 78);
-this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 94);
-this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 102);
-this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 117);
-this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 138);
-this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 155);
-this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 172);
-this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 180);
-this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 199);
-this.publish("uploaderror");
-
- /**
- * Signals that a dragged object has entered into the uploader's associated drag-and-drop area.
- *
- * @event dragenter
- * @param event {Event} The event object for the `dragenter`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 207);
-this.publish("dragenter");
-
- /**
- * Signals that an object has been dragged over the uploader's associated drag-and-drop area.
- *
- * @event dragover
- * @param event {Event} The event object for the `dragover`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 215);
-this.publish("dragover");
-
- /**
- * Signals that an object has been dragged off of the uploader's associated drag-and-drop area.
- *
- * @event dragleave
- * @param event {Event} The event object for the `dragleave`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 223);
-this.publish("dragleave");
-
- /**
- * Signals that an object has been dropped over the uploader's associated drag-and-drop area.
- *
- * @event drop
- * @param event {Event} The event object for the `drop`.
- */
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 231);
-this.publish("drop");
-
- },
-
- /**
- * Create the DOM structure for the UploaderHTML5.
- * UploaderHTML5's DOM structure consists of a "Select Files" button that can
- * be replaced by the developer's widget of choice; and a hidden file input field
- * that is used to instantiate the File Select dialog.
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "renderUI", 244);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 245);
-var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selButton = this.get("selectFilesButton");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 249);
-selButton.setStyles({width:"100%", height:"100%"});
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 250);
-contentBox.append(selButton);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 251);
-this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 252);
-contentBox.append(this._fileInputField);
- },
-
- /**
- * Binds to the UploaderHTML5 UI and subscribes to the necessary events.
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "bindUI", 261);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 263);
-this._bindSelectButton();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 264);
-this._setMultipleFiles();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 265);
-this._setFileFilters();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 266);
-this._bindDropArea();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 267);
-this._triggerEnabled();
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 269);
-this.after("multipleFilesChange", this._setMultipleFiles, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 270);
-this.after("fileFiltersChange", this._setFileFilters, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 271);
-this.after("enabledChange", this._triggerEnabled, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 272);
-this.after("selectFilesButtonChange", this._bindSelectButton, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 273);
-this.after("dragAndDropAreaChange", this._bindDropArea, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 274);
-this.after("tabIndexChange", function (ev) {_yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 2)", 274);
-this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));}, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 275);
-this._fileInputField.on("change", this._updateFileList, this);
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 277);
-this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));
- },
-
-
- /**
- * Recreates the file field to null out the previous list of files and
- * thus allow for an identical file list selection.
- *
- * @method _rebindFileField
- * @protected
- */
- _rebindFileField : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_rebindFileField", 288);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 289);
-this._fileInputField.remove(true);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 290);
-this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 291);
-this.get("contentBox").append(this._fileInputField);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 292);
-this._fileInputField.on("change", this._updateFileList, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 293);
-this._setMultipleFiles();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 294);
-this._setFileFilters();
- },
-
-
- /**
- * Binds the specified drop area's drag and drop events to the
- * uploader's custom handler.
- *
- * @method _bindDropArea
- * @protected
- */
- _bindDropArea : function (event) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_bindDropArea", 305);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 306);
-var ev = event || {prevVal: null};
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 308);
-if (ev.prevVal !== null) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 309);
-ev.prevVal.detach('drop', this._ddEventHandler);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 310);
-ev.prevVal.detach('dragenter', this._ddEventHandler);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 311);
-ev.prevVal.detach('dragover', this._ddEventHandler);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 312);
-ev.prevVal.detach('dragleave', this._ddEventHandler);
- }
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 315);
-var ddArea = this.get("dragAndDropArea");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 317);
-if (ddArea !== null) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 318);
-ddArea.on('drop', this._ddEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 319);
-ddArea.on('dragenter', this._ddEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 320);
-ddArea.on('dragover', this._ddEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 321);
-ddArea.on('dragleave', this._ddEventHandler, this);
- }
- },
-
- /**
- * Binds the instantiation of the file select dialog to the current file select
- * control.
- *
- * @method _bindSelectButton
- * @protected
- */
- _bindSelectButton : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_bindSelectButton", 332);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 333);
-this._buttonBinding = this.get("selectFilesButton").on("click", this.openFileSelectDialog, this);
- },
-
- /**
- * Handles the drag and drop events from the uploader's specified drop
- * area.
- *
- * @method _ddEventHandler
- * @protected
- */
- _ddEventHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_ddEventHandler", 343);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 345);
-event.stopPropagation();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 346);
-event.preventDefault();
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 348);
-switch (event.type) {
- case "dragenter":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 350);
-this.fire("dragenter");
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 351);
-break;
- case "dragover":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 353);
-this.fire("dragover");
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 354);
-break;
- case "dragleave":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 356);
-this.fire("dragleave");
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 357);
-break;
- case "drop":
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 360);
-var newfiles = event._event.dataTransfer.files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 364);
-if (filterFunc) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 365);
-Y.each(newfiles, function (value) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 3)", 365);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 366);
-var newfile = new Y.FileHTML5(value);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 367);
-if (filterFunc(newfile)) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 368);
-parsedFiles.push(newfile);
- }
- });
- }
- else {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 373);
-Y.each(newfiles, function (value) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 4)", 373);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 374);
-parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 378);
-if (parsedFiles.length > 0) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 379);
-var oldfiles = this.get("fileList");
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 380);
-this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 382);
-this.fire("fileselect", {fileList: parsedFiles});
- }
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 385);
-this.fire("drop");
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 386);
-break;
- }
- },
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_setButtonClass", 399);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 400);
-if (add) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 401);
-this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 404);
-this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the file input field.
- *
- * @method _setMultipleFiles
- * @protected
- */
- _setMultipleFiles : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_setMultipleFiles", 415);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 416);
-if (this.get("multipleFiles") === true) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 417);
-this._fileInputField.set("multiple", "multiple");
- }
- else {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 420);
-this._fileInputField.set("multiple", "");
- }
- },
-
- /**
- * Syncs the state of the `fileFilters` attribute between this class
- * and the file input field.
- *
- * @method _setFileFilters
- * @protected
- */
- _setFileFilters : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_setFileFilters", 431);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 432);
-if (this.get("fileFilters").length > 0) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 433);
-this._fileInputField.set("accept", this.get("fileFilters").join(","));
- }
- else {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 436);
-this._fileInputField.set("accept", "");
- }
- },
-
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the underlying button.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_triggerEnabled", 448);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 449);
-if (this.get("enabled") && this._buttonBinding === null) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 450);
-this._bindSelectButton();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 451);
-this._setButtonClass("disabled", false);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 452);
-this.get("selectFilesButton").setAttribute("aria-disabled", "false");
- }
- else {_yuitest_coverline("build/uploader-html5/uploader-html5.js", 454);
-if (!this.get("enabled") && this._buttonBinding) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 455);
-this._buttonBinding.detach();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 456);
-this._buttonBinding = null;
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 457);
-this._setButtonClass("disabled", true);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 458);
-this.get("selectFilesButton").setAttribute("aria-disabled", "true");
- }}
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_getFileList", 468);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 469);
-return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_setFileList", 478);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 479);
-this._fileList = val.concat();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 480);
-return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @protected
- */
- _updateFileList : function (ev) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_updateFileList", 493);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 494);
-var newfiles = ev.target.getDOMNode().files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 498);
-if (filterFunc) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 499);
-Y.each(newfiles, function (value) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 5)", 499);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 500);
-var newfile = new Y.FileHTML5(value);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 501);
-if (filterFunc(newfile)) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 502);
-parsedFiles.push(newfile);
- }
- });
- }
- else {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 507);
-Y.each(newfiles, function (value) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 6)", 507);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 508);
-parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 512);
-if (parsedFiles.length > 0) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 513);
-var oldfiles = this.get("fileList");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 515);
-this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 518);
-this.fire("fileselect", {fileList: parsedFiles});
- }
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 521);
-this._rebindFileField();
- },
-
-
- /**
- * Handles and retransmits events fired by `Y.File` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @protected
- */
- _uploadEventHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "_uploadEventHandler", 532);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 534);
-switch (event.type) {
- case "file:uploadstart":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 536);
-this.fire("fileuploadstart", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 537);
-break;
- case "file:uploadprogress":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 539);
-this.fire("uploadprogress", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 540);
-break;
- case "uploaderqueue:totaluploadprogress":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 542);
-this.fire("totaluploadprogress", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 543);
-break;
- case "file:uploadcomplete":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 545);
-this.fire("uploadcomplete", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 546);
-break;
- case "uploaderqueue:alluploadscomplete":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 548);
-this.queue = null;
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 549);
-this.fire("alluploadscomplete", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 550);
-break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 553);
-this.fire("uploaderror", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 554);
-break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 557);
-this.fire("uploadcancel", event);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 558);
-break;
- }
-
- },
-
- /**
- * Opens the File Selection dialog by simulating a click on the file input field.
- *
- * @method openFileSelectDialog
- */
- openFileSelectDialog : function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "openFileSelectDialog", 568);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 569);
-var fileDomNode = this._fileInputField.getDOMNode();
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 570);
-if (fileDomNode.click) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 571);
-fileDomNode.click();
- }
- },
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.File} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- upload : function (file, url, postvars) {
-
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "upload", 584);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 586);
-var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 590);
-postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 592);
-if (file instanceof Y.FileHTML5) {
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 594);
-file.on("uploadstart", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 595);
-file.on("uploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 596);
-file.on("uploadcomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 597);
-file.on("uploaderror", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 598);
-file.on("uploadcancel", this._uploadEventHandler, this);
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 600);
-file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "uploadAll", 612);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 613);
-this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "uploadThese", 625);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 626);
-if (!this.queue) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 627);
-var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 630);
-this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount"),
- uploadHeaders: this.get("uploadHeaders"),
- withCredentials: this.get("withCredentials")
- });
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 640);
-this.queue.on("uploadstart", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 641);
-this.queue.on("uploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 642);
-this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 643);
-this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 644);
-this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 645);
-this.queue.on("uploadcancel", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 646);
-this.queue.on("uploaderror", this._uploadEventHandler, this);
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 647);
-this.queue.startUpload();
-
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 649);
-this.fire("uploadstart");
- }
- else {_yuitest_coverline("build/uploader-html5/uploader-html5.js", 651);
-if (this.queue._currentState === UploaderQueue.UPLOADING) {
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 652);
-this.queue.set("perFileParameters", this.get("postVarsPerFile"));
- _yuitest_coverline("build/uploader-html5/uploader-html5.js", 653);
-Y.each(files, function (file) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "(anonymous 7)", 653);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 654);
-this.queue.addToQueueBottom(file);
- }, this);
- }}
- }
-},
-
-{
- /**
- * The template for the hidden file input field container. The file input field will only
- * accept clicks if its visibility is set to hidden (and will not if it's `display` value
- * is set to `none`)
- *
- * @property HTML5FILEFIELD_TEMPLATE
- * @type {String}
- * @static
- */
- HTML5FILEFIELD_TEMPLATE: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderHTML5 value is `"html5"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "html5",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the configuration of the uploader.
- * Currently, the only class name used is that corresponding to the
- * `disabled` state of the uploader. Other button states should be managed
- * directly via CSS selectors.
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default {
- * disabled: "yui3-button-disabled"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * The node that serves as the drop target for files.
- *
- * @attribute dragAndDropArea
- * @type {Node}
- * @default null
- */
- dragAndDropArea: {
- value: null,
- setter: function (val) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "setter", 762);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 763);
-return Y.one(val);
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "validator", 794);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 795);
-return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER); }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be a string
- * indicating the Media (MIME) type for the files that should be supported
- * for selection. The Media type strings should be properly formatted
- * or this parameter will be ignored. Examples of valid strings include:
- * "audio/*", "video/*", "application/pdf", etc. More information
- * on valid Media type strings is available here:
- * http://www.iana.org/assignments/media-types/index.html
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.File` and be instantiated with an instance
- * of native JavaScript File() class.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "valueFn", 905);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 906);
-return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel"),
- tabIndex: this.get("tabIndex")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-html5/uploader-html5.js", "validator", 923);
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 924);
-return (val >= 1 && val <= 5);
- }
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * Additional HTTP headers that should be included
- * in the upload request.
- *
- *
- * @attribute uploadHeaders
- * @type {Object}
- * @default {}
- */
- uploadHeaders: {
- value: {}
- },
-
- /**
- * A Boolean that specifies whether the file should be
- * uploaded with the appropriate user credentials for the
- * domain.
- *
- * @attribute withCredentials
- * @type {Boolean}
- * @default true
- */
- withCredentials: {
- value: true
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-_yuitest_coverline("build/uploader-html5/uploader-html5.js", 979);
-Y.UploaderHTML5.Queue = UploaderQueue;
-
-
-
-}, '3.7.3', {"requires": ["widget", "node-event-simulate", "substitute", "file-html5", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-debug.js b/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-debug.js
deleted file mode 100644
index 902c4b98eda..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-debug.js
+++ /dev/null
@@ -1,989 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader-html5', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, drag-and-drop support, server response retrieval and error reporting.
- *
- * @module uploader-html5
- */
-
-// Shorthands for the external modules
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue;
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * @class UploaderHTML5
- * @extends Widget
- * @constructor
- */
-
-function UploaderHTML5(config) {
- UploaderHTML5.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {
-
- /**
- * Stored reference to the instance of the file input field used to
- * initiate the file selection dialog.
- *
- * @property _fileInputField
- * @type {Node}
- * @protected
- */
- _fileInputField: null,
-
- /**
- * Stored reference to the click event binding of the `Select Files`
- * button.
- *
- * @property _buttonBinding
- * @type {EventHandle}
- * @protected
- */
- _buttonBinding: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- // Y.UploaderHTML5 prototype
-
- /**
- * Construction logic executed during UploaderHTML5 instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- this._fileInputField = null;
- this.queue = null;
- this._buttonBinding = null;
- this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- this.publish("uploaderror");
-
- /**
- * Signals that a dragged object has entered into the uploader's associated drag-and-drop area.
- *
- * @event dragenter
- * @param event {Event} The event object for the `dragenter`.
- */
- this.publish("dragenter");
-
- /**
- * Signals that an object has been dragged over the uploader's associated drag-and-drop area.
- *
- * @event dragover
- * @param event {Event} The event object for the `dragover`.
- */
- this.publish("dragover");
-
- /**
- * Signals that an object has been dragged off of the uploader's associated drag-and-drop area.
- *
- * @event dragleave
- * @param event {Event} The event object for the `dragleave`.
- */
- this.publish("dragleave");
-
- /**
- * Signals that an object has been dropped over the uploader's associated drag-and-drop area.
- *
- * @event drop
- * @param event {Event} The event object for the `drop`.
- */
- this.publish("drop");
-
- },
-
- /**
- * Create the DOM structure for the UploaderHTML5.
- * UploaderHTML5's DOM structure consists of a "Select Files" button that can
- * be replaced by the developer's widget of choice; and a hidden file input field
- * that is used to instantiate the File Select dialog.
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selButton = this.get("selectFilesButton");
-
- selButton.setStyles({width:"100%", height:"100%"});
- contentBox.append(selButton);
- this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- contentBox.append(this._fileInputField);
- },
-
- /**
- * Binds to the UploaderHTML5 UI and subscribes to the necessary events.
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- this._bindSelectButton();
- this._setMultipleFiles();
- this._setFileFilters();
- this._bindDropArea();
- this._triggerEnabled();
-
- this.after("multipleFilesChange", this._setMultipleFiles, this);
- this.after("fileFiltersChange", this._setFileFilters, this);
- this.after("enabledChange", this._triggerEnabled, this);
- this.after("selectFilesButtonChange", this._bindSelectButton, this);
- this.after("dragAndDropAreaChange", this._bindDropArea, this);
- this.after("tabIndexChange", function (ev) {this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));}, this);
- this._fileInputField.on("change", this._updateFileList, this);
-
- this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));
- },
-
-
- /**
- * Recreates the file field to null out the previous list of files and
- * thus allow for an identical file list selection.
- *
- * @method _rebindFileField
- * @protected
- */
- _rebindFileField : function () {
- this._fileInputField.remove(true);
- this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- this.get("contentBox").append(this._fileInputField);
- this._fileInputField.on("change", this._updateFileList, this);
- this._setMultipleFiles();
- this._setFileFilters();
- },
-
-
- /**
- * Binds the specified drop area's drag and drop events to the
- * uploader's custom handler.
- *
- * @method _bindDropArea
- * @protected
- */
- _bindDropArea : function (event) {
- var ev = event || {prevVal: null};
-
- if (ev.prevVal !== null) {
- ev.prevVal.detach('drop', this._ddEventHandler);
- ev.prevVal.detach('dragenter', this._ddEventHandler);
- ev.prevVal.detach('dragover', this._ddEventHandler);
- ev.prevVal.detach('dragleave', this._ddEventHandler);
- }
-
- var ddArea = this.get("dragAndDropArea");
-
- if (ddArea !== null) {
- ddArea.on('drop', this._ddEventHandler, this);
- ddArea.on('dragenter', this._ddEventHandler, this);
- ddArea.on('dragover', this._ddEventHandler, this);
- ddArea.on('dragleave', this._ddEventHandler, this);
- }
- },
-
- /**
- * Binds the instantiation of the file select dialog to the current file select
- * control.
- *
- * @method _bindSelectButton
- * @protected
- */
- _bindSelectButton : function () {
- this._buttonBinding = this.get("selectFilesButton").on("click", this.openFileSelectDialog, this);
- },
-
- /**
- * Handles the drag and drop events from the uploader's specified drop
- * area.
- *
- * @method _ddEventHandler
- * @protected
- */
- _ddEventHandler : function (event) {
-
- event.stopPropagation();
- event.preventDefault();
-
- switch (event.type) {
- case "dragenter":
- this.fire("dragenter");
- break;
- case "dragover":
- this.fire("dragover");
- break;
- case "dragleave":
- this.fire("dragleave");
- break;
- case "drop":
-
- var newfiles = event._event.dataTransfer.files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this.fire("drop");
- break;
- }
- },
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- if (add) {
- this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the file input field.
- *
- * @method _setMultipleFiles
- * @protected
- */
- _setMultipleFiles : function () {
- if (this.get("multipleFiles") === true) {
- this._fileInputField.set("multiple", "multiple");
- }
- else {
- this._fileInputField.set("multiple", "");
- }
- },
-
- /**
- * Syncs the state of the `fileFilters` attribute between this class
- * and the file input field.
- *
- * @method _setFileFilters
- * @protected
- */
- _setFileFilters : function () {
- if (this.get("fileFilters").length > 0) {
- this._fileInputField.set("accept", this.get("fileFilters").join(","));
- }
- else {
- this._fileInputField.set("accept", "");
- }
- },
-
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the underlying button.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- if (this.get("enabled") && this._buttonBinding === null) {
- this._bindSelectButton();
- this._setButtonClass("disabled", false);
- this.get("selectFilesButton").setAttribute("aria-disabled", "false");
- }
- else if (!this.get("enabled") && this._buttonBinding) {
- this._buttonBinding.detach();
- this._buttonBinding = null;
- this._setButtonClass("disabled", true);
- this.get("selectFilesButton").setAttribute("aria-disabled", "true");
- }
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- this._fileList = val.concat();
- return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @protected
- */
- _updateFileList : function (ev) {
- var newfiles = ev.target.getDOMNode().files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
-
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this._rebindFileField();
- },
-
-
- /**
- * Handles and retransmits events fired by `Y.File` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @protected
- */
- _uploadEventHandler : function (event) {
-
- switch (event.type) {
- case "file:uploadstart":
- this.fire("fileuploadstart", event);
- break;
- case "file:uploadprogress":
- this.fire("uploadprogress", event);
- break;
- case "uploaderqueue:totaluploadprogress":
- this.fire("totaluploadprogress", event);
- break;
- case "file:uploadcomplete":
- this.fire("uploadcomplete", event);
- break;
- case "uploaderqueue:alluploadscomplete":
- this.queue = null;
- this.fire("alluploadscomplete", event);
- break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- this.fire("uploaderror", event);
- break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- this.fire("uploadcancel", event);
- break;
- }
-
- },
-
- /**
- * Opens the File Selection dialog by simulating a click on the file input field.
- *
- * @method openFileSelectDialog
- */
- openFileSelectDialog : function () {
- var fileDomNode = this._fileInputField.getDOMNode();
- if (fileDomNode.click) {
- fileDomNode.click();
- }
- },
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.File} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- upload : function (file, url, postvars) {
-
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- if (file instanceof Y.FileHTML5) {
-
- file.on("uploadstart", this._uploadEventHandler, this);
- file.on("uploadprogress", this._uploadEventHandler, this);
- file.on("uploadcomplete", this._uploadEventHandler, this);
- file.on("uploaderror", this._uploadEventHandler, this);
- file.on("uploadcancel", this._uploadEventHandler, this);
-
- file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- if (!this.queue) {
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount"),
- uploadHeaders: this.get("uploadHeaders"),
- withCredentials: this.get("withCredentials")
- });
- this.queue.on("uploadstart", this._uploadEventHandler, this);
- this.queue.on("uploadprogress", this._uploadEventHandler, this);
- this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- this.queue.on("uploadcancel", this._uploadEventHandler, this);
- this.queue.on("uploaderror", this._uploadEventHandler, this);
- this.queue.startUpload();
-
- this.fire("uploadstart");
- }
- else if (this.queue._currentState === UploaderQueue.UPLOADING) {
- this.queue.set("perFileParameters", this.get("postVarsPerFile"));
- Y.each(files, function (file) {
- this.queue.addToQueueBottom(file);
- }, this);
- }
- }
-},
-
-{
- /**
- * The template for the hidden file input field container. The file input field will only
- * accept clicks if its visibility is set to hidden (and will not if it's `display` value
- * is set to `none`)
- *
- * @property HTML5FILEFIELD_TEMPLATE
- * @type {String}
- * @static
- */
- HTML5FILEFIELD_TEMPLATE: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderHTML5 value is `"html5"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "html5",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the configuration of the uploader.
- * Currently, the only class name used is that corresponding to the
- * `disabled` state of the uploader. Other button states should be managed
- * directly via CSS selectors.
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default {
- * disabled: "yui3-button-disabled"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * The node that serves as the drop target for files.
- *
- * @attribute dragAndDropArea
- * @type {Node}
- * @default null
- */
- dragAndDropArea: {
- value: null,
- setter: function (val) {
- return Y.one(val);
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER); }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be a string
- * indicating the Media (MIME) type for the files that should be supported
- * for selection. The Media type strings should be properly formatted
- * or this parameter will be ignored. Examples of valid strings include:
- * "audio/*", "video/*", "application/pdf", etc. More information
- * on valid Media type strings is available here:
- * http://www.iana.org/assignments/media-types/index.html
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.File` and be instantiated with an instance
- * of native JavaScript File() class.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel"),
- tabIndex: this.get("tabIndex")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- return (val >= 1 && val <= 5);
- }
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * Additional HTTP headers that should be included
- * in the upload request.
- *
- *
- * @attribute uploadHeaders
- * @type {Object}
- * @default {}
- */
- uploadHeaders: {
- value: {}
- },
-
- /**
- * A Boolean that specifies whether the file should be
- * uploaded with the appropriate user credentials for the
- * domain.
- *
- * @attribute withCredentials
- * @type {Boolean}
- * @default true
- */
- withCredentials: {
- value: true
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-Y.UploaderHTML5.Queue = UploaderQueue;
-
-
-
-}, '3.7.3', {"requires": ["widget", "node-event-simulate", "substitute", "file-html5", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-min.js b/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-min.js
deleted file mode 100644
index 0606b4833ce..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("uploader-html5",function(e,t){function i(e){i.superclass.constructor.apply(this,arguments)}var n=e.substitute,r=e.Uploader.Queue;e.UploaderHTML5=e.extend(i,e.Widget,{_fileInputField:null,_buttonBinding:null,queue:null,initializer:function(){this._fileInputField=null,this.queue=null,this._buttonBinding=null,this._fileList=[],this.publish("fileselect"),this.publish("uploadstart"),this.publish("fileuploadstart"),this.publish("uploadprogress"),this.publish("totaluploadprogress"),this.publish("uploadcomplete"),this.publish("alluploadscomplete"),this.publish("uploaderror"),this.publish("dragenter"),this.publish("dragover"),this.publish("dragleave"),this.publish("drop")},renderUI:function(){var t=this.get("boundingBox"),n=this.get("contentBox"),r=this.get("selectFilesButton");r.setStyles({width:"100%",height:"100%"}),n.append(r),this._fileInputField=e.Node.create(i.HTML5FILEFIELD_TEMPLATE),n.append(this._fileInputField)},bindUI:function(){this._bindSelectButton(),this._setMultipleFiles(),this._setFileFilters(),this._bindDropArea(),this._triggerEnabled(),this.after("multipleFilesChange",this._setMultipleFiles,this),this.after("fileFiltersChange",this._setFileFilters,this),this.after("enabledChange",this._triggerEnabled,this),this.after("selectFilesButtonChange",this._bindSelectButton,this),this.after("dragAndDropAreaChange",this._bindDropArea,this),this.after("tabIndexChange",function(e){this.get("selectFilesButton").set("tabIndex",this.get("tabIndex"))},this),this._fileInputField.on("change",this._updateFileList,this),this.get("selectFilesButton").set("tabIndex",this.get("tabIndex"))},_rebindFileField:function(){this._fileInputField.remove(!0),this._fileInputField=e.Node.create(i.HTML5FILEFIELD_TEMPLATE),this.get("contentBox").append(this._fileInputField),this._fileInputField.on("change",this._updateFileList,this),this._setMultipleFiles(),this._setFileFilters()},_bindDropArea:function(e){var t=e||{prevVal:null};t.prevVal!==null&&(t.prevVal.detach("drop",this._ddEventHandler),t.prevVal.detach("dragenter",this._ddEventHandler),t.prevVal.detach("dragover",this._ddEventHandler),t.prevVal.detach("dragleave",this._ddEventHandler));var n=this.get("dragAndDropArea");n!==null&&(n.on("drop",this._ddEventHandler,this),n.on("dragenter",this._ddEventHandler,this),n.on("dragover",this._ddEventHandler,this),n.on("dragleave",this._ddEventHandler,this))},_bindSelectButton:function(){this._buttonBinding=this.get("selectFilesButton").on("click",this.openFileSelectDialog,this)},_ddEventHandler:function(t){t.stopPropagation(),t.preventDefault();switch(t.type){case"dragenter":this.fire("dragenter");break;case"dragover":this.fire("dragover");break;case"dragleave":this.fire("dragleave");break;case"drop":var n=t._event.dataTransfer.files,r=[],i=this.get("fileFilterFunction");i?e.each(n,function(t){var n=new e.FileHTML5(t);i(n)&&r.push(n)}):e.each(n,function(t){r.push(new e.FileHTML5(t))});if(r.length>0){var s=this.get("fileList");this.set("fileList",this.get("appendNewFiles")?s.concat(r):r),this.fire("fileselect",{fileList:r})}this.fire("drop")}},_setButtonClass:function(e,t){t?this.get("selectFilesButton").addClass(this.get("buttonClassNames")[e]):this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[e])},_setMultipleFiles:function(){this.get("multipleFiles")===!0?this._fileInputField.set("multiple","multiple"):this._fileInputField.set("multiple","")},_setFileFilters:function(){this.get("fileFilters").length>0?this._fileInputField.set("accept",this.get("fileFilters").join(",")):this._fileInputField.set("accept","")},_triggerEnabled:function(){this.get("enabled")&&this._buttonBinding===null?(this._bindSelectButton(),this._setButtonClass("disabled",!1),this.get("selectFilesButton").setAttribute("aria-disabled","false")):!this.get("enabled")&&this._buttonBinding&&(this._buttonBinding.detach(),this._buttonBinding=null,this._setButtonClass("disabled",!0),this.get("selectFilesButton").setAttribute("aria-disabled","true"))},_getFileList:function(e){return this._fileList.concat()},_setFileList:function(e){return this._fileList=e.concat(),this._fileList.concat()},_updateFileList:function(t){var n=t.target.getDOMNode().files,r=[],i=this.get("fileFilterFunction");i?e.each(n,function(t){var n=new e.FileHTML5(t);i(n)&&r.push(n)}):e.each(n,function(t){r.push(new e.FileHTML5(t))});if(r.length>0){var s=this.get("fileList");this.set("fileList",this.get("appendNewFiles")?s.concat(r):r),this.fire("fileselect",{fileList:r})}this._rebindFileField()},_uploadEventHandler:function(e){switch(e.type){case"file:uploadstart":this.fire("fileuploadstart",e);break;case"file:uploadprogress":this.fire("uploadprogress",e);break;case"uploaderqueue:totaluploadprogress":this.fire("totaluploadprogress",e);break;case"file:uploadcomplete":this.fire("uploadcomplete",e);break;case"uploaderqueue:alluploadscomplete":this.queue=null,this.fire("alluploadscomplete",e);break;case"file:uploaderror":case"uploaderqueue:uploaderror":this.fire("uploaderror",e);break;case"file:uploadcancel":case"uploaderqueue:uploadcancel":this.fire("uploadcancel",e)}},openFileSelectDialog:function(){var e=this._fileInputField.getDOMNode();e.click&&e.click()},upload:function(t,n,r){var i=n||this.get("uploadURL"),s=r||this.get("postVarsPerFile"),o=t.get("id");s=s.hasOwnProperty(o)?s[o]:s,t instanceof e.FileHTML5&&(t.on("uploadstart",this._uploadEventHandler,this),t.on("uploadprogress",this._uploadEventHandler,this),t.on("uploadcomplete",this._uploadEventHandler,this),t.on("uploaderror",this._uploadEventHandler,this),t.on("uploadcancel",this._uploadEventHandler,this),t.startUpload(i,s,this.get("fileFieldName")))},uploadAll:function(e,t){this.uploadThese(this.get("fileList"),e,t)},uploadThese:function(t,n,i){if(!this.queue){var s=n||this.get("uploadURL"),o=i||this.get("postVarsPerFile");this.queue=new r({simUploads:this.get("simLimit"),errorAction:this.get("errorAction"),fileFieldName:this.get("fileFieldName"),fileList:t,uploadURL:s,perFileParameters:o,retryCount:this.get("retryCount"),uploadHeaders:this.get("uploadHeaders"),withCredentials:this.get("withCredentials")}),this.queue.on("uploadstart",this._uploadEventHandler,this),this.queue.on("uploadprogress",this._uploadEventHandler,this),this.queue.on("totaluploadprogress",this._uploadEventHandler,this),this.queue.on("uploadcomplete",this._uploadEventHandler,this),this.queue.on("alluploadscomplete",this._uploadEventHandler,this),this.queue.on("uploadcancel",this._uploadEventHandler,this),this.queue.on("uploaderror",this._uploadEventHandler,this),this.queue.startUpload(),this.fire("uploadstart")}else this.queue._currentState===r.UPLOADING&&(this.queue.set("perFileParameters",this.get("postVarsPerFile")),e.each(t,function(e){this.queue.addToQueueBottom(e)},this))}},{HTML5FILEFIELD_TEMPLATE:"",SELECT_FILES_BUTTON:"",TYPE:"html5",NAME:"uploader",ATTRS:{appendNewFiles:{value:!0},buttonClassNames:{value:{hover:"yui3-button-hover",active:"yui3-button-active",disabled:"yui3-button-disabled",focus:"yui3-button-selected"}},dragAndDropArea:{value:null,setter:function(t){return e.one(t)}},enabled:{value:!0},errorAction:{value:"continue",validator:function(e,t){return e===r.CONTINUE||e===r.STOP||e===r.RESTART_ASAP||e===r.RESTART_AFTER}},fileFilters:{value:[]},fileFilterFunction:{value:null},fileFieldName:{value:"Filedata"},fileList:{value:[],getter:"_getFileList",setter:"_setFileList"},multipleFiles:{value:!1},postVarsPerFile:{value:{}},selectButtonLabel:{value:"Select Files"},selectFilesButton:{valueFn:function(){return e.Node.create(n(e.UploaderHTML5.SELECT_FILES_BUTTON,{selectButtonLabel:this.get("selectButtonLabel"),tabIndex:this.get("tabIndex")}))}},simLimit:{value:2,validator:function(e,t){return e>=1&&e<=5}},uploadURL:{value:""},uploadHeaders:{value:{}},withCredentials:{value:!0},retryCount:{value:3}}}),e.UploaderHTML5.Queue=r},"3.7.3",{requires:["widget","node-event-simulate","substitute","file-html5","uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5.js b/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5.js
deleted file mode 100644
index 902c4b98eda..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-html5/uploader-html5.js
+++ /dev/null
@@ -1,989 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader-html5', function (Y, NAME) {
-
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * The supported features include: automatic upload queue management, upload progress
- * tracking, drag-and-drop support, server response retrieval and error reporting.
- *
- * @module uploader-html5
- */
-
-// Shorthands for the external modules
-var substitute = Y.substitute,
- UploaderQueue = Y.Uploader.Queue;
-
- /**
- * This module provides a UI for file selection and multiple file upload capability using
- * HTML5 XMLHTTPRequest Level 2 as a transport engine.
- * @class UploaderHTML5
- * @extends Widget
- * @constructor
- */
-
-function UploaderHTML5(config) {
- UploaderHTML5.superclass.constructor.apply ( this, arguments );
-}
-
-
-
-Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {
-
- /**
- * Stored reference to the instance of the file input field used to
- * initiate the file selection dialog.
- *
- * @property _fileInputField
- * @type {Node}
- * @protected
- */
- _fileInputField: null,
-
- /**
- * Stored reference to the click event binding of the `Select Files`
- * button.
- *
- * @property _buttonBinding
- * @type {EventHandle}
- * @protected
- */
- _buttonBinding: null,
-
- /**
- * Stored reference to the instance of Uploader.Queue used to manage
- * the upload process. This is a read-only property that only exists
- * during an active upload process. Only one queue can be active at
- * a time; if an upload start is attempted while a queue is active,
- * it will be ignored.
- *
- * @property queue
- * @type {Y.Uploader.Queue}
- */
- queue: null,
-
- // Y.UploaderHTML5 prototype
-
- /**
- * Construction logic executed during UploaderHTML5 instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function () {
-
- this._fileInputField = null;
- this.queue = null;
- this._buttonBinding = null;
- this._fileList = [];
-
- // Publish available events
-
- /**
- * Signals that files have been selected.
- *
- * @event fileselect
- * @param event {Event} The event object for the `fileselect` with the
- * following payload:
- *
- *
- */
- this.publish("fileselect");
-
- /**
- * Signals that an upload of multiple files has been started.
- *
- * @event uploadstart
- * @param event {Event} The event object for the `uploadstart`.
- */
- this.publish("uploadstart");
-
- /**
- * Signals that an upload of a specific file has started.
- *
- * @event fileuploadstart
- * @param event {Event} The event object for the `fileuploadstart` with the
- * following payload:
- *
- *
- */
- this.publish("fileuploadstart");
-
- /**
- * Reports on upload progress of a specific file.
- *
- * @event uploadprogress
- * @param event {Event} The event object for the `uploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("uploadprogress");
-
- /**
- * Reports on the total upload progress of the file list.
- *
- * @event totaluploadprogress
- * @param event {Event} The event object for the `totaluploadprogress` with the
- * following payload:
- *
- *
- */
- this.publish("totaluploadprogress");
-
- /**
- * Signals that a single file upload has been completed.
- *
- * @event uploadcomplete
- * @param event {Event} The event object for the `uploadcomplete` with the
- * following payload:
- *
- *
- */
- this.publish("uploadcomplete");
-
- /**
- * Signals that the upload process of the entire file list has been completed.
- *
- * @event alluploadscomplete
- * @param event {Event} The event object for the `alluploadscomplete`.
- */
- this.publish("alluploadscomplete");
-
- /**
- * Signals that a error has occurred in a specific file's upload process.
- *
- * @event uploaderror
- * @param event {Event} The event object for the `uploaderror` with the
- * following payload:
- *
- *
- */
- this.publish("uploaderror");
-
- /**
- * Signals that a dragged object has entered into the uploader's associated drag-and-drop area.
- *
- * @event dragenter
- * @param event {Event} The event object for the `dragenter`.
- */
- this.publish("dragenter");
-
- /**
- * Signals that an object has been dragged over the uploader's associated drag-and-drop area.
- *
- * @event dragover
- * @param event {Event} The event object for the `dragover`.
- */
- this.publish("dragover");
-
- /**
- * Signals that an object has been dragged off of the uploader's associated drag-and-drop area.
- *
- * @event dragleave
- * @param event {Event} The event object for the `dragleave`.
- */
- this.publish("dragleave");
-
- /**
- * Signals that an object has been dropped over the uploader's associated drag-and-drop area.
- *
- * @event drop
- * @param event {Event} The event object for the `drop`.
- */
- this.publish("drop");
-
- },
-
- /**
- * Create the DOM structure for the UploaderHTML5.
- * UploaderHTML5's DOM structure consists of a "Select Files" button that can
- * be replaced by the developer's widget of choice; and a hidden file input field
- * that is used to instantiate the File Select dialog.
- *
- * @method renderUI
- * @protected
- */
- renderUI : function () {
- var boundingBox = this.get("boundingBox"),
- contentBox = this.get('contentBox'),
- selButton = this.get("selectFilesButton");
-
- selButton.setStyles({width:"100%", height:"100%"});
- contentBox.append(selButton);
- this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- contentBox.append(this._fileInputField);
- },
-
- /**
- * Binds to the UploaderHTML5 UI and subscribes to the necessary events.
- *
- * @method bindUI
- * @protected
- */
- bindUI : function () {
-
- this._bindSelectButton();
- this._setMultipleFiles();
- this._setFileFilters();
- this._bindDropArea();
- this._triggerEnabled();
-
- this.after("multipleFilesChange", this._setMultipleFiles, this);
- this.after("fileFiltersChange", this._setFileFilters, this);
- this.after("enabledChange", this._triggerEnabled, this);
- this.after("selectFilesButtonChange", this._bindSelectButton, this);
- this.after("dragAndDropAreaChange", this._bindDropArea, this);
- this.after("tabIndexChange", function (ev) {this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));}, this);
- this._fileInputField.on("change", this._updateFileList, this);
-
- this.get("selectFilesButton").set("tabIndex", this.get("tabIndex"));
- },
-
-
- /**
- * Recreates the file field to null out the previous list of files and
- * thus allow for an identical file list selection.
- *
- * @method _rebindFileField
- * @protected
- */
- _rebindFileField : function () {
- this._fileInputField.remove(true);
- this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);
- this.get("contentBox").append(this._fileInputField);
- this._fileInputField.on("change", this._updateFileList, this);
- this._setMultipleFiles();
- this._setFileFilters();
- },
-
-
- /**
- * Binds the specified drop area's drag and drop events to the
- * uploader's custom handler.
- *
- * @method _bindDropArea
- * @protected
- */
- _bindDropArea : function (event) {
- var ev = event || {prevVal: null};
-
- if (ev.prevVal !== null) {
- ev.prevVal.detach('drop', this._ddEventHandler);
- ev.prevVal.detach('dragenter', this._ddEventHandler);
- ev.prevVal.detach('dragover', this._ddEventHandler);
- ev.prevVal.detach('dragleave', this._ddEventHandler);
- }
-
- var ddArea = this.get("dragAndDropArea");
-
- if (ddArea !== null) {
- ddArea.on('drop', this._ddEventHandler, this);
- ddArea.on('dragenter', this._ddEventHandler, this);
- ddArea.on('dragover', this._ddEventHandler, this);
- ddArea.on('dragleave', this._ddEventHandler, this);
- }
- },
-
- /**
- * Binds the instantiation of the file select dialog to the current file select
- * control.
- *
- * @method _bindSelectButton
- * @protected
- */
- _bindSelectButton : function () {
- this._buttonBinding = this.get("selectFilesButton").on("click", this.openFileSelectDialog, this);
- },
-
- /**
- * Handles the drag and drop events from the uploader's specified drop
- * area.
- *
- * @method _ddEventHandler
- * @protected
- */
- _ddEventHandler : function (event) {
-
- event.stopPropagation();
- event.preventDefault();
-
- switch (event.type) {
- case "dragenter":
- this.fire("dragenter");
- break;
- case "dragover":
- this.fire("dragover");
- break;
- case "dragleave":
- this.fire("dragleave");
- break;
- case "drop":
-
- var newfiles = event._event.dataTransfer.files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles);
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this.fire("drop");
- break;
- }
- },
-
- /**
- * Adds or removes a specified state CSS class to the underlying uploader button.
- *
- * @method _setButtonClass
- * @protected
- * @param state {String} The name of the state enumerated in `buttonClassNames` attribute
- * from which to derive the needed class name.
- * @param add {Boolean} A Boolean indicating whether to add or remove the class.
- */
- _setButtonClass : function (state, add) {
- if (add) {
- this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
- }
- else {
- this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
- }
- },
-
- /**
- * Syncs the state of the `multipleFiles` attribute between this class
- * and the file input field.
- *
- * @method _setMultipleFiles
- * @protected
- */
- _setMultipleFiles : function () {
- if (this.get("multipleFiles") === true) {
- this._fileInputField.set("multiple", "multiple");
- }
- else {
- this._fileInputField.set("multiple", "");
- }
- },
-
- /**
- * Syncs the state of the `fileFilters` attribute between this class
- * and the file input field.
- *
- * @method _setFileFilters
- * @protected
- */
- _setFileFilters : function () {
- if (this.get("fileFilters").length > 0) {
- this._fileInputField.set("accept", this.get("fileFilters").join(","));
- }
- else {
- this._fileInputField.set("accept", "");
- }
- },
-
-
- /**
- * Syncs the state of the `enabled` attribute between this class
- * and the underlying button.
- *
- * @method _triggerEnabled
- * @private
- */
- _triggerEnabled : function () {
- if (this.get("enabled") && this._buttonBinding === null) {
- this._bindSelectButton();
- this._setButtonClass("disabled", false);
- this.get("selectFilesButton").setAttribute("aria-disabled", "false");
- }
- else if (!this.get("enabled") && this._buttonBinding) {
- this._buttonBinding.detach();
- this._buttonBinding = null;
- this._setButtonClass("disabled", true);
- this.get("selectFilesButton").setAttribute("aria-disabled", "true");
- }
- },
-
- /**
- * Getter for the `fileList` attribute
- *
- * @method _getFileList
- * @private
- */
- _getFileList : function (arr) {
- return this._fileList.concat();
- },
-
- /**
- * Setter for the `fileList` attribute
- *
- * @method _setFileList
- * @private
- */
- _setFileList : function (val) {
- this._fileList = val.concat();
- return this._fileList.concat();
- },
-
- /**
- * Adjusts the content of the `fileList` based on the results of file selection
- * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
- * then selected files are appended to the existing list; otherwise, the list is
- * cleared and populated with the newly selected files.
- *
- * @method _updateFileList
- * @param ev {Event} The file selection event received from the uploader.
- * @protected
- */
- _updateFileList : function (ev) {
- var newfiles = ev.target.getDOMNode().files,
- parsedFiles = [],
- filterFunc = this.get("fileFilterFunction");
-
- if (filterFunc) {
- Y.each(newfiles, function (value) {
- var newfile = new Y.FileHTML5(value);
- if (filterFunc(newfile)) {
- parsedFiles.push(newfile);
- }
- });
- }
- else {
- Y.each(newfiles, function (value) {
- parsedFiles.push(new Y.FileHTML5(value));
- });
- }
-
- if (parsedFiles.length > 0) {
- var oldfiles = this.get("fileList");
-
- this.set("fileList",
- this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
-
- this.fire("fileselect", {fileList: parsedFiles});
- }
-
- this._rebindFileField();
- },
-
-
- /**
- * Handles and retransmits events fired by `Y.File` and `Y.Uploader.Queue`.
- *
- * @method _uploadEventHandler
- * @param event The event dispatched during the upload process.
- * @protected
- */
- _uploadEventHandler : function (event) {
-
- switch (event.type) {
- case "file:uploadstart":
- this.fire("fileuploadstart", event);
- break;
- case "file:uploadprogress":
- this.fire("uploadprogress", event);
- break;
- case "uploaderqueue:totaluploadprogress":
- this.fire("totaluploadprogress", event);
- break;
- case "file:uploadcomplete":
- this.fire("uploadcomplete", event);
- break;
- case "uploaderqueue:alluploadscomplete":
- this.queue = null;
- this.fire("alluploadscomplete", event);
- break;
- case "file:uploaderror":
- case "uploaderqueue:uploaderror":
- this.fire("uploaderror", event);
- break;
- case "file:uploadcancel":
- case "uploaderqueue:uploadcancel":
- this.fire("uploadcancel", event);
- break;
- }
-
- },
-
- /**
- * Opens the File Selection dialog by simulating a click on the file input field.
- *
- * @method openFileSelectDialog
- */
- openFileSelectDialog : function () {
- var fileDomNode = this._fileInputField.getDOMNode();
- if (fileDomNode.click) {
- fileDomNode.click();
- }
- },
-
- /**
- * Starts the upload of a specific file.
- *
- * @method upload
- * @param file {Y.File} Reference to the instance of the file to be uploaded.
- * @param url {String} The URL to upload the file to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- upload : function (file, url, postvars) {
-
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile"),
- fileId = file.get("id");
-
- postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
-
- if (file instanceof Y.FileHTML5) {
-
- file.on("uploadstart", this._uploadEventHandler, this);
- file.on("uploadprogress", this._uploadEventHandler, this);
- file.on("uploadcomplete", this._uploadEventHandler, this);
- file.on("uploaderror", this._uploadEventHandler, this);
- file.on("uploadcancel", this._uploadEventHandler, this);
-
- file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
- }
- },
-
- /**
- * Starts the upload of all files on the file list, using an automated queue.
- *
- * @method uploadAll
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadAll : function (url, postvars) {
- this.uploadThese(this.get("fileList"), url, postvars);
- },
-
- /**
- * Starts the upload of the files specified in the first argument, using an automated queue.
- *
- * @method uploadThese
- * @param files {Array} The list of files to upload.
- * @param url {String} The URL to upload the files to.
- * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
- * If not specified, the values from the attribute `postVarsPerFile` are used instead.
- */
- uploadThese : function (files, url, postvars) {
- if (!this.queue) {
- var uploadURL = url || this.get("uploadURL"),
- postVars = postvars || this.get("postVarsPerFile");
-
- this.queue = new UploaderQueue({simUploads: this.get("simLimit"),
- errorAction: this.get("errorAction"),
- fileFieldName: this.get("fileFieldName"),
- fileList: files,
- uploadURL: uploadURL,
- perFileParameters: postVars,
- retryCount: this.get("retryCount"),
- uploadHeaders: this.get("uploadHeaders"),
- withCredentials: this.get("withCredentials")
- });
- this.queue.on("uploadstart", this._uploadEventHandler, this);
- this.queue.on("uploadprogress", this._uploadEventHandler, this);
- this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
- this.queue.on("uploadcomplete", this._uploadEventHandler, this);
- this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
- this.queue.on("uploadcancel", this._uploadEventHandler, this);
- this.queue.on("uploaderror", this._uploadEventHandler, this);
- this.queue.startUpload();
-
- this.fire("uploadstart");
- }
- else if (this.queue._currentState === UploaderQueue.UPLOADING) {
- this.queue.set("perFileParameters", this.get("postVarsPerFile"));
- Y.each(files, function (file) {
- this.queue.addToQueueBottom(file);
- }, this);
- }
- }
-},
-
-{
- /**
- * The template for the hidden file input field container. The file input field will only
- * accept clicks if its visibility is set to hidden (and will not if it's `display` value
- * is set to `none`)
- *
- * @property HTML5FILEFIELD_TEMPLATE
- * @type {String}
- * @static
- */
- HTML5FILEFIELD_TEMPLATE: "",
-
- /**
- * The template for the "Select Files" button.
- *
- * @property SELECT_FILES_BUTTON
- * @type {String}
- * @static
- * @default ""
- */
- SELECT_FILES_BUTTON: "",
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The UploaderHTML5 value is `"html5"`.
- *
- * @property TYPE
- * @type {String}
- * @static
- */
- TYPE: "html5",
-
- /**
- * The identity of the widget.
- *
- * @property NAME
- * @type String
- * @default 'uploader'
- * @readOnly
- * @protected
- * @static
- */
- NAME: "uploader",
-
- /**
- * Static property used to define the default attribute configuration of
- * the Widget.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * A Boolean indicating whether newly selected files should be appended
- * to the existing file list, or whether they should replace it.
- *
- * @attribute appendNewFiles
- * @type {Boolean}
- * @default true
- */
- appendNewFiles : {
- value: true
- },
-
- /**
- * The names of CSS classes that correspond to different button states
- * of the "Select Files" control. These classes are assigned to the
- * "Select Files" control based on the configuration of the uploader.
- * Currently, the only class name used is that corresponding to the
- * `disabled` state of the uploader. Other button states should be managed
- * directly via CSS selectors.
- *
- *
- * @attribute buttonClassNames
- * @type {Object}
- * @default {
- * disabled: "yui3-button-disabled"
- * }
- */
- buttonClassNames: {
- value: {
- "hover": "yui3-button-hover",
- "active": "yui3-button-active",
- "disabled": "yui3-button-disabled",
- "focus": "yui3-button-selected"
- }
- },
-
- /**
- * The node that serves as the drop target for files.
- *
- * @attribute dragAndDropArea
- * @type {Node}
- * @default null
- */
- dragAndDropArea: {
- value: null,
- setter: function (val) {
- return Y.one(val);
- }
- },
-
- /**
- * A Boolean indicating whether the uploader is enabled or disabled for user input.
- *
- * @attribute enabled
- * @type {Boolean}
- * @default true
- */
- enabled : {
- value: true
- },
-
- /**
- * The action performed when an upload error occurs for a specific file being uploaded.
- * The possible values are:
- *
- *
- * @attribute errorAction
- * @type {String}
- * @default UploaderQueue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER); }
- },
-
- /**
- * An array indicating what fileFilters should be applied to the file
- * selection dialog. Each element in the array should be a string
- * indicating the Media (MIME) type for the files that should be supported
- * for selection. The Media type strings should be properly formatted
- * or this parameter will be ignored. Examples of valid strings include:
- * "audio/*", "video/*", "application/pdf", etc. More information
- * on valid Media type strings is available here:
- * http://www.iana.org/assignments/media-types/index.html
- * @attribute fileFilters
- * @type {Array}
- * @default []
- */
- fileFilters: {
- value: []
- },
-
- /**
- * A filtering function that is applied to every file selected by the user.
- * The function receives the `Y.File` object and must return a Boolean value.
- * If a `false` value is returned, the file in question is not added to the
- * list of files to be uploaded.
- * Use this function to put limits on file sizes or check the file names for
- * correct extension, but make sure that a server-side check is also performed,
- * since any client-side restrictions are only advisory and can be circumvented.
- *
- * @attribute fileFilterFunction
- * @type {Function}
- * @default null
- */
- fileFilterFunction: {
- value: null
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The array of files to be uploaded. All elements in the array
- * must be instances of `Y.File` and be instantiated with an instance
- * of native JavaScript File() class.
- *
- * @attribute fileList
- * @type {Array}
- * @default []
- */
- fileList: {
- value: [],
- getter: "_getFileList",
- setter: "_setFileList"
- },
-
- /**
- * A Boolean indicating whether multiple file selection is enabled.
- *
- * @attribute multipleFiles
- * @type {Boolean}
- * @default false
- */
- multipleFiles: {
- value: false
- },
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file. This attribute is only used if no POST variables are specifed
- * in the upload method call.
- *
- * @attribute postVarsPerFile
- * @type {Object}
- * @default {}
- */
- postVarsPerFile: {
- value: {}
- },
-
- /**
- * The label for the "Select Files" widget. This is the value that replaces the
- * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
- *
- * @attribute selectButtonLabel
- * @type {String}
- * @default "Select Files"
- */
- selectButtonLabel: {
- value: "Select Files"
- },
-
- /**
- * The widget that serves as the "Select Files control for the file uploader
- *
- *
- * @attribute selectFilesButton
- * @type {Node | Widget}
- * @default A standard HTML button with YUI CSS Button skin.
- */
- selectFilesButton : {
- valueFn: function () {
- return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel"),
- tabIndex: this.get("tabIndex")}));
- }
- },
-
- /**
- * The number of files that can be uploaded
- * simultaneously if the automatic queue management
- * is used. This value can be in the range between 2
- * and 5.
- *
- * @attribute simLimit
- * @type {Number}
- * @default 2
- */
- simLimit: {
- value: 2,
- validator: function (val, name) {
- return (val >= 1 && val <= 5);
- }
- },
-
- /**
- * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * Additional HTTP headers that should be included
- * in the upload request.
- *
- *
- * @attribute uploadHeaders
- * @type {Object}
- * @default {}
- */
- uploadHeaders: {
- value: {}
- },
-
- /**
- * A Boolean that specifies whether the file should be
- * uploaded with the appropriate user credentials for the
- * domain.
- *
- * @attribute withCredentials
- * @type {Boolean}
- * @default true
- */
- withCredentials: {
- value: true
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
- }
-});
-
-Y.UploaderHTML5.Queue = UploaderQueue;
-
-
-
-}, '3.7.3', {"requires": ["widget", "node-event-simulate", "substitute", "file-html5", "uploader-queue"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-coverage.js b/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-coverage.js
deleted file mode 100644
index e39e0aee30f..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-coverage.js
+++ /dev/null
@@ -1,859 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
-}
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/uploader-queue/uploader-queue.js",
- code: []
-};
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"].code=["YUI.add('uploader-queue', function (Y, NAME) {","",""," /**"," * The class manages a queue of files that should be uploaded to the server."," * It initializes the required number of uploads, tracks them as they progress,"," * and automatically advances to the next upload when a preceding one has completed."," * @module uploader-queue"," */ ",""," var Lang = Y.Lang,"," Bind = Y.bind,"," Win = Y.config.win,"," queuedFiles,"," numberOfUploads, "," currentUploadedByteValues,"," currentFiles,"," totalBytesUploaded,"," totalBytes;",""," /**"," * This class manages a queue of files to be uploaded to the server."," * @class Uploader.Queue"," * @extends Base"," * @constructor"," * @param {Object} config Configuration object"," */"," var UploaderQueue = function(o) {"," this.queuedFiles = [];"," this.uploadRetries = {};"," this.numberOfUploads = 0;"," this.currentUploadedByteValues = {};"," this.currentFiles = {};"," this.totalBytesUploaded = 0;"," this.totalBytes = 0; "," "," UploaderQueue.superclass.constructor.apply(this, arguments);"," };","",""," Y.extend(UploaderQueue, Y.Base, {",""," /**"," * Stored value of the current queue state"," * @property _currentState"," * @type {String}"," * @protected"," * @default UploaderQueue.STOPPED"," */"," _currentState: UploaderQueue.STOPPED,",""," /**"," * Construction logic executed during UploaderQueue instantiation."," *"," * @method initializer"," * @protected"," */"," initializer : function (cfg) {",""," },",""," /**"," * Handles and retransmits upload start event."," * "," * @method _uploadStartHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadStartHandler : function (event) {"," var updatedEvent = event;"," updatedEvent.file = event.target;"," updatedEvent.originEvent = event;"," "," this.fire(\"uploadstart\", updatedEvent); "," },",""," /**"," * Handles and retransmits upload error event."," * "," * @method _uploadErrorHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadErrorHandler : function (event) {"," var errorAction = this.get(\"errorAction\");"," var updatedEvent = event;"," updatedEvent.file = event.target;"," updatedEvent.originEvent = event;",""," this.numberOfUploads-=1;"," delete this.currentFiles[event.target.get(\"id\")];"," this._detachFileEvents(event.target);",""," event.target.cancelUpload();",""," if (errorAction === UploaderQueue.STOP) {"," this.pauseUpload();"," }",""," else if (errorAction === UploaderQueue.RESTART_ASAP) {"," var fileid = event.target.get(\"id\"),"," retries = this.uploadRetries[fileid] || 0;"," if (retries < this.get(\"retryCount\")) {"," this.uploadRetries[fileid] = retries + 1;"," this.addToQueueTop(event.target);"," }"," this._startNextFile();"," }"," else if (errorAction === UploaderQueue.RESTART_AFTER) {"," var fileid = event.target.get(\"id\"),"," retries = this.uploadRetries[fileid] || 0;"," if (retries < this.get(\"retryCount\")) {"," this.uploadRetries[fileid] = retries + 1;"," this.addToQueueBottom(event.target);"," }"," this._startNextFile();"," }",""," this.fire(\"uploaderror\", updatedEvent); "," },",""," /**"," * Launches the upload of the next file in the queue."," * "," * @method _startNextFile"," * @private"," */"," _startNextFile : function () {"," if (this.queuedFiles.length > 0) {"," var currentFile = this.queuedFiles.shift(),"," fileId = currentFile.get(\"id\"),"," parameters = this.get(\"perFileParameters\"),"," fileParameters = parameters.hasOwnProperty(fileId) ? parameters[fileId] : parameters;",""," this.currentUploadedByteValues[fileId] = 0;",""," currentFile.on(\"uploadstart\", this._uploadStartHandler, this);"," currentFile.on(\"uploadprogress\", this._uploadProgressHandler, this);"," currentFile.on(\"uploadcomplete\", this._uploadCompleteHandler, this);"," currentFile.on(\"uploaderror\", this._uploadErrorHandler, this);"," currentFile.on(\"uploadcancel\", this._uploadCancelHandler, this);",""," currentFile.set(\"xhrHeaders\", this.get(\"uploadHeaders\"));"," currentFile.set(\"xhrWithCredentials\", this.get(\"withCredentials\"));",""," currentFile.startUpload(this.get(\"uploadURL\"), fileParameters, this.get(\"fileFieldName\"));",""," this._registerUpload(currentFile);"," }"," },",""," /**"," * Register a new upload process."," * "," * @method _registerUpload"," * @private"," */"," _registerUpload : function (file) {"," this.numberOfUploads += 1;"," this.currentFiles[file.get(\"id\")] = file;"," },",""," /**"," * Unregisters a new upload process."," * "," * @method _unregisterUpload"," * @private"," */"," _unregisterUpload : function (file) {"," if (this.numberOfUploads > 0) {"," this.numberOfUploads -=1;"," }"," delete this.currentFiles[file.get(\"id\")];"," delete this.uploadRetries[file.get(\"id\")];",""," this._detachFileEvents(file);"," },",""," _detachFileEvents : function (file) {"," file.detach(\"uploadstart\", this._uploadStartHandler);"," file.detach(\"uploadprogress\", this._uploadProgressHandler);"," file.detach(\"uploadcomplete\", this._uploadCompleteHandler);"," file.detach(\"uploaderror\", this._uploadErrorHandler);"," file.detach(\"uploadcancel\", this._uploadCancelHandler);"," },",""," /**"," * Handles and retransmits upload complete event."," * "," * @method _uploadCompleteHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadCompleteHandler : function (event) {",""," this._unregisterUpload(event.target);",""," this.totalBytesUploaded += event.target.get(\"size\");"," delete this.currentUploadedByteValues[event.target.get(\"id\")];","",""," if (this.queuedFiles.length > 0 && this._currentState === UploaderQueue.UPLOADING) {"," this._startNextFile();"," }"," "," var updatedEvent = event;"," updatedEvent.file = event.target;"," updatedEvent.originEvent = event;",""," var uploadedTotal = this.totalBytesUploaded;",""," Y.each(this.currentUploadedByteValues, function (value) {"," uploadedTotal += value; "," });"," "," var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100); "," "," this.fire(\"totaluploadprogress\", {bytesLoaded: uploadedTotal, "," bytesTotal: this.totalBytes,"," percentLoaded: percentLoaded});",""," this.fire(\"uploadcomplete\", updatedEvent);",""," if (this.queuedFiles.length === 0 && this.numberOfUploads <= 0) {"," this.fire(\"alluploadscomplete\");"," this._currentState = UploaderQueue.STOPPED;"," }","",""," },",""," /**"," * Handles and retransmits upload cancel event."," * "," * @method _uploadCancelHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadCancelHandler : function (event) {"," "," var updatedEvent = event;"," updatedEvent.originEvent = event;"," updatedEvent.file = event.target;",""," this.fire(\"uploadcacel\", updatedEvent);"," },","","",""," /**"," * Handles and retransmits upload progress event."," * "," * @method _uploadProgressHandler"," * @param event The event dispatched during the upload process."," * @private"," */"," _uploadProgressHandler : function (event) {"," "," this.currentUploadedByteValues[event.target.get(\"id\")] = event.bytesLoaded;"," "," var updatedEvent = event;"," updatedEvent.originEvent = event;"," updatedEvent.file = event.target;",""," this.fire(\"uploadprogress\", updatedEvent);"," "," var uploadedTotal = this.totalBytesUploaded;",""," Y.each(this.currentUploadedByteValues, function (value) {"," uploadedTotal += value; "," });"," "," var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100);",""," this.fire(\"totaluploadprogress\", {bytesLoaded: uploadedTotal, "," bytesTotal: this.totalBytes,"," percentLoaded: percentLoaded});"," },",""," /**"," * Starts uploading the queued up file list."," * "," * @method startUpload"," */"," startUpload: function() {"," "," this.queuedFiles = this.get(\"fileList\").slice(0);"," this.numberOfUploads = 0;"," this.currentUploadedByteValues = {};"," this.currentFiles = {};"," this.totalBytesUploaded = 0;"," "," this._currentState = UploaderQueue.UPLOADING;",""," while (this.numberOfUploads < this.get(\"simUploads\") && this.queuedFiles.length > 0) {"," this._startNextFile();"," }"," },",""," /**"," * Pauses the upload process. The ongoing file uploads"," * will complete after this method is called, but no"," * new ones will be launched."," * "," * @method pauseUpload"," */"," pauseUpload: function () {"," this._currentState = UploaderQueue.STOPPED;"," },",""," /**"," * Restarts a paused upload process."," * "," * @method restartUpload"," */"," restartUpload: function () {"," this._currentState = UploaderQueue.UPLOADING;"," while (this.numberOfUploads < this.get(\"simUploads\")) {"," this._startNextFile();"," }"," },",""," /**"," * If a particular file is stuck in an ongoing upload without"," * any progress events, this method allows to force its reupload"," * by cancelling its upload and immediately relaunching it."," * "," * @method forceReupload"," * @param file {Y.File} The file to force reupload on."," */"," forceReupload : function (file) {"," var id = file.get(\"id\");"," if (this.currentFiles.hasOwnProperty(id)) {"," file.cancelUpload();"," this._unregisterUpload(file);"," this.addToQueueTop(file);"," this._startNextFile();"," }"," },",""," /**"," * Add a new file to the top of the queue (the upload will be"," * launched as soon as the current number of uploading files"," * drops below the maximum permissible value)."," * "," * @method addToQueueTop"," * @param file {Y.File} The file to add to the top of the queue."," */"," addToQueueTop: function (file) {"," this.queuedFiles.unshift(file);"," },",""," /**"," * Add a new file to the bottom of the queue (the upload will be"," * launched after all the other queued files are uploaded.)"," * "," * @method addToQueueBottom"," * @param file {Y.File} The file to add to the bottom of the queue."," */"," addToQueueBottom: function (file) {"," this.queuedFiles.push(file);"," },",""," /**"," * Cancels a specific file's upload. If no argument is passed,"," * all ongoing uploads are cancelled and the upload process is"," * stopped."," * "," * @method cancelUpload"," * @param file {Y.File} An optional parameter - the file whose upload"," * should be cancelled."," */"," cancelUpload: function (file) {",""," if (file) {"," var id = file.get(\"id\");"," if (this.currentFiles[id]) {"," this.currentFiles[id].cancelUpload();"," this._unregisterUpload(this.currentFiles[id]);"," if (this._currentState === UploaderQueue.UPLOADING) {"," this._startNextFile();"," }"," }"," else {"," for (var i = 0, len = this.queuedFiles.length; i < len; i++) {"," if (this.queuedFiles[i].get(\"id\") === id) {"," this.queuedFiles.splice(i, 1);"," break;"," }"," }"," }"," }"," else {"," for (var fid in this.currentFiles) {"," this.currentFiles[fid].cancelUpload();"," this._unregisterUpload(this.currentFiles[fid]);"," }",""," this.currentUploadedByteValues = {};"," this.currentFiles = {};"," this.totalBytesUploaded = 0;"," this.fire(\"alluploadscancelled\");"," this._currentState = UploaderQueue.STOPPED;"," }"," }"," }, ",""," {"," /** "," * Static constant for the value of the `errorAction` attribute:"," * prescribes the queue to continue uploading files in case of "," * an error."," * @property CONTINUE"," * @readOnly"," * @type {String}"," * @static"," */"," CONTINUE: \"continue\",",""," /** "," * Static constant for the value of the `errorAction` attribute:"," * prescribes the queue to stop uploading files in case of "," * an error."," * @property STOP"," * @readOnly"," * @type {String}"," * @static"," */"," STOP: \"stop\",",""," /** "," * Static constant for the value of the `errorAction` attribute:"," * prescribes the queue to restart a file upload immediately in case of "," * an error."," * @property RESTART_ASAP"," * @readOnly"," * @type {String}"," * @static"," */"," RESTART_ASAP: \"restartasap\",",""," /** "," * Static constant for the value of the `errorAction` attribute:"," * prescribes the queue to restart an errored out file upload after "," * other files have finished uploading."," * @property RESTART_AFTER"," * @readOnly"," * @type {String}"," * @static"," */"," RESTART_AFTER: \"restartafter\",",""," /** "," * Static constant for the value of the `_currentState` property:"," * implies that the queue is currently not uploading files."," * @property STOPPED"," * @readOnly"," * @type {String}"," * @static"," */"," STOPPED: \"stopped\",",""," /** "," * Static constant for the value of the `_currentState` property:"," * implies that the queue is currently uploading files."," * @property UPLOADING"," * @readOnly"," * @type {String}"," * @static"," */"," UPLOADING: \"uploading\",",""," /**"," * The identity of the class."," *"," * @property NAME"," * @type String"," * @default 'uploaderqueue'"," * @readOnly"," * @protected"," * @static"," */"," NAME: 'uploaderqueue',",""," /**"," * Static property used to define the default attribute configuration of"," * the class."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {"," "," /**"," * Maximum number of simultaneous uploads; must be in the"," * range between 1 and 5. The value of `2` is default. It"," * is recommended that this value does not exceed 3."," * @property simUploads"," * @type Number"," * @default 2"," */"," simUploads: {"," value: 2,"," validator: function (val, name) {"," return (val >= 1 && val <= 5);"," }"," },"," "," /**"," * The action to take in case of error. The valid values for this attribute are: "," * `Y.Uploader.Queue.CONTINUE` (the upload process should continue on other files, "," * ignoring the error), `Y.Uploader.Queue.STOP` (the upload process "," * should stop completely), `Y.Uploader.Queue.RESTART_ASAP` (the upload "," * should restart immediately on the errored out file and continue as planned), or"," * Y.Uploader.Queue.RESTART_AFTER (the upload of the errored out file should restart"," * after all other files have uploaded)"," * @property errorAction"," * @type String"," * @default Y.Uploader.Queue.CONTINUE"," */"," errorAction: {"," value: \"continue\","," validator: function (val, name) {"," return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);"," }"," },",""," /**"," * The total number of bytes that has been uploaded."," * @property bytesUploaded"," * @type Number"," */ "," bytesUploaded: {"," readOnly: true,"," value: 0"," },"," "," /**"," * The total number of bytes in the queue."," * @property bytesTotal"," * @type Number"," */ "," bytesTotal: {"," readOnly: true,"," value: 0"," },",""," /**"," * The queue file list. This file list should only be modified"," * before the upload has been started; modifying it after starting"," * the upload has no effect, and `addToQueueTop` or `addToQueueBottom` methods"," * should be used instead."," * @property fileList"," * @type Number"," */ "," fileList: {"," value: [],"," lazyAdd: false,"," setter: function (val) {"," var newValue = val;"," Y.Array.each(newValue, function (value) {"," this.totalBytes += value.get(\"size\");"," }, this);"," "," return val;"," } "," },",""," /**"," * A String specifying what should be the POST field name for the file"," * content in the upload request."," *"," * @attribute fileFieldName"," * @type {String}"," * @default Filedata"," */ "," fileFieldName: {"," value: \"Filedata\""," },",""," /**"," * The URL to POST the file upload requests to."," *"," * @attribute uploadURL"," * @type {String}"," * @default \"\""," */ "," uploadURL: {"," value: \"\""," },",""," /**"," * Additional HTTP headers that should be included"," * in the upload request. Due to Flash Player security"," * restrictions, this attribute is only honored in the"," * HTML5 Uploader."," *"," * @attribute uploadHeaders"," * @type {Object}"," * @default {}"," */ "," uploadHeaders: {"," value: {}"," },",""," /**"," * A Boolean that specifies whether the file should be"," * uploaded with the appropriate user credentials for the"," * domain. Due to Flash Player security restrictions, this"," * attribute is only honored in the HTML5 Uploader."," *"," * @attribute withCredentials"," * @type {Boolean}"," * @default true"," */ "," withCredentials: {"," value: true"," },","",""," /**"," * An object, keyed by `fileId`, containing sets of key-value pairs"," * that should be passed as POST variables along with each corresponding"," * file."," *"," * @attribute perFileParameters"," * @type {Object}"," * @default {}"," */ "," perFileParameters: {"," value: {}"," },",""," /**"," * The number of times to try re-uploading a file that failed to upload before"," * cancelling its upload."," *"," * @attribute retryCount"," * @type {Number}"," * @default 3"," */ "," retryCount: {"," value: 3"," }",""," }"," });","",""," Y.namespace('Uploader');"," Y.Uploader.Queue = UploaderQueue;","","}, '3.7.3', {\"requires\": [\"base\"]});"];
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"].lines = {"1":0,"11":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"37":0,"41":0,"70":0,"71":0,"72":0,"74":0,"85":0,"86":0,"87":0,"88":0,"90":0,"91":0,"92":0,"94":0,"96":0,"97":0,"100":0,"101":0,"103":0,"104":0,"105":0,"107":0,"109":0,"110":0,"112":0,"113":0,"114":0,"116":0,"119":0,"129":0,"130":0,"135":0,"137":0,"138":0,"139":0,"140":0,"141":0,"143":0,"144":0,"146":0,"148":0,"159":0,"160":0,"170":0,"171":0,"173":0,"174":0,"176":0,"180":0,"181":0,"182":0,"183":0,"184":0,"196":0,"198":0,"199":0,"202":0,"203":0,"206":0,"207":0,"208":0,"210":0,"212":0,"213":0,"216":0,"218":0,"222":0,"224":0,"225":0,"226":0,"241":0,"242":0,"243":0,"245":0,"259":0,"261":0,"262":0,"263":0,"265":0,"267":0,"269":0,"270":0,"273":0,"275":0,"287":0,"288":0,"289":0,"290":0,"291":0,"293":0,"295":0,"296":0,"308":0,"317":0,"318":0,"319":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"350":0,"361":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"385":0,"386":0,"387":0,"388":0,"394":0,"395":0,"396":0,"399":0,"400":0,"401":0,"402":0,"403":0,"507":0,"526":0,"562":0,"563":0,"564":0,"567":0,"652":0,"653":0};
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"].functions = {"UploaderQueue:28":0,"_uploadStartHandler:69":0,"_uploadErrorHandler:84":0,"_startNextFile:128":0,"_registerUpload:158":0,"_unregisterUpload:169":0,"_detachFileEvents:179":0,"(anonymous 2):212":0,"_uploadCompleteHandler:194":0,"_uploadCancelHandler:239":0,"(anonymous 3):269":0,"_uploadProgressHandler:257":0,"startUpload:285":0,"pauseUpload:307":0,"restartUpload:316":0,"forceReupload:331":0,"addToQueueTop:349":0,"addToQueueBottom:360":0,"cancelUpload:373":0,"validator:506":0,"validator:525":0,"(anonymous 4):563":0,"setter:561":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"].coveredLines = 141;
-_yuitest_coverage["build/uploader-queue/uploader-queue.js"].coveredFunctions = 24;
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 1);
-YUI.add('uploader-queue', function (Y, NAME) {
-
-
- /**
- * The class manages a queue of files that should be uploaded to the server.
- * It initializes the required number of uploads, tracks them as they progress,
- * and automatically advances to the next upload when a preceding one has completed.
- * @module uploader-queue
- */
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 11);
-var Lang = Y.Lang,
- Bind = Y.bind,
- Win = Y.config.win,
- queuedFiles,
- numberOfUploads,
- currentUploadedByteValues,
- currentFiles,
- totalBytesUploaded,
- totalBytes;
-
- /**
- * This class manages a queue of files to be uploaded to the server.
- * @class Uploader.Queue
- * @extends Base
- * @constructor
- * @param {Object} config Configuration object
- */
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 28);
-var UploaderQueue = function(o) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "UploaderQueue", 28);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 29);
-this.queuedFiles = [];
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 30);
-this.uploadRetries = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 31);
-this.numberOfUploads = 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 32);
-this.currentUploadedByteValues = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 33);
-this.currentFiles = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 34);
-this.totalBytesUploaded = 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 35);
-this.totalBytes = 0;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 37);
-UploaderQueue.superclass.constructor.apply(this, arguments);
- };
-
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 41);
-Y.extend(UploaderQueue, Y.Base, {
-
- /**
- * Stored value of the current queue state
- * @property _currentState
- * @type {String}
- * @protected
- * @default UploaderQueue.STOPPED
- */
- _currentState: UploaderQueue.STOPPED,
-
- /**
- * Construction logic executed during UploaderQueue instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function (cfg) {
-
- },
-
- /**
- * Handles and retransmits upload start event.
- *
- * @method _uploadStartHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadStartHandler : function (event) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_uploadStartHandler", 69);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 70);
-var updatedEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 71);
-updatedEvent.file = event.target;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 72);
-updatedEvent.originEvent = event;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 74);
-this.fire("uploadstart", updatedEvent);
- },
-
- /**
- * Handles and retransmits upload error event.
- *
- * @method _uploadErrorHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadErrorHandler : function (event) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_uploadErrorHandler", 84);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 85);
-var errorAction = this.get("errorAction");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 86);
-var updatedEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 87);
-updatedEvent.file = event.target;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 88);
-updatedEvent.originEvent = event;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 90);
-this.numberOfUploads-=1;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 91);
-delete this.currentFiles[event.target.get("id")];
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 92);
-this._detachFileEvents(event.target);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 94);
-event.target.cancelUpload();
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 96);
-if (errorAction === UploaderQueue.STOP) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 97);
-this.pauseUpload();
- }
-
- else {_yuitest_coverline("build/uploader-queue/uploader-queue.js", 100);
-if (errorAction === UploaderQueue.RESTART_ASAP) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 101);
-var fileid = event.target.get("id"),
- retries = this.uploadRetries[fileid] || 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 103);
-if (retries < this.get("retryCount")) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 104);
-this.uploadRetries[fileid] = retries + 1;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 105);
-this.addToQueueTop(event.target);
- }
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 107);
-this._startNextFile();
- }
- else {_yuitest_coverline("build/uploader-queue/uploader-queue.js", 109);
-if (errorAction === UploaderQueue.RESTART_AFTER) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 110);
-var fileid = event.target.get("id"),
- retries = this.uploadRetries[fileid] || 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 112);
-if (retries < this.get("retryCount")) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 113);
-this.uploadRetries[fileid] = retries + 1;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 114);
-this.addToQueueBottom(event.target);
- }
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 116);
-this._startNextFile();
- }}}
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 119);
-this.fire("uploaderror", updatedEvent);
- },
-
- /**
- * Launches the upload of the next file in the queue.
- *
- * @method _startNextFile
- * @private
- */
- _startNextFile : function () {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_startNextFile", 128);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 129);
-if (this.queuedFiles.length > 0) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 130);
-var currentFile = this.queuedFiles.shift(),
- fileId = currentFile.get("id"),
- parameters = this.get("perFileParameters"),
- fileParameters = parameters.hasOwnProperty(fileId) ? parameters[fileId] : parameters;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 135);
-this.currentUploadedByteValues[fileId] = 0;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 137);
-currentFile.on("uploadstart", this._uploadStartHandler, this);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 138);
-currentFile.on("uploadprogress", this._uploadProgressHandler, this);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 139);
-currentFile.on("uploadcomplete", this._uploadCompleteHandler, this);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 140);
-currentFile.on("uploaderror", this._uploadErrorHandler, this);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 141);
-currentFile.on("uploadcancel", this._uploadCancelHandler, this);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 143);
-currentFile.set("xhrHeaders", this.get("uploadHeaders"));
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 144);
-currentFile.set("xhrWithCredentials", this.get("withCredentials"));
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 146);
-currentFile.startUpload(this.get("uploadURL"), fileParameters, this.get("fileFieldName"));
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 148);
-this._registerUpload(currentFile);
- }
- },
-
- /**
- * Register a new upload process.
- *
- * @method _registerUpload
- * @private
- */
- _registerUpload : function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_registerUpload", 158);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 159);
-this.numberOfUploads += 1;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 160);
-this.currentFiles[file.get("id")] = file;
- },
-
- /**
- * Unregisters a new upload process.
- *
- * @method _unregisterUpload
- * @private
- */
- _unregisterUpload : function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_unregisterUpload", 169);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 170);
-if (this.numberOfUploads > 0) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 171);
-this.numberOfUploads -=1;
- }
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 173);
-delete this.currentFiles[file.get("id")];
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 174);
-delete this.uploadRetries[file.get("id")];
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 176);
-this._detachFileEvents(file);
- },
-
- _detachFileEvents : function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_detachFileEvents", 179);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 180);
-file.detach("uploadstart", this._uploadStartHandler);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 181);
-file.detach("uploadprogress", this._uploadProgressHandler);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 182);
-file.detach("uploadcomplete", this._uploadCompleteHandler);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 183);
-file.detach("uploaderror", this._uploadErrorHandler);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 184);
-file.detach("uploadcancel", this._uploadCancelHandler);
- },
-
- /**
- * Handles and retransmits upload complete event.
- *
- * @method _uploadCompleteHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadCompleteHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_uploadCompleteHandler", 194);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 196);
-this._unregisterUpload(event.target);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 198);
-this.totalBytesUploaded += event.target.get("size");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 199);
-delete this.currentUploadedByteValues[event.target.get("id")];
-
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 202);
-if (this.queuedFiles.length > 0 && this._currentState === UploaderQueue.UPLOADING) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 203);
-this._startNextFile();
- }
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 206);
-var updatedEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 207);
-updatedEvent.file = event.target;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 208);
-updatedEvent.originEvent = event;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 210);
-var uploadedTotal = this.totalBytesUploaded;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 212);
-Y.each(this.currentUploadedByteValues, function (value) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "(anonymous 2)", 212);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 213);
-uploadedTotal += value;
- });
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 216);
-var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 218);
-this.fire("totaluploadprogress", {bytesLoaded: uploadedTotal,
- bytesTotal: this.totalBytes,
- percentLoaded: percentLoaded});
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 222);
-this.fire("uploadcomplete", updatedEvent);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 224);
-if (this.queuedFiles.length === 0 && this.numberOfUploads <= 0) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 225);
-this.fire("alluploadscomplete");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 226);
-this._currentState = UploaderQueue.STOPPED;
- }
-
-
- },
-
- /**
- * Handles and retransmits upload cancel event.
- *
- * @method _uploadCancelHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadCancelHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_uploadCancelHandler", 239);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 241);
-var updatedEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 242);
-updatedEvent.originEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 243);
-updatedEvent.file = event.target;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 245);
-this.fire("uploadcacel", updatedEvent);
- },
-
-
-
- /**
- * Handles and retransmits upload progress event.
- *
- * @method _uploadProgressHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadProgressHandler : function (event) {
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "_uploadProgressHandler", 257);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 259);
-this.currentUploadedByteValues[event.target.get("id")] = event.bytesLoaded;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 261);
-var updatedEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 262);
-updatedEvent.originEvent = event;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 263);
-updatedEvent.file = event.target;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 265);
-this.fire("uploadprogress", updatedEvent);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 267);
-var uploadedTotal = this.totalBytesUploaded;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 269);
-Y.each(this.currentUploadedByteValues, function (value) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "(anonymous 3)", 269);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 270);
-uploadedTotal += value;
- });
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 273);
-var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 275);
-this.fire("totaluploadprogress", {bytesLoaded: uploadedTotal,
- bytesTotal: this.totalBytes,
- percentLoaded: percentLoaded});
- },
-
- /**
- * Starts uploading the queued up file list.
- *
- * @method startUpload
- */
- startUpload: function() {
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "startUpload", 285);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 287);
-this.queuedFiles = this.get("fileList").slice(0);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 288);
-this.numberOfUploads = 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 289);
-this.currentUploadedByteValues = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 290);
-this.currentFiles = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 291);
-this.totalBytesUploaded = 0;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 293);
-this._currentState = UploaderQueue.UPLOADING;
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 295);
-while (this.numberOfUploads < this.get("simUploads") && this.queuedFiles.length > 0) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 296);
-this._startNextFile();
- }
- },
-
- /**
- * Pauses the upload process. The ongoing file uploads
- * will complete after this method is called, but no
- * new ones will be launched.
- *
- * @method pauseUpload
- */
- pauseUpload: function () {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "pauseUpload", 307);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 308);
-this._currentState = UploaderQueue.STOPPED;
- },
-
- /**
- * Restarts a paused upload process.
- *
- * @method restartUpload
- */
- restartUpload: function () {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "restartUpload", 316);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 317);
-this._currentState = UploaderQueue.UPLOADING;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 318);
-while (this.numberOfUploads < this.get("simUploads")) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 319);
-this._startNextFile();
- }
- },
-
- /**
- * If a particular file is stuck in an ongoing upload without
- * any progress events, this method allows to force its reupload
- * by cancelling its upload and immediately relaunching it.
- *
- * @method forceReupload
- * @param file {Y.File} The file to force reupload on.
- */
- forceReupload : function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "forceReupload", 331);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 332);
-var id = file.get("id");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 333);
-if (this.currentFiles.hasOwnProperty(id)) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 334);
-file.cancelUpload();
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 335);
-this._unregisterUpload(file);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 336);
-this.addToQueueTop(file);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 337);
-this._startNextFile();
- }
- },
-
- /**
- * Add a new file to the top of the queue (the upload will be
- * launched as soon as the current number of uploading files
- * drops below the maximum permissible value).
- *
- * @method addToQueueTop
- * @param file {Y.File} The file to add to the top of the queue.
- */
- addToQueueTop: function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "addToQueueTop", 349);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 350);
-this.queuedFiles.unshift(file);
- },
-
- /**
- * Add a new file to the bottom of the queue (the upload will be
- * launched after all the other queued files are uploaded.)
- *
- * @method addToQueueBottom
- * @param file {Y.File} The file to add to the bottom of the queue.
- */
- addToQueueBottom: function (file) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "addToQueueBottom", 360);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 361);
-this.queuedFiles.push(file);
- },
-
- /**
- * Cancels a specific file's upload. If no argument is passed,
- * all ongoing uploads are cancelled and the upload process is
- * stopped.
- *
- * @method cancelUpload
- * @param file {Y.File} An optional parameter - the file whose upload
- * should be cancelled.
- */
- cancelUpload: function (file) {
-
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "cancelUpload", 373);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 375);
-if (file) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 376);
-var id = file.get("id");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 377);
-if (this.currentFiles[id]) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 378);
-this.currentFiles[id].cancelUpload();
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 379);
-this._unregisterUpload(this.currentFiles[id]);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 380);
-if (this._currentState === UploaderQueue.UPLOADING) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 381);
-this._startNextFile();
- }
- }
- else {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 385);
-for (var i = 0, len = this.queuedFiles.length; i < len; i++) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 386);
-if (this.queuedFiles[i].get("id") === id) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 387);
-this.queuedFiles.splice(i, 1);
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 388);
-break;
- }
- }
- }
- }
- else {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 394);
-for (var fid in this.currentFiles) {
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 395);
-this.currentFiles[fid].cancelUpload();
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 396);
-this._unregisterUpload(this.currentFiles[fid]);
- }
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 399);
-this.currentUploadedByteValues = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 400);
-this.currentFiles = {};
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 401);
-this.totalBytesUploaded = 0;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 402);
-this.fire("alluploadscancelled");
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 403);
-this._currentState = UploaderQueue.STOPPED;
- }
- }
- },
-
- {
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to continue uploading files in case of
- * an error.
- * @property CONTINUE
- * @readOnly
- * @type {String}
- * @static
- */
- CONTINUE: "continue",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to stop uploading files in case of
- * an error.
- * @property STOP
- * @readOnly
- * @type {String}
- * @static
- */
- STOP: "stop",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to restart a file upload immediately in case of
- * an error.
- * @property RESTART_ASAP
- * @readOnly
- * @type {String}
- * @static
- */
- RESTART_ASAP: "restartasap",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to restart an errored out file upload after
- * other files have finished uploading.
- * @property RESTART_AFTER
- * @readOnly
- * @type {String}
- * @static
- */
- RESTART_AFTER: "restartafter",
-
- /**
- * Static constant for the value of the `_currentState` property:
- * implies that the queue is currently not uploading files.
- * @property STOPPED
- * @readOnly
- * @type {String}
- * @static
- */
- STOPPED: "stopped",
-
- /**
- * Static constant for the value of the `_currentState` property:
- * implies that the queue is currently uploading files.
- * @property UPLOADING
- * @readOnly
- * @type {String}
- * @static
- */
- UPLOADING: "uploading",
-
- /**
- * The identity of the class.
- *
- * @property NAME
- * @type String
- * @default 'uploaderqueue'
- * @readOnly
- * @protected
- * @static
- */
- NAME: 'uploaderqueue',
-
- /**
- * Static property used to define the default attribute configuration of
- * the class.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * Maximum number of simultaneous uploads; must be in the
- * range between 1 and 5. The value of `2` is default. It
- * is recommended that this value does not exceed 3.
- * @property simUploads
- * @type Number
- * @default 2
- */
- simUploads: {
- value: 2,
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "validator", 506);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 507);
-return (val >= 1 && val <= 5);
- }
- },
-
- /**
- * The action to take in case of error. The valid values for this attribute are:
- * `Y.Uploader.Queue.CONTINUE` (the upload process should continue on other files,
- * ignoring the error), `Y.Uploader.Queue.STOP` (the upload process
- * should stop completely), `Y.Uploader.Queue.RESTART_ASAP` (the upload
- * should restart immediately on the errored out file and continue as planned), or
- * Y.Uploader.Queue.RESTART_AFTER (the upload of the errored out file should restart
- * after all other files have uploaded)
- * @property errorAction
- * @type String
- * @default Y.Uploader.Queue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "validator", 525);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 526);
-return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);
- }
- },
-
- /**
- * The total number of bytes that has been uploaded.
- * @property bytesUploaded
- * @type Number
- */
- bytesUploaded: {
- readOnly: true,
- value: 0
- },
-
- /**
- * The total number of bytes in the queue.
- * @property bytesTotal
- * @type Number
- */
- bytesTotal: {
- readOnly: true,
- value: 0
- },
-
- /**
- * The queue file list. This file list should only be modified
- * before the upload has been started; modifying it after starting
- * the upload has no effect, and `addToQueueTop` or `addToQueueBottom` methods
- * should be used instead.
- * @property fileList
- * @type Number
- */
- fileList: {
- value: [],
- lazyAdd: false,
- setter: function (val) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "setter", 561);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 562);
-var newValue = val;
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 563);
-Y.Array.each(newValue, function (value) {
- _yuitest_coverfunc("build/uploader-queue/uploader-queue.js", "(anonymous 4)", 563);
-_yuitest_coverline("build/uploader-queue/uploader-queue.js", 564);
-this.totalBytes += value.get("size");
- }, this);
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 567);
-return val;
- }
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The URL to POST the file upload requests to.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * Additional HTTP headers that should be included
- * in the upload request. Due to Flash Player security
- * restrictions, this attribute is only honored in the
- * HTML5 Uploader.
- *
- * @attribute uploadHeaders
- * @type {Object}
- * @default {}
- */
- uploadHeaders: {
- value: {}
- },
-
- /**
- * A Boolean that specifies whether the file should be
- * uploaded with the appropriate user credentials for the
- * domain. Due to Flash Player security restrictions, this
- * attribute is only honored in the HTML5 Uploader.
- *
- * @attribute withCredentials
- * @type {Boolean}
- * @default true
- */
- withCredentials: {
- value: true
- },
-
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file.
- *
- * @attribute perFileParameters
- * @type {Object}
- * @default {}
- */
- perFileParameters: {
- value: {}
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
-
- }
- });
-
-
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 652);
-Y.namespace('Uploader');
- _yuitest_coverline("build/uploader-queue/uploader-queue.js", 653);
-Y.Uploader.Queue = UploaderQueue;
-
-}, '3.7.3', {"requires": ["base"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-debug.js b/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-debug.js
deleted file mode 100644
index f5a36af2efe..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-debug.js
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader-queue', function (Y, NAME) {
-
-
- /**
- * The class manages a queue of files that should be uploaded to the server.
- * It initializes the required number of uploads, tracks them as they progress,
- * and automatically advances to the next upload when a preceding one has completed.
- * @module uploader-queue
- */
-
- var Lang = Y.Lang,
- Bind = Y.bind,
- Win = Y.config.win,
- queuedFiles,
- numberOfUploads,
- currentUploadedByteValues,
- currentFiles,
- totalBytesUploaded,
- totalBytes;
-
- /**
- * This class manages a queue of files to be uploaded to the server.
- * @class Uploader.Queue
- * @extends Base
- * @constructor
- * @param {Object} config Configuration object
- */
- var UploaderQueue = function(o) {
- this.queuedFiles = [];
- this.uploadRetries = {};
- this.numberOfUploads = 0;
- this.currentUploadedByteValues = {};
- this.currentFiles = {};
- this.totalBytesUploaded = 0;
- this.totalBytes = 0;
-
- UploaderQueue.superclass.constructor.apply(this, arguments);
- };
-
-
- Y.extend(UploaderQueue, Y.Base, {
-
- /**
- * Stored value of the current queue state
- * @property _currentState
- * @type {String}
- * @protected
- * @default UploaderQueue.STOPPED
- */
- _currentState: UploaderQueue.STOPPED,
-
- /**
- * Construction logic executed during UploaderQueue instantiation.
- *
- * @method initializer
- * @protected
- */
- initializer : function (cfg) {
-
- },
-
- /**
- * Handles and retransmits upload start event.
- *
- * @method _uploadStartHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadStartHandler : function (event) {
- var updatedEvent = event;
- updatedEvent.file = event.target;
- updatedEvent.originEvent = event;
-
- this.fire("uploadstart", updatedEvent);
- },
-
- /**
- * Handles and retransmits upload error event.
- *
- * @method _uploadErrorHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadErrorHandler : function (event) {
- var errorAction = this.get("errorAction");
- var updatedEvent = event;
- updatedEvent.file = event.target;
- updatedEvent.originEvent = event;
-
- this.numberOfUploads-=1;
- delete this.currentFiles[event.target.get("id")];
- this._detachFileEvents(event.target);
-
- event.target.cancelUpload();
-
- if (errorAction === UploaderQueue.STOP) {
- this.pauseUpload();
- }
-
- else if (errorAction === UploaderQueue.RESTART_ASAP) {
- var fileid = event.target.get("id"),
- retries = this.uploadRetries[fileid] || 0;
- if (retries < this.get("retryCount")) {
- this.uploadRetries[fileid] = retries + 1;
- this.addToQueueTop(event.target);
- }
- this._startNextFile();
- }
- else if (errorAction === UploaderQueue.RESTART_AFTER) {
- var fileid = event.target.get("id"),
- retries = this.uploadRetries[fileid] || 0;
- if (retries < this.get("retryCount")) {
- this.uploadRetries[fileid] = retries + 1;
- this.addToQueueBottom(event.target);
- }
- this._startNextFile();
- }
-
- this.fire("uploaderror", updatedEvent);
- },
-
- /**
- * Launches the upload of the next file in the queue.
- *
- * @method _startNextFile
- * @private
- */
- _startNextFile : function () {
- if (this.queuedFiles.length > 0) {
- var currentFile = this.queuedFiles.shift(),
- fileId = currentFile.get("id"),
- parameters = this.get("perFileParameters"),
- fileParameters = parameters.hasOwnProperty(fileId) ? parameters[fileId] : parameters;
-
- this.currentUploadedByteValues[fileId] = 0;
-
- currentFile.on("uploadstart", this._uploadStartHandler, this);
- currentFile.on("uploadprogress", this._uploadProgressHandler, this);
- currentFile.on("uploadcomplete", this._uploadCompleteHandler, this);
- currentFile.on("uploaderror", this._uploadErrorHandler, this);
- currentFile.on("uploadcancel", this._uploadCancelHandler, this);
-
- currentFile.set("xhrHeaders", this.get("uploadHeaders"));
- currentFile.set("xhrWithCredentials", this.get("withCredentials"));
-
- currentFile.startUpload(this.get("uploadURL"), fileParameters, this.get("fileFieldName"));
-
- this._registerUpload(currentFile);
- }
- },
-
- /**
- * Register a new upload process.
- *
- * @method _registerUpload
- * @private
- */
- _registerUpload : function (file) {
- this.numberOfUploads += 1;
- this.currentFiles[file.get("id")] = file;
- },
-
- /**
- * Unregisters a new upload process.
- *
- * @method _unregisterUpload
- * @private
- */
- _unregisterUpload : function (file) {
- if (this.numberOfUploads > 0) {
- this.numberOfUploads -=1;
- }
- delete this.currentFiles[file.get("id")];
- delete this.uploadRetries[file.get("id")];
-
- this._detachFileEvents(file);
- },
-
- _detachFileEvents : function (file) {
- file.detach("uploadstart", this._uploadStartHandler);
- file.detach("uploadprogress", this._uploadProgressHandler);
- file.detach("uploadcomplete", this._uploadCompleteHandler);
- file.detach("uploaderror", this._uploadErrorHandler);
- file.detach("uploadcancel", this._uploadCancelHandler);
- },
-
- /**
- * Handles and retransmits upload complete event.
- *
- * @method _uploadCompleteHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadCompleteHandler : function (event) {
-
- this._unregisterUpload(event.target);
-
- this.totalBytesUploaded += event.target.get("size");
- delete this.currentUploadedByteValues[event.target.get("id")];
-
-
- if (this.queuedFiles.length > 0 && this._currentState === UploaderQueue.UPLOADING) {
- this._startNextFile();
- }
-
- var updatedEvent = event;
- updatedEvent.file = event.target;
- updatedEvent.originEvent = event;
-
- var uploadedTotal = this.totalBytesUploaded;
-
- Y.each(this.currentUploadedByteValues, function (value) {
- uploadedTotal += value;
- });
-
- var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100);
-
- this.fire("totaluploadprogress", {bytesLoaded: uploadedTotal,
- bytesTotal: this.totalBytes,
- percentLoaded: percentLoaded});
-
- this.fire("uploadcomplete", updatedEvent);
-
- if (this.queuedFiles.length === 0 && this.numberOfUploads <= 0) {
- this.fire("alluploadscomplete");
- this._currentState = UploaderQueue.STOPPED;
- }
-
-
- },
-
- /**
- * Handles and retransmits upload cancel event.
- *
- * @method _uploadCancelHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadCancelHandler : function (event) {
-
- var updatedEvent = event;
- updatedEvent.originEvent = event;
- updatedEvent.file = event.target;
-
- this.fire("uploadcacel", updatedEvent);
- },
-
-
-
- /**
- * Handles and retransmits upload progress event.
- *
- * @method _uploadProgressHandler
- * @param event The event dispatched during the upload process.
- * @private
- */
- _uploadProgressHandler : function (event) {
-
- this.currentUploadedByteValues[event.target.get("id")] = event.bytesLoaded;
-
- var updatedEvent = event;
- updatedEvent.originEvent = event;
- updatedEvent.file = event.target;
-
- this.fire("uploadprogress", updatedEvent);
-
- var uploadedTotal = this.totalBytesUploaded;
-
- Y.each(this.currentUploadedByteValues, function (value) {
- uploadedTotal += value;
- });
-
- var percentLoaded = Math.min(100, Math.round(10000*uploadedTotal/this.totalBytes) / 100);
-
- this.fire("totaluploadprogress", {bytesLoaded: uploadedTotal,
- bytesTotal: this.totalBytes,
- percentLoaded: percentLoaded});
- },
-
- /**
- * Starts uploading the queued up file list.
- *
- * @method startUpload
- */
- startUpload: function() {
-
- this.queuedFiles = this.get("fileList").slice(0);
- this.numberOfUploads = 0;
- this.currentUploadedByteValues = {};
- this.currentFiles = {};
- this.totalBytesUploaded = 0;
-
- this._currentState = UploaderQueue.UPLOADING;
-
- while (this.numberOfUploads < this.get("simUploads") && this.queuedFiles.length > 0) {
- this._startNextFile();
- }
- },
-
- /**
- * Pauses the upload process. The ongoing file uploads
- * will complete after this method is called, but no
- * new ones will be launched.
- *
- * @method pauseUpload
- */
- pauseUpload: function () {
- this._currentState = UploaderQueue.STOPPED;
- },
-
- /**
- * Restarts a paused upload process.
- *
- * @method restartUpload
- */
- restartUpload: function () {
- this._currentState = UploaderQueue.UPLOADING;
- while (this.numberOfUploads < this.get("simUploads")) {
- this._startNextFile();
- }
- },
-
- /**
- * If a particular file is stuck in an ongoing upload without
- * any progress events, this method allows to force its reupload
- * by cancelling its upload and immediately relaunching it.
- *
- * @method forceReupload
- * @param file {Y.File} The file to force reupload on.
- */
- forceReupload : function (file) {
- var id = file.get("id");
- if (this.currentFiles.hasOwnProperty(id)) {
- file.cancelUpload();
- this._unregisterUpload(file);
- this.addToQueueTop(file);
- this._startNextFile();
- }
- },
-
- /**
- * Add a new file to the top of the queue (the upload will be
- * launched as soon as the current number of uploading files
- * drops below the maximum permissible value).
- *
- * @method addToQueueTop
- * @param file {Y.File} The file to add to the top of the queue.
- */
- addToQueueTop: function (file) {
- this.queuedFiles.unshift(file);
- },
-
- /**
- * Add a new file to the bottom of the queue (the upload will be
- * launched after all the other queued files are uploaded.)
- *
- * @method addToQueueBottom
- * @param file {Y.File} The file to add to the bottom of the queue.
- */
- addToQueueBottom: function (file) {
- this.queuedFiles.push(file);
- },
-
- /**
- * Cancels a specific file's upload. If no argument is passed,
- * all ongoing uploads are cancelled and the upload process is
- * stopped.
- *
- * @method cancelUpload
- * @param file {Y.File} An optional parameter - the file whose upload
- * should be cancelled.
- */
- cancelUpload: function (file) {
-
- if (file) {
- var id = file.get("id");
- if (this.currentFiles[id]) {
- this.currentFiles[id].cancelUpload();
- this._unregisterUpload(this.currentFiles[id]);
- if (this._currentState === UploaderQueue.UPLOADING) {
- this._startNextFile();
- }
- }
- else {
- for (var i = 0, len = this.queuedFiles.length; i < len; i++) {
- if (this.queuedFiles[i].get("id") === id) {
- this.queuedFiles.splice(i, 1);
- break;
- }
- }
- }
- }
- else {
- for (var fid in this.currentFiles) {
- this.currentFiles[fid].cancelUpload();
- this._unregisterUpload(this.currentFiles[fid]);
- }
-
- this.currentUploadedByteValues = {};
- this.currentFiles = {};
- this.totalBytesUploaded = 0;
- this.fire("alluploadscancelled");
- this._currentState = UploaderQueue.STOPPED;
- }
- }
- },
-
- {
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to continue uploading files in case of
- * an error.
- * @property CONTINUE
- * @readOnly
- * @type {String}
- * @static
- */
- CONTINUE: "continue",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to stop uploading files in case of
- * an error.
- * @property STOP
- * @readOnly
- * @type {String}
- * @static
- */
- STOP: "stop",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to restart a file upload immediately in case of
- * an error.
- * @property RESTART_ASAP
- * @readOnly
- * @type {String}
- * @static
- */
- RESTART_ASAP: "restartasap",
-
- /**
- * Static constant for the value of the `errorAction` attribute:
- * prescribes the queue to restart an errored out file upload after
- * other files have finished uploading.
- * @property RESTART_AFTER
- * @readOnly
- * @type {String}
- * @static
- */
- RESTART_AFTER: "restartafter",
-
- /**
- * Static constant for the value of the `_currentState` property:
- * implies that the queue is currently not uploading files.
- * @property STOPPED
- * @readOnly
- * @type {String}
- * @static
- */
- STOPPED: "stopped",
-
- /**
- * Static constant for the value of the `_currentState` property:
- * implies that the queue is currently uploading files.
- * @property UPLOADING
- * @readOnly
- * @type {String}
- * @static
- */
- UPLOADING: "uploading",
-
- /**
- * The identity of the class.
- *
- * @property NAME
- * @type String
- * @default 'uploaderqueue'
- * @readOnly
- * @protected
- * @static
- */
- NAME: 'uploaderqueue',
-
- /**
- * Static property used to define the default attribute configuration of
- * the class.
- *
- * @property ATTRS
- * @type {Object}
- * @protected
- * @static
- */
- ATTRS: {
-
- /**
- * Maximum number of simultaneous uploads; must be in the
- * range between 1 and 5. The value of `2` is default. It
- * is recommended that this value does not exceed 3.
- * @property simUploads
- * @type Number
- * @default 2
- */
- simUploads: {
- value: 2,
- validator: function (val, name) {
- return (val >= 1 && val <= 5);
- }
- },
-
- /**
- * The action to take in case of error. The valid values for this attribute are:
- * `Y.Uploader.Queue.CONTINUE` (the upload process should continue on other files,
- * ignoring the error), `Y.Uploader.Queue.STOP` (the upload process
- * should stop completely), `Y.Uploader.Queue.RESTART_ASAP` (the upload
- * should restart immediately on the errored out file and continue as planned), or
- * Y.Uploader.Queue.RESTART_AFTER (the upload of the errored out file should restart
- * after all other files have uploaded)
- * @property errorAction
- * @type String
- * @default Y.Uploader.Queue.CONTINUE
- */
- errorAction: {
- value: "continue",
- validator: function (val, name) {
- return (val === UploaderQueue.CONTINUE || val === UploaderQueue.STOP || val === UploaderQueue.RESTART_ASAP || val === UploaderQueue.RESTART_AFTER);
- }
- },
-
- /**
- * The total number of bytes that has been uploaded.
- * @property bytesUploaded
- * @type Number
- */
- bytesUploaded: {
- readOnly: true,
- value: 0
- },
-
- /**
- * The total number of bytes in the queue.
- * @property bytesTotal
- * @type Number
- */
- bytesTotal: {
- readOnly: true,
- value: 0
- },
-
- /**
- * The queue file list. This file list should only be modified
- * before the upload has been started; modifying it after starting
- * the upload has no effect, and `addToQueueTop` or `addToQueueBottom` methods
- * should be used instead.
- * @property fileList
- * @type Number
- */
- fileList: {
- value: [],
- lazyAdd: false,
- setter: function (val) {
- var newValue = val;
- Y.Array.each(newValue, function (value) {
- this.totalBytes += value.get("size");
- }, this);
-
- return val;
- }
- },
-
- /**
- * A String specifying what should be the POST field name for the file
- * content in the upload request.
- *
- * @attribute fileFieldName
- * @type {String}
- * @default Filedata
- */
- fileFieldName: {
- value: "Filedata"
- },
-
- /**
- * The URL to POST the file upload requests to.
- *
- * @attribute uploadURL
- * @type {String}
- * @default ""
- */
- uploadURL: {
- value: ""
- },
-
- /**
- * Additional HTTP headers that should be included
- * in the upload request. Due to Flash Player security
- * restrictions, this attribute is only honored in the
- * HTML5 Uploader.
- *
- * @attribute uploadHeaders
- * @type {Object}
- * @default {}
- */
- uploadHeaders: {
- value: {}
- },
-
- /**
- * A Boolean that specifies whether the file should be
- * uploaded with the appropriate user credentials for the
- * domain. Due to Flash Player security restrictions, this
- * attribute is only honored in the HTML5 Uploader.
- *
- * @attribute withCredentials
- * @type {Boolean}
- * @default true
- */
- withCredentials: {
- value: true
- },
-
-
- /**
- * An object, keyed by `fileId`, containing sets of key-value pairs
- * that should be passed as POST variables along with each corresponding
- * file.
- *
- * @attribute perFileParameters
- * @type {Object}
- * @default {}
- */
- perFileParameters: {
- value: {}
- },
-
- /**
- * The number of times to try re-uploading a file that failed to upload before
- * cancelling its upload.
- *
- * @attribute retryCount
- * @type {Number}
- * @default 3
- */
- retryCount: {
- value: 3
- }
-
- }
- });
-
-
- Y.namespace('Uploader');
- Y.Uploader.Queue = UploaderQueue;
-
-}, '3.7.3', {"requires": ["base"]});
diff --git a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-min.js b/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-min.js
deleted file mode 100644
index ad75741efdb..00000000000
--- a/lib/yuilib/3.7.3/build/uploader-queue/uploader-queue-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("uploader-queue",function(e,t){var n=e.Lang,r=e.bind,i=e.config.win,s,o,u,a,f,l,c=function(e){this.queuedFiles=[],this.uploadRetries={},this.numberOfUploads=0,this.currentUploadedByteValues={},this.currentFiles={},this.totalBytesUploaded=0,this.totalBytes=0,c.superclass.constructor.apply(this,arguments)};e.extend(c,e.Base,{_currentState:c.STOPPED,initializer:function(e){},_uploadStartHandler:function(e){var t=e;t.file=e.target,t.originEvent=e,this.fire("uploadstart",t)},_uploadErrorHandler:function(e){var t=this.get("errorAction"),n=e;n.file=e.target,n.originEvent=e,this.numberOfUploads-=1,delete this.currentFiles[e.target.get("id")],this._detachFileEvents(e.target),e.target.cancelUpload();if(t===c.STOP)this.pauseUpload();else if(t===c.RESTART_ASAP){var r=e.target.get("id"),i=this.uploadRetries[r]||0;i"," *
"," *"," * @property TYPE"," * @type {String}"," * @static"," */",""," var Win = Y.config.win;",""," if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {"," Y.Uploader = Y.UploaderHTML5;"," }",""," else if (Y.SWFDetect.isFlashVersionAtLeast(10,0,45)) {"," Y.Uploader = Y.UploaderFlash;"," }",""," else {"," Y.namespace(\"Uploader\");"," Y.Uploader.TYPE = \"none\";"," }","","}, '3.7.3', {\"requires\": [\"uploader-html5\", \"uploader-flash\"]});"];
-_yuitest_coverage["build/uploader/uploader.js"].lines = {"1":0,"37":0,"39":0,"40":0,"43":0,"44":0,"48":0,"49":0};
-_yuitest_coverage["build/uploader/uploader.js"].functions = {"(anonymous 1):1":0};
-_yuitest_coverage["build/uploader/uploader.js"].coveredLines = 8;
-_yuitest_coverage["build/uploader/uploader.js"].coveredFunctions = 1;
-_yuitest_coverline("build/uploader/uploader.js", 1);
-YUI.add('uploader', function (Y, NAME) {
-
-/**
- * Provides UI for selecting multiple files and functionality for
- * uploading multiple files to the server with support for either
- * html5 or Flash transport mechanisms, automatic queue management,
- * upload progress monitoring, and error events.
- * @module uploader
- * @main uploader
- * @since 3.5.0
- */
-
-/**
- * `Y.Uploader` serves as an alias for either `Y.UploaderFlash`
- * or `Y.UploaderHTML5`, depending on the feature set available
- * in a specific browser. If neither HTML5 nor Flash transport layers are available, `Y.Uploader.TYPE`
- * static property is set to `"none"`.
- *
- * @class Uploader
- */
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The possible values are:
- *
- *
- *
- * @property TYPE
- * @type {String}
- * @static
- */
-
- _yuitest_coverfunc("build/uploader/uploader.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/uploader/uploader.js", 37);
-var Win = Y.config.win;
-
- _yuitest_coverline("build/uploader/uploader.js", 39);
-if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {
- _yuitest_coverline("build/uploader/uploader.js", 40);
-Y.Uploader = Y.UploaderHTML5;
- }
-
- else {_yuitest_coverline("build/uploader/uploader.js", 43);
-if (Y.SWFDetect.isFlashVersionAtLeast(10,0,45)) {
- _yuitest_coverline("build/uploader/uploader.js", 44);
-Y.Uploader = Y.UploaderFlash;
- }
-
- else {
- _yuitest_coverline("build/uploader/uploader.js", 48);
-Y.namespace("Uploader");
- _yuitest_coverline("build/uploader/uploader.js", 49);
-Y.Uploader.TYPE = "none";
- }}
-
-}, '3.7.3', {"requires": ["uploader-html5", "uploader-flash"]});
diff --git a/lib/yuilib/3.7.3/build/uploader/uploader-debug.js b/lib/yuilib/3.7.3/build/uploader/uploader-debug.js
deleted file mode 100644
index f7abef81956..00000000000
--- a/lib/yuilib/3.7.3/build/uploader/uploader-debug.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader', function (Y, NAME) {
-
-/**
- * Provides UI for selecting multiple files and functionality for
- * uploading multiple files to the server with support for either
- * html5 or Flash transport mechanisms, automatic queue management,
- * upload progress monitoring, and error events.
- * @module uploader
- * @main uploader
- * @since 3.5.0
- */
-
-/**
- * `Y.Uploader` serves as an alias for either `Y.UploaderFlash`
- * or `Y.UploaderHTML5`, depending on the feature set available
- * in a specific browser. If neither HTML5 nor Flash transport layers are available, `Y.Uploader.TYPE`
- * static property is set to `"none"`.
- *
- * @class Uploader
- */
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The possible values are:
- *
- *
- *
- * @property TYPE
- * @type {String}
- * @static
- */
-
- var Win = Y.config.win;
-
- if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {
- Y.Uploader = Y.UploaderHTML5;
- }
-
- else if (Y.SWFDetect.isFlashVersionAtLeast(10,0,45)) {
- Y.Uploader = Y.UploaderFlash;
- }
-
- else {
- Y.namespace("Uploader");
- Y.Uploader.TYPE = "none";
- }
-
-}, '3.7.3', {"requires": ["uploader-html5", "uploader-flash"]});
diff --git a/lib/yuilib/3.7.3/build/uploader/uploader.js b/lib/yuilib/3.7.3/build/uploader/uploader.js
deleted file mode 100644
index f7abef81956..00000000000
--- a/lib/yuilib/3.7.3/build/uploader/uploader.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('uploader', function (Y, NAME) {
-
-/**
- * Provides UI for selecting multiple files and functionality for
- * uploading multiple files to the server with support for either
- * html5 or Flash transport mechanisms, automatic queue management,
- * upload progress monitoring, and error events.
- * @module uploader
- * @main uploader
- * @since 3.5.0
- */
-
-/**
- * `Y.Uploader` serves as an alias for either `Y.UploaderFlash`
- * or `Y.UploaderHTML5`, depending on the feature set available
- * in a specific browser. If neither HTML5 nor Flash transport layers are available, `Y.Uploader.TYPE`
- * static property is set to `"none"`.
- *
- * @class Uploader
- */
-
- /**
- * The static property reflecting the type of uploader that `Y.Uploader`
- * aliases. The possible values are:
- *
- *
- *
- * @property TYPE
- * @type {String}
- * @static
- */
-
- var Win = Y.config.win;
-
- if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {
- Y.Uploader = Y.UploaderHTML5;
- }
-
- else if (Y.SWFDetect.isFlashVersionAtLeast(10,0,45)) {
- Y.Uploader = Y.UploaderFlash;
- }
-
- else {
- Y.namespace("Uploader");
- Y.Uploader.TYPE = "none";
- }
-
-}, '3.7.3', {"requires": ["uploader-html5", "uploader-flash"]});
diff --git a/lib/yuilib/3.7.3/build/widget-skin/assets/widget-base-core.css b/lib/yuilib/3.7.3/build/widget-skin/assets/widget-base-core.css
deleted file mode 100644
index 9e5ce67a6a0..00000000000
--- a/lib/yuilib/3.7.3/build/widget-skin/assets/widget-base-core.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-hidden {
- display:none;
-}
-
-.yui3-widget-content {
- overflow:hidden;
-}
-
-.yui3-widget-content-expanded {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing:border-box;
- height:100%;
-}
-
-/* Only used for IE6, to go from a bigger size to a smaller size when using cb.sizeTo(bb) */
-.yui3-widget-tmp-forcesize {
- overflow:hidden !important;
-}
\ No newline at end of file
diff --git a/lib/yuilib/3.7.3/build/widget-uievents/assets/widget-base-core.css b/lib/yuilib/3.7.3/build/widget-uievents/assets/widget-base-core.css
deleted file mode 100644
index 9e5ce67a6a0..00000000000
--- a/lib/yuilib/3.7.3/build/widget-uievents/assets/widget-base-core.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-hidden {
- display:none;
-}
-
-.yui3-widget-content {
- overflow:hidden;
-}
-
-.yui3-widget-content-expanded {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing:border-box;
- height:100%;
-}
-
-/* Only used for IE6, to go from a bigger size to a smaller size when using cb.sizeTo(bb) */
-.yui3-widget-tmp-forcesize {
- overflow:hidden !important;
-}
\ No newline at end of file
diff --git a/lib/yuilib/3.7.3/build/yui-base/yui-base-coverage.js b/lib/yuilib/3.7.3/build/yui-base/yui-base-coverage.js
deleted file mode 100644
index 049f005c971..00000000000
--- a/lib/yuilib/3.7.3/build/yui-base/yui-base-coverage.js
+++ /dev/null
@@ -1,4795 +0,0 @@
-/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-if (typeof _yuitest_coverage == "undefined"){
- _yuitest_coverage = {};
- _yuitest_coverline = function(src, line){
- var coverage = _yuitest_coverage[src];
- if (!coverage.lines[line]){
- coverage.calledLines++;
- }
- coverage.lines[line]++;
- };
- _yuitest_coverfunc = function(src, name, line){
- var coverage = _yuitest_coverage[src],
- funcId = name + ":" + line;
- if (!coverage.functions[funcId]){
- coverage.calledFunctions++;
- }
- coverage.functions[funcId]++;
- };
-}
-_yuitest_coverage["build/yui-base/yui-base.js"] = {
- lines: {},
- functions: {},
- coveredLines: 0,
- calledLines: 0,
- coveredFunctions: 0,
- calledFunctions: 0,
- path: "build/yui-base/yui-base.js",
- code: []
-};
-_yuitest_coverage["build/yui-base/yui-base.js"].code=["/**"," * The YUI module contains the components required for building the YUI seed"," * file. This includes the script loading mechanism, a simple queue, and"," * the core utilities for the library."," * @module yui"," * @main yui"," * @submodule yui-base"," */","","if (typeof YUI != 'undefined') {"," YUI._YUI = YUI;","}","","/**","The YUI global namespace object. If YUI is already defined, the","existing YUI object will not be overwritten so that defined","namespaces are preserved. It is the constructor for the object","the end user interacts with. As indicated below, each instance","has full custom event support, but only if the event system","is available. This is a self-instantiable factory function. You","can invoke it directly like this:",""," YUI().use('*', function(Y) {"," // ready"," });","","But it also works like this:",""," var Y = YUI();","","Configuring the YUI object:",""," YUI({"," debug: true,"," combine: false"," }).use('node', function(Y) {"," //Node is ready to use"," });","","See the API docs for the Config class","for the complete list of supported configuration properties accepted","by the YUI constuctor.","","@class YUI","@constructor","@global","@uses EventTarget","@param [o]* {Object} 0..n optional configuration objects. these values","are store in Y.config. See Config for the list of supported","properties.","*/"," /*global YUI*/"," /*global YUI_config*/"," var YUI = function() {"," var i = 0,"," Y = this,"," args = arguments,"," l = args.length,"," instanceOf = function(o, type) {"," return (o && o.hasOwnProperty && (o instanceof type));"," },"," gconf = (typeof YUI_config !== 'undefined') && YUI_config;",""," if (!(instanceOf(Y, YUI))) {"," Y = new YUI();"," } else {"," // set up the core environment"," Y._init();",""," /**"," YUI.GlobalConfig is a master configuration that might span"," multiple contexts in a non-browser environment. It is applied"," first to all instances in all contexts."," @property GlobalConfig"," @type {Object}"," @global"," @static"," @example","",""," YUI.GlobalConfig = {"," filter: 'debug'"," };",""," YUI().use('node', function(Y) {"," //debug files used here"," });",""," YUI({"," filter: 'min'"," }).use('node', function(Y) {"," //min files used here"," });",""," */"," if (YUI.GlobalConfig) {"," Y.applyConfig(YUI.GlobalConfig);"," }",""," /**"," YUI_config is a page-level config. It is applied to all"," instances created on the page. This is applied after"," YUI.GlobalConfig, and before the instance level configuration"," objects."," @global"," @property YUI_config"," @type {Object}"," @example","",""," //Single global var to include before YUI seed file"," YUI_config = {"," filter: 'debug'"," };",""," YUI().use('node', function(Y) {"," //debug files used here"," });",""," YUI({"," filter: 'min'"," }).use('node', function(Y) {"," //min files used here"," });"," */"," if (gconf) {"," Y.applyConfig(gconf);"," }",""," // bind the specified additional modules for this instance"," if (!l) {"," Y._setup();"," }"," }",""," if (l) {"," // Each instance can accept one or more configuration objects."," // These are applied after YUI.GlobalConfig and YUI_Config,"," // overriding values set in those config files if there is a '"," // matching property."," for (; i < l; i++) {"," Y.applyConfig(args[i]);"," }",""," Y._setup();"," }",""," Y.instanceOf = instanceOf;",""," return Y;"," };","","(function() {",""," var proto, prop,"," VERSION = '3.7.3',"," PERIOD = '.',"," BASE = 'http://yui.yahooapis.com/',"," /*"," These CSS class names can't be generated by"," getClassName since it is not available at the"," time they are being used."," */"," DOC_LABEL = 'yui3-js-enabled',"," CSS_STAMP_EL = 'yui3-css-stamp',"," NOOP = function() {},"," SLICE = Array.prototype.slice,"," APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo"," 'io.xdrResponse': 1, // can call. this should"," 'SWF.eventHandler': 1 }, // be done at build time"," hasWin = (typeof window != 'undefined'),"," win = (hasWin) ? window : null,"," doc = (hasWin) ? win.document : null,"," docEl = doc && doc.documentElement,"," docClass = docEl && docEl.className,"," instances = {},"," time = new Date().getTime(),"," add = function(el, type, fn, capture) {"," if (el && el.addEventListener) {"," el.addEventListener(type, fn, capture);"," } else if (el && el.attachEvent) {"," el.attachEvent('on' + type, fn);"," }"," },"," remove = function(el, type, fn, capture) {"," if (el && el.removeEventListener) {"," // this can throw an uncaught exception in FF"," try {"," el.removeEventListener(type, fn, capture);"," } catch (ex) {}"," } else if (el && el.detachEvent) {"," el.detachEvent('on' + type, fn);"," }"," },"," handleLoad = function() {"," YUI.Env.windowLoaded = true;"," YUI.Env.DOMReady = true;"," if (hasWin) {"," remove(window, 'load', handleLoad);"," }"," },"," getLoader = function(Y, o) {"," var loader = Y.Env._loader,"," lCore = [ 'loader-base' ],"," G_ENV = YUI.Env,"," mods = G_ENV.mods;",""," if (loader) {"," //loader._config(Y.config);"," loader.ignoreRegistered = false;"," loader.onEnd = null;"," loader.data = null;"," loader.required = [];"," loader.loadType = null;"," } else {"," loader = new Y.Loader(Y.config);"," Y.Env._loader = loader;"," }"," if (mods && mods.loader) {"," lCore = [].concat(lCore, YUI.Env.loaderExtras);"," }"," YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, lCore));",""," return loader;"," },",""," clobber = function(r, s) {"," for (var i in s) {"," if (s.hasOwnProperty(i)) {"," r[i] = s[i];"," }"," }"," },",""," ALREADY_DONE = { success: true };","","// Stamp the documentElement (HTML) with a class of \"yui-loaded\" to","// enable styles that need to key off of JS being enabled.","if (docEl && docClass.indexOf(DOC_LABEL) == -1) {"," if (docClass) {"," docClass += ' ';"," }"," docClass += DOC_LABEL;"," docEl.className = docClass;","}","","if (VERSION.indexOf('@') > -1) {"," VERSION = '3.5.0'; // dev time hack for cdn test","}","","proto = {"," /**"," * Applies a new configuration object to the YUI instance config."," * This will merge new group/module definitions, and will also"," * update the loader cache if necessary. Updating Y.config directly"," * will not update the cache."," * @method applyConfig"," * @param {Object} o the configuration object."," * @since 3.2.0"," */"," applyConfig: function(o) {",""," o = o || NOOP;",""," var attr,"," name,"," // detail,"," config = this.config,"," mods = config.modules,"," groups = config.groups,"," aliases = config.aliases,"," loader = this.Env._loader;",""," for (name in o) {"," if (o.hasOwnProperty(name)) {"," attr = o[name];"," if (mods && name == 'modules') {"," clobber(mods, attr);"," } else if (aliases && name == 'aliases') {"," clobber(aliases, attr);"," } else if (groups && name == 'groups') {"," clobber(groups, attr);"," } else if (name == 'win') {"," config[name] = (attr && attr.contentWindow) || attr;"," config.doc = config[name] ? config[name].document : null;"," } else if (name == '_yuid') {"," // preserve the guid"," } else {"," config[name] = attr;"," }"," }"," }",""," if (loader) {"," loader._config(o);"," }",""," },"," /**"," * Old way to apply a config to the instance (calls `applyConfig` under the hood)"," * @private"," * @method _config"," * @param {Object} o The config to apply"," */"," _config: function(o) {"," this.applyConfig(o);"," },",""," /**"," * Initialize this YUI instance"," * @private"," * @method _init"," */"," _init: function() {"," var filter, el,"," Y = this,"," G_ENV = YUI.Env,"," Env = Y.Env,"," prop;",""," /**"," * The version number of the YUI instance."," * @property version"," * @type string"," */"," Y.version = VERSION;",""," if (!Env) {"," Y.Env = {"," core: ['get', 'features', 'intl-base', 'yui-log', 'yui-later'],"," loaderExtras: ['loader-rollup', 'loader-yui3'],"," mods: {}, // flat module map"," versions: {}, // version module map"," base: BASE,"," cdn: BASE + VERSION + '/build/',"," // bootstrapped: false,"," _idx: 0,"," _used: {},"," _attached: {},"," _missed: [],"," _yidx: 0,"," _uidx: 0,"," _guidp: 'y',"," _loaded: {},"," // serviced: {},"," // Regex in English:"," // I'll start at the \\b(simpleyui)."," // 1. Look in the test string for \"simpleyui\" or \"yui\" or"," // \"yui-base\" or \"yui-davglass\" or \"yui-foobar\" that comes after a word break. That is, it"," // can't match \"foyui\" or \"i_heart_simpleyui\". This can be anywhere in the string."," // 2. After #1 must come a forward slash followed by the string matched in #1, so"," // \"yui-base/yui-base\" or \"simpleyui/simpleyui\" or \"yui-pants/yui-pants\"."," // 3. The second occurence of the #1 token can optionally be followed by \"-debug\" or \"-min\","," // so \"yui/yui-min\", \"yui/yui-debug\", \"yui-base/yui-base-debug\". NOT \"yui/yui-tshirt\"."," // 4. This is followed by \".js\", so \"yui/yui.js\", \"simpleyui/simpleyui-min.js\""," // 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a \"?\" in the string,"," // then capture the junk between the LAST \"&\" and the string in 1-4. So"," // \"blah?foo/yui/yui.js\" will capture \"foo/\" and \"blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js\""," // will capture \"3.3.0/build/\""," //"," // Regex Exploded:"," // (?:\\? Find a ?"," // (?:[^&]*&) followed by 0..n characters followed by an &"," // * in fact, find as many sets of characters followed by a & as you can"," // ([^&]*) capture the stuff after the last & in \\1"," // )? but it's ok if all this ?junk&more_junk stuff isn't even there"," // \\b(simpleyui| after a word break find either the string \"simpleyui\" or"," // yui(?:-\\w+)? the string \"yui\" optionally followed by a -, then more characters"," // ) and store the simpleyui or yui-* string in \\2"," // \\/\\2 then comes a / followed by the simpleyui or yui-* string in \\2"," // (?:-(min|debug))? optionally followed by \"-min\" or \"-debug\""," // .js and ending in \".js\""," _BASE_RE: /(?:\\?(?:[^&]*&)*([^&]*))?\\b(simpleyui|yui(?:-\\w+)?)\\/\\2(?:-(min|debug))?\\.js/,"," parseBasePath: function(src, pattern) {"," var match = src.match(pattern),"," path, filter;",""," if (match) {"," path = RegExp.leftContext || src.slice(0, src.indexOf(match[0]));",""," // this is to set up the path to the loader. The file"," // filter for loader should match the yui include."," filter = match[3];",""," // extract correct path for mixed combo urls"," // http://yuilibrary.com/projects/yui3/ticket/2528423"," if (match[1]) {"," path += '?' + match[1];"," }"," path = {"," filter: filter,"," path: path"," };"," }"," return path;"," },"," getBase: G_ENV && G_ENV.getBase ||"," function(pattern) {"," var nodes = (doc && doc.getElementsByTagName('script')) || [],"," path = Env.cdn, parsed,"," i, len, src;",""," for (i = 0, len = nodes.length; i < len; ++i) {"," src = nodes[i].src;"," if (src) {"," parsed = Y.Env.parseBasePath(src, pattern);"," if (parsed) {"," filter = parsed.filter;"," path = parsed.path;"," break;"," }"," }"," }",""," // use CDN default"," return path;"," }",""," };",""," Env = Y.Env;",""," Env._loaded[VERSION] = {};",""," if (G_ENV && Y !== YUI) {"," Env._yidx = ++G_ENV._yidx;"," Env._guidp = ('yui_' + VERSION + '_' +"," Env._yidx + '_' + time).replace(/\\./g, '_').replace(/-/g, '_');"," } else if (YUI._YUI) {",""," G_ENV = YUI._YUI.Env;"," Env._yidx += G_ENV._yidx;"," Env._uidx += G_ENV._uidx;",""," for (prop in G_ENV) {"," if (!(prop in Env)) {"," Env[prop] = G_ENV[prop];"," }"," }",""," delete YUI._YUI;"," }",""," Y.id = Y.stamp(Y);"," instances[Y.id] = Y;",""," }",""," Y.constructor = YUI;",""," // configuration defaults"," Y.config = Y.config || {"," bootstrap: true,"," cacheUse: true,"," debug: true,"," doc: doc,"," fetchCSS: true,"," throwFail: true,"," useBrowserConsole: true,"," useNativeES5: true,"," win: win"," };",""," //Register the CSS stamp element"," if (doc && !doc.getElementById(CSS_STAMP_EL)) {"," el = doc.createElement('div');"," el.innerHTML = '';"," YUI.Env.cssStampEl = el.firstChild;"," if (doc.body) {"," doc.body.appendChild(YUI.Env.cssStampEl);"," } else {"," docEl.insertBefore(YUI.Env.cssStampEl, docEl.firstChild);"," }"," }",""," Y.config.lang = Y.config.lang || 'en-US';",""," Y.config.base = YUI.config.base || Y.Env.getBase(Y.Env._BASE_RE);",""," if (!filter || (!('mindebug').indexOf(filter))) {"," filter = 'min';"," }"," filter = (filter) ? '-' + filter : filter;"," Y.config.loaderPath = YUI.config.loaderPath || 'loader/loader' + filter + '.js';",""," },",""," /**"," * Finishes the instance setup. Attaches whatever modules were defined"," * when the yui modules was registered."," * @method _setup"," * @private"," */"," _setup: function(o) {"," var i, Y = this,"," core = [],"," mods = YUI.Env.mods,"," extras = Y.config.core || [].concat(YUI.Env.core); //Clone it..",""," for (i = 0; i < extras.length; i++) {"," if (mods[extras[i]]) {"," core.push(extras[i]);"," }"," }",""," Y._attach(['yui-base']);"," Y._attach(core);",""," if (Y.Loader) {"," getLoader(Y);"," }",""," },",""," /**"," * Executes a method on a YUI instance with"," * the specified id if the specified method is whitelisted."," * @method applyTo"," * @param id {String} the YUI instance id."," * @param method {String} the name of the method to exectute."," * Ex: 'Object.keys'."," * @param args {Array} the arguments to apply to the method."," * @return {Object} the return value from the applied method or null."," */"," applyTo: function(id, method, args) {"," if (!(method in APPLY_TO_AUTH)) {"," this.log(method + ': applyTo not allowed', 'warn', 'yui');"," return null;"," }",""," var instance = instances[id], nest, m, i;"," if (instance) {"," nest = method.split('.');"," m = instance;"," for (i = 0; i < nest.length; i = i + 1) {"," m = m[nest[i]];"," if (!m) {"," this.log('applyTo not found: ' + method, 'warn', 'yui');"," }"," }"," return m && m.apply(instance, args);"," }",""," return null;"," },","","/**","Registers a module with the YUI global. The easiest way to create a","first-class YUI module is to use the YUI component ","build tool Shifter.","","The build system will produce the `YUI.add` wrapper for your module, along","with any configuration info required for the module.","","@method add","@param name {String} module name.","@param fn {Function} entry point into the module that is used to bind module to the YUI instance.","@param {YUI} fn.Y The YUI instance this module is executed in.","@param {String} fn.name The name of the module","@param version {String} version string.","@param details {Object} optional config data:","@param details.requires {Array} features that must be present before this module can be attached.","@param details.optional {Array} optional features that should be present if loadOptional"," is defined. Note: modules are not often loaded this way in YUI 3,"," but this field is still useful to inform the user that certain"," features in the component will require additional dependencies.","@param details.use {Array} features that are included within this module which need to"," be attached automatically when this module is attached. This"," supports the YUI 3 rollup system -- a module with submodules"," defined will need to have the submodules listed in the 'use'"," config. The YUI component build tool does this for you.","@return {YUI} the YUI instance.","@example",""," YUI.add('davglass', function(Y, name) {"," Y.davglass = function() {"," alert('Dav was here!');"," };"," }, '3.4.0', { requires: ['yui-base', 'harley-davidson', 'mt-dew'] });","","*/"," add: function(name, fn, version, details) {"," details = details || {};"," var env = YUI.Env,"," mod = {"," name: name,"," fn: fn,"," version: version,"," details: details"," },"," //Instance hash so we don't apply it to the same instance twice"," applied = {},"," loader, inst,"," i, versions = env.versions;",""," env.mods[name] = mod;"," versions[version] = versions[version] || {};"," versions[version][name] = mod;",""," for (i in instances) {"," if (instances.hasOwnProperty(i)) {"," inst = instances[i];"," if (!applied[inst.id]) {"," applied[inst.id] = true;"," loader = inst.Env._loader;"," if (loader) {"," if (!loader.moduleInfo[name] || loader.moduleInfo[name].temp) {"," loader.addModule(details, name);"," }"," }"," }"," }"," }",""," return this;"," },",""," /**"," * Executes the function associated with each required"," * module, binding the module to the YUI instance."," * @param {Array} r The array of modules to attach"," * @param {Boolean} [moot=false] Don't throw a warning if the module is not attached"," * @method _attach"," * @private"," */"," _attach: function(r, moot) {"," var i, name, mod, details, req, use, after,"," mods = YUI.Env.mods,"," aliases = YUI.Env.aliases,"," Y = this, j,"," cache = YUI.Env._renderedMods,"," loader = Y.Env._loader,"," done = Y.Env._attached,"," len = r.length, loader, def, go,"," c = [];",""," //Check for conditional modules (in a second+ instance) and add their requirements"," //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass"," for (i = 0; i < len; i++) {"," name = r[i];"," mod = mods[name];"," c.push(name);"," if (loader && loader.conditions[name]) {"," for (j in loader.conditions[name]) {"," if (loader.conditions[name].hasOwnProperty(j)) {"," def = loader.conditions[name][j];"," go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y)));"," if (go) {"," c.push(def.name);"," }"," }"," }"," }"," }"," r = c;"," len = r.length;",""," for (i = 0; i < len; i++) {"," if (!done[r[i]]) {"," name = r[i];"," mod = mods[name];",""," if (aliases && aliases[name] && !mod) {"," Y._attach(aliases[name]);"," continue;"," }"," if (!mod) {"," if (loader && loader.moduleInfo[name]) {"," mod = loader.moduleInfo[name];"," moot = true;"," }","",""," //if (!loader || !loader.moduleInfo[name]) {"," //if ((!loader || !loader.moduleInfo[name]) && !moot) {"," if (!moot && name) {"," if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) {"," Y.Env._missed.push(name);"," Y.Env._missed = Y.Array.dedupe(Y.Env._missed);"," Y.message('NOT loaded: ' + name, 'warn', 'yui');"," }"," }"," } else {"," done[name] = true;"," //Don't like this, but in case a mod was asked for once, then we fetch it"," //We need to remove it from the missed list ^davglass"," for (j = 0; j < Y.Env._missed.length; j++) {"," if (Y.Env._missed[j] === name) {"," Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui');"," Y.Env._missed.splice(j, 1);"," }"," }"," /*"," If it's a temp module, we need to redo it's requirements if it's already loaded"," since it may have been loaded by another instance and it's dependencies might"," have been redefined inside the fetched file."," */"," if (loader && cache && cache[name] && cache[name].temp) {"," loader.getRequires(cache[name]);"," req = [];"," for (j in loader.moduleInfo[name].expanded_map) {"," if (loader.moduleInfo[name].expanded_map.hasOwnProperty(j)) {"," req.push(j);"," }"," }"," Y._attach(req);"," }"," "," details = mod.details;"," req = details.requires;"," use = details.use;"," after = details.after;"," //Force Intl load if there is a language (Loader logic) @todo fix this shit"," if (details.lang) {"," req = req || [];"," req.unshift('intl');"," }",""," if (req) {"," for (j = 0; j < req.length; j++) {"," if (!done[req[j]]) {"," if (!Y._attach(req)) {"," return false;"," }"," break;"," }"," }"," }",""," if (after) {"," for (j = 0; j < after.length; j++) {"," if (!done[after[j]]) {"," if (!Y._attach(after, true)) {"," return false;"," }"," break;"," }"," }"," }",""," if (mod.fn) {"," if (Y.config.throwFail) {"," mod.fn(Y, name);"," } else {"," try {"," mod.fn(Y, name);"," } catch (e) {"," Y.error('Attach error: ' + name, e, name);"," return false;"," }"," }"," }",""," if (use) {"," for (j = 0; j < use.length; j++) {"," if (!done[use[j]]) {"," if (!Y._attach(use)) {"," return false;"," }"," break;"," }"," }"," }","","",""," }"," }"," }",""," return true;"," },"," /**"," * Delays the `use` callback until another event has taken place. Like: window.onload, domready, contentready, available."," * @private"," * @method _delayCallback"," * @param {Callback} cb The original `use` callback"," * @param {String|Object} until Either an event (load, domready) or an Object containing event/args keys for contentready/available"," */"," _delayCallback: function(cb, until) {",""," var Y = this,"," mod = ['event-base'];",""," until = (Y.Lang.isObject(until) ? until : { event: until });",""," if (until.event === 'load') {"," mod.push('event-synthetic');"," }",""," return function() {"," var args = arguments;"," Y._use(mod, function() {"," Y.on(until.event, function() {"," args[1].delayUntil = until.event;"," cb.apply(Y, args);"," }, until.args);"," });"," };"," },",""," /**"," * Attaches one or more modules to the YUI instance. When this"," * is executed, the requirements are analyzed, and one of"," * several things can happen:"," *"," * * All requirements are available on the page -- The modules"," * are attached to the instance. If supplied, the use callback"," * is executed synchronously."," *"," * * Modules are missing, the Get utility is not available OR"," * the 'bootstrap' config is false -- A warning is issued about"," * the missing modules and all available modules are attached."," *"," * * Modules are missing, the Loader is not available but the Get"," * utility is and boostrap is not false -- The loader is bootstrapped"," * before doing the following...."," *"," * * Modules are missing and the Loader is available -- The loader"," * expands the dependency tree and fetches missing modules. When"," * the loader is finshed the callback supplied to use is executed"," * asynchronously."," *"," * @method use"," * @param modules* {String|Array} 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."," * @param callback.Y {YUI} The `YUI` instance created for this sandbox"," * @param callback.status {Object} Object containing `success`, `msg` and `data` properties"," *"," * @example"," * // loads and attaches dd and its dependencies"," * YUI().use('dd', function(Y) {});"," *"," * // loads and attaches dd and node as well as all of their dependencies (since 3.4.0)"," * YUI().use(['dd', 'node'], function(Y) {});"," *"," * // attaches all modules that are available on the page"," * YUI().use('*', function(Y) {});"," *"," * // intrinsic YUI gallery support (since 3.1.0)"," * YUI().use('gallery-yql', function(Y) {});"," *"," * // intrinsic YUI 2in3 support (since 3.1.0)"," * YUI().use('yui2-datatable', function(Y) {});"," *"," * @return {YUI} the YUI instance."," */"," use: function() {"," var args = SLICE.call(arguments, 0),"," callback = args[args.length - 1],"," Y = this,"," i = 0,"," a = [],"," name,"," Env = Y.Env,"," provisioned = true;",""," // The last argument supplied to use can be a load complete callback"," if (Y.Lang.isFunction(callback)) {"," args.pop();"," if (Y.config.delayUntil) {"," callback = Y._delayCallback(callback, Y.config.delayUntil);"," }"," } else {"," callback = null;"," }"," if (Y.Lang.isArray(args[0])) {"," args = args[0];"," }",""," if (Y.config.cacheUse) {"," while ((name = args[i++])) {"," if (!Env._attached[name]) {"," provisioned = false;"," break;"," }"," }",""," if (provisioned) {"," if (args.length) {"," }"," Y._notify(callback, ALREADY_DONE, args);"," return Y;"," }"," }",""," if (Y._loading) {"," Y._useQueue = Y._useQueue || new Y.Queue();"," Y._useQueue.add([args, callback]);"," } else {"," Y._use(args, function(Y, response) {"," Y._notify(callback, response, args);"," });"," }",""," return Y;"," },"," /**"," * Notify handler from Loader for attachment/load errors"," * @method _notify"," * @param callback {Function} The callback to pass to the `Y.config.loadErrorFn`"," * @param response {Object} The response returned from Loader"," * @param args {Array} The aruments passed from Loader"," * @private"," */"," _notify: function(callback, response, args) {"," if (!response.success && this.config.loadErrorFn) {"," this.config.loadErrorFn.call(this, this, callback, response, args);"," } else if (callback) {"," if (this.Env._missed && this.Env._missed.length) {"," response.msg = 'Missing modules: ' + this.Env._missed.join();"," response.success = false;"," }"," if (this.config.throwFail) {"," callback(this, response);"," } else {"," try {"," callback(this, response);"," } catch (e) {"," this.error('use callback error', e, args);"," }"," }"," }"," },",""," /**"," * This private method is called from the `use` method queue. To ensure that only one set of loading"," * logic is performed at a time."," * @method _use"," * @private"," * @param args* {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."," */"," _use: function(args, callback) {",""," if (!this.Array) {"," this._attach(['yui-base']);"," }",""," var len, loader, handleBoot, handleRLS,"," Y = this,"," G_ENV = YUI.Env,"," mods = G_ENV.mods,"," Env = Y.Env,"," used = Env._used,"," aliases = G_ENV.aliases,"," queue = G_ENV._loaderQueue,"," firstArg = args[0],"," YArray = Y.Array,"," config = Y.config,"," boot = config.bootstrap,"," missing = [],"," i,"," r = [],"," ret = true,"," fetchCSS = config.fetchCSS,"," process = function(names, skip) {",""," var i = 0, a = [], name, len, m, req, use;",""," if (!names.length) {"," return;"," }",""," if (aliases) {"," len = names.length;"," for (i = 0; i < len; i++) {"," if (aliases[names[i]] && !mods[names[i]]) {"," a = [].concat(a, aliases[names[i]]);"," } else {"," a.push(names[i]);"," }"," }"," names = a;"," }"," "," len = names.length;"," "," for (i = 0; i < len; i++) {"," name = names[i];"," if (!skip) {"," r.push(name);"," }",""," // only attach a module once"," if (used[name]) {"," continue;"," }"," "," m = mods[name];"," req = null;"," use = null;",""," if (m) {"," used[name] = true;"," req = m.details.requires;"," use = m.details.use;"," } else {"," // CSS files don't register themselves, see if it has"," // been loaded"," if (!G_ENV._loaded[VERSION][name]) {"," missing.push(name);"," } else {"," used[name] = true; // probably css"," }"," }",""," // make sure requirements are attached"," if (req && req.length) {"," process(req);"," }",""," // make sure we grab the submodule dependencies too"," if (use && use.length) {"," process(use, 1);"," }"," }",""," },",""," handleLoader = function(fromLoader) {"," var response = fromLoader || {"," success: true,"," msg: 'not dynamic'"," },"," redo, origMissing,"," ret = true,"," data = response.data;",""," Y._loading = false;",""," if (data) {"," origMissing = missing;"," missing = [];"," r = [];"," process(data);"," redo = missing.length;"," if (redo) {"," if ([].concat(missing).sort().join() =="," origMissing.sort().join()) {"," redo = false;"," }"," }"," }",""," if (redo && data) {"," Y._loading = true;"," Y._use(missing, function() {"," if (Y._attach(data)) {"," Y._notify(callback, response, data);"," }"," });"," } else {"," if (data) {"," ret = Y._attach(data);"," }"," if (ret) {"," Y._notify(callback, response, args);"," }"," }",""," if (Y._useQueue && Y._useQueue.size() && !Y._loading) {"," Y._use.apply(Y, Y._useQueue.next());"," }",""," };","",""," // YUI().use('*'); // bind everything available"," if (firstArg === '*') {"," args = [];"," for (i in mods) {"," if (mods.hasOwnProperty(i)) {"," args.push(i);"," }"," }"," ret = Y._attach(args);"," if (ret) {"," handleLoader();"," }"," return Y;"," }",""," if ((mods.loader || mods['loader-base']) && !Y.Loader) {"," Y._attach(['loader' + ((!mods.loader) ? '-base' : '')]);"," }","",""," // use loader to expand dependencies and sort the"," // requirements if it is available."," if (boot && Y.Loader && args.length) {"," loader = getLoader(Y);"," loader.require(args);"," loader.ignoreRegistered = true;"," loader._boot = true;"," loader.calculate(null, (fetchCSS) ? null : 'js');"," args = loader.sorted;"," loader._boot = false;"," }"," "," process(args);",""," len = missing.length;","",""," if (len) {"," missing = YArray.dedupe(missing);"," len = missing.length;"," }","",""," // dynamic load"," if (boot && len && Y.Loader) {"," Y._loading = true;"," loader = getLoader(Y);"," loader.onEnd = handleLoader;"," loader.context = Y;"," loader.data = args;"," loader.ignoreRegistered = false;"," loader.require(args);"," loader.insert(null, (fetchCSS) ? null : 'js');",""," } else if (boot && len && Y.Get && !Env.bootstrapped) {",""," Y._loading = true;",""," handleBoot = function() {"," Y._loading = false;"," queue.running = false;"," Env.bootstrapped = true;"," G_ENV._bootstrapping = false;"," if (Y._attach(['loader'])) {"," Y._use(args, callback);"," }"," };",""," if (G_ENV._bootstrapping) {"," queue.add(handleBoot);"," } else {"," G_ENV._bootstrapping = true;"," Y.Get.script(config.base + config.loaderPath, {"," onEnd: handleBoot"," });"," }",""," } else {"," ret = Y._attach(args);"," if (ret) {"," handleLoader();"," }"," }",""," return Y;"," },","",""," /**"," Adds a namespace object onto the YUI global if called statically.",""," // creates YUI.your.namespace.here as nested objects"," YUI.namespace(\"your.namespace.here\");",""," If called as a method on a YUI instance, it creates the"," namespace on the instance.",""," // creates Y.property.package"," Y.namespace(\"property.package\");",""," Dots in the input string cause `namespace` to create nested objects for"," each token. If any part of the requested namespace already exists, the"," current object will be left in place. This allows multiple calls to"," `namespace` to preserve existing namespaced properties.",""," If the first token in the namespace string is \"YAHOO\", the token is"," discarded.",""," Be careful with namespace tokens. Reserved words may work in some browsers"," and not others. For instance, the following will fail in some browsers"," because the supported version of JavaScript reserves the word \"long\":",""," Y.namespace(\"really.long.nested.namespace\");",""," Note: If you pass multiple arguments to create multiple namespaces, only"," the last one created is returned from this function.",""," @method namespace"," @param {String} namespace* namespaces to create."," @return {Object} A reference to the last namespace object created."," **/"," namespace: function() {"," var a = arguments, o, i = 0, j, d, arg;",""," for (; i < a.length; i++) {"," o = this; //Reset base object per argument or it will get reused from the last"," arg = a[i];"," if (arg.indexOf(PERIOD) > -1) { //Skip this if no \".\" is present"," d = arg.split(PERIOD);"," for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) {"," o[d[j]] = o[d[j]] || {};"," o = o[d[j]];"," }"," } else {"," o[arg] = o[arg] || {};"," o = o[arg]; //Reset base object to the new object so it's returned"," }"," }"," return o;"," },",""," // this is replaced if the log module is included"," log: NOOP,"," message: NOOP,"," // this is replaced if the dump module is included"," dump: function (o) { return ''+o; },",""," /**"," * Report an error. The reporting mechanism is controlled by"," * the `throwFail` configuration attribute. If throwFail is"," * not specified, the message is written to the Logger, otherwise"," * a JS error is thrown. If an `errorFn` is specified in the config"," * it must return `true` to keep the error from being thrown."," * @method error"," * @param msg {String} the error message."," * @param e {Error|String} Optional JS error that was caught, or an error string."," * @param src Optional additional info (passed to `Y.config.errorFn` and `Y.message`)"," * and `throwFail` is specified, this error will be re-thrown."," * @return {YUI} this YUI instance."," */"," error: function(msg, e, src) {"," //TODO Add check for window.onerror here",""," var Y = this, ret;",""," if (Y.config.errorFn) {"," ret = Y.config.errorFn.apply(Y, arguments);"," }",""," if (!ret) {"," throw (e || new Error(msg));"," } else {"," Y.message(msg, 'error', ''+src); // don't scrub this one"," }",""," return Y;"," },",""," /**"," * Generate an id that is unique among all YUI instances"," * @method guid"," * @param pre {String} optional guid prefix."," * @return {String} the guid."," */"," guid: function(pre) {"," var id = this.Env._guidp + '_' + (++this.Env._uidx);"," return (pre) ? (pre + id) : id;"," },",""," /**"," * Returns a `guid` associated with an object. If the object"," * does not have one, a new one is created unless `readOnly`"," * is specified."," * @method stamp"," * @param o {Object} The object to stamp."," * @param readOnly {Boolean} if `true`, a valid guid will only"," * be returned if the object has one assigned to it."," * @return {String} The object's guid or null."," */"," stamp: function(o, readOnly) {"," var uid;"," if (!o) {"," return o;"," }",""," // IE generates its own unique ID for dom nodes"," // The uniqueID property of a document node returns a new ID"," if (o.uniqueID && o.nodeType && o.nodeType !== 9) {"," uid = o.uniqueID;"," } else {"," uid = (typeof o === 'string') ? o : o._yuid;"," }",""," if (!uid) {"," uid = this.guid();"," if (!readOnly) {"," try {"," o._yuid = uid;"," } catch (e) {"," uid = null;"," }"," }"," }"," return uid;"," },",""," /**"," * Destroys the YUI instance"," * @method destroy"," * @since 3.3.0"," */"," destroy: function() {"," var Y = this;"," if (Y.Event) {"," Y.Event._unload();"," }"," delete instances[Y.id];"," delete Y.Env;"," delete Y.config;"," }",""," /**"," * instanceof check for objects that works around"," * memory leak in IE when the item tested is"," * window/document"," * @method instanceOf"," * @param o {Object} The object to check."," * @param type {Object} The class to check against."," * @since 3.3.0"," */","};",""," YUI.prototype = proto;",""," // inheritance utilities are not available yet"," for (prop in proto) {"," if (proto.hasOwnProperty(prop)) {"," YUI[prop] = proto[prop];"," }"," }",""," /**","Static method on the Global YUI object to apply a config to all YUI instances.","It's main use case is \"mashups\" where several third party scripts are trying to write to","a global YUI config at the same time. This way they can all call `YUI.applyConfig({})` instead of","overwriting other scripts configs.","@static","@since 3.5.0","@method applyConfig","@param {Object} o the configuration object.","@example",""," YUI.applyConfig({"," modules: {"," davglass: {"," fullpath: './davglass.js'"," }"," }"," });",""," YUI.applyConfig({"," modules: {"," foo: {"," fullpath: './foo.js'"," }"," }"," });",""," YUI().use('davglass', function(Y) {"," //Module davglass will be available here.."," });",""," */"," YUI.applyConfig = function(o) {"," if (!o) {"," return;"," }"," //If there is a GlobalConfig, apply it first to set the defaults"," if (YUI.GlobalConfig) {"," this.prototype.applyConfig.call(this, YUI.GlobalConfig);"," }"," //Apply this config to it"," this.prototype.applyConfig.call(this, o);"," //Reset GlobalConfig to the combined config"," YUI.GlobalConfig = this.config;"," };",""," // set up the environment"," YUI._init();",""," if (hasWin) {"," // add a window load event at load time so we can capture"," // the case where it fires before dynamic loading is"," // complete."," add(window, 'load', handleLoad);"," } else {"," handleLoad();"," }",""," YUI.Env.add = add;"," YUI.Env.remove = remove;",""," /*global exports*/"," // Support the CommonJS method for exporting our single global"," if (typeof exports == 'object') {"," exports.YUI = YUI;"," }","","}());","","","/**"," * The config object contains all of the configuration options for"," * the `YUI` instance. This object is supplied by the implementer"," * when instantiating a `YUI` instance. Some properties have default"," * values if they are not supplied by the implementer. This should"," * not be updated directly because some values are cached. Use"," * `applyConfig()` to update the config object on a YUI instance that"," * has already been configured."," *"," * @class config"," * @static"," */","","/**"," * Allows the YUI seed file to fetch the loader component and library"," * metadata to dynamically load additional dependencies."," *"," * @property bootstrap"," * @type boolean"," * @default true"," */","","/**"," * Turns on writing Ylog messages to the browser console."," *"," * @property debug"," * @type boolean"," * @default true"," */","","/**"," * Log to the browser console if debug is on and the browser has a"," * supported console."," *"," * @property useBrowserConsole"," * @type boolean"," * @default true"," */","","/**"," * A hash of log sources that should be logged. If specified, only"," * log messages from these sources will be logged."," *"," * @property logInclude"," * @type object"," */","","/**"," * A hash of log sources that should be not be logged. If specified,"," * all sources are logged if not on this list."," *"," * @property logExclude"," * @type object"," */","","/**"," * Set to true if the yui seed file was dynamically loaded in"," * order to bootstrap components relying on the window load event"," * and the `domready` custom event."," *"," * @property injected"," * @type boolean"," * @default false"," */","","/**"," * If `throwFail` is set, `Y.error` will generate or re-throw a JS Error."," * Otherwise the failure is logged."," *"," * @property throwFail"," * @type boolean"," * @default true"," */","","/**"," * The window/frame that this instance should operate in."," *"," * @property win"," * @type Window"," * @default the window hosting YUI"," */","","/**"," * The document associated with the 'win' configuration."," *"," * @property doc"," * @type Document"," * @default the document hosting YUI"," */","","/**"," * A list of modules that defines the YUI core (overrides the default list)."," *"," * @property core"," * @type Array"," * @default [ get,features,intl-base,yui-log,yui-later,loader-base, loader-rollup, loader-yui3 ]"," */","","/**"," * A list of languages in order of preference. This list is matched against"," * the list of available languages in modules that the YUI instance uses to"," * determine the best possible localization of language sensitive modules."," * Languages are represented using BCP 47 language tags, such as \"en-GB\" for"," * English as used in the United Kingdom, or \"zh-Hans-CN\" for simplified"," * Chinese as used in China. The list can be provided as a comma-separated"," * list or as an array."," *"," * @property lang"," * @type string|string[]"," */","","/**"," * The default date format"," * @property dateFormat"," * @type string"," * @deprecated use configuration in `DataType.Date.format()` instead."," */","","/**"," * The default locale"," * @property locale"," * @type string"," * @deprecated use `config.lang` instead."," */","","/**"," * The default interval when polling in milliseconds."," * @property pollInterval"," * @type int"," * @default 20"," */","","/**"," * The number of dynamic nodes to insert by default before"," * automatically removing them. This applies to script nodes"," * because removing the node will not make the evaluated script"," * unavailable. Dynamic CSS is not auto purged, because removing"," * a linked style sheet will also remove the style definitions."," * @property purgethreshold"," * @type int"," * @default 20"," */","","/**"," * The default interval when polling in milliseconds."," * @property windowResizeDelay"," * @type int"," * @default 40"," */","","/**"," * Base directory for dynamic loading"," * @property base"," * @type string"," */","","/*"," * The secure base dir (not implemented)"," * For dynamic loading."," * @property secureBase"," * @type string"," */","","/**"," * The YUI combo service base dir. Ex: `http://yui.yahooapis.com/combo?`"," * For dynamic loading."," * @property comboBase"," * @type string"," */","","/**"," * The root path to prepend to module path for the combo service."," * Ex: 3.0.0b1/build/"," * For dynamic loading."," * @property root"," * @type string"," */","","/**"," * 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:"," * "," *
"," * You can also define a custom filter, which must be an object literal"," * containing a search expression and a replace string:"," *"," * myFilter: {"," * 'searchExp': \"-min\\\\.js\","," * 'replaceStr': \"-debug.js\""," * }"," *"," * For dynamic loading."," *"," * @property filter"," * @type string|object"," */","","/**"," * The `skin` config let's you configure application level skin"," * customizations. It contains the following attributes which"," * can be specified to override the defaults:"," *"," * // The default skin, which is automatically applied if not"," * // overriden by a component-specific skin definition."," * // Change this in to apply a different skin globally"," * defaultSkin: 'sam',"," *"," * // This is combined with the loader base property to get"," * // the default root directory for a skin."," * base: 'assets/skins/',"," *"," * // Any component-specific overrides can be specified here,"," * // making it possible to load different skins for different"," * // components. It is possible to load more than one skin"," * // for a given component as well."," * overrides: {"," * slider: ['capsule', 'round']"," * }"," *"," * For dynamic loading."," *"," * @property skin"," */","","/**"," * Hash of per-component filter specification. If specified for a given"," * component, this overrides the filter config."," *"," * For dynamic loading."," *"," * @property filters"," */","","/**"," * Use the YUI combo service to reduce the number of http connections"," * required to load your dependencies. Turning this off will"," * disable combo handling for YUI and all module groups configured"," * with a combo service."," *"," * For dynamic loading."," *"," * @property combine"," * @type boolean"," * @default true if 'base' is not supplied, false if it is."," */","","/**"," * A list of modules that should never be dynamically loaded"," *"," * @property ignore"," * @type string[]"," */","","/**"," * A list of modules that should always be loaded when required, even if already"," * present on the page."," *"," * @property force"," * @type string[]"," */","","/**"," * Node or id for a node that should be used as the insertion point for new"," * nodes. For dynamic loading."," *"," * @property insertBefore"," * @type string"," */","","/**"," * Object literal containing attributes to add to dynamically loaded script"," * nodes."," * @property jsAttributes"," * @type string"," */","","/**"," * Object literal containing attributes to add to dynamically loaded link"," * nodes."," * @property cssAttributes"," * @type string"," */","","/**"," * Number of milliseconds before a timeout occurs when dynamically"," * loading nodes. If not set, there is no timeout."," * @property timeout"," * @type int"," */","","/**"," * Callback for the 'CSSComplete' event. When dynamically loading YUI"," * components with CSS, this property fires when the CSS is finished"," * loading but script loading is still ongoing. This provides an"," * opportunity to enhance the presentation of a loading page a little"," * bit before the entire loading process is done."," *"," * @property onCSS"," * @type function"," */","","/**"," * A hash of module definitions to add to the list of YUI components."," * These components can then be dynamically loaded side by side with"," * YUI via the `use()` method. This is a hash, the key is the module"," * name, and the value is an object literal specifying the metdata"," * for the module. See `Loader.addModule` for the supported module"," * metadata fields. Also see groups, which provides a way to"," * configure the base and combo spec for a set of modules."," *"," * modules: {"," * mymod1: {"," * requires: ['node'],"," * fullpath: '/mymod1/mymod1.js'"," * },"," * mymod2: {"," * requires: ['mymod1'],"," * fullpath: '/mymod2/mymod2.js'"," * },"," * mymod3: '/js/mymod3.js',"," * mycssmod: '/css/mycssmod.css'"," * }"," *"," *"," * @property modules"," * @type object"," */","","/**"," * Aliases are dynamic groups of modules that can be used as"," * shortcuts."," *"," * YUI({"," * aliases: {"," * davglass: [ 'node', 'yql', 'dd' ],"," * mine: [ 'davglass', 'autocomplete']"," * }"," * }).use('mine', function(Y) {"," * //Node, YQL, DD & AutoComplete available here.."," * });"," *"," * @property aliases"," * @type object"," */","","/**"," * A hash of module group definitions. It for each group you"," * can specify a list of modules and the base path and"," * combo spec to use when dynamically loading the modules."," *"," * groups: {"," * yui2: {"," * // specify whether or not this group has a combo service"," * combine: true,"," *"," * // The comboSeperator to use with this group's combo handler"," * comboSep: ';',"," *"," * // The maxURLLength for this server"," * maxURLLength: 500,"," *"," * // the base path for non-combo paths"," * base: 'http://yui.yahooapis.com/2.8.0r4/build/',"," *"," * // the path to the combo service"," * comboBase: 'http://yui.yahooapis.com/combo?',"," *"," * // a fragment to prepend to the path attribute when"," * // when building combo urls"," * root: '2.8.0r4/build/',"," *"," * // the module definitions"," * modules: {"," * yui2_yde: {"," * path: \"yahoo-dom-event/yahoo-dom-event.js\""," * },"," * yui2_anim: {"," * path: \"animation/animation.js\","," * requires: ['yui2_yde']"," * }"," * }"," * }"," * }"," *"," * @property groups"," * @type object"," */","","/**"," * The loader 'path' attribute to the loader itself. This is combined"," * with the 'base' attribute to dynamically load the loader component"," * when boostrapping with the get utility alone."," *"," * @property loaderPath"," * @type string"," * @default loader/loader-min.js"," */","","/**"," * Specifies whether or not YUI().use(...) will attempt to load CSS"," * resources at all. Any truthy value will cause CSS dependencies"," * to load when fetching script. The special value 'force' will"," * cause CSS dependencies to be loaded even if no script is needed."," *"," * @property fetchCSS"," * @type boolean|string"," * @default true"," */","","/**"," * The default gallery version to build gallery module urls"," * @property gallery"," * @type string"," * @since 3.1.0"," */","","/**"," * The default YUI 2 version to build yui2 module urls. This is for"," * intrinsic YUI 2 support via the 2in3 project. Also see the '2in3'"," * config for pulling different revisions of the wrapped YUI 2"," * modules."," * @since 3.1.0"," * @property yui2"," * @type string"," * @default 2.9.0"," */","","/**"," * The 2in3 project is a deployment of the various versions of YUI 2"," * deployed as first-class YUI 3 modules. Eventually, the wrapper"," * for the modules will change (but the underlying YUI 2 code will"," * be the same), and you can select a particular version of"," * the wrapper modules via this config."," * @since 3.1.0"," * @property 2in3"," * @type string"," * @default 4"," */","","/**"," * Alternative console log function for use in environments without"," * a supported native console. The function is executed in the"," * YUI instance context."," * @since 3.1.0"," * @property logFn"," * @type Function"," */","","/**"," * A callback to execute when Y.error is called. It receives the"," * error message and an javascript error object if Y.error was"," * executed because a javascript error was caught. The function"," * is executed in the YUI instance context. Returning `true` from this"," * function will stop the Error from being thrown."," *"," * @since 3.2.0"," * @property errorFn"," * @type Function"," */","","/**"," * A callback to execute when the loader fails to load one or"," * more resource. This could be because of a script load"," * failure. It can also fail if a javascript module fails"," * to register itself, but only when the 'requireRegistration'"," * is true. If this function is defined, the use() callback will"," * only be called when the loader succeeds, otherwise it always"," * executes unless there was a javascript error when attaching"," * a module."," *"," * @since 3.3.0"," * @property loadErrorFn"," * @type Function"," */","","/**"," * When set to true, the YUI loader will expect that all modules"," * it is responsible for loading will be first-class YUI modules"," * that register themselves with the YUI global. If this is"," * set to true, loader will fail if the module registration fails"," * to happen after the script is loaded."," *"," * @since 3.3.0"," * @property requireRegistration"," * @type boolean"," * @default false"," */","","/**"," * Cache serviced use() requests."," * @since 3.3.0"," * @property cacheUse"," * @type boolean"," * @default true"," * @deprecated no longer used"," */","","/**"," * Whether or not YUI should use native ES5 functionality when available for"," * features like `Y.Array.each()`, `Y.Object()`, etc. When `false`, YUI will"," * always use its own fallback implementations instead of relying on ES5"," * functionality, even when it's available."," *"," * @property useNativeES5"," * @type Boolean"," * @default true"," * @since 3.5.0"," */","","/**","Delay the `use` callback until a specific event has passed (`load`, `domready`, `contentready` or `available`)","@property delayUntil","@type String|Object","@since 3.6.0","@example","","You can use `load` or `domready` strings by default:",""," YUI({"," delayUntil: 'domready'"," }, function(Y) {"," //This will not fire until 'domeready'"," });","","Or you can delay until a node is available (with `available` or `contentready`):",""," YUI({"," delayUntil: {"," event: 'available',"," args: '#foo'"," }"," }, function(Y) {"," //This will not fire until '#foo' is "," // available in the DOM"," });"," ","","*/","YUI.add('yui-base', function (Y, NAME) {","","/*"," * YUI stub"," * @module yui"," * @submodule yui-base"," */","/**"," * The YUI module contains the components required for building the YUI"," * seed file. This includes the script loading mechanism, a simple queue,"," * and the core utilities for the library."," * @module yui"," * @submodule yui-base"," */","","/**"," * Provides core language utilites and extensions used throughout YUI."," *"," * @class Lang"," * @static"," */","","var L = Y.Lang || (Y.Lang = {}),","","STRING_PROTO = String.prototype,","TOSTRING = Object.prototype.toString,","","TYPES = {"," 'undefined' : 'undefined',"," 'number' : 'number',"," 'boolean' : 'boolean',"," 'string' : 'string',"," '[object Function]': 'function',"," '[object RegExp]' : 'regexp',"," '[object Array]' : 'array',"," '[object Date]' : 'date',"," '[object Error]' : 'error'","},","","SUBREGEX = /\\{\\s*([^|}]+?)\\s*(?:\\|([^}]*))?\\s*\\}/g,","TRIMREGEX = /^\\s+|\\s+$/g,","NATIVE_FN_REGEX = /\\{\\s*\\[(?:native code|function)\\]\\s*\\}/i;","","// -- Protected Methods --------------------------------------------------------","","/**","Returns `true` if the given function appears to be implemented in native code,","`false` otherwise. Will always return `false` -- even in ES5-capable browsers --","if the `useNativeES5` YUI config option is set to `false`.","","This isn't guaranteed to be 100% accurate and won't work for anything other than","functions, but it can be useful for determining whether a function like","`Array.prototype.forEach` is native or a JS shim provided by another library.","","There's a great article by @kangax discussing certain flaws with this technique:",""," * var obj = document.createElement(\"object\");"," * Y.Lang.isFunction(obj.getAttribute) // reports false in IE"," * "," * var input = document.createElement(\"input\"); // append to body"," * Y.Lang.isFunction(input.focus) // reports false in IE"," *
"," *"," * Y.Lang.isObject([]) === true."," * @method isObject"," * @static"," * @param o The object to test."," * @param failfn {boolean} fail if the input is a function."," * @return {boolean} true if o is an object."," * @see isPlainObject"," */","L.isObject = function(o, failfn) {"," var t = typeof o;"," return (o && (t === 'object' ||"," (!failfn && (t === 'function' || L.isFunction(o))))) || false;","};","","/**"," * Determines whether or not the provided item is a string."," * @method isString"," * @static"," * @param o The object to test."," * @return {boolean} true if o is a string."," */","L.isString = function(o) {"," return typeof o === 'string';","};","","/**"," * Determines whether or not the provided item is undefined."," * @method isUndefined"," * @static"," * @param o The object to test."," * @return {boolean} true if o is undefined."," */","L.isUndefined = function(o) {"," return typeof o === 'undefined';","};","","/**"," * A convenience method for detecting a legitimate non-null value."," * Returns false for null/undefined/NaN, true for other values,"," * including 0/false/''"," * @method isValue"," * @static"," * @param o The item to test."," * @return {boolean} true if it is not null/undefined/NaN || false."," */","L.isValue = function(o) {"," var t = L.type(o);",""," switch (t) {"," case 'number':"," return isFinite(o);",""," case 'null': // fallthru"," case 'undefined':"," return false;",""," default:"," return !!t;"," }","};","","/**"," * Returns the current time in milliseconds."," *"," * @method now"," * @return {Number} Current time in milliseconds."," * @static"," * @since 3.3.0"," */","L.now = Date.now || function () {"," return new Date().getTime();","};","","/**"," * Lightweight version of Y.substitute. Uses the same template"," * structure as Y.substitute, but doesn't support recursion,"," * auto-object coersion, or formats."," * @method sub"," * @param {string} s String to be modified."," * @param {object} o Object containing replacement values."," * @return {string} the substitute result."," * @static"," * @since 3.2.0"," */","L.sub = function(s, o) {"," return s.replace ? s.replace(SUBREGEX, function (match, key) {"," return L.isUndefined(o[key]) ? match : o[key];"," }) : s;","};","","/**"," * Returns a string without any leading or trailing whitespace. If"," * the input is not a string, the input will be returned untouched."," * @method trim"," * @static"," * @param s {string} the string to trim."," * @return {string} the trimmed string."," */","L.trim = STRING_PROTO.trim ? function(s) {"," return s && s.trim ? s.trim() : s;","} : function (s) {"," try {"," return s.replace(TRIMREGEX, '');"," } catch (e) {"," return s;"," }","};","","/**"," * Returns a string without any leading whitespace."," * @method trimLeft"," * @static"," * @param s {string} the string to trim."," * @return {string} the trimmed string."," */","L.trimLeft = STRING_PROTO.trimLeft ? function (s) {"," return s.trimLeft();","} : function (s) {"," return s.replace(/^\\s+/, '');","};","","/**"," * Returns a string without any trailing whitespace."," * @method trimRight"," * @static"," * @param s {string} the string to trim."," * @return {string} the trimmed string."," */","L.trimRight = STRING_PROTO.trimRight ? function (s) {"," return s.trimRight();","} : function (s) {"," return s.replace(/\\s+$/, '');","};","","/**","Returns one of the following strings, representing the type of the item passed","in:",""," * \"array\""," * \"boolean\""," * \"date\""," * \"error\""," * \"function\""," * \"null\""," * \"number\""," * \"object\""," * \"regexp\""," * \"string\""," * \"undefined\"","","Known issues:",""," * `typeof HTMLElementCollection` returns function in Safari, but"," `Y.Lang.type()` reports \"object\", which could be a good thing --"," but it actually caused the logic in Y.Lang.isObject to fail.","","@method type","@param o the item to test.","@return {string} the detected type.","@static","**/","L.type = function(o) {"," return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null');","};","/**","@module yui","@submodule yui-base","*/","","var Lang = Y.Lang,"," Native = Array.prototype,",""," hasOwn = Object.prototype.hasOwnProperty;","","/**","Provides utility methods for working with arrays. Additional array helpers can","be found in the `collection` and `array-extras` modules.","","`Y.Array(thing)` returns a native array created from _thing_. Depending on","_thing_'s type, one of the following will happen:",""," * Arrays are returned unmodified unless a non-zero _startIndex_ is"," specified."," * Array-like collections (see `Array.test()`) are converted to arrays."," * For everything else, a new array is created with _thing_ as the sole"," item.","","Note: elements that are also collections, such as `